@pinecall/room 0.1.3 → 0.1.5
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/README.md +52 -25
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/karaoke.d.ts +1 -1
- package/dist/karaoke.d.ts.map +1 -1
- package/dist/karaoke.js +2 -1
- package/dist/karaoke.js.map +1 -1
- package/dist/log/fold.d.ts +2 -1
- package/dist/log/fold.d.ts.map +1 -1
- package/dist/log/fold.js +4 -1
- package/dist/log/fold.js.map +1 -1
- package/dist/log/follow.js +1 -1
- package/dist/log/follow.js.map +1 -1
- package/dist/reading.js +1 -1
- package/dist/reading.js.map +1 -1
- package/dist/room.d.ts +11 -5
- package/dist/room.d.ts.map +1 -1
- package/dist/room.js +11 -7
- package/dist/room.js.map +1 -1
- package/dist/rows.d.ts +1 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +1 -0
- package/dist/rows.js.map +1 -1
- package/dist/seat/join.d.ts +3 -0
- package/dist/seat/join.d.ts.map +1 -1
- package/dist/seat/join.js +9 -0
- package/dist/seat/join.js.map +1 -1
- package/dist/seat/livekit.d.ts +5 -1
- package/dist/seat/livekit.d.ts.map +1 -1
- package/dist/seat/livekit.js.map +1 -1
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/wire/codec.d.ts +22 -0
- package/dist/wire/codec.d.ts.map +1 -0
- package/dist/wire/codec.js +23 -0
- package/dist/wire/codec.js.map +1 -0
- package/dist/wire/defs.d.ts +302 -0
- package/dist/wire/defs.d.ts.map +1 -0
- package/dist/wire/defs.js +171 -0
- package/dist/wire/defs.js.map +1 -0
- package/dist/wire/envelope.d.ts +17 -0
- package/dist/wire/envelope.d.ts.map +1 -0
- package/dist/wire/envelope.js +16 -0
- package/dist/wire/envelope.js.map +1 -0
- package/dist/wire/events-call.d.ts +422 -0
- package/dist/wire/events-call.d.ts.map +1 -0
- package/dist/wire/events-call.js +182 -0
- package/dist/wire/events-call.js.map +1 -0
- package/dist/wire/events.d.ts +923 -0
- package/dist/wire/events.d.ts.map +1 -0
- package/dist/wire/events.js +292 -0
- package/dist/wire/events.js.map +1 -0
- package/dist/wire/metrics.d.ts +366 -0
- package/dist/wire/metrics.d.ts.map +1 -0
- package/dist/wire/metrics.js +269 -0
- package/dist/wire/metrics.js.map +1 -0
- package/dist/wire/reduce.d.ts +12 -0
- package/dist/wire/reduce.d.ts.map +1 -0
- package/dist/wire/reduce.js +375 -0
- package/dist/wire/reduce.js.map +1 -0
- package/dist/wire/registry.d.ts +1395 -0
- package/dist/wire/registry.d.ts.map +1 -0
- package/dist/wire/registry.js +81 -0
- package/dist/wire/registry.js.map +1 -0
- package/dist/wire/rest.d.ts +18 -0
- package/dist/wire/rest.d.ts.map +1 -0
- package/dist/wire/rest.js +14 -0
- package/dist/wire/rest.js.map +1 -0
- package/dist/wire/room.d.ts +106 -0
- package/dist/wire/room.d.ts.map +1 -0
- package/dist/wire/room.js +73 -0
- package/dist/wire/room.js.map +1 -0
- package/dist/wire/state.d.ts +915 -0
- package/dist/wire/state.d.ts.map +1 -0
- package/dist/wire/state.js +189 -0
- package/dist/wire/state.js.map +1 -0
- package/package.json +2 -2
package/dist/seat/join.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join.js","sourceRoot":"","sources":["../../src/seat/join.ts"],"names":[],"mappings":"AAAA,+FAA+F;
|
|
1
|
+
{"version":3,"file":"join.js","sourceRoot":"","sources":["../../src/seat/join.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAyC/F,wFAAwF;AACxF,MAAM,IAAI,GAAG,SAAS,CAAC;AAEvB,6FAA6F;AAC7F,MAAM,MAAM,GAAG,iBAAiB,CAAC;AAEjC,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,OAAoB;IACjD,MAAM,EA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CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAC5C,CAAC;QACJ,CAAC;QACD,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB;KAC9C,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,SAAS,UAAU,CAAC,QAA2B,EAAE,EAAU;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,EAAE,CAAC,CAAC;IACnE,OAAO;QACL,KAAK,EAAE,MAAM,KAAK,SAAS;QAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,EAAE,CAAC;QACzD,KAAK,EAAE,MAAM,EAAE,UAAU,IAAI,CAAC;KAC/B,CAAC;AACJ,CAAC"}
|
package/dist/seat/livekit.d.ts
CHANGED
|
@@ -10,12 +10,16 @@ export interface SeatParticipant {
|
|
|
10
10
|
readonly identity: string;
|
|
11
11
|
readonly audioLevel: number;
|
|
12
12
|
}
|
|
13
|
-
/** The page's own participant: its microphone,
|
|
13
|
+
/** The page's own participant: its microphone, the typed lines it sends, and the word it hung up. */
|
|
14
14
|
export interface SeatLocal extends SeatParticipant {
|
|
15
15
|
setMicrophoneEnabled(enabled: boolean): Promise<unknown>;
|
|
16
16
|
sendText(text: string, options: {
|
|
17
17
|
topic: string;
|
|
18
18
|
}): Promise<unknown>;
|
|
19
|
+
publishData(data: Uint8Array, options: {
|
|
20
|
+
topic: string;
|
|
21
|
+
reliable: boolean;
|
|
22
|
+
}): Promise<unknown>;
|
|
19
23
|
}
|
|
20
24
|
/** The room the page joins. Five events are listened to; nothing else of LiveKit's is named. */
|
|
21
25
|
export interface SeatRoom {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit.d.ts","sourceRoot":"","sources":["../../src/seat/livekit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CAC9C;AAID,mDAAmD;AACnD,wBAAgB,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,CAEpD"}
|
package/dist/seat/livekit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livekit.js","sourceRoot":"","sources":["../../src/seat/livekit.ts"],"names":[],"mappings":"AAAA,uGAAuG;
|
|
1
|
+
{"version":3,"file":"livekit.js","sourceRoot":"","sources":["../../src/seat/livekit.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAiDvG,kGAAkG;AAClG,qEAAqE;AACrE,mDAAmD;AACnD,MAAM,UAAU,WAAW;IACzB,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export interface Minted {
|
|
|
6
6
|
participant_token: string;
|
|
7
7
|
call: string;
|
|
8
8
|
log_token: string;
|
|
9
|
+
/** What the page keeps to resume this conversation later, as `resume`. A gateway before 0.1.49 sends none. */
|
|
10
|
+
resume_token?: string | undefined;
|
|
9
11
|
}
|
|
10
12
|
/** What `POST /v1/codes` answers: the four digits a page shows beside the agent's number, when
|
|
11
13
|
* they stop being a code (seconds since the epoch), and the token the page asks about them with.
|
|
@@ -29,7 +31,7 @@ export interface Dialed {
|
|
|
29
31
|
* the tools, the latency, the cost — when the page draws them. */
|
|
30
32
|
export type LogProjection = "public" | "tenant";
|
|
31
33
|
export interface MintOptions {
|
|
32
|
-
/** The gateway, `https://
|
|
34
|
+
/** The gateway, `https://cloud.pinecall.io` or your own. */
|
|
33
35
|
url: string;
|
|
34
36
|
agent: string;
|
|
35
37
|
scope: "talk" | "chat";
|
|
@@ -39,6 +41,9 @@ export interface MintOptions {
|
|
|
39
41
|
contact?: string | undefined;
|
|
40
42
|
metadata?: Record<string, unknown> | undefined;
|
|
41
43
|
log?: LogProjection | undefined;
|
|
44
|
+
/** A `resume_token` the page kept: back into that call while it waits for the visitor, else a new
|
|
45
|
+
* call that carries it on. `agent` may then be the call's own or left empty. */
|
|
46
|
+
resume?: string | undefined;
|
|
42
47
|
fetch?: typeof fetch | undefined;
|
|
43
48
|
}
|
|
44
49
|
export interface DialOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,iIAAiI;AAMjI;qGACqG;AACrG,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,iIAAiI;AAMjI;qGACqG;AACrG,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,8GAA8G;IAC9G,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;0CAE0C;AAC1C,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4FAA4F;AAC5F,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;kEACkE;AAClE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,GAAG,EAAE,M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AAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAIhD;CACF;AAKD,6EAA6E;AAC7E,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7E;AAED,6GAA6G;AAC7G,wBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7E;AAED;iGACiG;AACjG,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/E"}
|
package/dist/server/index.js
CHANGED
|
@@ -18,8 +18,8 @@ export class GatewayRefused extends Error {
|
|
|
18
18
|
const TIMEOUT_MS = 10_000;
|
|
19
19
|
/** A ticket for one seat in one new call. The key needs the `talk` scope. */
|
|
20
20
|
export async function mint(key, options) {
|
|
21
|
-
const { url, agent, scope, ttl_s, contact, metadata, log } = options;
|
|
22
|
-
const said = { agent, scope, ttl_s, contact, metadata, log };
|
|
21
|
+
const { url, agent, scope, ttl_s, contact, metadata, log, resume } = options;
|
|
22
|
+
const said = { agent: agent || undefined, scope, ttl_s, contact, metadata, log, resume };
|
|
23
23
|
const body = await post(key, `${bare(url)}/v1/tokens`, said, options.fetch);
|
|
24
24
|
if (!isMinted(body))
|
|
25
25
|
throw new Error("the gateway answered /v1/tokens with a shape this package does not know");
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,EAAE;AACF,mGAAmG;AACnG,mGAAmG;AACnG,iEAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,EAAE;AACF,mGAAmG;AACnG,mGAAmG;AACnG,iEA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AAO,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,QAAQ,CAAC;AAC7D,CAAC;AAED,SAAS,UAAU,CAAC,IAAa,EAAE,MAAgB;IACjD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC;AAC5H,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** An entry of the log read as the event its type names, typed. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type Entry } from "./envelope.js";
|
|
4
|
+
import { EVENT_SCHEMAS, type EventType } from "./registry.js";
|
|
5
|
+
export declare class UnknownType extends Error {
|
|
6
|
+
readonly name = "UnknownType";
|
|
7
|
+
}
|
|
8
|
+
/** The data shape of one event type. */
|
|
9
|
+
export type EventData<K extends EventType> = z.infer<(typeof EVENT_SCHEMAS)[K]>;
|
|
10
|
+
/** One event, typed by its type: switch on `type` and `data` narrows with it. */
|
|
11
|
+
export type Event = {
|
|
12
|
+
[K in EventType]: {
|
|
13
|
+
type: K;
|
|
14
|
+
data: EventData<K>;
|
|
15
|
+
};
|
|
16
|
+
}[EventType];
|
|
17
|
+
/** One log line from decoded JSON. A bad shape throws. */
|
|
18
|
+
export declare function decodeEntry(raw: unknown): Entry;
|
|
19
|
+
/** The entry's data as the shape its type names; an unknown type or a bad shape throws. */
|
|
20
|
+
export declare function eventOf(entry: Entry): Event;
|
|
21
|
+
export declare function isEventType(type: string): type is EventType;
|
|
22
|
+
//# sourceMappingURL=codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/wire/codec.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE9D,qBAAa,WAAY,SAAQ,KAAK;IACpC,SAAkB,IAAI,iBAAiB;CACxC;AAED,wCAAwC;AACxC,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhF,iFAAiF;AACjF,MAAM,MAAM,KAAK,GAAG;KAAG,CAAC,IAAI,SAAS,GAAG;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAC,SAAS,CAAC,CAAC;AAErF,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAE/C;AAED,2FAA2F;AAC3F,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAK3C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAE3D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** An entry of the log read as the event its type names, typed. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { EntrySchema } from "./envelope.js";
|
|
4
|
+
import { EVENT_SCHEMAS } from "./registry.js";
|
|
5
|
+
export class UnknownType extends Error {
|
|
6
|
+
name = "UnknownType";
|
|
7
|
+
}
|
|
8
|
+
/** One log line from decoded JSON. A bad shape throws. */
|
|
9
|
+
export function decodeEntry(raw) {
|
|
10
|
+
return EntrySchema.parse(raw);
|
|
11
|
+
}
|
|
12
|
+
/** The entry's data as the shape its type names; an unknown type or a bad shape throws. */
|
|
13
|
+
export function eventOf(entry) {
|
|
14
|
+
if (!isEventType(entry.type)) {
|
|
15
|
+
throw new UnknownType(`unknown event type: ${entry.type}`);
|
|
16
|
+
}
|
|
17
|
+
return { type: entry.type, data: EVENT_SCHEMAS[entry.type].parse(entry.data) };
|
|
18
|
+
}
|
|
19
|
+
export function isEventType(type) {
|
|
20
|
+
return Object.hasOwn(EVENT_SCHEMAS, type);
|
|
21
|
+
}
|
|
22
|
+
// ── key names ──────────────────────────────────────────────────────────────────
|
|
23
|
+
//# sourceMappingURL=codec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/wire/codec.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAkB,MAAM,eAAe,CAAC;AAE9D,MAAM,OAAO,WAAY,SAAQ,KAAK;IAClB,IAAI,GAAG,aAAa,CAAC;CACxC;AAQD,0DAA0D;AAC1D,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,WAAW,CAAC,uBAAuB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAW,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,kFAAkF"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/** The shapes the rest of the wire is made of: channels, parts of a turn, tools, costs. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* The door the public came through: a phone call over SIP, the browser widget over WebRTC, or
|
|
5
|
+
* WhatsApp text.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ChannelSchema: z.ZodEnum<{
|
|
8
|
+
phone: "phone";
|
|
9
|
+
web: "web";
|
|
10
|
+
whatsapp: "whatsapp";
|
|
11
|
+
}>;
|
|
12
|
+
/** Inbound: the public reached the agent. Outbound: the agent reached out (a dial). */
|
|
13
|
+
export declare const DirectionSchema: z.ZodEnum<{
|
|
14
|
+
inbound: "inbound";
|
|
15
|
+
outbound: "outbound";
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Which of the two worlds a key opens, and so which world an agent is held in and a call ran in. A
|
|
19
|
+
* key is issued into one; an agent registered on it and every call it takes carry that one; a door
|
|
20
|
+
* claimed in one is refused to a key of the other. `sandbox` is where things are written and
|
|
21
|
+
* `production` is what the public reaches — and whether a sandbox agent is one PERSON's copy or
|
|
22
|
+
* the team's shared one is not this field: it is whether the key that registered it names a
|
|
23
|
+
* person. Every key issued before the field existed is production.
|
|
24
|
+
*/
|
|
25
|
+
export declare const EnvSchema: z.ZodEnum<{
|
|
26
|
+
production: "production";
|
|
27
|
+
sandbox: "sandbox";
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* What a console may ask of the process standing in the agent's directory, relayed by the gateway:
|
|
31
|
+
* a written call to the class mounted there (chat), a simulated caller put on the class it holds,
|
|
32
|
+
* its goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory
|
|
33
|
+
* goldens, the panel it draws beside a conversation (view), a call promoted to a candidate file,
|
|
34
|
+
* the drift of the last two windows, and the reproductions a broken run left on that disk.
|
|
35
|
+
* Everything else a console needs is a door of the gateway.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DevVerbSchema: z.ZodEnum<{
|
|
38
|
+
"chat.end": "chat.end";
|
|
39
|
+
"chat.roster": "chat.roster";
|
|
40
|
+
"chat.say": "chat.say";
|
|
41
|
+
"chat.start": "chat.start";
|
|
42
|
+
"drift.read": "drift.read";
|
|
43
|
+
"goldens.roster": "goldens.roster";
|
|
44
|
+
"goldens.run": "goldens.run";
|
|
45
|
+
"knowledge.eval": "knowledge.eval";
|
|
46
|
+
"knowledge.push": "knowledge.push";
|
|
47
|
+
"knowledge.roster": "knowledge.roster";
|
|
48
|
+
"memory.eval": "memory.eval";
|
|
49
|
+
"memory.extraction": "memory.extraction";
|
|
50
|
+
"memory.roster": "memory.roster";
|
|
51
|
+
"promote.roster": "promote.roster";
|
|
52
|
+
"promote.write": "promote.write";
|
|
53
|
+
"reproductions.read": "reproductions.read";
|
|
54
|
+
"reproductions.roster": "reproductions.roster";
|
|
55
|
+
"simulate.start": "simulate.start";
|
|
56
|
+
"view.render": "view.render";
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Why the call is over. Who hung up, what failed before anybody could, drained: the platform took
|
|
60
|
+
* the worker down (a deploy, a stop) with the call still on it, or app_detached: the app holding
|
|
61
|
+
* the agent closed its socket mid-call, so nothing was rendering the prompt or answering a tool —
|
|
62
|
+
* both are nobody's fault and neither is an error.
|
|
63
|
+
*/
|
|
64
|
+
export declare const EndReasonSchema: z.ZodEnum<{
|
|
65
|
+
agent_hung_up: "agent_hung_up";
|
|
66
|
+
app_detached: "app_detached";
|
|
67
|
+
busy: "busy";
|
|
68
|
+
caller_hung_up: "caller_hung_up";
|
|
69
|
+
dial_failed: "dial_failed";
|
|
70
|
+
drained: "drained";
|
|
71
|
+
error: "error";
|
|
72
|
+
no_answer: "no_answer";
|
|
73
|
+
supervisor_ended: "supervisor_ended";
|
|
74
|
+
timeout: "timeout";
|
|
75
|
+
transferred: "transferred";
|
|
76
|
+
}>;
|
|
77
|
+
/** Whose action ended the call. platform covers timeouts, errors and a drained worker. */
|
|
78
|
+
export declare const EndedBySchema: z.ZodEnum<{
|
|
79
|
+
agent: "agent";
|
|
80
|
+
caller: "caller";
|
|
81
|
+
platform: "platform";
|
|
82
|
+
supervisor: "supervisor";
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* What one judge answered about a finished call. Held: the rule held. Broken: it did not, and the
|
|
86
|
+
* reason names the evidence. Deferred: the judge was asked and could not settle it. Skipped:
|
|
87
|
+
* nobody asked it — no model was reachable inside the call's judging budget.
|
|
88
|
+
*/
|
|
89
|
+
export declare const ScoreVerdictSchema: z.ZodEnum<{
|
|
90
|
+
broken: "broken";
|
|
91
|
+
deferred: "deferred";
|
|
92
|
+
held: "held";
|
|
93
|
+
skipped: "skipped";
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Cold: the caller is sent on with a REFER on their SIP leg and the call ends here. Warm: the
|
|
97
|
+
* number is dialled into the call's own room, the agent stays on the line until the other side
|
|
98
|
+
* answers and then falls silent; the call ends when either of them hangs up.
|
|
99
|
+
*/
|
|
100
|
+
export declare const TransferModeSchema: z.ZodEnum<{
|
|
101
|
+
cold: "cold";
|
|
102
|
+
warm: "warm";
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* What the platform believes the person on the line is doing right now. The states are the
|
|
106
|
+
* session's own.
|
|
107
|
+
*/
|
|
108
|
+
export declare const UserStateSchema: z.ZodEnum<{
|
|
109
|
+
away: "away";
|
|
110
|
+
listening: "listening";
|
|
111
|
+
speaking: "speaking";
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* What the agent is doing right now, in the session's own words: warming up, waiting, hearing the
|
|
115
|
+
* caller, generating, or playing audio.
|
|
116
|
+
*/
|
|
117
|
+
export declare const AgentStateSchema: z.ZodEnum<{
|
|
118
|
+
idle: "idle";
|
|
119
|
+
initializing: "initializing";
|
|
120
|
+
listening: "listening";
|
|
121
|
+
speaking: "speaking";
|
|
122
|
+
thinking: "thinking";
|
|
123
|
+
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Who a participant is to the call: the person the agent serves (over SIP or the widget), the
|
|
126
|
+
* agent itself, a supervisor who took a seat in the room, a listener who only hears, or a second
|
|
127
|
+
* SIP leg that room.invite brought in.
|
|
128
|
+
*/
|
|
129
|
+
export declare const ParticipantKindSchema: z.ZodEnum<{
|
|
130
|
+
agent: "agent";
|
|
131
|
+
caller: "caller";
|
|
132
|
+
listener: "listener";
|
|
133
|
+
sip: "sip";
|
|
134
|
+
supervisor: "supervisor";
|
|
135
|
+
}>;
|
|
136
|
+
/** What a track carries: a microphone's audio, a camera's video, or a screen share. */
|
|
137
|
+
export declare const TrackKindSchema: z.ZodEnum<{
|
|
138
|
+
audio: "audio";
|
|
139
|
+
screen: "screen";
|
|
140
|
+
video: "video";
|
|
141
|
+
}>;
|
|
142
|
+
/** Where a track comes from, as livekit's TrackSource names it, in lower case. */
|
|
143
|
+
export declare const TrackSourceSchema: z.ZodEnum<{
|
|
144
|
+
camera: "camera";
|
|
145
|
+
microphone: "microphone";
|
|
146
|
+
screen_share: "screen_share";
|
|
147
|
+
screen_share_audio: "screen_share_audio";
|
|
148
|
+
unknown: "unknown";
|
|
149
|
+
}>;
|
|
150
|
+
/**
|
|
151
|
+
* Where an outside fact came from: the tenant's backend over the app socket (app), or a
|
|
152
|
+
* participant's browser over the DataChannel (participant).
|
|
153
|
+
*/
|
|
154
|
+
export declare const EventSourceSchema: z.ZodEnum<{
|
|
155
|
+
app: "app";
|
|
156
|
+
participant: "participant";
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Which projection a sink applies before a state or an entry leaves the platform: public for a
|
|
160
|
+
* participant reading its own call, tenant for the tenant's readers. The contract is
|
|
161
|
+
* docs/protocol/projections.md; a client never applies one.
|
|
162
|
+
*/
|
|
163
|
+
export declare const ProjectionSchema: z.ZodEnum<{
|
|
164
|
+
public: "public";
|
|
165
|
+
tenant: "tenant";
|
|
166
|
+
}>;
|
|
167
|
+
/**
|
|
168
|
+
* Who is on the line, as far as the platform knows. Everything is optional: a web visitor may be
|
|
169
|
+
* nobody yet.
|
|
170
|
+
*/
|
|
171
|
+
export declare const ContactSchema: z.ZodObject<{
|
|
172
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
176
|
+
external_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
/**
|
|
179
|
+
* One door to an agent: a channel and, for phone and WhatsApp, the number that answers. A number
|
|
180
|
+
* is a route, never an agent.
|
|
181
|
+
*/
|
|
182
|
+
export declare const RouteSchema: z.ZodObject<{
|
|
183
|
+
channel: z.ZodEnum<{
|
|
184
|
+
phone: "phone";
|
|
185
|
+
web: "web";
|
|
186
|
+
whatsapp: "whatsapp";
|
|
187
|
+
}>;
|
|
188
|
+
number: z.ZodNullable<z.ZodString>;
|
|
189
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
/** The human who sent a supervise verb, as the token that let them in names them. */
|
|
192
|
+
export declare const SupervisorSchema: z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
/**
|
|
197
|
+
* What came back from running a tool in the app's process. Either an output or an error, never
|
|
198
|
+
* both.
|
|
199
|
+
*/
|
|
200
|
+
export declare const ToolResultSchema: z.ZodObject<{
|
|
201
|
+
call_id: z.ZodString;
|
|
202
|
+
name: z.ZodString;
|
|
203
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
204
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
|
+
duration_s: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
/**
|
|
209
|
+
* One thing remembered about a contact: a sentence, where it came from, and how well it matched
|
|
210
|
+
* when recalled.
|
|
211
|
+
*/
|
|
212
|
+
export declare const MemoryFactSchema: z.ZodObject<{
|
|
213
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
text: z.ZodString;
|
|
215
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
|
+
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
217
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
/**
|
|
220
|
+
* One operation against the contact's memory: a recall during the turn, a remember at hangup, or a
|
|
221
|
+
* forget on request.
|
|
222
|
+
*/
|
|
223
|
+
export declare const MemoryOpSchema: z.ZodObject<{
|
|
224
|
+
op: z.ZodEnum<{
|
|
225
|
+
forget: "forget";
|
|
226
|
+
recall: "recall";
|
|
227
|
+
remember: "remember";
|
|
228
|
+
}>;
|
|
229
|
+
contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
facts: z.ZodArray<z.ZodObject<{
|
|
232
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
text: z.ZodString;
|
|
234
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
235
|
+
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
236
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
|
+
}, z.core.$strict>>;
|
|
238
|
+
took_ms: z.ZodNumber;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
/** One chunk of the knowledge base that retrieval put in front of the model for this turn. */
|
|
241
|
+
export declare const DocSourceSchema: z.ZodObject<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
base: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
path: z.ZodString;
|
|
245
|
+
heading: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
246
|
+
score: z.ZodNumber;
|
|
247
|
+
excerpt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
+
}, z.core.$strict>;
|
|
249
|
+
/** One priced line: a model, what was counted, how much, and what it came to. */
|
|
250
|
+
export declare const CostRowSchema: z.ZodObject<{
|
|
251
|
+
provider: z.ZodString;
|
|
252
|
+
model: z.ZodString;
|
|
253
|
+
unit: z.ZodEnum<{
|
|
254
|
+
audio_seconds: "audio_seconds";
|
|
255
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
256
|
+
cached_input_tokens: "cached_input_tokens";
|
|
257
|
+
characters: "characters";
|
|
258
|
+
input_tokens: "input_tokens";
|
|
259
|
+
minutes: "minutes";
|
|
260
|
+
output_tokens: "output_tokens";
|
|
261
|
+
requests: "requests";
|
|
262
|
+
session_seconds: "session_seconds";
|
|
263
|
+
}>;
|
|
264
|
+
quantity: z.ZodNumber;
|
|
265
|
+
unit_price_usd: z.ZodNumber;
|
|
266
|
+
usd: z.ZodNumber;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
/** A usage row the price table does not know. It is listed, never priced at zero. */
|
|
269
|
+
export declare const UnpricedRowSchema: z.ZodObject<{
|
|
270
|
+
provider: z.ZodString;
|
|
271
|
+
model: z.ZodString;
|
|
272
|
+
}, z.core.$strict>;
|
|
273
|
+
/**
|
|
274
|
+
* What the call cost in provider fees, informational, in US dollars, the currency providers price
|
|
275
|
+
* in. The runtime never prices commercially; this is the provider's bill as best we know it.
|
|
276
|
+
*/
|
|
277
|
+
export declare const CostSchema: z.ZodObject<{
|
|
278
|
+
usd: z.ZodNumber;
|
|
279
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
280
|
+
provider: z.ZodString;
|
|
281
|
+
model: z.ZodString;
|
|
282
|
+
unit: z.ZodEnum<{
|
|
283
|
+
audio_seconds: "audio_seconds";
|
|
284
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
285
|
+
cached_input_tokens: "cached_input_tokens";
|
|
286
|
+
characters: "characters";
|
|
287
|
+
input_tokens: "input_tokens";
|
|
288
|
+
minutes: "minutes";
|
|
289
|
+
output_tokens: "output_tokens";
|
|
290
|
+
requests: "requests";
|
|
291
|
+
session_seconds: "session_seconds";
|
|
292
|
+
}>;
|
|
293
|
+
quantity: z.ZodNumber;
|
|
294
|
+
unit_price_usd: z.ZodNumber;
|
|
295
|
+
usd: z.ZodNumber;
|
|
296
|
+
}, z.core.$strict>>;
|
|
297
|
+
unpriced: z.ZodArray<z.ZodObject<{
|
|
298
|
+
provider: z.ZodString;
|
|
299
|
+
model: z.ZodString;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
}, z.core.$strict>;
|
|
302
|
+
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../src/wire/defs.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;EAAuC,CAAC;AAElE,uFAAuF;AACvF,eAAO,MAAM,eAAe;;;EAAkC,CAAC;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;;;EAAoC,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAA8U,CAAC;AAEzW;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAAoK,CAAC;AAEjM,0FAA0F;AAC1F,eAAO,MAAM,aAAa;;;;;EAAwD,CAAC;AAEnF;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