@pinecall/protocol 0.5.0 → 0.6.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.
@@ -8,8 +8,8 @@ export declare const AgentConfigureSchema: z.ZodObject<{
8
8
  prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
9
9
  name: z.ZodString;
10
10
  region: z.ZodEnum<{
11
- static: "static";
12
11
  dynamic: "dynamic";
12
+ static: "static";
13
13
  }>;
14
14
  }, z.core.$strict>>>>;
15
15
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -46,10 +46,6 @@ export declare const AgentConfigureSchema: z.ZodObject<{
46
46
  knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
47
47
  path: z.ZodString;
48
48
  text: z.ZodString;
49
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
50
- retrieved: "retrieved";
51
- whole: "whole";
52
- }>>>;
53
49
  }, z.core.$strict>>>;
54
50
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
51
  base: z.ZodString;
@@ -72,9 +68,9 @@ export declare const AgentConfigureSchema: z.ZodObject<{
72
68
  description: z.ZodString;
73
69
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
74
70
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
71
+ irreversible: "irreversible";
75
72
  read: "read";
76
73
  write: "write";
77
- irreversible: "irreversible";
78
74
  }>>>;
79
75
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
76
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -84,9 +80,9 @@ export declare const AgentConfigureSchema: z.ZodObject<{
84
80
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
85
81
  name: z.ZodString;
86
82
  visibility: z.ZodEnum<{
83
+ pii: "pii";
87
84
  public: "public";
88
85
  tenant: "tenant";
89
- pii: "pii";
90
86
  }>;
91
87
  }, z.core.$strict>>>>;
92
88
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -260,8 +256,8 @@ export type PromptSet = z.infer<typeof PromptSetSchema>;
260
256
  export declare const RoomInviteSchema: z.ZodObject<{
261
257
  to: z.ZodString;
262
258
  kind: z.ZodEnum<{
263
- sip: "sip";
264
259
  participant: "participant";
260
+ sip: "sip";
265
261
  }>;
266
262
  }, z.core.$strict>;
267
263
  export type RoomInvite = z.infer<typeof RoomInviteSchema>;
@@ -286,8 +282,8 @@ export declare const SessionConfigureSchema: z.ZodObject<{
286
282
  prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
287
283
  name: z.ZodString;
288
284
  region: z.ZodEnum<{
289
- static: "static";
290
285
  dynamic: "dynamic";
286
+ static: "static";
291
287
  }>;
292
288
  }, z.core.$strict>>>>;
293
289
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -324,10 +320,6 @@ export declare const SessionConfigureSchema: z.ZodObject<{
324
320
  knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
325
321
  path: z.ZodString;
326
322
  text: z.ZodString;
327
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
328
- retrieved: "retrieved";
329
- whole: "whole";
330
- }>>>;
331
323
  }, z.core.$strict>>>;
332
324
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
333
325
  base: z.ZodString;
@@ -350,9 +342,9 @@ export declare const SessionConfigureSchema: z.ZodObject<{
350
342
  description: z.ZodString;
351
343
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
352
344
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
345
+ irreversible: "irreversible";
353
346
  read: "read";
354
347
  write: "write";
355
- irreversible: "irreversible";
356
348
  }>>>;
357
349
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
350
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -362,9 +354,9 @@ export declare const SessionConfigureSchema: z.ZodObject<{
362
354
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
363
355
  name: z.ZodString;
364
356
  visibility: z.ZodEnum<{
357
+ pii: "pii";
365
358
  public: "public";
366
359
  tenant: "tenant";
367
- pii: "pii";
368
360
  }>;
369
361
  }, z.core.$strict>>>>;
370
362
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -422,9 +414,9 @@ export declare const ToolsSetSchema: z.ZodObject<{
422
414
  description: z.ZodString;
423
415
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
424
416
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
417
+ irreversible: "irreversible";
425
418
  read: "read";
426
419
  write: "write";
427
- irreversible: "irreversible";
428
420
  }>>>;
429
421
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
422
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -37,25 +37,25 @@ export type Env = z.infer<typeof EnvSchema>;
37
37
  * gateway.
38
38
  */
