Repository navigation
feat(apps): show_attention, a read-only report of what needs action in an account - #287
Open
acoyfellow wants to merge 2 commits into
Open
acoyfellow wants to merge 2 commits into
acoyfellow wants to merge 2 commits into
Conversation
…n an account show_attention lists notifications that fired in the last 7 days, open Security Center insights and active Workers Observability issues, most severe first, as text and structuredContent. It is registered in both tool modes. - Feeds are read with the caller's token. A refused feed names the missing permission, a 5xx is retried, and a feed that fails is reported instead of shown as empty. - An account_id the session cannot reach is rejected before any feed call. Only https://dash.cloudflare.com links are kept.
…rd links Security Center returns dashboard translation keys in resolve_text and relative paths such as /:account_id/turnstile in resolve_link. Fall back to the insight class for keys, and resolve relative paths on dash.cloudflare.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
show_attentionreturns what needs action in one Cloudflare account. It reads three feeds with the caller's token:It sorts the items by severity and returns them as text and as
structuredContent. Both tool modes register it. This PR has no UI. The MCP App panel is #282, which builds on this PR.When a feed fails, the result says so:
unavailableand the other feeds still return.account_idthat the session cannot reach gets the same error asexecute. No feed is called.The tool declares only the three read scopes. It keeps a link only when it is
https://dash.cloudflare.com.Size: 425 lines of source in 3 new files and 2 edited ones, and 352 lines of tests. The 6 existing tool-list tests each gain
show_attention. No new dependencies.npm run checkpasses (499 tests). I ran the same tool code againstwrangler devwith a real token on an internal account, before splitting it from #282. Live Workers issues came back, and the Security insights feed named its missing permission.#268 and #275 ask the client to grant a missing OAuth scope when an API call is refused. This tool reports a missing permission in its own result and returns the feeds that loaded.
Open question: without Notifications Read, alert history returns
success: true, result: null. The tool cannot tell "no alerts" from "not allowed" for that feed.