feat: initial plugin — compaction proxy with lifecycle hooks
Transparent proxy that intercepts Claude Code's context compaction and allows replacing it with custom logic (e.g. Morph's compaction API). Architecture: - src/proxy.ts: Bun HTTP server that detects compaction requests by matching the "create a detailed summary" marker in user messages. Normal requests pass through unchanged. - src/transforms.ts: onCompact() handler — currently forwards to Anthropic as-is. Plug point for Morph integration. - hooks/: SessionStart starts the proxy on a free port and sets ANTHROPIC_BASE_URL via CLAUDE_ENV_FILE. SessionEnd kills it. - .claude-plugin/plugin.json: Plugin manifest for marketplace install. Build: `bun build --compile src/proxy.ts --outfile bin/morph-proxy` Dev: `bun run dev` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
D
DhruvBhatia0 committed
86f76457616e05345370f564bf71890554f1c24d