toolnet-memory 0.3.7 → 0.3.8
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 +442 -368
- package/bin/toolnet-memory +29 -0
- package/bundle/auto-integrate.js +23 -21
- package/bundle/continuity-certify.js +1 -1
- package/bundle/help-cli.js +2 -2
- package/bundle/init.js +28 -26
- package/bundle/kiro-hook.js +199 -0
- package/bundle/kiro.js +3 -0
- package/bundle/production-certify.js +5 -5
- package/bundle/setup.js +29 -27
- package/bundle/status-cli.js +4 -4
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -15,469 +15,592 @@
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## What
|
|
18
|
+
## What is ToolNet Memory?
|
|
19
19
|
|
|
20
|
-
ToolNet Memory is a persistent memory layer for AI coding
|
|
20
|
+
ToolNet Memory is a persistent project-memory and code-intelligence layer for AI coding agents.
|
|
21
21
|
|
|
22
|
-
It
|
|
22
|
+
It keeps project knowledge outside a single chat/session so supported agents can move between sessions without rebuilding project context from zero.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
- decisions, rules, blockers, warnings, and next actions,
|
|
26
|
-
- completed and active work,
|
|
27
|
-
- structured session handoff state,
|
|
28
|
-
- semantic project/code context,
|
|
29
|
-
- source symbols, dependencies, architecture, and impact relationships.
|
|
24
|
+
ToolNet Memory combines four layers:
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
- **Fast project context** — local startup context with no deep recovery.
|
|
27
|
+
- **Work continuity** — current goal, task, phase, blockers, decisions, and next actions.
|
|
28
|
+
- **Durable memory** — filtered project knowledge that survives agent/session changes.
|
|
29
|
+
- **Code intelligence** — symbols, dependencies, call relationships, architecture, impact analysis, semantic search, and graph visualization.
|
|
30
|
+
|
|
31
|
+
ToolNet Memory is **not a raw transcript dump**. Session history and durable project memory are kept separate, filtered, bounded, and selectively promoted.
|
|
32
|
+
|
|
33
|
+
---
|
|
32
34
|
|
|
33
35
|
## Quick Start
|
|
34
36
|
|
|
37
|
+
### 1. Install once per VPS / user
|
|
38
|
+
|
|
35
39
|
```bash
|
|
36
|
-
# Install globally (once per VPS/user)
|
|
37
40
|
curl -fsSL https://memory.toolnet.tech/install | bash
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g toolnet-memory@latest
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Requires **Node.js 22+**.
|
|
50
|
+
|
|
51
|
+
Verify:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
toolnet-memory --version
|
|
55
|
+
toolnet-memory doctor
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Configure ToolNet once
|
|
38
59
|
|
|
39
|
-
|
|
60
|
+
```bash
|
|
61
|
+
toolnet-memory setup
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Global configuration is stored outside project repositories:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
~/.config/toolnet-memory/.env
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Initialize a project
|
|
71
|
+
|
|
72
|
+
```bash
|
|
40
73
|
cd /path/to/project
|
|
41
74
|
toolnet-memory init
|
|
75
|
+
```
|
|
42
76
|
|
|
43
|
-
|
|
44
|
-
|
|
77
|
+
### 4. Build project intelligence once
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
toolnet-memory index
|
|
45
81
|
```
|
|
46
82
|
|
|
47
|
-
|
|
83
|
+
The full index builds:
|
|
48
84
|
|
|
49
85
|
```text
|
|
50
|
-
|
|
86
|
+
Scanning files
|
|
87
|
+
↓
|
|
88
|
+
Parsing code
|
|
89
|
+
↓
|
|
90
|
+
Type Resolution
|
|
91
|
+
↓
|
|
92
|
+
Rich Graph
|
|
93
|
+
↓
|
|
94
|
+
Semantic Code Index
|
|
95
|
+
↓
|
|
96
|
+
Architecture Intelligence
|
|
97
|
+
↓
|
|
98
|
+
Graph Analysis
|
|
99
|
+
↓
|
|
100
|
+
3D Visualization Dataset
|
|
101
|
+
```
|
|
51
102
|
|
|
52
|
-
|
|
103
|
+
After the first full index, use incremental indexing for normal changes:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
toolnet-memory incremental
|
|
107
|
+
```
|
|
53
108
|
|
|
54
109
|
---
|
|
55
110
|
|
|
56
|
-
|
|
111
|
+
## Normal Daily Workflow
|
|
57
112
|
|
|
58
|
-
|
|
59
|
-
Objective: Implement OAuth2 flow
|
|
60
|
-
Phase: Implementation
|
|
61
|
-
Task: Add token refresh logic
|
|
113
|
+
In normal use, users should not need to manually load large session histories.
|
|
62
114
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
115
|
+
```text
|
|
116
|
+
Open project
|
|
117
|
+
↓
|
|
118
|
+
Agent detects ToolNet project
|
|
119
|
+
↓
|
|
120
|
+
Fast local context loads
|
|
121
|
+
↓
|
|
122
|
+
Agent continues current work
|
|
123
|
+
↓
|
|
124
|
+
ToolNet captures meaningful continuity
|
|
66
125
|
```
|
|
67
126
|
|
|
68
|
-
|
|
127
|
+
Fast context can be viewed manually with:
|
|
69
128
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
129
|
+
```bash
|
|
130
|
+
toolnet-memory
|
|
131
|
+
```
|
|
73
132
|
|
|
74
|
-
|
|
133
|
+
or:
|
|
75
134
|
|
|
76
135
|
```bash
|
|
77
|
-
|
|
136
|
+
toolnet-memory context
|
|
78
137
|
```
|
|
79
138
|
|
|
80
|
-
|
|
139
|
+
The default startup context is intentionally small and local. Deep recovery is reserved for cases where fast context is insufficient.
|
|
81
140
|
|
|
82
|
-
|
|
83
|
-
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Switching Between Coding Agents
|
|
144
|
+
|
|
145
|
+
ToolNet Memory is designed for workflows such as:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
OpenCode → Agy / Antigravity → Codex → Claude Code → Kiro CLI
|
|
84
149
|
```
|
|
85
150
|
|
|
86
|
-
|
|
151
|
+
The next agent should receive the same project continuity instead of starting from zero.
|
|
87
152
|
|
|
88
|
-
|
|
89
|
-
|
|
153
|
+
Typical continuity includes:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Last agent
|
|
157
|
+
Last session
|
|
158
|
+
Current request
|
|
159
|
+
Current activity
|
|
160
|
+
Goal
|
|
161
|
+
Plan
|
|
162
|
+
Current phase
|
|
163
|
+
Blockers
|
|
164
|
+
Decisions
|
|
165
|
+
Next actions
|
|
90
166
|
```
|
|
91
167
|
|
|
92
|
-
|
|
168
|
+
Supported integrations currently include:
|
|
93
169
|
|
|
94
|
-
|
|
170
|
+
```bash
|
|
171
|
+
toolnet-memory integrate:auto
|
|
172
|
+
toolnet-memory integrate:agy
|
|
173
|
+
toolnet-memory integrate:opencode
|
|
174
|
+
toolnet-memory integrate:codex
|
|
175
|
+
toolnet-memory integrate:claude
|
|
176
|
+
toolnet-memory integrate:kiro
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Detect integrations without modifying configuration:
|
|
95
180
|
|
|
96
181
|
```bash
|
|
97
|
-
toolnet-memory
|
|
98
|
-
toolnet-memory doctor
|
|
182
|
+
toolnet-memory integrate:detect
|
|
99
183
|
```
|
|
100
184
|
|
|
101
|
-
## Storage Configuration
|
|
102
185
|
|
|
103
|
-
|
|
104
|
-
|
|
186
|
+
### Kiro CLI
|
|
187
|
+
ToolNet Memory integrates with Kiro through MCP and lifecycle hooks.
|
|
188
|
+
```bash
|
|
189
|
+
toolnet-memory integrate:kiro
|
|
190
|
+
toolnet-memory integrate:kiro --status
|
|
105
191
|
|
|
106
|
-
|
|
192
|
+
Kiro receives compact ToolNet startup context, cross-agent continuity through memory_agent_ask, local WAL capture, final Stop flush, and raw-session-history protection through PreToolUse.
|
|
107
193
|
|
|
108
|
-
|
|
109
|
-
# ~/.config/toolnet-memory/.env
|
|
110
|
-
MEMORY_STORAGE_PROVIDER=r2
|
|
111
|
-
R2_ACCOUNT_ID=your-account-id
|
|
112
|
-
R2_BUCKET=toolnet-memory
|
|
113
|
-
R2_ACCESS_KEY_ID=your-access-key
|
|
114
|
-
R2_SECRET_ACCESS_KEY=your-secret-key
|
|
194
|
+
Kiro uses the shared ToolNet continuity core and does not maintain a separate memory database.
|
|
115
195
|
|
|
116
|
-
|
|
196
|
+
ToolNet Memory also exposes an MCP server:
|
|
117
197
|
|
|
118
|
-
|
|
198
|
+
```bash
|
|
199
|
+
toolnet-memory mcp
|
|
200
|
+
```
|
|
119
201
|
|
|
120
|
-
|
|
121
|
-
# Leave empty for AWS S3.
|
|
122
|
-
S3_ENDPOINT=
|
|
123
|
-
S3_REGION=us-east-1
|
|
124
|
-
S3_BUCKET=toolnet-memory
|
|
125
|
-
S3_ACCESS_KEY_ID=your-access-key
|
|
126
|
-
S3_SECRET_ACCESS_KEY=your-secret-key
|
|
127
|
-
S3_FORCE_PATH_STYLE=false
|
|
202
|
+
---
|
|
128
203
|
|
|
129
|
-
|
|
204
|
+
## Project Operating Manual
|
|
130
205
|
|
|
131
|
-
|
|
206
|
+
Every project can define persistent mandatory rules in:
|
|
132
207
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
208
|
+
```text
|
|
209
|
+
.toolnet/PROJECT.md
|
|
210
|
+
```
|
|
136
211
|
|
|
137
|
-
|
|
212
|
+
Create it with:
|
|
138
213
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
* single-machine workflows.
|
|
214
|
+
```bash
|
|
215
|
+
toolnet-memory project:manual-init
|
|
216
|
+
```
|
|
143
217
|
|
|
144
|
-
|
|
218
|
+
Example:
|
|
145
219
|
|
|
146
|
-
|
|
220
|
+
```md
|
|
221
|
+
# ToolNet Project Operating Manual
|
|
147
222
|
|
|
148
|
-
|
|
223
|
+
## Critical Rules
|
|
149
224
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
225
|
+
- [enforce] Only edit source code inside /root/project/source.
|
|
226
|
+
- [enforce] Never modify production files directly.
|
|
227
|
+
- [enforce] Deploy only with /root/project/deploy.sh --apply.
|
|
228
|
+
- [advisory] Prefer small focused changes.
|
|
229
|
+
```
|
|
155
230
|
|
|
156
|
-
|
|
231
|
+
ToolNet recognizes:
|
|
157
232
|
|
|
158
|
-
|
|
233
|
+
- `[enforce]` — mandatory project rule.
|
|
234
|
+
- `[advisory]` — project recommendation.
|
|
159
235
|
|
|
160
|
-
|
|
236
|
+
Show or sync the manual:
|
|
161
237
|
|
|
162
|
-
|
|
238
|
+
```bash
|
|
239
|
+
toolnet-memory project:manual-show
|
|
240
|
+
toolnet-memory project:manual-sync
|
|
241
|
+
```
|
|
163
242
|
|
|
164
|
-
|
|
165
|
-
Local storage + Hugging Face embeddings
|
|
166
|
-
Generic S3 storage + Hugging Face embeddings
|
|
243
|
+
This is the correct place for rules such as:
|
|
167
244
|
|
|
168
|
-
|
|
245
|
+
- allowed source path,
|
|
246
|
+
- development vs production environment,
|
|
247
|
+
- deployment commands,
|
|
248
|
+
- files that must not be edited,
|
|
249
|
+
- verification requirements,
|
|
250
|
+
- architecture constraints.
|
|
169
251
|
|
|
170
|
-
|
|
171
|
-
HF_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
|
252
|
+
Secrets and credentials should remain in `.env` or another secret store, not in `PROJECT.md`.
|
|
172
253
|
|
|
173
|
-
|
|
254
|
+
---
|
|
174
255
|
|
|
256
|
+
## Code Intelligence
|
|
175
257
|
|
|
176
|
-
|
|
258
|
+
ToolNet Memory builds a persistent structural model of the project so coding agents can understand relationships before changing code.
|
|
177
259
|
|
|
178
|
-
|
|
260
|
+
Capabilities include:
|
|
179
261
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
262
|
+
- source symbol indexing,
|
|
263
|
+
- imports and dependencies,
|
|
264
|
+
- callers and callees,
|
|
265
|
+
- type relationships,
|
|
266
|
+
- architecture layers,
|
|
267
|
+
- subsystem clustering,
|
|
268
|
+
- hotspots,
|
|
269
|
+
- dead-code candidates,
|
|
270
|
+
- semantic code search,
|
|
271
|
+
- dependency paths,
|
|
272
|
+
- change-impact analysis,
|
|
273
|
+
- visualization datasets.
|
|
183
274
|
|
|
184
|
-
|
|
275
|
+
Useful commands:
|
|
185
276
|
|
|
186
277
|
```bash
|
|
187
|
-
|
|
278
|
+
# Full index
|
|
279
|
+
toolnet-memory index
|
|
280
|
+
|
|
281
|
+
# Incremental update
|
|
282
|
+
toolnet-memory incremental
|
|
283
|
+
|
|
284
|
+
# Semantic search
|
|
285
|
+
toolnet-memory semantic "authentication flow"
|
|
286
|
+
|
|
287
|
+
# Change impact
|
|
288
|
+
toolnet-memory impact src/auth.ts
|
|
188
289
|
```
|
|
189
290
|
|
|
190
|
-
The
|
|
291
|
+
The goal is not only to find code, but to help an agent understand **what may break if a file, symbol, or dependency changes**.
|
|
191
292
|
|
|
192
|
-
|
|
293
|
+
---
|
|
193
294
|
|
|
194
|
-
|
|
295
|
+
## Code Graph UI
|
|
195
296
|
|
|
196
|
-
|
|
197
|
-
cd /path/to/project
|
|
297
|
+
ToolNet Memory includes a project graph visualization UI.
|
|
198
298
|
|
|
199
|
-
|
|
200
|
-
toolnet-memory init
|
|
299
|
+
Start it with:
|
|
201
300
|
|
|
202
|
-
|
|
203
|
-
toolnet-memory
|
|
204
|
-
toolnet-memory profile:sync
|
|
205
|
-
toolnet-memory index
|
|
301
|
+
```bash
|
|
302
|
+
toolnet-memory graph
|
|
206
303
|
```
|
|
207
304
|
|
|
208
|
-
ToolNet
|
|
305
|
+
The graph uses real indexed ToolNet project data.
|
|
306
|
+
|
|
307
|
+
For large projects, the UI uses a lightweight drill-down flow instead of rendering the complete symbol graph at once:
|
|
209
308
|
|
|
210
309
|
```text
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
310
|
+
Overview
|
|
311
|
+
↓
|
|
312
|
+
Subsystems
|
|
313
|
+
↓
|
|
314
|
+
Files
|
|
315
|
+
↓
|
|
316
|
+
Symbols + relationships
|
|
214
317
|
```
|
|
215
318
|
|
|
216
|
-
|
|
319
|
+
This keeps the graph usable on large projects and mobile browsers while preserving access to detailed relationships when needed.
|
|
320
|
+
|
|
321
|
+
The graph server defaults to:
|
|
217
322
|
|
|
218
323
|
```text
|
|
219
|
-
|
|
220
|
-
AGENTS.md # Standard agent instructions
|
|
221
|
-
CLAUDE.md # Instructions for Claude/Codex
|
|
324
|
+
127.0.0.1:9749
|
|
222
325
|
```
|
|
223
326
|
|
|
224
|
-
|
|
327
|
+
To expose it temporarily on a VPS network interface:
|
|
225
328
|
|
|
226
|
-
|
|
329
|
+
```bash
|
|
330
|
+
TOOLNET_GRAPH_HOST=0.0.0.0 \
|
|
331
|
+
TOOLNET_GRAPH_PORT=9749 \
|
|
332
|
+
toolnet-memory graph
|
|
333
|
+
```
|
|
227
334
|
|
|
228
|
-
|
|
335
|
+
---
|
|
229
336
|
|
|
230
|
-
|
|
231
|
-
projects/<project-remote>/
|
|
232
|
-
├── memory/ # Persistent project memory
|
|
233
|
-
├── code/ # Code intelligence index
|
|
234
|
-
├── sessions/ # Session transcripts (filtered)
|
|
235
|
-
├── work/ # Work continuity state
|
|
236
|
-
└── snapshots/ # Project snapshots
|
|
237
|
-
```
|
|
337
|
+
## Memory and Work Continuity
|
|
238
338
|
|
|
239
|
-
|
|
339
|
+
View the current work state:
|
|
240
340
|
|
|
241
|
-
|
|
341
|
+
```bash
|
|
342
|
+
toolnet-memory work
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
or:
|
|
242
346
|
|
|
243
347
|
```bash
|
|
244
|
-
toolnet-memory
|
|
348
|
+
toolnet-memory work:status
|
|
245
349
|
```
|
|
246
350
|
|
|
247
|
-
|
|
351
|
+
Ask project memory directly:
|
|
248
352
|
|
|
249
353
|
```bash
|
|
250
|
-
toolnet-memory
|
|
251
|
-
toolnet-memory integrate:opencode
|
|
252
|
-
toolnet-memory integrate:codex
|
|
354
|
+
toolnet-memory ask "What was changed in the authentication flow?"
|
|
253
355
|
```
|
|
254
356
|
|
|
255
|
-
|
|
357
|
+
Review or reconcile durable memory:
|
|
256
358
|
|
|
257
|
-
|
|
359
|
+
```bash
|
|
360
|
+
toolnet-memory memory:review
|
|
361
|
+
toolnet-memory memory:reconcile
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
ToolNet tracks structured continuity such as:
|
|
258
365
|
|
|
259
366
|
```text
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
367
|
+
Mission
|
|
368
|
+
Objective
|
|
369
|
+
Phase
|
|
370
|
+
Task
|
|
371
|
+
Deliverable
|
|
372
|
+
Definition of Done
|
|
373
|
+
Dependencies
|
|
374
|
+
Decisions
|
|
375
|
+
Blockers
|
|
376
|
+
Warnings
|
|
377
|
+
Next Actions
|
|
263
378
|
```
|
|
264
379
|
|
|
265
|
-
|
|
380
|
+
---
|
|
266
381
|
|
|
267
382
|
## Fast Context vs Deep Recovery
|
|
268
383
|
|
|
269
|
-
|
|
384
|
+
### Fast Context — default
|
|
270
385
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
Fast context reads only local files (`.toolnet/profile.md`, `.toolnet/current.md`) and completes in ~150ms without network or storage access. This is the default behavior and provides immediate startup context.
|
|
386
|
+
Fast context is local, bounded, and intended for normal agent startup.
|
|
274
387
|
|
|
275
388
|
```bash
|
|
276
|
-
# Fast context (default command)
|
|
277
389
|
toolnet-memory
|
|
278
390
|
toolnet-memory context:print
|
|
279
|
-
|
|
280
|
-
# Sync profile and current work to local files
|
|
281
|
-
toolnet-memory profile:sync
|
|
282
391
|
```
|
|
283
392
|
|
|
284
|
-
|
|
393
|
+
It uses project-local ToolNet files and does not automatically dump remote history into the prompt.
|
|
285
394
|
|
|
286
|
-
Deep
|
|
395
|
+
### Deep Recovery — manual only
|
|
396
|
+
|
|
397
|
+
Use deep recovery only when the normal fast context is not enough.
|
|
287
398
|
|
|
288
399
|
```bash
|
|
289
|
-
|
|
400
|
+
toolnet-memory brief
|
|
401
|
+
toolnet-memory handoff:latest
|
|
290
402
|
toolnet-memory session:agy-recover
|
|
403
|
+
toolnet-memory session:codex-recover
|
|
404
|
+
toolnet-memory session:opencode-recover
|
|
405
|
+
```
|
|
291
406
|
|
|
292
|
-
|
|
293
|
-
toolnet-memory handoff:latest
|
|
407
|
+
These commands are intentionally **not** meant to run automatically on every agent startup.
|
|
294
408
|
|
|
295
|
-
|
|
296
|
-
toolnet-memory brief
|
|
297
|
-
```
|
|
409
|
+
---
|
|
298
410
|
|
|
299
|
-
|
|
411
|
+
## AI Providers and Models
|
|
300
412
|
|
|
301
|
-
|
|
302
|
-
- npm install/build noise
|
|
303
|
-
- Sensitive data patterns
|
|
304
|
-
- Redundant context
|
|
413
|
+
ToolNet separates the reasoning model from the embedding model.
|
|
305
414
|
|
|
306
|
-
|
|
415
|
+
Run interactive setup:
|
|
307
416
|
|
|
308
|
-
|
|
417
|
+
```bash
|
|
418
|
+
toolnet-memory setup
|
|
419
|
+
```
|
|
309
420
|
|
|
310
|
-
|
|
421
|
+
View provider state:
|
|
311
422
|
|
|
312
|
-
|
|
423
|
+
```bash
|
|
424
|
+
toolnet-memory provider
|
|
425
|
+
toolnet-memory provider:list
|
|
426
|
+
toolnet-memory provider:status
|
|
427
|
+
toolnet-memory provider:test llm
|
|
428
|
+
toolnet-memory provider:test embedding
|
|
429
|
+
```
|
|
313
430
|
|
|
314
|
-
|
|
315
|
-
MEMORY_AUTO_RETRIEVE=true
|
|
316
|
-
MEMORY_AUTO_SUMMARIZE=true
|
|
317
|
-
MEMORY_AUTO_SYNC=true
|
|
431
|
+
View or change the active model:
|
|
318
432
|
|
|
319
|
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
433
|
+
```bash
|
|
434
|
+
toolnet-memory model
|
|
435
|
+
toolnet-memory model status
|
|
436
|
+
toolnet-memory model list
|
|
437
|
+
toolnet-memory model set <model>
|
|
438
|
+
```
|
|
323
439
|
|
|
324
|
-
|
|
440
|
+
Canonical configuration uses:
|
|
325
441
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
442
|
+
```text
|
|
443
|
+
TOOLNET_LLM_PROVIDER
|
|
444
|
+
TOOLNET_LLM_API_KEY
|
|
445
|
+
TOOLNET_LLM_BASE_URL
|
|
446
|
+
TOOLNET_LLM_MODEL
|
|
447
|
+
|
|
448
|
+
TOOLNET_EMBEDDING_PROVIDER
|
|
449
|
+
TOOLNET_EMBEDDING_API_KEY
|
|
450
|
+
TOOLNET_EMBEDDING_BASE_URL
|
|
451
|
+
TOOLNET_EMBEDDING_MODEL
|
|
452
|
+
```
|
|
330
453
|
|
|
331
|
-
|
|
454
|
+
Optional LLM fallbacks are supported for transient failures such as timeouts, HTTP 408, 429, and 5xx responses.
|
|
332
455
|
|
|
333
|
-
|
|
334
|
-
↓
|
|
335
|
-
max 50 candidates
|
|
336
|
-
↓
|
|
337
|
-
rerank top 10
|
|
338
|
-
↓
|
|
339
|
-
select up to 5 final context items
|
|
340
|
-
↓
|
|
341
|
-
enforce token budget
|
|
456
|
+
---
|
|
342
457
|
|
|
343
|
-
|
|
458
|
+
## Storage
|
|
344
459
|
|
|
345
|
-
|
|
460
|
+
Supported storage modes include:
|
|
346
461
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
462
|
+
- Cloudflare R2,
|
|
463
|
+
- generic S3 / S3-compatible storage,
|
|
464
|
+
- local storage,
|
|
465
|
+
- Hugging Face S3 compatibility mode.
|
|
351
466
|
|
|
352
|
-
|
|
467
|
+
Projects remain isolated by stable ToolNet project identity.
|
|
353
468
|
|
|
354
|
-
|
|
469
|
+
A typical remote layout is:
|
|
355
470
|
|
|
356
|
-
|
|
471
|
+
```text
|
|
472
|
+
projects/<project>/
|
|
473
|
+
├── memory/
|
|
474
|
+
├── code/
|
|
475
|
+
├── sessions/
|
|
476
|
+
├── work/
|
|
477
|
+
└── snapshots/
|
|
478
|
+
```
|
|
357
479
|
|
|
358
|
-
|
|
480
|
+
Project identity is stored locally under:
|
|
359
481
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
482
|
+
```text
|
|
483
|
+
.toolnet/project.json
|
|
484
|
+
```
|
|
363
485
|
|
|
364
|
-
|
|
486
|
+
Renaming or moving a project directory should not cause unrelated projects to share memory.
|
|
365
487
|
|
|
366
|
-
|
|
488
|
+
---
|
|
367
489
|
|
|
368
|
-
|
|
369
|
-
# 1. Initialize project
|
|
370
|
-
cd /path/to/project
|
|
371
|
-
toolnet-memory init
|
|
490
|
+
## Snapshots and Recovery
|
|
372
491
|
|
|
373
|
-
|
|
374
|
-
agy "implement user authentication"
|
|
492
|
+
Create and restore project-scoped snapshots:
|
|
375
493
|
|
|
376
|
-
|
|
377
|
-
|
|
494
|
+
```bash
|
|
495
|
+
toolnet-memory snapshot:list
|
|
496
|
+
toolnet-memory snapshot:create "before refactor"
|
|
497
|
+
toolnet-memory snapshot:restore <id>
|
|
498
|
+
toolnet-memory recover
|
|
499
|
+
```
|
|
378
500
|
|
|
379
|
-
|
|
380
|
-
codex "add password reset flow"
|
|
501
|
+
---
|
|
381
502
|
|
|
382
|
-
|
|
383
|
-
toolnet-memory semantic "auth flow"
|
|
503
|
+
## Architecture Guard
|
|
384
504
|
|
|
385
|
-
|
|
386
|
-
toolnet-memory impact src/auth.ts
|
|
505
|
+
ToolNet can evaluate project rules and potentially dangerous changes.
|
|
387
506
|
|
|
388
|
-
|
|
389
|
-
toolnet-memory
|
|
507
|
+
```bash
|
|
508
|
+
toolnet-memory guard:check
|
|
509
|
+
toolnet-memory guard:check --file src/path.ts
|
|
510
|
+
toolnet-memory guard:check --command "rm -rf ..."
|
|
511
|
+
toolnet-memory guard:explain
|
|
390
512
|
```
|
|
391
513
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
### Persistent project memory
|
|
514
|
+
The project manual and guard system are intended to reduce accidental violations of important project constraints.
|
|
395
515
|
|
|
396
|
-
|
|
516
|
+
---
|
|
397
517
|
|
|
398
|
-
|
|
518
|
+
## Background Service
|
|
399
519
|
|
|
400
|
-
|
|
520
|
+
ToolNet can optionally run a background daemon:
|
|
401
521
|
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
Dependencies
|
|
410
|
-
Decisions
|
|
411
|
-
Blockers
|
|
412
|
-
Warnings
|
|
413
|
-
Next Actions
|
|
522
|
+
```bash
|
|
523
|
+
toolnet-memory service:install
|
|
524
|
+
toolnet-memory service:start
|
|
525
|
+
toolnet-memory service:status
|
|
526
|
+
toolnet-memory service:restart
|
|
527
|
+
toolnet-memory service:stop
|
|
528
|
+
toolnet-memory service:remove
|
|
414
529
|
```
|
|
415
530
|
|
|
416
|
-
|
|
531
|
+
The background service is optional; the core CLI does not require a permanent daemon for every workflow.
|
|
417
532
|
|
|
418
|
-
|
|
419
|
-
toolnet-memory work:status
|
|
420
|
-
toolnet-memory brief
|
|
421
|
-
toolnet-memory handoff:latest
|
|
422
|
-
```
|
|
533
|
+
---
|
|
423
534
|
|
|
424
|
-
|
|
535
|
+
## CLI Help
|
|
425
536
|
|
|
426
|
-
|
|
537
|
+
The default help is intentionally compact:
|
|
427
538
|
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
↓
|
|
431
|
-
Type Resolution
|
|
432
|
-
↓
|
|
433
|
-
Rich Graph
|
|
434
|
-
↓
|
|
435
|
-
Semantic Code Index
|
|
436
|
-
↓
|
|
437
|
-
Architecture Intelligence
|
|
438
|
-
↓
|
|
439
|
-
Graph Analysis
|
|
440
|
-
↓
|
|
441
|
-
Visualization Dataset
|
|
539
|
+
```bash
|
|
540
|
+
toolnet-memory help
|
|
442
541
|
```
|
|
443
542
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
Examples:
|
|
543
|
+
Show every command:
|
|
447
544
|
|
|
448
545
|
```bash
|
|
449
|
-
toolnet-memory
|
|
450
|
-
toolnet-memory impact src/path/to/file.ts
|
|
451
|
-
toolnet-memory incremental
|
|
546
|
+
toolnet-memory help --all
|
|
452
547
|
```
|
|
453
548
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Expose memory and code intelligence through MCP:
|
|
549
|
+
Show help for one command:
|
|
457
550
|
|
|
458
551
|
```bash
|
|
459
|
-
toolnet-memory
|
|
552
|
+
toolnet-memory help index
|
|
553
|
+
toolnet-memory help model
|
|
554
|
+
toolnet-memory help graph
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
Main user-facing commands:
|
|
558
|
+
|
|
559
|
+
```text
|
|
560
|
+
GET STARTED
|
|
561
|
+
setup
|
|
562
|
+
init
|
|
563
|
+
doctor
|
|
564
|
+
|
|
565
|
+
MEMORY
|
|
566
|
+
ask
|
|
567
|
+
context
|
|
568
|
+
work
|
|
569
|
+
|
|
570
|
+
CODE
|
|
571
|
+
index
|
|
572
|
+
semantic
|
|
573
|
+
impact
|
|
574
|
+
graph
|
|
575
|
+
|
|
576
|
+
AI
|
|
577
|
+
model
|
|
578
|
+
provider
|
|
579
|
+
|
|
580
|
+
SYSTEM
|
|
581
|
+
status
|
|
582
|
+
update
|
|
460
583
|
```
|
|
461
584
|
|
|
462
|
-
|
|
585
|
+
Advanced, recovery, service, session, and production commands remain available through `help --all`.
|
|
463
586
|
|
|
464
|
-
|
|
587
|
+
---
|
|
465
588
|
|
|
466
|
-
## Health and
|
|
589
|
+
## Health and Status
|
|
467
590
|
|
|
468
|
-
|
|
591
|
+
Quick status:
|
|
469
592
|
|
|
470
593
|
```bash
|
|
471
|
-
toolnet-memory
|
|
594
|
+
toolnet-memory status
|
|
472
595
|
```
|
|
473
596
|
|
|
474
|
-
|
|
597
|
+
Deeper diagnostics:
|
|
475
598
|
|
|
476
599
|
```bash
|
|
477
|
-
toolnet-memory doctor
|
|
600
|
+
toolnet-memory doctor
|
|
478
601
|
```
|
|
479
602
|
|
|
480
|
-
|
|
603
|
+
Configuration:
|
|
481
604
|
|
|
482
605
|
```bash
|
|
483
606
|
toolnet-memory config get KEY
|
|
@@ -487,33 +610,47 @@ toolnet-memory config open
|
|
|
487
610
|
|
|
488
611
|
Secret values are masked in normal CLI output.
|
|
489
612
|
|
|
613
|
+
---
|
|
614
|
+
|
|
490
615
|
## Updating
|
|
491
616
|
|
|
492
617
|
```bash
|
|
493
618
|
toolnet-memory update
|
|
494
619
|
```
|
|
495
620
|
|
|
496
|
-
|
|
621
|
+
Or reinstall the latest npm release:
|
|
497
622
|
|
|
498
|
-
|
|
623
|
+
```bash
|
|
624
|
+
npm install -g toolnet-memory@latest
|
|
625
|
+
```
|
|
499
626
|
|
|
500
|
-
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
## Security Model
|
|
630
|
+
|
|
631
|
+
ToolNet Memory processes source-code metadata, project instructions, agent activity, and durable memory.
|
|
632
|
+
|
|
633
|
+
Important rules:
|
|
501
634
|
|
|
502
635
|
- Never commit `.env` files or credentials.
|
|
636
|
+
- Keep VPS passwords, API keys, and tokens out of `PROJECT.md`.
|
|
503
637
|
- Sanitize secrets before durable persistence.
|
|
504
|
-
- Never
|
|
505
|
-
-
|
|
506
|
-
-
|
|
507
|
-
-
|
|
638
|
+
- Never inject memory from another project.
|
|
639
|
+
- Treat raw coding-agent transcripts as sensitive.
|
|
640
|
+
- Keep deep recovery manual and bounded.
|
|
641
|
+
- Store global ToolNet credentials outside project repositories.
|
|
508
642
|
|
|
509
643
|
See [SECURITY.md](SECURITY.md) for vulnerability reporting.
|
|
510
644
|
|
|
645
|
+
---
|
|
646
|
+
|
|
511
647
|
## Development
|
|
512
648
|
|
|
513
649
|
```bash
|
|
514
650
|
git clone https://github.com/LBT-AI/toolnet-memory.git
|
|
515
651
|
cd toolnet-memory
|
|
516
652
|
npm ci
|
|
653
|
+
|
|
517
654
|
npm run lint
|
|
518
655
|
npm run format:check
|
|
519
656
|
npm run typecheck
|
|
@@ -522,101 +659,38 @@ npm run build:release
|
|
|
522
659
|
npm pack --dry-run
|
|
523
660
|
```
|
|
524
661
|
|
|
525
|
-
|
|
662
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution rules.
|
|
526
663
|
|
|
527
|
-
|
|
528
|
-
bash -n scripts/install.sh
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for repository rules and pull-request requirements.
|
|
664
|
+
---
|
|
532
665
|
|
|
533
666
|
## Releases
|
|
534
667
|
|
|
535
|
-
|
|
668
|
+
ToolNet Memory uses GitHub Actions for CI and npm releases.
|
|
536
669
|
|
|
537
|
-
|
|
670
|
+
Before a release, the repository validates:
|
|
538
671
|
|
|
539
672
|
```text
|
|
540
|
-
|
|
541
|
-
|
|
673
|
+
lint
|
|
674
|
+
format
|
|
675
|
+
TypeScript
|
|
676
|
+
unit/integration tests
|
|
677
|
+
production build
|
|
678
|
+
npm package contents
|
|
542
679
|
```
|
|
543
680
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
## License
|
|
547
|
-
|
|
548
|
-
MIT © 2026 LBT-AI. See [LICENSE](LICENSE).
|
|
549
|
-
|
|
550
|
-
## Multi-provider AI setup
|
|
551
|
-
|
|
552
|
-
Run:
|
|
553
|
-
|
|
554
|
-
```bash
|
|
555
|
-
toolnet-memory setup
|
|
556
|
-
|
|
557
|
-
ToolNet Memory separates AI configuration into independent roles:
|
|
558
|
-
|
|
559
|
-
* LLM — reasoning, summarization, classification, and memory intelligence.
|
|
560
|
-
* Embedding — semantic indexing and retrieval.
|
|
561
|
-
* LLM Fallbacks — optional secondary providers for transient failures.
|
|
562
|
-
|
|
563
|
-
Supported LLM providers include:
|
|
564
|
-
|
|
565
|
-
* OpenAI-compatible
|
|
566
|
-
* Alibaba / DashScope
|
|
567
|
-
* OpenRouter
|
|
568
|
-
* Groq
|
|
569
|
-
* DeepSeek
|
|
570
|
-
* NVIDIA NIM
|
|
571
|
-
* Gemini
|
|
572
|
-
* Hugging Face
|
|
573
|
-
* Ollama / Local
|
|
574
|
-
* Cloudflare Workers AI
|
|
575
|
-
* Custom endpoints
|
|
576
|
-
|
|
577
|
-
Canonical configuration:
|
|
681
|
+
Version tags trigger the release workflow and npm Trusted Publishing.
|
|
578
682
|
|
|
579
|
-
|
|
580
|
-
TOOLNET_LLM_API_KEY=
|
|
581
|
-
TOOLNET_LLM_BASE_URL=
|
|
582
|
-
TOOLNET_LLM_MODEL=
|
|
583
|
-
TOOLNET_EMBEDDING_PROVIDER=
|
|
584
|
-
TOOLNET_EMBEDDING_API_KEY=
|
|
585
|
-
TOOLNET_EMBEDDING_BASE_URL=
|
|
586
|
-
TOOLNET_EMBEDDING_MODEL=
|
|
683
|
+
The tag must match `package.json`:
|
|
587
684
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
TOOLNET_LLM_FALLBACK_1_BASE_URL=
|
|
593
|
-
TOOLNET_LLM_FALLBACK_1_MODEL=
|
|
594
|
-
TOOLNET_LLM_FALLBACK_2_PROVIDER=
|
|
595
|
-
TOOLNET_LLM_FALLBACK_2_API_KEY=
|
|
596
|
-
TOOLNET_LLM_FALLBACK_2_BASE_URL=
|
|
597
|
-
TOOLNET_LLM_FALLBACK_2_MODEL=
|
|
598
|
-
TOOLNET_LLM_FALLBACK_COOLDOWN_MS=60000
|
|
599
|
-
TOOLNET_LLM_MAX_RETRIES=1
|
|
600
|
-
|
|
601
|
-
Fallback is used only for transient failures such as:
|
|
602
|
-
|
|
603
|
-
* timeout / network failure
|
|
604
|
-
* HTTP 408
|
|
605
|
-
* HTTP 429
|
|
606
|
-
* HTTP 5xx
|
|
607
|
-
|
|
608
|
-
HTTP 400, 401, and 403 are surfaced instead of silently switching providers.
|
|
685
|
+
```text
|
|
686
|
+
package.json: 0.3.x
|
|
687
|
+
Git tag: v0.3.x
|
|
688
|
+
```
|
|
609
689
|
|
|
610
|
-
|
|
690
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
611
691
|
|
|
612
|
-
|
|
692
|
+
---
|
|
613
693
|
|
|
614
|
-
|
|
615
|
-
toolnet-memory provider:status
|
|
616
|
-
toolnet-memory provider:test
|
|
617
|
-
toolnet-memory provider:test llm
|
|
618
|
-
toolnet-memory provider:test embedding
|
|
619
|
-
toolnet-memory doctor
|
|
694
|
+
## License
|
|
620
695
|
|
|
621
|
-
|
|
622
|
-
```
|
|
696
|
+
MIT © 2026 LBT-AI. See [LICENSE](LICENSE).
|