39
39
  export declare const DevVerbSchema: z.ZodEnum<{
40
+ "chat.end": "chat.end";
40
41
  "chat.roster": "chat.roster";
41
- "chat.start": "chat.start";
42
42
  "chat.say": "chat.say";
43
- "chat.end": "chat.end";
44
- "simulate.roster": "simulate.roster";
45
- "simulate.start": "simulate.start";
43
+ "chat.start": "chat.start";
44
+ "drift.read": "drift.read";
46
45
  "goldens.roster": "goldens.roster";
47
46
  "goldens.run": "goldens.run";
48
- "knowledge.roster": "knowledge.roster";
49
- "knowledge.push": "knowledge.push";
50
47
  "knowledge.eval": "knowledge.eval";
51
- "memory.roster": "memory.roster";
48
+ "knowledge.push": "knowledge.push";
49
+ "knowledge.roster": "knowledge.roster";
52
50
  "memory.eval": "memory.eval";
53
51
  "memory.extraction": "memory.extraction";
52
+ "memory.roster": "memory.roster";
54
53
  "promote.roster": "promote.roster";
55
54
  "promote.write": "promote.write";
56
- "drift.read": "drift.read";
57
- "reproductions.roster": "reproductions.roster";
58
55
  "reproductions.read": "reproductions.read";
56
+ "reproductions.roster": "reproductions.roster";
57
+ "simulate.roster": "simulate.roster";
58
+ "simulate.start": "simulate.start";
59
59
  }>;
60
60
  export type DevVerb = z.infer<typeof DevVerbSchema>;
61
61
  /**
@@ -65,25 +65,25 @@ export type DevVerb = z.infer<typeof DevVerbSchema>;
65
65
  * both are nobody's fault and neither is an error.
66
66
  */
67
67
  export declare const EndReasonSchema: z.ZodEnum<{
68
- caller_hung_up: "caller_hung_up";
69
68
  agent_hung_up: "agent_hung_up";
70
- supervisor_ended: "supervisor_ended";
71
- transferred: "transferred";
72
- no_answer: "no_answer";
69
+ app_detached: "app_detached";
73
70
  busy: "busy";
71
+ caller_hung_up: "caller_hung_up";
74
72
  dial_failed: "dial_failed";
75
- timeout: "timeout";
76
73
  drained: "drained";
77
- app_detached: "app_detached";
78
74
  error: "error";
75
+ no_answer: "no_answer";
76
+ supervisor_ended: "supervisor_ended";
77
+ timeout: "timeout";
78
+ transferred: "transferred";
79
79
  }>;
80
80
  export type EndReason = z.infer<typeof EndReasonSchema>;
81
81
  /** Whose action ended the call. platform covers timeouts, errors and a drained worker. */
82
82
  export declare const EndedBySchema: z.ZodEnum<{
83
83
  agent: "agent";
84
84
  caller: "caller";
85
- supervisor: "supervisor";
86
85
  platform: "platform";
86
+ supervisor: "supervisor";
87
87
  }>;
88
88
  export type EndedBy = z.infer<typeof EndedBySchema>;
89
89
  /**
@@ -92,9 +92,9 @@ export type EndedBy = z.infer<typeof EndedBySchema>;
92
92
  * nobody asked it — no model was reachable inside the call's judging budget.
93
93
  */
94
94
  export declare const ScoreVerdictSchema: z.ZodEnum<{
95
- held: "held";
96
95
  broken: "broken";
97
96
  deferred: "deferred";
97
+ held: "held";
98
98
  skipped: "skipped";
99
99
  }>;
100
100
  export type ScoreVerdict = z.infer<typeof ScoreVerdictSchema>;
@@ -113,8 +113,8 @@ export type TransferMode = z.infer<typeof TransferModeSchema>;
113
113
  * written by the app.
114
114
  */
115
115
  export declare const PromptRegionSchema: z.ZodEnum<{
116
- static: "static";
117
116
  dynamic: "dynamic";
117
+ static: "static";
118
118
  }>;
119
119
  export type PromptRegion = z.infer<typeof PromptRegionSchema>;
120
120
  /**
@@ -146,8 +146,8 @@ export type PlatformTool = z.infer<typeof PlatformToolSchema>;
146
146
  export declare const PromptBlockSpecSchema: z.ZodObject<{
147
147
  name: z.ZodString;
148
148
  region: z.ZodEnum<{
149
- static: "static";
150
149
  dynamic: "dynamic";
150
+ static: "static";
151
151
  }>;
152
152
  }, z.core.$strict>;
153
153
  export type PromptBlockSpec = z.infer<typeof PromptBlockSpecSchema>;
@@ -156,9 +156,9 @@ export type PromptBlockSpec = z.infer<typeof PromptBlockSpecSchema>;
156
156
  * session's own.
157
157
  */
158
158
  export declare const UserStateSchema: z.ZodEnum<{
159
+ away: "away";
159
160
  listening: "listening";
160
161
  speaking: "speaking";
161
- away: "away";
162
162
  }>;
163
163
  export type UserState = z.infer<typeof UserStateSchema>;
164
164
  /**
@@ -166,10 +166,10 @@ export type UserState = z.infer<typeof UserStateSchema>;
166
166
  * caller, generating, or playing audio.
167
167
  */
168
168
  export declare const AgentStateSchema: z.ZodEnum<{
169
+ idle: "idle";
170
+ initializing: "initializing";
169
171
  listening: "listening";
170
172
  speaking: "speaking";
171
- initializing: "initializing";
172
- idle: "idle";
173
173
  thinking: "thinking";
174
174
  }>;
