@pinecall/protocol 0.2.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.
- package/dist/generated/commands.d.ts +18 -8
- package/dist/generated/defs.d.ts +50 -41
- package/dist/generated/defs.js +2 -0
- package/dist/generated/events.d.ts +62 -60
- package/dist/generated/events.js +4 -2
- package/dist/generated/registry.d.ts +82 -72
- package/dist/generated/rest.d.ts +748 -63
- package/dist/generated/rest.js +214 -6
- package/dist/generated/room.d.ts +7 -7
- package/dist/generated/state.d.ts +29 -29
- package/dist/reduce.js +13 -1
- package/package.json +1 -1
|
@@ -43,17 +43,19 @@ export type AgentRegistered = z.infer<typeof AgentRegisteredSchema>;
|
|
|
43
43
|
/** The agent's state changed, in the session's own words. */
|
|
44
44
|
export declare const AgentStateChangedSchema: z.ZodObject<{
|
|
45
45
|
state: z.ZodEnum<{
|
|
46
|
+
idle: "idle";
|
|
47
|
+
initializing: "initializing";
|
|
46
48
|
listening: "listening";
|
|
47
49
|
speaking: "speaking";
|
|
48
|
-
initializing: "initializing";
|
|
49
|
-
idle: "idle";
|
|
50
50
|
thinking: "thinking";
|
|
51
51
|
}>;
|
|
52
52
|
}, z.core.$strict>;
|
|
53
53
|
export type AgentStateChanged = z.infer<typeof AgentStateChangedSchema>;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
55
|
+
* One delta of the reply the agent is giving, never the reply so far: in a voice call one word, as
|
|
56
|
+
* the voice plays it, with the seconds it was aligned to; in a written call one model token. The
|
|
57
|
+
* reply so far is every delta of the same speech_id since the last turn.agent, joined; turn.agent
|
|
58
|
+
* carries the whole reply and closes it. Interim entries are ephemeral.
|
|
57
59
|
*/
|
|
58
60
|
export declare const AgentTranscriptSchema: z.ZodObject<{
|
|
59
61
|
speech_id: z.ZodString;
|
|
@@ -90,23 +92,23 @@ export type CallDialing = z.infer<typeof CallDialingSchema>;
|
|
|
90
92
|
/** The call is over. Nothing about the conversation follows; call.summary still does. */
|
|
91
93
|
export declare const CallEndedSchema: z.ZodObject<{
|
|
92
94
|
reason: z.ZodEnum<{
|
|
93
|
-
caller_hung_up: "caller_hung_up";
|
|
94
95
|
agent_hung_up: "agent_hung_up";
|
|
95
|
-
|
|
96
|
-
transferred: "transferred";
|
|
97
|
-
no_answer: "no_answer";
|
|
96
|
+
app_detached: "app_detached";
|
|
98
97
|
busy: "busy";
|
|
98
|
+
caller_hung_up: "caller_hung_up";
|
|
99
99
|
dial_failed: "dial_failed";
|
|
100
|
-
timeout: "timeout";
|
|
101
100
|
drained: "drained";
|
|
102
|
-
app_detached: "app_detached";
|
|
103
101
|
error: "error";
|
|
102
|
+
no_answer: "no_answer";
|
|
103
|
+
supervisor_ended: "supervisor_ended";
|
|
104
|
+
timeout: "timeout";
|
|
105
|
+
transferred: "transferred";
|
|
104
106
|
}>;
|
|
105
107
|
ended_by: z.ZodEnum<{
|
|
106
108
|
agent: "agent";
|
|
107
109
|
caller: "caller";
|
|
108
|
-
supervisor: "supervisor";
|
|
109
110
|
platform: "platform";
|
|
111
|
+
supervisor: "supervisor";
|
|
110
112
|
}>;
|
|
111
113
|
ended_at: z.ZodNumber;
|
|
112
114
|
duration_s: z.ZodNumber;
|
|
@@ -169,9 +171,9 @@ export type JudgmentEvidence = z.infer<typeof JudgmentEvidenceSchema>;
|
|
|
169
171
|
export declare const JudgmentSchema: z.ZodObject<{
|
|
170
172
|
name: z.ZodString;
|
|
171
173
|
verdict: z.ZodEnum<{
|
|
172
|
-
held: "held";
|
|
173
174
|
broken: "broken";
|
|
174
175
|
deferred: "deferred";
|
|
176
|
+
held: "held";
|
|
175
177
|
skipped: "skipped";
|
|
176
178
|
}>;
|
|
177
179
|
criteria: z.ZodString;
|
|
@@ -192,9 +194,9 @@ export declare const CallScoreSchema: z.ZodObject<{
|
|
|
192
194
|
judges: z.ZodArray<z.ZodObject<{
|
|
193
195
|
name: z.ZodString;
|
|
194
196
|
verdict: z.ZodEnum<{
|
|
195
|
-
held: "held";
|
|
196
197
|
broken: "broken";
|
|
197
198
|
deferred: "deferred";
|
|
199
|
+
held: "held";
|
|
198
200
|
skipped: "skipped";
|
|
199
201
|
}>;
|
|
200
202
|
criteria: z.ZodString;
|
|
@@ -246,17 +248,17 @@ export type CallStarted = z.infer<typeof CallStartedSchema>;
|
|
|
246
248
|
*/
|
|
247
249
|
export declare const CallSummarySchema: z.ZodObject<{
|
|
248
250
|
reason: z.ZodEnum<{
|
|
249
|
-
caller_hung_up: "caller_hung_up";
|
|
250
251
|
agent_hung_up: "agent_hung_up";
|
|
251
|
-
|
|
252
|
-
transferred: "transferred";
|
|
253
|
-
no_answer: "no_answer";
|
|
252
|
+
app_detached: "app_detached";
|
|
254
253
|
busy: "busy";
|
|
254
|
+
caller_hung_up: "caller_hung_up";
|
|
255
255
|
dial_failed: "dial_failed";
|
|
256
|
-
timeout: "timeout";
|
|
257
256
|
drained: "drained";
|
|
258
|
-
app_detached: "app_detached";
|
|
259
257
|
error: "error";
|
|
258
|
+
no_answer: "no_answer";
|
|
259
|
+
supervisor_ended: "supervisor_ended";
|
|
260
|
+
timeout: "timeout";
|
|
261
|
+
transferred: "transferred";
|
|
260
262
|
}>;
|
|
261
263
|
outcome: z.ZodString;
|
|
262
264
|
duration_s: z.ZodNumber;
|
|
@@ -316,12 +318,12 @@ export declare const CallSummarySchema: z.ZodObject<{
|
|
|
316
318
|
provider: z.ZodString;
|
|
317
319
|
model: z.ZodString;
|
|
318
320
|
unit: z.ZodEnum<{
|
|
319
|
-
|
|
320
|
-
cached_input_tokens: "cached_input_tokens";
|
|
321
|
+
audio_seconds: "audio_seconds";
|
|
321
322
|
cache_creation_tokens: "cache_creation_tokens";
|
|
322
|
-
|
|
323
|
+
cached_input_tokens: "cached_input_tokens";
|
|
323
324
|
characters: "characters";
|
|
324
|
-
|
|
325
|
+
input_tokens: "input_tokens";
|
|
326
|
+
output_tokens: "output_tokens";
|
|
325
327
|
requests: "requests";
|
|
326
328
|
session_seconds: "session_seconds";
|
|
327
329
|
}>;
|
|
@@ -381,10 +383,10 @@ export declare const ConfirmDeclinedSchema: z.ZodObject<{
|
|
|
381
383
|
audience: z.ZodString;
|
|
382
384
|
said: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
385
|
reason: z.ZodEnum<{
|
|
384
|
-
timeout: "timeout";
|
|
385
|
-
changed: "changed";
|
|
386
386
|
cancelled: "cancelled";
|
|
387
|
+
changed: "changed";
|
|
387
388
|
no: "no";
|
|
389
|
+
timeout: "timeout";
|
|
388
390
|
}>;
|
|
389
391
|
}, z.core.$strict>;
|
|
390
392
|
export type ConfirmDeclined = z.infer<typeof ConfirmDeclinedSchema>;
|
|
@@ -420,12 +422,12 @@ export type ConfirmRequest = z.infer<typeof ConfirmRequestSchema>;
|
|
|
420
422
|
export declare const CreditsExhaustedSchema: z.ZodObject<{
|
|
421
423
|
org: z.ZodString;
|
|
422
424
|
quota: z.ZodEnum<{
|
|
423
|
-
minutes: "minutes";
|
|
424
|
-
messages: "messages";
|
|
425
425
|
agents: "agents";
|
|
426
426
|
concurrent_calls: "concurrent_calls";
|
|
427
|
-
memory_facts: "memory_facts";
|
|
428
427
|
knowledge_chunks: "knowledge_chunks";
|
|
428
|
+
memory_facts: "memory_facts";
|
|
429
|
+
messages: "messages";
|
|
430
|
+
minutes: "minutes";
|
|
429
431
|
numbers: "numbers";
|
|
430
432
|
seats: "seats";
|
|
431
433
|
}>;
|
|
@@ -446,25 +448,25 @@ export type Custom = z.infer<typeof CustomSchema>;
|
|
|
446
448
|
export declare const DevRequestSchema: z.ZodObject<{
|
|
447
449
|
id: z.ZodString;
|
|
448
450
|
verb: z.ZodEnum<{
|
|
451
|
+
"chat.end": "chat.end";
|
|
449
452
|
"chat.roster": "chat.roster";
|
|
450
|
-
"chat.start": "chat.start";
|
|
451
453
|
"chat.say": "chat.say";
|
|
452
|
-
"chat.
|
|
453
|
-
"
|
|
454
|
-
"simulate.start": "simulate.start";
|
|
454
|
+
"chat.start": "chat.start";
|
|
455
|
+
"drift.read": "drift.read";
|
|
455
456
|
"goldens.roster": "goldens.roster";
|
|
456
457
|
"goldens.run": "goldens.run";
|
|
457
|
-
"knowledge.roster": "knowledge.roster";
|
|
458
|
-
"knowledge.push": "knowledge.push";
|
|
459
458
|
"knowledge.eval": "knowledge.eval";
|
|
460
|
-
"
|
|
459
|
+
"knowledge.push": "knowledge.push";
|
|
460
|
+
"knowledge.roster": "knowledge.roster";
|
|
461
461
|
"memory.eval": "memory.eval";
|
|
462
462
|
"memory.extraction": "memory.extraction";
|
|
463
|
+
"memory.roster": "memory.roster";
|
|
463
464
|
"promote.roster": "promote.roster";
|
|
464
465
|
"promote.write": "promote.write";
|
|
465
|
-
"drift.read": "drift.read";
|
|
466
|
-
"reproductions.roster": "reproductions.roster";
|
|
467
466
|
"reproductions.read": "reproductions.read";
|
|
467
|
+
"reproductions.roster": "reproductions.roster";
|
|
468
|
+
"simulate.roster": "simulate.roster";
|
|
469
|
+
"simulate.start": "simulate.start";
|
|
468
470
|
}>;
|
|
469
471
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
470
472
|
}, z.core.$strict>;
|
|
@@ -534,11 +536,11 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
534
536
|
agent: z.ZodString;
|
|
535
537
|
call: z.ZodNullable<z.ZodString>;
|
|
536
538
|
status: z.ZodEnum<{
|
|
537
|
-
idle: "idle";
|
|
538
|
-
ringing: "ringing";
|
|
539
|
-
dialing: "dialing";
|
|
540
539
|
active: "active";
|
|
540
|
+
dialing: "dialing";
|
|
541
541
|
ended: "ended";
|
|
542
|
+
idle: "idle";
|
|
543
|
+
ringing: "ringing";
|
|
542
544
|
}>;
|
|
543
545
|
channel: z.ZodNullable<z.ZodEnum<{
|
|
544
546
|
phone: "phone";
|
|
@@ -566,9 +568,9 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
566
568
|
kind: z.ZodEnum<{
|
|
567
569
|
agent: "agent";
|
|
568
570
|
caller: "caller";
|
|
569
|
-
supervisor: "supervisor";
|
|
570
571
|
listener: "listener";
|
|
571
572
|
sip: "sip";
|
|
573
|
+
supervisor: "supervisor";
|
|
572
574
|
}>;
|
|
573
575
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
574
576
|
joined_at: z.ZodNumber;
|
|
@@ -580,29 +582,29 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
580
582
|
started_at: z.ZodNullable<z.ZodNumber>;
|
|
581
583
|
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
582
584
|
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
583
|
-
caller_hung_up: "caller_hung_up";
|
|
584
585
|
agent_hung_up: "agent_hung_up";
|
|
585
|
-
|
|
586
|
-
transferred: "transferred";
|
|
587
|
-
no_answer: "no_answer";
|
|
586
|
+
app_detached: "app_detached";
|
|
588
587
|
busy: "busy";
|
|
588
|
+
caller_hung_up: "caller_hung_up";
|
|
589
589
|
dial_failed: "dial_failed";
|
|
590
|
-
timeout: "timeout";
|
|
591
590
|
drained: "drained";
|
|
592
|
-
app_detached: "app_detached";
|
|
593
591
|
error: "error";
|
|
592
|
+
no_answer: "no_answer";
|
|
593
|
+
supervisor_ended: "supervisor_ended";
|
|
594
|
+
timeout: "timeout";
|
|
595
|
+
transferred: "transferred";
|
|
594
596
|
}>>;
|
|
595
597
|
outcome: z.ZodNullable<z.ZodString>;
|
|
596
598
|
user_state: z.ZodNullable<z.ZodEnum<{
|
|
599
|
+
away: "away";
|
|
597
600
|
listening: "listening";
|
|
598
601
|
speaking: "speaking";
|
|
599
|
-
away: "away";
|
|
600
602
|
}>>;
|
|
601
603
|
agent_state: z.ZodNullable<z.ZodEnum<{
|
|
604
|
+
idle: "idle";
|
|
605
|
+
initializing: "initializing";
|
|
602
606
|
listening: "listening";
|
|
603
607
|
speaking: "speaking";
|
|
604
|
-
initializing: "initializing";
|
|
605
|
-
idle: "idle";
|
|
606
608
|
thinking: "thinking";
|
|
607
609
|
}>>;
|
|
608
610
|
live: z.ZodObject<{
|
|
@@ -818,9 +820,9 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
818
820
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
819
821
|
speech_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
820
822
|
status: z.ZodEnum<{
|
|
821
|
-
running: "running";
|
|
822
823
|
done: "done";
|
|
823
824
|
failed: "failed";
|
|
825
|
+
running: "running";
|
|
824
826
|
}>;
|
|
825
827
|
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
826
828
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -850,18 +852,18 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
850
852
|
audience: z.ZodString;
|
|
851
853
|
phrase: z.ZodString;
|
|
852
854
|
status: z.ZodEnum<{
|
|
853
|
-
pending: "pending";
|
|
854
|
-
granted: "granted";
|
|
855
855
|
declined: "declined";
|
|
856
|
+
granted: "granted";
|
|
857
|
+
pending: "pending";
|
|
856
858
|
}>;
|
|
857
859
|
said: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
858
860
|
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
859
861
|
}, z.core.$strict>>;
|
|
860
862
|
memory: z.ZodArray<z.ZodObject<{
|
|
861
863
|
op: z.ZodEnum<{
|
|
864
|
+
forget: "forget";
|
|
862
865
|
recall: "recall";
|
|
863
866
|
remember: "remember";
|
|
864
|
-
forget: "forget";
|
|
865
867
|
}>;
|
|
866
868
|
contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
867
869
|
query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -961,12 +963,12 @@ export declare const LogGapSchema: z.ZodObject<{
|
|
|
961
963
|
provider: z.ZodString;
|
|
962
964
|
model: z.ZodString;
|
|
963
965
|
unit: z.ZodEnum<{
|
|
964
|
-
|
|
965
|
-
cached_input_tokens: "cached_input_tokens";
|
|
966
|
+
audio_seconds: "audio_seconds";
|
|
966
967
|
cache_creation_tokens: "cache_creation_tokens";
|
|
967
|
-
|
|
968
|
+
cached_input_tokens: "cached_input_tokens";
|
|
968
969
|
characters: "characters";
|
|
969
|
-
|
|
970
|
+
input_tokens: "input_tokens";
|
|
971
|
+
output_tokens: "output_tokens";
|
|
970
972
|
requests: "requests";
|
|
971
973
|
session_seconds: "session_seconds";
|
|
972
974
|
}>;
|
|
@@ -1012,9 +1014,9 @@ export type LogGap = z.infer<typeof LogGapSchema>;
|
|
|
1012
1014
|
export declare const MemoryOpsSchema: z.ZodObject<{
|
|
1013
1015
|
ops: z.ZodArray<z.ZodObject<{
|
|
1014
1016
|
op: z.ZodEnum<{
|
|
1017
|
+
forget: "forget";
|
|
1015
1018
|
recall: "recall";
|
|
1016
1019
|
remember: "remember";
|
|
1017
|
-
forget: "forget";
|
|
1018
1020
|
}>;
|
|
1019
1021
|
contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1020
1022
|
query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1216,9 +1218,9 @@ export type UserTurnEnded = z.infer<typeof UserTurnEndedSchema>;
|
|
|
1216
1218
|
/** The caller's state changed, in the session's own words. */
|
|
1217
1219
|
export declare const UserStateChangedSchema: z.ZodObject<{
|
|
1218
1220
|
state: z.ZodEnum<{
|
|
1221
|
+
away: "away";
|
|
1219
1222
|
listening: "listening";
|
|
1220
1223
|
speaking: "speaking";
|
|
1221
|
-
away: "away";
|
|
1222
1224
|
}>;
|
|
1223
1225
|
}, z.core.$strict>;
|
|
1224
1226
|
export type UserStateChanged = z.infer<typeof UserStateChangedSchema>;
|
package/dist/generated/events.js
CHANGED
|
@@ -32,8 +32,10 @@ export const AgentStateChangedSchema = z.strictObject({
|
|
|
32
32
|
state: AgentStateSchema,
|
|
33
33
|
});
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* One delta of the reply the agent is giving, never the reply so far: in a voice call one word, as
|
|
36
|
+
* the voice plays it, with the seconds it was aligned to; in a written call one model token. The
|
|
37
|
+
* reply so far is every delta of the same speech_id since the last turn.agent, joined; turn.agent
|
|
38
|
+
* carries the whole reply and closes it. Interim entries are ephemeral.
|
|
37
39
|
*/
|
|
38
40
|
export const AgentTranscriptSchema = z.strictObject({
|
|
39
41
|
speech_id: z.string(),
|