Skip to content

feat(mcp): lifecycle line cards match design doc §37 (Stage A of #105)#106

Merged
esengine merged 1 commit intomainfrom
feat/mcp-lifecycle-vocab
May 2, 2026
Merged

feat(mcp): lifecycle line cards match design doc §37 (Stage A of #105)#106
esengine merged 1 commit intomainfrom
feat/mcp-lifecycle-vocab

Conversation

@esengine
Copy link
Copy Markdown
Owner

@esengine esengine commented May 2, 2026

Stage A of #105.

What

Replace the two ad-hoc startup strings in chat.tsx and run.ts with the lifecycle vocabulary documented in docs/design/agent-tui-terminal.html §37. This stage wires the three states that already fire today; B and C will wire the rest.

Before:

▸ MCP[notion]: 12 tool(s) from npx -y @modelcontextprotocol/server-...
▸ MCP setup SKIPPED for "fs": ENOENT
  → run `reasonix setup` ...

After:

⌘ MCP · notion          ↻ handshake…   initialise → tools/list → resources/list
⌘ MCP · notion          ✓ connected    12 tools · 8 resources · 142ms
⌘ MCP · fs              ✖ failed       ENOENT: server binary missing
  → run `reasonix setup` ...

Why

The runtime drifted from the design doc. This stage closes the gap on lifecycle vocabulary and lays the formatter that Stage B (browser modal) and Stage C (disable / enable / reconnect / slow-toast) will reuse.

Touch

  • New src/cli/ui/mcp-lifecycle.ts exporting a typed formatMcpLifecycleEvent so chat / run / future surfaces share one formatter.
  • src/cli/commands/chat.tsx: emit handshake before mcp.initialize(), emit connected after bridge + inspect with resource / prompt counts and elapsed ms, emit failed in the catch path.
  • src/cli/commands/run.ts: same pattern.
  • tests/mcp-lifecycle.test.ts: 6 cases pinning the layout (column alignment for short/long names, minimum-gap fallback, no embedded newlines).

Test plan

  • npm run verify passes locally (1737 tests, lint, typecheck, build)
  • No consumers of the old ▸ MCP[...] / ▸ MCP setup SKIPPED format outside the two files I'm editing (greppable)
  • Eyeball npm run dev chat --mcp ... startup against the design §37 mockup

@esengine esengine merged commit 5e0cc49 into main May 2, 2026
1 check passed
@esengine esengine deleted the feat/mcp-lifecycle-vocab branch May 2, 2026 06:56
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