Repository navigation
Agents: user collectors + Go connection settings card - #11967
washburnello wants to merge 2 commits into
Conversation
omarchy-agent-usage-update also runs omarchy-agent-usage-* collectors from ~/.config/omarchy/agents/collectors/, so one refresh timer covers packaged and user accounts alike. A collector may print one record or an object of several records keyed by id (one scan feeding many tabs); each is fanned out to its own usage file, and ids a collector stops emitting are retired via a cache-dir sidecar the panel never reads.
Gear in the hero (opencode-go tab only) toggles an inline settings card under the provider tabs: workspace-URL field that strips the wrk_ ID itself, masked auth-cookie field with one-line hints, Apply and Test buttons driving the shared update command, and terse verdicts. An accent dot on the gear replaces the red status box for Go; stale or failed limits dim instead of shouting.
Automated AI review
Verified: with no user collectors, The main open question is the Go settings card, which depends on a collector that is not in this PR. Smaller issues follow in the fan-out sidecar, cookie storage, filters and panel focus. Go card depends on an undocumented, out-of-tree collector contract
The README describes user collectors as It also overlaps with open PRs that add packaged OpenCode collectors:
Those collectors read Go limits from OpenCode's Impact: "zero behavior change for stock installs" holds only while no packaged collector emits Suggested change: ship the Go collector together with the card, or split the PR so the generic user-collector support lands on its own. Document the config file, record fields and status words in the README. Derive the Apply/Test target from the producer sidecar (id to group) or from the record, instead of hard-coding Parallel collectors lose entries in the producer sidecar
Impact: limited to users with two or more multi-record collectors, but for newly added ids it recreates the frozen-tab problem the sidecar is meant to prevent. Suggested change: serialize the sidecar step with Auth cookie is saved world-readable
Impact: other local users can read the cookie wherever the home directory permissions allow it; 0600 is the usual mode for a credential file. Suggested change: Disabling or retrying a fan-out provider targets the wrong name
Impact: disabling Suggested change: map ids to groups through the sidecar in Keyboard focus stays in the hidden Go field after switching tabsOpening the card focuses the workspace field. Clicking another provider chip hides the card, but focus stays on the now-invisible field. Measured on the real Impact: after a tab switch, by source, panel shortcuts go to an invisible field and a second Escape is needed to close the panel. Suggested change: close the card, or call Collector names and fan-out ids are not validatedReproduced with synthetic collectors:
Impact: a collector's output can overwrite or delete other records, write or remove files outside the usage directory, or fail to write while the update still exits 0. User collectors are the user's own code, so this matters mainly for collectors that build ids from remote data. Suggested change: validate ids against a conservative charset (for example Also noted: FileView writes are asynchronous, and Apply starts the fetch without waiting for Optional test improvement: Related open PRs:
Review informationTest scope: Source review of the pinned head, plus sandboxed runs: the updater at base and head with synthetic collectors (flag parity, fan-out, retirement, concurrency, name and id edge cases), the existing agent tests at base, head and head merged onto current AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
Two commits, one theme: let the agents panel cover accounts Omarchy doesn't ship collectors for, with OpenCode Go limits as the first user.
1. User collectors through the shared update command (
bin/omarchy-agent-usage-update, README)omarchy-agent-usage-*executables from~/.config/omarchy/agents/collectors/with the same flags (--force,--limits-only,--except, per-agent filter) and the panel's existing refresh timer — no separate scheduling needed.2. Go connection settings card with Test and Apply (
shell/plugins/agents/Panel.qml,Main.qml)opencode-gotab, toggling an inline card under the provider tabs: workspace-URL field (strips thewrk_ID itself), masked auth-cookie field with one-line hints, Apply + Test buttons driving the shared update command, terse verdicts.limitsStaleso cached-after-failure meters can't pose as fresh.Compatibility: without a user collector producing an
opencode-gorecord the gear never renders — zero behavior change for stock installs.agents-panel-test.shandagent-usage-update-test.shpass; fan-out, stale-id retirement, and forced group updates verified live.