Land the Model Context Protocol (MCP) integration as a transport binding, not a built-in feature. Six Lua functions plus userdata methods expose the substance of three MCP feature areas (resources, tools, prompts), a notification dispatcher, and a non-trivial AI-assistance example package that meets the architectural ship gate (spec/pmacs-spec.tex:1572): zero direct calls into the Rust core, zero special-cased MCP handling outside the public API, source under 2000 lines of Lua. The M9.5 -> M9.6 -> M9.7 -> M9.8 layered composition validates the claim "AI is a transport binding, not a feature" -- pmacs-mcp-ai composes with pmacs-mcp-prompts.render and inherits notification handling transitively through M9.7's package, demonstrating that the AI domain is a layer above MCP, not a thread woven through the core. Subtask shape: M9.1 stdio transport + initialize handshake + restart policy M9.2 resources with in-flight + settled cache and per-uri invalidation M9.3 tools with isError-vs-JSON-RPC-error semantics + cancellation M9.4 prompts with required-argument validation M9.5 notification dispatcher (on_notification, off_notification) M9.6 tools-as-commands fixture package + 12 audit findings disposed M9.7 prompts-as-result-buffers fixture package + tree-sitter-md grammar M9.8 AI-assistance fixture package (363+ LoC; 17/17 acceptance tests) M9.9 formal package audit -- PASS on all three criteria M9.10 release: TRANSITION-M9.md + MCP-for-package-authors guide Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| async.lua | ||
| fs.lua | ||
| lsp.lua | ||
| mcp.lua | ||
| syntax.lua | ||