@agentvault/grok-bridge 0.4.23 → 0.4.25

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/bridge.d.ts CHANGED
@@ -9,7 +9,12 @@
9
9
  * Those are Claude-shaped; Grok's gate is the pre_tool_use hook and arrives with
10
10
  * the tools-on posture.
11
11
  */
12
+ /** `RoomSession` is declared ONCE in this package, by grok-session.ts. The Claude
13
+ * bridge declares its own in its bridge.ts; that declaration was NOT copied.
14
+ * Type-only, so this cannot create a runtime import cycle. */
15
+ import { type ToolSpanSink } from "@agentvault/agentvault";
12
16
  import type { RoomSession } from "./grok-session.js";
17
+ import { type TerminalVerdict } from "./service/self-uninstall.js";
13
18
  export interface RoomMessage {
14
19
  roomId: string;
15
20
  senderName: string;
@@ -88,6 +93,9 @@ export type BridgeTarget = {
88
93
  export interface ReplyChannel {
89
94
  sendToRoom(roomId: string, text: string): Promise<void>;
90
95
  send(text: string): Promise<void>;
96
+ /** SecureChannel's TelemetryReporter (device JWT, buffered). Optional so
97
+ * fixtures and a channel without telemetry keep working. */
98
+ readonly telemetry?: ToolSpanSink | null;
91
99
  /** #1418 — SecureChannel: run `fn` as `conversationId`'s turn, so an
92
100
  * untargeted send inside it reaches that conversation's person only. */
93
101
  runForConversation?<T>(conversationId: string | undefined, fn: () => Promise<T>, opts?: {
@@ -125,6 +133,7 @@ export declare class ActiveTarget {
125
133
  export interface LifecycleChannel {
126
134
  on(ev: "auth_failed", cb: (e: {
127
135
  reason: string;
136
+ deviceGone?: boolean;
128
137
  }) => void): unknown;
129
138
  on(ev: "session_replaced", cb: (e: {
130
139
  code?: number;
@@ -157,7 +166,7 @@ export declare function attachLifecycle(channel: LifecycleChannel, opts?: {
157
166
  * well would put the same rule in two files, and the two would eventually
158
167
  * disagree — which is how `session_replaced` (device still alive) would end
159
168
  * up removing a healthy install. */
160
- selfUninstall?: (reason: string, env: NodeJS.ProcessEnv) => boolean;
169
+ selfUninstall?: (verdict: TerminalVerdict, env: NodeJS.ProcessEnv) => boolean;
161
170
  }): void;
162
171
  /**
163
172
  * How a ROOM turn is announced to the model (#366 / #499 Facet A).