@pinecall/protocol 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,604 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * The door the public came through: a phone call over SIP, the browser widget over WebRTC, or
4
+ * WhatsApp text.
5
+ */
6
+ export declare const ChannelSchema: z.ZodEnum<{
7
+ phone: "phone";
8
+ web: "web";
9
+ whatsapp: "whatsapp";
10
+ }>;
11
+ export type Channel = z.infer<typeof ChannelSchema>;
12
+ /** Inbound: the public reached the agent. Outbound: the agent reached out (a dial). */
13
+ export declare const DirectionSchema: z.ZodEnum<{
14
+ inbound: "inbound";
15
+ outbound: "outbound";
16
+ }>;
17
+ export type Direction = z.infer<typeof DirectionSchema>;
18
+ /**
19
+ * Which of the two worlds a key opens, and so which world an agent is held in and a call ran in. A
20
+ * key is issued into one; an agent registered on it and every call it takes carry that one; a door
21
+ * claimed in one is refused to a key of the other. `sandbox` is where things are written and
22
+ * `production` is what the public reaches — and whether a sandbox agent is one PERSON's copy or
23
+ * the team's shared one is not this field: it is whether the key that registered it names a
24
+ * person. Every key issued before the field existed is production.
25
+ */
26
+ export declare const EnvSchema: z.ZodEnum<{
27
+ production: "production";
28
+ sandbox: "sandbox";
29
+ }>;
30
+ export type Env = z.infer<typeof EnvSchema>;
31
+ /**
32
+ * What a console may ask of the process standing in the agent's directory, relayed by the gateway:
33
+ * a written call to the class mounted there (chat), a simulated caller from its personas, its
34
+ * goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
35
+ * goldens, a call promoted to a candidate file, the drift of the last two windows, and the
36
+ * reproductions a broken run left on that disk. Everything else a console needs is a door of the
37
+ * gateway.
38
+ */
39
+ export declare const DevVerbSchema: z.ZodEnum<{
40
+ "chat.roster": "chat.roster";
41
+ "chat.start": "chat.start";
42
+ "chat.say": "chat.say";
43
+ "chat.end": "chat.end";
44
+ "simulate.roster": "simulate.roster";
45
+ "simulate.start": "simulate.start";
46
+ "goldens.roster": "goldens.roster";
47
+ "goldens.run": "goldens.run";
48
+ "knowledge.roster": "knowledge.roster";
49
+ "knowledge.push": "knowledge.push";
50
+ "knowledge.eval": "knowledge.eval";
51
+ "memory.roster": "memory.roster";
52
+ "memory.eval": "memory.eval";
53
+ "memory.extraction": "memory.extraction";
54
+ "promote.roster": "promote.roster";
55
+ "promote.write": "promote.write";
56
+ "drift.read": "drift.read";
57
+ "reproductions.roster": "reproductions.roster";
58
+ "reproductions.read": "reproductions.read";
59
+ }>;
60
+ export type DevVerb = z.infer<typeof DevVerbSchema>;
61
+ /**
62
+ * Why the call is over. Who hung up, what failed before anybody could, drained: the platform took
63
+ * the worker down (a deploy, a stop) with the call still on it, or app_detached: the app holding
64
+ * the agent closed its socket mid-call, so nothing was rendering the prompt or answering a tool —
65
+ * both are nobody's fault and neither is an error.
66
+ */
67
+ export declare const EndReasonSchema: z.ZodEnum<{
68
+ caller_hung_up: "caller_hung_up";
69
+ agent_hung_up: "agent_hung_up";
70
+ supervisor_ended: "supervisor_ended";
71
+ transferred: "transferred";
72
+ no_answer: "no_answer";
73
+ busy: "busy";
74
+ dial_failed: "dial_failed";
75
+ timeout: "timeout";
76
+ drained: "drained";
77
+ app_detached: "app_detached";
78
+ error: "error";
79
+ }>;
80
+ export type EndReason = z.infer<typeof EndReasonSchema>;
81
+ /** Whose action ended the call. platform covers timeouts, errors and a drained worker. */
82
+ export declare const EndedBySchema: z.ZodEnum<{
83
+ agent: "agent";
84
+ caller: "caller";
85
+ supervisor: "supervisor";
86
+ platform: "platform";
87
+ }>;
88
+ export type EndedBy = z.infer<typeof EndedBySchema>;
89
+ /**
90
+ * What one judge answered about a finished call. Held: the rule held. Broken: it did not, and the
91
+ * reason names the evidence. Deferred: the judge was asked and could not settle it. Skipped:
92
+ * nobody asked it — no model was reachable inside the call's judging budget.
93
+ */
94
+ export declare const ScoreVerdictSchema: z.ZodEnum<{
95
+ held: "held";
96
+ broken: "broken";
97
+ deferred: "deferred";
98
+ skipped: "skipped";
99
+ }>;
100
+ export type ScoreVerdict = z.infer<typeof ScoreVerdictSchema>;
101
+ /**
102
+ * Cold: the caller is sent on and the agent leaves. Warm: the agent stays on the line until the
103
+ * other side answers, then leaves.
104
+ */
105
+ export declare const TransferModeSchema: z.ZodEnum<{
106
+ cold: "cold";
107
+ warm: "warm";
108
+ }>;
109
+ export type TransferMode = z.infer<typeof TransferModeSchema>;
110
+ /**
111
+ * Which region of the prompt a block lives in: static, before the history, cached by the provider;
112
+ * or dynamic, after the history, replaced every turn. The append-only history in between is never
113
+ * written by the app.
114
+ */
115
+ export declare const PromptRegionSchema: z.ZodEnum<{
116
+ static: "static";
117
+ dynamic: "dynamic";
118
+ }>;
119
+ export type PromptRegion = z.infer<typeof PromptRegionSchema>;
120
+ /**
121
+ * How the knowledge base reaches the model: retrieved, the platform runs search itself when the
122
+ * caller's turn ends; or tool, the model calls search when it decides to. Either way the chunks
123
+ * arrive as a tool result.
124
+ */
125
+ export declare const DocsModeSchema: z.ZodEnum<{
126
+ retrieved: "retrieved";
127
+ tool: "tool";
128
+ }>;
129
+ export type DocsMode = z.infer<typeof DocsModeSchema>;
130
+ /**
131
+ * The two tools the platform runs on the app's behalf: recall reads the contact's facts out of
132
+ * memory, search reads chunks out of the knowledge base. The app declares memory and docs and
133
+ * writes neither method; the platform runs the lookup, and the answer reaches the model as a tool
134
+ * result rather than as part of the prompt.
135
+ */
136
+ export declare const PlatformToolSchema: z.ZodEnum<{
137
+ recall: "recall";
138
+ search: "search";
139
+ }>;
140
+ export type PlatformTool = z.infer<typeof PlatformToolSchema>;
141
+ /**
142
+ * One named block of the prompt and the region it lives in. The default layout, when an agent
143
+ * declares none, is identity, knowledge and tools (static), then the history, then view (dynamic).
144
+ * A block's text is written per call with prompt.set.
145
+ */
146
+ export declare const PromptBlockSpecSchema: z.ZodObject<{
147
+ name: z.ZodString;
148
+ region: z.ZodEnum<{
149
+ static: "static";
150
+ dynamic: "dynamic";
151
+ }>;
152
+ }, z.core.$strict>;
153
+ export type PromptBlockSpec = z.infer<typeof PromptBlockSpecSchema>;
154
+ /**
155
+ * What the platform believes the person on the line is doing right now. The states are the
156
+ * session's own.
157
+ */
158
+ export declare const UserStateSchema: z.ZodEnum<{
159
+ listening: "listening";
160
+ speaking: "speaking";
161
+ away: "away";
162
+ }>;
163
+ export type UserState = z.infer<typeof UserStateSchema>;
164
+ /**
165
+ * What the agent is doing right now, in the session's own words: warming up, waiting, hearing the
166
+ * caller, generating, or playing audio.
167
+ */
168
+ export declare const AgentStateSchema: z.ZodEnum<{
169
+ listening: "listening";
170
+ speaking: "speaking";
171
+ initializing: "initializing";
172
+ idle: "idle";
173
+ thinking: "thinking";
174
+ }>;
175
+ export type AgentState = z.infer<typeof AgentStateSchema>;
176
+ /**
177
+ * Who a participant is to the call: the person the agent serves (over SIP or the widget), the
178
+ * agent itself, a supervisor who took a seat in the room, a listener who only hears, or a second
179
+ * SIP leg that room.invite brought in.
180
+ */
181
+ export declare const ParticipantKindSchema: z.ZodEnum<{
182
+ agent: "agent";
183
+ caller: "caller";
184
+ supervisor: "supervisor";
185
+ listener: "listener";
186
+ sip: "sip";
187
+ }>;
188
+ export type ParticipantKind = z.infer<typeof ParticipantKindSchema>;
189
+ /** What a track carries: a microphone's audio, a camera's video, or a screen share. */
190
+ export declare const TrackKindSchema: z.ZodEnum<{
191
+ audio: "audio";
192
+ video: "video";
193
+ screen: "screen";
194
+ }>;
195
+ export type TrackKind = z.infer<typeof TrackKindSchema>;
196
+ /** Where a track comes from, as livekit's TrackSource names it, in lower case. */
197
+ export declare const TrackSourceSchema: z.ZodEnum<{
198
+ unknown: "unknown";
199
+ microphone: "microphone";
200
+ camera: "camera";
201
+ screen_share: "screen_share";
202
+ screen_share_audio: "screen_share_audio";
203
+ }>;
204
+ export type TrackSource = z.infer<typeof TrackSourceSchema>;
205
+ /**
206
+ * Where an outside fact came from: the tenant's backend over the app socket (app), or a
207
+ * participant's browser over the DataChannel (participant).
208
+ */
209
+ export declare const EventSourceSchema: z.ZodEnum<{
210
+ app: "app";
211
+ participant: "participant";
212
+ }>;
213
+ export type EventSource = z.infer<typeof EventSourceSchema>;
214
+ /**
215
+ * Who may see a field of the app's state: everyone in the call (public), the tenant's own readers
216
+ * (tenant, the default for a field never declared), or nobody without masking (pii).
217
+ */
218
+ export declare const VisibilitySchema: z.ZodEnum<{
219
+ public: "public";
220
+ tenant: "tenant";
221
+ pii: "pii";
222
+ }>;
223
+ export type Visibility = z.infer<typeof VisibilitySchema>;
224
+ /**
225
+ * Which projection a sink applies before a state or an entry leaves the platform: public for a
226
+ * participant reading its own call, tenant for the tenant's readers. The contract is
227
+ * docs/protocol/projections.md; a client never applies one.
228
+ */
229
+ export declare const ProjectionSchema: z.ZodEnum<{
230
+ public: "public";
231
+ tenant: "tenant";
232
+ }>;
233
+ export type Projection = z.infer<typeof ProjectionSchema>;
234
+ /**
235
+ * Who is on the line, as far as the platform knows. Everything is optional: a web visitor may be
236
+ * nobody yet.
237
+ */
238
+ export declare const ContactSchema: z.ZodObject<{
239
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
+ external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
+ }, z.core.$strict>;
245
+ export type Contact = z.infer<typeof ContactSchema>;
246
+ /**
247
+ * One door to an agent: a channel and, for phone and WhatsApp, the number that answers. A number
248
+ * is a route, never an agent.
249
+ */
250
+ export declare const RouteSchema: z.ZodObject<{
251
+ channel: z.ZodEnum<{
252
+ phone: "phone";
253
+ web: "web";
254
+ whatsapp: "whatsapp";
255
+ }>;
256
+ number: z.ZodNullable<z.ZodString>;
257
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ }, z.core.$strict>;
259
+ export type Route = z.infer<typeof RouteSchema>;
260
+ /** The human who sent a supervise verb, as the token that let them in names them. */
261
+ export declare const SupervisorSchema: z.ZodObject<{
262
+ id: z.ZodString;
263
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ }, z.core.$strict>;
265
+ export type Supervisor = z.infer<typeof SupervisorSchema>;
266
+ /**
267
+ * What the app declares about one tool: the contract the model sees and the rules the platform
268
+ * enforces before running it.
269
+ */
270
+ export declare const ToolSpecSchema: z.ZodObject<{
271
+ name: z.ZodString;
272
+ description: z.ZodString;
273
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
274
+ side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
275
+ read: "read";
276
+ write: "write";
277
+ irreversible: "irreversible";
278
+ }>>>;
279
+ confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
+ pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
281
+ timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
282
+ }, z.core.$strict>;
283
+ export type ToolSpec = z.infer<typeof ToolSpecSchema>;
284
+ /**
285
+ * What came back from running a tool in the app's process. Either an output or an error, never
286
+ * both.
287
+ */
288
+ export declare const ToolResultSchema: z.ZodObject<{
289
+ call_id: z.ZodString;
290
+ name: z.ZodString;
291
+ output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
292
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
+ duration_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
295
+ }, z.core.$strict>;
296
+ export type ToolResult = z.infer<typeof ToolResultSchema>;
297
+ /**
298
+ * One thing remembered about a contact: a sentence, where it came from, and how well it matched
299
+ * when recalled.
300
+ */
301
+ export declare const MemoryFactSchema: z.ZodObject<{
302
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
+ text: z.ZodString;
304
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
305
+ score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
306
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
307
+ }, z.core.$strict>;
308
+ export type MemoryFact = z.infer<typeof MemoryFactSchema>;
309
+ /**
310
+ * One operation against the contact's memory: a recall during the turn, a remember at hangup, or a
311
+ * forget on request.
312
+ */
313
+ export declare const MemoryOpSchema: z.ZodObject<{
314
+ op: z.ZodEnum<{
315
+ recall: "recall";
316
+ remember: "remember";
317
+ forget: "forget";
318
+ }>;
319
+ contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
+ query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
321
+ facts: z.ZodArray<z.ZodObject<{
322
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
+ text: z.ZodString;
324
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
326
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ }, z.core.$strict>>;
328
+ took_ms: z.ZodNumber;
329
+ }, z.core.$strict>;
330
+ export type MemoryOp = z.infer<typeof MemoryOpSchema>;
331
+ /** One chunk of the knowledge base that retrieval put in front of the model for this turn. */
332
+ export declare const DocSourceSchema: z.ZodObject<{
333
+ id: z.ZodString;
334
+ path: z.ZodString;
335
+ heading: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
+ score: z.ZodNumber;
337
+ excerpt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
+ }, z.core.$strict>;
339
+ export type DocSource = z.infer<typeof DocSourceSchema>;
340
+ /** The exchange rate the cost was computed with, stated so the number can be reproduced. */
341
+ export declare const CostRateSchema: z.ZodObject<{
342
+ currency: z.ZodLiteral<"EUR">;
343
+ usd_to_eur: z.ZodNumber;
344
+ as_of: z.ZodString;
345
+ }, z.core.$strict>;
346
+ export type CostRate = z.infer<typeof CostRateSchema>;
347
+ /** One priced line: a model, what was counted, how much, and what it came to. */
348
+ export declare const CostRowSchema: z.ZodObject<{
349
+ provider: z.ZodString;
350
+ model: z.ZodString;
351
+ unit: z.ZodEnum<{
352
+ input_tokens: "input_tokens";
353
+ cached_input_tokens: "cached_input_tokens";
354
+ cache_creation_tokens: "cache_creation_tokens";
355
+ output_tokens: "output_tokens";
356
+ characters: "characters";
357
+ audio_seconds: "audio_seconds";
358
+ requests: "requests";
359
+ session_seconds: "session_seconds";
360
+ }>;
361
+ quantity: z.ZodNumber;
362
+ unit_price_usd: z.ZodNumber;
363
+ eur: z.ZodNumber;
364
+ }, z.core.$strict>;
365
+ export type CostRow = z.infer<typeof CostRowSchema>;
366
+ /** A usage row the price table does not know. It is listed, never priced at zero. */
367
+ export declare const UnpricedRowSchema: z.ZodObject<{
368
+ provider: z.ZodString;
369
+ model: z.ZodString;
370
+ }, z.core.$strict>;
371
+ export type UnpricedRow = z.infer<typeof UnpricedRowSchema>;
372
+ /**
373
+ * What the call cost in provider fees, informational, in euros. The runtime never prices
374
+ * commercially; this is the provider's bill as best we know it.
375
+ */
376
+ export declare const CostSchema: z.ZodObject<{
377
+ eur: z.ZodNumber;
378
+ rate: z.ZodObject<{
379
+ currency: z.ZodLiteral<"EUR">;
380
+ usd_to_eur: z.ZodNumber;
381
+ as_of: z.ZodString;
382
+ }, z.core.$strict>;
383
+ rows: z.ZodArray<z.ZodObject<{
384
+ provider: z.ZodString;
385
+ model: z.ZodString;
386
+ unit: z.ZodEnum<{
387
+ input_tokens: "input_tokens";
388
+ cached_input_tokens: "cached_input_tokens";
389
+ cache_creation_tokens: "cache_creation_tokens";
390
+ output_tokens: "output_tokens";
391
+ characters: "characters";
392
+ audio_seconds: "audio_seconds";
393
+ requests: "requests";
394
+ session_seconds: "session_seconds";
395
+ }>;
396
+ quantity: z.ZodNumber;
397
+ unit_price_usd: z.ZodNumber;
398
+ eur: z.ZodNumber;
399
+ }, z.core.$strict>>;
400
+ unpriced: z.ZodArray<z.ZodObject<{
401
+ provider: z.ZodString;
402
+ model: z.ZodString;
403
+ }, z.core.$strict>>;
404
+ }, z.core.$strict>;
405
+ export type Cost = z.infer<typeof CostSchema>;
406
+ /** Which voice speaks for the agent: the name it was asked for, or the id the provider knows it by. */
407
+ export declare const VoiceConfigSchema: z.ZodObject<{
408
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ voice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
+ }, z.core.$strict>;
413
+ export type VoiceConfig = z.infer<typeof VoiceConfigSchema>;
414
+ /** Which model does a job (the LLM, or the STT), and the one or two knobs worth turning. */
415
+ export declare const ModelConfigSchema: z.ZodObject<{
416
+ provider: z.ZodString;
417
+ model: z.ZodString;
418
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
419
+ }, z.core.$strict>;
420
+ export type ModelConfig = z.infer<typeof ModelConfigSchema>;
421
+ /** How the session decides that the caller has finished, and when the caller may interrupt. */
422
+ export declare const TurnConfigSchema: z.ZodObject<{
423
+ min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
424
+ endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
425
+ }, z.core.$strict>;
426
+ export type TurnConfig = z.infer<typeof TurnConfigSchema>;
427
+ /** How the voice says one word it would otherwise get wrong: a proper name, a brand, a street. */
428
+ export declare const PronunciationSchema: z.ZodObject<{
429
+ word: z.ZodString;
430
+ spoken: z.ZodString;
431
+ }, z.core.$strict>;
432
+ export type Pronunciation = z.infer<typeof PronunciationSchema>;
433
+ /**
434
+ * What the app declares about one field of its state: who may see it. A field never declared is
435
+ * tenant.
436
+ */
437
+ export declare const StateFieldSpecSchema: z.ZodObject<{
438
+ name: z.ZodString;
439
+ visibility: z.ZodEnum<{
440
+ public: "public";
441
+ tenant: "tenant";
442
+ pii: "pii";
443
+ }>;
444
+ }, z.core.$strict>;
445
+ export type StateFieldSpec = z.infer<typeof StateFieldSpecSchema>;
446
+ /**
447
+ * One outside event the agent accepts, and from whom. An event nobody declared is refused before
448
+ * it touches the log.
449
+ */
450
+ export declare const EventSpecSchema: z.ZodObject<{
451
+ name: z.ZodString;
452
+ from: z.ZodArray<z.ZodEnum<{
453
+ app: "app";
454
+ participant: "participant";
455
+ }>>;
456
+ }, z.core.$strict>;
457
+ export type EventSpec = z.infer<typeof EventSpecSchema>;
458
+ /** One file of knowledge, sent whole: its path as the tenant keeps it, and its text. */
459
+ export declare const KnowledgeFileSchema: z.ZodObject<{
460
+ path: z.ZodString;
461
+ text: z.ZodString;
462
+ }, z.core.$strict>;
463
+ export type KnowledgeFile = z.infer<typeof KnowledgeFileSchema>;
464
+ /**
465
+ * The knowledge base the agent answers from, and how its chunks reach the model. It is named by
466
+ * the base it was pushed under, with PUT /v1/knowledge/{base}.
467
+ */
468
+ export declare const DocsConfigSchema: z.ZodObject<{
469
+ base: z.ZodString;
470
+ mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
471
+ retrieved: "retrieved";
472
+ tool: "tool";
473
+ }>>>;
474
+ k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
475
+ min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
476
+ }, z.core.$strict>;
477
+ export type DocsConfig = z.infer<typeof DocsConfigSchema>;
478
+ /**
479
+ * How the agent opens a call, before the caller has said anything. Exactly one of the two, because
480
+ * there are only two ways to open one: `say` are the words themselves and `reply` is what the
481
+ * model is told before it finds its own. They are agent.say and agent.reply declared instead of
482
+ * called, so a class that opens every call the same way needs no onCall hook to do it, and an
483
+ * operator can turn the opening at the pipeline door without a deploy. Absent: nobody speaks until
484
+ * the caller does.
485
+ */
486
+ export declare const GreetingConfigSchema: z.ZodObject<{
487
+ say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
488
+ reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
+ allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
490
+ }, z.core.$strict>;
491
+ export type GreetingConfig = z.infer<typeof GreetingConfigSchema>;
492
+ /**
493
+ * Whether the model may end the call itself. Declaring this is what puts livekit's own end_call
494
+ * tool in front of the model; a class that says nothing here cannot hang up, and the call ends
495
+ * when the caller does or when a supervisor says so. The tool is hidden while the agent is
496
+ * greeting, because a model that can hang up on its first turn eventually does.
497
+ */
498
+ export declare const HangupConfigSchema: z.ZodObject<{
499
+ when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
500
+ }, z.core.$strict>;
501
+ export type HangupConfig = z.infer<typeof HangupConfigSchema>;
502
+ /**
503
+ * What memory keeps about a contact across calls, and what it must never keep. Both lists are in
504
+ * the tenant's own words.
505
+ */
506
+ export declare const MemoryConfigSchema: z.ZodObject<{
507
+ remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
508
+ forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
509
+ }, z.core.$strict>;
510
+ export type MemoryConfig = z.infer<typeof MemoryConfigSchema>;
511
+ /**
512
+ * What an app declares about its agent: the voice, the models, the language, the greeting, the
513
+ * tools, and who may see and send what. Every field is optional so a configure can change one
514
+ * thing.
515
+ */
516
+ export declare const AgentConfigSchema: z.ZodObject<{
517
+ prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
518
+ name: z.ZodString;
519
+ region: z.ZodEnum<{
520
+ static: "static";
521
+ dynamic: "dynamic";
522
+ }>;
523
+ }, z.core.$strict>>>>;
524
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
525
+ greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
526
+ say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
527
+ reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
528
+ allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
529
+ }, z.core.$strict>>>;
530
+ voice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
531
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
+ voice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ }, z.core.$strict>>>;
536
+ llm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
537
+ provider: z.ZodString;
538
+ model: z.ZodString;
539
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
540
+ }, z.core.$strict>>>;
541
+ stt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
542
+ provider: z.ZodString;
543
+ model: z.ZodString;
544
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
545
+ }, z.core.$strict>>>;
546
+ turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
547
+ min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
548
+ endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
549
+ }, z.core.$strict>>>;
550
+ says: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
551
+ word: z.ZodString;
552
+ spoken: z.ZodString;
553
+ }, z.core.$strict>>>>;
554
+ hears: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
555
+ knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
556
+ path: z.ZodString;
557
+ text: z.ZodString;
558
+ }, z.core.$strict>>>;
559
+ docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
560
+ base: z.ZodString;
561
+ mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
562
+ retrieved: "retrieved";
563
+ tool: "tool";
564
+ }>>>;
565
+ k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
566
+ min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
567
+ }, z.core.$strict>>>;
568
+ memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
569
+ remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
570
+ forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
571
+ }, z.core.$strict>>>;
572
+ hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
573
+ when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
574
+ }, z.core.$strict>>>;
575
+ tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
576
+ name: z.ZodString;
577
+ description: z.ZodString;
578
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
579
+ side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
580
+ read: "read";
581
+ write: "write";
582
+ irreversible: "irreversible";
583
+ }>>>;
584
+ confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
585
+ pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
586
+ timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
587
+ }, z.core.$strict>>>>;
588
+ state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
589
+ name: z.ZodString;
590
+ visibility: z.ZodEnum<{
591
+ public: "public";
592
+ tenant: "tenant";
593
+ pii: "pii";
594
+ }>;
595
+ }, z.core.$strict>>>>;
596
+ events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
597
+ name: z.ZodString;
598
+ from: z.ZodArray<z.ZodEnum<{
599
+ app: "app";
600
+ participant: "participant";
601
+ }>>;
602
+ }, z.core.$strict>>>>;
603
+ }, z.core.$strict>;
604
+ export type AgentConfig = z.infer<typeof AgentConfigSchema>;