toolnet-memory 0.3.16 → 0.3.17

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.
Files changed (45) hide show
  1. package/.env.example +74 -0
  2. package/.release-target +1 -1
  3. package/README.md +165 -7
  4. package/bin/toolnet-memory +12 -0
  5. package/bundle/agy-hook.js +59 -59
  6. package/bundle/agy.js +58 -58
  7. package/bundle/api.js +15 -15
  8. package/bundle/audit.js +2 -0
  9. package/bundle/background-refresh.js +7 -7
  10. package/bundle/code-capabilities.js +2 -0
  11. package/bundle/codex.js +63 -63
  12. package/bundle/context-runtime.js +41 -41
  13. package/bundle/context.js +15 -15
  14. package/bundle/copilot-hook.js +73 -73
  15. package/bundle/cursor-hook.js +73 -73
  16. package/bundle/docker-healthcheck.js +3 -0
  17. package/bundle/doctor.js +4 -4
  18. package/bundle/full-index.js +20 -19
  19. package/bundle/gc.js +5 -3
  20. package/bundle/graph-cli.js +1 -1
  21. package/bundle/graph-index.js +5 -4
  22. package/bundle/graph-ui.js +4 -3
  23. package/bundle/grok-hook.js +52 -52
  24. package/bundle/handoff-refresh.js +2 -2
  25. package/bundle/help-cli.js +4 -4
  26. package/bundle/impact.js +5 -4
  27. package/bundle/incremental.js +5 -5
  28. package/bundle/init.js +35 -35
  29. package/bundle/kiro-hook.js +74 -74
  30. package/bundle/learner.js +8 -6
  31. package/bundle/mcp.js +19 -17
  32. package/bundle/memory-agent.js +4 -4
  33. package/bundle/memory-query.js +3 -3
  34. package/bundle/opencode.js +73 -73
  35. package/bundle/project-manual.js +7 -7
  36. package/bundle/public/index.html +51 -2
  37. package/bundle/runtime.js +16 -13
  38. package/bundle/semantic.js +6 -5
  39. package/bundle/service.js +11 -6
  40. package/bundle/snapshot.js +6 -4
  41. package/bundle/status-cli.js +4 -4
  42. package/bundle/toolnet-cli.js +49 -49
  43. package/bundle/work-continuity.js +7 -7
  44. package/package.json +26 -2
  45. package/release-manifest.json +94 -5
package/.env.example CHANGED
@@ -59,3 +59,77 @@ TOOLNET_API_TOKEN=
59
59
  # ToolNet Memory Hub
60
60
  TOOLNET_HUB_OWNER=owner
61
61
  TOOLNET_HUB_MAX_EVENTS=100
62
+
63
+ # ------------------------------------------------------------
64
+ # Graph UI
65
+ # ------------------------------------------------------------
66
+ #
67
+ # Localhost-only by default.
68
+ TOOLNET_GRAPH_HOST=127.0.0.1
69
+ TOOLNET_GRAPH_PORT=9749
70
+ # Optional API bearer token.
71
+ # Recommended whenever Graph UI is reachable from another host.
72
+ # Generate a strong random token, for example:
73
+ # openssl rand -hex 32
74
+ #
75
+ # TOOLNET_GRAPH_TOKEN=
76
+ # Optional comma-separated Host allow-list for reverse proxies
77
+ # or wildcard binds.
78
+ #
79
+ # TOOLNET_GRAPH_ALLOWED_HOSTS=graph.example.com
80
+
81
+ # ------------------------------------------------------------
82
+ # Optional remote client-side encryption
83
+ # ------------------------------------------------------------
84
+ #
85
+ # OFF by default. Normal ToolNet usage needs no encryption key.
86
+ #
87
+ # Enable only when you want ToolNet to encrypt objects before
88
+ # they are sent to S3 / R2 / Hugging Face object storage.
89
+ #
90
+ # TOOLNET_REMOTE_ENCRYPTION=on
91
+ #
92
+ # Generate a 32-byte key:
93
+ # openssl rand -base64 32
94
+ #
95
+ # Configure ONE:
96
+ #
97
+ # TOOLNET_REMOTE_ENCRYPTION_KEY=
98
+ #
99
+ # or preferably from a protected file / Docker secret:
100
+ #
101
+ # TOOLNET_REMOTE_ENCRYPTION_KEY_FILE=/run/secrets/toolnet_remote_encryption_key
102
+
103
+ # ------------------------------------------------------------
104
+ # Automatic garbage collection
105
+ # ------------------------------------------------------------
106
+ #
107
+ # Disabled by default.
108
+ #
109
+ # When enabled on the ToolNet service, GC runs only for already
110
+ # initialized projects observed by the service.
111
+ #
112
+ # TOOLNET_AUTO_GC=on
113
+ #
114
+ # Default: 168 hours = weekly.
115
+ #
116
+ # TOOLNET_AUTO_GC_INTERVAL_HOURS=168
117
+ #
118
+ # Internal due-check cadence. Default: 15 minutes.
119
+ #
120
+ # TOOLNET_AUTO_GC_TICK_MINUTES=15
121
+ #
122
+ # Remote snapshot deletion remains OFF unless explicitly enabled.
123
+ #
124
+ # TOOLNET_AUTO_GC_REMOTE=off
125
+ #
126
+ # Retention policy overrides:
127
+ #
128
+ # TOOLNET_AUTO_GC_KEEP_SNAPSHOTS=10
129
+ # TOOLNET_AUTO_GC_RUNTIME_DAYS=30
130
+ # TOOLNET_AUTO_GC_STALE_LOCK_MINUTES=10
131
+ # TOOLNET_AUTO_GC_SNAPSHOT_DAYS=30
132
+ #
133
+ # Optional audit actor identity:
134
+ #
135
+ # TOOLNET_AGENT_ID=
package/.release-target CHANGED
@@ -1 +1 @@
1
- 0.3.16
1
+ 0.3.17
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  **One project. Multiple coding agents. Continuous context.**
13
13
 
