Skip to content

refactor: derive command exposure lists from descriptors#1137

Merged
thymikee merged 1 commit into
mainfrom
codex/finish-command-descriptor-registry
Jul 7, 2026
Merged

refactor: derive command exposure lists from descriptors#1137
thymikee merged 1 commit into
mainfrom
codex/finish-command-descriptor-registry

Conversation

@thymikee

@thymikee thymikee commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Derive MCP exposure and capability-checked CLI command lists from command descriptors.
Remove the hand-maintained catalog exposure/exemption sets, keep command identity in the catalog, and document the remaining descriptor ownership boundary.

Closes #1136

Validation

  • pnpm format
  • pnpm exec vitest run src/core/command-descriptor/__tests__ src/utils/__tests__/command-schema-guards.test.ts src/commands/__tests__/command-surface-metadata.test.ts src/mcp/__tests__/router.test.ts
  • pnpm check:quick
  • pnpm check:fallow --base origin/main

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.6 MB 1.6 MB -51 B
JS gzip 500.0 kB 499.9 kB -51 B
npm tarball 596.9 kB 596.9 kB -74 B
npm unpacked 2.1 MB 2.1 MB -51 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.0 ms 28.0 ms +0.0 ms
CLI --help 54.1 ms 53.8 ms -0.2 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/sdk-batch.js -61 B -55 B
dist/src/internal/daemon.js 0 B +5 B
dist/src/device-rotation.js 0 B +2 B
dist/src/runtime.js 0 B -2 B
dist/src/session.js 0 B -1 B

@thymikee

thymikee commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

Reviewed #1137 at head e35728b against #1136 and ADR 0008. No actionable blockers found.

Checked:

  • src/command-catalog.ts no longer owns the MCP exposure and capability-check hand lists; it keeps command identity.
  • src/core/command-descriptor/registry.ts derives MCP exposure from descriptors, keeps prepare explicitly unexposed, and represents local client-backed debug, metro, and session without giving them daemon routes or capabilities.
  • deriveDaemonCommandDescriptors only includes descriptors with a daemon facet, so local MCP commands do not enter daemon routing.
  • deriveStructuredBatchCommandNames still only uses batchable, and the added local commands are not batchable.
  • listCommandMetadata, MCP router, and schema guard tests consume the registry projection and fail fast if descriptor-exposed commands lack metadata or executable definitions.
  • CI is green across 21 checks.

Residual note: the monitor guidance references plans/perfect-shape.md, but that file is absent on this checkout/ref. I reviewed against the embedded checklist, #1136, and ADR 0008 instead.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 6, 2026
@thymikee thymikee merged commit 8ef4e73 into main Jul 7, 2026
21 checks passed
@thymikee thymikee deleted the codex/finish-command-descriptor-registry branch July 7, 2026 06:00
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-07 06:00 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish descriptor-derived command exposure lists

1 participant