175
175
  export type AgentState = z.infer<typeof AgentStateSchema>;
@@ -181,25 +181,25 @@ export type AgentState = z.infer<typeof AgentStateSchema>;
181
181
  export declare const ParticipantKindSchema: z.ZodEnum<{
182
182
  agent: "agent";
183
183
  caller: "caller";
184
- supervisor: "supervisor";
185
184
  listener: "listener";
186
185
  sip: "sip";
186
+ supervisor: "supervisor";
187
187
  }>;
188
188
  export type ParticipantKind = z.infer<typeof ParticipantKindSchema>;
189
189
  /** What a track carries: a microphone's audio, a camera's video, or a screen share. */
190
190
  export declare const TrackKindSchema: z.ZodEnum<{
191
191
  audio: "audio";
192
- video: "video";
193
192
  screen: "screen";
193
+ video: "video";
194
194
  }>;
195
195
  export type TrackKind = z.infer<typeof TrackKindSchema>;
196
196
  /** Where a track comes from, as livekit's TrackSource names it, in lower case. */
197
197
  export declare const TrackSourceSchema: z.ZodEnum<{
198
- unknown: "unknown";
199
- microphone: "microphone";
200
198
  camera: "camera";
199
+ microphone: "microphone";
201
200
  screen_share: "screen_share";
202
201
  screen_share_audio: "screen_share_audio";
202
+ unknown: "unknown";
203
203
  }>;
204
204
  export type TrackSource = z.infer<typeof TrackSourceSchema>;
205
205
  /**
@@ -216,9 +216,9 @@ export type EventSource = z.infer<typeof EventSourceSchema>;
216
216
  * (tenant, the default for a field never declared), or nobody without masking (pii).
217
217
  */
218
218
  export declare const VisibilitySchema: z.ZodEnum<{
219
+ pii: "pii";
219
220
  public: "public";
220
221
  tenant: "tenant";
221
- pii: "pii";
222
222
  }>;
223
223
  export type Visibility = z.infer<typeof VisibilitySchema>;
224
224
  /**
@@ -272,9 +272,9 @@ export declare const ToolSpecSchema: z.ZodObject<{
272
272
  description: z.ZodString;
273
273
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
274
274
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
275
+ irreversible: "irreversible";
275
276
  read: "read";
276
277
  write: "write";
277
- irreversible: "irreversible";
278
278
  }>>>;
279
279
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
280
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -312,9 +312,9 @@ export type MemoryFact = z.infer<typeof MemoryFactSchema>;
312
312
  */
