toolnet-memory 0.2.13 → 0.2.14
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 +119 -26
- package/bundle/auto-integrate.js +600 -127
- package/bundle/opencode.js +637 -161
- package/bundle/setup.js +607 -134
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,45 +100,78 @@ toolnet-memory doctor
|
|
|
100
100
|
|
|
101
101
|
## Storage Configuration
|
|
102
102
|
|
|
103
|
-
ToolNet Memory supports multiple storage backends.
|
|
103
|
+
ToolNet Memory supports multiple storage backends.
|
|
104
|
+
**Cloudflare R2 is the default and recommended provider**, but ToolNet Memory does not require Cloudflare or Hugging Face. You can also use any supported S3-compatible backend or run fully local without any cloud storage.
|
|
104
105
|
|
|
105
|
-
### Cloudflare R2
|
|
106
|
+
### Cloudflare R2 — default
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
#
|
|
109
|
-
|
|
108
|
+
````bash
|
|
109
|
+
# ~/.config/toolnet-memory/.env
|
|
110
|
+
MEMORY_STORAGE_PROVIDER=r2
|
|
110
111
|
R2_ACCOUNT_ID=your-account-id
|
|
112
|
+
R2_BUCKET=toolnet-memory
|
|
111
113
|
R2_ACCESS_KEY_ID=your-access-key
|
|
112
114
|
R2_SECRET_ACCESS_KEY=your-secret-key
|
|
113
|
-
R2_BUCKET_NAME=toolnet-memory
|
|
114
|
-
```
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
Generic S3 / S3-compatible
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
Works with AWS S3 and compatible services such as MinIO, Backblaze B2 S3, Wasabi, and similar providers.
|
|
119
|
+
|
|
120
|
+
MEMORY_STORAGE_PROVIDER=s3
|
|
121
|
+
# Leave empty for AWS S3.
|
|
122
|
+
S3_ENDPOINT=
|
|
120
123
|
S3_REGION=us-east-1
|
|
121
124
|
S3_BUCKET=toolnet-memory
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
S3_ACCESS_KEY_ID=your-access-key
|
|
126
|
+
S3_SECRET_ACCESS_KEY=your-secret-key
|
|
127
|
+
S3_FORCE_PATH_STYLE=false
|
|
125
128
|
|
|
126
|
-
|
|
129
|
+
Local storage — no cloud required
|
|
127
130
|
|
|
128
|
-
|
|
129
|
-
STORAGE_PROVIDER=huggingface
|
|
130
|
-
HF_TOKEN=hf_your_token
|
|
131
|
-
HF_REPO=username/toolnet-memory
|
|
132
|
-
```
|
|
131
|
+
ToolNet Memory can run completely locally.
|
|
133
132
|
|
|
134
|
-
|
|
133
|
+
MEMORY_STORAGE_PROVIDER=local
|
|
134
|
+
MEMORY_LOCAL_STORAGE_PATH=/path/to/toolnet-memory-storage
|
|
135
|
+
MEMORY_LOCAL_CACHE_MB=200
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
Local mode is useful for:
|
|
138
|
+
|
|
139
|
+
* offline development,
|
|
140
|
+
* private projects that must not use remote storage,
|
|
141
|
+
* testing,
|
|
142
|
+
* single-machine workflows.
|
|
143
|
+
|
|
144
|
+
No R2, S3, or Hugging Face account is required.
|
|
145
|
+
|
|
146
|
+
Hugging Face S3 — legacy compatibility
|
|
147
|
+
|
|
148
|
+
Existing installations can continue using the Hugging Face S3-compatible backend.
|
|
149
|
+
|
|
150
|
+
MEMORY_STORAGE_PROVIDER=huggingface
|
|
151
|
+
HF_NAMESPACE=your-namespace
|
|
152
|
+
HF_BUCKET=toolnet-memory
|
|
153
|
+
HF_S3_ACCESS_KEY_ID=your-access-key
|
|
154
|
+
HF_S3_SECRET_ACCESS_KEY=your-secret-key
|
|
155
|
+
|
|
156
|
+
Hugging Face remains supported for compatibility, but new installations should normally prefer R2, generic S3, or local storage.
|
|
157
|
+
|
|
158
|
+
Embedding provider
|
|
159
|
+
|
|
160
|
+
The current Hugging Face embedding configuration is independent from the storage provider.
|
|
161
|
+
|
|
162
|
+
For example, you can use:
|
|
163
|
+
|
|
164
|
+
Cloudflare R2 storage + Hugging Face embeddings
|
|
165
|
+
Local storage + Hugging Face embeddings
|
|
166
|
+
Generic S3 storage + Hugging Face embeddings
|
|
167
|
+
|
|
168
|
+
Embedding configuration:
|
|
169
|
+
|
|
170
|
+
HF_TOKEN=
|
|
171
|
+
HF_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
|
172
|
+
|
|
173
|
+
See docs/STORAGE.md for detailed provider setup.
|
|
140
174
|
|
|
141
|
-
See [docs/STORAGE.md](docs/STORAGE.md) for detailed setup instructions.
|
|
142
175
|
|
|
143
176
|
## One-time VPS setup
|
|
144
177
|
|
|
@@ -146,7 +179,7 @@ Global configuration is stored at:
|
|
|
146
179
|
|
|
147
180
|
```text
|
|
148
181
|
~/.config/toolnet-memory/.env
|
|
149
|
-
|
|
182
|
+
````
|
|
150
183
|
|
|
151
184
|
Run setup once on a new VPS/user account:
|
|
152
185
|
|
|
@@ -270,6 +303,66 @@ Session transcripts are filtered to remove:
|
|
|
270
303
|
- Sensitive data patterns
|
|
271
304
|
- Redundant context
|
|
272
305
|
|
|
306
|
+
## Memory retrieval and automation
|
|
307
|
+
|
|
308
|
+
ToolNet Memory exposes retrieval and automation controls through the global environment configuration.
|
|
309
|
+
|
|
310
|
+
These settings are optional. The defaults are designed to work without manual tuning.
|
|
311
|
+
|
|
312
|
+
Automatic memory behavior
|
|
313
|
+
|
|
314
|
+
MEMORY_AUTO_CAPTURE=true
|
|
315
|
+
MEMORY_AUTO_RETRIEVE=true
|
|
316
|
+
MEMORY_AUTO_SUMMARIZE=true
|
|
317
|
+
MEMORY_AUTO_SYNC=true
|
|
318
|
+
|
|
319
|
+
- MEMORY_AUTO_CAPTURE — capture meaningful project activity.
|
|
320
|
+
- MEMORY_AUTO_RETRIEVE — allow relevant memory retrieval.
|
|
321
|
+
- MEMORY_AUTO_SUMMARIZE — generate compact summaries instead of persisting raw conversational noise.
|
|
322
|
+
- MEMORY_AUTO_SYNC — sync eligible project state to the configured storage backend.
|
|
323
|
+
|
|
324
|
+
Retrieval limits
|
|
325
|
+
|
|
326
|
+
MEMORY_MAX_CANDIDATES=50
|
|
327
|
+
MEMORY_RERANK_TOP=10
|
|
328
|
+
MEMORY_FINAL_CONTEXT=5
|
|
329
|
+
MEMORY_TOKEN_BUDGET=2000
|
|
330
|
+
|
|
331
|
+
The retrieval pipeline is intentionally bounded:
|
|
332
|
+
|
|
333
|
+
candidate search
|
|
334
|
+
↓
|
|
335
|
+
max 50 candidates
|
|
336
|
+
↓
|
|
337
|
+
rerank top 10
|
|
338
|
+
↓
|
|
339
|
+
select up to 5 final context items
|
|
340
|
+
↓
|
|
341
|
+
enforce token budget
|
|
342
|
+
|
|
343
|
+
Remote storage can contain a large project history, but ToolNet Memory should never dump the entire history into an agent prompt.
|
|
344
|
+
|
|
345
|
+
Session continuity
|
|
346
|
+
|
|
347
|
+
TOOLNET_SESSION_LEARNING=1
|
|
348
|
+
TOOLNET_WORK_CONTINUITY=1
|
|
349
|
+
TOOLNET_SEMANTIC_CONTINUITY=1
|
|
350
|
+
TOOLNET_SMART_HANDOFF=1
|
|
351
|
+
|
|
352
|
+
These flags control automatic session learning, work-state continuity, semantic continuity, and compact handoff generation.
|
|
353
|
+
|
|
354
|
+
Session history is filtered and selectively promoted. Raw transcript content is not intended to be injected into normal startup context.
|
|
355
|
+
|
|
356
|
+
Context modes
|
|
357
|
+
|
|
358
|
+
Normal agent startup uses a small local context budget.
|
|
359
|
+
|
|
360
|
+
minimal → project rules + current task
|
|
361
|
+
focused → minimal + a small number of relevant memories
|
|
362
|
+
deep → manual recovery only
|
|
363
|
+
|
|
364
|
+
Use deep recovery only when older session history is genuinely required.
|
|
365
|
+
|
|
273
366
|
## Example Workflow
|
|
274
367
|
|
|
275
368
|
```bash
|