feat: add read-only agent-sudo topology view#117
Merged
Conversation
Answer 'what Agent_Sudo instances are guarding me right now, and what is not routed through Agent_Sudo?' Four sections, regrouped from inventory data plus a small presence probe: 1. CLI surfaces — the agent-sudo your shell resolves (install + version) 2. MCP clients — Claude Desktop / Gemini / Antigravity: config, command, version, and the audit log each writes to 3. Audit destinations — which clients share which audit log 4. Not routed — MCP tooling present but not wired through Agent_Sudo (Smithery is the motivating example) Reuses build_inventory(); adds an additive ConfigRecord.audit_log field (extracted from the client's --audit-log arg). Read-only: no execution of discovered binaries, no auto-fix, no cleanup, no graph, no process monitor. The unrouted-tool registry and probe paths are injectable for tests. Closes #112
A shim only resolves to a version install; showing both as separate CLI rows was a misleading duplicate. Collapse the shim into the pyenv-version install it resolves to (marked via_shim), and only show a standalone shim when nothing else is on PATH. Add tests for collapse and the shim-only fallback.
Member
Author
|
Verification pass (7 checks) — all pass; one improvement pushed.
Full suite: 506 passed. ruff clean. |
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.
Closes #112. Last in the founder-dogfood self-identity chain. Regroups
inventorydata into the view a confused user actually needs.Goal: answer "What Agent_Sudo instances are guarding me right now?" and "What is not routed through Agent_Sudo?" — the exact questions from the original dogfood session.
What
agent-sudo topology(human view +--json), four flat sections:On the dogfood machine this surfaces the original confusions directly: which copy the terminal uses, that Claude Desktop runs the
/Volumes/Storageengine while Gemini/Antigravity run the~/Developerengine, the two audit logs, and Smithery as present-but-not-routed.Design constraints (all honored)
build_inventory(); the only inventory change is an additiveConfigRecord.audit_logfield (extracted from the client's--audit-logarg).Tests / validation
tests/test_topology.py(12 cases): CLI-surface ordering + shim flag, MCP client audit/editable-source join, audit-destination grouping, not-routed detection (present / absent / routed-name-excluded), formatter sections, audit-log arg extraction.ruffclean.command_reference.mdgains atopologyentry + category-table row.