@securecoms/agent-bridge 0.25.4 → 0.26.1

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/dist/vault.d.ts CHANGED
@@ -6,6 +6,18 @@
6
6
  export declare class VaultIntegrityError extends Error {
7
7
  constructor(message: string, cause?: unknown);
8
8
  }
9
+ /** Which Files-link pin a pinned read refused on (review 2026-10-01 R4). */
10
+ export type VaultPin = "content_hash_server" | "ciphertext_digest" | "dek_commit";
11
+ /** A pinned read (`/v1/vault-read` with expected_*) refused because the node no
12
+ * longer holds the bytes or key that were shared: "This file changed in Files
13
+ * after it was shared. Not opened." A VaultIntegrityError, so every existing
14
+ * integrity handler still fails closed on it. */
15
+ export declare class VaultPinMismatchError extends VaultIntegrityError {
16
+ readonly pin: VaultPin;
17
+ constructor(pin: VaultPin);
18
+ }
19
+ /** The pin pair error text, shared with the HTTP boundary's refine (H1). */
20
+ export declare const VAULT_PINS_TOGETHER = "expected_content_hash and expected_dek_commit go together";
9
21
  export interface VaultWriteDeps {
10
22
  exporterKekForGeneration: (gen: number) => Uint8Array;
11
23
  currentGeneration: number;
@@ -45,10 +57,21 @@ export interface VaultReadDeps {
45
57
  }>;
46
58
  getBlob: (url: string) => Promise<Uint8Array>;
47
59
  }
60
+ /** Files-link pins for a read (review 2026-10-01 R4). Both are
61
+ * "blake2b:" + 64 hex, validated at the HTTP boundary. BOTH OR NEITHER
62
+ * (audit H1): a lone dekCommit fell back to the server's content_hash, so a
63
+ * member holding the KEK could re-encrypt new plaintext under the same DEK,
64
+ * recreate the node with the same wrap and a new hash, and be served it; a
65
+ * lone contentHash leaves the two-key swap open. */
66
+ export interface VaultReadExpectations {
67
+ contentHash: string;
68
+ dekCommit: string;
69
+ }
48
70
  export declare function vaultReadImpl(args: {
49
71
  enclaveId: string;
50
72
  nodeId: string;
51
73
  deps: VaultReadDeps;
74
+ expected?: VaultReadExpectations;
52
75
  }): Promise<Uint8Array>;
53
76
  export interface VaultListRawNode {
54
77
  node_id: string;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const BRIDGE_VERSION = "0.25.4";
1
+ export declare const BRIDGE_VERSION = "0.26.1";
@@ -0,0 +1,22 @@
1
+ export declare function needsRuntime(text: string): boolean;
2
+ /** Spoken while the full agent works. Persona-neutral; never carries [[DEFER]]. */
3
+ export declare const DEFER_ACKS: readonly string[];
4
+ /** Deterministic per turn (a redelivered turn re-speaks the same line). */
5
+ export declare function deferAck(messageId: string): string;
6
+ /**
7
+ * Per-agent voice fast-path mode (credential `voice_fast_path_mode`):
8
+ * - `full`: today's front desk — the fast LLM answers small talk, defers the
9
+ * rest (pre-check above + [[DEFER]]).
10
+ * - `ack_only`: NO fast LLM call. An instant canned ack is spoken and every
11
+ * turn goes to the agent's runtime (tools + memory). The call-start greeting
12
+ * is a template.
13
+ * - `off`: no fast path at all — runtime only, no ack.
14
+ */
15
+ export declare const FAST_PATH_MODES: readonly ["full", "ack_only", "off"];
16
+ export type FastPathMode = (typeof FAST_PATH_MODES)[number];
17
+ export declare function parseFastPathMode(raw: unknown): FastPathMode;
18
+ /** `ack_only`: spoken the instant a turn arrives, before the runtime answers. */
19
+ export declare const ACK_ONLY_ACKS: readonly string[];
20
+ export declare function ackOnlyAck(messageId: string): string;
21
+ /** `ack_only` call-start greeting: a template, no model call. */
22
+ export declare function ackOnlyGreeting(agentName: string | undefined, callerName: string | undefined): string;
@@ -15,6 +15,20 @@ export interface ChatMessage {
15
15
  * just facts — a defensive floor under whatever grows in the future.
16
16
  */
17
17
  export declare const MAX_MESSAGE_CHARS = 8000;
18
+ /**
19
+ * Fast-path prompt budget (perf, 2026-10-02). The fast model writes ONE short
20
+ * spoken line, so it needs only the last few exchanges; every extra input
21
+ * token is time on the voice critical path (transcript -> reply measured at
22
+ * ~3.0-3.2 s in prod, this LLM call included). Previously 30 turns / 4000
23
+ * recent chars / ~7800 facts chars.
24
+ * - FAST_PATH_MEMORY_TURNS: turns requested from the memory provider.
25
+ * - FAST_RECENT_CHARS_CAP: default `charCap` on the recent transcript (oldest
26
+ * turns dropped first, the newest always kept).
27
+ * - FAST_FACTS_CHARS_CAP: cap on the joined facts body.
28
+ */
29
+ export declare const FAST_PATH_MEMORY_TURNS = 10;
30
+ export declare const FAST_RECENT_CHARS_CAP = 1500;
31
+ export declare const FAST_FACTS_CHARS_CAP = 2000;
18
32
  export declare function buildFastMessages(args: {
19
33
  persona: VoicePersona;
20
34
  guidance: string;
@@ -1,4 +1,12 @@
1
1
  import type { VoiceSettings } from "./settings.js";
2
+ /**
3
+ * Owner report 2026-10-02 (voice calls never used tools): this model has no
4
+ * tools, no clock and only the last few turns, yet it answered "what time is
5
+ * it" / "what's the weather" itself instead of deferring. Applies under EVERY
6
+ * handoff dial — no dial can make this model know live data — and is
7
+ * compiled in (never interpolated with peer data).
8
+ */
9
+ export declare const NO_TOOLS_RULE: string;
2
10
  /**
3
11
  * `agentName` is the agent's identity display name (`ConnectIdentity.display_name`,
4
12
  * the one name shown in rosters and the Directory). Owner decision 2026-10-01
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securecoms/agent-bridge",
3
- "version": "0.25.4",
3
+ "version": "0.26.1",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.5.0"