import * as z from 'zod'; import z__default, { z as z$1 } from 'zod'; import { i as PluginConfig, j as PluginDefinition, O as OperationResult, k as TelemetryClient, L as LifeErrorUnion, T as ToPublic, l as TransportClientBase, a as Any, m as AgentScope, A as AgentDefinition, n as ToMethodName, W as Without, o as Override, p as Opaque, q as PluginConfigDefinition, r as AssertPublic, s as PluginAccessor, C as ClassShape, M as MemoryDefinition, c as Message, S as StoreDefinition } from './types-B6ejZKUB.js'; import * as nanostores from 'nanostores'; import { WritableAtom, ReadableAtom } from 'nanostores'; import * as LIFE_CLIENT_BUILD_PATH from 'LIFE_CLIENT_BUILD_PATH'; import { b as ZodUnionWithTelemetry, Z as ZodObjectWithTelemetry } from './config-n67P8tNt.js'; import * as zod_v4_core from 'zod/v4/core'; type ClientBuildType = Record; class: ReturnType; serverConfig: PluginConfig; clientConfig: PluginClientConfig; }; }>; }>; type Mode = "LIFE_BUILD_MODE"; type ActualClientBuild = typeof LIFE_CLIENT_BUILD_PATH; declare const defaultBuild: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }; type ClientBuild = Mode extends "production" ? Awaited["default"] extends never ? Awaited : Awaited["default"] : typeof defaultBuild; declare function importClientBuild(): Promise>; declare const definition: { readonly "telemetry.send-signal": { readonly type: "cast"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ signal: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; level: z__default.ZodEnum<{ error: "error"; debug: "debug"; info: "info"; warn: "warn"; fatal: "fatal"; }>; message: z__default.ZodString; messageUnstyled: z__default.ZodString; timestamp: z__default.ZodBigInt; stack: z__default.ZodString; traceId: z__default.ZodOptional; spanId: z__default.ZodOptional; error: z__default.ZodOptional>; type: z__default.ZodLiteral<"log">; }, z__default.core.$strip>, z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; name: z__default.ZodString; startTimestamp: z__default.ZodBigInt; endTimestamp: z__default.ZodBigInt; duration: z__default.ZodBigInt; traceId: z__default.ZodString; parentSpanId: z__default.ZodOptional; logs: z__default.ZodArray>; attributes: z__default.ZodOptional>; id: z__default.ZodString; stack: z__default.ZodString; level: z__default.ZodEnum<{ error: "error"; debug: "debug"; info: "info"; warn: "warn"; fatal: "fatal"; }>; messageUnstyled: z__default.ZodString; timestamp: z__default.ZodBigInt; }, z__default.core.$strip>>; type: z__default.ZodLiteral<"span">; }, z__default.core.$strip>, z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; kind: z__default.ZodEnum<{ counter: "counter"; updown: "updown"; histogram: "histogram"; }>; name: z__default.ZodString; value: z__default.ZodUnion<[z__default.ZodNumber, z__default.ZodBigInt]>; type: z__default.ZodLiteral<"metric">; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; }; readonly "telemetry.signals-stream": { readonly type: "stream"; readonly protected: true; readonly outputDataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; level: z__default.ZodEnum<{ error: "error"; debug: "debug"; info: "info"; warn: "warn"; fatal: "fatal"; }>; message: z__default.ZodString; messageUnstyled: z__default.ZodString; timestamp: z__default.ZodBigInt; stack: z__default.ZodString; traceId: z__default.ZodOptional; spanId: z__default.ZodOptional; error: z__default.ZodOptional>; type: z__default.ZodLiteral<"log">; }, z__default.core.$strip>, z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; name: z__default.ZodString; startTimestamp: z__default.ZodBigInt; endTimestamp: z__default.ZodBigInt; duration: z__default.ZodBigInt; traceId: z__default.ZodString; parentSpanId: z__default.ZodOptional; logs: z__default.ZodArray>; attributes: z__default.ZodOptional>; id: z__default.ZodString; stack: z__default.ZodString; level: z__default.ZodEnum<{ error: "error"; debug: "debug"; info: "info"; warn: "warn"; fatal: "fatal"; }>; messageUnstyled: z__default.ZodString; timestamp: z__default.ZodBigInt; }, z__default.core.$strip>>; type: z__default.ZodLiteral<"span">; }, z__default.core.$strip>, z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodString; resource: z__default.ZodIntersection; lifeVersion: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ platform: z__default.ZodLiteral<"node">; isCi: z__default.ZodBoolean; nodeVersion: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuCount: z__default.ZodNumber; cpuArchitecture: z__default.ZodString; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ platform: z__default.ZodLiteral<"browser">; deviceType: z__default.ZodEnum<{ unknown: "unknown"; desktop: "desktop"; mobile: "mobile"; tablet: "tablet"; wearable: "wearable"; smarttv: "smarttv"; console: "console"; xr: "xr"; embedded: "embedded"; }>; deviceBrand: z__default.ZodString; deviceModel: z__default.ZodString; osName: z__default.ZodString; osVersion: z__default.ZodString; cpuArchitecture: z__default.ZodOptional>; browserUserAgent: z__default.ZodString; browserName: z__default.ZodString; browserVersion: z__default.ZodString; browserEngine: z__default.ZodEnum<{ unknown: "unknown"; Amaya: "Amaya"; ArkWeb: "ArkWeb"; Blink: "Blink"; EdgeHTML: "EdgeHTML"; Flow: "Flow"; Gecko: "Gecko"; Goanna: "Goanna"; iCab: "iCab"; KHTML: "KHTML"; LibWeb: "LibWeb"; Links: "Links"; Lynx: "Lynx"; NetFront: "NetFront"; NetSurf: "NetSurf"; Presto: "Presto"; Servo: "Servo"; Tasman: "Tasman"; Trident: "Trident"; w3m: "w3m"; WebKit: "WebKit"; }>; isBot: z__default.ZodBoolean; isAiBot: z__default.ZodBoolean; schemaVersion: z__default.ZodPrefault; }, z__default.core.$strip>], "platform">>; attributes: z__default.ZodOptional>; kind: z__default.ZodEnum<{ counter: "counter"; updown: "updown"; histogram: "histogram"; }>; name: z__default.ZodString; value: z__default.ZodUnion<[z__default.ZodNumber, z__default.ZodBigInt]>; type: z__default.ZodLiteral<"metric">; }, z__default.core.$strip>], "type">; }; readonly "agent.create": { readonly type: "call"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodOptional; name: z__default.ZodString; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; clientConfig: z__default.ZodObject<{ transport: z__default.ZodPrefault; serverUrl: z__default.ZodPrefault; }, z__default.core.$strip>[], "provider">>; experimental: z__default.ZodPrefault>; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "agent.start": { readonly type: "call"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; scope: z__default.ZodRecord; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodObject<{ sessionToken: z__default.ZodString; transportRoom: z__default.ZodObject<{ name: z__default.ZodString; token: z__default.ZodString; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "agent.stop": { readonly type: "call"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; sessionToken: z__default.ZodString; }, z__default.core.$strip>; readonly timeoutMs: 30000; }; readonly "agent.ping": { readonly type: "call"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; sessionToken: z__default.ZodString; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodLiteral<"pong">; }; readonly "agent.info": { readonly type: "call"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; sessionToken: z__default.ZodString; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; scope: z__default.ZodNullable>; status: z__default.ZodEnum<{ stopped: "stopped"; stopping: "stopping"; starting: "starting"; running: "running"; }>; lastStartedAt: z__default.ZodOptional; lastSeenAt: z__default.ZodOptional; restartCount: z__default.ZodNumber; cpu: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; usedNs: z__default.ZodNumber; }, z__default.core.$strip>; memory: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; totalBytes: z__default.ZodNumber; freeBytes: z__default.ZodNumber; usedBytes: z__default.ZodNumber; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "agent.info-stream": { readonly type: "stream"; readonly protected: false; readonly inputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; sessionToken: z__default.ZodString; pollingIntervalMs: z__default.ZodPrefault; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; scope: z__default.ZodNullable>; status: z__default.ZodString; lastStartedAt: z__default.ZodOptional; lastSeenAt: z__default.ZodOptional; restartCount: z__default.ZodNumber; cpu: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; usedNs: z__default.ZodNumber; }, z__default.core.$strip>; memory: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; totalBytes: z__default.ZodNumber; freeBytes: z__default.ZodNumber; usedBytes: z__default.ZodNumber; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "server.ping": { readonly type: "call"; readonly protected: true; readonly outputDataSchema: z__default.ZodLiteral<"pong">; }; readonly "server.available": { readonly type: "call"; readonly protected: true; readonly outputDataSchema: z__default.ZodArray; }, z__default.core.$strip>>; }; readonly "server.info": { readonly type: "call"; readonly protected: true; readonly outputDataSchema: z__default.ZodObject<{ lifeVersion: z__default.ZodString; nodeVersion: z__default.ZodString; startedAt: z__default.ZodNumber; cpu: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; usedNs: z__default.ZodNumber; }, z__default.core.$strip>; memory: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; totalBytes: z__default.ZodNumber; freeBytes: z__default.ZodNumber; usedBytes: z__default.ZodNumber; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "server.info-stream": { readonly type: "stream"; readonly protected: true; readonly inputDataSchema: z__default.ZodObject<{ pollingIntervalMs: z__default.ZodPrefault; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodObject<{ lifeVersion: z__default.ZodString; nodeVersion: z__default.ZodString; startedAt: z__default.ZodNumber; cpu: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; usedNs: z__default.ZodNumber; }, z__default.core.$strip>; memory: z__default.ZodObject<{ usedPercent: z__default.ZodNumber; totalBytes: z__default.ZodNumber; freeBytes: z__default.ZodNumber; usedBytes: z__default.ZodNumber; }, z__default.core.$strip>; }, z__default.core.$strip>; }; readonly "server.processes": { readonly type: "call"; readonly protected: true; readonly outputDataSchema: z__default.ZodArray; }, z__default.core.$strip>>; }; readonly "server.processes-stream": { readonly type: "stream"; readonly protected: true; readonly inputDataSchema: z__default.ZodObject<{ pollingIntervalMs: z__default.ZodPrefault; }, z__default.core.$strip>; readonly outputDataSchema: z__default.ZodArray; }, z__default.core.$strip>>; }; }; type LifeApiCallDefinition = { type: "call"; protected: boolean; inputDataSchema?: z__default.ZodType; outputDataSchema?: z__default.ZodType; timeoutMs?: number; }; type LifeApiCastDefinition = { type: "cast"; protected: boolean; inputDataSchema?: z__default.ZodType; outputDataSchema?: never; timeoutMs?: number; }; type LifeApiStreamDefinition = { type: "stream"; protected: boolean; inputDataSchema?: z__default.ZodType; outputDataSchema?: z__default.ZodType; timeoutMs?: number; }; type LifeApiHandlerDefinition = LifeApiCallDefinition | LifeApiCastDefinition | LifeApiStreamDefinition; type LifeApiDefinition = Record; type InferInput = T extends { inputDataSchema: z__default.ZodType; } ? z__default.input : undefined; type InferOutput = T extends { outputDataSchema: z__default.ZodType; } ? z__default.output : undefined; type CallHandlers = { [K in keyof T as T[K] extends LifeApiCallDefinition ? K : never]: T[K]; }; type CastHandlers = { [K in keyof T as T[K] extends LifeApiCastDefinition ? K : never]: T[K]; }; type StreamHandlers = { [K in keyof T as T[K] extends LifeApiStreamDefinition ? K : never]: T[K]; }; type UnsubscribeFunction = () => void; declare class LifeServerApiClient { #private; constructor(params: { telemetry: TelemetryClient; serverUrl: string; serverToken?: string; }); private ensureWebSocket; call>(handlerId: K, input?: InferInput): Promise]>; cast>(handlerId: K, input?: InferInput): Promise>; subscribe>(handlerId: K, callback: (data: InferOutput) => void, input?: InferInput): OperationResult; disconnect(): void; } declare const lifeClientOptionsSchema: z__default.ZodObject<{ serverUrl: z__default.ZodPrefault; serverToken: z__default.ZodOptional; }, z__default.core.$strip>; type LifeClientOptions = z__default.output; declare class LifeClient { #private; readonly options: LifeClientOptions; api: LifeServerApiClient; constructor(options: LifeClientOptions); /** * Create a new agent instance on the server * @param name - Agent name/type to create * @param scope - Agent scope configuration * @returns AgentClient instance if creation successful */ createAgent(name: Name, options?: { id?: string; }): Promise & { [PluginName in keyof { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"]]: ((((PluginClientAccessor<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["def"], { client: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["clientConfig"]; server: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["serverConfig"]; }> extends infer T_3 extends object ? { [I_1 in keyof T_3]: I_1 extends K_2 ? V : T_3[I_1]; } : never) extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1]; } : never) extends infer T_1 extends object ? { [I in keyof T_1 as I extends keyof InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]> ? never : I]: T_1[I]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never) & InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]>; }>]>; /** * Get an existing agent client instance * @param id - Agent ID * @returns AgentClient instance or undefined */ getAgent(name: Name, options?: { id?: string; }): readonly [error: LifeErrorUnion, data: undefined] | readonly [error: undefined, data: ToPublic & { [PluginName in keyof { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"]]: ((((PluginClientAccessor<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["def"], { client: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["clientConfig"]; server: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["serverConfig"]; }> extends infer T_3 extends object ? { [I_1 in keyof T_3]: I_1 extends K_2 ? V : T_3[I_1]; } : never) extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1]; } : never) extends infer T_1 extends object ? { [I in keyof T_1 as I extends keyof InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]> ? never : I]: T_1[I]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never) & InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]>; }>]; /** * Get or create an agent instance * @param name - Agent name/type * @param scope - Agent scope configuration * @returns AgentClient instance */ getOrCreateAgent(name: Name, options?: { id?: string; }): Promise & { [PluginName in keyof { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"]]: ((((PluginClientAccessor<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["def"], { client: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["clientConfig"]; server: { readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["serverConfig"]; }> extends infer T_3 extends object ? { [I_1 in keyof T_3]: I_1 extends K_2 ? V : T_3[I_1]; } : never) extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1]; } : never) extends infer T_1 extends object ? { [I in keyof T_1 as I extends keyof InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]> ? never : I]: T_1[I]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never) & InstanceType<{ readonly "Run `life dev` to see your agents here.": ClientBuildType[string]; }[Name]["plugins"][PluginName]["$types"]["class"]>; }>]>; /** * List all created agent instances * @returns Array of { name: string, id: string } */ listAgents(): readonly [error: LifeErrorUnion, data: undefined] | readonly [error: undefined, data: { name: string; id: string; }[]]; /** * Get server information * @returns Server info response */ info(): Promise; /** * Check if the server is responsive * @returns True if server responds with "pong" */ ping(): Promise; } declare const transportBrowserConfig: ZodUnionWithTelemetry<"provider", readonly [ZodObjectWithTelemetry; serverUrl: z.ZodPrefault; }, zod_v4_core.$strip>, "output">], z.ZodDiscriminatedUnion; serverUrl: z.ZodPrefault; }, zod_v4_core.$strip>[], "provider">>; declare class TransportBrowserClient extends TransportClientBase { constructor({ config, obfuscateErrors, telemetry, }: { config: z$1.output; obfuscateErrors?: boolean; telemetry?: TelemetryClient | null; }); } declare const agentClientConfig: ZodObjectWithTelemetry; serverUrl: z$1.ZodPrefault; }, z$1.core.$strip>[], "provider">>; experimental: z$1.ZodPrefault>; }, z$1.core.$strip>, "output">; type AgentClientAtom = { store: WritableAtom | ReadableAtom; refresh: () => Promise; }; type AgentAtomDefinition = (params: { agent: AgentClient; telemetry: TelemetryClient; }) => { name: Name; create: (...params: Any[]) => AgentClientAtom; }; declare const createAgentClientAtoms: (params: Parameters[0]) => { info: { name: "info"; create: (config: z.input; }, zod_v4_core.$strip>>) => { store: nanostores.PreinitializedWritableAtom<{ id: string; name: string; scope: Record | null; status: "stopped" | "starting" | "running" | "stopping"; restartCount: number; cpu: { usedPercent: number; usedNs: number; }; memory: { usedPercent: number; totalBytes: number; freeBytes: number; usedBytes: number; }; lastStartedAt?: number | undefined; lastSeenAt?: number | undefined; } | null> & object; refresh: () => Promise; }; }; }; type AgentClientAtoms = ReturnType; declare class AgentClient { #private; readonly def: AgentDef; readonly id: string; readonly name: string; readonly atoms: AgentClientAtoms; readonly config: z__default.output; readonly transport: TransportBrowserClient; isStarted: boolean; constructor(params: { id: string; definition: AgentDef; config: z__default.output; life: LifeClient; }); /** * Start the agent and join the transport room * @returns Server response on successful start * @throws Error if the agent fails to start */ start(scope: AgentScope): Promise; /** * Stop the agent and leave the transport room * @returns Server response on successful stop * @throws Error if the agent fails to stop */ stop(): Promise; /** * Restart the agent by stopping and starting it */ restart(): Promise; enableVoiceIn(): Promise; enableVoiceOut(): Promise; disableVoiceIn(): Promise; disableVoiceOut(): Promise; /** * Get agent information from the server * @returns Agent information including status and metrics * @throws Error if unable to retrieve agent info */ info(): Promise | null; status: "stopped" | "starting" | "running" | "stopping"; restartCount: number; cpu: { usedPercent: number; usedNs: number; }; memory: { usedPercent: number; totalBytes: number; freeBytes: number; usedBytes: number; }; lastStartedAt?: number | undefined; lastSeenAt?: number | undefined; }]>; } type AgentClientPluginsDefinition = PluginClientDefinition[]; type AgentClientDefinition = { name: string; plugins: AgentClientPluginsDefinition; pluginConfigs: Record; $serverDef: AgentDefinition; }; type TypedAgentClientBuilder = Omit & { [PluginDef in AgentClientDef["plugins"][number] as ToMethodName]: AgentClientBuilderPluginMethod; }, Excluded>; type AgentClientBuilderPluginMethod = ["config"], "input">>(config: C) => PluginName extends string ? TypedAgentClientBuilder["config"], "output"> & C; }; }, Excluded | PluginName> : never; declare const __plugins: unique symbol; type AgentClientParam = Opaque & { [Plugin in Plugins[number] as Plugin["def"]["name"]]: Override; server: PluginConfig; }>, _internal extends true ? "atoms" : never, Any>; }>> & { [__plugins]?: Plugins; }; declare const parseAgentClientParam: > | null>(agent: Agent) => Agent extends { [__plugins]?: infer Plugins extends { def: PluginClientDefinition; }[]; } ? AgentClientParam : null; type AgentClientFromBuild = ToPublic & { [PluginName in keyof ClientBuild[Name]["plugins"]]: Without, "atoms", PluginClientAtoms<() => ClientBuild[Name]["plugins"][PluginName]["$types"]["atoms"]>>, keyof InstanceType> & InstanceType; }>; /** * Builder class for the plugin client definition. * Do not use directly, use `definePluginClient()` instead. */ declare class PluginClientBuilder { readonly def: PluginClientDef; constructor(definition: PluginClientDef); /** * ### `.dependencies()` * * Specify other plugins clients as required by this plugin client. * * Their config, atoms, and class can then be accessed from `dependencies.*` inside the plugin client's class and atoms. * * @see TODO: Add docs link * * @example * ```ts * const pluginClient = definePluginClient("my-plugin") * .dependencies([anotherPluginClient]) * .atoms(({ dependencies }) => { * // Obtain the atoms of the dependency plugin client * const anotherPluginAtoms = dependencies.anotherPlugin.atoms(); * // ... * }); * ``` *   * * --- * @param plugins - The dependencies definitions. * @returns TypedPluginClientBuilder */ dependencies(plugins: Plugins): TypedPluginClientBuilder; }>, Excluded | "dependencies">; /** * ### `.config()` * * Add a configuration that users can provide to tweak plugin client's behavior. * * @see TODO: Add docs link * * @example * ```ts * const myPluginClient = definePluginClient("my-plugin") * .config({ schema: z.object({ refreshRate: z.number() }) }); * * const myAgentClient = defineAgentClient("my-agent") * .plugins([myPluginClient]) * .myPlugin({ refreshRate: 1000 }); // <-- Here * ``` *   * * --- * * The provided config can then be accessed from `plugin.config` inside atoms and class. * * @example * ```ts * const pluginClient = definePluginClient("my-plugin") * .config({ schema: z.object({ refreshRate: z.number() }) }); * .atoms(({ config }) => { * const refreshRate = config.refreshRate; // <-- Here * }); * ``` *   * * --- * @param config - The config definition. * @returns TypedPluginClientBuilder */ config(config: ZodObjectWithTelemetry): TypedPluginClientBuilder<{ [K in keyof { [I in keyof PluginClientDef]: I extends "config" ? ZodObjectWithTelemetry : PluginClientDef[I]; }]: { [I in keyof PluginClientDef]: I extends "config" ? ZodObjectWithTelemetry : PluginClientDef[I]; }[K]; }, "config" | "$config" | Excluded>; /** * ### `.$config()` * * Define plugin client config from the output of `definePluginClientConfig()`. * * @see TODO: Add docs link for `definePluginClientConfig()` * * --- * @param config - The config definition. * @returns TypedPluginClientBuilder */ $config>(config: ConfigDef): TypedPluginClientBuilder, Excluded | "config" | "$config">; /** * ### `.class()` * * TODO * * @see TODO: Add docs link * * --- * @param input - The class definition. * @returns TypedPluginClientBuilder */ class>(extension: Extension): TypedPluginClientBuilder, Excluded | "class">; /** * ### `.atoms()` * * Add reactive states (atoms) that can then be consumed from various UI frameworks * (React, Vue, Svelte, etc.) to render the plugin data in real-time on the user interface. * * Atoms are powered by [nanostores](https://github.com/nanostores/nanostores). * * @see TODO: Add docs link * * @example * ```ts * import { onMount } from "nanostores"; * * const pluginClient = definePluginClient("my-plugin") * .atoms(({ plugin }) => { * const value = atom(0); * onMount(() => { * setInterval(async () => { * const context = await plugin.context.get(); * value.set(context.value + 1); * }, 1000); * }); * return { value }; * }); * ``` *   * * --- * * Then from a React component, you can render the `value` atom: * ```ts * import { useStore } from "nanostores/react"; * * export default function Page() { * const agent = useAgent("my-agent"); * const value = useStore(agent.myPlugin.atoms.value); * return
{value}
; * }; * ``` *   * * --- * @param definition - The atoms definition. * @returns TypedPluginClientBuilder */ atoms>(atoms: Atoms): TypedPluginClientBuilder, Excluded | "atoms">; } type ServerPluginShape = { def: PluginDefinition; }; /** * ### `definePluginClient()` * * Define a new Life.js plugin client. * * @see TODO: Add docs link */ declare function definePluginClient(name: Name): PluginClientBuilder<{ readonly name: Name; readonly config: ZodObjectWithTelemetry, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: (((ServerPlugin extends ServerPluginShape ? ServerPlugin["def"] : PluginDefinition) extends infer T_1 extends object ? { [I in keyof T_1 as I extends "dependencies" ? never : I]: T_1[I]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never) & { dependencies: []; }; }, never>; type PluginClientDependenciesDefinition = Without[]; type PluginClientConfigDefinition = ZodObjectWithTelemetry; type PluginClientConfig = T extends "input" ? z__default.input : z__default.output; type PluginClientProvidedConfigs = { client: PluginClientConfig; server: PluginConfig; }; type PluginClientParams> = { agent: ToPublic>; plugin: ToPublic, "atoms">>; dependencies: ToPublic>; telemetry: TelemetryClient; }; type PluginClientExtensionDefinition = >(params: Loose extends false ? PluginClientParams : Any) => ClassShape; type PluginClientAtom = { store: WritableAtom | ReadableAtom; refresh: () => Promise; }; type PluginClientAtomDefinition = { name: Name; create: (...params: Any[]) => PluginClientAtom; }; type PluginClientAtomsDefinition = >(params: Loose extends false ? PluginClientParams : Any) => { [K in keyof Names]: PluginClientAtomDefinition; }; type PluginClientAtoms = { [AtomDef in ReturnType[number] as AtomDef["name"]]: AtomDef["create"]; }; type PluginClientAccessor> = InstanceType> & { config: PluginClientConfig; $types: AssertPublic<{ clientDef: PluginClientDef; serverDef: PluginClientDef["$serverDef"]; clientConfig: ProvidedConfigs["client"]; serverConfig: ProvidedConfigs["server"]; }>; atoms: PluginClientAtoms; } & (PluginClientDef["$serverDef"] extends PluginDefinition ? { server: PluginAccessor; } : unknown); type PluginClientDependenciesAccessor = { [DependencyDef in DependenciesDef[number] as DependencyDef["name"]]: Without; server: PluginConfig; }>, HideAtoms extends true ? "atoms" : never>; }; interface PluginClientDefinition { name: string; dependencies: PluginClientDependenciesDefinition; config: PluginClientConfigDefinition; class: PluginClientExtensionDefinition; atoms: PluginClientAtomsDefinition; $serverDef: PluginDefinition; } type TypedPluginClientBuilder = Omit, Excluded>; declare class AgentClientBuilder { readonly def: AgentClientDef; constructor(definition: AgentClientDef); /** * Register plugins to extend the agent client features. * Defaults to `[generation, memories, stores, actions, percepts]` plugins if not specified. * * In case you want to register custom plugins and still keep the defaults you can do: * ```ts * import { defaults } from "life/server"; * * defineAgent("my-agent").plugins([...defaults.plugins, myCustomPlugin]); * ``` * * Or if you want only some of the defaults, you can do: * ```ts * import { defaults } from "life/server"; * * defineAgent("my-agent").plugins([defaults.plugins.generation, defaults.plugins.memories]); * ``` */ plugins(plugins: Plugins): TypedAgentClientBuilder, "pluginConfigs", { [K in Plugins[number] as K["def"]["name"]]: PluginClientConfig; }>, Excluded | "plugins">; static withPluginsMethods>(builder: Builder): Builder; } declare function defineAgentClient(name: ServerAgent["def"]["name"]): TypedAgentClientBuilder<{ readonly name: ServerAgent["def"]["name"]; readonly plugins: ({ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin, telemetry }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs_1>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs>) => [{ readonly name: "status"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<{ listening: boolean; thinking: boolean; speaking: boolean; } | null> & object; refresh: () => Promise; }; }, { readonly name: "messages"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]> & object; refresh: () => Promise; }; }]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; } | { readonly name: "memories"; readonly config: ZodObjectWithTelemetry, "output">; readonly dependencies: { readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin, telemetry }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs_1>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs>) => [{ readonly name: "status"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<{ listening: boolean; thinking: boolean; speaking: boolean; } | null> & object; refresh: () => Promise; }; }, { readonly name: "messages"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]> & object; refresh: () => Promise; }; }]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }[]; readonly class: , "output">, ZodObjectWithTelemetry>>; }, z__default.core.$strip>, "output">>>(_: PluginClientParams<{ readonly name: "memories"; readonly config: ZodObjectWithTelemetry, "output">; readonly dependencies: { readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs_1>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin, telemetry }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: ; }, z__default.core.$strip>, "output">, ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">>>({ plugin }: PluginClientParams<{ readonly name: "generation"; readonly config: ZodObjectWithTelemetry; }, z__default.core.$strip>, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs_2>) => { new (): { continue(params: { interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; decide(params: { messages: ({ role: "user"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "system"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; } | { role: "agent"; id: string; createdAt: number; lastUpdated: number; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; say(params: { text: string; interrupt?: false | "abrupt" | "smooth" | undefined; preventInterruption?: boolean | undefined; }): Promise; interrupt(params: { reason: string; author: "user" | "application"; force?: boolean | undefined; }): Promise; messages: { create: (params: { message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; update: (params: { id: string; role: "user" | "system" | "agent" | "tool"; message: { role: "user"; content?: string | undefined; } | { role: "system"; content?: string | undefined; } | { role: "agent"; content?: string | undefined; toolsRequests?: { toolRequestId: string; toolName: string; toolInput: Record; }[] | undefined; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; toolOutput?: Record | undefined; toolError?: string | undefined; }; }) => Promise; get: () => ({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]; }; }; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }, ProvidedConfigs_1>) => [{ readonly name: "status"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<{ listening: boolean; thinking: boolean; speaking: boolean; } | null> & object; refresh: () => Promise; }; }, { readonly name: "messages"; readonly create: () => { store: nanostores.PreinitializedWritableAtom<({ role: "user"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "system"; content: string; id: string; createdAt: number; lastUpdated: number; } | { role: "agent"; content: string; toolsRequests: { toolRequestId: string; toolName: string; toolInput: Record; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]> & object; refresh: () => Promise; }; }]; readonly $serverDef: { name: "generation"; config: ZodObjectWithTelemetry; scoreOutThreshold: z__default.ZodPrefault; prePaddingChunks: z__default.ZodPrefault; postPaddingChunks: z__default.ZodPrefault; minVoiceInterruptionMs: z__default.ZodPrefault; }, z__default.core.$strip>>; endOfTurnDetection: z__default.ZodPrefault; minTimeoutMs: z__default.ZodPrefault; maxTimeoutMs: z__default.ZodPrefault; }, z__default.core.$strip>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>>; status: z__default.ZodPrefault; thinking: z__default.ZodPrefault; speaking: z__default.ZodPrefault; }, z__default.core.$strip>>; voiceEnabled: z__default.ZodPrefault; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "messages.create"; dataSchema: z__default.ZodObject<{ message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "messages.update"; dataSchema: z__default.ZodObject<{ id: z__default.ZodString; role: z__default.ZodEnum<{ user: "user"; system: "system"; agent: "agent"; tool: "tool"; }>; message: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ role: z__default.ZodLiteral<"user">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; }, z__default.core.$strip>], "role">; }, z__default.core.$strip>; }, { name: "user.audio-chunk"; dataSchema: z__default.ZodObject<{ audioChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }, { name: "user.voice-start"; }, { name: "user.voice-chunk"; dataSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"voice">; voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"padding">; voiceChunk: z__default.ZodCustom, Int16Array>; paddingSide: z__default.ZodEnum<{ pre: "pre"; post: "post"; }>; paddingIndex: z__default.ZodNumber; }, z__default.core.$strip>], "type">; }, { name: "user.voice-end"; }, { name: "user.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "user.interrupted"; }, { name: "agent.thinking-start"; }, { name: "agent.thinking-end"; }, { name: "agent.speaking-start"; }, { name: "agent.speaking-end"; }, { name: "agent.continue"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.decide"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "agent.say"; dataSchema: z__default.ZodObject<{ interrupt: z__default.ZodPrefault, z__default.ZodLiteral]>>; preventInterruption: z__default.ZodPrefault; text: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.interrupt"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; force: z__default.ZodPrefault; }, z__default.core.$strip>; }, { name: "agent.resources-request"; }, { name: "agent.resources-response"; dataSchema: z__default.ZodObject<{ requestId: z__default.ZodString; resources: z__default.ZodObject<{ messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; tools: z__default.ZodArray, z__default.ZodObject>; output: z__default.ZodCustom, z__default.ZodObject>; }, z__default.core.$strip>; run: z__default.ZodFunction], null>, z__default.ZodUnion>; error: z__default.ZodOptional; }, z__default.core.$strip>, z__default.ZodPromise>; error: z__default.ZodOptional; }, z__default.core.$strip>>]>>; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }, { name: "agent.tool-requests"; dataSchema: z__default.ZodObject<{ requests: z__default.ZodArray; }, z__default.core.$strip>>; }, z__default.core.$strip>; }, { name: "agent.interrupted"; dataSchema: z__default.ZodObject<{ reason: z__default.ZodString; forced: z__default.ZodBoolean; author: z__default.ZodEnum<{ user: "user"; application: "application"; }>; }, z__default.core.$strip>; }, { name: "agent.text-chunk"; dataSchema: z__default.ZodObject<{ textChunk: z__default.ZodString; }, z__default.core.$strip>; }, { name: "agent.voice-chunk"; dataSchema: z__default.ZodObject<{ voiceChunk: z__default.ZodCustom, Int16Array>; }, z__default.core.$strip>; }]; handlers: [...never[], { name: "maintain-status"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "maintain-messages"; mode: "block"; state: never; onEvent: (params: unknown) => string | undefined; }, { name: "receive-user-audio"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "detect-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "transcribe-user-voice"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "detect-end-of-turn"; mode: "stream"; state: never; onEvent: (params: unknown) => Promise; }, { name: "generate-agent-response"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-resources-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "handle-tools-requests"; mode: "block"; state: never; onEvent: (params: unknown) => void; }, { name: "stream-outgoing-audio"; mode: "stream"; state: never; onEvent: (params: unknown) => void; }]; } & { dependencies: []; }; }[]; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "memories"; config: ZodObjectWithTelemetry>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]>, Map; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]>>>; memoriesLastTimestamp: z__default.ZodPrefault, Map>>; processedRequestsIds: z__default.ZodPrefault, Set>>; computedMemoriesCache: z__default.ZodPrefault, Map>>; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "cache-build"; dataSchema: z__default.ZodObject<{ messagesHash: z__default.ZodString; memories: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "cache-memory"; dataSchema: z__default.ZodObject<{ name: z__default.ZodString; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; timestamp: z__default.ZodNumber; }, z__default.core.$strip>; }]; handlers: never[]; } & { dependencies: []; }; }, ProvidedConfigs>) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "memories"; config: ZodObjectWithTelemetry>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]>, Map; }[]; id: string; createdAt: number; lastUpdated: number; } | { role: "tool"; toolRequestId: string; toolName: string; toolSuccess: boolean; id: string; createdAt: number; lastUpdated: number; toolOutput?: Record | undefined; toolError?: string | undefined; })[]>>>; memoriesLastTimestamp: z__default.ZodPrefault, Map>>; processedRequestsIds: z__default.ZodPrefault, Set>>; computedMemoriesCache: z__default.ZodPrefault, Map>>; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "cache-build"; dataSchema: z__default.ZodObject<{ messagesHash: z__default.ZodString; memories: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; }, z__default.core.$strip>; }, { name: "cache-memory"; dataSchema: z__default.ZodObject<{ name: z__default.ZodString; messages: z__default.ZodArray; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"system">; content: z__default.ZodPrefault; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"agent">; content: z__default.ZodPrefault; toolsRequests: z__default.ZodPrefault; }, z__default.core.$strip>>>; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>, z__default.ZodObject<{ role: z__default.ZodLiteral<"tool">; toolRequestId: z__default.ZodString; toolName: z__default.ZodString; toolSuccess: z__default.ZodBoolean; toolOutput: z__default.ZodOptional>; toolError: z__default.ZodOptional; id: z__default.ZodString; createdAt: z__default.ZodNumber; lastUpdated: z__default.ZodNumber; }, z__default.core.$strip>], "role">>; timestamp: z__default.ZodNumber; }, z__default.core.$strip>; }]; handlers: never[]; } & { dependencies: []; }; } | { readonly name: "stores"; readonly config: ZodObjectWithTelemetry, "output">; readonly dependencies: []; readonly class: (..._args: Any[]) => { new (): {}; }; readonly atoms: (..._args: Any[]) => never[]; readonly $serverDef: { name: "stores"; config: ZodObjectWithTelemetry>>; }, z__default.core.$strip>, "output">; context: ZodObjectWithTelemetry>; }, z__default.core.$strip>, "output">; events: [{ readonly name: "plugin.start"; readonly dataSchema: z__default.ZodObject<{ isRestart: z__default.ZodPrefault; restartCount: z__default.ZodPrefault; }, z__default.core.$strip>; }, { readonly name: "plugin.stop"; }, { readonly name: "plugin.test"; }, { readonly name: "plugin.error"; readonly dataSchema: z__default.ZodObject<{ error: z__default.ZodCustom; event: z__default.ZodObject<{ id: z__default.ZodString; name: z__default.ZodString; urgent: z__default.ZodPrefault; data: z__default.ZodPrefault; created: z__default.ZodObject<{ at: z__default.ZodNumber; by: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{ type: z__default.ZodLiteral<"handler">; plugin: z__default.ZodString; handler: z__default.ZodString; event: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"server">; name: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodObject<{ type: z__default.ZodLiteral<"client">; name: z__default.ZodString; }, z__default.core.$strip>], "type">; }, z__default.core.$strip>; edited: z__default.ZodDefault; reason: z__default.ZodString; dataBefore: z__default.ZodAny; dataAfter: z__default.ZodAny; }, z__default.core.$strip>>, z__default.ZodLiteral]>>; dropped: z__default.ZodPrefault; reason: z__default.ZodString; }, z__default.core.$strip>, z__default.ZodLiteral]>>; contextChanges: z__default.ZodPrefault>>; }, z__default.core.$strip>; }, z__default.core.$strip>; }] | [{ name: "update-store-data"; dataSchema: z__default.ZodObject<{ name: z__default.ZodString; data: z__default.ZodAny; }, z__default.core.$strip>; }, { name: "retrieve-store-data"; dataSchema: z__default.ZodObject<{ name: z__default.ZodString; }, z__default.core.$strip>; }]; handlers: never[]; } & { dependencies: []; }; })[]; readonly pluginConfigs: {}; readonly $serverDef: ServerAgent["def"]; }, never>; type ClientCache = Map>; declare global { var __LIFE_CLIENT_CACHE__: ClientCache | undefined; } /** * Creates a new Life.js client instance, which is the main entry point * to interact with your Life.js agents. * * @param options - Client options. * @returns LifeClient instance. */ declare const createLifeClient: (options?: z__default.input) => ToPublic; export { AgentClient as A, type ClientBuild as C, LifeClient as L, type PluginClientProvidedConfigs as P, type TypedPluginClientBuilder as T, type PluginClientParams as a, PluginClientBuilder as b, createLifeClient as c, defineAgentClient as d, definePluginClient as e, type AgentClientFromBuild as f, type AgentClientParam as g, type ClientBuildType as h, importClientBuild as i, parseAgentClientParam as p };