Repository navigation
sminos 1.11.0: the desk's reads of usage, config, settings and MCP, and capabilities.controls (MW1) - #395
Conversation
…nd capabilities.controls (MW1)
The machine half of the desk control surface's MW1 (MAWS spec
2026-10-22-desk-control-surface-design.md, the machine-side wave):
- the bridge serves `read usage` (the summary unless {breakdown: "full"},
saying which), `read config` ($.config.list() rows, read only, a plugin's
text row without its value), `read settings` (permission rules merged and
by source, hooks as event, matcher and count; never env or a command) and
`read mcp` (servers from the MCP tools, exact: false), in bridge-reads.tsx;
- capabilities gain `controls`, the lane map's 20 keys, each available or
unavailable with its reason (bridge-controls.tsx);
- the plane adds to an `mcp` read the servers the project disables, from the
one key of the engine's .claude.json, under the repository's top level as
the engine files it (measured on 2.1.310);
- `sminos read <member> <what> --breakdown full`.
Live-checked on Claude Code 2.1.310 in an isolated profile behind a recording
stub, zero inference.
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fa283d0d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const read = await $.session.usage({ breakdown }) | ||
| return { ok: true, result: { ...read, breakdownDetail: breakdown } } |
There was a problem hiding this comment.
Allow full usage reads to outlast the immediate-command timeout
When the token-count API takes longer than 10 seconds, a usage read with breakdown: 'full' always fails at the caller despite eventually completing here. Both cmd_read and the plane's read_answer use sminos_control.COMMAND_WAIT_MS = 10000; Bridge.command returns 504 and removes its waiter at that deadline, so neither caller receives the eventual count. Unlike the existing immediate reads, this new path awaits external API requests. Give full usage reads a suitable timeout through both transports, or return their results asynchronously, so slower counts remain usable without repeatedly initiating the same API work.
Useful? React with 👍 / 👎.
…onfig file and project key The MW1 review's two P2s, each reproduced on 2.1.310: - a linked worktree's project entry is its primary checkout's (the engine's canonical git root follows the worktree's gitdir to its commondir and checks the back-pointer), not the directory holding the .git file; - the global config is the legacy <config dir>/.config.json while it is a nonempty file (or an empty writable one with no .claude.json), as the engine's file chooser has it; .claude-custom-oauth.json under a custom OAuth URL. Tests: a real `git worktree add`, a broken back-pointer, and the legacy file's cases. Live-checked: a session in a linked worktree, and one on a legacy .config.json profile, each had /mcp disable write where the plane now reads. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
The machine half of MW1 ("reads") in the desk control surface spec's machine-side wave (MAWS
docs/doperpowers/specs/2026-10-22-desk-control-surface-design.md, Plan of Work, MW1). sminos 1.10.1 → 1.11.0.What it builds
sminos/hooks/mods/bridge-reads.tsx, advertised incapabilities.reads):usage {breakdown?}:$.session.usage, the summary unlessfullis asked for (fullcalls the token-count API), withbreakdownDetailnaming which. Any other breakdown is refused.config:$.config.list()rows in order withreadOnly: true. A plugin'stextrow loses itsvalue.settings: the §11 cut. Permission rules are given merged and by source (flagis spelledcliArg), each rule string parsed by the engine's grammar. Hooks are given as event, matcher and command count, withpermissionsExact: false.envand hook commands are never sent.mcp:$.tool.list()grouped by server,exact: false.capabilities.controls(bridge-controls.tsx): the lane map's 20 control keys, each{available, reason?}. The controls that existed before the wave are available, plus MW1's four reads. Controls later MWs build say not in sminos 1.11.0. Four are unavailable with a standing reason:decide.interrupt,forget,rewind-files,elicitation.answer.sminos_plane.py) adds to anmcpread the servers the session's project disables. It reads onlyprojects[<key>].disabledMcpServersfrom the engine's.claude.json. The key is the repository's top level, the same key the engine uses (measured below).sminos read <member> <what> --breakdown full.Validation Evidence
ci-gateon1fa283d0was GREEN: https://github.com/SSFSKIM/doperpowers/actions/runs/40281245997 (shell-lint, repo-checks, sminos-mods, mods-types, board-api, sminos, issue-tracker, sminos-suites all PASS).claude plugin testwith a staged copy ofreads.test.tsandbridge.test.ts:318 pass, 0 fail.reads.test.tsagainst HEAD's mods:the file did not load … cannot import "../../hooks/mods/bridge-controls".bridge.test.tswith the new modules present butbridge.tsxunwired:305 pass, 2 fail. The failures were the capabilities test and the reads test.python3 test_session_plane.py McpDisabled:Ran 6 tests … OK. Against HEAD's plane:FAILED (errors=6).bash sminos/tests/test-bridge-control.sh:all 157 bridge control assertions passed, including the--breakdownrelay.tsc -p sminos/hooks/mods/tsconfig.jsonagainst declarations laid by Claude Code 2.1.310 exits 0.run-sminos-tests.shreported2 of 2391 assertions FAILED, intest-sync.shandtest-join.sh. These two suites are unrelated to this change, and run alone they pass:all 105 sync assertions passed,test-join: all 84 assertions passed. CI'ssminos-suitespassed.sminos/tests/mods/run.shexits 0./private/tmp/mw1-live/c2, anenv -ilaunch, and the working copy loaded with--plugin-dir.ANTHROPIC_BASE_URLpointed at a recording stub on 127.0.0.1 with a dummy key, so no inference was spent. The bridge child's/commandwas driven directly. Script:/tmp/dsk-scripts/mw-wave/mw1-live/live.py; evidence:/tmp/dsk-scripts/mw-wave/mw1-live/evidence/c2/.GET /status:sminos 1.11.0, engine 2.1.310, reads [status, catalog, usage, config, settings, mcp], andcontrolswith all 20 keys.readOnly: true. The only locked row isthinking. The engine'stextrows areautoUpdatesChannel = "disabled"andlanguage = "Default (English)"; neither holds a credential. The probe plugin'scfgprobe.apiTokenandcfgprobe.regiontext rows come without a value.count_tokensrequests;fullsent 29. Both answers say which they are.{breakdown: "exact"}is refused with usage's breakdown is summary or full.rateLimits: []even after a turn whose stub response carried the unified 5h and 7d headers. 2.1.310 records them only on a claude.ai subscription.probe serverreadsprobe_server(connected, 2 tools). The plane addedparked serverasdisabled. After/mcp disable plainthrough the bridge'scommandop,plainmoved from connected to disabled, and the engine wrote it underprojects["…/work"], the git top level, although the session was launched inwork/sub.envvalue, a plugin config value, the API key.Hub half: SSFSKIM/MAWS#153
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)