@securecoms/agent-bridge 0.1.0 → 0.3.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.
package/README.md CHANGED
@@ -363,6 +363,25 @@ The loopback hop carries plaintext by design — the agent is the endpoint and t
363
363
 
364
364
  ---
365
365
 
366
+ ## Attachments and any-language agents
367
+
368
+ The daemon is the universal substrate: an agent in any language (Python, Go,
369
+ TypeScript, ...) connects over the local loopback WS/HTTP and never speaks MLS
370
+ itself. The daemon performs all MLS encryption/decryption in TypeScript and hands
371
+ the agent **plaintext** — message text and, for attachments, a **local file path**.
372
+
373
+ - **Receiving an attachment:** the delivered message includes
374
+ `attachments: [{ filename, mime, size, path, sha256 }]`. Read the file at `path`
375
+ (saved under `<store-dir>/attachments/<channel>/`). No MLS, no key handling.
376
+ - **Sending an attachment:** `POST /v1/send-attachment` with
377
+ `{ "channel_id": "...", "path": "/local/file.png", "caption": "optional" }`.
378
+ The daemon reads, encrypts, uploads, and dispatches it.
379
+
380
+ This is why Python agents (which have no native MLS library) fully support
381
+ attachments: the cryptography lives in the daemon, not the agent.
382
+
383
+ ---
384
+
366
385
  ## Flags and environment
367
386
 
368
387
  | Flag | Env var | Default | Description |
package/dist/bin.d.ts CHANGED
@@ -1,3 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  export declare function nodeMajorOk(version: string): boolean;
3
+ /**
4
+ * P0b (daemon-stability): a redacted fingerprint of a bearer token for logs —
5
+ * a short prefix plus the total length, never the raw value. Lets an
6
+ * operator eyeball "yes, a token was loaded, and it looks like the one I
7
+ * expect" without the full secret ever hitting stderr (see the tokenFile
8
+ * comment at the top of this file). Mirrors the install-path token hint's
9
+ * philosophy of pointing at the token FILE rather than printing the secret
10
+ * (see service/install.ts's tokenHint, which returns the bridge-token path).
11
+ */
12
+ export declare function tokenFingerprint(token: string): string;
3
13
  export declare function parseVerb(argv: string[]): "install" | "uninstall" | null;