14
- Current release: **v0.3.16**
14
+ Current release: v0.3.17
15
15
 
16
16
  </div>
17
17
 
@@ -614,8 +614,49 @@ toolnet-memory project:manual-sync
614
614
 
615
615
  Secrets and credentials should remain in `.env` or another secret store, not in `PROJECT.md`.
616
616
 
617
+ ### Optional remote encryption
618
+
619
+ Remote S3 / R2 / Hugging Face objects can be encrypted client-side with
620
+ AES-256-GCM. Encryption remains disabled by default:
621
+
622
+ ```bash
623
+ export TOOLNET_REMOTE_ENCRYPTION=on
624
+ export TOOLNET_REMOTE_ENCRYPTION_KEY="$(openssl rand -base64 32)"
625
+ ```
626
+
627
+ Existing plaintext remote objects remain readable. New and rewritten
628
+ remote objects are encrypted while the feature is enabled. For services or
629
+ containers, `TOOLNET_REMOTE_ENCRYPTION_KEY_FILE` can load the key from a
630
+ protected file instead of placing the key directly in an environment
631
+ variable. See [`docs/remote-encryption.md`](docs/remote-encryption.md).
632
+
617
633
  ---
618
634
 
635
+ ### Graph UI security
636
+
637
+ `toolnet-memory graph` remains localhost-first:
638
+
639
+ ```text
640
+ 127.0.0.1:9749
641
+ ```
642
+
643
+ For remote exposure, Graph API endpoints support an optional bearer token:
644
+
645
+ ```bash
646
+ export TOOLNET_GRAPH_TOKEN="$(openssl rand -hex 32)"
647
+ export TOOLNET_GRAPH_HOST="0.0.0.0"
648
+ toolnet-memory graph
649
+ ```
650
+
651
+ The browser asks for the token when a protected Graph API returns HTTP 401 and
652
+ keeps it in sessionStorage for that browser session.
653
+
654
+ `/api/health` stays unauthenticated but returns only a minimal service status.
655
+
656
+ `TOOLNET_GRAPH_TOKEN` controls Graph API access only. It is not an encryption
657
+ key and is not required for normal localhost usage.
658
+
659
+
619
660
  ## Runtime Capability Truth
620
661
 
621
662
  ToolNet Memory is local-first and deterministic.
@@ -710,12 +751,15 @@ implementation.
710
751
 
711
752
  ToolNet provides secret scanning and durable-data sanitization.
712
753
 
713
- ToolNet does not provide client-side encryption by default and does not require
714
- an encryption key.
754
+ ToolNet does not provide mandatory client-side encryption. Remote
755
+ client-side encryption is optional and disabled by default. Normal ToolNet
756
+ usage does not require an encryption key. When
757
+ `TOOLNET_REMOTE_ENCRYPTION=on` is configured together with
758
+ `TOOLNET_REMOTE_ENCRYPTION_KEY` (or the `_FILE` variant), ToolNet encrypts
759
+ new remote object writes with AES-256-GCM before they reach S3 / R2 /
760
+ Hugging Face storage. Existing plaintext remote objects remain readable.
715
761
 
716
- Remote payload protection at rest therefore depends on the configured storage
717
- provider unless optional ToolNet client-side encryption is implemented in a
718
- future release.
762
+ See [`docs/remote-encryption.md`](docs/remote-encryption.md).
719
763
 
720
764
  Project instruction files are treated as untrusted project data, not as system
721
765
  or developer authority.
@@ -1091,7 +1135,7 @@ ToolNet Memory uses GitHub Actions for CI and npm releases.
1091
1135
  The current release line is:
1092
1136
 
1093
1137
  ```text
1094
- npm package: toolnet-memory@0.3.16
1138
+ npm package: toolnet-memory@0.3.17
1095
1139
  Git tag: v0.3.14
1096
1140
  ```
1097
1141
 
@@ -1117,3 +1161,117 @@ See [CHANGELOG.md](CHANGELOG.md) for release history.
1117
1161
  ## License
