Skip to content

Commit 82686b9

Browse files
authored
Merge pull request #310 from nowledge-co/dev_0916
0916: grok build support and Hermes stale plugin issue
2 parents d3efb63 + 820e263 commit 82686b9

25 files changed

Lines changed: 358 additions & 43 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"plugins": [
1212
{
1313
"name": "nowledge-mem",
14-
"description": "Personal knowledge graph for Claude Code — remembers decisions, searches past work, captures sessions",
15-
"version": "0.7.10",
14+
"description": "Personal knowledge graph for Claude Code and Grok — remembers decisions, searches past work, captures sessions",
15+
"version": "0.7.12",
1616
"author": {
1717
"name": "Nowledge Labs",
1818
"url": "https://www.nowledge-labs.ai/",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Each directory is a standalone integration. Pick the one that matches your tool.
4646
|-------------|---------|--------------|
4747
| **[Skills](nowledge-mem-npx-skills)** | `npx skills add nowledge-co/community/nowledge-mem-npx-skills` | Reusable workflow package for Context Bundle / Working Memory startup context, routed recall, resumable handoffs, and distillation. Prefer native packages when your tool has one. |
4848
| **[Claude Code Plugin](nowledge-mem-claude-code-plugin)** | `claude plugin marketplace add https://github.com/nowledge-co/community` then `claude plugin install nowledge-mem@nowledge-community` | Claude Code native plugin with hooks for Context Bundle / Working Memory startup context, routed recall, automatic session capture, and pre-compaction transcript save. |
49+
| **[Grok Build Plugin](nowledge-mem-claude-code-plugin)** | `grok plugin install nowledge-co/community#nowledge-mem-claude-code-plugin --trust` | Grok loads the shared Claude-compatible package, with Grok-aware Context Bundle startup and `nmem t save --from grok` session capture. |
4950
| **[Copilot CLI Plugin](nowledge-mem-copilot-cli-plugin)** | `copilot plugin marketplace add nowledge-co/community` then `copilot plugin install nowledge-mem@nowledge-community` | GitHub Copilot CLI plugin with startup context guidance, routed recall, incremental session capture, and pre-compaction transcript save. |
5051
| **[Droid Plugin](nowledge-mem-droid-plugin)** | `droid plugin marketplace add https://github.com/nowledge-co/community` then `droid plugin install nowledge-mem@nowledge-community` | Factory Droid plugin with Context Bundle / Working Memory startup context, routed recall, distillation, and honest `save-handoff` semantics. |
5152
| **[Gemini CLI](https://github.com/nowledge-co/nowledge-mem-gemini-cli)** | Search `Nowledge Mem` in the [Gemini CLI Extensions Gallery](https://geminicli.com/extensions/?name=nowledge-co/nowledge-mem-gemini-cli) and install | Gemini-native context, bundled MCP, hooks, commands, and skills for Context Bundle / Working Memory startup context, routed recall, real thread save before compression or exit, and handoff summaries. |
@@ -129,7 +130,7 @@ Use one ambient space only when the host already has a real lane, such as one AI
129130

130131
| Integration | Ambient space today | Best user setup |
131132
|-------------|---------------------|-----------------|
132-
| Claude Code, Codex, Droid, Pi, Gemini CLI | Full ambient lane through `NMEM_SPACE` or per-command `--space` | Set one `NMEM_SPACE` only when the whole session truly belongs to one lane. Otherwise stay on `Default`. |
133+
| Claude Code, Grok, Codex, Droid, Pi, Gemini CLI | Full ambient lane through `NMEM_SPACE` or per-command `--space` | Set one `NMEM_SPACE` only when the whole session truly belongs to one lane. Otherwise stay on `Default`. |
133134
| Hermes | Full ambient lane through provider `space`, `space_by_identity`, `space_template`, or fallback `NMEM_SPACE` | Use `space` for one stable lane, `space_by_identity` for a small explicit map, `space_template` for one lane per Hermes identity. |
134135
| Alma | Full ambient lane through plugin `nowledgeMem.space`, plugin `nowledgeMem.spaceTemplate`, or fallback `NMEM_SPACE` | Use `space` for one Alma profile per lane. Use `spaceTemplate` only when your launcher already exports a trustworthy lane variable. |
135136
| Bub | Full ambient lane through `NMEM_SPACE` | Treat Bub as one process-wide lane. If you need separate lanes, run separate Bub processes or profiles. |

docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public keys to download or rotate — verification uses the GitHub Actions OIDC
327327
identity that produced the build.
328328

329329
```bash
330-
cosign verify docker.io/nowledgelabs/mem:0.9.15 \
330+
cosign verify docker.io/nowledgelabs/mem:latest \
331331
--certificate-identity-regexp='https://github.com/nowledge-co/mem/.github/workflows/release-docker.yml@.*' \
332332
--certificate-oidc-issuer='https://token.actions.githubusercontent.com'
333333
```
@@ -358,7 +358,7 @@ The image ships a multi-arch manifest for **`linux/amd64`** and
358358
If you need a specific arch, pin it explicitly:
359359

360360
```bash
361-
docker pull --platform linux/amd64 docker.io/nowledgelabs/mem:0.9.15
361+
docker pull --platform linux/amd64 docker.io/nowledgelabs/mem:latest
362362
```
363363

364364
---

docker/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# NMEM_COMPOSE_FILES='-f compose.yaml -f compose.tls.yaml' ./nmemctl up
2323
#
2424
# Verify the image is signed by Nowledge Labs (anyone, anywhere):
25-
# cosign verify docker.io/nowledgelabs/mem:0.9.15 \
25+
# cosign verify docker.io/nowledgelabs/mem:latest \
2626
# --certificate-identity-regexp='https://github.com/nowledge-co/mem/.github/workflows/release-docker.yml@.*' \
2727
# --certificate-oidc-issuer='https://token.actions.githubusercontent.com'
2828

@@ -32,7 +32,7 @@ services:
3232
# optional `./nmemctl auto-update` sidecar can flip versions by
3333
# writing `NMEM_IMAGE_TAG=<ver>` to `.env` (mode 0600, gitignored)
3434
# without rewriting this file. Fresh installs use the default.
35-
image: docker.io/nowledgelabs/mem:${NMEM_IMAGE_TAG:-0.9.15}
35+
image: docker.io/nowledgelabs/mem:${NMEM_IMAGE_TAG:-0.9.16}
3636
container_name: nowledge-mem
3737
restart: unless-stopped
3838
labels:

docs/USER_OVERRIDE_GUIDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Use the host's own user-owned instruction surface instead. That is the only over
1414
|------|-------------------------------|-----------------------------------|-------|
1515
| Codex | `AGENTS.md` | same `AGENTS.md` in the repo you care about | The package `AGENTS.md` is source text to merge, not a file to patch under the installed plugin. |
1616
| Claude Code | `CLAUDE.md` | `CLAUDE.local.md` | Prefer `CLAUDE.local.md` for your own memory-behavior tweaks that should not enter git. |
17+
| Grok | Grok project rules / `Agents.md` | repo-local project rules | Keep installed plugin files untouched; put behavior changes in the project rules Grok already reads. |
1718
| Copilot CLI | `.github/copilot-instructions.md` or `.github/instructions/*.instructions.md` | `~/.copilot/copilot-instructions.md` | Use Copilot's native instruction picker and file discovery instead of editing plugin hooks. |
1819
| Cursor | `.cursor/rules/*.mdc` or `.cursorrules` | repo-local rule files | Keep the plugin's bundled rule as the default. Add your own rule file beside it. |
1920
| Gemini CLI | `GEMINI.md` in the repo root | `~/.gemini/GEMINI.md` | Use `@file.md` imports to keep large customizations modular. |

integrations.json

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"promptZh": "读取 https://mem.nowledge.co/SKILL.md,按其中说明为我当前使用的 AI 工具安装或更新 Nowledge Mem。",
99
"designDoc": "https://github.com/nowledge-co/mem/blob/main/docs/design/ONBOARDING_REVISIT_0_9_0.md",
1010
"appliesTo": [
11-
"claude-code", "codex-cli", "cursor", "gemini-cli", "copilot-cli",
11+
"claude-code", "grok", "codex-cli", "cursor", "gemini-cli", "copilot-cli",
1212
"openclaw", "hermes", "droid", "alma", "bub", "pi", "opencode",
1313
"claude-desktop", "proma", "slock", "lody", "multica", "cumora", "mcp-direct"
1414
],
@@ -20,7 +20,7 @@
2020
"name": "Claude Code",
2121
"category": "coding",
2222
"type": "plugin",
23-
"version": "0.7.10",
23+
"version": "0.7.12",
2424
"directory": "nowledge-mem-claude-code-plugin",
2525
"transport": "cli",
2626
"capabilities": {
@@ -67,6 +67,59 @@
6767
"skills": ["read-working-memory", "search-memory", "distill-memory", "save-thread"],
6868
"slashCommands": ["/save", "/search", "/sum", "/status"]
6969
},
70+
{
71+
"id": "grok",
72+
"name": "Grok Build",
73+
"category": "coding",
74+
"type": "plugin",
75+
"version": "0.7.12",
76+
"directory": "nowledge-mem-claude-code-plugin",
77+
"transport": "cli",
78+
"capabilities": {
79+
"workingMemory": true,
80+
"search": true,
81+
"distill": true,
82+
"autoRecall": true,
83+
"autoCapture": true,
84+
"graphExploration": false,
85+
"status": true
86+
},
87+
"threadSave": {
88+
"method": "cli-native",
89+
"runtime": "grok",
90+
"command": "nmem t save --from grok",
91+
"historicalCommand": "nmem t sync --from grok --all-projects",
92+
"note": "Grok Build loads Claude-compatible plugin assets. The shared Nowledge Mem hook detects Grok Build's hook environment and routes Context Bundle reads and transcript capture as source_app=grok."
93+
},
94+
"autonomy": {
95+
"bootstrap": "automatic",
96+
"recall": "guided",
97+
"distill": "guided",
98+
"threads": "automatic-capture",
99+
"bestResultRequires": [
100+
"Install the Grok Build plugin from the community repository subdirectory",
101+
"Keep nmem available on this machine",
102+
"Restart Grok Build after install or update",
103+
"Run nmem t sync --from grok --all-projects --apply only when you want to import older Grok Build sessions"
104+
]
105+
},
106+
"install": {
107+
"command": "grok plugin install nowledge-co/community#nowledge-mem-claude-code-plugin --trust",
108+
"updateCommand": "grok plugin update nowledge-mem",
109+
"detectionHint": "Running as Grok Build; ~/.grok/ exists",
110+
"agentGuide": {
111+
"prompt": "Read https://mem.nowledge.co/SKILL.md and follow the instructions to install or update Nowledge Mem for Grok Build. Verify with nmem status and the Context Bundle or Working Memory check, then summarize what changed.",
112+
"promptZh": "读取 https://mem.nowledge.co/SKILL.md,按其中说明为 Grok Build 安装或更新 Nowledge Mem。用 nmem status 和 Context Bundle 或 Working Memory 检查验证结果,并总结你改了什么。"
113+
},
114+
"docsUrl": "/docs/integrations/grok"
115+
},
116+
"toolNaming": {
117+
"convention": "cli-direct",
118+
"note": "Grok Build loads the shared Claude-compatible plugin package; hook scripts detect Grok Build and call nmem with source_app=grok."
119+
},
120+
"skills": ["read-working-memory", "search-memory", "distill-memory", "save-thread"],
121+
"slashCommands": ["/save", "/search", "/sum", "/status"]
122+
},
70123
{
71124
"id": "copilot-cli",
72125
"name": "Copilot CLI",
@@ -732,7 +785,7 @@
732785
"name": "Hermes Agent",
733786
"category": "coding",
734787
"type": "plugin",
735-
"version": "0.5.17",
788+
"version": "0.5.18",
736789
"directory": "nowledge-mem-hermes",
737790
"transport": "cli",
738791
"capabilities": {

nowledge-mem-claude-code-plugin/.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nowledge-mem",
3-
"description": "Personal knowledge graph for Claude Code \u2014 remembers decisions, searches past work, captures sessions",
4-
"version": "0.7.10",
3+
"description": "Personal knowledge graph for Claude Code and Grok \u2014 remembers decisions, searches past work, captures sessions",
4+
"version": "0.7.12",
55
"author": {
66
"name": "Nowledge Labs",
77
"email": "hello@nowledge-labs.ai",

nowledge-mem-claude-code-plugin/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to the Nowledge Mem Claude Code plugin will be documented in
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.12] - 2026-06-18
9+
10+
### Fixed
11+
12+
- Grok Build hook routing now also treats `GROK_PLUGIN_ROOT` as a Grok Build runtime signal. This keeps Context Bundle reads and automatic transcript capture labeled as Grok Build even on hook launches that only expose the plugin root.
13+
14+
## [0.7.11] - 2026-06-18
15+
16+
### Added
17+
18+
- Added Grok Build-aware hook routing. When Grok Build runs the plugin through its Claude-compatible plugin layer, Context Bundle reads now use `--source-app grok` and automatic capture uses `nmem t save --from grok`.
19+
20+
### Fixed
21+
22+
- Grok Build sessions no longer get mislabeled as Claude Code sessions when the shared hook package is loaded by Grok Build.
23+
824
## [0.7.10] - 2026-05-20
925

1026
### Changed

nowledge-mem-claude-code-plugin/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# Nowledge Mem -- Claude Code Plugin
1+
# Nowledge Mem -- Claude Code / Grok Build Plugin
22

3-
> Your personal knowledge graph, built into Claude Code. Claude remembers your decisions, searches past work, and captures sessions -- without you asking.
3+
> Your personal knowledge graph, built into Claude Code and Grok Build. Your agent remembers decisions, searches past work, and captures sessions -- without you asking.
44
55
## Install
66

7+
Claude Code:
8+
79
```bash
810
# Add the Nowledge community marketplace
911
claude plugin marketplace add https://github.com/nowledge-co/community
@@ -12,6 +14,12 @@ claude plugin marketplace add https://github.com/nowledge-co/community
1214
claude plugin install nowledge-mem@nowledge-community
1315
```
1416

17+
Grok Build:
18+
19+
```bash
20+
grok plugin install nowledge-co/community#nowledge-mem-claude-code-plugin --trust
21+
```
22+
1523
**Prerequisite:** `nmem` CLI must be in your PATH. Hook capture also needs `python3` or `python` available on the same machine:
1624

1725
```bash
@@ -71,12 +79,12 @@ This calls the Windows `nmem` via interop — no extra setup or network configur
7179
| `SessionStart` | New, resume, or clear | Loads Context Bundle via `nmem context`, then falls back to `nmem wm read` |
7280
| `SessionStart` | After compaction | Re-loads Context Bundle or Working Memory + checkpoint prompt |
7381
| `UserPromptSubmit` | Every user message | Injects search/save syntax as context |
74-
| `PreCompact` | Before manual or automatic compaction | Saves the exact Claude Code session by hook `session_id` before context is compressed |
82+
| `PreCompact` | Before manual or automatic compaction | Saves the exact Claude Code or Grok Build session by hook `session_id` before context is compressed |
7583
| `Stop` | Model finishes responding | Captures session to knowledge graph |
7684

7785
The `SessionStart` hook tries `nmem context` first so Claude receives owner identity, AI Identity, active space, active rules, Working Memory, and KFS paths when the installed CLI supports it. It falls back to `nmem wm read`, then to `~/ai-now/memory.md` only as the **Default-space** compatibility path.
7886

79-
The `PreCompact` hook runs the same client-side thread save before Claude Code compresses the context. The `Stop` hook runs it again after every response with a bounded retry window, so short transcript-flush delays do not turn into silent no-op saves. Both paths pass Claude's hook `session_id` into `nmem t save`, so concurrent sessions in the same project do not have to rely on "latest session" guessing.
87+
The `PreCompact` hook runs the same client-side thread save before the host compresses context. The `Stop` hook runs it again after every response with a bounded retry window, so short transcript-flush delays do not turn into silent no-op saves. Claude Code uses `nmem t save --from claude-code`; Grok Build uses `nmem t save --from grok`. Both paths pass the host session id into `nmem t save`, so concurrent sessions in the same project do not have to rely on "latest session" guessing.
8088

8189
If the desktop app's Claude Code file watcher is also enabled, you can leave it on. The watcher and plugin hooks converge on the same `claude-code-<sessionId>` thread, so repeated saves update the existing thread instead of creating a second one.
8290

@@ -102,12 +110,16 @@ Automatic capture starts after the plugin and hooks are installed. To backfill o
102110

103111
```bash
104112
nmem t sync --from claude-code --all-projects --limit 20
113+
# Grok Build:
114+
nmem t sync --from grok --all-projects --limit 20
105115
```
106116

107117
Then import:
108118

109119
```bash
110120
nmem t sync --from claude-code --all-projects --apply
121+
# Grok Build:
122+
nmem t sync --from grok --all-projects --apply
111123
```
112124

113125
Use `-p /path/to/project` instead of `--all-projects` when you only want one project. The command reads local Claude Code session files and writes to the Mem server configured in `nmem`.

nowledge-mem-claude-code-plugin/commands/save.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ description: Save current session to Nowledge Mem
44

55
# Save Session
66

7-
Save the current Claude Code session to Nowledge Mem using the nmem CLI.
7+
Save the current Claude Code or Grok Build session to Nowledge Mem using the nmem CLI.
88

99
## Usage
1010

11-
Run this command to save the current session:
11+
Run the command for your current host:
1212

1313
```bash
1414
nmem t save --from claude-code
15+
# In Grok Build:
16+
nmem t save --from grok
1517
```
1618

1719
## Options
@@ -20,18 +22,22 @@ Add a summary describing what was accomplished:
2022

2123
```bash
2224
nmem t save --from claude-code -s "Brief summary of the session"
25+
# In Grok Build:
26+
nmem t save --from grok -s "Brief summary of the session"
2327
```
2428

2529
Save all sessions for the current project:
2630

2731
```bash
2832
nmem t save --from claude-code -m all
33+
# In Grok Build:
34+
nmem t save --from grok -m all
2935
```
3036

3137
## Output
3238

3339
The command will:
34-
- Auto-detect the current project from `~/.claude/projects/`
40+
- Auto-detect the current project from `~/.claude/projects/` or Grok Build's `~/.grok/sessions/`
3541
- Import all messages from the session
3642
- Return the thread ID for reference
3743

0 commit comments

Comments
 (0)