@securecoms/agent-bridge 0.27.0 → 0.28.0

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 (49) hide show
  1. package/README.md +41 -0
  2. package/dist/bin.d.ts +1 -1
  3. package/dist/bin.js +3396 -380
  4. package/dist/bridge-agent.d.ts +182 -1
  5. package/dist/config.d.ts +7 -0
  6. package/dist/embedder-manifest.json +52 -0
  7. package/dist/embedder-worker.js +2898 -0
  8. package/dist/embedder.js +1574 -0
  9. package/dist/index.js +3201 -306
  10. package/dist/memory/consumer-recall.d.ts +21 -0
  11. package/dist/memory/embedder/client.d.ts +103 -0
  12. package/dist/memory/embedder/download.d.ts +28 -0
  13. package/dist/memory/embedder/embedder-main.d.ts +1 -0
  14. package/dist/memory/embedder/embedder-paths.d.ts +14 -0
  15. package/dist/memory/embedder/engine.d.ts +21 -0
  16. package/dist/memory/embedder/gc.d.ts +2 -0
  17. package/dist/memory/embedder/handshake.d.ts +7 -0
  18. package/dist/memory/embedder/heartbeats.d.ts +4 -0
  19. package/dist/memory/embedder/import-bundle.d.ts +6 -0
  20. package/dist/memory/embedder/inner-source.d.ts +2 -0
  21. package/dist/memory/embedder/layout.d.ts +36 -0
  22. package/dist/memory/embedder/locks.d.ts +17 -0
  23. package/dist/memory/embedder/manifest.d.ts +30 -0
  24. package/dist/memory/embedder/no-dial.d.ts +3 -0
  25. package/dist/memory/embedder/protocol.d.ts +55 -0
  26. package/dist/memory/embedder/run-dir.d.ts +11 -0
  27. package/dist/memory/embedder/scheduler.d.ts +24 -0
  28. package/dist/memory/embedder/server.d.ts +46 -0
  29. package/dist/memory/embedder/session.d.ts +17 -0
  30. package/dist/memory/embedder/spawn.d.ts +40 -0
  31. package/dist/memory/embedder/tokenizer.d.ts +41 -0
  32. package/dist/memory/embedder/types.d.ts +32 -0
  33. package/dist/memory/embedder/windows.d.ts +46 -0
  34. package/dist/memory/embedder/worker-body.d.ts +44 -0
  35. package/dist/memory/embedder/worker.d.ts +1 -0
  36. package/dist/memory/memory-config.d.ts +13 -0
  37. package/dist/memory/note-frames.d.ts +5 -2
  38. package/dist/memory/notes-book.d.ts +21 -3
  39. package/dist/memory/provider.d.ts +2 -0
  40. package/dist/memory/recall/call-heartbeat.d.ts +35 -0
  41. package/dist/memory/recall/membership-purge.d.ts +82 -0
  42. package/dist/memory/recall/rank.d.ts +15 -0
  43. package/dist/memory/recall/recall-book.d.ts +140 -0
  44. package/dist/memory/recall/reembed.d.ts +35 -0
  45. package/dist/memory-taps.d.ts +3 -2
  46. package/dist/ort-wasm-simd-threaded.wasm +0 -0
  47. package/dist/version.d.ts +1 -1
  48. package/dist/ws-server.d.ts +13 -1
  49. package/package.json +2 -1
package/README.md CHANGED
@@ -781,6 +781,47 @@ upgraded again; the same holds for a 0.9.x runtime. Roll back the runtime and
781
781
  the bridge together, and restart both: the bridge decides once per process
782
782
  that a notes-reading runtime is present.
783
783
 
784
+ ## Semantic memory: model download and retention
785
+
786
+ <!-- [COPY, NEW] the three paragraphs below, the log-line paragraph included (7b Task 19, spec §19 LOW; first sentence corrected in the 7b-2 final-review fix round). Gate: Eric sign-off before npm publish (release PR). -->
787
+
788
+ Semantic memory downloads its model from downloads.securecoms.ai when the owner first messages the agent in their private chat after semantic memory is turned on, not when the setting is saved. On a machine that must make no such connection, set `memory.model_source` to `import_only` in the credential file and copy the model bundle in with `agent-bridge models import <dir>`.
789
+
790
+ If you change the memory provider or turn off owner-DM defaults, semantic memory rows stay on the machine until their retention ends, but they are never used.
791
+
792
+ The bridge logs `memory.model_download_enabled` (no fields) once per process
793
+ when semantic memory is turned on with `model_source` `download`.
794
+
795
+ <!-- [COPY, NEW] (7b Task 19 fix round 2). Gate: Eric sign-off before npm publish (release PR). -->
796
+
797
+ If you embed the bridge as a library (`new BridgeAgent(cfg, deps)`), semantic recall stays inert unless you pass `hostMachine: true`: no model is downloaded or loaded, and no call heartbeat is written. The `agent-bridge` command passes it for you.
798
+
799
+ ---
800
+
801
+ ## Release notes: 0.28.0
802
+
803
+ 0.28.0 adds semantic memory in the owner's private chat. Install it together
804
+ with `@securecoms/agent-runtime` 0.11.0 and restart both.
805
+
806
+ - **Semantic memory.** The agent recalls sealed memory rows in the owner's
807
+ private chat only. See "Semantic memory: model download and retention"
808
+ above for the model download, retention and library-embedding paragraphs.
809
+ - **Off switches.** The three switches under "Markdown notes (0.27.0)" apply
810
+ unchanged: `memory.provider: "none"`, `SECURECOMS_OWNER_DM_DEFAULT_GRANTS=off`,
811
+ and (notes only) `SECURECOMS_TOOL_DENY=memory_note`.
812
+ - **`import_only`.** Set `memory.model_source` to `import_only` on a machine
813
+ that must make no model download.
814
+ - **`models import`.** `agent-bridge models import <dir>` copies a model bundle
815
+ in for `import_only` machines. <!-- [COPY, NEW] the one-line CLI confirmation "imported <names>" printed by `models import` (src/bin.ts). Gate: Eric sign-off before npm publish (release PR). -->
816
+
817
+ ## Test commands
818
+
819
+ ```
820
+ npx vitest run && npx tsc --noEmit -p .
821
+ ```
822
+
823
+ The suite runs with a temporary HOME (`test-support/tmp-home.global-setup.ts`), so no test writes under your real `~/.securecoms`.
824
+
784
825
  ---
785
826
 
786
827
  ## Flags and environment
package/dist/bin.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare function nodeMajorOk(version: string): boolean;
11
11
  * diagnostics do not call this helper or expose even the hint.
12
12
  */
13
13
  export declare function tokenFingerprint(token: string): string;
14
- export declare function parseVerb(argv: string[]): "install" | "uninstall" | "status" | "wire" | "unwire" | null;
14
+ export declare function parseVerb(argv: string[]): "install" | "uninstall" | "status" | "wire" | "unwire" | "models" | null;
15
15
  export declare function slugFromCredentialPath(credentialPath: string): string;
16
16
  export declare function chooseInstallExecPath(runningExecPath: string, override: string | undefined, deps: ResolveNodeDeps): string;
17
17
  export declare function realCopyConnector(srcDir: string, dstDir: string, harness: Harness): void;