@opencx/widget-core 4.0.60 → 5.0.0-beta.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/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4422 -772
- package/dist/index.js.map +1 -1
- package/dist/src/__tests__/api/agent-stream-parts.spec.d.ts +2 -0
- package/dist/src/__tests__/api/agent-stream-parts.spec.d.ts.map +1 -0
- package/dist/src/__tests__/api/dictation-mint-cache.spec.d.ts +2 -0
- package/dist/src/__tests__/api/dictation-mint-cache.spec.d.ts.map +1 -0
- package/dist/src/__tests__/api/widget-api-wire.spec.d.ts +2 -0
- package/dist/src/__tests__/api/widget-api-wire.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/contact-ctx.create-failure.spec.d.ts +2 -0
- package/dist/src/__tests__/context/contact-ctx.create-failure.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/dictation-ctx.spec.d.ts +1 -0
- package/dist/src/__tests__/context/dictation-ctx.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message/merge-send-context.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message/merge-send-context.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message/pending-user-messages.spec.d.ts +1 -0
- package/dist/src/__tests__/context/message/pending-user-messages.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message/sent-text-history.spec.d.ts +1 -0
- package/dist/src/__tests__/context/message/sent-text-history.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.agent-handlers.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.agent-handlers.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.client-context.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.client-context.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.mentions.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.mentions.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.page-mark-chips.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.page-mark-chips.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.send-acceptance.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.send-acceptance.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/message-ctx.send-features.spec.d.ts +2 -0
- package/dist/src/__tests__/context/message-ctx.send-features.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/reconcile-after-stream.spec.d.ts +1 -0
- package/dist/src/__tests__/context/reconcile-after-stream.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/restore-last-session.spec.d.ts +2 -0
- package/dist/src/__tests__/context/restore-last-session.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/session-ctx.stale-token-retry.spec.d.ts +2 -0
- package/dist/src/__tests__/context/session-ctx.stale-token-retry.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/storage-ctx.spec.d.ts +2 -0
- package/dist/src/__tests__/context/storage-ctx.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/streaming-engine.spec.d.ts +1 -0
- package/dist/src/__tests__/context/streaming-engine.spec.d.ts.map +1 -0
- package/dist/src/__tests__/context/widget-ctx.features.spec.d.ts +1 -0
- package/dist/src/__tests__/context/widget-ctx.features.spec.d.ts.map +1 -0
- package/dist/src/__tests__/dictation/dictation-commands.utils.spec.d.ts +2 -0
- package/dist/src/__tests__/dictation/dictation-commands.utils.spec.d.ts.map +1 -0
- package/dist/src/__tests__/test-utils.d.ts +28 -0
- package/dist/src/__tests__/test-utils.d.ts.map +1 -1
- package/dist/src/__tests__/translation.spec.d.ts +2 -0
- package/dist/src/__tests__/translation.spec.d.ts.map +1 -0
- package/dist/src/__tests__/utils/companion-layout.spec.d.ts +2 -0
- package/dist/src/__tests__/utils/companion-layout.spec.d.ts.map +1 -0
- package/dist/src/api/agent-stream-parts.d.ts +24 -0
- package/dist/src/api/agent-stream-parts.d.ts.map +1 -0
- package/dist/src/api/api-caller.d.ts +50 -1
- package/dist/src/api/api-caller.d.ts.map +1 -1
- package/dist/src/api/client.d.ts.map +1 -1
- package/dist/src/api/schema.d.ts +355 -78
- package/dist/src/api/schema.d.ts.map +1 -1
- package/dist/src/context/active-session-polling.ctx.d.ts +10 -0
- package/dist/src/context/active-session-polling.ctx.d.ts.map +1 -1
- package/dist/src/context/contact.ctx.d.ts +9 -0
- package/dist/src/context/contact.ctx.d.ts.map +1 -1
- package/dist/src/context/csat.ctx.d.ts +2 -5
- package/dist/src/context/csat.ctx.d.ts.map +1 -1
- package/dist/src/context/dictation.ctx.d.ts +67 -0
- package/dist/src/context/dictation.ctx.d.ts.map +1 -0
- package/dist/src/context/message.ctx.d.ts +209 -9
- package/dist/src/context/message.ctx.d.ts.map +1 -1
- package/dist/src/context/router.ctx.d.ts +22 -0
- package/dist/src/context/router.ctx.d.ts.map +1 -1
- package/dist/src/context/session.ctx.d.ts +22 -32
- package/dist/src/context/session.ctx.d.ts.map +1 -1
- package/dist/src/context/storage.ctx.d.ts +40 -1
- package/dist/src/context/storage.ctx.d.ts.map +1 -1
- package/dist/src/context/widget-agent.d.ts +60 -0
- package/dist/src/context/widget-agent.d.ts.map +1 -0
- package/dist/src/context/widget.ctx.d.ts +33 -0
- package/dist/src/context/widget.ctx.d.ts.map +1 -1
- package/dist/src/dictation/dictation-commands.utils.d.ts +76 -0
- package/dist/src/dictation/dictation-commands.utils.d.ts.map +1 -0
- package/dist/src/dictation/dictation-drip.utils.d.ts +21 -0
- package/dist/src/dictation/dictation-drip.utils.d.ts.map +1 -0
- package/dist/src/dictation/dictation-level-smoother.d.ts +18 -0
- package/dist/src/dictation/dictation-level-smoother.d.ts.map +1 -0
- package/dist/src/dictation/dictation-mint-cache.d.ts +25 -0
- package/dist/src/dictation/dictation-mint-cache.d.ts.map +1 -0
- package/dist/src/dictation/dictation-session.d.ts +55 -0
- package/dist/src/dictation/dictation-session.d.ts.map +1 -0
- package/dist/src/index.d.ts +17 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/translation/ar.d.ts.map +1 -1
- package/dist/src/translation/bg.d.ts.map +1 -1
- package/dist/src/translation/bn.d.ts.map +1 -1
- package/dist/src/translation/cs.d.ts.map +1 -1
- package/dist/src/translation/da.d.ts.map +1 -1
- package/dist/src/translation/de.d.ts.map +1 -1
- package/dist/src/translation/el.d.ts.map +1 -1
- package/dist/src/translation/en.d.ts.map +1 -1
- package/dist/src/translation/es.d.ts.map +1 -1
- package/dist/src/translation/et.d.ts.map +1 -1
- package/dist/src/translation/fi.d.ts.map +1 -1
- package/dist/src/translation/fil.d.ts.map +1 -1
- package/dist/src/translation/fr.d.ts.map +1 -1
- package/dist/src/translation/hi.d.ts.map +1 -1
- package/dist/src/translation/hr.d.ts.map +1 -1
- package/dist/src/translation/hu.d.ts.map +1 -1
- package/dist/src/translation/index.d.ts +87 -1
- package/dist/src/translation/index.d.ts.map +1 -1
- package/dist/src/translation/is.d.ts.map +1 -1
- package/dist/src/translation/it.d.ts.map +1 -1
- package/dist/src/translation/ja.d.ts.map +1 -1
- package/dist/src/translation/ko.d.ts.map +1 -1
- package/dist/src/translation/lb.d.ts.map +1 -1
- package/dist/src/translation/lt.d.ts.map +1 -1
- package/dist/src/translation/lv.d.ts.map +1 -1
- package/dist/src/translation/mt.d.ts.map +1 -1
- package/dist/src/translation/nb.d.ts.map +1 -1
- package/dist/src/translation/nl.d.ts.map +1 -1
- package/dist/src/translation/no.d.ts.map +1 -1
- package/dist/src/translation/pl.d.ts.map +1 -1
- package/dist/src/translation/pt.d.ts.map +1 -1
- package/dist/src/translation/ro.d.ts.map +1 -1
- package/dist/src/translation/ru.d.ts.map +1 -1
- package/dist/src/translation/sk.d.ts.map +1 -1
- package/dist/src/translation/sv.d.ts.map +1 -1
- package/dist/src/translation/th.d.ts.map +1 -1
- package/dist/src/translation/tr.d.ts.map +1 -1
- package/dist/src/translation/ur.d.ts.map +1 -1
- package/dist/src/translation/vi.d.ts.map +1 -1
- package/dist/src/translation/zh-cn.d.ts.map +1 -1
- package/dist/src/types/component-name.d.ts +1 -1
- package/dist/src/types/component-name.d.ts.map +1 -1
- package/dist/src/types/dtos.d.ts +2 -0
- package/dist/src/types/dtos.d.ts.map +1 -1
- package/dist/src/types/icons.d.ts +1 -1
- package/dist/src/types/icons.d.ts.map +1 -1
- package/dist/src/types/messages.d.ts +36 -2
- package/dist/src/types/messages.d.ts.map +1 -1
- package/dist/src/types/widget-config.d.ts +402 -4
- package/dist/src/types/widget-config.d.ts.map +1 -1
- package/dist/src/utils/Poller.d.ts.map +1 -1
- package/dist/src/utils/PrimitiveState.d.ts.map +1 -1
- package/dist/src/utils/companion-layout.d.ts +23 -0
- package/dist/src/utils/companion-layout.d.ts.map +1 -0
- package/dist/src/utils/is-exhaustive.d.ts.map +1 -1
- package/dist/src/utils/is-record.d.ts +3 -0
- package/dist/src/utils/is-record.d.ts.map +1 -0
- package/dist/src/utils/log.d.ts +5 -0
- package/dist/src/utils/log.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-stream-parts.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/api/agent-stream-parts.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictation-mint-cache.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/api/dictation-mint-cache.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-api-wire.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/api/widget-api-wire.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-ctx.create-failure.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/contact-ctx.create-failure.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=dictation-ctx.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictation-ctx.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/dictation-ctx.spec.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-send-context.spec.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/context/message/merge-send-context.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=pending-user-messages.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pending-user-messages.spec.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/context/message/pending-user-messages.spec.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=sent-text-history.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sent-text-history.spec.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/context/message/sent-text-history.spec.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.agent-handlers.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.agent-handlers.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.client-context.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.client-context.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.mentions.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.mentions.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.page-mark-chips.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.page-mark-chips.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.send-acceptance.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.send-acceptance.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-ctx.send-features.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/message-ctx.send-features.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=reconcile-after-stream.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-after-stream.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/reconcile-after-stream.spec.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restore-last-session.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/restore-last-session.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-ctx.stale-token-retry.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/session-ctx.stale-token-retry.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-ctx.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/storage-ctx.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=streaming-engine.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-engine.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/streaming-engine.spec.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=widget-ctx.features.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-ctx.features.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/context/widget-ctx.features.spec.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictation-commands.utils.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/dictation/dictation-commands.utils.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ApiCaller } from '../api/api-caller';
|
|
2
|
+
import { Dto } from '../api/client';
|
|
3
|
+
type AgentFeaturesDto = Dto['WidgetAgentFeaturesDto'];
|
|
2
4
|
export declare const TestUtils: {
|
|
5
|
+
agentFeatures: (overrides?: Partial<AgentFeaturesDto>) => AgentFeaturesDto;
|
|
3
6
|
sleep: (ms: number) => Promise<unknown>;
|
|
4
7
|
mock: {
|
|
5
8
|
ApiCaller: {
|
|
@@ -174,6 +177,12 @@ export declare const TestUtils: {
|
|
|
174
177
|
clientContext?: {
|
|
175
178
|
[key: string]: unknown;
|
|
176
179
|
} | null;
|
|
180
|
+
features?: {
|
|
181
|
+
preamble?: boolean;
|
|
182
|
+
inline_ui?: boolean;
|
|
183
|
+
page_context?: boolean;
|
|
184
|
+
client_tools?: boolean;
|
|
185
|
+
} | null;
|
|
177
186
|
custom_data?: {
|
|
178
187
|
[key: string]: unknown;
|
|
179
188
|
} | null;
|
|
@@ -187,6 +196,12 @@ export declare const TestUtils: {
|
|
|
187
196
|
signal: AbortSignal | undefined;
|
|
188
197
|
}, `${string}/${string}`>> | undefined): void;
|
|
189
198
|
setAuthToken(target: typeof ApiCaller, _returnValue: void | undefined): void;
|
|
199
|
+
getStreamTransportOptions(target: typeof ApiCaller, _returnValue: Partial<{
|
|
200
|
+
api: string;
|
|
201
|
+
reconnectApi: (sessionId: string) => string;
|
|
202
|
+
headers: Record<string, string>;
|
|
203
|
+
}> | undefined): void;
|
|
204
|
+
stopStream(target: typeof ApiCaller, _returnValue: void | undefined): void;
|
|
190
205
|
uploadFile(target: typeof ApiCaller, _returnValue: Partial<{
|
|
191
206
|
fileName: string;
|
|
192
207
|
fileUrl: string;
|
|
@@ -411,7 +426,20 @@ export declare const TestUtils: {
|
|
|
411
426
|
system_message_uuid?: string;
|
|
412
427
|
};
|
|
413
428
|
}, `${string}/${string}`>> | undefined): void;
|
|
429
|
+
getAgentTurnMessages(target: typeof ApiCaller, returnValue: Partial<{
|
|
430
|
+
turns: {
|
|
431
|
+
turn_id: string;
|
|
432
|
+
ui_parts: ({
|
|
433
|
+
type: string;
|
|
434
|
+
} & {
|
|
435
|
+
[key: string]: unknown;
|
|
436
|
+
})[] | null;
|
|
437
|
+
message_uuids: string[];
|
|
438
|
+
}[];
|
|
439
|
+
} | null> | undefined): void;
|
|
440
|
+
createDictationSession(target: typeof ApiCaller, returnValue: Partial<import('../dictation/dictation-session').DictationMint> | undefined): void;
|
|
414
441
|
};
|
|
415
442
|
};
|
|
416
443
|
};
|
|
444
|
+
export {};
|
|
417
445
|
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/test-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/test-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,KAAK,gBAAgB,GAAG,GAAG,CAAC,wB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AAsB;;;;;;;;gDAA0O,6CAAsB;;;;;;;;;;;;yBA1BxmG,CAAJ;0BAAuB,CAAC;wBAAsB,CAAA;0BAC3B,CAAC;;;;4CAEZ,6CAAiB;;;;;;;;;gDAQV,6CACT;;;;;;;;gDAQa,6CACZ;;;;;;;;;;;;;;yBAKykJ,CAAC;0BAAuB,CAAC;wBAAqB,CAAC;0BAAuB,CAAC;;;;4CAAuF,6CAAsB;;;;;;;;;gDAA4P,6CAAsB;;;;;;;;gDAAmP,6CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;CADhyK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translation.spec.d.ts","sourceRoot":"","sources":["../../../src/__tests__/translation.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companion-layout.spec.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/utils/companion-layout.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The v5 stream's protocol-level data parts the client classifies a stream by.
|
|
3
|
+
* Neither renders anything: the widget only needs to recognise them.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The idle heartbeat. While a request waits — a message waiting to join the
|
|
7
|
+
* session's live turn, or a turn that has not spoken yet — the backend emits
|
|
8
|
+
* one so an idle timeout never cuts the connection. It is a `transient`
|
|
9
|
+
* part: the protocol delivers it and never adds it to the message. Readers
|
|
10
|
+
* that classify a stream by its first chunk must skip it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const isAgentStreamKeepalive: (part: {
|
|
13
|
+
type: string;
|
|
14
|
+
}) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The stream's answer to a message POSTed while the session already had a
|
|
17
|
+
* live turn: the message was STEERED into that turn (no new turn, no reply
|
|
18
|
+
* of its own — the live turn's single reply answers both messages). The
|
|
19
|
+
* request's own stream carries exactly this part and ends.
|
|
20
|
+
*/
|
|
21
|
+
export declare const isTurnSteeredPart: (part: {
|
|
22
|
+
type: string;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
//# sourceMappingURL=agent-stream-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-stream-parts.d.ts","sourceRoot":"","sources":["../../../src/api/agent-stream-parts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,OAChC,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,OACxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Dto } from './client';
|
|
2
|
+
import { DictationMint } from '../dictation/dictation-session';
|
|
2
3
|
import { WidgetConfig } from '../types/widget-config';
|
|
3
|
-
import { ResolveSessionDto, SendMessageDto, VoteInputDto } from '../types/dtos';
|
|
4
|
+
import { AgentTurnMessagesDto, ResolveSessionDto, SendMessageDto, VoteInputDto } from '../types/dtos';
|
|
4
5
|
export declare class ApiCaller {
|
|
5
6
|
private client;
|
|
6
7
|
private config;
|
|
@@ -11,6 +12,48 @@ export declare class ApiCaller {
|
|
|
11
12
|
private constructClientOptions;
|
|
12
13
|
private createOpenAPIClient;
|
|
13
14
|
setAuthToken: (token: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* AUTH headers only (X-Bot-Token / Authorization), stripped of
|
|
17
|
+
* content-type/accept. The transport sets its own Content-Type, and a second
|
|
18
|
+
* (case-differing) copy gets COMBINED by the Headers init into
|
|
19
|
+
* "application/json, application/json" — which the server rejects (415). Also
|
|
20
|
+
* reused for the reconnect/stop control calls (empty-body POST/GET).
|
|
21
|
+
*/
|
|
22
|
+
private getStreamAuthContext;
|
|
23
|
+
/**
|
|
24
|
+
* Wiring for the agent-chat streaming adapter: the send endpoint, the
|
|
25
|
+
* session-scoped reconnect endpoint, and the shared auth headers.
|
|
26
|
+
* Computed lazily so a later `setAuthToken` is always reflected.
|
|
27
|
+
*/
|
|
28
|
+
getStreamTransportOptions: () => {
|
|
29
|
+
api: string;
|
|
30
|
+
reconnectApi: (sessionId: string) => string;
|
|
31
|
+
headers: Record<string, string>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Stop / interrupt the session's in-flight streamed turn. With resumable
|
|
35
|
+
* streams on, a client abort is treated as a disconnect (the stream
|
|
36
|
+
* survives), so a real "stop" is this explicit call — the backend cancels
|
|
37
|
+
* generation and clears the resume pointer. Throws on failure — the caller
|
|
38
|
+
* decides how to react, so a failed cancel is never mistaken for an ACKed
|
|
39
|
+
* one.
|
|
40
|
+
*/
|
|
41
|
+
stopStream: (sessionId: string) => Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* The session's settled agent turns with their final UIMessage parts and
|
|
44
|
+
* the transcript rows each produced — the reload-fidelity read (widget v5).
|
|
45
|
+
* Returns null on any failure: the caller then keeps the plain-row
|
|
46
|
+
* rendering, exactly the pre-feature behavior.
|
|
47
|
+
*/
|
|
48
|
+
getAgentTurnMessages: (sessionId: string) => Promise<AgentTurnMessagesDto | null>;
|
|
49
|
+
/**
|
|
50
|
+
* Mint a short-lived transcription token for voice dictation (widget v5).
|
|
51
|
+
* Org-gated server-side; throws on any failure so the caller can surface
|
|
52
|
+
* "dictation unavailable" instead of hanging with an open mic.
|
|
53
|
+
*/
|
|
54
|
+
createDictationSession: ({ language, }: {
|
|
55
|
+
language?: string | undefined;
|
|
56
|
+
}) => Promise<DictationMint>;
|
|
14
57
|
getExternalWidgetConfig: () => Promise<import('openapi-fetch').FetchResponse<{
|
|
15
58
|
parameters: {
|
|
16
59
|
query?: never;
|
|
@@ -96,6 +139,12 @@ export declare class ApiCaller {
|
|
|
96
139
|
clientContext?: {
|
|
97
140
|
[key: string]: unknown;
|
|
98
141
|
} | null;
|
|
142
|
+
features?: {
|
|
143
|
+
preamble?: boolean;
|
|
144
|
+
inline_ui?: boolean;
|
|
145
|
+
page_context?: boolean;
|
|
146
|
+
client_tools?: boolean;
|
|
147
|
+
} | null;
|
|
99
148
|
custom_data?: {
|
|
100
149
|
[key: string]: unknown;
|
|
101
150
|
} | null;
|
|
@@ -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,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,YAAY,EACb,MAAM,eAAe,CAAC;
|
|
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;AAkBvB,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,SAAS,CAAuB;gBAE5B,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,YAAY,CAAA;KAAE;IAUhD,OAAO,CAAC,sBAAsB,CAa5B;IAEF,OAAO,CAAC,mBAAmB,CAczB;IAEF,YAAY,GAAI,OAAO,MAAM,UAI3B;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB,CAY1B;IAEF;;;;OAIG;IACH,yBAAyB,QAAO;Q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Ad5pC;IAEF,qBAAqB,GACnB,MAAM,GAAG,CAAC,qCAAqC,CAAC;;iBArFhD,CAAD;kBAAuB,CAAC;gBACT,CAAC;kBAAuB,CAAC;;;;oCAEf,wCACxB;;;;;;;;;wCASO,wCAAsB;;;;;;;;wCAUH,wCAAsB;;;;;;;;;;;+BAmEhD;IAEF,UAAU,GAAU,MAAM,GAAG,CAAC,0BAA0B,CAAC;;iBAIykF,CAAC;kBAAuB,CAAC;gBAAqB,CAAC;kBAAuB,CAAC;;;;oCAAuF,wCAAsB;;;;;;;;;wCAA4P,wCAAsB;;;;;;;;wCAAmP,wCAAsB;;;;;;;;;;;+BAF/0G;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CACjC,CAAC;AAMF,eAAO,MAAM,WAAW,GAAI,SAAS,OAAO,iEAa3C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC;AACnC,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC"}
|