Skip to content

feat(status): surface codex MCP registration + close #36 Phase 4#40

Merged
pacphi merged 1 commit into
mainfrom
feat/codex-mcp-status-row
Jul 23, 2026
Merged

feat(status): surface codex MCP registration + close #36 Phase 4#40
pacphi merged 1 commit into
mainfrom
feat/codex-mcp-status-row

Conversation

@pacphi

@pacphi pacphi commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up polish to #39 (dual-host per-activity LLM routing, merged fd74187), plus the resolution of #36 Phase 4.

Task 1 — #36 Phase 4 decision (verified, no code)

Phase 4 proposed a persisted kit.json role-split preference that scaffolds package.json dual:* scripts. Both halves are obviated by #39 — closing #36 as complete (decision posted as a comment there):

  • Persisted role-split preference → already delivered by providers.dualRouting (src/lib/config.mjs:25, resolved in src/lib/routing.mjs). It's a per-activity {host, model, escalate?, source} policy — a superset of a per-template role split, with provenance so user edits survive re-seeding.
  • package.json dual:* scaffolding → superseded by ak dual run <template> "<task>" (src/commands/dual.mjs), which reads that same policy and shells to claude-flow-codex dual run. Strictly better than mutating the user's package.json: no file writes, works in any repo (not just Node), and adds --route/--escalate/--dry-run.

Building the scaffolding would write opinionated scripts into the user's package.json for ~no gain, so it was not built (per the issue's own "opt-in only, explicit sign-off" framing).

Task 2 — polish (this PR's code)

(a) codex MCP status visibility. New codex-mcp row in ak status (+ PREF slot in dashboard-server.mjs) showing whether the project-scoped codex MCP backend (mcp__codex__codex, ADR-0001 projection #3) is registered. Surfaces only when the codex host is enabled.

Detection is a pure, spawn-free helper codexMcpStatus(cfg, cwd) in mcp.mjs: reads the project .mcp.json (what claude mcp add -s project writes — the deterministic equivalent of claude mcp get codex) plus the kit.json providers.codexMcp === 'ak' ownership marker. A pre-existing user-registered server is reported but flagged not-ak-managed. Mirrors registrationStatus()'s file-read approach; 6 new unit tests, no claude spawn.

(b) ruvnet/ruflo#2766 tracking. Threaded the issue reference into dual.mjs's CLAUDE_FLOW_DB_PATH workaround comments (the @claude-flow/codex shared-memory bootstrap bug the pin neutralizes), so the removal condition is unambiguous. The workaround stays until #2766 ships; a live end-to-end re-verify is deferred to that point.

Verification

pnpm run check green — typecheck, eslint, markdownlint, build-check, and full test suite (incl. the 6 new tests/kit/codex-mcp.test.mjs cases).

Refs #36, #39, ruvnet/ruflo#2766

Add a `codex-mcp` row to `ak status` (and its PREF slot in the dashboard)
showing whether the project-scoped codex MCP backend (mcp__codex__codex) is
registered — the dual-host inline Claude→Codex path (ADR-0001 projection #3,
PR #39). Surfaces only when the codex host is enabled.

Detection is a pure, spawn-free helper `codexMcpStatus(cfg, cwd)` in mcp.mjs:
it reads the project `.mcp.json` (the file `claude mcp add -s project` writes —
the deterministic equivalent of `claude mcp get codex`) plus the kit.json
`providers.codexMcp === 'ak'` ownership marker, so a pre-existing user server
is reported but flagged not-ak-managed. Mirrors registrationStatus()'s
file-read approach; unit-tested without spawning claude.

Also thread the ruvnet/ruflo#2766 tracking reference into dual.mjs's
CLAUDE_FLOW_DB_PATH workaround comments (the shared-memory bootstrap bug the
pin neutralizes) so the removal condition is unambiguous once upstream ships.

Refs #36, #39, ruvnet/ruflo#2766
@pacphi
pacphi merged commit 6cc7c6c into main Jul 23, 2026
11 checks passed
@pacphi
pacphi deleted the feat/codex-mcp-status-row branch July 23, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant