@opencx/widget-core 5.0.0-beta.6 → 5.0.0-beta.9
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/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1157 -977
- package/dist/index.js.map +1 -1
- package/dist/src/api/api-caller.d.ts +96 -1
- package/dist/src/api/api-caller.d.ts.map +1 -1
- package/dist/src/api/elicitation.d.ts +60 -0
- package/dist/src/api/elicitation.d.ts.map +1 -0
- package/dist/src/api/schema.d.ts +572 -52
- package/dist/src/api/schema.d.ts.map +1 -1
- package/dist/src/context/active-session-polling.ctx.d.ts +2 -0
- package/dist/src/context/active-session-polling.ctx.d.ts.map +1 -1
- package/dist/src/context/message.ctx.d.ts +4 -0
- package/dist/src/context/message.ctx.d.ts.map +1 -1
- package/dist/src/context/session.ctx.d.ts +5 -0
- package/dist/src/context/session.ctx.d.ts.map +1 -1
- package/dist/src/context/widget.ctx.d.ts +6 -1
- package/dist/src/context/widget.ctx.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/messages.d.ts +2 -0
- package/dist/src/types/messages.d.ts.map +1 -1
- package/dist/src/types/widget-config.d.ts +2 -0
- package/dist/src/types/widget-config.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/src/__tests__/api/agent-stream-parts.spec.d.ts +0 -2
- package/dist/src/__tests__/api/agent-stream-parts.spec.d.ts.map +0 -1
- package/dist/src/__tests__/api/dictation-mint-cache.spec.d.ts +0 -2
- package/dist/src/__tests__/api/dictation-mint-cache.spec.d.ts.map +0 -1
- package/dist/src/__tests__/api/widget-api-wire.spec.d.ts +0 -2
- package/dist/src/__tests__/api/widget-api-wire.spec.d.ts.map +0 -1
- package/dist/src/__tests__/api-caller.mock.d.ts +0 -2
- package/dist/src/__tests__/api-caller.mock.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact/auth/auto-create-unverified-anonymous.spec.d.ts +0 -1
- package/dist/src/__tests__/context/contact/auth/auto-create-unverified-anonymous.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact/auth/auto-create-unverified-with-user-data-provided-by-org.spec.d.ts +0 -1
- package/dist/src/__tests__/context/contact/auth/auto-create-unverified-with-user-data-provided-by-org.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact/auth/manually-create-unverified-with-user-data-provided-by-user.spec.d.ts +0 -1
- package/dist/src/__tests__/context/contact/auth/manually-create-unverified-with-user-data-provided-by-user.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact/auth/with-secure-token.spec.d.ts +0 -1
- package/dist/src/__tests__/context/contact/auth/with-secure-token.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact/should-collect-data.spec.d.ts +0 -1
- package/dist/src/__tests__/context/contact/should-collect-data.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/contact-ctx.create-failure.spec.d.ts +0 -2
- package/dist/src/__tests__/context/contact-ctx.create-failure.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/dictation-ctx.spec.d.ts +0 -1
- package/dist/src/__tests__/context/dictation-ctx.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message/merge-send-context.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message/merge-send-context.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message/on-message-received-hook.spec.d.ts +0 -1
- package/dist/src/__tests__/context/message/on-message-received-hook.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message/pending-user-messages.spec.d.ts +0 -1
- package/dist/src/__tests__/context/message/pending-user-messages.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message/sent-text-history.spec.d.ts +0 -1
- package/dist/src/__tests__/context/message/sent-text-history.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.agent-handlers.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.agent-handlers.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.client-context.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.client-context.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.mentions.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.mentions.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.page-mark-chips.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.page-mark-chips.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.send-acceptance.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.send-acceptance.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/message-ctx.send-features.spec.d.ts +0 -2
- package/dist/src/__tests__/context/message-ctx.send-features.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/reconcile-after-stream.spec.d.ts +0 -1
- package/dist/src/__tests__/context/reconcile-after-stream.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/resolve-client-presentation.spec.d.ts +0 -2
- package/dist/src/__tests__/context/resolve-client-presentation.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/restore-last-session.spec.d.ts +0 -2
- package/dist/src/__tests__/context/restore-last-session.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/session-ctx.stale-token-retry.spec.d.ts +0 -2
- package/dist/src/__tests__/context/session-ctx.stale-token-retry.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/storage-ctx.spec.d.ts +0 -2
- package/dist/src/__tests__/context/storage-ctx.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/streaming-engine.spec.d.ts +0 -1
- package/dist/src/__tests__/context/streaming-engine.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/upload.ctx.spec.d.ts +0 -2
- package/dist/src/__tests__/context/upload.ctx.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/widget-ctx.conversations.spec.d.ts +0 -1
- package/dist/src/__tests__/context/widget-ctx.conversations.spec.d.ts.map +0 -1
- package/dist/src/__tests__/context/widget-ctx.features.spec.d.ts +0 -1
- package/dist/src/__tests__/context/widget-ctx.features.spec.d.ts.map +0 -1
- package/dist/src/__tests__/dictation/dictation-commands.utils.spec.d.ts +0 -2
- package/dist/src/__tests__/dictation/dictation-commands.utils.spec.d.ts.map +0 -1
- package/dist/src/__tests__/test-utils.d.ts +0 -452
- package/dist/src/__tests__/test-utils.d.ts.map +0 -1
- package/dist/src/__tests__/translation.spec.d.ts +0 -2
- package/dist/src/__tests__/translation.spec.d.ts.map +0 -1
- package/dist/src/__tests__/utils/Poller.spec.d.ts +0 -2
- package/dist/src/__tests__/utils/Poller.spec.d.ts.map +0 -1
- package/dist/src/__tests__/utils/PrimitiveState.spec.d.ts +0 -2
- package/dist/src/__tests__/utils/PrimitiveState.spec.d.ts.map +0 -1
- package/dist/src/__tests__/utils/companion-layout.spec.d.ts +0 -2
- package/dist/src/__tests__/utils/companion-layout.spec.d.ts.map +0 -1
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import { ElicitationResponse } from './elicitation';
|
|
1
2
|
import { Dto } from './client';
|
|
3
|
+
import { paths } from './schema';
|
|
2
4
|
import { DictationMint } from '../dictation/dictation-session';
|
|
3
5
|
import { WidgetConfig } from '../types/widget-config';
|
|
4
6
|
import { AgentTurnMessagesDto, ResolveSessionDto, SendMessageDto, VoteInputDto } from '../types/dtos';
|
|
7
|
+
type ConnectionStartResult = NonNullable<paths['/backend/widget/v5/connections/{serverId}/start']['post']>['responses'][201]['content']['application/json'];
|
|
8
|
+
type ConnectionAttemptStatus = NonNullable<paths['/backend/widget/v5/connections/{serverId}/attempts/{attemptId}']['get']>['responses'][200]['content']['application/json']['status'];
|
|
9
|
+
export declare class ConnectionRequestExpiredError extends Error {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class ConnectionAttemptUnavailableError extends Error {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
5
15
|
export declare class ApiCaller {
|
|
6
16
|
private client;
|
|
7
17
|
private config;
|
|
@@ -11,6 +21,61 @@ export declare class ApiCaller {
|
|
|
11
21
|
});
|
|
12
22
|
private constructClientOptions;
|
|
13
23
|
private createOpenAPIClient;
|
|
24
|
+
listApprovalPreferences: () => Promise<{
|
|
25
|
+
key: string;
|
|
26
|
+
serverId: string;
|
|
27
|
+
serverName: string;
|
|
28
|
+
message: string;
|
|
29
|
+
toolName: string;
|
|
30
|
+
}[]>;
|
|
31
|
+
revokeApprovalPreference: (serverId: string, key: string) => Promise<void>;
|
|
32
|
+
listElicitations: (sessionId: string, signal?: AbortSignal) => Promise<{
|
|
33
|
+
id: string;
|
|
34
|
+
serverId: string;
|
|
35
|
+
serverName: string;
|
|
36
|
+
expiresAt: number;
|
|
37
|
+
form: {
|
|
38
|
+
message: string;
|
|
39
|
+
requestedSchema: {
|
|
40
|
+
properties: Record<string, {
|
|
41
|
+
type: "string" | "number" | "boolean" | "array" | "integer";
|
|
42
|
+
title?: string | undefined;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
default?: string | number | boolean | string[] | undefined;
|
|
45
|
+
enum?: string[] | undefined;
|
|
46
|
+
oneOf?: {
|
|
47
|
+
const: string;
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
}[] | undefined;
|
|
50
|
+
items?: {
|
|
51
|
+
enum?: string[] | undefined;
|
|
52
|
+
anyOf?: {
|
|
53
|
+
const: string;
|
|
54
|
+
title?: string | undefined;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
minItems?: number | undefined;
|
|
58
|
+
maxItems?: number | undefined;
|
|
59
|
+
minimum?: number | undefined;
|
|
60
|
+
maximum?: number | undefined;
|
|
61
|
+
minLength?: number | undefined;
|
|
62
|
+
maxLength?: number | undefined;
|
|
63
|
+
format?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
required?: string[] | undefined;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
approvalKey?: string | undefined;
|
|
69
|
+
}[]>;
|
|
70
|
+
answerElicitation: (sessionId: string, requestId: string, answer: ElicitationResponse) => Promise<void>;
|
|
71
|
+
listConnections: (signal?: AbortSignal) => Promise<{
|
|
72
|
+
server_id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
status: "not_connected" | "connected" | "reconnect_required";
|
|
75
|
+
}[]>;
|
|
76
|
+
startConnection: (serverId: string, requestId: string, signal?: AbortSignal) => Promise<ConnectionStartResult>;
|
|
77
|
+
getConnectionAttempt: (serverId: string, attemptId: string, signal?: AbortSignal) => Promise<ConnectionAttemptStatus>;
|
|
78
|
+
disconnectConnection: (serverId: string) => Promise<void>;
|
|
14
79
|
setAuthToken: (token: string) => void;
|
|
15
80
|
/**
|
|
16
81
|
* AUTH headers only (X-Bot-Token / Authorization), stripped of
|
|
@@ -39,6 +104,28 @@ export declare class ApiCaller {
|
|
|
39
104
|
* one.
|
|
40
105
|
*/
|
|
41
106
|
stopStream: (sessionId: string) => Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* What actually happened on the page, back to the turn that is waiting for
|
|
109
|
+
* it. The widget does the thing, looks at the result, and says so; until
|
|
110
|
+
* this call lands the agent only knows that it asked.
|
|
111
|
+
*
|
|
112
|
+
* Never throws and never blocks anything the visitor is doing: a lost
|
|
113
|
+
* answer costs the tool call its timeout, which the server already handles,
|
|
114
|
+
* and a browser stuck on this would be a browser that cannot get on with
|
|
115
|
+
* the page.
|
|
116
|
+
*/
|
|
117
|
+
sendPageReply: (sessionId: string, reply: {
|
|
118
|
+
callId: string;
|
|
119
|
+
outcome: "done" | "covered" | "gone" | "hidden" | "unsupported" | "no_change" | "declined";
|
|
120
|
+
detail?: string;
|
|
121
|
+
controls?: {
|
|
122
|
+
ref: string;
|
|
123
|
+
role: string;
|
|
124
|
+
name: string;
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
}[];
|
|
127
|
+
truncated?: boolean;
|
|
128
|
+
}) => Promise<void>;
|
|
42
129
|
/**
|
|
43
130
|
* The session's settled agent turns with their final UIMessage parts and
|
|
44
131
|
* the transcript rows each produced — the reload-fidelity read (widget v5).
|
|
@@ -141,6 +228,7 @@ export declare class ApiCaller {
|
|
|
141
228
|
} | null;
|
|
142
229
|
presentation?: import('./schema').components["schemas"]["WidgetPresentationOverrideDto"];
|
|
143
230
|
capabilities?: {
|
|
231
|
+
connections?: boolean;
|
|
144
232
|
structured_questions?: boolean;
|
|
145
233
|
rich_replies?: boolean;
|
|
146
234
|
page_effects?: boolean;
|
|
@@ -393,7 +481,13 @@ export declare class ApiCaller {
|
|
|
393
481
|
[name: string]: unknown;
|
|
394
482
|
};
|
|
395
483
|
content: {
|
|
396
|
-
"application/json":
|
|
484
|
+
"application/json":
|
|
485
|
+
/**
|
|
486
|
+
* Mint a short-lived transcription token for voice dictation (widget v5).
|
|
487
|
+
* Org-gated server-side; throws on any failure so the caller can surface
|
|
488
|
+
* "dictation unavailable" instead of hanging with an open mic.
|
|
489
|
+
*/
|
|
490
|
+
import('./schema').components["schemas"]["WidgetSessionDto"];
|
|
397
491
|
};
|
|
398
492
|
};
|
|
399
493
|
500: {
|
|
@@ -488,4 +582,5 @@ export declare class ApiCaller {
|
|
|
488
582
|
};
|
|
489
583
|
}, `${string}/${string}`>>;
|
|
490
584
|
}
|
|
585
|
+
export {};
|
|
491
586
|
//# sourceMappingURL=api-caller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-caller.d.ts","sourceRoot":"","sources":["../../../src/api/api-caller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA8B,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACb,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"api-caller.d.ts","sourceRoot":"","sources":["../../../src/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C;kBACrD,CAAC;gBACd,CAAC;kBACiB,CAAC;;;;oCAI2B,wCAAqB;;;;;;;;;wCAOvD,wCACf;;;;;;;;wCAkBC,wCAPe;;;;;;;;;;;+BA6Rb;IAEF,UAAU,GAAU,MAAM,GAAG,CAAC,0BAA0B,CAAC;;iBA3K9B,CAAC;kBACnB,CAAC;gBAAqB,CAAC;kBAAuB,CAAC;;;;oCAItD,wCAGM;;;;;;;;;wCAOsD,wCAC3D;;;;;;;;wCAUkB,wCACnB;;;;;;;;;;;+BAkJA;CACH"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const elicitationListSchema: z.ZodArray<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
serverId: z.ZodString;
|
|
5
|
+
serverName: z.ZodString;
|
|
6
|
+
expiresAt: z.ZodNumber;
|
|
7
|
+
approvalKey: z.ZodOptional<z.ZodString>;
|
|
8
|
+
form: z.ZodObject<{
|
|
9
|
+
message: z.ZodString;
|
|
10
|
+
requestedSchema: z.ZodObject<{
|
|
11
|
+
properties: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
12
|
+
type: z.ZodEnum<{
|
|
13
|
+
string: "string";
|
|
14
|
+
number: "number";
|
|
15
|
+
boolean: "boolean";
|
|
16
|
+
array: "array";
|
|
17
|
+
integer: "integer";
|
|
18
|
+
}>;
|
|
19
|
+
title: z.ZodOptional<z.ZodString>;
|
|
20
|
+
description: z.ZodOptional<z.ZodString>;
|
|
21
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
|
|
22
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
oneOf: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
const: z.ZodString;
|
|
25
|
+
title: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
items: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
const: z.ZodString;
|
|
31
|
+
title: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
minItems: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
maximum: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
format: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
export type ElicitationRequest = z.infer<typeof elicitationListSchema>[number];
|
|
47
|
+
export type ElicitationResponse = {
|
|
48
|
+
action: 'accept' | 'decline' | 'cancel';
|
|
49
|
+
remember?: boolean;
|
|
50
|
+
content?: Record<string, string | number | boolean | string[]>;
|
|
51
|
+
};
|
|
52
|
+
export declare const approvalPreferencesSchema: z.ZodArray<z.ZodObject<{
|
|
53
|
+
key: z.ZodString;
|
|
54
|
+
serverId: z.ZodString;
|
|
55
|
+
serverName: z.ZodString;
|
|
56
|
+
message: z.ZodString;
|
|
57
|
+
toolName: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
export type ApprovalPreference = z.infer<typeof approvalPreferencesSchema>[number];
|
|
60
|
+
//# sourceMappingURL=elicitation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation.d.ts","sourceRoot":"","sources":["../../../src/api/elicitation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAejC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/E,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;kBAQrC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CACtC,OAAO,yBAAyB,CACjC,CAAC,MAAM,CAAC,CAAC"}
|