feat: make CSM a native Claude Code feature — full subsystem surface#57
Open
NovasPlace wants to merge 11 commits into
Open
feat: make CSM a native Claude Code feature — full subsystem surface#57NovasPlace wants to merge 11 commits into
NovasPlace wants to merge 11 commits into
Conversation
Captures transport pipe name, hook wire-format mappings for all 10 lifecycle events, and the native tool catalog surface. This is the behavioral invariant the HostProfile seam must preserve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce src/native-host-profile.ts and thread an optional HostProfile (default CODEX_HOST_PROFILE) through the hook relay, native runtime, and lifecycle hooks. All host-specific strings (pipe prefix, default session id, agent/message ids, host label, restart message) now flow through the profile with no `if (host)` branches in the internals. Codex behavior is unchanged: the default profile carries the exact prior strings; golden + parity suites stay green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extract runNativeMcpServer(profile) and runNativeHookClient(profile) as the single implementation of the stdio MCP server and lifecycle hook client. Codex and Claude entrypoints are thin wrappers passing their HostProfile. Add claude-hook-relay convenience wrappers. Codex stdio behavior is byte-identical (stdio + golden suites green); the Claude server boots with a distinct named pipe and Claude-labeled initialize instructions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
plugins/cross-session-memory/ ships the Claude-native runtime bundle: .claude-plugin/plugin.json manifest, .mcp.json (full CSM tool surface via launch-mcp -> claude-mcp-server), hooks.json wiring all 10 lifecycle events to run-hook -> claude-hook-client, and dev/packaged resolution in both launch scripts. Verified end-to-end: SessionStart through the bundle reaches the live Claude-profile relay and injects real CSM continuity as Claude-format additionalContext, on a pipe distinct from the Codex bundle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
surface-catalog.json is the single source of truth for the Claude plugin surface; every command/agent/skill orchestrates the authoritative MCP catalog (MCP stays the sole tool authority). scripts/validate-claude-surface.mjs enforces agreement between the catalog, on-disk bundle files, and the live MCP tool set (missing/undocumented/duplicate/tool-drift/unavailable-tool/ missing-bundle-file detection). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add staging build (build-claude-plugin.mjs), Windows release builder, and a clean-room verifier that extracts the ZIP and boots ONLY the packaged bundle — no repo sources, no host binary — asserting 82 served tools, a live SQLite connection, and a native write/read round-trip. Register the cross-session-memory plugin in the local marketplace and add plugin:*:claude npm scripts. Claude Code installs natively via /plugin, so no install.ps1 is shipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add plugin parity, transport isolation, surface-catalog (positive + negative drift detection via --plugin-root), and hook-client safety (malformed/empty/oversized input, relay unreachable) suites. All green; Codex parity suites unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add CLAUDE_INSTALLATION.md and CLAUDE_PLUGIN_PORTABLE_RELEASE.md; link them from the README nav and quick-start, update the host row, and record the milestone in AGENTS.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
codex-hook-output.ts, codex-native-tool-catalog.ts, and codex-transcript-client.ts were untracked; config.ts was modified but unstaged. All four are imported by the committed native-mcp-server.ts, codex-native-runtime.ts, and native-hook-client.ts — their absence broke typecheck in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… from branch The branch's committed code (native-mcp-server, codex-native-runtime, package.json files array, release-boundary test) references source modules, skills, hooks, scripts, docs, and test updates from the Codex native plugin and Phase 9C compaction work that existed locally but were never staged. Adds: skills/, hooks/, scripts/run-hook.mjs, build/release/verify scripts, release-assets/, Codex bridge plugin wiring, compaction attribution migration, and all modified source/test/doc files that CI depends on. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
README.md links to docs/CLAUDE_INSTALLATION.md and docs/CLAUDE_PLUGIN_PORTABLE_RELEASE.md but they were missing from the package files list, failing the release-boundary test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/native-host-profile.ts) that parameterizes the shared relay, runtime, hooks, MCP server, and hook client so Codex and Claude reuse one implementation — noif (host)branches, no code duplicationrunNativeMcpServer(profile)andrunNativeHookClient(profile)as shared runners; Codex and Claude entrypoints are thin wrappersplugins/cross-session-memory/— manifest,.mcp.json, 10 lifecycle hooks, 12 slash commands, 3 subagents, 3 skills, validated against one authoritativesurface-catalog.jsoncsm-<host>-<sha256(pluginRoot)[:16]>— Codex/Claude and multi-workspace Claude never collideplugin:build:claude,plugin:release:claude:windows, and a clean-room release gate that extracts the ZIP and boots only the bundle (82 tools, SQLite connected, native write/read)Test plan
test/codex-native-golden.test.ts— pipe name, wire format, tool catalog frozen before seam, green aftertest/claude-native-plugin.test.ts— profile values, distinct pipe, manifest wiring, MCP config, lifecycle eventstest/claude-transport-isolation.test.ts— Codex/Claude distinct pipes, multi-workspace, deterministic, case-insensitivetest/claude-surface-catalog.test.ts— positive (shipped bundle passes) + negative (missing/undocumented detected)test/claude-hook-safety.test.ts— malformed JSON, empty input, oversized payload, relay unreachable → safe JSON, exit 052 files changed, +2,462 / −153
🤖 Generated with Claude Code