@letta-ai/letta-code 0.27.13 → 0.27.15

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.
@@ -333,15 +333,19 @@ class AppServerClient {
333
333
  return;
334
334
  }
335
335
  if (message.type === "update_loop_status") {
336
+ const hadTurnEvidenceBeforeLoopStatus = observedTurnEvidence || observedRequiresApprovalStop;
337
+ if (!hadTurnEvidenceBeforeLoopStatus && (isWaitingOnApprovalLoopStatus(message) || options.allowLoopStatusFallback === true && isWaitingLoopStatus(message))) {
338
+ return;
339
+ }
336
340
  for (const runId of message.loop_status.active_run_ids) {
337
341
  observedTurnEvidence = true;
338
342
  runIds.add(runId);
339
343
  }
340
- if ((observedTurnEvidence || observedRequiresApprovalStop) && isWaitingOnApprovalLoopStatus(message)) {
344
+ if (hadTurnEvidenceBeforeLoopStatus && isWaitingOnApprovalLoopStatus(message)) {
341
345
  finish("loop_status_waiting_on_approval", message, "requires_approval");
342
346
  return;
343
347
  }
344
- if (options.allowLoopStatusFallback === true && observedTurnEvidence && isWaitingLoopStatus(message)) {
348
+ if (options.allowLoopStatusFallback === true && hadTurnEvidenceBeforeLoopStatus && isWaitingLoopStatus(message)) {
345
349
  finish("loop_status_waiting_fallback", message, null);
346
350
  }
347
351
  }
@@ -408,4 +412,4 @@ export {
408
412
  AppServerClient
409
413
  };
410
414
 
411
- //# debugId=5B36C9DEF3E6B55264756E2164756E21
415
+ //# debugId=2626B1D6D5898D3F64756E2164756E21
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/app-server-client.ts"],
4
4
  "sourcesContent": [
5
- "import type {\n AbortMessageCommand,\n AbortMessageResponseMessage,\n ExternalToolCallRequestMessage,\n ExternalToolCallResult,\n InputCommand,\n LoopStatusUpdateMessage,\n RuntimeScope,\n RuntimeStartCommand,\n RuntimeStartResponseMessage,\n StreamDeltaMessage,\n SyncCommand,\n SyncResponseMessage,\n WsProtocolCommand,\n WsProtocolMessage,\n} from \"./types/app-server-protocol\";\n\nexport type AppServerChannel = \"control\" | \"stream\";\n\n/**\n * Receives every parsed protocol frame from both app-server websocket channels.\n * Treat this as the primary event stream: app-server may emit replay or turn\n * updates on the same channel that sent the triggering command, not only on the\n * stream channel. The channel argument is diagnostic/routing context.\n */\nexport type AppServerMessageHandler = (\n message: WsProtocolMessage,\n channel: AppServerChannel,\n) => void;\n\n/** Called synchronously before a protocol command is written to the control socket. */\nexport type AppServerSendHandler = (command: WsProtocolCommand) => void;\n\nexport type AppServerExternalToolCallHandler = (\n request: ExternalToolCallRequestMessage,\n) => Promise<ExternalToolCallResult> | ExternalToolCallResult;\n\nexport interface AppServerSocketLike {\n readyState: number;\n send(data: string): void;\n close(): void;\n addEventListener?(type: string, listener: (event: unknown) => void): void;\n removeEventListener?(type: string, listener: (event: unknown) => void): void;\n on?(type: string, listener: (event: unknown) => void): void;\n off?(type: string, listener: (event: unknown) => void): void;\n once?(type: string, listener: (event: unknown) => void): void;\n}\n\nexport interface AppServerSocketOptions {\n headers?: Record<string, string>;\n}\n\nexport type AppServerSocketConstructor = new (\n url: string,\n options?: AppServerSocketOptions,\n) => AppServerSocketLike;\n\nexport interface AppServerClientOptions {\n /** Base app-server URL, e.g. ws://127.0.0.1:4500 or http://127.0.0.1:4500. */\n url: string;\n /** Optional capability token sent as Authorization: Bearer <token>; requires a WebSocket implementation with header support. */\n authToken?: string;\n /** Optional WebSocket constructor for Node/tests. Browsers use globalThis.WebSocket. */\n WebSocket?: AppServerSocketConstructor;\n /** Default timeout for request_id-correlated control requests. */\n requestTimeoutMs?: number;\n}\n\nexport interface AppServerRequestOptions<TMessage extends WsProtocolMessage> {\n timeoutMs?: number;\n predicate?: (message: WsProtocolMessage) => message is TMessage;\n}\n\nexport type AppServerRequestCommand = Extract<\n WsProtocolCommand,\n { request_id?: string }\n>;\n\nexport type AppServerRequestCommandWithId = AppServerRequestCommand & {\n request_id: string;\n};\n\nexport type AppServerRequestBody = Record<string, unknown> & {\n request_id?: string;\n};\n\ntype PendingRequest = {\n resolve: (message: WsProtocolMessage) => void;\n reject: (error: Error) => void;\n predicate?: (message: WsProtocolMessage) => boolean;\n timeout: ReturnType<typeof setTimeout>;\n};\n\nexport type AppServerTurnCompletionSource =\n | \"stop_reason\"\n | \"loop_status_waiting_on_approval\"\n | \"loop_status_waiting_fallback\";\n\nexport interface AppServerTurnResult {\n runtime: RuntimeScope;\n stopReason: string | null;\n runIds: string[];\n clientMessageIds: string[];\n completedBy: AppServerTurnCompletionSource;\n terminalMessage: WsProtocolMessage;\n}\n\nexport interface AppServerRunTurnOptions {\n timeoutMs?: number;\n /**\n * Prefer explicit stream terminal events. This fallback is only used after\n * the client has seen stream/run evidence for this runtime, never from idle\n * loop status alone.\n */\n allowLoopStatusFallback?: boolean;\n}\n\nconst DEFAULT_REQUEST_TIMEOUT_MS = 30_000;\nconst WEBSOCKET_OPEN_STATE = 1;\n\nfunction getGlobalWebSocket(): AppServerSocketConstructor | undefined {\n return (globalThis as { WebSocket?: AppServerSocketConstructor }).WebSocket;\n}\n\nfunction normalizeBaseUrl(url: string): URL {\n const parsed = new URL(url);\n if (parsed.protocol === \"http:\") parsed.protocol = \"ws:\";\n if (parsed.protocol === \"https:\") parsed.protocol = \"wss:\";\n if (parsed.protocol !== \"ws:\" && parsed.protocol !== \"wss:\") {\n throw new Error(`Unsupported app-server URL protocol: ${parsed.protocol}`);\n }\n if (!parsed.pathname || parsed.pathname === \"/\") {\n parsed.pathname = \"/ws\";\n }\n return parsed;\n}\n\nexport function resolveAppServerChannelUrl(\n url: string,\n channel: AppServerChannel,\n): string {\n const parsed = normalizeBaseUrl(url);\n parsed.searchParams.set(\"channel\", channel);\n return parsed.toString();\n}\n\nfunction attachSocketListener(\n socket: AppServerSocketLike,\n type: string,\n listener: (event: unknown) => void,\n): () => void {\n if (socket.addEventListener && socket.removeEventListener) {\n socket.addEventListener(type, listener);\n return () => socket.removeEventListener?.(type, listener);\n }\n\n if (socket.on) {\n socket.on(type, listener);\n return () => socket.off?.(type, listener);\n }\n\n throw new Error(\"WebSocket implementation does not support event listeners\");\n}\n\nfunction onceSocketEvent(\n socket: AppServerSocketLike,\n type: string,\n listener: (event: unknown) => void,\n): () => void {\n if (socket.once) {\n socket.once(type, listener);\n return () => socket.off?.(type, listener);\n }\n\n let detach = () => {};\n detach = attachSocketListener(socket, type, (event) => {\n detach();\n listener(event);\n });\n return detach;\n}\n\nfunction waitForSocketOpen(socket: AppServerSocketLike): Promise<void> {\n if (socket.readyState === WEBSOCKET_OPEN_STATE) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n let detachOpen = () => {};\n let detachError = () => {};\n const cleanup = () => {\n detachOpen();\n detachError();\n };\n detachOpen = onceSocketEvent(socket, \"open\", () => {\n cleanup();\n resolve();\n });\n detachError = onceSocketEvent(socket, \"error\", (event) => {\n cleanup();\n reject(\n new Error(`App-server WebSocket failed to open: ${String(event)}`),\n );\n });\n });\n}\n\nfunction rawEventData(event: unknown): unknown {\n if (event && typeof event === \"object\" && \"data\" in event) {\n return (event as { data: unknown }).data;\n }\n return event;\n}\n\nfunction messageDataToString(data: unknown): string {\n const raw = rawEventData(data);\n if (typeof raw === \"string\") return raw;\n if (raw instanceof ArrayBuffer) {\n return new TextDecoder().decode(raw);\n }\n if (raw instanceof Uint8Array) {\n return new TextDecoder().decode(raw);\n }\n if (ArrayBuffer.isView(raw)) {\n return new TextDecoder().decode(\n new Uint8Array(raw.buffer as ArrayBuffer, raw.byteOffset, raw.byteLength),\n );\n }\n return String(raw);\n}\n\nfunction parseProtocolMessage(event: unknown): WsProtocolMessage {\n return JSON.parse(messageDataToString(event)) as WsProtocolMessage;\n}\n\nfunction appServerSocketOptions(\n authToken: string | undefined,\n): AppServerSocketOptions | undefined {\n if (authToken === undefined) {\n return undefined;\n }\n const token = authToken.trim();\n if (!token) {\n throw new Error(\"app-server auth token must not be empty\");\n }\n return { headers: { Authorization: `Bearer ${token}` } };\n}\n\nfunction sameRuntime(a: RuntimeScope | undefined, b: RuntimeScope): boolean {\n return a?.agent_id === b.agent_id && a?.conversation_id === b.conversation_id;\n}\n\nfunction isWaitingLoopStatus(message: LoopStatusUpdateMessage): boolean {\n return message.loop_status.status === \"WAITING_ON_INPUT\";\n}\n\nfunction isWaitingOnApprovalLoopStatus(\n message: LoopStatusUpdateMessage,\n): boolean {\n return message.loop_status.status === \"WAITING_ON_APPROVAL\";\n}\n\nfunction streamDeltaRunId(message: StreamDeltaMessage): string | null {\n const runId = (message.delta as { run_id?: unknown }).run_id;\n return typeof runId === \"string\" ? runId : null;\n}\n\nfunction streamDeltaMessageType(message: StreamDeltaMessage): string | null {\n const messageType = (message.delta as { message_type?: unknown })\n .message_type;\n return typeof messageType === \"string\" ? messageType : null;\n}\n\nfunction streamDeltaStopReason(message: StreamDeltaMessage): string | null {\n const stopReason = (message.delta as { stop_reason?: unknown }).stop_reason;\n return typeof stopReason === \"string\" ? stopReason : null;\n}\n\nfunction streamDeltaErrorMessage(message: StreamDeltaMessage): string {\n const delta = message.delta as {\n message?: unknown;\n api_error?: { message?: unknown; detail?: unknown };\n };\n const apiMessage = delta.api_error?.message ?? delta.api_error?.detail;\n if (typeof apiMessage === \"string\" && apiMessage.length > 0)\n return apiMessage;\n if (typeof delta.message === \"string\" && delta.message.length > 0)\n return delta.message;\n return \"App-server turn failed\";\n}\n\nexport class AppServerClient {\n readonly control: AppServerSocketLike;\n readonly stream: AppServerSocketLike;\n\n private readonly requestTimeoutMs: number;\n private readonly pending = new Map<string, PendingRequest>();\n private readonly messageHandlers = new Set<AppServerMessageHandler>();\n private readonly sendHandlers = new Set<AppServerSendHandler>();\n private readonly activeTurnRuntimes = new Set<string>();\n private nextRequestNumber = 0;\n\n constructor(options: AppServerClientOptions) {\n const WebSocket = options.WebSocket ?? getGlobalWebSocket();\n if (!WebSocket) {\n throw new Error(\"No WebSocket implementation available\");\n }\n\n this.requestTimeoutMs =\n options.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;\n const socketOptions = appServerSocketOptions(options.authToken);\n this.control = new WebSocket(\n resolveAppServerChannelUrl(options.url, \"control\"),\n socketOptions,\n );\n this.stream = new WebSocket(\n resolveAppServerChannelUrl(options.url, \"stream\"),\n socketOptions,\n );\n\n attachSocketListener(this.control, \"message\", (event) => {\n this.handleMessage(event, \"control\");\n });\n attachSocketListener(this.stream, \"message\", (event) => {\n this.handleMessage(event, \"stream\");\n });\n const rejectPending = () =>\n this.rejectAllPending(\"App-server socket closed\");\n attachSocketListener(this.control, \"close\", rejectPending);\n attachSocketListener(this.stream, \"close\", rejectPending);\n }\n\n async connect(): Promise<this> {\n await Promise.all([\n waitForSocketOpen(this.control),\n waitForSocketOpen(this.stream),\n ]);\n return this;\n }\n\n close(): void {\n this.rejectAllPending(\"App-server client closed\");\n this.control.close();\n this.stream.close();\n }\n\n onMessage(handler: AppServerMessageHandler): () => void {\n this.messageHandlers.add(handler);\n return () => this.messageHandlers.delete(handler);\n }\n\n onSend(handler: AppServerSendHandler): () => void {\n this.sendHandlers.add(handler);\n return () => this.sendHandlers.delete(handler);\n }\n\n nextRequestId(prefix = \"req\"): string {\n this.nextRequestNumber += 1;\n return `${prefix}-${this.nextRequestNumber}`;\n }\n\n send(command: WsProtocolCommand): void {\n for (const handler of this.sendHandlers) {\n handler(command);\n }\n this.control.send(JSON.stringify(command));\n }\n\n request<TMessage extends WsProtocolMessage = WsProtocolMessage>(\n command: AppServerRequestCommandWithId,\n options?: AppServerRequestOptions<TMessage>,\n ): Promise<TMessage>;\n\n request<\n TType extends AppServerRequestCommand[\"type\"],\n TMessage extends WsProtocolMessage = WsProtocolMessage,\n >(\n type: TType,\n body?: AppServerRequestBody,\n options?: AppServerRequestOptions<TMessage>,\n ): Promise<TMessage>;\n\n request<TMessage extends WsProtocolMessage = WsProtocolMessage>(\n commandOrType:\n | AppServerRequestCommandWithId\n | AppServerRequestCommand[\"type\"],\n bodyOrOptions:\n | AppServerRequestBody\n | AppServerRequestOptions<TMessage> = {},\n maybeOptions: AppServerRequestOptions<TMessage> = {},\n ): Promise<TMessage> {\n const isTypeRequest = typeof commandOrType === \"string\";\n const command = isTypeRequest\n ? ({\n type: commandOrType,\n request_id:\n (bodyOrOptions as { request_id?: string }).request_id ??\n this.nextRequestId(commandOrType),\n ...(bodyOrOptions as object),\n } as AppServerRequestCommandWithId)\n : commandOrType;\n const options = isTypeRequest\n ? maybeOptions\n : (bodyOrOptions as AppServerRequestOptions<TMessage>);\n const timeoutMs = options.timeoutMs ?? this.requestTimeoutMs;\n\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n this.pending.delete(command.request_id);\n reject(new Error(`Timed out waiting for ${command.request_id}`));\n }, timeoutMs);\n\n this.pending.set(command.request_id, {\n resolve: (message) => resolve(message as TMessage),\n reject,\n predicate: options.predicate,\n timeout,\n });\n\n try {\n this.send(command);\n } catch (error) {\n clearTimeout(timeout);\n this.pending.delete(command.request_id);\n reject(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n runtimeStart(\n command: Omit<RuntimeStartCommand, \"type\" | \"request_id\"> & {\n request_id?: string;\n },\n options: Omit<\n AppServerRequestOptions<RuntimeStartResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<RuntimeStartResponseMessage> {\n return this.request(\n {\n type: \"runtime_start\",\n request_id: command.request_id ?? this.nextRequestId(\"runtime-start\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is RuntimeStartResponseMessage =>\n message.type === \"runtime_start_response\",\n },\n );\n }\n\n sync(\n command: Omit<SyncCommand, \"type\" | \"request_id\"> & { request_id?: string },\n options: Omit<\n AppServerRequestOptions<SyncResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<SyncResponseMessage> {\n return this.request(\n {\n type: \"sync\",\n request_id: command.request_id ?? this.nextRequestId(\"sync\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is SyncResponseMessage =>\n message.type === \"sync_response\",\n },\n );\n }\n\n abort(\n command: Omit<AbortMessageCommand, \"type\" | \"request_id\"> & {\n request_id?: string;\n },\n options: Omit<\n AppServerRequestOptions<AbortMessageResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<AbortMessageResponseMessage> {\n return this.request(\n {\n type: \"abort_message\",\n request_id: command.request_id ?? this.nextRequestId(\"abort\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is AbortMessageResponseMessage =>\n message.type === \"abort_message_response\",\n },\n );\n }\n\n onExternalToolCall(handler: AppServerExternalToolCallHandler): () => void {\n return this.onMessage((message, channel) => {\n if (\n channel !== \"control\" ||\n message.type !== \"external_tool_call_request\"\n ) {\n return;\n }\n\n void Promise.resolve(handler(message))\n .then((result) => {\n this.send({\n type: \"external_tool_call_response\",\n request_id: message.request_id,\n result,\n });\n })\n .catch((error) => {\n this.send({\n type: \"external_tool_call_response\",\n request_id: message.request_id,\n error: error instanceof Error ? error.message : String(error),\n });\n });\n });\n }\n\n input(command: Omit<InputCommand, \"type\">): void {\n this.send({ type: \"input\", ...command });\n }\n\n runTurn(\n command: Omit<InputCommand, \"type\">,\n options: AppServerRunTurnOptions = {},\n ): Promise<AppServerTurnResult> {\n const runtimeKey = `${command.runtime.agent_id}/${command.runtime.conversation_id}`;\n if (this.activeTurnRuntimes.has(runtimeKey)) {\n return Promise.reject(\n new Error(`A turn is already in flight for ${runtimeKey}`),\n );\n }\n this.activeTurnRuntimes.add(runtimeKey);\n const timeoutMs = options.timeoutMs ?? this.requestTimeoutMs;\n const commandWithIds = this.withClientMessageIds(command);\n const runIds = new Set<string>();\n let observedTurnEvidence = false;\n let observedRequiresApprovalStop = false;\n\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n cleanup();\n reject(\n new Error(\n `Timed out waiting for app-server turn on ${command.runtime.agent_id}/${command.runtime.conversation_id}`,\n ),\n );\n }, timeoutMs);\n\n const cleanup = () => {\n clearTimeout(timeout);\n this.activeTurnRuntimes.delete(runtimeKey);\n offMessage();\n };\n\n const finish = (\n completedBy: AppServerTurnCompletionSource,\n terminalMessage: WsProtocolMessage,\n stopReason: string | null,\n ) => {\n cleanup();\n resolve({\n runtime: command.runtime,\n stopReason,\n runIds: [...runIds],\n clientMessageIds: commandWithIds.clientMessageIds,\n completedBy,\n terminalMessage,\n });\n };\n\n const fail = (error: Error) => {\n cleanup();\n reject(error);\n };\n\n const offMessage = this.onMessage((message) => {\n if (\n !sameRuntime(\n (message as { runtime?: RuntimeScope }).runtime,\n command.runtime,\n )\n ) {\n return;\n }\n\n if (message.type === \"stream_delta\") {\n observedTurnEvidence = true;\n const runId = streamDeltaRunId(message);\n if (runId) runIds.add(runId);\n\n const messageType = streamDeltaMessageType(message);\n if (messageType === \"loop_error\" || messageType === \"error_message\") {\n fail(new Error(streamDeltaErrorMessage(message)));\n return;\n }\n if (messageType === \"stop_reason\") {\n const stopReason = streamDeltaStopReason(message);\n if (stopReason === \"requires_approval\") {\n observedRequiresApprovalStop = true;\n return;\n }\n finish(\"stop_reason\", message, stopReason);\n }\n return;\n }\n\n if (message.type === \"update_loop_status\") {\n for (const runId of message.loop_status.active_run_ids) {\n observedTurnEvidence = true;\n runIds.add(runId);\n }\n if (\n (observedTurnEvidence || observedRequiresApprovalStop) &&\n isWaitingOnApprovalLoopStatus(message)\n ) {\n finish(\n \"loop_status_waiting_on_approval\",\n message,\n \"requires_approval\",\n );\n return;\n }\n if (\n options.allowLoopStatusFallback === true &&\n observedTurnEvidence &&\n isWaitingLoopStatus(message)\n ) {\n finish(\"loop_status_waiting_fallback\", message, null);\n }\n }\n });\n\n try {\n this.input(commandWithIds.command);\n } catch (error) {\n fail(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n private withClientMessageIds(command: Omit<InputCommand, \"type\">): {\n command: Omit<InputCommand, \"type\">;\n clientMessageIds: string[];\n } {\n if (command.payload.kind !== \"create_message\") {\n return { command, clientMessageIds: [] };\n }\n\n const clientMessageIds: string[] = [];\n const messages = command.payload.messages.map((message) => {\n if (message.role !== \"user\") return message;\n const existing = (message as { client_message_id?: unknown })\n .client_message_id;\n const clientMessageId =\n typeof existing === \"string\" && existing.length > 0\n ? existing\n : this.nextRequestId(\"client-message\");\n clientMessageIds.push(clientMessageId);\n return { ...message, client_message_id: clientMessageId };\n });\n\n return {\n command: {\n ...command,\n payload: { ...command.payload, messages },\n },\n clientMessageIds,\n };\n }\n\n private handleMessage(event: unknown, channel: AppServerChannel): void {\n const message = parseProtocolMessage(event);\n\n for (const handler of this.messageHandlers) {\n handler(message, channel);\n }\n\n const requestId =\n message && typeof message === \"object\" && \"request_id\" in message\n ? (message as { request_id?: unknown }).request_id\n : undefined;\n if (channel !== \"control\" || typeof requestId !== \"string\") {\n return;\n }\n\n const pending = this.pending.get(requestId);\n if (!pending || (pending.predicate && !pending.predicate(message))) {\n return;\n }\n\n clearTimeout(pending.timeout);\n this.pending.delete(requestId);\n pending.resolve(message);\n }\n\n private rejectAllPending(reason: string): void {\n for (const [requestId, pending] of this.pending) {\n clearTimeout(pending.timeout);\n this.pending.delete(requestId);\n pending.reject(new Error(reason));\n }\n }\n}\n\nexport function createAppServerClient(\n options: AppServerClientOptions,\n): AppServerClient {\n return new AppServerClient(options);\n}\n"
5
+ "import type {\n AbortMessageCommand,\n AbortMessageResponseMessage,\n ExternalToolCallRequestMessage,\n ExternalToolCallResult,\n InputCommand,\n LoopStatusUpdateMessage,\n RuntimeScope,\n RuntimeStartCommand,\n RuntimeStartResponseMessage,\n StreamDeltaMessage,\n SyncCommand,\n SyncResponseMessage,\n WsProtocolCommand,\n WsProtocolMessage,\n} from \"./types/app-server-protocol\";\n\nexport type AppServerChannel = \"control\" | \"stream\";\n\n/**\n * Receives every parsed protocol frame from both app-server websocket channels.\n * Treat this as the primary event stream: app-server may emit replay or turn\n * updates on the same channel that sent the triggering command, not only on the\n * stream channel. The channel argument is diagnostic/routing context.\n */\nexport type AppServerMessageHandler = (\n message: WsProtocolMessage,\n channel: AppServerChannel,\n) => void;\n\n/** Called synchronously before a protocol command is written to the control socket. */\nexport type AppServerSendHandler = (command: WsProtocolCommand) => void;\n\nexport type AppServerExternalToolCallHandler = (\n request: ExternalToolCallRequestMessage,\n) => Promise<ExternalToolCallResult> | ExternalToolCallResult;\n\nexport interface AppServerSocketLike {\n readyState: number;\n send(data: string): void;\n close(): void;\n addEventListener?(type: string, listener: (event: unknown) => void): void;\n removeEventListener?(type: string, listener: (event: unknown) => void): void;\n on?(type: string, listener: (event: unknown) => void): void;\n off?(type: string, listener: (event: unknown) => void): void;\n once?(type: string, listener: (event: unknown) => void): void;\n}\n\nexport interface AppServerSocketOptions {\n headers?: Record<string, string>;\n}\n\nexport type AppServerSocketConstructor = new (\n url: string,\n options?: AppServerSocketOptions,\n) => AppServerSocketLike;\n\nexport interface AppServerClientOptions {\n /** Base app-server URL, e.g. ws://127.0.0.1:4500 or http://127.0.0.1:4500. */\n url: string;\n /** Optional capability token sent as Authorization: Bearer <token>; requires a WebSocket implementation with header support. */\n authToken?: string;\n /** Optional WebSocket constructor for Node/tests. Browsers use globalThis.WebSocket. */\n WebSocket?: AppServerSocketConstructor;\n /** Default timeout for request_id-correlated control requests. */\n requestTimeoutMs?: number;\n}\n\nexport interface AppServerRequestOptions<TMessage extends WsProtocolMessage> {\n timeoutMs?: number;\n predicate?: (message: WsProtocolMessage) => message is TMessage;\n}\n\nexport type AppServerRequestCommand = Extract<\n WsProtocolCommand,\n { request_id?: string }\n>;\n\nexport type AppServerRequestCommandWithId = AppServerRequestCommand & {\n request_id: string;\n};\n\nexport type AppServerRequestBody = Record<string, unknown> & {\n request_id?: string;\n};\n\ntype PendingRequest = {\n resolve: (message: WsProtocolMessage) => void;\n reject: (error: Error) => void;\n predicate?: (message: WsProtocolMessage) => boolean;\n timeout: ReturnType<typeof setTimeout>;\n};\n\nexport type AppServerTurnCompletionSource =\n | \"stop_reason\"\n | \"loop_status_waiting_on_approval\"\n | \"loop_status_waiting_fallback\";\n\nexport interface AppServerTurnResult {\n runtime: RuntimeScope;\n stopReason: string | null;\n runIds: string[];\n clientMessageIds: string[];\n completedBy: AppServerTurnCompletionSource;\n terminalMessage: WsProtocolMessage;\n}\n\nexport interface AppServerRunTurnOptions {\n timeoutMs?: number;\n /**\n * Prefer explicit stream terminal events. This fallback is only used after\n * the client has seen stream/run evidence for this runtime, never from idle\n * loop status alone.\n */\n allowLoopStatusFallback?: boolean;\n}\n\nconst DEFAULT_REQUEST_TIMEOUT_MS = 30_000;\nconst WEBSOCKET_OPEN_STATE = 1;\n\nfunction getGlobalWebSocket(): AppServerSocketConstructor | undefined {\n return (globalThis as { WebSocket?: AppServerSocketConstructor }).WebSocket;\n}\n\nfunction normalizeBaseUrl(url: string): URL {\n const parsed = new URL(url);\n if (parsed.protocol === \"http:\") parsed.protocol = \"ws:\";\n if (parsed.protocol === \"https:\") parsed.protocol = \"wss:\";\n if (parsed.protocol !== \"ws:\" && parsed.protocol !== \"wss:\") {\n throw new Error(`Unsupported app-server URL protocol: ${parsed.protocol}`);\n }\n if (!parsed.pathname || parsed.pathname === \"/\") {\n parsed.pathname = \"/ws\";\n }\n return parsed;\n}\n\nexport function resolveAppServerChannelUrl(\n url: string,\n channel: AppServerChannel,\n): string {\n const parsed = normalizeBaseUrl(url);\n parsed.searchParams.set(\"channel\", channel);\n return parsed.toString();\n}\n\nfunction attachSocketListener(\n socket: AppServerSocketLike,\n type: string,\n listener: (event: unknown) => void,\n): () => void {\n if (socket.addEventListener && socket.removeEventListener) {\n socket.addEventListener(type, listener);\n return () => socket.removeEventListener?.(type, listener);\n }\n\n if (socket.on) {\n socket.on(type, listener);\n return () => socket.off?.(type, listener);\n }\n\n throw new Error(\"WebSocket implementation does not support event listeners\");\n}\n\nfunction onceSocketEvent(\n socket: AppServerSocketLike,\n type: string,\n listener: (event: unknown) => void,\n): () => void {\n if (socket.once) {\n socket.once(type, listener);\n return () => socket.off?.(type, listener);\n }\n\n let detach = () => {};\n detach = attachSocketListener(socket, type, (event) => {\n detach();\n listener(event);\n });\n return detach;\n}\n\nfunction waitForSocketOpen(socket: AppServerSocketLike): Promise<void> {\n if (socket.readyState === WEBSOCKET_OPEN_STATE) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n let detachOpen = () => {};\n let detachError = () => {};\n const cleanup = () => {\n detachOpen();\n detachError();\n };\n detachOpen = onceSocketEvent(socket, \"open\", () => {\n cleanup();\n resolve();\n });\n detachError = onceSocketEvent(socket, \"error\", (event) => {\n cleanup();\n reject(\n new Error(`App-server WebSocket failed to open: ${String(event)}`),\n );\n });\n });\n}\n\nfunction rawEventData(event: unknown): unknown {\n if (event && typeof event === \"object\" && \"data\" in event) {\n return (event as { data: unknown }).data;\n }\n return event;\n}\n\nfunction messageDataToString(data: unknown): string {\n const raw = rawEventData(data);\n if (typeof raw === \"string\") return raw;\n if (raw instanceof ArrayBuffer) {\n return new TextDecoder().decode(raw);\n }\n if (raw instanceof Uint8Array) {\n return new TextDecoder().decode(raw);\n }\n if (ArrayBuffer.isView(raw)) {\n return new TextDecoder().decode(\n new Uint8Array(raw.buffer as ArrayBuffer, raw.byteOffset, raw.byteLength),\n );\n }\n return String(raw);\n}\n\nfunction parseProtocolMessage(event: unknown): WsProtocolMessage {\n return JSON.parse(messageDataToString(event)) as WsProtocolMessage;\n}\n\nfunction appServerSocketOptions(\n authToken: string | undefined,\n): AppServerSocketOptions | undefined {\n if (authToken === undefined) {\n return undefined;\n }\n const token = authToken.trim();\n if (!token) {\n throw new Error(\"app-server auth token must not be empty\");\n }\n return { headers: { Authorization: `Bearer ${token}` } };\n}\n\nfunction sameRuntime(a: RuntimeScope | undefined, b: RuntimeScope): boolean {\n return a?.agent_id === b.agent_id && a?.conversation_id === b.conversation_id;\n}\n\nfunction isWaitingLoopStatus(message: LoopStatusUpdateMessage): boolean {\n return message.loop_status.status === \"WAITING_ON_INPUT\";\n}\n\nfunction isWaitingOnApprovalLoopStatus(\n message: LoopStatusUpdateMessage,\n): boolean {\n return message.loop_status.status === \"WAITING_ON_APPROVAL\";\n}\n\nfunction streamDeltaRunId(message: StreamDeltaMessage): string | null {\n const runId = (message.delta as { run_id?: unknown }).run_id;\n return typeof runId === \"string\" ? runId : null;\n}\n\nfunction streamDeltaMessageType(message: StreamDeltaMessage): string | null {\n const messageType = (message.delta as { message_type?: unknown })\n .message_type;\n return typeof messageType === \"string\" ? messageType : null;\n}\n\nfunction streamDeltaStopReason(message: StreamDeltaMessage): string | null {\n const stopReason = (message.delta as { stop_reason?: unknown }).stop_reason;\n return typeof stopReason === \"string\" ? stopReason : null;\n}\n\nfunction streamDeltaErrorMessage(message: StreamDeltaMessage): string {\n const delta = message.delta as {\n message?: unknown;\n api_error?: { message?: unknown; detail?: unknown };\n };\n const apiMessage = delta.api_error?.message ?? delta.api_error?.detail;\n if (typeof apiMessage === \"string\" && apiMessage.length > 0)\n return apiMessage;\n if (typeof delta.message === \"string\" && delta.message.length > 0)\n return delta.message;\n return \"App-server turn failed\";\n}\n\nexport class AppServerClient {\n readonly control: AppServerSocketLike;\n readonly stream: AppServerSocketLike;\n\n private readonly requestTimeoutMs: number;\n private readonly pending = new Map<string, PendingRequest>();\n private readonly messageHandlers = new Set<AppServerMessageHandler>();\n private readonly sendHandlers = new Set<AppServerSendHandler>();\n private readonly activeTurnRuntimes = new Set<string>();\n private nextRequestNumber = 0;\n\n constructor(options: AppServerClientOptions) {\n const WebSocket = options.WebSocket ?? getGlobalWebSocket();\n if (!WebSocket) {\n throw new Error(\"No WebSocket implementation available\");\n }\n\n this.requestTimeoutMs =\n options.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;\n const socketOptions = appServerSocketOptions(options.authToken);\n this.control = new WebSocket(\n resolveAppServerChannelUrl(options.url, \"control\"),\n socketOptions,\n );\n this.stream = new WebSocket(\n resolveAppServerChannelUrl(options.url, \"stream\"),\n socketOptions,\n );\n\n attachSocketListener(this.control, \"message\", (event) => {\n this.handleMessage(event, \"control\");\n });\n attachSocketListener(this.stream, \"message\", (event) => {\n this.handleMessage(event, \"stream\");\n });\n const rejectPending = () =>\n this.rejectAllPending(\"App-server socket closed\");\n attachSocketListener(this.control, \"close\", rejectPending);\n attachSocketListener(this.stream, \"close\", rejectPending);\n }\n\n async connect(): Promise<this> {\n await Promise.all([\n waitForSocketOpen(this.control),\n waitForSocketOpen(this.stream),\n ]);\n return this;\n }\n\n close(): void {\n this.rejectAllPending(\"App-server client closed\");\n this.control.close();\n this.stream.close();\n }\n\n onMessage(handler: AppServerMessageHandler): () => void {\n this.messageHandlers.add(handler);\n return () => this.messageHandlers.delete(handler);\n }\n\n onSend(handler: AppServerSendHandler): () => void {\n this.sendHandlers.add(handler);\n return () => this.sendHandlers.delete(handler);\n }\n\n nextRequestId(prefix = \"req\"): string {\n this.nextRequestNumber += 1;\n return `${prefix}-${this.nextRequestNumber}`;\n }\n\n send(command: WsProtocolCommand): void {\n for (const handler of this.sendHandlers) {\n handler(command);\n }\n this.control.send(JSON.stringify(command));\n }\n\n request<TMessage extends WsProtocolMessage = WsProtocolMessage>(\n command: AppServerRequestCommandWithId,\n options?: AppServerRequestOptions<TMessage>,\n ): Promise<TMessage>;\n\n request<\n TType extends AppServerRequestCommand[\"type\"],\n TMessage extends WsProtocolMessage = WsProtocolMessage,\n >(\n type: TType,\n body?: AppServerRequestBody,\n options?: AppServerRequestOptions<TMessage>,\n ): Promise<TMessage>;\n\n request<TMessage extends WsProtocolMessage = WsProtocolMessage>(\n commandOrType:\n | AppServerRequestCommandWithId\n | AppServerRequestCommand[\"type\"],\n bodyOrOptions:\n | AppServerRequestBody\n | AppServerRequestOptions<TMessage> = {},\n maybeOptions: AppServerRequestOptions<TMessage> = {},\n ): Promise<TMessage> {\n const isTypeRequest = typeof commandOrType === \"string\";\n const command = isTypeRequest\n ? ({\n type: commandOrType,\n request_id:\n (bodyOrOptions as { request_id?: string }).request_id ??\n this.nextRequestId(commandOrType),\n ...(bodyOrOptions as object),\n } as AppServerRequestCommandWithId)\n : commandOrType;\n const options = isTypeRequest\n ? maybeOptions\n : (bodyOrOptions as AppServerRequestOptions<TMessage>);\n const timeoutMs = options.timeoutMs ?? this.requestTimeoutMs;\n\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n this.pending.delete(command.request_id);\n reject(new Error(`Timed out waiting for ${command.request_id}`));\n }, timeoutMs);\n\n this.pending.set(command.request_id, {\n resolve: (message) => resolve(message as TMessage),\n reject,\n predicate: options.predicate,\n timeout,\n });\n\n try {\n this.send(command);\n } catch (error) {\n clearTimeout(timeout);\n this.pending.delete(command.request_id);\n reject(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n runtimeStart(\n command: Omit<RuntimeStartCommand, \"type\" | \"request_id\"> & {\n request_id?: string;\n },\n options: Omit<\n AppServerRequestOptions<RuntimeStartResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<RuntimeStartResponseMessage> {\n return this.request(\n {\n type: \"runtime_start\",\n request_id: command.request_id ?? this.nextRequestId(\"runtime-start\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is RuntimeStartResponseMessage =>\n message.type === \"runtime_start_response\",\n },\n );\n }\n\n sync(\n command: Omit<SyncCommand, \"type\" | \"request_id\"> & { request_id?: string },\n options: Omit<\n AppServerRequestOptions<SyncResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<SyncResponseMessage> {\n return this.request(\n {\n type: \"sync\",\n request_id: command.request_id ?? this.nextRequestId(\"sync\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is SyncResponseMessage =>\n message.type === \"sync_response\",\n },\n );\n }\n\n abort(\n command: Omit<AbortMessageCommand, \"type\" | \"request_id\"> & {\n request_id?: string;\n },\n options: Omit<\n AppServerRequestOptions<AbortMessageResponseMessage>,\n \"predicate\"\n > = {},\n ): Promise<AbortMessageResponseMessage> {\n return this.request(\n {\n type: \"abort_message\",\n request_id: command.request_id ?? this.nextRequestId(\"abort\"),\n ...command,\n },\n {\n ...options,\n predicate: (message): message is AbortMessageResponseMessage =>\n message.type === \"abort_message_response\",\n },\n );\n }\n\n onExternalToolCall(handler: AppServerExternalToolCallHandler): () => void {\n return this.onMessage((message, channel) => {\n if (\n channel !== \"control\" ||\n message.type !== \"external_tool_call_request\"\n ) {\n return;\n }\n\n void Promise.resolve(handler(message))\n .then((result) => {\n this.send({\n type: \"external_tool_call_response\",\n request_id: message.request_id,\n result,\n });\n })\n .catch((error) => {\n this.send({\n type: \"external_tool_call_response\",\n request_id: message.request_id,\n error: error instanceof Error ? error.message : String(error),\n });\n });\n });\n }\n\n input(command: Omit<InputCommand, \"type\">): void {\n this.send({ type: \"input\", ...command });\n }\n\n runTurn(\n command: Omit<InputCommand, \"type\">,\n options: AppServerRunTurnOptions = {},\n ): Promise<AppServerTurnResult> {\n const runtimeKey = `${command.runtime.agent_id}/${command.runtime.conversation_id}`;\n if (this.activeTurnRuntimes.has(runtimeKey)) {\n return Promise.reject(\n new Error(`A turn is already in flight for ${runtimeKey}`),\n );\n }\n this.activeTurnRuntimes.add(runtimeKey);\n const timeoutMs = options.timeoutMs ?? this.requestTimeoutMs;\n const commandWithIds = this.withClientMessageIds(command);\n const runIds = new Set<string>();\n let observedTurnEvidence = false;\n let observedRequiresApprovalStop = false;\n\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n cleanup();\n reject(\n new Error(\n `Timed out waiting for app-server turn on ${command.runtime.agent_id}/${command.runtime.conversation_id}`,\n ),\n );\n }, timeoutMs);\n\n const cleanup = () => {\n clearTimeout(timeout);\n this.activeTurnRuntimes.delete(runtimeKey);\n offMessage();\n };\n\n const finish = (\n completedBy: AppServerTurnCompletionSource,\n terminalMessage: WsProtocolMessage,\n stopReason: string | null,\n ) => {\n cleanup();\n resolve({\n runtime: command.runtime,\n stopReason,\n runIds: [...runIds],\n clientMessageIds: commandWithIds.clientMessageIds,\n completedBy,\n terminalMessage,\n });\n };\n\n const fail = (error: Error) => {\n cleanup();\n reject(error);\n };\n\n const offMessage = this.onMessage((message) => {\n if (\n !sameRuntime(\n (message as { runtime?: RuntimeScope }).runtime,\n command.runtime,\n )\n ) {\n return;\n }\n\n if (message.type === \"stream_delta\") {\n observedTurnEvidence = true;\n const runId = streamDeltaRunId(message);\n if (runId) runIds.add(runId);\n\n const messageType = streamDeltaMessageType(message);\n if (messageType === \"loop_error\" || messageType === \"error_message\") {\n fail(new Error(streamDeltaErrorMessage(message)));\n return;\n }\n if (messageType === \"stop_reason\") {\n const stopReason = streamDeltaStopReason(message);\n if (stopReason === \"requires_approval\") {\n observedRequiresApprovalStop = true;\n return;\n }\n finish(\"stop_reason\", message, stopReason);\n }\n return;\n }\n\n if (message.type === \"update_loop_status\") {\n const hadTurnEvidenceBeforeLoopStatus =\n observedTurnEvidence || observedRequiresApprovalStop;\n if (\n !hadTurnEvidenceBeforeLoopStatus &&\n (isWaitingOnApprovalLoopStatus(message) ||\n (options.allowLoopStatusFallback === true &&\n isWaitingLoopStatus(message)))\n ) {\n return;\n }\n for (const runId of message.loop_status.active_run_ids) {\n observedTurnEvidence = true;\n runIds.add(runId);\n }\n if (\n hadTurnEvidenceBeforeLoopStatus &&\n isWaitingOnApprovalLoopStatus(message)\n ) {\n finish(\n \"loop_status_waiting_on_approval\",\n message,\n \"requires_approval\",\n );\n return;\n }\n if (\n options.allowLoopStatusFallback === true &&\n hadTurnEvidenceBeforeLoopStatus &&\n isWaitingLoopStatus(message)\n ) {\n finish(\"loop_status_waiting_fallback\", message, null);\n }\n }\n });\n\n try {\n this.input(commandWithIds.command);\n } catch (error) {\n fail(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n private withClientMessageIds(command: Omit<InputCommand, \"type\">): {\n command: Omit<InputCommand, \"type\">;\n clientMessageIds: string[];\n } {\n if (command.payload.kind !== \"create_message\") {\n return { command, clientMessageIds: [] };\n }\n\n const clientMessageIds: string[] = [];\n const messages = command.payload.messages.map((message) => {\n if (message.role !== \"user\") return message;\n const existing = (message as { client_message_id?: unknown })\n .client_message_id;\n const clientMessageId =\n typeof existing === \"string\" && existing.length > 0\n ? existing\n : this.nextRequestId(\"client-message\");\n clientMessageIds.push(clientMessageId);\n return { ...message, client_message_id: clientMessageId };\n });\n\n return {\n command: {\n ...command,\n payload: { ...command.payload, messages },\n },\n clientMessageIds,\n };\n }\n\n private handleMessage(event: unknown, channel: AppServerChannel): void {\n const message = parseProtocolMessage(event);\n\n for (const handler of this.messageHandlers) {\n handler(message, channel);\n }\n\n const requestId =\n message && typeof message === \"object\" && \"request_id\" in message\n ? (message as { request_id?: unknown }).request_id\n : undefined;\n if (channel !== \"control\" || typeof requestId !== \"string\") {\n return;\n }\n\n const pending = this.pending.get(requestId);\n if (!pending || (pending.predicate && !pending.predicate(message))) {\n return;\n }\n\n clearTimeout(pending.timeout);\n this.pending.delete(requestId);\n pending.resolve(message);\n }\n\n private rejectAllPending(reason: string): void {\n for (const [requestId, pending] of this.pending) {\n clearTimeout(pending.timeout);\n this.pending.delete(requestId);\n pending.reject(new Error(reason));\n }\n }\n}\n\nexport function createAppServerClient(\n options: AppServerClientOptions,\n): AppServerClient {\n return new AppServerClient(options);\n}\n"
6
6
  ],
7
- "mappings": ";AAqHA,IAAM,6BAA6B;AACnC,IAAM,uBAAuB;AAE7B,SAAS,kBAAkB,GAA2C;AAAA,EACpE,OAAQ,WAA0D;AAAA;AAGpE,SAAS,gBAAgB,CAAC,KAAkB;AAAA,EAC1C,MAAM,SAAS,IAAI,IAAI,GAAG;AAAA,EAC1B,IAAI,OAAO,aAAa;AAAA,IAAS,OAAO,WAAW;AAAA,EACnD,IAAI,OAAO,aAAa;AAAA,IAAU,OAAO,WAAW;AAAA,EACpD,IAAI,OAAO,aAAa,SAAS,OAAO,aAAa,QAAQ;AAAA,IAC3D,MAAM,IAAI,MAAM,wCAAwC,OAAO,UAAU;AAAA,EAC3E;AAAA,EACA,IAAI,CAAC,OAAO,YAAY,OAAO,aAAa,KAAK;AAAA,IAC/C,OAAO,WAAW;AAAA,EACpB;AAAA,EACA,OAAO;AAAA;AAGF,SAAS,0BAA0B,CACxC,KACA,SACQ;AAAA,EACR,MAAM,SAAS,iBAAiB,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IAE1C,WAAW,WAAW,KAAK,iBAAiB;AAAA,MAC1C,QAAQ,SAAS,OAAO;AAAA,IAC1B;AAAA,IAEA,MAAM,YACJ,WAAW,OAAO,YAAY,YAAY,gBAAgB,UACrD,QAAqC,aACtC;AAAA,IACN,IAAI,YAAY,aAAa,OAAO,cAAc,UAAU;AAAA,MAC1D;AAAA,IACF;AAAA,IAEA,MAAM,UAAU,KAAK,QAAQ,IAAI,SAAS;AAAA,IAC1C,IAAI,CAAC,WAAY,QAAQ,aAAa,CAAC,QAAQ,UAAU,OAAO,GAAI;AAAA,MAClE;AAAA,IACF;AAAA,IAEA,aAAa,QAAQ,OAAO;AAAA,IAC5B,KAAK,QAAQ,OAAO,SAAS;AAAA,IAC7B,QAAQ,QAAQ,OAAO;AAAA;AAAA,EAGjB,gBAAgB,CAAC,QAAsB;AAAA,IAC7C,YAAY,WAAW,YAAY,KAAK,SAAS;AAAA,MAC/C,aAAa,QAAQ,OAAO;AAAA,MAC5B,KAAK,QAAQ,OAAO,SAAS;AAAA,MAC7B,QAAQ,OAAO,IAAI,MAAM,MAAM,CAAC;AAAA,IAClC;AAAA;AAEJ;AAEO,SAAS,qBAAqB,CACnC,SACiB;AAAA,EACjB,OAAO,IAAI,gBAAgB,OAAO;AAAA;",
8
+ "debugId": "2626B1D6D5898D3F64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"app-server-client.d.ts","sourceRoot":"","sources":["../../src/app-server-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,YAAY,EAEZ,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAE3B,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpD;;;;;GAKG;AACH,MA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496,7 @@ export interface SubagentSnapshot {
496
496
  subagent_id: string;
497
497
  subagent_type: string;
498
498
  description: string;
499
+ prompt?: string;
499
500
  status: "pending" | "running" | "completed" | "error";
500
501
  agent_url: string | null;
501
502
  model?: string;
@@ -1142,6 +1143,7 @@ export interface ListModelsCommand {
1142
1143
  request_id: string;
1143
1144
  }
1144
1145
  export type ConnectProviderStorageTarget = "local";
1146
+ export type ChatGPTUsageReadTarget = "local" | "api";
1145
1147
  export interface ListConnectProvidersCommand {
1146
1148
  type: "list_connect_providers";
1147
1149
  /** Echoed back in the response for request correlation. */
@@ -1170,6 +1172,19 @@ export interface DisconnectProviderCommand {
1170
1172
  target: ConnectProviderStorageTarget;
1171
1173
  /** Provider id from list_connect_providers. */
1172
1174
  provider_id: string;
1175
+ /** Optional connected provider name to remove when a row has multiple aliases. */
1176
+ provider_name?: string;
1177
+ }
1178
+ export interface ChatGPTUsageReadCommand {
1179
+ type: "chatgpt_usage_read";
1180
+ /** Echoed back in the response for request correlation. */
1181
+ request_id: string;
1182
+ /** Provider store to inspect. */
1183
+ target: ChatGPTUsageReadTarget;
1184
+ /** Optional connected ChatGPT provider alias. Defaults to the built-in alias. */
1185
+ provider_name?: string;
1186
+ /** Skip the short listener-side cache. */
1187
+ force_refresh?: boolean;
1173
1188
  }
1174
1189
  export interface ConnectProviderField {
1175
1190
  key: string;
@@ -1206,7 +1221,10 @@ export interface ConnectProviderEntry {
1206
1221
  requires_api_key: boolean;
1207
1222
  fields?: ConnectProviderField[];
1208
1223
  auth_methods?: ConnectProviderAuthMethod[];
1224
+ /** First connected provider, preserved for older clients. */
1209
1225
  connected: ConnectProviderConnectionState;
1226
+ /** All connected provider aliases represented by this row. */
1227
+ connected_providers: ConnectProviderConnectionState[];
1210
1228
  }
1211
1229
  export interface ListConnectProvidersResponseMessage {
1212
1230
  type: "list_connect_providers_response";
@@ -1234,6 +1252,50 @@ export interface DisconnectProviderResponseMessage {
1234
1252
  models_may_have_changed: boolean;
1235
1253
  error?: string;
1236
1254
  }
1255
+ export interface ChatGPTUsageWindowPayload {
1256
+ label: string;
1257
+ usedPercent: number | null;
1258
+ windowDurationMins: number | null;
1259
+ resetsAt: number | null;
1260
+ }
1261
+ export interface ChatGPTUsageCreditsPayload {
1262
+ balance?: string | null;
1263
+ availableCount?: number | null;
1264
+ hasCredits?: boolean | null;
1265
+ unlimited?: boolean | null;
1266
+ }
1267
+ export interface ChatGPTUsageIndividualLimitPayload {
1268
+ limit: string;
1269
+ used: string;
1270
+ remainingPercent: number;
1271
+ resetsAt: number;
1272
+ }
1273
+ export interface ChatGPTUsageSnapshotPayload {
1274
+ providerName: string;
1275
+ fetchedAt: string;
1276
+ summary: string;
1277
+ planType?: string | null;
1278
+ limitReached?: boolean | null;
1279
+ rateLimitReachedType?: string | null;
1280
+ primary: ChatGPTUsageWindowPayload | null;
1281
+ secondary: ChatGPTUsageWindowPayload | null;
1282
+ additional: ChatGPTUsageWindowPayload[];
1283
+ credits?: ChatGPTUsageCreditsPayload | null;
1284
+ individualLimit?: ChatGPTUsageIndividualLimitPayload | null;
1285
+ }
1286
+ export interface ChatGPTUsageReadErrorPayload {
1287
+ code: "bad_request" | "not_connected" | "unsupported_target" | "refresh_failed" | "unauthorized" | "forbidden" | "rate_limited" | "network_error" | "bad_response";
1288
+ message: string;
1289
+ retryAfterMs?: number;
1290
+ }
1291
+ export interface ChatGPTUsageReadResponseMessage {
1292
+ type: "chatgpt_usage_read_response";
1293
+ request_id: string;
1294
+ success: boolean;
1295
+ target: ChatGPTUsageReadTarget;
1296
+ usage?: ChatGPTUsageSnapshotPayload;
1297
+ error?: ChatGPTUsageReadErrorPayload;
1298
+ }
1237
1299
  export interface UpdateModelPayload {
1238
1300
  /** Preferred model identifier from models.json (e.g. "sonnet") */
1239
1301
  model_id?: string;
@@ -1536,43 +1598,6 @@ export interface GetCwdMapResponseMessage {
1536
1598
  boot_working_directory: string | null;
1537
1599
  error?: string;
1538
1600
  }
1539
- export type ConversationPinScope = "global" | "local_project" | "both";
1540
- export type ConversationPinAction = "pin" | "unpin" | "toggle";
1541
- export interface ListConversationPinsCommand {
1542
- type: "list_conversation_pins";
1543
- request_id: string;
1544
- runtime: RuntimeScope;
1545
- }
1546
- export interface ListConversationPinsResponseMessage {
1547
- type: "list_conversation_pins_response";
1548
- request_id: string;
1549
- success: boolean;
1550
- pins: Array<{
1551
- conversation_id: string;
1552
- is_local: boolean;
1553
- }>;
1554
- error?: string;
1555
- }
1556
- export interface SetConversationPinCommand {
1557
- type: "set_conversation_pin";
1558
- request_id: string;
1559
- runtime: RuntimeScope;
1560
- conversation_id: string;
1561
- action: ConversationPinAction;
1562
- scope?: ConversationPinScope;
1563
- }
1564
- export interface SetConversationPinResponseMessage {
1565
- type: "set_conversation_pin_response";
1566
- request_id: string;
1567
- success: boolean;
1568
- conversation_id: string;
1569
- pinned: boolean;
1570
- pins: Array<{
1571
- conversation_id: string;
1572
- is_local: boolean;
1573
- }>;
1574
- error?: string;
1575
- }
1576
1601
  export interface GetReflectionSettingsCommand {
1577
1602
  type: "get_reflection_settings";
1578
1603
  /** Echoed back in the response for request correlation. */
@@ -2270,9 +2295,9 @@ export interface RemoveQueueItemResponse {
2270
2295
  success: boolean;
2271
2296
  item_id: string;
2272
2297
  }
2273
- export type WsProtocolCommand = InputCommand | ChangeDeviceStateCommand | AbortMessageCommand | SyncCommand | RuntimeStartCommand | ExternalToolCallResponseCommand | TerminalSpawnCommand | TerminalInputCommand | TerminalResizeCommand | TerminalKillCommand | SearchFilesCommand | GrepInFilesCommand | ListInDirectoryCommand | GetTreeCommand | ReadFileCommand | WriteFileCommand | WatchFileCommand | UnwatchFileCommand | EditFileCommand | FileOpsCommand | ListMemoryCommand | MemoryHistoryCommand | MemoryFileAtRefCommand | MemoryCommitDiffCommand | ReadMemoryFileCommand | WriteMemoryFileCommand | DeleteMemoryFileCommand | EnableMemfsCommand | ListModelsCommand | ListConnectProvidersCommand | ConnectProviderCommand | DisconnectProviderCommand | UpdateModelCommand | UpdateToolsetCommand | CronListCommand | CronAddCommand | CronGetCommand | CronRunsCommand | CronTriggerCommand | CronUpdateCommand | CronDeleteCommand | CronDeleteAllCommand | SkillEnableCommand | SkillDisableCommand | CreateAgentCommand | AgentListCommand | AgentRetrieveCommand | AgentCreateCommand | AgentUpdateCommand | AgentDeleteCommand | ConversationListCommand | ConversationRetrieveCommand | ConversationCreateCommand | ConversationUpdateCommand | ConversationRecompileCommand | ConversationForkCommand | ConversationMessagesListCommand | ConversationCompactCommand | GetCwdMapCommand | ListConversationPinsCommand | SetConversationPinCommand | GetReflectionSettingsCommand | SetReflectionSettingsCommand | GetExperimentsCommand | SetExperimentCommand | ChannelsListCommand | ChannelAccountsListCommand | ChannelAccountCreateCommand | ChannelAccountUpdateCommand | ChannelAccountBindCommand | ChannelAccountUnbindCommand | ChannelAccountDeleteCommand | ChannelAccountStartCommand | ChannelAccountStopCommand | ChannelGetConfigCommand | ChannelSetConfigCommand | ChannelStartCommand | ChannelStopCommand | ChannelPairingsListCommand | ChannelPairingBindCommand | ChannelRoutesListCommand | ChannelTargetsListCommand | ChannelTargetBindCommand | ChannelRouteRemoveCommand | ChannelRouteUpdateCommand | ExecuteCommandCommand | RemoveQueueItemCommand | SearchBranchesCommand | CheckoutBranchCommand | SecretListCommand | SecretApplyCommand;
2298
+ export type WsProtocolCommand = InputCommand | ChangeDeviceStateCommand | AbortMessageCommand | SyncCommand | RuntimeStartCommand | ExternalToolCallResponseCommand | TerminalSpawnCommand | TerminalInputCommand | TerminalResizeCommand | TerminalKillCommand | SearchFilesCommand | GrepInFilesCommand | ListInDirectoryCommand | GetTreeCommand | ReadFileCommand | WriteFileCommand | WatchFileCommand | UnwatchFileCommand | EditFileCommand | FileOpsCommand | ListMemoryCommand | MemoryHistoryCommand | MemoryFileAtRefCommand | MemoryCommitDiffCommand | ReadMemoryFileCommand | WriteMemoryFileCommand | DeleteMemoryFileCommand | EnableMemfsCommand | ListModelsCommand | ListConnectProvidersCommand | ConnectProviderCommand | DisconnectProviderCommand | ChatGPTUsageReadCommand | UpdateModelCommand | UpdateToolsetCommand | CronListCommand | CronAddCommand | CronGetCommand | CronRunsCommand | CronTriggerCommand | CronUpdateCommand | CronDeleteCommand | CronDeleteAllCommand | SkillEnableCommand | SkillDisableCommand | CreateAgentCommand | AgentListCommand | AgentRetrieveCommand | AgentCreateCommand | AgentUpdateCommand | AgentDeleteCommand | ConversationListCommand | ConversationRetrieveCommand | ConversationCreateCommand | ConversationUpdateCommand | ConversationRecompileCommand | ConversationForkCommand | ConversationMessagesListCommand | ConversationCompactCommand | GetCwdMapCommand | GetReflectionSettingsCommand | SetReflectionSettingsCommand | GetExperimentsCommand | SetExperimentCommand | ChannelsListCommand | ChannelAccountsListCommand | ChannelAccountCreateCommand | ChannelAccountUpdateCommand | ChannelAccountBindCommand | ChannelAccountUnbindCommand | ChannelAccountDeleteCommand | ChannelAccountStartCommand | ChannelAccountStopCommand | ChannelGetConfigCommand | ChannelSetConfigCommand | ChannelStartCommand | ChannelStopCommand | ChannelPairingsListCommand | ChannelPairingBindCommand | ChannelRoutesListCommand | ChannelTargetsListCommand | ChannelTargetBindCommand | ChannelRouteRemoveCommand | ChannelRouteUpdateCommand | ExecuteCommandCommand | RemoveQueueItemCommand | SearchBranchesCommand | CheckoutBranchCommand | SecretListCommand | SecretApplyCommand;
2274
2299
  export type WsProtocolCommandType = WsProtocolCommand["type"];
2275
- export type WsProtocolMessage = DeviceStatusUpdateMessage | LoopStatusUpdateMessage | QueueUpdateMessage | StreamDeltaMessage | SubagentStateUpdateMessage | ExternalToolCallRequestMessage | AbortMessageResponseMessage | SyncResponseMessage | TerminalOutputMessage | TerminalSpawnedMessage | TerminalExitedMessage | SearchFilesResponseMessage | GrepInFilesResponseMessage | ListInDirectoryResponseMessage | GetTreeResponseMessage | ReadFileResponseMessage | WriteFileResponseMessage | FileOpsCommand | EditFileResponseMessage | FileChangedMessage | ListMemoryResponseMessage | MemoryHistoryResponseMessage | MemoryFileAtRefResponseMessage | MemoryCommitDiffResponseMessage | ReadMemoryFileResponseMessage | WriteMemoryFileResponseMessage | DeleteMemoryFileResponseMessage | EnableMemfsResponseMessage | MemoryUpdatedMessage | ListModelsResponseMessage | ListConnectProvidersResponseMessage | ConnectProviderResponseMessage | DisconnectProviderResponseMessage | UpdateModelResponseMessage | UpdateToolsetResponseMessage | CronListResponseMessage | CronAddResponseMessage | CronGetResponseMessage | CronRunsResponseMessage | CronTriggerResponseMessage | CronUpdateResponseMessage | CronDeleteResponseMessage | CronDeleteAllResponseMessage | CronsUpdatedMessage | SkillEnableResponseMessage | SkillDisableResponseMessage | SkillsUpdatedMessage | CreateAgentResponseMessage | AgentListResponseMessage | AgentRetrieveResponseMessage | AgentCreateResponseMessage | AgentUpdateResponseMessage | AgentDeleteResponseMessage | ConversationListResponseMessage | ConversationRetrieveResponseMessage | ConversationCreateResponseMessage | ConversationUpdateResponseMessage | ConversationRecompileResponseMessage | ConversationForkResponseMessage | ConversationMessagesListResponseMessage | ConversationCompactResponseMessage | RuntimeStartResponseMessage | GetExperimentsResponseMessage | SetExperimentResponseMessage | ListConversationPinsResponseMessage | SetConversationPinResponseMessage | GetReflectionSettingsResponseMessage | SetReflectionSettingsResponseMessage | ChannelsListResponseMessage | ChannelAccountsListResponseMessage | ChannelAccountCreateResponseMessage | ChannelAccountUpdateResponseMessage | ChannelAccountBindResponseMessage | ChannelAccountUnbindResponseMessage | ChannelAccountDeleteResponseMessage | ChannelAccountStartResponseMessage | ChannelAccountStopResponseMessage | ChannelGetConfigResponseMessage | ChannelSetConfigResponseMessage | ChannelStartResponseMessage | ChannelStopResponseMessage | ChannelPairingsListResponseMessage | ChannelPairingBindResponseMessage | ChannelRoutesListResponseMessage | ChannelTargetsListResponseMessage | ChannelTargetBindResponseMessage | ChannelRouteRemoveResponseMessage | ChannelRouteUpdateResponseMessage | ChannelsUpdatedMessage | ChannelAccountsUpdatedMessage | ChannelPairingsUpdatedMessage | ChannelRoutesUpdatedMessage | ChannelTargetsUpdatedMessage | GetCwdMapResponseMessage | SearchBranchesResponse | CheckoutBranchResponse | SecretListResponse | SecretApplyResponse | RemoveQueueItemResponse;
2300
+ export type WsProtocolMessage = DeviceStatusUpdateMessage | LoopStatusUpdateMessage | QueueUpdateMessage | StreamDeltaMessage | SubagentStateUpdateMessage | ExternalToolCallRequestMessage | AbortMessageResponseMessage | SyncResponseMessage | TerminalOutputMessage | TerminalSpawnedMessage | TerminalExitedMessage | SearchFilesResponseMessage | GrepInFilesResponseMessage | ListInDirectoryResponseMessage | GetTreeResponseMessage | ReadFileResponseMessage | WriteFileResponseMessage | FileOpsCommand | EditFileResponseMessage | FileChangedMessage | ListMemoryResponseMessage | MemoryHistoryResponseMessage | MemoryFileAtRefResponseMessage | MemoryCommitDiffResponseMessage | ReadMemoryFileResponseMessage | WriteMemoryFileResponseMessage | DeleteMemoryFileResponseMessage | EnableMemfsResponseMessage | MemoryUpdatedMessage | ListModelsResponseMessage | ListConnectProvidersResponseMessage | ConnectProviderResponseMessage | DisconnectProviderResponseMessage | ChatGPTUsageReadResponseMessage | UpdateModelResponseMessage | UpdateToolsetResponseMessage | CronListResponseMessage | CronAddResponseMessage | CronGetResponseMessage | CronRunsResponseMessage | CronTriggerResponseMessage | CronUpdateResponseMessage | CronDeleteResponseMessage | CronDeleteAllResponseMessage | CronsUpdatedMessage | SkillEnableResponseMessage | SkillDisableResponseMessage | SkillsUpdatedMessage | CreateAgentResponseMessage | AgentListResponseMessage | AgentRetrieveResponseMessage | AgentCreateResponseMessage | AgentUpdateResponseMessage | AgentDeleteResponseMessage | ConversationListResponseMessage | ConversationRetrieveResponseMessage | ConversationCreateResponseMessage | ConversationUpdateResponseMessage | ConversationRecompileResponseMessage | ConversationForkResponseMessage | ConversationMessagesListResponseMessage | ConversationCompactResponseMessage | RuntimeStartResponseMessage | GetExperimentsResponseMessage | SetExperimentResponseMessage | GetReflectionSettingsResponseMessage | SetReflectionSettingsResponseMessage | ChannelsListResponseMessage | ChannelAccountsListResponseMessage | ChannelAccountCreateResponseMessage | ChannelAccountUpdateResponseMessage | ChannelAccountBindResponseMessage | ChannelAccountUnbindResponseMessage | ChannelAccountDeleteResponseMessage | ChannelAccountStartResponseMessage | ChannelAccountStopResponseMessage | ChannelGetConfigResponseMessage | ChannelSetConfigResponseMessage | ChannelStartResponseMessage | ChannelStopResponseMessage | ChannelPairingsListResponseMessage | ChannelPairingBindResponseMessage | ChannelRoutesListResponseMessage | ChannelTargetsListResponseMessage | ChannelTargetBindResponseMessage | ChannelRouteRemoveResponseMessage | ChannelRouteUpdateResponseMessage | ChannelsUpdatedMessage | ChannelAccountsUpdatedMessage | ChannelPairingsUpdatedMessage | ChannelRoutesUpdatedMessage | ChannelTargetsUpdatedMessage | GetCwdMapResponseMessage | SearchBranchesResponse | CheckoutBranchResponse | SecretListResponse | SecretApplyResponse | RemoveQueueItemResponse;
2276
2301
  export type WsProtocolMessageType = WsProtocolMessage["type"];
2277
2302
  export type { StopReasonType };
2278
2303
  //# sourceMappingURL=protocol_v2.d.ts.map