@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 +19 -0
- package/dist/bin.d.ts +10 -0
- package/dist/bin.js +2032 -77
- package/dist/bin.js.pre-c1-f803007 +5795 -0
- package/dist/bin.js.pre-c3-096a9a3 +5832 -0
- package/dist/bin.js.pre-ffrebuild-b162d4a +5639 -0
- package/dist/bin.js.pre-kpheal-20260708-150924 +5531 -0
- package/dist/bin.js.pre-kppersist-20260708-152341 +5543 -0
- package/dist/bin.js.pre-p0-20260708-102415 +5196 -0
- package/dist/bin.js.pre-p1b-02f47e1 +5639 -0
- package/dist/bin.js.pre-warmfix-20260708-153705 +5613 -0
- package/dist/bin.js.pretrace-113205 +5395 -0
- package/dist/bridge-agent.d.ts +393 -0
- package/dist/decrypt-error-log-limiter.d.ts +52 -0
- package/dist/errors.d.ts +1 -1
- package/dist/index.js +2009 -64
- package/dist/index.js.pre-p0-20260708-102415 +4879 -0
- package/dist/ws-server.d.ts +5 -0
- package/package.json +2 -1
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;
|