1118
1162
 
1119
1163
  MIT © 2026 LBT-AI. See [LICENSE](LICENSE).
1164
+
1165
+
1166
+
1167
+ Docker
1168
+
1169
+ ToolNet Memory includes a hardened Node.js 22 container build.
1170
+
1171
+ docker build -t toolnet-memory:local .
1172
+ docker run --rm toolnet-memory:local --version
1173
+
1174
+ Run the daemon with persistent ToolNet runtime state:
1175
+
1176
+ docker run --rm \
1177
+ -v toolnet-memory-home:/home/node/.toolnet \
1178
+ toolnet-memory:local
1179
+
1180
+ Run against the current project:
1181
+
1182
+ docker run --rm \
1183
+ -v "$PWD:/workspace" \
1184
+ -v toolnet-memory-home:/home/node/.toolnet \
1185
+ toolnet-memory:local \
1186
+ doctor
1187
+
1188
+ The final image runs as a non-root user and the Docker health check uses the
1189
+ ToolNet daemon's real Unix-socket ping protocol.
1190
+
1191
+ Release image target:
1192
+
1193
+ ghcr.io/lbt-ai/toolnet-memory
1194
+
1195
+ Optional Docker Hub publishing supports:
1196
+
1197
+ lbtai/toolnet-memory
1198
+
1199
+ when Docker Hub publishing is explicitly enabled in repository settings.
1200
+
1201
+ See docs/docker.md for Compose, shared-volume dedupe, permissions, health
1202
+ checks, and multi-architecture release details.
1203
+
1204
+
1205
+ Standalone binaries
1206
+
1207
+ ToolNet Memory can run without a separately installed Node.js/npm runtime.
1208
+
1209
+ Release targets:
1210
+
1211
+ Linux x64 / arm64
1212
+ macOS x64 / arm64
1213
+ Windows x64
1214
+
1215
+ Example:
1216
+
1217
+ ```bash
1218
+ chmod +x toolnet-memory-linux-x64
1219
+ ./toolnet-memory-linux-x64 --version
1220
+ ```
1221
+
1222
+ Standalone binaries embed the Node.js runtime and ToolNet production
1223
+ dependency graph. The npm package remains fully supported.
1224
+
1225
+ See [`docs/standalone.md`](docs/standalone.md) for platform support,
1226
+ service limitations, checksums, and build instructions.
1227
+
1228
+
1229
+
1230
+ Audit log and automatic GC
1231
+
1232
+ ToolNet can maintain a tamper-evident project audit history:
1233
+
1234
+ .toolnet/audit/events.jsonl
1235
+
1236
+ Inspect and verify:
1237
+
1238
+ ```bash
1239
+ toolnet-memory audit
1240
+ toolnet-memory audit:verify
1241
+ ```
1242
+
1243
+ The log records durable memory writes, snapshot restore/recovery, Guard
1244
+ checks, and GC execution without intentionally storing raw memory
1245
+ content or raw shell commands.
1246
+
1247
+ Automatic GC remains opt-in:
1248
+
1249
+ ```bash
1250
+ export TOOLNET_AUTO_GC=on
1251
+ toolnet-memory service
1252
+ ```
1253
+
1254
+ The default interval is weekly. Remote snapshot GC remains disabled
1255
+ unless `TOOLNET_AUTO_GC_REMOTE=on` is explicitly configured.
1256
+
1257
+ See [`docs/audit-log.md`](docs/audit-log.md) and
1258
+ [`docs/auto-gc.md`](docs/auto-gc.md).
1259
+
1260
+
1261
+
1262
+ Non-TypeScript local code search
1263
+
1264
+ Structural graph parsing remains TypeScript/JavaScript-only.
1265
+
1266
+ Python, Go, Rust, C, and C++ files are now included in deterministic local
1267
+ code search through sanitized file chunks indexed by SQLite FTS5/BM25.
1268
+
1269
+ ```bash
1270
+ toolnet-memory code:capabilities
1271
+ ```
1272
+
1273
+ Optional external LSP installations are detected for capability reporting
1274
+ only. ToolNet does not auto-download or automatically execute language
1275
+ servers during indexing.
1276
+
1277
+ See [`docs/non-ts-intelligence.md`](docs/non-ts-intelligence.md).
@@ -80,6 +80,18 @@ case "$COMMAND" in
80
80
  shift
81
81
  run bundle/gc.js src/retention/cli.ts "$@"
82
82
  ;;
83
+ audit)
84
+ shift
85
+ run bundle/audit.js src/audit/cli.ts "$@"
86
+ ;;
87
+ audit:verify)
88
+ shift
89
+ run bundle/audit.js src/audit/cli.ts verify "$@"
90
+ ;;
91
+ code:capabilities)
92
+ shift
93
+ run bundle/code-capabilities.js src/code-intelligence/parsers/capability-cli.ts "$@"
94
+ ;;
83
95
 
84
96
  run)
85
97
  run bundle/runtime.js src/index.ts