Repository navigation
mcpx: session inventory operation (GET /v1/sessions) — slice 1 of #1931 - #2594
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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. |
The basic tier's plugin-sync check compares pkgs/mcpx/plugin/opencode/mcpx with the repo's dogfood copy .opencode/plugin/mcpx. PR #2594 regenerated the pkgs copy for the new sessions_read operation but left the dogfood copy behind, so the check failed at diff -r. Copy the regenerated file across; both diff -r and the mcpx-session.ts diff are clean. No logic change: .opencode/plugin/mcpx/ops.gen.ts is generated output.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Resolves the four conflicts the branch picked up while it sat unmerged (behind 3016 commits): - internal/api/ops.go: taken from main, which has since added the Permission tier and authz_decisions; sessions_read re-inserted after status with PermissionRead. - internal/daemon/server.go: taken from main's s.route() registration (which records the authorisation decision); routesSessions called after the status route. - routes_sessions.go: module path was github.com/dezren39/mcpx, stale in this repo (module github.com/developing-today/code/pkgs/mcpx); registered through s.route so the decision is recorded. - docs/parity.md: regenerated (87 ops, 72 commands). Also syncs two dogfood plugin copies with their pkgs originals: ops.gen.ts (sessionsRead; the packet's fix) and mcpx-session.ts, which had already drifted on main (pkgs copy carries the transient-discovery retry fix, .opencode copy still had missedAt = Date.now()). No behaviour change beyond the intended slice-1 route.
Slice 1 of #1931 (queue task 3226): the session inventory as a declared operation.
What changed
internal/api/ops.go: newsessions_readoperation —GET /v1/sessions— declared in the ops table, so the route, the generated MCP proxy tool (mcpx_sessions_read), the generated CLI command (mcpx sessions read) and the OpenAPI entry all come from the one declaration. No hand-written route/tool/command.internal/daemon/routes_sessions.go: the handler assembles the answer fromRegistry.Status()and flattens every pool's instances into one list, reusingpool.InstanceStatusunchanged (id, pid, holders, key, calls, uptimeSec, idleSec) — no parallel struct. An empty inventory renders as an empty list, never null or an error.plugin/opencode/mcpx/ops.gen.tsanddocs/parity.md(via the suites'-updateruns).Tests (laptop)
[].go test ./internal/api/passes (including parity and the plugin-generation check); CLI parity tests pass (TestParityDocumentIsCurrent, command-reach, plugin-op-tag). Fullgo test ./...runs in CI.Need help on this PR? Tag
@codesmith-botwith what you need.