@pinecall/protocol 0.3.0 → 0.5.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 +11 -0
- package/dist/generated/commands.js +1 -0
- package/dist/generated/defs.d.ts +9 -0
- package/dist/generated/defs.js +2 -0
- package/dist/generated/registry.d.ts +11 -0
- package/dist/generated/rest.d.ts +675 -4
- package/dist/generated/rest.js +184 -5
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -76,6 +80,7 @@ export declare const AgentConfigureSchema: z.ZodObject<{
|
|
|
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<{
|
|
@@ -109,6 +114,7 @@ export declare const AgentRegisterSchema: z.ZodObject<{
|
|
|
109
114
|
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
115
|
}, z.core.$strict>>;
|
|
111
116
|
sdk: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
118
|
takes_unclaimed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
113
119
|
}, z.core.$strict>;
|
|
114
120
|
export type AgentRegister = z.infer<typeof AgentRegisterSchema>;
|
|
@@ -318,6 +324,10 @@ export declare const SessionConfigureSchema: z.ZodObject<{
|
|
|
318
324
|
knowledge: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
319
325
|
path: z.ZodString;
|
|
320
326
|
text: z.ZodString;
|
|
327
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
328
|
+
retrieved: "retrieved";
|
|
329
|
+
whole: "whole";
|
|
330
|
+
}>>>;
|
|
321
331
|
}, z.core.$strict>>>;
|
|
322
332
|
docs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
323
333
|
base: z.ZodString;
|
|
@@ -348,6 +358,7 @@ export declare const SessionConfigureSchema: z.ZodObject<{
|
|
|
348
358
|
pii: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
349
359
|
timeout_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
350
360
|
}, z.core.$strict>>>>;
|
|
361
|
+
uses_knowledge: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
351
362
|
state_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
352
363
|
name: z.ZodString;
|
|
353
364
|
visibility: z.ZodEnum<{
|
package/dist/generated/defs.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -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;
|
|
@@ -585,6 +593,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
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<{
|
package/dist/generated/defs.js
CHANGED
|
@@ -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
|
});
|
|
@@ -1305,6 +1305,10 @@ export declare const COMMAND_SCHEMAS: {
|
|
|
1305
1305
|
knowledge: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1306
1306
|
path: import("zod").ZodString;
|
|
1307
1307
|
text: import("zod").ZodString;
|
|
1308
|
+
mode: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1309
|
+
retrieved: "retrieved";
|
|
1310
|
+
whole: "whole";
|
|
1311
|
+
}>>>;
|
|
1308
1312
|
}, import("zod/v4/core").$strict>>>;
|
|
1309
1313
|
docs: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1310
1314
|
base: import("zod").ZodString;
|
|
@@ -1335,6 +1339,7 @@ export declare const COMMAND_SCHEMAS: {
|
|
|
1335
1339
|
pii: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
1336
1340
|
timeout_s: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
1337
1341
|
}, import("zod/v4/core").$strict>>>>;
|
|
1342
|
+
uses_knowledge: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
1338
1343
|
state_fields: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1339
1344
|
name: import("zod").ZodString;
|
|
1340
1345
|
visibility: import("zod").ZodEnum<{
|
|
@@ -1363,6 +1368,7 @@ export declare const COMMAND_SCHEMAS: {
|
|
|
1363
1368
|
label: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1364
1369
|
}, import("zod/v4/core").$strict>>;
|
|
1365
1370
|
sdk: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1371
|
+
host: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1366
1372
|
takes_unclaimed: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
1367
1373
|
}, import("zod/v4/core").$strict>;
|
|
1368
1374
|
readonly "agent.reply": import("zod").ZodObject<{
|
|
@@ -1485,6 +1491,10 @@ export declare const COMMAND_SCHEMAS: {
|
|
|
1485
1491
|
knowledge: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1486
1492
|
path: import("zod").ZodString;
|
|
1487
1493
|
text: import("zod").ZodString;
|
|
1494
|
+
mode: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1495
|
+
retrieved: "retrieved";
|
|
1496
|
+
whole: "whole";
|
|
1497
|
+
}>>>;
|
|
1488
1498
|
}, import("zod/v4/core").$strict>>>;
|
|
1489
1499
|
docs: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
1490
1500
|
base: import("zod").ZodString;
|
|
@@ -1515,6 +1525,7 @@ export declare const COMMAND_SCHEMAS: {
|
|
|
1515
1525
|
pii: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
1516
1526
|
timeout_s: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
1517
1527
|
}, import("zod/v4/core").$strict>>>>;
|
|
1528
|
+
uses_knowledge: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
1518
1529
|
state_fields: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1519
1530
|
name: import("zod").ZodString;
|
|
1520
1531
|
visibility: import("zod").ZodEnum<{
|
package/dist/generated/rest.d.ts
CHANGED
|
@@ -1128,6 +1128,59 @@ export declare const AgentListSchema: z.ZodObject<{
|
|
|
1128
1128
|
}, z.core.$strict>>;
|
|
1129
1129
|
}, z.core.$strict>;
|
|
1130
1130
|
export type AgentList = z.infer<typeof AgentListSchema>;
|
|
1131
|
+
/**
|
|
1132
|
+
* One app connected to the gateway right now: one process on one machine, holding one or more
|
|
1133
|
+
* agents in one world.
|
|
1134
|
+
*/
|
|
1135
|
+
export declare const AppProcessSchema: z.ZodObject<{
|
|
1136
|
+
app: z.ZodString;
|
|
1137
|
+
agents: z.ZodArray<z.ZodString>;
|
|
1138
|
+
env: z.ZodEnum<{
|
|
1139
|
+
production: "production";
|
|
1140
|
+
sandbox: "sandbox";
|
|
1141
|
+
}>;
|
|
1142
|
+
host: z.ZodNullable<z.ZodString>;
|
|
1143
|
+
address: z.ZodNullable<z.ZodString>;
|
|
1144
|
+
sdk: z.ZodNullable<z.ZodString>;
|
|
1145
|
+
holder: z.ZodNullable<z.ZodObject<{
|
|
1146
|
+
holder: z.ZodNullable<z.ZodString>;
|
|
1147
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1148
|
+
}, z.core.$strict>>;
|
|
1149
|
+
connected_at: z.ZodNumber;
|
|
1150
|
+
}, z.core.$strict>;
|
|
1151
|
+
export type AppProcess = z.infer<typeof AppProcessSchema>;
|
|
1152
|
+
/**
|
|
1153
|
+
* GET /v1/apps: every app connected in the request's world that this key may see — its own
|
|
1154
|
+
* corner's and the org's, every corner's with `team`.
|
|
1155
|
+
*/
|
|
1156
|
+
export declare const AppListSchema: z.ZodObject<{
|
|
1157
|
+
apps: z.ZodArray<z.ZodObject<{
|
|
1158
|
+
app: z.ZodString;
|
|
1159
|
+
agents: z.ZodArray<z.ZodString>;
|
|
1160
|
+
env: z.ZodEnum<{
|
|
1161
|
+
production: "production";
|
|
1162
|
+
sandbox: "sandbox";
|
|
1163
|
+
}>;
|
|
1164
|
+
host: z.ZodNullable<z.ZodString>;
|
|
1165
|
+
address: z.ZodNullable<z.ZodString>;
|
|
1166
|
+
sdk: z.ZodNullable<z.ZodString>;
|
|
1167
|
+
holder: z.ZodNullable<z.ZodObject<{
|
|
1168
|
+
holder: z.ZodNullable<z.ZodString>;
|
|
1169
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1170
|
+
}, z.core.$strict>>;
|
|
1171
|
+
connected_at: z.ZodNumber;
|
|
1172
|
+
}, z.core.$strict>>;
|
|
1173
|
+
}, z.core.$strict>;
|
|
1174
|
+
export type AppList = z.infer<typeof AppListSchema>;
|
|
1175
|
+
/**
|
|
1176
|
+
* POST /v1/apps/{app}/stop, the answer: the socket was closed with the stop code, and the app
|
|
1177
|
+
* exits rather than reconnect.
|
|
1178
|
+
*/
|
|
1179
|
+
export declare const AppStoppedSchema: z.ZodObject<{
|
|
1180
|
+
app: z.ZodString;
|
|
1181
|
+
stopped: z.ZodBoolean;
|
|
1182
|
+
}, z.core.$strict>;
|
|
1183
|
+
export type AppStopped = z.infer<typeof AppStoppedSchema>;
|
|
1131
1184
|
/**
|
|
1132
1185
|
* GET /v1/agents/{slug}/line: whose terminal a call that RINGS at this agent's doors lands in. An
|
|
1133
1186
|
* org shares one sandbox number, so it rings in one place and which one is claimed.
|
|
@@ -1159,6 +1212,10 @@ export declare const KnowledgePushSchema: z.ZodObject<{
|
|
|
1159
1212
|
files: z.ZodArray<z.ZodObject<{
|
|
1160
1213
|
path: z.ZodString;
|
|
1161
1214
|
text: z.ZodString;
|
|
1215
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1216
|
+
retrieved: "retrieved";
|
|
1217
|
+
whole: "whole";
|
|
1218
|
+
}>>>;
|
|
1162
1219
|
}, z.core.$strict>>;
|
|
1163
1220
|
}, z.core.$strict>;
|
|
1164
1221
|
export type KnowledgePush = z.infer<typeof KnowledgePushSchema>;
|
|
@@ -1212,13 +1269,15 @@ export declare const KnowledgeScoreSchema: z.ZodObject<{
|
|
|
1212
1269
|
}, z.core.$strict>;
|
|
1213
1270
|
export type KnowledgeScore = z.infer<typeof KnowledgeScoreSchema>;
|
|
1214
1271
|
/**
|
|
1215
|
-
* PUT /v1/knowledge/{base}, the answer: which base, how many chunks it became,
|
|
1216
|
-
*
|
|
1272
|
+
* PUT /v1/knowledge/{base}, the answer: which base, how many chunks it became, how long that took,
|
|
1273
|
+
* and what its whole files weigh on every call.
|
|
1217
1274
|
*/
|
|
1218
1275
|
export declare const KnowledgePushedSchema: z.ZodObject<{
|
|
1219
1276
|
base: z.ZodString;
|
|
1220
1277
|
chunks: z.ZodInt;
|
|
1221
1278
|
took_ms: z.ZodNumber;
|
|
1279
|
+
whole_tokens: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1280
|
+
notice: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
1222
1281
|
}, z.core.$strict>;
|
|
1223
1282
|
export type KnowledgePushed = z.infer<typeof KnowledgePushedSchema>;
|
|
1224
1283
|
/** One knowledge base as the list draws it: its name, its size, and when it was last pushed. */
|
|
@@ -1437,8 +1496,9 @@ export declare const ExtractionRunSchema: z.ZodObject<{
|
|
|
1437
1496
|
export type ExtractionRun = z.infer<typeof ExtractionRunSchema>;
|
|
1438
1497
|
/**
|
|
1439
1498
|
* POST /v1/calls/{call}/lookup, the body: which platform tool to run for this turn, and what to
|
|
1440
|
-
* run it with.
|
|
1441
|
-
*
|
|
1499
|
+
* run it with. Asked by the worker for the call it serves, and by the app for a call of its own
|
|
1500
|
+
* org — `this.knowledge.search` in a tool; the gateway runs it against its own stores and writes
|
|
1501
|
+
* memory.ops or docs.sources on the call's log itself.
|
|
1442
1502
|
*/
|
|
1443
1503
|
export declare const LookupRequestSchema: z.ZodObject<{
|
|
1444
1504
|
tool: z.ZodEnum<{
|
|
@@ -1459,6 +1519,25 @@ export declare const LookupResultSchema: z.ZodObject<{
|
|
|
1459
1519
|
took_ms: z.ZodNumber;
|
|
1460
1520
|
}, z.core.$strict>;
|
|
1461
1521
|
export type LookupResult = z.infer<typeof LookupResultSchema>;
|
|
1522
|
+
/** One chunk search found: the file it came from, the heading it sits under, and its text. */
|
|
1523
|
+
export declare const FoundChunkSchema: z.ZodObject<{
|
|
1524
|
+
path: z.ZodString;
|
|
1525
|
+
heading: z.ZodNullable<z.ZodString>;
|
|
1526
|
+
text: z.ZodString;
|
|
1527
|
+
}, z.core.$strict>;
|
|
1528
|
+
export type FoundChunk = z.infer<typeof FoundChunkSchema>;
|
|
1529
|
+
/**
|
|
1530
|
+
* What search answers in a lookup's output: the best chunks of every base the agent reads, the
|
|
1531
|
+
* best first. The app's `this.knowledge.search` hands the chunks to the tool that asked.
|
|
1532
|
+
*/
|
|
1533
|
+
export declare const SearchFoundSchema: z.ZodObject<{
|
|
1534
|
+
chunks: z.ZodArray<z.ZodObject<{
|
|
1535
|
+
path: z.ZodString;
|
|
1536
|
+
heading: z.ZodNullable<z.ZodString>;
|
|
1537
|
+
text: z.ZodString;
|
|
1538
|
+
}, z.core.$strict>>;
|
|
1539
|
+
}, z.core.$strict>;
|
|
1540
|
+
export type SearchFound = z.infer<typeof SearchFoundSchema>;
|
|
1462
1541
|
/**
|
|
1463
1542
|
* POST /v1/calls/{call}/remember, the answer: what the call taught about the contact, counted.
|
|
1464
1543
|
* Worker-only; the body is empty, the gateway reads the turns off its own log and writes
|
|
@@ -1518,3 +1597,595 @@ export declare const OutboundProvisionedSchema: z.ZodObject<{
|
|
|
1518
1597
|
address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1519
1598
|
}, z.core.$strict>;
|
|
1520
1599
|
export type OutboundProvisioned = z.infer<typeof OutboundProvisionedSchema>;
|
|
1600
|
+
/**
|
|
1601
|
+
* An agent's tuning: what the org set over what the app declared, per world and per corner. Every
|
|
1602
|
+
* field is optional; one left out is not set, and what the app declared — or the runtime's own
|
|
1603
|
+
* default — stands for it.
|
|
1604
|
+
*/
|
|
1605
|
+
export declare const TuningBodySchema: z.ZodObject<{
|
|
1606
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1607
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1608
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1609
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1610
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1611
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1612
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1613
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1614
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1615
|
+
}, z.core.$strict>>>;
|
|
1616
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1617
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1618
|
+
}, z.core.$strict>>>;
|
|
1619
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1620
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1621
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1622
|
+
}, z.core.$strict>>>;
|
|
1623
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1624
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1625
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1626
|
+
}, z.core.$strict>>>;
|
|
1627
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1628
|
+
base: z.ZodString;
|
|
1629
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1630
|
+
retrieved: "retrieved";
|
|
1631
|
+
tool: "tool";
|
|
1632
|
+
}>>>;
|
|
1633
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1634
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1635
|
+
}, z.core.$strict>>>>;
|
|
1636
|
+
}, z.core.$strict>;
|
|
1637
|
+
export type TuningBody = z.infer<typeof TuningBodySchema>;
|
|
1638
|
+
/**
|
|
1639
|
+
* One kept version of an agent's tuning: whose corner, which version, who set it and when, and
|
|
1640
|
+
* what it says.
|
|
1641
|
+
*/
|
|
1642
|
+
export declare const TuningRowSchema: z.ZodObject<{
|
|
1643
|
+
holder: z.ZodString;
|
|
1644
|
+
version: z.ZodInt;
|
|
1645
|
+
author: z.ZodString;
|
|
1646
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1647
|
+
set_at: z.ZodNumber;
|
|
1648
|
+
config: z.ZodObject<{
|
|
1649
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1650
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1651
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1652
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1653
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1654
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1655
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1656
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1657
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1658
|
+
}, z.core.$strict>>>;
|
|
1659
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1660
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1661
|
+
}, z.core.$strict>>>;
|
|
1662
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1663
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1664
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1665
|
+
}, z.core.$strict>>>;
|
|
1666
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1667
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1668
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1669
|
+
}, z.core.$strict>>>;
|
|
1670
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1671
|
+
base: z.ZodString;
|
|
1672
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1673
|
+
retrieved: "retrieved";
|
|
1674
|
+
tool: "tool";
|
|
1675
|
+
}>>>;
|
|
1676
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1677
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1678
|
+
}, z.core.$strict>>>>;
|
|
1679
|
+
}, z.core.$strict>;
|
|
1680
|
+
}, z.core.$strict>;
|
|
1681
|
+
export type TuningRow = z.infer<typeof TuningRowSchema>;
|
|
1682
|
+
/**
|
|
1683
|
+
* GET /v1/agents/{slug}/settings: the agent's tuning as this key sees it — its own corner's, the
|
|
1684
|
+
* team's and production's, each corner's own newest row, or null when that corner set nothing.
|
|
1685
|
+
*/
|
|
1686
|
+
export declare const TuningAnswerSchema: z.ZodObject<{
|
|
1687
|
+
world: z.ZodEnum<{
|
|
1688
|
+
production: "production";
|
|
1689
|
+
sandbox: "sandbox";
|
|
1690
|
+
}>;
|
|
1691
|
+
yours: z.ZodNullable<z.ZodObject<{
|
|
1692
|
+
holder: z.ZodString;
|
|
1693
|
+
version: z.ZodInt;
|
|
1694
|
+
author: z.ZodString;
|
|
1695
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1696
|
+
set_at: z.ZodNumber;
|
|
1697
|
+
config: z.ZodObject<{
|
|
1698
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1699
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1700
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1701
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1702
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1703
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1704
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1705
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1706
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1707
|
+
}, z.core.$strict>>>;
|
|
1708
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1709
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1710
|
+
}, z.core.$strict>>>;
|
|
1711
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1712
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1713
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1714
|
+
}, z.core.$strict>>>;
|
|
1715
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1716
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1717
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1718
|
+
}, z.core.$strict>>>;
|
|
1719
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1720
|
+
base: z.ZodString;
|
|
1721
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1722
|
+
retrieved: "retrieved";
|
|
1723
|
+
tool: "tool";
|
|
1724
|
+
}>>>;
|
|
1725
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1726
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1727
|
+
}, z.core.$strict>>>>;
|
|
1728
|
+
}, z.core.$strict>;
|
|
1729
|
+
}, z.core.$strict>>;
|
|
1730
|
+
team: z.ZodNullable<z.ZodObject<{
|
|
1731
|
+
holder: z.ZodString;
|
|
1732
|
+
version: z.ZodInt;
|
|
1733
|
+
author: z.ZodString;
|
|
1734
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1735
|
+
set_at: z.ZodNumber;
|
|
1736
|
+
config: z.ZodObject<{
|
|
1737
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1738
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1739
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1740
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1741
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1742
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1743
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1744
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1745
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1746
|
+
}, z.core.$strict>>>;
|
|
1747
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1748
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1749
|
+
}, z.core.$strict>>>;
|
|
1750
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1751
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1752
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1753
|
+
}, z.core.$strict>>>;
|
|
1754
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1755
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1756
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1757
|
+
}, z.core.$strict>>>;
|
|
1758
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1759
|
+
base: z.ZodString;
|
|
1760
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1761
|
+
retrieved: "retrieved";
|
|
1762
|
+
tool: "tool";
|
|
1763
|
+
}>>>;
|
|
1764
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1765
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1766
|
+
}, z.core.$strict>>>>;
|
|
1767
|
+
}, z.core.$strict>;
|
|
1768
|
+
}, z.core.$strict>>;
|
|
1769
|
+
production: z.ZodNullable<z.ZodObject<{
|
|
1770
|
+
holder: z.ZodString;
|
|
1771
|
+
version: z.ZodInt;
|
|
1772
|
+
author: z.ZodString;
|
|
1773
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1774
|
+
set_at: z.ZodNumber;
|
|
1775
|
+
config: z.ZodObject<{
|
|
1776
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1777
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1778
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1779
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1780
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1781
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1782
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1783
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1784
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1785
|
+
}, z.core.$strict>>>;
|
|
1786
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1787
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1788
|
+
}, z.core.$strict>>>;
|
|
1789
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1790
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1791
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1792
|
+
}, z.core.$strict>>>;
|
|
1793
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1794
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1795
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1796
|
+
}, z.core.$strict>>>;
|
|
1797
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1798
|
+
base: z.ZodString;
|
|
1799
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1800
|
+
retrieved: "retrieved";
|
|
1801
|
+
tool: "tool";
|
|
1802
|
+
}>>>;
|
|
1803
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1804
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1805
|
+
}, z.core.$strict>>>>;
|
|
1806
|
+
}, z.core.$strict>;
|
|
1807
|
+
}, z.core.$strict>>;
|
|
1808
|
+
}, z.core.$strict>;
|
|
1809
|
+
export type TuningAnswer = z.infer<typeof TuningAnswerSchema>;
|
|
1810
|
+
/**
|
|
1811
|
+
* PUT /v1/agents/{slug}/settings, the body: the whole set, the version it was read at, why, and
|
|
1812
|
+
* whose corner.
|
|
1813
|
+
*/
|
|
1814
|
+
export declare const TuningPutSchema: z.ZodObject<{
|
|
1815
|
+
config: z.ZodObject<{
|
|
1816
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1817
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1818
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1819
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1820
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1821
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1822
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1823
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1824
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1825
|
+
}, z.core.$strict>>>;
|
|
1826
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1827
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1828
|
+
}, z.core.$strict>>>;
|
|
1829
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1830
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1831
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1832
|
+
}, z.core.$strict>>>;
|
|
1833
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1834
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1835
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1836
|
+
}, z.core.$strict>>>;
|
|
1837
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1838
|
+
base: z.ZodString;
|
|
1839
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1840
|
+
retrieved: "retrieved";
|
|
1841
|
+
tool: "tool";
|
|
1842
|
+
}>>>;
|
|
1843
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1844
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1845
|
+
}, z.core.$strict>>>>;
|
|
1846
|
+
}, z.core.$strict>;
|
|
1847
|
+
if_version: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodInt>>>;
|
|
1848
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
1849
|
+
team: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1850
|
+
}, z.core.$strict>;
|
|
1851
|
+
export type TuningPut = z.infer<typeof TuningPutSchema>;
|
|
1852
|
+
/** GET /v1/agents/{slug}/settings/history: one corner's versions, newest first. */
|
|
1853
|
+
export declare const TuningHistorySchema: z.ZodObject<{
|
|
1854
|
+
world: z.ZodEnum<{
|
|
1855
|
+
production: "production";
|
|
1856
|
+
sandbox: "sandbox";
|
|
1857
|
+
}>;
|
|
1858
|
+
holder: z.ZodString;
|
|
1859
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1860
|
+
holder: z.ZodString;
|
|
1861
|
+
version: z.ZodInt;
|
|
1862
|
+
author: z.ZodString;
|
|
1863
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1864
|
+
set_at: z.ZodNumber;
|
|
1865
|
+
config: z.ZodObject<{
|
|
1866
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1867
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1868
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1869
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1870
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1871
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1872
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1873
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1874
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1875
|
+
}, z.core.$strict>>>;
|
|
1876
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1877
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1878
|
+
}, z.core.$strict>>>;
|
|
1879
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1880
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1881
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1882
|
+
}, z.core.$strict>>>;
|
|
1883
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1884
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1885
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1886
|
+
}, z.core.$strict>>>;
|
|
1887
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1888
|
+
base: z.ZodString;
|
|
1889
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1890
|
+
retrieved: "retrieved";
|
|
1891
|
+
tool: "tool";
|
|
1892
|
+
}>>>;
|
|
1893
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1894
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1895
|
+
}, z.core.$strict>>>>;
|
|
1896
|
+
}, z.core.$strict>;
|
|
1897
|
+
}, z.core.$strict>>;
|
|
1898
|
+
}, z.core.$strict>;
|
|
1899
|
+
export type TuningHistory = z.infer<typeof TuningHistorySchema>;
|
|
1900
|
+
/**
|
|
1901
|
+
* GET /v1/agents/{slug}/settings/diff: what this key's corner reads against another corner's
|
|
1902
|
+
* newest, and which fields differ.
|
|
1903
|
+
*/
|
|
1904
|
+
export declare const TuningDiffSchema: z.ZodObject<{
|
|
1905
|
+
ours: z.ZodNullable<z.ZodObject<{
|
|
1906
|
+
holder: z.ZodString;
|
|
1907
|
+
version: z.ZodInt;
|
|
1908
|
+
author: z.ZodString;
|
|
1909
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1910
|
+
set_at: z.ZodNumber;
|
|
1911
|
+
config: z.ZodObject<{
|
|
1912
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1913
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1914
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1915
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1916
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1917
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1918
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1919
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1920
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1921
|
+
}, z.core.$strict>>>;
|
|
1922
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1923
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1924
|
+
}, z.core.$strict>>>;
|
|
1925
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1926
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1927
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1928
|
+
}, z.core.$strict>>>;
|
|
1929
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1930
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1931
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1932
|
+
}, z.core.$strict>>>;
|
|
1933
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1934
|
+
base: z.ZodString;
|
|
1935
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1936
|
+
retrieved: "retrieved";
|
|
1937
|
+
tool: "tool";
|
|
1938
|
+
}>>>;
|
|
1939
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1940
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1941
|
+
}, z.core.$strict>>>>;
|
|
1942
|
+
}, z.core.$strict>;
|
|
1943
|
+
}, z.core.$strict>>;
|
|
1944
|
+
theirs: z.ZodNullable<z.ZodObject<{
|
|
1945
|
+
holder: z.ZodString;
|
|
1946
|
+
version: z.ZodInt;
|
|
1947
|
+
author: z.ZodString;
|
|
1948
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1949
|
+
set_at: z.ZodNumber;
|
|
1950
|
+
config: z.ZodObject<{
|
|
1951
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1952
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1953
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1954
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1955
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1956
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1957
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1958
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1959
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1960
|
+
}, z.core.$strict>>>;
|
|
1961
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1962
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1963
|
+
}, z.core.$strict>>>;
|
|
1964
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1965
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1966
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1967
|
+
}, z.core.$strict>>>;
|
|
1968
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1969
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1970
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1971
|
+
}, z.core.$strict>>>;
|
|
1972
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
1973
|
+
base: z.ZodString;
|
|
1974
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1975
|
+
retrieved: "retrieved";
|
|
1976
|
+
tool: "tool";
|
|
1977
|
+
}>>>;
|
|
1978
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
1979
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1980
|
+
}, z.core.$strict>>>>;
|
|
1981
|
+
}, z.core.$strict>;
|
|
1982
|
+
}, z.core.$strict>>;
|
|
1983
|
+
changed: z.ZodArray<z.ZodString>;
|
|
1984
|
+
}, z.core.$strict>;
|
|
1985
|
+
export type TuningDiff = z.infer<typeof TuningDiffSchema>;
|
|
1986
|
+
/**
|
|
1987
|
+
* POST /v1/agents/{slug}/settings/rollback, the body: which version to bring back. It comes back
|
|
1988
|
+
* as a NEW version; nothing is deleted.
|
|
1989
|
+
*/
|
|
1990
|
+
export declare const RollbackSchema: z.ZodObject<{
|
|
1991
|
+
version: z.ZodInt;
|
|
1992
|
+
team: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1993
|
+
}, z.core.$strict>;
|
|
1994
|
+
export type Rollback = z.infer<typeof RollbackSchema>;
|
|
1995
|
+
/**
|
|
1996
|
+
* The org's lexicon: how the voice says the words it would get wrong, and the words the ears must
|
|
1997
|
+
* know. Shared by every agent of the org, laid over each one's own says and hears.
|
|
1998
|
+
*/
|
|
1999
|
+
export declare const LexiconBodySchema: z.ZodObject<{
|
|
2000
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2001
|
+
word: z.ZodString;
|
|
2002
|
+
spoken: z.ZodString;
|
|
2003
|
+
}, z.core.$strict>>;
|
|
2004
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2005
|
+
}, z.core.$strict>;
|
|
2006
|
+
export type LexiconBody = z.infer<typeof LexiconBodySchema>;
|
|
2007
|
+
/** One kept version of the org's lexicon. */
|
|
2008
|
+
export declare const LexiconRowSchema: z.ZodObject<{
|
|
2009
|
+
holder: z.ZodString;
|
|
2010
|
+
version: z.ZodInt;
|
|
2011
|
+
author: z.ZodString;
|
|
2012
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2013
|
+
set_at: z.ZodNumber;
|
|
2014
|
+
lexicon: z.ZodObject<{
|
|
2015
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2016
|
+
word: z.ZodString;
|
|
2017
|
+
spoken: z.ZodString;
|
|
2018
|
+
}, z.core.$strict>>;
|
|
2019
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2020
|
+
}, z.core.$strict>;
|
|
2021
|
+
}, z.core.$strict>;
|
|
2022
|
+
export type LexiconRow = z.infer<typeof LexiconRowSchema>;
|
|
2023
|
+
/**
|
|
2024
|
+
* GET /v1/lexicon: the org's words as this key sees them — its own corner's, the team's and
|
|
2025
|
+
* production's, each corner's own newest, or null.
|
|
2026
|
+
*/
|
|
2027
|
+
export declare const LexiconAnswerSchema: z.ZodObject<{
|
|
2028
|
+
world: z.ZodEnum<{
|
|
2029
|
+
production: "production";
|
|
2030
|
+
sandbox: "sandbox";
|
|
2031
|
+
}>;
|
|
2032
|
+
yours: z.ZodNullable<z.ZodObject<{
|
|
2033
|
+
holder: z.ZodString;
|
|
2034
|
+
version: z.ZodInt;
|
|
2035
|
+
author: z.ZodString;
|
|
2036
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2037
|
+
set_at: z.ZodNumber;
|
|
2038
|
+
lexicon: z.ZodObject<{
|
|
2039
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2040
|
+
word: z.ZodString;
|
|
2041
|
+
spoken: z.ZodString;
|
|
2042
|
+
}, z.core.$strict>>;
|
|
2043
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2044
|
+
}, z.core.$strict>;
|
|
2045
|
+
}, z.core.$strict>>;
|
|
2046
|
+
team: z.ZodNullable<z.ZodObject<{
|
|
2047
|
+
holder: z.ZodString;
|
|
2048
|
+
version: z.ZodInt;
|
|
2049
|
+
author: z.ZodString;
|
|
2050
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2051
|
+
set_at: z.ZodNumber;
|
|
2052
|
+
lexicon: z.ZodObject<{
|
|
2053
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2054
|
+
word: z.ZodString;
|
|
2055
|
+
spoken: z.ZodString;
|
|
2056
|
+
}, z.core.$strict>>;
|
|
2057
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2058
|
+
}, z.core.$strict>;
|
|
2059
|
+
}, z.core.$strict>>;
|
|
2060
|
+
production: z.ZodNullable<z.ZodObject<{
|
|
2061
|
+
holder: z.ZodString;
|
|
2062
|
+
version: z.ZodInt;
|
|
2063
|
+
author: z.ZodString;
|
|
2064
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2065
|
+
set_at: z.ZodNumber;
|
|
2066
|
+
lexicon: z.ZodObject<{
|
|
2067
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2068
|
+
word: z.ZodString;
|
|
2069
|
+
spoken: z.ZodString;
|
|
2070
|
+
}, z.core.$strict>>;
|
|
2071
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2072
|
+
}, z.core.$strict>;
|
|
2073
|
+
}, z.core.$strict>>;
|
|
2074
|
+
}, z.core.$strict>;
|
|
2075
|
+
export type LexiconAnswer = z.infer<typeof LexiconAnswerSchema>;
|
|
2076
|
+
/** PUT /v1/lexicon, the body: the whole lexicon, the version it was read at, why, and whose corner. */
|
|
2077
|
+
export declare const LexiconPutSchema: z.ZodObject<{
|
|
2078
|
+
lexicon: z.ZodObject<{
|
|
2079
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2080
|
+
word: z.ZodString;
|
|
2081
|
+
spoken: z.ZodString;
|
|
2082
|
+
}, z.core.$strict>>;
|
|
2083
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2084
|
+
}, z.core.$strict>;
|
|
2085
|
+
if_version: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodInt>>>;
|
|
2086
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
2087
|
+
team: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2088
|
+
}, z.core.$strict>;
|
|
2089
|
+
export type LexiconPut = z.infer<typeof LexiconPutSchema>;
|
|
2090
|
+
/** GET /v1/lexicon/history: one corner's versions, newest first. */
|
|
2091
|
+
export declare const LexiconHistorySchema: z.ZodObject<{
|
|
2092
|
+
world: z.ZodEnum<{
|
|
2093
|
+
production: "production";
|
|
2094
|
+
sandbox: "sandbox";
|
|
2095
|
+
}>;
|
|
2096
|
+
holder: z.ZodString;
|
|
2097
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
2098
|
+
holder: z.ZodString;
|
|
2099
|
+
version: z.ZodInt;
|
|
2100
|
+
author: z.ZodString;
|
|
2101
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2102
|
+
set_at: z.ZodNumber;
|
|
2103
|
+
lexicon: z.ZodObject<{
|
|
2104
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2105
|
+
word: z.ZodString;
|
|
2106
|
+
spoken: z.ZodString;
|
|
2107
|
+
}, z.core.$strict>>;
|
|
2108
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2109
|
+
}, z.core.$strict>;
|
|
2110
|
+
}, z.core.$strict>>;
|
|
2111
|
+
}, z.core.$strict>;
|
|
2112
|
+
export type LexiconHistory = z.infer<typeof LexiconHistorySchema>;
|
|
2113
|
+
/**
|
|
2114
|
+
* GET /v1/calls/{call}/settings: the exact tuning and lexicon a call was built on, by the versions
|
|
2115
|
+
* its head row recorded.
|
|
2116
|
+
*/
|
|
2117
|
+
export declare const CallTuningSchema: z.ZodObject<{
|
|
2118
|
+
config_version: z.ZodNullable<z.ZodInt>;
|
|
2119
|
+
lexicon_version: z.ZodNullable<z.ZodInt>;
|
|
2120
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
2121
|
+
holder: z.ZodString;
|
|
2122
|
+
version: z.ZodInt;
|
|
2123
|
+
author: z.ZodString;
|
|
2124
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2125
|
+
set_at: z.ZodNumber;
|
|
2126
|
+
config: z.ZodObject<{
|
|
2127
|
+
voice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2128
|
+
tts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2129
|
+
tts_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2130
|
+
stt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2131
|
+
llm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2132
|
+
greeting: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2133
|
+
say: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2134
|
+
reply: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2135
|
+
allow_interruptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2136
|
+
}, z.core.$strict>>>;
|
|
2137
|
+
hangup: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2138
|
+
when: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2139
|
+
}, z.core.$strict>>>;
|
|
2140
|
+
turn: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2141
|
+
min_interruption_words: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
2142
|
+
endpointing_ms: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
2143
|
+
}, z.core.$strict>>>;
|
|
2144
|
+
memory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2145
|
+
remember: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
2146
|
+
forget: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
2147
|
+
}, z.core.$strict>>>;
|
|
2148
|
+
knowledge: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
2149
|
+
base: z.ZodString;
|
|
2150
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2151
|
+
retrieved: "retrieved";
|
|
2152
|
+
tool: "tool";
|
|
2153
|
+
}>>>;
|
|
2154
|
+
k: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
2155
|
+
min_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2156
|
+
}, z.core.$strict>>>>;
|
|
2157
|
+
}, z.core.$strict>;
|
|
2158
|
+
}, z.core.$strict>>;
|
|
2159
|
+
lexicon: z.ZodNullable<z.ZodObject<{
|
|
2160
|
+
holder: z.ZodString;
|
|
2161
|
+
version: z.ZodInt;
|
|
2162
|
+
author: z.ZodString;
|
|
2163
|
+
note: z.ZodNullable<z.ZodString>;
|
|
2164
|
+
set_at: z.ZodNumber;
|
|
2165
|
+
lexicon: z.ZodObject<{
|
|
2166
|
+
said: z.ZodArray<z.ZodObject<{
|
|
2167
|
+
word: z.ZodString;
|
|
2168
|
+
spoken: z.ZodString;
|
|
2169
|
+
}, z.core.$strict>>;
|
|
2170
|
+
heard: z.ZodArray<z.ZodString>;
|
|
2171
|
+
}, z.core.$strict>;
|
|
2172
|
+
}, z.core.$strict>>;
|
|
2173
|
+
}, z.core.$strict>;
|
|
2174
|
+
export type CallTuning = z.infer<typeof CallTuningSchema>;
|
|
2175
|
+
/** One base and the agents whose settings attach it. */
|
|
2176
|
+
export declare const KnowledgeUseSchema: z.ZodObject<{
|
|
2177
|
+
base: z.ZodString;
|
|
2178
|
+
agents: z.ZodArray<z.ZodString>;
|
|
2179
|
+
}, z.core.$strict>;
|
|
2180
|
+
export type KnowledgeUse = z.infer<typeof KnowledgeUseSchema>;
|
|
2181
|
+
/**
|
|
2182
|
+
* GET /v1/knowledge/attached: which agents read each base, off every agent's newest settings in
|
|
2183
|
+
* this world.
|
|
2184
|
+
*/
|
|
2185
|
+
export declare const KnowledgeUsesSchema: z.ZodObject<{
|
|
2186
|
+
bases: z.ZodArray<z.ZodObject<{
|
|
2187
|
+
base: z.ZodString;
|
|
2188
|
+
agents: z.ZodArray<z.ZodString>;
|
|
2189
|
+
}, z.core.$strict>>;
|
|
2190
|
+
}, z.core.$strict>;
|
|
2191
|
+
export type KnowledgeUses = z.infer<typeof KnowledgeUsesSchema>;
|
package/dist/generated/rest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated from schema/rest.json: the envelopes the read doors answer in. Never edited by hand.
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { ChannelSchema, ContactSchema, CostSchema, DirectionSchema, EndReasonSchema, EnvSchema, KnowledgeFileSchema, PlatformToolSchema, } from "./defs.js";
|
|
3
|
+
import { ChannelSchema, ContactSchema, CostSchema, DirectionSchema, DocsConfigSchema, EndReasonSchema, EnvSchema, GreetingConfigSchema, HangupConfigSchema, KnowledgeFileSchema, MemoryConfigSchema, PlatformToolSchema, PronunciationSchema, TurnConfigSchema, } from "./defs.js";
|
|
4
4
|
import { EntrySchema } from "./envelope.js";
|
|
5
5
|
import { CallStatusSchema, StateSchema } from "./state.js";
|
|
6
6
|
/** GET /v1/calls/{call}/state: the whole log folded, and the seq a stream resumes from. */
|
|
@@ -340,6 +340,35 @@ export const HeldAgentSchema = z.strictObject({
|
|
|
340
340
|
export const AgentListSchema = z.strictObject({
|
|
341
341
|
agents: z.array(HeldAgentSchema),
|
|
342
342
|
});
|
|
343
|
+
/**
|
|
344
|
+
* One app connected to the gateway right now: one process on one machine, holding one or more
|
|
345
|
+
* agents in one world.
|
|
346
|
+
*/
|
|
347
|
+
export const AppProcessSchema = z.strictObject({
|
|
348
|
+
app: z.string(),
|
|
349
|
+
agents: z.array(z.string()),
|
|
350
|
+
env: EnvSchema,
|
|
351
|
+
host: z.string().nullable(),
|
|
352
|
+
address: z.string().nullable(),
|
|
353
|
+
sdk: z.string().nullable(),
|
|
354
|
+
holder: LineHolderSchema.nullable(),
|
|
355
|
+
connected_at: z.number(),
|
|
356
|
+
});
|
|
357
|
+
/**
|
|
358
|
+
* GET /v1/apps: every app connected in the request's world that this key may see — its own
|
|
359
|
+
* corner's and the org's, every corner's with `team`.
|
|
360
|
+
*/
|
|
361
|
+
export const AppListSchema = z.strictObject({
|
|
362
|
+
apps: z.array(AppProcessSchema),
|
|
363
|
+
});
|
|
364
|
+
/**
|
|
365
|
+
* POST /v1/apps/{app}/stop, the answer: the socket was closed with the stop code, and the app
|
|
366
|
+
* exits rather than reconnect.
|
|
367
|
+
*/
|
|
368
|
+
export const AppStoppedSchema = z.strictObject({
|
|
369
|
+
app: z.string(),
|
|
370
|
+
stopped: z.boolean(),
|
|
371
|
+
});
|
|
343
372
|
/**
|
|
344
373
|
* GET /v1/agents/{slug}/line: whose terminal a call that RINGS at this agent's doors lands in. An
|
|
345
374
|
* org shares one sandbox number, so it rings in one place and which one is claimed.
|
|
@@ -399,13 +428,15 @@ export const KnowledgeScoreSchema = z.strictObject({
|
|
|
399
428
|
misses: z.array(GoldenMissSchema),
|
|
400
429
|
});
|
|
401
430
|
/**
|
|
402
|
-
* PUT /v1/knowledge/{base}, the answer: which base, how many chunks it became,
|
|
403
|
-
*
|
|
431
|
+
* PUT /v1/knowledge/{base}, the answer: which base, how many chunks it became, how long that took,
|
|
432
|
+
* and what its whole files weigh on every call.
|
|
404
433
|
*/
|
|
405
434
|
export const KnowledgePushedSchema = z.strictObject({
|
|
406
435
|
base: z.string(),
|
|
407
436
|
chunks: z.int(),
|
|
408
437
|
took_ms: z.number(),
|
|
438
|
+
whole_tokens: z.int().nullish(),
|
|
439
|
+
notice: z.string().nullable().nullish(),
|
|
409
440
|
});
|
|
410
441
|
/** One knowledge base as the list draws it: its name, its size, and when it was last pushed. */
|
|
411
442
|
export const KnowledgeBaseSchema = z.strictObject({
|
|
@@ -551,8 +582,9 @@ export const ExtractionRunSchema = z.strictObject({
|
|
|
551
582
|
});
|
|
552
583
|
/**
|
|
553
584
|
* POST /v1/calls/{call}/lookup, the body: which platform tool to run for this turn, and what to
|
|
554
|
-
* run it with.
|
|
555
|
-
*
|
|
585
|
+
* run it with. Asked by the worker for the call it serves, and by the app for a call of its own
|
|
586
|
+
* org — `this.knowledge.search` in a tool; the gateway runs it against its own stores and writes
|
|
587
|
+
* memory.ops or docs.sources on the call's log itself.
|
|
556
588
|
*/
|
|
557
589
|
export const LookupRequestSchema = z.strictObject({
|
|
558
590
|
tool: PlatformToolSchema,
|
|
@@ -568,6 +600,19 @@ export const LookupResultSchema = z.strictObject({
|
|
|
568
600
|
output: z.record(z.string(), z.unknown()),
|
|
569
601
|
took_ms: z.number(),
|
|
570
602
|
});
|
|
603
|
+
/** One chunk search found: the file it came from, the heading it sits under, and its text. */
|
|
604
|
+
export const FoundChunkSchema = z.strictObject({
|
|
605
|
+
path: z.string(),
|
|
606
|
+
heading: z.string().nullable(),
|
|
607
|
+
text: z.string(),
|
|
608
|
+
});
|
|
609
|
+
/**
|
|
610
|
+
* What search answers in a lookup's output: the best chunks of every base the agent reads, the
|
|
611
|
+
* best first. The app's `this.knowledge.search` hands the chunks to the tool that asked.
|
|
612
|
+
*/
|
|
613
|
+
export const SearchFoundSchema = z.strictObject({
|
|
614
|
+
chunks: z.array(FoundChunkSchema),
|
|
615
|
+
});
|
|
571
616
|
/**
|
|
572
617
|
* POST /v1/calls/{call}/remember, the answer: what the call taught about the contact, counted.
|
|
573
618
|
* Worker-only; the body is empty, the gateway reads the turns off its own log and writes
|
|
@@ -614,3 +659,137 @@ export const OutboundProvisionedSchema = z.strictObject({
|
|
|
614
659
|
trunk: z.string().nullish(),
|
|
615
660
|
address: z.string().nullish(),
|
|
616
661
|
});
|
|
662
|
+
/**
|
|
663
|
+
* An agent's tuning: what the org set over what the app declared, per world and per corner. Every
|
|
664
|
+
* field is optional; one left out is not set, and what the app declared — or the runtime's own
|
|
665
|
+
* default — stands for it.
|
|
666
|
+
*/
|
|
667
|
+
export const TuningBodySchema = z.strictObject({
|
|
668
|
+
voice: z.string().nullish(),
|
|
669
|
+
tts: z.string().nullish(),
|
|
670
|
+
tts_model: z.string().nullish(),
|
|
671
|
+
stt: z.string().nullish(),
|
|
672
|
+
llm: z.string().nullish(),
|
|
673
|
+
greeting: GreetingConfigSchema.nullish(),
|
|
674
|
+
hangup: HangupConfigSchema.nullish(),
|
|
675
|
+
turn: TurnConfigSchema.nullish(),
|
|
676
|
+
memory: MemoryConfigSchema.nullish(),
|
|
677
|
+
knowledge: z.array(DocsConfigSchema).nullish(),
|
|
678
|
+
});
|
|
679
|
+
/**
|
|
680
|
+
* One kept version of an agent's tuning: whose corner, which version, who set it and when, and
|
|
681
|
+
* what it says.
|
|
682
|
+
*/
|
|
683
|
+
export const TuningRowSchema = z.strictObject({
|
|
684
|
+
holder: z.string(),
|
|
685
|
+
version: z.int(),
|
|
686
|
+
author: z.string(),
|
|
687
|
+
note: z.string().nullable(),
|
|
688
|
+
set_at: z.number(),
|
|
689
|
+
config: TuningBodySchema,
|
|
690
|
+
});
|
|
691
|
+
/**
|
|
692
|
+
* GET /v1/agents/{slug}/settings: the agent's tuning as this key sees it — its own corner's, the
|
|
693
|
+
* team's and production's, each corner's own newest row, or null when that corner set nothing.
|
|
694
|
+
*/
|
|
695
|
+
export const TuningAnswerSchema = z.strictObject({
|
|
696
|
+
world: EnvSchema,
|
|
697
|
+
yours: TuningRowSchema.nullable(),
|
|
698
|
+
team: TuningRowSchema.nullable(),
|
|
699
|
+
production: TuningRowSchema.nullable(),
|
|
700
|
+
});
|
|
701
|
+
/**
|
|
702
|
+
* PUT /v1/agents/{slug}/settings, the body: the whole set, the version it was read at, why, and
|
|
703
|
+
* whose corner.
|
|
704
|
+
*/
|
|
705
|
+
export const TuningPutSchema = z.strictObject({
|
|
706
|
+
config: TuningBodySchema,
|
|
707
|
+
if_version: z.int().nullable().nullish(),
|
|
708
|
+
note: z.string().nullable().nullish(),
|
|
709
|
+
team: z.boolean().nullish(),
|
|
710
|
+
});
|
|
711
|
+
/** GET /v1/agents/{slug}/settings/history: one corner's versions, newest first. */
|
|
712
|
+
export const TuningHistorySchema = z.strictObject({
|
|
713
|
+
world: EnvSchema,
|
|
714
|
+
holder: z.string(),
|
|
715
|
+
rows: z.array(TuningRowSchema),
|
|
716
|
+
});
|
|
717
|
+
/**
|
|
718
|
+
* GET /v1/agents/{slug}/settings/diff: what this key's corner reads against another corner's
|
|
719
|
+
* newest, and which fields differ.
|
|
720
|
+
*/
|
|
721
|
+
export const TuningDiffSchema = z.strictObject({
|
|
722
|
+
ours: TuningRowSchema.nullable(),
|
|
723
|
+
theirs: TuningRowSchema.nullable(),
|
|
724
|
+
changed: z.array(z.string()),
|
|
725
|
+
});
|
|
726
|
+
/**
|
|
727
|
+
* POST /v1/agents/{slug}/settings/rollback, the body: which version to bring back. It comes back
|
|
728
|
+
* as a NEW version; nothing is deleted.
|
|
729
|
+
*/
|
|
730
|
+
export const RollbackSchema = z.strictObject({
|
|
731
|
+
version: z.int(),
|
|
732
|
+
team: z.boolean().nullish(),
|
|
733
|
+
});
|
|
734
|
+
/**
|
|
735
|
+
* The org's lexicon: how the voice says the words it would get wrong, and the words the ears must
|
|
736
|
+
* know. Shared by every agent of the org, laid over each one's own says and hears.
|
|
737
|
+
*/
|
|
738
|
+
export const LexiconBodySchema = z.strictObject({
|
|
739
|
+
said: z.array(PronunciationSchema),
|
|
740
|
+
heard: z.array(z.string()),
|
|
741
|
+
});
|
|
742
|
+
/** One kept version of the org's lexicon. */
|
|
743
|
+
export const LexiconRowSchema = z.strictObject({
|
|
744
|
+
holder: z.string(),
|
|
745
|
+
version: z.int(),
|
|
746
|
+
author: z.string(),
|
|
747
|
+
note: z.string().nullable(),
|
|
748
|
+
set_at: z.number(),
|
|
749
|
+
lexicon: LexiconBodySchema,
|
|
750
|
+
});
|
|
751
|
+
/**
|
|
752
|
+
* GET /v1/lexicon: the org's words as this key sees them — its own corner's, the team's and
|
|
753
|
+
* production's, each corner's own newest, or null.
|
|
754
|
+
*/
|
|
755
|
+
export const LexiconAnswerSchema = z.strictObject({
|
|
756
|
+
world: EnvSchema,
|
|
757
|
+
yours: LexiconRowSchema.nullable(),
|
|
758
|
+
team: LexiconRowSchema.nullable(),
|
|
759
|
+
production: LexiconRowSchema.nullable(),
|
|
760
|
+
});
|
|
761
|
+
/** PUT /v1/lexicon, the body: the whole lexicon, the version it was read at, why, and whose corner. */
|
|
762
|
+
export const LexiconPutSchema = z.strictObject({
|
|
763
|
+
lexicon: LexiconBodySchema,
|
|
764
|
+
if_version: z.int().nullable().nullish(),
|
|
765
|
+
note: z.string().nullable().nullish(),
|
|
766
|
+
team: z.boolean().nullish(),
|
|
767
|
+
});
|
|
768
|
+
/** GET /v1/lexicon/history: one corner's versions, newest first. */
|
|
769
|
+
export const LexiconHistorySchema = z.strictObject({
|
|
770
|
+
world: EnvSchema,
|
|
771
|
+
holder: z.string(),
|
|
772
|
+
rows: z.array(LexiconRowSchema),
|
|
773
|
+
});
|
|
774
|
+
/**
|
|
775
|
+
* GET /v1/calls/{call}/settings: the exact tuning and lexicon a call was built on, by the versions
|
|
776
|
+
* its head row recorded.
|
|
777
|
+
*/
|
|
778
|
+
export const CallTuningSchema = z.strictObject({
|
|
779
|
+
config_version: z.int().nullable(),
|
|
780
|
+
lexicon_version: z.int().nullable(),
|
|
781
|
+
config: TuningRowSchema.nullable(),
|
|
782
|
+
lexicon: LexiconRowSchema.nullable(),
|
|
783
|
+
});
|
|
784
|
+
/** One base and the agents whose settings attach it. */
|
|
785
|
+
export const KnowledgeUseSchema = z.strictObject({
|
|
786
|
+
base: z.string(),
|
|
787
|
+
agents: z.array(z.string()),
|
|
788
|
+
});
|
|
789
|
+
/**
|
|
790
|
+
* GET /v1/knowledge/attached: which agents read each base, off every agent's newest settings in
|
|
791
|
+
* this world.
|
|
792
|
+
*/
|
|
793
|
+
export const KnowledgeUsesSchema = z.strictObject({
|
|
794
|
+
bases: z.array(KnowledgeUseSchema),
|
|
795
|
+
});
|
package/package.json
CHANGED