313
313
  export declare const MemoryOpSchema: z.ZodObject<{
314
314
  op: z.ZodEnum<{
315
+ forget: "forget";
315
316
  recall: "recall";
316
317
  remember: "remember";
317
- forget: "forget";
318
318
  }>;
319
319
  contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
320
  query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -349,12 +349,12 @@ export declare const CostRowSchema: z.ZodObject<{
349
349
  provider: z.ZodString;
350
350
  model: z.ZodString;
351
351
  unit: z.ZodEnum<{
352
- input_tokens: "input_tokens";
353
- cached_input_tokens: "cached_input_tokens";
352
+ audio_seconds: "audio_seconds";
354
353
  cache_creation_tokens: "cache_creation_tokens";
355
- output_tokens: "output_tokens";
354
+ cached_input_tokens: "cached_input_tokens";
356
355
  characters: "characters";
357
- audio_seconds: "audio_seconds";
356
+ input_tokens: "input_tokens";
357
+ output_tokens: "output_tokens";
358
358
  requests: "requests";
359
359
  session_seconds: "session_seconds";
360
360
  }>;
@@ -384,12 +384,12 @@ export declare const CostSchema: z.ZodObject<{
384
384
  provider: z.ZodString;
385
385
  model: z.ZodString;
386
386
  unit: z.ZodEnum<{
387
- input_tokens: "input_tokens";
388
- cached_input_tokens: "cached_input_tokens";
387
+ audio_seconds: "audio_seconds";
389
388
  cache_creation_tokens: "cache_creation_tokens";
390
- output_tokens: "output_tokens";
389
+ cached_input_tokens: "cached_input_tokens";
391
390
  characters: "characters";
392
- audio_seconds: "audio_seconds";
391
+ input_tokens: "input_tokens";
392
+ output_tokens: "output_tokens";
393
393
  requests: "requests";
394
394
  session_seconds: "session_seconds";
395
395
  }>;
@@ -437,9 +437,9 @@ export type Pronunciation = z.infer<typeof PronunciationSchema>;
437
437
  export declare const StateFieldSpecSchema: z.ZodObject<{
438
438
  name: z.ZodString;
439
439
  visibility: z.ZodEnum<{
440
+ pii: "pii";
440
441
  public: "public";
441
442
  tenant: "tenant";
442
- pii: "pii";
443
443
  }>;
444
444
  }, z.core.$strict>;
445
445
  export type StateFieldSpec = z.infer<typeof StateFieldSpecSchema>;
@@ -455,14 +455,10 @@ export declare const EventSpecSchema: z.ZodObject<{
455
455
  }>>;
456
456
  }, z.core.$strict>;
457
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. */
458
+ /** One file of a base, as a push sends it: its path as the tenant keeps it, and its text. */
459
459
  export declare const KnowledgeFileSchema: z.ZodObject<{
460
460
  path: z.ZodString;
461
461
  text: z.ZodString;
462
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
463
- retrieved: "retrieved";
464
- whole: "whole";
465
- }>>>;
466
462
  }, z.core.$strict>;
467
463
  export type KnowledgeFile = z.infer<typeof KnowledgeFileSchema>;
468
464
  /**
@@ -513,16 +509,18 @@ export declare const MemoryConfigSchema: z.ZodObject<{
513
509
  }, z.core.$strict>;
514
510
  export type MemoryConfig = z.infer<typeof MemoryConfigSchema>;
515
511
  /**
516
- * What an app declares about its agent: the voice, the models, the language, the greeting, the
517
- * tools, and who may see and send what. Every field is optional so a configure can change one
518
- * thing.
512
+ * What an app declares about its agent: the prompt's layout, the language, the tools, whether it
513
+ * searches its bases itself, and who may see and send what. Every field is optional so a configure
514
+ * can change one thing. The environment — voice, models, greeting, hangup, turn, says, hears,
515
+ * knowledge, docs, memory — is the world's, set in the agent's settings, and no longer read off
516
+ * this declaration.
519
517
  */
520
518
  export declare const AgentConfigSchema: z.ZodObject<{
521
519
  prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
522
520
  name: z.ZodString;
523
521
  region: z.ZodEnum<{
524
- static: "static";
525
522
  dynamic: "dynamic";
523
+ static: "static";
526
524
  }>;
527
525
  }, z.core.$strict>>>>;
528
526
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -559,10 +557,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
559
557
  knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
560
558
  path: z.ZodString;
561
559
  text: z.ZodString;
562
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
563
- retrieved: "retrieved";
564
- whole: "whole";
565
- }>>>;
566
560
  }, z.core.$strict>>>;
567
561
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
568
562
  base: z.ZodString;
@@ -585,9 +579,9 @@ export declare const AgentConfigSchema: z.ZodObject<{
585
579
  description: z.ZodString;
586
580
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
587
581
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
582
+ irreversible: "irreversible";
588
583
  read: "read";
589
584
  write: "write";
590
- irreversible: "irreversible";
591
585
  }>>>;
592
586
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
587
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -597,9 +591,9 @@ export declare const AgentConfigSchema: z.ZodObject<{
597
591
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
598
592
  name: z.ZodString;
599
593
  visibility: z.ZodEnum<{
594
+ pii: "pii";
600
595
  public: "public";
601
596
  tenant: "tenant";
602
- pii: "pii";
603
597
  }>;
604
598
  }, z.core.$strict>>>>;
605
599
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -258,11 +258,10 @@ export const EventSpecSchema = z.strictObject({
258
258
  name: z.string(),
259
259
  from: z.array(EventSourceSchema),
260
260
  });
261
- /** One file of knowledge, sent whole: its path as the tenant keeps it, and its text. */
261
+ /** One file of a base, as a push sends it: its path as the tenant keeps it, and its text. */
262
262
  export const KnowledgeFileSchema = z.strictObject({
263
263
  path: z.string(),
264
264
  text: z.string(),
265
- mode: z.enum(["retrieved", "whole"]).nullish(),
266
265
  });
267
266
  /**
268
267
  * The knowledge base the agent answers from, and how its chunks reach the model. It is named by
@@ -305,9 +304,11 @@ export const MemoryConfigSchema = z.strictObject({
305
304
  forget: z.array(z.string()).nullish(),
306
305
  });
307
306
  /**
308
- * What an app declares about its agent: the voice, the models, the language, the greeting, the
309
- * tools, and who may see and send what. Every field is optional so a configure can change one
310
- * thing.
307
+ * What an app declares about its agent: the prompt's layout, the language, the tools, whether it
308
+ * searches its bases itself, and who may see and send what. Every field is optional so a configure
309
+ * can change one thing. The environment — voice, models, greeting, hangup, turn, says, hears,
310
+ * knowledge, docs, memory — is the world's, set in the agent's settings, and no longer read off
311
+ * this declaration.
311
312
  */
312
313
  export const AgentConfigSchema = z.strictObject({
313
314
  prompt: z.array(PromptBlockSpecSchema).nullish(),