l0.DependencyControl.FeedManager¶
FeedManager ¶
Turns reachable-feed data into what the Manage Feeds UI shows and offers: the actions available for a feed
and its DepCtrl Browser link. Trust reads/writes go through FeedTrust.
Constructor ¶
| param | type | description |
|---|---|---|
| feedTrust | FeedTrust | The trust model that action execution delegates to. |
Instance methods¶
applyAction ¶
Applies a trust action to a feed, delegating to FeedTrust. Re-checks that the action is one the feed
actually offers, so a guarded action (e.g. blocking the bootstrap feed) is refused even if asked for.
Open Browser and any action the feed doesn't offer mutate nothing.
| param | type | description |
|---|---|---|
| action | FeedAction | The action to apply (one offered by getAvailableActions). |
| entry | FeedInventoryEntry | The feed to act on. |
| opts? | { reason?: string } |
reason annotates a Block entry. |
Returns:
appliedboolean— Whether trust state was changed.
Class methods¶
getBrowserUrl ¶
The DepCtrl Browser deep-link for a feed. Best-effort: it resolves only for feeds in the browser's crawl graph (official/known feeds).
| param | type | description |
|---|---|---|
| feedUrl | string |
The exact feed URL, as stored (the hash is sensitive to casing and trailing slash). |
Returns:
urlstring— The Browser page URL.
getAvailableActions ¶
The actions the Manage Feeds UI offers for a feed, from its trust state and provenance.
| param | type | description |
|---|---|---|
| entry | FeedInventoryEntry | The feed to compute the offered actions for. |
Returns:
actionsFeedAction[] — In a stable order, state-changing actions first and Open Browser last.
buildRows ¶
Turns feed entries into dialog rows — each feed with its offered actions, Browser link, and removable
flag. Sorted by URL.
| param | type | description |
|---|---|---|
| entries | FeedInventoryEntry[] | The reachable-feed entries to render (from FeedInventory.gather/crawl). |
Returns:
rowsFeedManagerRow[] — The URL-sorted display rows.
Enums¶
FeedAction ¶
| member | value | description |
|---|---|---|
| Trust | "trust" |
add the feed to the user's trustedFeeds |
| Block | "block" |
add a block entry for the feed |
| Unblock | "unblock" |
remove the user's exact block on the feed |
| Remove | "remove" |
drop the user's extraFeeds/trustedFeeds contribution |
| OpenBrowser | "open-browser" |
open the feed in the DepCtrl Browser |
Types¶
FeedManagerRow ¶
A Manage Feeds list row: a feed's inventory fields plus what the UI needs to render and act on it.
| field | type | description |
|---|---|---|
| url | string |
The feed URL. |
| trustStatus | FeedTrustStatus | The feed's trust state. |
| inTrustedFeeds? | boolean |
True when the feed is in the user's trustedFeeds (a trust-only listing). |
| provenance | FeedProvenance[] | The sources the feed was found through. |
| packages | string[] |
Namespaces of installed packages tied to this feed. |
| advertisedBy | string[] |
Feeds that advertise this feed (crawl only). |
| blockedBy? | BlockedFeedEntry | The matching block entry when the feed is blocked. |
| reachable? | boolean |
Whether a crawl fetched the feed (nil when not crawled). |
| lastFetchedAt? | integer |
Unix time the feed was last fetched into the persistent cache (nil if never cached). |
| inUse? | boolean |
Whether the feed is the effective update source of an installed package. |
| actions | FeedAction[] | The actions offered for this feed. |
| browserUrl | string |
The feed's DepCtrl Browser deep-link. |
| removable | boolean |
Whether the feed has a user contribution that Remove can drop. |