threadnote 0.7.5 → 0.7.7
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 +38 -13
- package/dist/mcp_server.cjs +845 -38
- package/dist/threadnote.cjs +891 -146
- package/docs/agent-instructions.md +29 -7
- package/docs/index.html +1 -1
- package/docs/migration.md +4 -2
- package/docs/share.md +18 -1
- package/package.json +1 -1
|
@@ -8,9 +8,11 @@ Use OpenViking through Threadnote as a shared local context and memory layer. Re
|
|
|
8
8
|
follow the nearest `AGENTS.md`, `CLAUDE.md`, or other checked-in instruction file first.
|
|
9
9
|
|
|
10
10
|
When OpenViking MCP tools are available, use them directly. Prefer Threadnote-named MCP tools when present:
|
|
11
|
-
`recall_context`, `read_context`, `list_context`, `remember_context`, and `share_publish`. Always
|
|
12
|
-
MCP tools
|
|
13
|
-
|
|
11
|
+
`recall_context`, `read_context`, `list_context`, `remember_context`, `compact_context`, and `share_publish`. Always
|
|
12
|
+
pass JSON arguments to MCP tools. When a recall query says "current repo" or "this branch", include the current
|
|
13
|
+
workspace path as `callerCwd`, for example
|
|
14
|
+
`recall_context({"query":"current repo latest handoff","callerCwd":"/absolute/workspace/path"})`. Older Threadnote MCP
|
|
15
|
+
adapters may expose `search`, `read`, `list`, and `store` instead.
|
|
14
16
|
|
|
15
17
|
If MCP is unavailable, use the `threadnote` CLI fallback.
|
|
16
18
|
|
|
@@ -71,14 +73,17 @@ For branch feature work, prefer two stable memories with the same project and to
|
|
|
71
73
|
- `kind: handoff` for current status, files touched, tests, blockers, and next step.
|
|
72
74
|
|
|
73
75
|
If a durable feature memory already exists, update it in place with the same project/topic or with `--replace <uri>` /
|
|
74
|
-
`replaceUri`.
|
|
76
|
+
`replaceUri`. When `replaceUri` points at a shared `durable/` URI, Threadnote updates that shared memory in place and
|
|
77
|
+
pushes the shared repo; do not create a personal replacement and then run `share_publish` again. Avoid creating a new
|
|
78
|
+
timestamped durable memory for every small progress note.
|
|
75
79
|
|
|
76
80
|
## Memory Compaction
|
|
77
81
|
|
|
78
82
|
When working on the same active issue, prefer keeping one current-state memory updated instead of creating many small
|
|
79
83
|
progress memories. If an existing memory is clearly the current state for the issue, store the updated version with
|
|
80
84
|
`remember_context({"text":"...","replaceUri":"<uri>"})`, `threadnote remember --replace <uri>`, or
|
|
81
|
-
`threadnote handoff --replace <uri>` so the old memory is removed only after the replacement is stored.
|
|
85
|
+
`threadnote handoff --replace <uri>` so the old personal memory is removed only after the replacement is stored. Shared
|
|
86
|
+
`durable/` replacements are updated in place and pushed instead.
|
|
82
87
|
|
|
83
88
|
When the issue has a stable name, prefer project/topic storage over timestamped memories:
|
|
84
89
|
|
|
@@ -88,8 +93,19 @@ threadnote remember --kind durable --project my-repo --topic active-bug --text "
|
|
|
88
93
|
threadnote handoff --project my-repo --topic active-bug --task "..." --tests "..."
|
|
89
94
|
```
|
|
90
95
|
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
Bare `threadnote handoff` stores the current repo/current branch handoff by default. Use `threadnote handoff
|
|
97
|
+
--timestamped` only when you intentionally want a historical note instead of updating the active branch handoff.
|
|
98
|
+
|
|
99
|
+
When recall/read surfaces several memories that describe the same durable fact, incident, branch, or handoff, run a
|
|
100
|
+
scoped hygiene dry-run before deciding what to change:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
threadnote compact --project my-repo --topic active-bug --dry-run
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
compact_context({"project":"my-repo","topic":"active-bug","dryRun":true})
|
|
108
|
+
```
|
|
93
109
|
|
|
94
110
|
- Store one concise replacement memory that preserves the current status, the important facts, and the source `viking://`
|
|
95
111
|
URIs you merged.
|
|
@@ -97,6 +113,8 @@ them when it is safe:
|
|
|
97
113
|
no unique useful detail.
|
|
98
114
|
- Use `threadnote archive <uri>` instead of `forget` when the old handoff still has provenance value but should no
|
|
99
115
|
longer be treated as current context.
|
|
116
|
+
- Keep hygiene scoped to the current project/topic. Do not run global cleanup.
|
|
117
|
+
- For cross-repo features, link related durable memories explicitly in the body so recall can bridge the projects.
|
|
100
118
|
- If the memories disagree or you are not sure what can be deleted, keep them and mention the possible cleanup instead.
|
|
101
119
|
|
|
102
120
|
Never compact secrets, credentials, customer data, raw production logs, or checked-in canonical docs into memory.
|
|
@@ -142,6 +160,9 @@ Before pausing, switching agents, or ending meaningful work with local changes,
|
|
|
142
160
|
- blockers;
|
|
143
161
|
- next suggested step.
|
|
144
162
|
|
|
163
|
+
If you wrote or read multiple memories for the same project/topic during the task, run a scoped hygiene dry-run before
|
|
164
|
+
the handoff. Do not do global memory cleanup.
|
|
165
|
+
|
|
145
166
|
Do not store long diffs, secrets, raw logs, or customer data in handoffs.
|
|
146
167
|
|
|
147
168
|
## CLI Fallback
|
|
@@ -157,6 +178,7 @@ threadnote list viking://agent/threadnote/memories --all --recursive
|
|
|
157
178
|
threadnote remember --kind durable --project example --topic workflow --text "Durable engineering note..."
|
|
158
179
|
threadnote remember --kind durable --project example --topic active-issue --text "Feature knowledge..."
|
|
159
180
|
threadnote remember --replace viking://user/example/memories/durable/projects/example/workflow.md --text "Updated durable engineering note..."
|
|
181
|
+
threadnote compact --project example --topic active-issue --dry-run
|
|
160
182
|
threadnote archive viking://user/example/memories/handoffs/active/example/old-issue.md
|
|
161
183
|
threadnote forget viking://user/example/memories/events/duplicate.md
|
|
162
184
|
threadnote handoff --project example --topic active-issue --task "short task summary" --tests "checks run" --next-step "what to do next"
|
package/docs/index.html
CHANGED
|
@@ -1341,7 +1341,7 @@ threadnote remember \
|
|
|
1341
1341
|
<p class="muted" style="font-size: 0.9rem; margin-top: 0.6rem">
|
|
1342
1342
|
Refuses to publish if the memory matches secret patterns (PEM, <code>sk-</code>, <code>gh*_</code>,
|
|
1343
1343
|
<code>github_pat_</code>, <code>glpat-</code>, JWTs, AWS keys, Slack tokens). Refuses to silently
|
|
1344
|
-
overwrite an existing shared URI
|
|
1344
|
+
overwrite an existing shared URI; update shared memories with <code>remember --replace</code>.
|
|
1345
1345
|
</p>
|
|
1346
1346
|
</div>
|
|
1347
1347
|
|
package/docs/migration.md
CHANGED
|
@@ -187,8 +187,9 @@ Preferred agent behavior is automatic after `threadnote install` has updated the
|
|
|
187
187
|
`remember --replace <uri>` instead of burying that knowledge only in a handoff.
|
|
188
188
|
- When current status changes, update the active handoff with the same project/topic or `handoff --replace <uri>` instead
|
|
189
189
|
of creating another near-duplicate progress memory.
|
|
190
|
-
- When recall surfaces clearly duplicate or stale memories,
|
|
191
|
-
|
|
190
|
+
- When recall surfaces clearly duplicate or stale memories, run `threadnote compact --project <name> --topic <topic>
|
|
191
|
+
--dry-run` or `compact_context({"project":"<name>","topic":"<topic>","dryRun":true})`. Keep cleanup scoped to the
|
|
192
|
+
current project/topic; archive stale handoffs by default and forget only exact redundant duplicates.
|
|
192
193
|
- Before pausing, switching agents, or finishing meaningful code changes, store a concise handoff with status, tests,
|
|
193
194
|
blockers, and next steps.
|
|
194
195
|
|
|
@@ -199,6 +200,7 @@ threadnote recall --query "last handoff for this branch"
|
|
|
199
200
|
threadnote recall --query "durable feature knowledge for this branch"
|
|
200
201
|
threadnote remember --kind durable --project example --topic active-feature --text "Feature knowledge..."
|
|
201
202
|
threadnote remember --replace viking://user/example/memories/events/current.md --text "Updated durable engineering note..."
|
|
203
|
+
threadnote compact --project example --topic active-feature --dry-run
|
|
202
204
|
threadnote handoff --project example --topic active-feature --task "short task summary" --tests "checks run" --next-step "what the next agent should do"
|
|
203
205
|
```
|
|
204
206
|
|
package/docs/share.md
CHANGED
|
@@ -71,6 +71,21 @@ lines from the memory's header block. Those pointers only resolve on the
|
|
|
71
71
|
publisher's machine — teammates pull via git and cannot dereference them — so
|
|
72
72
|
keeping them would just leak local-only provenance into team git history.
|
|
73
73
|
|
|
74
|
+
To update an existing shared durable memory, replace the shared URI directly:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
threadnote remember \
|
|
78
|
+
--replace viking://user/you/memories/shared/default/durable/projects/foo/bar.md \
|
|
79
|
+
--project foo \
|
|
80
|
+
--topic bar \
|
|
81
|
+
--text "Updated shared knowledge."
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For MCP, pass the same shared URI as `replaceUri` to `remember_context`.
|
|
85
|
+
Threadnote rewrites the shared memory in place, strips local-only provenance
|
|
86
|
+
headers, commits, and pushes the shared repo. You do not need to store a
|
|
87
|
+
personal replacement and run `share publish` again.
|
|
88
|
+
|
|
74
89
|
### Keep teammates' updates current
|
|
75
90
|
|
|
76
91
|
Threadnote does a periodic background `git fetch` for configured share teams.
|
|
@@ -155,7 +170,9 @@ otherwise unpublished work is lost.
|
|
|
155
170
|
keep both, copy the memory to a new URI first (`ov read` then
|
|
156
171
|
`threadnote remember`).
|
|
157
172
|
- `share publish` refuses to overwrite an existing shared memory at the same
|
|
158
|
-
URI;
|
|
173
|
+
URI; use `threadnote remember --replace <shared-uri>` or
|
|
174
|
+
`remember_context({replaceUri:"<shared-uri>"})` for updates, or pick a
|
|
175
|
+
different topic name.
|
|
159
176
|
|
|
160
177
|
## Conflict resolution
|
|
161
178
|
|