@securecoms/agent-bridge 0.3.2 → 0.5.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 (47) hide show
  1. package/README.md +21 -1
  2. package/dist/bin.js +1073 -90
  3. package/dist/bridge-agent.d.ts +68 -7
  4. package/dist/config.d.ts +7 -0
  5. package/dist/http-server.d.ts +42 -0
  6. package/dist/index.js +837 -63
  7. package/dist/memory/hermes-provider.d.ts +21 -0
  8. package/dist/memory/hermes-session-map.d.ts +8 -0
  9. package/dist/memory/hermes-store.d.ts +32 -0
  10. package/dist/memory/hermes-test-fixture.d.ts +5 -0
  11. package/dist/memory/openclaw-provider.d.ts +24 -0
  12. package/dist/memory/openclaw-session-log.d.ts +15 -0
  13. package/dist/memory/openclaw-session-map.d.ts +7 -0
  14. package/dist/memory/provider.d.ts +29 -0
  15. package/dist/memory-taps.d.ts +13 -0
  16. package/dist/preflight-modern.cjs +35 -0
  17. package/dist/preflight-modern.d.cts +1 -0
  18. package/dist/preflight-upgrade.d.cts +30 -0
  19. package/dist/preflight.cjs +277 -0
  20. package/dist/preflight.d.cts +14 -0
  21. package/dist/service/config.d.ts +1 -0
  22. package/dist/service/install-prep.d.ts +68 -0
  23. package/package.json +3 -5
  24. package/dist/attachments.js +0 -49
  25. package/dist/auth.js +0 -56
  26. package/dist/bin.js.pre-c1-f803007 +0 -5795
  27. package/dist/bin.js.pre-c3-096a9a3 +0 -5832
  28. package/dist/bin.js.pre-ffrebuild-b162d4a +0 -5639
  29. package/dist/bin.js.pre-kpheal-20260708-150924 +0 -5531
  30. package/dist/bin.js.pre-kppersist-20260708-152341 +0 -5543
  31. package/dist/bin.js.pre-p0-20260708-102415 +0 -5196
  32. package/dist/bin.js.pre-p1b-02f47e1 +0 -5639
  33. package/dist/bin.js.pre-warmfix-20260708-153705 +0 -5613
  34. package/dist/bin.js.pretrace-113205 +0 -5395
  35. package/dist/bridge-agent.js +0 -831
  36. package/dist/config.js +0 -74
  37. package/dist/coordination.js +0 -63
  38. package/dist/errors.js +0 -25
  39. package/dist/http-server.js +0 -220
  40. package/dist/index.js.pre-p0-20260708-102415 +0 -4879
  41. package/dist/latency.js +0 -87
  42. package/dist/rate-limit.js +0 -56
  43. package/dist/service/config.js +0 -26
  44. package/dist/service/install.js +0 -60
  45. package/dist/service/launchd.js +0 -30
  46. package/dist/service/systemd.js +0 -25
  47. package/dist/ws-server.js +0 -254
package/README.md CHANGED
@@ -13,9 +13,19 @@ The server still sees ciphertext only. The trust boundary is the machine running
13
13
 
14
14
  ## Requirements
15
15
 
16
- - Node.js 24+
16
+ - **Node.js 24 LTS or newer.** The daemon requires >= 24 (node:sqlite stable API).
17
17
  - A valid SecureComs agent credential (`agent.json`, `chmod 600`)
18
18
 
19
+ You don't have to check your Node version yourself. The installer self-checks before anything else runs: on an older Node it prints a clear diagnosis instead of crashing, and on macOS it offers to install Node 24 LTS for you. The install is consent-gated and names its source before asking. If Homebrew is present it runs `brew install node` (user-space, no sudo); otherwise it downloads the official installer from nodejs.org over TLS and verifies the published SHA-256 checksum (an integrity check on the download) before running it.
20
+
21
+ To install Node 24 manually instead:
22
+
23
+ 1. Official installer (recommended): download the Node 24 LTS installer from [nodejs.org](https://nodejs.org) and run it.
24
+ 2. Homebrew (macOS): `brew install node`
25
+ 3. nvm: `nvm install 24 && nvm use 24`
26
+
27
+ Always re-run the install command after upgrading Node — the background service pins the Node path it was installed with.
28
+
19
29
  ---
20
30
 
21
31
  ## Quickstart
@@ -338,6 +348,16 @@ pm2 start "npx @agentvault/connect-agent-bridge --credential ./agent.json" \
338
348
  --name securecoms-bridge
339
349
  ```
340
350
 
351
+ ### Install behavior
352
+
353
+ `agent-bridge install --credential <path>` (launchd on macOS, systemd user unit on Linux) prepares and verifies the service rather than pointing it at your download:
354
+
355
+ - The credential file is validated (readable, valid JSON, all required fields) and **copied into a durable per-agent directory** `~/securecoms-agent-<slug>/` (dir `0700`, file `0600`). The service runs from that copy, so moving or deleting the original download can't break the daemon. A directory already owned by a *different* agent identity is refused, never overwritten.
356
+ - A **free port is auto-selected** from `7077-7276` (lowest free wins; sibling service definitions and live binds both count as taken). Pass `--port N` to override; the explicit port is honored as-is.
357
+ - Install **verifies the daemon actually came up** and fails loudly with the log path if it didn't — no silent crash-loops.
358
+ - Install echoes the credential's `device_id`, `issued_at`, and a redacted api-key fingerprint so you can confirm you installed the newest download. **Re-running install is the only way to update a live (e.g. rotated) credential** — replacing the downloaded file alone does nothing.
359
+ - Optional `--harness openclaw|hermes|custom` prints a paste-ready config snippet with the chosen port and the token-file path (the token itself never appears in output).
360
+
341
361
  ---
342
362
 
343
363
  ## Security