@pinecall/protocol 0.6.1 → 0.6.2
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.
|
@@ -228,6 +228,7 @@ export declare const CallStartedSchema: z.ZodObject<{
|
|
|
228
228
|
from: z.ZodString;
|
|
229
229
|
to: z.ZodString;
|
|
230
230
|
run: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
231
|
+
persona: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
231
232
|
caller: z.ZodNullable<z.ZodObject<{
|
|
232
233
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
234
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/generated/events.js
CHANGED
|
@@ -126,6 +126,7 @@ export const CallStartedSchema = z.strictObject({
|
|
|
126
126
|
from: z.string(),
|
|
127
127
|
to: z.string(),
|
|
128
128
|
run: z.string().nullable().nullish(),
|
|
129
|
+
persona: z.string().nullable().nullish(),
|
|
129
130
|
caller: ContactSchema.nullable(),
|
|
130
131
|
started_at: z.number(),
|
|
131
132
|
env: EnvSchema.nullish(),
|
|
@@ -152,6 +152,7 @@ export declare const EVENT_SCHEMAS: {
|
|
|
152
152
|
from: import("zod").ZodString;
|
|
153
153
|
to: import("zod").ZodString;
|
|
154
154
|
run: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNullable<import("zod").ZodString>>>;
|
|
155
|
+
persona: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNullable<import("zod").ZodString>>>;
|
|
155
156
|
caller: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
156
157
|
id: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
157
158
|
phone: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
package/dist/generated/rest.d.ts
CHANGED
|
@@ -2243,9 +2243,11 @@ export declare const KnowledgeUsesSchema: z.ZodObject<{
|
|
|
2243
2243
|
}, z.core.$strict>;
|
|
2244
2244
|
export type KnowledgeUses = z.infer<typeof KnowledgeUsesSchema>;
|
|
2245
2245
|
/**
|
|
2246
|
-
* One synthetic caller of an
|
|
2246
|
+
* One synthetic caller of an ORG, kept by the gateway: what they want, how they talk, and what
|
|
2247
2247
|
* they may state about themselves. A model plays them turn by turn — there is no script — for
|
|
2248
|
-
* `pinecall simulate` and the console's Simulations.
|
|
2248
|
+
* `pinecall simulate` and the console's Simulations. A caller is a person on the phone, so who
|
|
2249
|
+
* they are does not depend on which of the org's agents answers: every agent of the org calls with
|
|
2250
|
+
* the same list.
|
|
2249
2251
|
*/
|
|
2250
2252
|
export declare const PersonaSchema: z.ZodObject<{
|
|
2251
2253
|
name: z.ZodString;
|
|
@@ -2258,7 +2260,10 @@ export declare const PersonaSchema: z.ZodObject<{
|
|
|
2258
2260
|
set_at: z.ZodNumber;
|
|
2259
2261
|
}, z.core.$strict>;
|
|
2260
2262
|
export type Persona = z.infer<typeof PersonaSchema>;
|
|
2261
|
-
/**
|
|
2263
|
+
/**
|
|
2264
|
+
* GET /v1/personas: every caller the org wrote, by name. The same list for every agent of the org,
|
|
2265
|
+
* and the same one in both worlds.
|
|
2266
|
+
*/
|
|
2262
2267
|
export declare const PersonaListSchema: z.ZodObject<{
|
|
2263
2268
|
personas: z.ZodArray<z.ZodObject<{
|
|
2264
2269
|
name: z.ZodString;
|
|
@@ -2273,8 +2278,8 @@ export declare const PersonaListSchema: z.ZodObject<{
|
|
|
2273
2278
|
}, z.core.$strict>;
|
|
2274
2279
|
export type PersonaList = z.infer<typeof PersonaListSchema>;
|
|
2275
2280
|
/**
|
|
2276
|
-
* PUT /v1/
|
|
2277
|
-
*
|
|
2281
|
+
* PUT /v1/personas/{name}, the body: the caller, written whole. A name that exists is replaced;
|
|
2282
|
+
* `was` renames the caller it names.
|
|
2278
2283
|
*/
|
|
2279
2284
|
export declare const PersonaPutSchema: z.ZodObject<{
|
|
2280
2285
|
about: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2285,3 +2290,74 @@ export declare const PersonaPutSchema: z.ZodObject<{
|
|
|
2285
2290
|
was: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2286
2291
|
}, z.core.$strict>;
|
|
2287
2292
|
export type PersonaPut = z.infer<typeof PersonaPutSchema>;
|
|
2293
|
+
/**
|
|
2294
|
+
* One simulation this caller has run: the call it was, and what the call came to. Read off the
|
|
2295
|
+
* call index, never off a log — the same row the sessions list is drawn from.
|
|
2296
|
+
*/
|
|
2297
|
+
export declare const PersonaRunSchema: z.ZodObject<{
|
|
2298
|
+
call: z.ZodString;
|
|
2299
|
+
agent: z.ZodString;
|
|
2300
|
+
started_at: z.ZodNumber;
|
|
2301
|
+
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
2302
|
+
turns: z.ZodInt;
|
|
2303
|
+
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
2304
|
+
agent_hung_up: "agent_hung_up";
|
|
2305
|
+
app_detached: "app_detached";
|
|
2306
|
+
busy: "busy";
|
|
2307
|
+
caller_hung_up: "caller_hung_up";
|
|
2308
|
+
dial_failed: "dial_failed";
|
|
2309
|
+
drained: "drained";
|
|
2310
|
+
error: "error";
|
|
2311
|
+
no_answer: "no_answer";
|
|
2312
|
+
supervisor_ended: "supervisor_ended";
|
|
2313
|
+
timeout: "timeout";
|
|
2314
|
+
transferred: "transferred";
|
|
2315
|
+
}>>;
|
|
2316
|
+
outcome: z.ZodNullable<z.ZodString>;
|
|
2317
|
+
cost_eur: z.ZodNullable<z.ZodNumber>;
|
|
2318
|
+
score: z.ZodNullable<z.ZodObject<{
|
|
2319
|
+
held: z.ZodInt;
|
|
2320
|
+
judged: z.ZodInt;
|
|
2321
|
+
passed: z.ZodBoolean;
|
|
2322
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
2323
|
+
}, z.core.$strict>>;
|
|
2324
|
+
}, z.core.$strict>;
|
|
2325
|
+
export type PersonaRun = z.infer<typeof PersonaRunSchema>;
|
|
2326
|
+
/**
|
|
2327
|
+
* Every simulation this caller has run, newest first, a page at a time. GET
|
|
2328
|
+
* /v1/personas/{name}/runs, in the key's own world and corner, paged exactly as the sessions list
|
|
2329
|
+
* is.
|
|
2330
|
+
*/
|
|
2331
|
+
export declare const PersonaRunListSchema: z.ZodObject<{
|
|
2332
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
2333
|
+
call: z.ZodString;
|
|
2334
|
+
agent: z.ZodString;
|
|
2335
|
+
started_at: z.ZodNumber;
|
|
2336
|
+
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
2337
|
+
turns: z.ZodInt;
|
|
2338
|
+
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
2339
|
+
agent_hung_up: "agent_hung_up";
|
|
2340
|
+
app_detached: "app_detached";
|
|
2341
|
+
busy: "busy";
|
|
2342
|
+
caller_hung_up: "caller_hung_up";
|
|
2343
|
+
dial_failed: "dial_failed";
|
|
2344
|
+
drained: "drained";
|
|
2345
|
+
error: "error";
|
|
2346
|
+
no_answer: "no_answer";
|
|
2347
|
+
supervisor_ended: "supervisor_ended";
|
|
2348
|
+
timeout: "timeout";
|
|
2349
|
+
transferred: "transferred";
|
|
2350
|
+
}>>;
|
|
2351
|
+
outcome: z.ZodNullable<z.ZodString>;
|
|
2352
|
+
cost_eur: z.ZodNullable<z.ZodNumber>;
|
|
2353
|
+
score: z.ZodNullable<z.ZodObject<{
|
|
2354
|
+
held: z.ZodInt;
|
|
2355
|
+
judged: z.ZodInt;
|
|
2356
|
+
passed: z.ZodBoolean;
|
|
2357
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
2358
|
+
}, z.core.$strict>>;
|
|
2359
|
+
}, z.core.$strict>>;
|
|
2360
|
+
total: z.ZodInt;
|
|
2361
|
+
next: z.ZodNullable<z.ZodString>;
|
|
2362
|
+
}, z.core.$strict>;
|
|
2363
|
+
export type PersonaRunList = z.infer<typeof PersonaRunListSchema>;
|
package/dist/generated/rest.js
CHANGED
|
@@ -832,9 +832,11 @@ export const KnowledgeUsesSchema = z.strictObject({
|
|
|
832
832
|
bases: z.array(KnowledgeUseSchema),
|
|
833
833
|
});
|
|
834
834
|
/**
|
|
835
|
-
* One synthetic caller of an
|
|
835
|
+
* One synthetic caller of an ORG, kept by the gateway: what they want, how they talk, and what
|
|
836
836
|
* they may state about themselves. A model plays them turn by turn — there is no script — for
|
|
837
|
-
* `pinecall simulate` and the console's Simulations.
|
|
837
|
+
* `pinecall simulate` and the console's Simulations. A caller is a person on the phone, so who
|
|
838
|
+
* they are does not depend on which of the org's agents answers: every agent of the org calls with
|
|
839
|
+
* the same list.
|
|
838
840
|
*/
|
|
839
841
|
export const PersonaSchema = z.strictObject({
|
|
840
842
|
name: z.string(),
|
|
@@ -846,13 +848,16 @@ export const PersonaSchema = z.strictObject({
|
|
|
846
848
|
author: z.string(),
|
|
847
849
|
set_at: z.number(),
|
|
848
850
|
});
|
|
849
|
-
/**
|
|
851
|
+
/**
|
|
852
|
+
* GET /v1/personas: every caller the org wrote, by name. The same list for every agent of the org,
|
|
853
|
+
* and the same one in both worlds.
|
|
854
|
+
*/
|
|
850
855
|
export const PersonaListSchema = z.strictObject({
|
|
851
856
|
personas: z.array(PersonaSchema),
|
|
852
857
|
});
|
|
853
858
|
/**
|
|
854
|
-
* PUT /v1/
|
|
855
|
-
*
|
|
859
|
+
* PUT /v1/personas/{name}, the body: the caller, written whole. A name that exists is replaced;
|
|
860
|
+
* `was` renames the caller it names.
|
|
856
861
|
*/
|
|
857
862
|
export const PersonaPutSchema = z.strictObject({
|
|
858
863
|
about: z.string().nullish(),
|
|
@@ -862,3 +867,28 @@ export const PersonaPutSchema = z.strictObject({
|
|
|
862
867
|
state: z.record(z.string(), z.unknown()).nullish(),
|
|
863
868
|
was: z.string().nullish(),
|
|
864
869
|
});
|
|
870
|
+
/**
|
|
871
|
+
* One simulation this caller has run: the call it was, and what the call came to. Read off the
|
|
872
|
+
* call index, never off a log — the same row the sessions list is drawn from.
|
|
873
|
+
*/
|
|
874
|
+
export const PersonaRunSchema = z.strictObject({
|
|
875
|
+
call: z.string(),
|
|
876
|
+
agent: z.string(),
|
|
877
|
+
started_at: z.number(),
|
|
878
|
+
ended_at: z.number().nullable(),
|
|
879
|
+
turns: z.int(),
|
|
880
|
+
end_reason: EndReasonSchema.nullable(),
|
|
881
|
+
outcome: z.string().nullable(),
|
|
882
|
+
cost_eur: z.number().nullable(),
|
|
883
|
+
score: SessionScoreSchema.nullable(),
|
|
884
|
+
});
|
|
885
|
+
/**
|
|
886
|
+
* Every simulation this caller has run, newest first, a page at a time. GET
|
|
887
|
+
* /v1/personas/{name}/runs, in the key's own world and corner, paged exactly as the sessions list
|
|
888
|
+
* is.
|
|
889
|
+
*/
|
|
890
|
+
export const PersonaRunListSchema = z.strictObject({
|
|
891
|
+
runs: z.array(PersonaRunSchema),
|
|
892
|
+
total: z.int(),
|
|
893
|
+
next: z.string().nullable(),
|
|
894
|
+
});
|
package/package.json
CHANGED