@pinecall/protocol 0.3.0 → 0.4.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,6 +46,10 @@ 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
+ }>>>;
49
53
  }, z.core.$strict>>>;
50
54
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
51
55
  base: z.ZodString;
@@ -68,20 +72,21 @@ export declare const AgentConfigureSchema: z.ZodObject<{
68
72
  description: z.ZodString;
69
73
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
70
74
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
75
+ irreversible: "irreversible";
71
76
  read: "read";
72
77
  write: "write";
73
- irreversible: "irreversible";
74
78
  }>>>;
75
79
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
80
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
77
81
  timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
78
82
  }, z.core.$strict>>>>;
83
+ uses_knowledge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
79
84
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
80
85
  name: z.ZodString;
81
86
  visibility: z.ZodEnum<{
87
+ pii: "pii";
82
88
  public: "public";
83
89
  tenant: "tenant";
84
- pii: "pii";
85
90
  }>;
86
91
  }, z.core.$strict>>>>;
87
92
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -254,8 +259,8 @@ export type PromptSet = z.infer<typeof PromptSetSchema>;
254
259
  export declare const RoomInviteSchema: z.ZodObject<{
255
260
  to: z.ZodString;
256
261
  kind: z.ZodEnum<{
257
- sip: "sip";
258
262
  participant: "participant";
263
+ sip: "sip";
259
264
  }>;
260
265
  }, z.core.$strict>;
261
266
  export type RoomInvite = z.infer<typeof RoomInviteSchema>;
@@ -280,8 +285,8 @@ export declare const SessionConfigureSchema: z.ZodObject<{
280
285
  prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
281
286
  name: z.ZodString;
282
287
  region: z.ZodEnum<{
283
- static: "static";
284
288
  dynamic: "dynamic";
289
+ static: "static";
285
290
  }>;
286
291
  }, z.core.$strict>>>>;
287
292
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -318,6 +323,10 @@ export declare const SessionConfigureSchema: z.ZodObject<{
318
323
  knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
319
324
  path: z.ZodString;
320
325
  text: z.ZodString;
326
+ mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
327
+ retrieved: "retrieved";
328
+ whole: "whole";
329
+ }>>>;
321
330
  }, z.core.$strict>>>;
322
331
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
323
332
  base: z.ZodString;
@@ -340,20 +349,21 @@ export declare const SessionConfigureSchema: z.ZodObject<{
340
349
  description: z.ZodString;
341
350
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
342
351
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
352
+ irreversible: "irreversible";
343
353
  read: "read";
344
354
  write: "write";
345
- irreversible: "irreversible";
346
355
  }>>>;
347
356
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
357
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
349
358
  timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
350
359
  }, z.core.$strict>>>>;
360
+ uses_knowledge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
351
361
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
352
362
  name: z.ZodString;
353
363
  visibility: z.ZodEnum<{
364
+ pii: "pii";
354
365
  public: "public";
355
366
  tenant: "tenant";
356
- pii: "pii";
357
367
  }>;
358
368
  }, z.core.$strict>>>>;
359
369
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -411,9 +421,9 @@ export declare const ToolsSetSchema: z.ZodObject<{
411
421
  description: z.ZodString;
412
422
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
413
423
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
424
+ irreversible: "irreversible";
414
425
  read: "read";
415
426
  write: "write";
416
- irreversible: "irreversible";
417
427
  }>>>;
418
428
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
429
  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>;
@@ -459,6 +459,10 @@ export type EventSpec = z.infer<typeof EventSpecSchema>;
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
+ }>>>;
462
466
  }, z.core.$strict>;
463
467
  export type KnowledgeFile = z.infer<typeof KnowledgeFileSchema>;
464
468
  /**
@@ -517,8 +521,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
517
521
  prompt: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
518
522
  name: z.ZodString;
519
523
  region: z.ZodEnum<{
520
- static: "static";
521
524
  dynamic: "dynamic";
525
+ static: "static";
522
526
  }>;
523
527
  }, z.core.$strict>>>>;
524
528
  language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -555,6 +559,10 @@ export declare const AgentConfigSchema: z.ZodObject<{
555
559
  knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
556
560
  path: z.ZodString;
557
561
  text: z.ZodString;
562
+ mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
563
+ retrieved: "retrieved";
564
+ whole: "whole";
565
+ }>>>;
558
566
  }, z.core.$strict>>>;
559
567
  docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
560
568
  base: z.ZodString;
@@ -577,20 +585,21 @@ export declare const AgentConfigSchema: z.ZodObject<{
577
585
  description: z.ZodString;
578
586
  parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
579
587
  side_effect: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
588
+ irreversible: "irreversible";
580
589
  read: "read";
581
590
  write: "write";
582
- irreversible: "irreversible";
583
591
  }>>>;
584
592
  confirm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
585
593
  pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
586
594
  timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
587
595
  }, z.core.$strict>>>>;
596
+ uses_knowledge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
588
597
  state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
589
598
  name: z.ZodString;
590
599
  visibility: z.ZodEnum<{
600
+ pii: "pii";
591
601
  public: "public";
592
602
  tenant: "tenant";
593
- pii: "pii";
594
603
  }>;
595
604
  }, z.core.$strict>>>>;
596
605
  events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
@@ -262,6 +262,7 @@ export const EventSpecSchema = z.strictObject({
262
262
  export const KnowledgeFileSchema = z.strictObject({
263
263
  path: z.string(),
264
264
  text: z.string(),
265
+ mode: z.enum(["retrieved", "whole"]).nullish(),
265
266
  });
266
267
  /**
267
268
  * The knowledge base the agent answers from, and how its chunks reach the model. It is named by
@@ -323,6 +324,7 @@ export const AgentConfigSchema = z.strictObject({
323
324
  memory: MemoryConfigSchema.nullish(),
324
325
  hangup: HangupConfigSchema.nullish(),
325
326
  tools: z.array(ToolSpecSchema).nullish(),
327
+ uses_knowledge: z.boolean().nullish(),
326
328
  state_fields: z.array(StateFieldSpecSchema).nullish(),
327
329
  events: z.array(EventSpecSchema).nullish(),
328
330
  });