@opencx/widget-react-headless 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 +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2689 -2223
- package/dist/index.js.map +1 -1
- package/dist/package.json.d.ts +1 -1
- package/dist/src/ConversationWorkspace.d.ts +3 -1
- package/dist/src/ConversationWorkspace.d.ts.map +1 -1
- package/dist/src/WidgetProvider.d.ts.map +1 -1
- package/dist/src/agent-chat/AgentChatContext.d.ts +26 -2
- package/dist/src/agent-chat/AgentChatContext.d.ts.map +1 -1
- package/dist/src/agent-chat/agent-chat-stream.d.ts +9 -0
- package/dist/src/agent-chat/agent-chat-stream.d.ts.map +1 -1
- package/dist/src/agent-chat/useAgentChat.d.ts +34 -1
- package/dist/src/agent-chat/useAgentChat.d.ts.map +1 -1
- package/dist/src/agent-chat/useConnection.d.ts +39 -0
- package/dist/src/agent-chat/useConnection.d.ts.map +1 -0
- package/dist/src/hooks/useSessions.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/widget-user-identity.d.ts +8 -0
- package/dist/src/widget-user-identity.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/src/__tests__/ComponentRegistry.spec.d.ts +0 -2
- package/dist/src/__tests__/ComponentRegistry.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ConversationWorkspace.spec.d.ts +0 -2
- package/dist/src/__tests__/ConversationWorkspace.spec.d.ts.map +0 -1
- package/dist/src/__tests__/WidgetProvider.capabilities.spec.d.ts +0 -2
- package/dist/src/__tests__/WidgetProvider.capabilities.spec.d.ts.map +0 -1
- package/dist/src/__tests__/WidgetProvider.initialization.spec.d.ts +0 -2
- package/dist/src/__tests__/WidgetProvider.initialization.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/WidgetProvider.agent-chat.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/WidgetProvider.agent-chat.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/activity-protocol.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/activity-protocol.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/agent-chat-queue.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/agent-chat-queue.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/agent-chat-stream.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/agent-chat-stream.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/agent-chat-transport.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/agent-chat-transport.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/agent-turn-sources.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/agent-turn-sources.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/apply-presentation.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/apply-presentation.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/ask-questions.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/ask-questions.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/pending-clarification.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/pending-clarification.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/session-plan.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/session-plan.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/stop-agent-chat-turn.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/stop-agent-chat-turn.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/task-plan.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/task-plan.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.client-context.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.client-context.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.drain-order.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.drain-order.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.failed-turn.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.failed-turn.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.feature-narrowing.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.feature-narrowing.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.follow-up.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.follow-up.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.send-features.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.send-features.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.stop-partial.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.stop-partial.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.stream-handoff.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.stream-handoff.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-agent-chat.turn-retention.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-agent-chat.turn-retention.spec.d.ts.map +0 -1
- package/dist/src/agent-chat/__tests__/use-chat-post-finish-data-part.spec.d.ts +0 -2
- package/dist/src/agent-chat/__tests__/use-chat-post-finish-data-part.spec.d.ts.map +0 -1
- package/dist/src/hooks/__tests__/use-composer-draft.spec.d.ts +0 -2
- package/dist/src/hooks/__tests__/use-composer-draft.spec.d.ts.map +0 -1
- package/dist/src/hooks/__tests__/use-display-mode.spec.d.ts +0 -2
- package/dist/src/hooks/__tests__/use-display-mode.spec.d.ts.map +0 -1
- package/dist/src/hooks/__tests__/use-widget-layout.spec.d.ts +0 -2
- package/dist/src/hooks/__tests__/use-widget-layout.spec.d.ts.map +0 -1
- package/dist/src/hooks/__tests__/useHostLocation.spec.d.ts +0 -2
- package/dist/src/hooks/__tests__/useHostLocation.spec.d.ts.map +0 -1
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PrimitiveState, WidgetConfig, WidgetCtx } from '@opencx/widget-core';
|
|
3
3
|
import { AgentChatUiValue } from './agent-chat/AgentChatContext';
|
|
4
|
+
import { ConnectionState } from './agent-chat/useConnection';
|
|
4
5
|
export type CompanionChat = {
|
|
5
6
|
id: number;
|
|
6
7
|
ctx: WidgetCtx;
|
|
@@ -9,6 +10,7 @@ export type CompanionChat = {
|
|
|
9
10
|
hasSession: boolean;
|
|
10
11
|
hasDraft: boolean;
|
|
11
12
|
ui: AgentChatUiValue;
|
|
13
|
+
connection: ConnectionState | null;
|
|
12
14
|
/** A closed tab may finish its current turn before its runtime is released. */
|
|
13
15
|
closed?: boolean;
|
|
14
16
|
};
|
|
@@ -34,7 +36,7 @@ export declare class ConversationWorkspace {
|
|
|
34
36
|
canCreateChat: () => boolean;
|
|
35
37
|
private isEmpty;
|
|
36
38
|
open: (sessionId?: string) => WidgetCtx | undefined;
|
|
37
|
-
update: (id: number, update: Partial<Pick<CompanionChat, "title" | "working" | "hasSession" | "hasDraft" | "ui">>) => void;
|
|
39
|
+
update: (id: number, update: Partial<Pick<CompanionChat, "title" | "working" | "hasSession" | "hasDraft" | "ui" | "connection">>) => void;
|
|
38
40
|
}
|
|
39
41
|
/** Optional only for shared hooks that also serve popover and inline widgets. */
|
|
40
42
|
export declare function useConversationWorkspace(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationWorkspace.d.ts","sourceRoot":"","sources":["../../src/ConversationWorkspace.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":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iCxB;IACF,MAAM,GACJ,IAAI,MAAM,EACV,QAAQ,OAAO,CACb,IAAI,CACF,aAAa,EACb,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,IAAI,GAAG,YAAY,CACtE,CACF,UA2BD;CACH;AAQD,iFAAiF;AACjF,wBAAgB,wBAAwB;;;;;EAQvC;AAED,wBAAgB,iBAAiB;qBA7KjB,MAAM;oBAkBP,MAAM;0BAmEC,MAAM;;;;EAkG3B;AA4DD,wBAAgB,6BAA6B,CAAC,EAC5C,SAAS,EACT,MAAyB,EACzB,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;CAClD,qBA+BA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../src/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../src/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,UAAU,mBAAmB;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,cAAc,EAAE,iBAAiB,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACrE;AAID,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EACR,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,cAAc,GACf,EAAE;IACD,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;CACpD,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA8I5B;AAED,wBAAgB,SAAS,wBAMxB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WidgetConfig, WidgetCtx, WidgetUserMessage } from '@opencx/widget-core';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import { StreamingTurnItem } from './agent-chat-stream';
|
|
3
|
+
import { ConnectionRequest, StreamingTurnItem } from './agent-chat-stream';
|
|
4
4
|
import { TurnRenderSource } from './agent-turn-sources';
|
|
5
5
|
import { AskQuestionsRequest } from './ask-questions';
|
|
6
|
-
import { AgentChatPageEffect } from './useAgentChat';
|
|
6
|
+
import { AgentChatPageEffect, PendingPageAction } from './useAgentChat';
|
|
7
7
|
/**
|
|
8
8
|
* Streaming state for the agent-chat surface, produced by the single
|
|
9
9
|
* `useAgentChat` (one useChat instance) and consumed by the message list
|
|
@@ -38,11 +38,35 @@ export type AgentChatUiValue = {
|
|
|
38
38
|
stop: () => void;
|
|
39
39
|
/** Host-page effects normalized from the current assistant tool parts. */
|
|
40
40
|
pageEffects: AgentChatPageEffect[];
|
|
41
|
+
/**
|
|
42
|
+
* Tell the waiting turn what actually happened on the page. The adapter
|
|
43
|
+
* that performs an effect owes exactly one of these per call; without it
|
|
44
|
+
* the agent only knows that it asked.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* The committing action waiting on the visitor's yes, or null. Shown as a
|
|
48
|
+
* chip naming the exact control; a decline is final.
|
|
49
|
+
*/
|
|
50
|
+
pendingPageAction: PendingPageAction | null;
|
|
51
|
+
/** The visitor's answer to that chip. */
|
|
52
|
+
resolvePageAction: (callId: string, allowed: boolean) => void;
|
|
53
|
+
/** Raised by the adapter that is about to act. Resolves false on decline. */
|
|
54
|
+
requestPageActionConsent: (request: PendingPageAction) => Promise<boolean>;
|
|
55
|
+
replyToPageCall: (callId: string, outcome: 'done' | 'covered' | 'gone' | 'hidden' | 'unsupported' | 'no_change' | 'declined', detail?: string, page?: {
|
|
56
|
+
controls: {
|
|
57
|
+
ref: string;
|
|
58
|
+
role: string;
|
|
59
|
+
name: string;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
}[];
|
|
62
|
+
truncated: boolean;
|
|
63
|
+
}) => void;
|
|
41
64
|
/**
|
|
42
65
|
* The clarification the agent is waiting on — the composer shows the
|
|
43
66
|
* questionnaire in its place — or null.
|
|
44
67
|
*/
|
|
45
68
|
pendingClarification: AskQuestionsRequest | null;
|
|
69
|
+
pendingConnection: ConnectionRequest | null;
|
|
46
70
|
};
|
|
47
71
|
export declare const DEFAULT_AGENT_CHAT_UI: AgentChatUiValue;
|
|
48
72
|
export declare const AgentChatContext: React.Context<AgentChatUiValue | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentChatContext.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/AgentChatContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"AgentChatContext.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/AgentChatContext.tsx"],"names":[],"mappings":"AAAA,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E,CACf,MAAM,EAAE,MAAM,EACd,OAAO,EACH,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,aAAa,GACb,WAAW,GACX,UAAU,EACd,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE;YACR,GAAG,EAAE,MAAM,CAAC;YACZ,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,CAAC,EAAE,OAAO,CAAC;SACpB,EAAE,CAAC;QACJ,SAAS,EAAE,OAAO,CAAC;KACpB,KACE,IAAI,CAAC;IACV;;;OAGG;IACH,oBAAoB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,gBAiBnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,wCAA+C,CAAC;AAE7E,mFAAmF;AACnF,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAwKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,SAAS,EACT,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,qBAeA"}
|
|
@@ -20,6 +20,12 @@ export type StreamingStep = {
|
|
|
20
20
|
* drains out of model text as typed `data-spec` UIMessage parts. The styled
|
|
21
21
|
* renderer assembles these into a renderable element-tree spec.
|
|
22
22
|
*/
|
|
23
|
+
export declare const connectionRequestSchema: z.ZodObject<{
|
|
24
|
+
request_id: z.ZodString;
|
|
25
|
+
server_id: z.ZodString;
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type ConnectionRequest = z.infer<typeof connectionRequestSchema>;
|
|
23
29
|
declare const SPEC_DATA_PART_TYPE = "data-spec";
|
|
24
30
|
declare const planSchema: z.ZodObject<{
|
|
25
31
|
plan: z.ZodArray<z.ZodObject<{
|
|
@@ -58,6 +64,9 @@ export type StreamingTurnItem = {
|
|
|
58
64
|
| {
|
|
59
65
|
kind: 'questions';
|
|
60
66
|
request: AskQuestionsRequest;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'connection';
|
|
69
|
+
request: ConnectionRequest;
|
|
61
70
|
};
|
|
62
71
|
/** The in-flight turn's render state: active + its ordered items. */
|
|
63
72
|
export type StreamingTurnState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-stream.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/agent-chat-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAC3B,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,cAAc,CAAC;AAExC,QAAA,MAAM,UAAU;;;;;;;;;iBAOd,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,mBAAmB,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/E,uDAAuD;AACvD,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,a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|
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
import { WidgetConfig, WidgetCtx, WidgetMessageU } from '@opencx/widget-core';
|
|
2
2
|
import { StreamingTurnItem } from './agent-chat-stream';
|
|
3
3
|
import { TurnRenderSource } from './agent-turn-sources';
|
|
4
|
+
/**
|
|
5
|
+
* Something the visitor has to say yes to before it happens. Raised by the
|
|
6
|
+
* adapter that is about to act — it is the one that knows which control the
|
|
7
|
+
* reference points at, and what that control is called.
|
|
8
|
+
*/
|
|
9
|
+
export type PendingPageAction = {
|
|
10
|
+
callId: string;
|
|
11
|
+
/** What is about to be done: clicked, filled in, switched on. */
|
|
12
|
+
action: string;
|
|
13
|
+
/** The control's own name on the page, read off the page, not the model. */
|
|
14
|
+
controlName: string;
|
|
15
|
+
};
|
|
4
16
|
/** A normalized browser effect for a styled renderer to perform on its host. */
|
|
5
17
|
export type AgentChatPageEffect = {
|
|
6
18
|
key: string;
|
|
7
|
-
type: 'highlight-element';
|
|
19
|
+
type: 'highlight-element' | 'act-on-page';
|
|
8
20
|
input: unknown;
|
|
21
|
+
/**
|
|
22
|
+
* The tool call this effect belongs to. The adapter performs the effect,
|
|
23
|
+
* sees what happened, and answers with `replyToPageCall(callId, …)` —
|
|
24
|
+
* which is how the turn finds out anything at all about the page it just
|
|
25
|
+
* touched.
|
|
26
|
+
*/
|
|
27
|
+
callId: string;
|
|
9
28
|
};
|
|
10
29
|
/**
|
|
11
30
|
* The agent-chat engine, powered by the AI SDK `useChat`.
|
|
@@ -43,5 +62,19 @@ export declare function useAgentChat({ widgetCtx, config, sessionId, persistedMe
|
|
|
43
62
|
removeQueued: (messageId: string) => void;
|
|
44
63
|
stop: () => void;
|
|
45
64
|
pageEffects: AgentChatPageEffect[];
|
|
65
|
+
replyToPageCall: (callId: string, outcome: "done" | "covered" | "gone" | "hidden" | "unsupported" | "no_change" | "declined", detail?: string, page?: {
|
|
66
|
+
controls: {
|
|
67
|
+
ref: string;
|
|
68
|
+
role: string;
|
|
69
|
+
name: string;
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
}[];
|
|
72
|
+
truncated: boolean;
|
|
73
|
+
}) => void;
|
|
74
|
+
pendingPageAction: PendingPageAction | null;
|
|
75
|
+
requestPageActionConsent: (request: PendingPageAction) => Promise<boolean>;
|
|
76
|
+
resolvePageAction: (callId: string, allowed: boolean) => void;
|
|
77
|
+
handledConnectionRequestIds: string[];
|
|
78
|
+
sourceSessionId: string | null;
|
|
46
79
|
};
|
|
47
80
|
//# sourceMappingURL=useAgentChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgentChat.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/useAgentChat.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAgentChat.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/useAgentChat.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAS9B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,mBAAmB,GAAG,aAAa,CAAC;IAC1C,KAAK,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqBF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,MAAM,EACN,SAAS,EACT,iBAAiB,GAClB,EAAE;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,cAAc,EAAE,CAAC;CACrC;;;IA63BG,+DAA+D;;IAE/D,wEAAwE;;IAExE,yEAAyE;;;;8BA1a9B,MAAM;;;8BA8JvC,MAAM,WAEV,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,aAAa,GACb,WAAW,GACX,UAAU,WACL,MAAM,SACR;QACL,QAAQ,EAAE;YACR,GAAG,EAAE,MAAM,CAAC;YACZ,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,CAAC,EAAE,OAAO,CAAC;SACpB,EAAE,CAAC;QACJ,SAAS,EAAE,OAAO,CAAC;KACpB;;wCAoCO,iBAAiB;gCAQkB,MAAM,WAAW,OAAO;;;EA4NxE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WidgetCtx } from '@opencx/widget-core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ConnectionRequest } from './agent-chat-stream';
|
|
4
|
+
export type ConnectionPhase = 'idle' | 'loading' | 'ready' | 'waiting' | 'connected' | 'external';
|
|
5
|
+
type ContinuationKind = 'resume' | 'external' | 'renew' | 'dismiss';
|
|
6
|
+
export type ConnectionState = {
|
|
7
|
+
request: ConnectionRequest;
|
|
8
|
+
phase: ConnectionPhase;
|
|
9
|
+
authorization: {
|
|
10
|
+
url: string;
|
|
11
|
+
host: string;
|
|
12
|
+
completion: 'oauth' | 'external';
|
|
13
|
+
attemptId?: string;
|
|
14
|
+
} | null;
|
|
15
|
+
continuation: ContinuationKind | null;
|
|
16
|
+
error: string | null;
|
|
17
|
+
start: () => Promise<void>;
|
|
18
|
+
opened: () => void;
|
|
19
|
+
cancel: () => Promise<void>;
|
|
20
|
+
retryContinuation: () => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
/** Owns one authorization attempt above the card/view lifecycle. */
|
|
23
|
+
export declare function ConnectionAttemptProvider({ children, request, widgetCtx, onHandled, }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
request: ConnectionRequest | null;
|
|
26
|
+
widgetCtx: WidgetCtx;
|
|
27
|
+
onHandled: (requestId: string) => void;
|
|
28
|
+
}): React.FunctionComponentElement<React.ProviderProps<ConnectionState | null>>;
|
|
29
|
+
/** Re-exposes an already-owned controller across a companion workspace boundary. */
|
|
30
|
+
export declare function ConnectionControllerProvider({ children, connection, }: {
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
connection: ConnectionState | null;
|
|
33
|
+
}): React.FunctionComponentElement<React.ProviderProps<ConnectionState | null>>;
|
|
34
|
+
/** Reads the active controller without requiring a connection request. */
|
|
35
|
+
export declare function useConnectionController(): ConnectionState | null;
|
|
36
|
+
/** Reads the provider-owned attempt; rendering the card never owns cleanup. */
|
|
37
|
+
export declare function useConnection(request: ConnectionRequest): ConnectionState;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=useConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../../src/agent-chat/useConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,SAAS,GAC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EhE;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,CAQzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSessions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSessions.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useSessions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSessions.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW;;;;;;;;;;;;;;;;;qBAgC6uE,CAAC;;;;qBAA0H,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAA2lC,CAAC;;;;sBAAwG,CAAC;mBAA6B,CAAC;iBAA2B,CAAC;;qBAA0C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD7qH"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -26,4 +26,7 @@ export { useCsat } from './hooks/useCsat';
|
|
|
26
26
|
export { useDictation } from './hooks/useDictation';
|
|
27
27
|
export { useCompanionChats } from './ConversationWorkspace';
|
|
28
28
|
export { useComposerDraft } from './hooks/useComposerDraft';
|
|
29
|
+
export type { ConnectionRequest } from './agent-chat/agent-chat-stream';
|
|
30
|
+
export type { PendingPageAction } from './agent-chat/useAgentChat';
|
|
31
|
+
export { useConnection } from './agent-chat/useConnection';
|
|
29
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO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B,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetConfig } from '@opencx/widget-core';
|
|
2
|
+
/**
|
|
3
|
+
* A local lifecycle fingerprint, never an authorization decision. Expiry and
|
|
4
|
+
* signatures intentionally do not participate, so a newly minted token for
|
|
5
|
+
* the same owner updates the transport without destroying session state.
|
|
6
|
+
*/
|
|
7
|
+
export declare const widgetUserIdentity: (config: WidgetConfig) => string;
|
|
8
|
+
//# sourceMappingURL=widget-user-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-user-identity.d.ts","sourceRoot":"","sources":["../../src/widget-user-identity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA4BxD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,KAAG,MAoCzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencx/widget-react-headless",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"uuid": "^11.0.4",
|
|
22
22
|
"zod": "^4.3.6",
|
|
23
|
-
"@opencx/widget-core": "5.0.0-beta.
|
|
23
|
+
"@opencx/widget-core": "5.0.0-beta.9"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@types/react": ">=18 <20",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"ai": "^7.0.31",
|
|
36
36
|
"react": "^19.2.8",
|
|
37
37
|
"react-dom": "^19.2.8",
|
|
38
|
-
"@opencx/
|
|
39
|
-
"@opencx/
|
|
38
|
+
"@opencx/eslint-config": "0.0.1",
|
|
39
|
+
"@opencx/tsconfig": "0.0.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"clean": "rm -rf node_modules dist .turbo",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRegistry.spec.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ComponentRegistry.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationWorkspace.spec.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ConversationWorkspace.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.capabilities.spec.d.ts","sourceRoot":"","sources":["../../../src/__tests__/WidgetProvider.capabilities.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.initialization.spec.d.ts","sourceRoot":"","sources":["../../../src/__tests__/WidgetProvider.initialization.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.agent-chat.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/WidgetProvider.agent-chat.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-protocol.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/activity-protocol.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-queue.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/agent-chat-queue.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-stream.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/agent-chat-stream.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-transport.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/agent-chat-transport.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-turn-sources.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/agent-turn-sources.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply-presentation.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/apply-presentation.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ask-questions.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/ask-questions.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pending-clarification.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/pending-clarification.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-plan.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/session-plan.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stop-agent-chat-turn.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/stop-agent-chat-turn.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-plan.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/task-plan.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.client-context.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.client-context.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.drain-order.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.drain-order.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.failed-turn.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.failed-turn.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.feature-narrowing.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.feature-narrowing.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.follow-up.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.follow-up.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.send-features.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.send-features.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.stop-partial.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.stop-partial.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.stream-handoff.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.stream-handoff.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-chat.turn-retention.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-agent-chat.turn-retention.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-chat-post-finish-data-part.spec.d.ts","sourceRoot":"","sources":["../../../../src/agent-chat/__tests__/use-chat-post-finish-data-part.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-composer-draft.spec.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__tests__/use-composer-draft.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-display-mode.spec.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__tests__/use-display-mode.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-widget-layout.spec.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__tests__/use-widget-layout.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHostLocation.spec.d.ts","sourceRoot":"","sources":["../../../../src/hooks/__tests__/useHostLocation.spec.tsx"],"names":[],"mappings":""}
|