@securecoms/agent-bridge 0.34.0 → 0.35.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.
@@ -507,6 +507,13 @@ export interface BridgeAgentDeps {
507
507
  * tests to avoid real file IO / assert pin persistence directly.
508
508
  */
509
509
  vaultOwnerStore?: OwnerAuthorityStore;
510
+ /**
511
+ * Security fix 2026-10-30 (option A): the ONLY directory `/v1/vault-write`
512
+ * and `/v1/send-attachment` read from. Defaults to
513
+ * `join(dirname(cfg.storePath), "vault-outbox")`, or null (every upload
514
+ * refused) for an in-memory store. Override in tests.
515
+ */
516
+ vaultOutboxDir?: string | null;
510
517
  }
511
518
  /**
512
519
  * Voice repeats (a), owner report 2026-10-02: one spoken question reached the
@@ -1520,6 +1527,9 @@ export declare class BridgeAgent {
1520
1527
  private readonly uploadBlobImpl;
1521
1528
  /** Track 5: directory where received attachments are saved. */
1522
1529
  private readonly attachmentsDirImpl;
1530
+ private readonly vaultOutboxDirImpl;
1531
+ /** Audit 2026-10-30 HIGH 2: the outbox pinned at start(); null = every upload refused. */
1532
+ private outboxPin;
1523
1533
  /** B7: persistence for the vault kekset's owner-pin TOFU state. */
1524
1534
  private readonly vaultOwnerStoreImpl;
1525
1535
  /** B7: last-seen kekset generation per enclave, enforced monotonic across
@@ -2334,12 +2344,17 @@ export declare class BridgeAgent {
2334
2344
  * checks, so the HTTP boundary maps ALL vault trust failures to one code.
2335
2345
  */
2336
2346
  private getVaultSession;
2337
- /** Read `path` off local disk, encrypt + wrap its DEK under the vault's
2347
+ /** Read `path` from the vault outbox (security fix 2026-10-30; see
2348
+ * ./outbox.ts), encrypt + wrap its DEK under the vault's
2338
2349
  * current KEK generation, and create+upload+commit it as a new vault
2339
2350
  * file node named `name` (which may differ from `path`'s basename). */
2340
2351
  vaultWrite(enclaveId: string, vaultChannelId: string | null | undefined, path: string, name: string): Promise<{
2341
2352
  node_id: string;
2342
2353
  }>;
2354
+ /** Audit 2026-10-30 MED 5: an uploaded file leaves the outbox (no plaintext lingers). Content-free log. */
2355
+ private consumeUploaded;
2356
+ /** Audit 2026-10-30 MED 3: the pinned outbox path, served only on the authenticated GET /v1/vault-outbox. */
2357
+ vaultOutboxPath(): string | null;
2343
2358
  /** Download + verify + decrypt a vault file node. Returns the plaintext
2344
2359
  * base64-encoded (the loopback boundary is JSON-only, mirroring how
2345
2360
  * useVault.downloadFile returns `{name, bytes}` in-memory — here the
package/dist/errors.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * WebSocket returns `{type:"error", error, message, detail?}`. A client gets the
7
7
  * same `error` code regardless of which transport it used. (A2A §9.5/§10.6 pattern.)
8
8
  */
9
- export type BridgeErrorCode = "unauthorized" | "forbidden_origin" | "not_found" | "invalid_request" | "invalid_json" | "body_too_large" | "channel_pending" | "rate_limited" | "agent_paused" | "send_forbidden" | "group_superseded" | "unknown_action_run" | "vault_integrity_failed" | "vault_ref_changed" | "session_superseded" | "reply_credit_unknown" | "internal";
9
+ export type BridgeErrorCode = "unauthorized" | "forbidden_origin" | "not_found" | "invalid_request" | "invalid_json" | "body_too_large" | "channel_pending" | "rate_limited" | "agent_paused" | "send_forbidden" | "group_superseded" | "unknown_action_run" | "vault_integrity_failed" | "vault_ref_changed" | "session_superseded" | "reply_credit_unknown" | "path_outside_outbox" | "internal";
10
10
  export interface BridgeErrorSpec {
11
11
  /** HTTP status this code maps to (the WS binding ignores it). */
12
12
  http: number;