memroot 0.1.0-alpha.1 → 0.1.0-alpha.4
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.
- package/README.md +26 -2
- package/dist/index.js +1929 -470
- package/dist/plugins/claude/.claude-plugin/plugin.json +2 -2
- package/dist/plugins/claude/README.md +8 -4
- package/dist/plugins/claude/hooks/hooks.json +10 -0
- package/dist/plugins/claude/scripts/capture-worker.mjs +19294 -0
- package/dist/plugins/claude/scripts/session-end.mjs +469 -0
- package/dist/plugins/claude/scripts/session-start.mjs +372 -53
- package/dist/plugins/claude/scripts/status.mjs +152 -12
- package/dist/plugins/claude/skills/memroot-memory/SKILL.md +48 -0
- package/dist/plugins/claude/skills/memroot-memory/references/save.md +76 -0
- package/dist/plugins/claude/skills/memroot-status/SKILL.md +19 -0
- package/dist/plugins/codex/.codex-plugin/plugin.json +4 -4
- package/dist/plugins/codex/README.md +13 -9
- package/dist/plugins/codex/hooks/hooks.json +11 -0
- package/dist/plugins/codex/scripts/capture-worker.mjs +19294 -0
- package/dist/plugins/codex/scripts/session-end.mjs +469 -0
- package/dist/plugins/codex/scripts/session-start.mjs +372 -53
- package/dist/plugins/codex/scripts/status.mjs +149 -9
- package/dist/plugins/codex/skills/memroot-memory/SKILL.md +48 -0
- package/dist/plugins/codex/skills/memroot-memory/references/save.md +76 -0
- package/dist/plugins/codex/skills/memroot-status/SKILL.md +20 -0
- package/dist/plugins/grok/.claude-plugin/plugin.json +2 -2
- package/dist/plugins/grok/README.md +10 -4
- package/dist/plugins/grok/hooks/hooks.json +24 -1
- package/dist/plugins/grok/scripts/capture-worker.mjs +19294 -0
- package/dist/plugins/grok/scripts/session-end.mjs +469 -0
- package/dist/plugins/grok/scripts/session-reminder.mjs +275 -0
- package/dist/plugins/grok/scripts/status.mjs +152 -12
- package/dist/plugins/grok/skills/memroot-memory/SKILL.md +48 -0
- package/dist/plugins/grok/skills/memroot-memory/references/save.md +76 -0
- package/dist/plugins/grok/skills/memroot-status/SKILL.md +20 -0
- package/package.json +6 -3
- package/dist/plugins/claude/skills/status/SKILL.md +0 -18
- package/dist/plugins/codex/skills/status/SKILL.md +0 -22
- package/dist/plugins/grok/skills/status/SKILL.md +0 -18
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ npx memroot setup
|
|
|
8
8
|
|
|
9
9
|
Requires Node.js 22 or later on macOS or Linux and an installed agent CLI with native plugin support. The interactive setup detects agent CLIs, lets you select agents, and previews the user-scope installation. Cancel before confirming to leave your files unchanged.
|
|
10
10
|
|
|
11
|
-
**This is an alpha.** Selecting Codex installs its native plugin and configures `https://api.memroot.dev/mcp` using Codex’s native OAuth sign-in. Follow the browser consent screen to link your production account. No separate `memroot login` is needed for Codex MCP. Repeating setup reuses existing authorization; cancelled sign-in can be resumed by repeating setup. Automatic session capture
|
|
11
|
+
**This is an alpha.** Selecting Codex installs its native plugin and configures `https://api.memroot.dev/mcp` using Codex’s native OAuth sign-in. Follow the browser consent screen to link your production account. No separate `memroot login` is needed for Codex MCP. Repeating setup reuses existing authorization; cancelled sign-in can be resumed by repeating setup. Automatic session capture is opt-in; see [Session capture](#session-capture-opt-in).
|
|
12
12
|
|
|
13
13
|
For scripts:
|
|
14
14
|
|
|
@@ -20,6 +20,9 @@ npx memroot doctor
|
|
|
20
20
|
npx memroot login # browser sign-in; --no-browser prints the URL
|
|
21
21
|
npx memroot status # cloud auth + agent install state
|
|
22
22
|
npx memroot token # fresh access token for agent adapters
|
|
23
|
+
npx memroot capture on # opt in to session-end memory capture
|
|
24
|
+
npx memroot capture status
|
|
25
|
+
npx memroot capture off
|
|
23
26
|
npx memroot logout
|
|
24
27
|
```
|
|
25
28
|
|
|
@@ -27,7 +30,7 @@ The refresh token is stored only in the OS credential store (macOS Keychain via
|
|
|
27
30
|
|
|
28
31
|
Agent values are `claude`, `codex`, and `grok`. `--agent` can be repeated. `--yes` requires explicit agents. `--dry-run` prints planned commands without running an agent CLI or writing files.
|
|
29
32
|
|
|
30
|
-
Plugin files live under `$XDG_DATA_HOME/memroot`, defaulting to `~/.local/share/memroot`, independently of the npm cache. Setup delegates registration and installation to each agent's native plugin manager and keeps a separate success receipt for each agent. It preserves unrelated config and refuses conflicting marketplaces, modified managed files, and disabled installed plugins. Repeating setup verifies files and repairs a missing native installation. Native enablement and hook execution trust stay under the agent's control. Grok setup uses its native `--trust` flag to authorize the selected local Memroot plugin;
|
|
33
|
+
Plugin files live under `$XDG_DATA_HOME/memroot`, defaulting to `~/.local/share/memroot`, independently of the npm cache. Setup delegates registration and installation to each agent's native plugin manager and keeps a separate success receipt for each agent. It preserves unrelated config and refuses conflicting marketplaces, modified managed files, and disabled installed plugins. Repeating setup verifies files and repairs a missing native installation. Native enablement and hook execution trust stay under the agent's control. Grok setup uses its native `--trust` flag to authorize the selected local Memroot plugin; its hooks are PostToolUse (a one-time session reminder) and SessionEnd. It also registers `https://api.memroot.dev/mcp` with `grok mcp add` at user scope; authorize it once inside Grok with `/mcps` (select memroot, press `i`). Grok runs the OAuth sign-in and keeps the credentials in its own store; Memroot setup never reads or copies them, and it preserves an existing `memroot` entry that differs. `grok mcp remove memroot` removes the registration.
|
|
31
34
|
|
|
32
35
|
When upgrading Codex from a verified older Memroot release, setup replaces only its managed `memroot` marketplace through Codex's native remove/add commands, then installs the new plugin. The previous files and receipt remain available until installation succeeds; rerunning setup resumes an interrupted upgrade. Native MCP authorization is independent and is reused when already configured and authorized.
|
|
33
36
|
|
|
@@ -44,6 +47,27 @@ codex mcp remove memroot
|
|
|
44
47
|
|
|
45
48
|
`logout` deauthenticates the named MCP server; `remove` deletes its native configuration. Neither plugin removal nor local credential removal should be treated as proof that the production grant is revoked; verify its revoked state in the console. `memroot logout` removes the separate Memroot CLI credentials and does not disconnect Codex's independently stored MCP authorization. This release does not remove native config or managed files automatically. Windows installation is not supported in this alpha.
|
|
46
49
|
|
|
50
|
+
## Session capture (opt-in)
|
|
51
|
+
|
|
52
|
+
Session capture saves durable engineering knowledge (decisions, conventions, root causes, failed approaches, procedures) after a coding session ends. It is off until you enable it; installing the plugins is not consent.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npx memroot capture on [--agent claude --agent codex --agent grok] [--allow-cross-agent-extraction] [--yes] [--no-browser]
|
|
56
|
+
npx memroot capture status
|
|
57
|
+
npx memroot capture off
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`capture on` prints the disclosure and asks for confirmation (`--yes` in scripts), then authorizes a separate **Memroot CLI** capture connection in the browser (an MCP grant for the `memroot-cli` client whose refresh token is stored in the OS credential store as `<api base>#mcp`), verifies it with `connection_status`, and records your choice in `~/.memroot/capture.json` (0600). Interactive `setup` offers the same step with default **No**; `setup --capture` and `setup --no-capture` script it, and setup without either flag leaves consent unchanged.
|
|
61
|
+
|
|
62
|
+
What happens, all inside the installed plugin (no `npx`, no network from hooks):
|
|
63
|
+
|
|
64
|
+
- **SessionEnd hook** (Claude Code and Codex alongside the existing SessionStart hook; Grok alongside its PostToolUse session reminder) reads only the small stdin envelope, writes a job file under `$XDG_STATE_HOME/memroot/capture` (default `~/.local/state/memroot/capture`, directories 0700, files 0600) and starts a detached background worker. It never opens the transcript and returns in about 25 ms.
|
|
65
|
+
- **Worker** reads only the referenced session transcript, keeps user and assistant text plus tool names and file paths (never tool output), removes secrets, personal email addresses and home paths locally (fail closed), and runs **your own agent CLI headless with no tools** (`claude -p`, `codex exec --ephemeral`, or `grok` headless) on at most 48,000 characters to propose memories. This spends your agent subscription or API quota and sends the redacted excerpt to that agent's model provider. Another agent's CLI is used only with `--allow-cross-agent-extraction`.
|
|
66
|
+
- **Upload**: candidates are validated locally (exact evidence quotes, injection filter, a second redaction pass, the shared contract). Only typed memories are sent to `https://api.memroot.dev/mcp`, labeled **session-extracted (not user-attested)** with confidence at most 0.7. Each memory carries repo-relative paths and symbols it mentions, up to 3 short evidence quotes (at most 200 characters each) from the redacted transcript, your repository identity (normalized git remote), a salted hash of the session id, salted hashes of the quoted segments, and the extractor name, prompt version and model. Before extracting, the worker sends one retrieval query containing only the repository name to avoid duplicates. Raw transcripts are never uploaded. At most 3 memories per session and 10 per rolling 24 hours; each is one write against your plan quota.
|
|
67
|
+
- **Stopping**: `memroot capture off` disables capture and deletes queued work (an in-progress run stops before uploading); revoking "Memroot CLI" in [Memroot Console](https://console.memroot.dev) or `memroot logout` stops uploads.
|
|
68
|
+
|
|
69
|
+
Codex skips plugin hooks until you trust them: open `/hooks` in Codex and trust the Memroot SessionStart and SessionEnd hooks. `memroot capture status` reports the trust state, Claude Code's `disableAllHooks`, queued jobs, the last worker run and which agent CLIs are on PATH. Logs contain only hashes, counts, durations and error codes.
|
|
70
|
+
|
|
47
71
|
[Memroot](https://memroot.dev)
|
|
48
72
|
|
|
49
73
|
Codex setup reports plugin installation, MCP configuration and OAuth authorization separately. It always reports memory verification as not verified: only a successful tool round trip can prove persistence. Restart Codex, ask it to call Memroot `connection_status`, then explicitly ask it to save a small test memory. Open a fresh Codex session and ask it to retrieve that memory. Inspect the connection and memory in [Memroot Console](https://console.memroot.dev).
|