@remnic/plugin-claude-code 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +90 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @remnic/plugin-claude-code
2
+
3
+ Native [Claude Code](https://docs.claude.com/en/docs/claude-code) plugin for [Remnic](https://github.com/joshuaswarren/remnic) memory. Wires Claude Code's session hooks, MCP server, skills, and the `memory-review` agent into a running Remnic daemon so every Claude Code session gets persistent long-term memory automatically.
4
+
5
+ ## Install
6
+
7
+ Three discrete steps. None is automated for you end-to-end today; each writes to a different place.
8
+
9
+ 1. **Mint a Remnic-side bearer token and record the connector.**
10
+
11
+ ```bash
12
+ remnic connectors install claude-code
13
+ ```
14
+
15
+ This writes `~/.remnic/connectors/claude-code.json` (Remnic's connector-state file) and stores a bearer token in Remnic's token store. It does NOT touch any Claude Code configuration — the Claude Code memory-extension publisher in `@remnic/core` is a stub (`isHostAvailable()` → false, `publish()` → no-op), so no hook/skill/agent files are written and no Claude MCP config is edited.
16
+
17
+ 2. **Add Remnic as an MCP server in your Claude Code config.** Paste the `.mcp.json` block from the "MCP setup" section below into Claude Code's MCP config (commonly `~/.mcp.json` or `~/.claude.json`, per your Claude install), replacing `{{REMNIC_TOKEN}}` with the token minted in step 1. Without this step Claude Code has no way to talk to the Remnic daemon.
18
+
19
+ 3. **Install this package and load it through Claude Code's plugin system** so the hook scripts, skills, and `memory-review` agent are actually active:
20
+
21
+ ```bash
22
+ npm install -g @remnic/plugin-claude-code
23
+ ```
24
+
25
+ Consult Claude Code's plugin docs for the exact load mechanism your install supports (plugin marketplace / symlink / etc.). Until this step runs, auto-recall and auto-observe don't fire even if step 2 is correct.
26
+
27
+ ## What ships
28
+
29
+ The package is **data-only** (no JavaScript runtime) — it's a bundle of Claude Code configuration:
30
+
31
+ | File / dir | Purpose |
32
+ |---|---|
33
+ | `.claude-plugin/plugin.json` | Plugin manifest |
34
+ | `hooks/hooks.json` | `SessionStart`, `PostToolUse` (Write/Edit/MultiEdit), and `UserPromptSubmit` hook wiring |
35
+ | `hooks/bin/*.sh` | Small shell scripts that call the local Remnic daemon |
36
+ | `skills/` | `remnic-recall`, `remnic-remember`, `remnic-search`, `remnic-status`, `remnic-entities`, `remnic-memory-workflow` |
37
+ | `agents/memory-review.md` | Subagent that audits + summarizes memory for long-running sessions |
38
+ | `.mcp.json` | MCP server config pointing Claude Code at `http://localhost:4318/mcp` |
39
+ | `settings.json` | Default Claude Code settings for the plugin |
40
+
41
+ ## What you get at runtime
42
+
43
+ Once installed and a Remnic daemon is running (`remnic daemon start`):
44
+
45
+ - **Auto-recall** on `SessionStart` and on every `UserPromptSubmit` — relevant memories are injected into the session prompt before Claude Code's first turn and before each subsequent user turn.
46
+ - **Auto-observe** on `PostToolUse` for `Write`, `Edit`, and `MultiEdit` tools — new facts, decisions, and entities touched by file edits are buffered for extraction without the user lifting a finger.
47
+ - **Memory skills** — invoke `/remnic-recall`, `/remnic-search`, `/remnic-remember`, `/remnic-entities`, `/remnic-status` directly in Claude Code chats.
48
+ - **Cross-agent sharing** — the same memory store is shared with every other Remnic-connected agent (Codex, OpenClaw, Replit, Hermes, etc.), so what one agent learns is available to all.
49
+
50
+ ## MCP setup
51
+
52
+ The plugin expects a Remnic daemon reachable at `http://localhost:4318/mcp` with a bearer token. `remnic connectors install claude-code` does NOT write this for you — the Claude Code publisher in `@remnic/core` is a stub, so no Claude MCP config is touched. You must paste the following `.mcp.json` block into Claude Code's MCP config by hand (step 2 of the Install flow above):
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "remnic": {
58
+ "type": "http",
59
+ "url": "http://localhost:4318/mcp",
60
+ "headers": {
61
+ "Authorization": "Bearer {{REMNIC_TOKEN}}",
62
+ "X-Engram-Client-Id": "claude-code"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ Replace `{{REMNIC_TOKEN}}` with a token minted via `remnic token generate <connector-id>`.
70
+
71
+ ## Agent note
72
+
73
+ If you're an AI agent scaffolding a Claude Code integration: **do not** hand-edit hook scripts in a user's `~/.claude/` tree. The full setup has two components:
74
+
75
+ 1. `remnic connectors install claude-code` mints the MCP token and writes Remnic-side connector config. This does NOT deploy hooks/skills/agents — Claude Code doesn't yet expose a file-based extension directory, so the corresponding publisher in `@remnic/core` is a stub.
76
+ 2. Install this npm package and load it through Claude Code's plugin system so the hook/skill/agent tree is picked up. Until both steps run, auto-recall and auto-observe will not fire even though `remnic connectors doctor claude-code` reports green.
77
+
78
+ The plugin is intentionally data-only so Claude Code's plugin loader can manage upgrades atomically.
79
+
80
+ ## Related
81
+
82
+ - [`@remnic/cli`](https://www.npmjs.com/package/@remnic/cli) — daemon lifecycle + installer
83
+ - [`@remnic/plugin-codex`](https://www.npmjs.com/package/@remnic/plugin-codex) — same idea, for OpenAI Codex CLI
84
+ - [`@remnic/plugin-openclaw`](https://www.npmjs.com/package/@remnic/plugin-openclaw) — OpenClaw memory-slot plugin
85
+ - Connector guide: [docs/integration/connector-setup.md](https://github.com/joshuaswarren/remnic/blob/main/docs/integration/connector-setup.md) in the repo
86
+ - Source + issues: <https://github.com/joshuaswarren/remnic>
87
+
88
+ ## License
89
+
90
+ MIT. See the root [LICENSE](https://github.com/joshuaswarren/remnic/blob/main/LICENSE) file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/plugin-claude-code",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Remnic memory plugin for Claude Code — hooks, skills, MCP integration",
5
5
  "type": "module",
6
6
  "license": "MIT",