import * as nanostores from 'nanostores'; import { L as LifeErrorUnion, a as Any, P as PluginEventsDefinition, b as PluginEvent } from './types-B6ejZKUB.js'; import { T as TypedPluginClientBuilder, P as PluginClientProvidedConfigs, a as PluginClientParams } from './create-COCmFmHD.js'; import { Z as ZodObjectWithTelemetry } from './config-n67P8tNt.js'; import z__default from 'zod'; declare const generationPluginEventsDef: [{ 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>; }]; type PluginEventDataInput = Extract, { name: Name; }> extends { data: infer Data; } ? Data : never; declare const generationPluginClient: TypedPluginClientBuilder<{ 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: PluginEventDataInput): Promise; decide(params: PluginEventDataInput): Promise; say(params: PluginEventDataInput): Promise; interrupt(params: PluginEventDataInput): Promise; messages: { create: (params: PluginEventDataInput) => Promise; update: (params: PluginEventDataInput) => 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: PluginEventDataInput): Promise; decide(params: PluginEventDataInput): Promise; say(params: PluginEventDataInput): Promise; interrupt(params: PluginEventDataInput): Promise; messages: { create: (params: PluginEventDataInput) => Promise; update: (params: PluginEventDataInput) => 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: []; }; }, "config" | "$config" | "class" | "atoms">; export { generationPluginClient as g };