@copilotkit/react-core 1.57.0 → 1.57.1-canary.1778272612
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/{copilotkit-CPe2-340.mjs → copilotkit-3XTEoVQO.mjs} +1367 -1200
- package/dist/copilotkit-3XTEoVQO.mjs.map +1 -0
- package/dist/{copilotkit-DFaI4j2r.d.mts → copilotkit-BCJ2yvV6.d.mts} +68 -8
- package/dist/copilotkit-BCJ2yvV6.d.mts.map +1 -0
- package/dist/{copilotkit-Dg4r4Gi_.d.cts → copilotkit-CBbSvze0.d.cts} +68 -8
- package/dist/copilotkit-CBbSvze0.d.cts.map +1 -0
- package/dist/{copilotkit-DGbvw8n2.cjs → copilotkit-Dnj9pi4m.cjs} +1369 -1196
- package/dist/copilotkit-Dnj9pi4m.cjs.map +1 -0
- package/dist/index.cjs +2 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +733 -610
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/context.cjs +135 -0
- package/dist/v2/context.cjs.map +1 -0
- package/dist/v2/context.d.cts +148 -0
- package/dist/v2/context.d.cts.map +1 -0
- package/dist/v2/context.d.mts +148 -0
- package/dist/v2/context.d.mts.map +1 -0
- package/dist/v2/context.mjs +129 -0
- package/dist/v2/context.mjs.map +1 -0
- package/dist/v2/headless.cjs +1043 -0
- package/dist/v2/headless.cjs.map +1 -0
- package/dist/v2/headless.d.cts +605 -0
- package/dist/v2/headless.d.cts.map +1 -0
- package/dist/v2/headless.d.mts +512 -0
- package/dist/v2/headless.d.mts.map +1 -0
- package/dist/v2/headless.mjs +997 -0
- package/dist/v2/headless.mjs.map +1 -0
- package/dist/v2/index.cjs +2 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +2 -2
- package/dist/v2/index.d.mts +2 -2
- package/dist/v2/index.mjs +2 -2
- package/dist/v2/index.umd.js +1385 -1204
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +14 -6
- package/src/hooks/__tests__/use-copilot-chat-internal-connect.test.tsx +5 -6
- package/src/hooks/use-copilot-chat_internal.ts +0 -1
- package/src/v2/components/chat/CopilotChat.tsx +2 -1
- package/src/v2/components/chat/CopilotChatMessageView.tsx +24 -9
- package/src/v2/components/chat/CopilotChatView.tsx +2 -2
- package/src/v2/components/chat/CopilotSidebar.tsx +5 -1
- package/src/v2/components/chat/CopilotSidebarView.tsx +24 -10
- package/src/v2/components/chat/__tests__/CopilotChat.welcomeGate.test.tsx +1 -3
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.tsx +29 -25
- package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.tsx +159 -0
- package/src/v2/components/chat/__tests__/MCPAppsUiMessage.e2e.test.tsx +5 -60
- package/src/v2/components/index.ts +1 -0
- package/src/v2/components/intelligence-indicator/IntelligenceIndicator.tsx +286 -0
- package/src/v2/components/intelligence-indicator/__tests__/IntelligenceIndicator.e2e.test.tsx +464 -0
- package/src/v2/components/intelligence-indicator/index.ts +2 -0
- package/src/v2/context.ts +62 -0
- package/src/v2/headless.ts +42 -0
- package/src/v2/hooks/__tests__/standard-schema.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-agent-context.test.tsx +3 -3
- package/src/v2/hooks/__tests__/use-agent-stability.test.tsx +3 -3
- package/src/v2/hooks/__tests__/use-agent-throttle.test.tsx +85 -85
- package/src/v2/hooks/__tests__/use-interrupt.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-render-tool.test.tsx +2 -2
- package/src/v2/hooks/__tests__/use-threads.test.tsx +2 -2
- package/src/v2/hooks/__tests__/zod-regression.test.tsx +2 -2
- package/src/v2/hooks/use-agent-context.tsx +1 -1
- package/src/v2/hooks/use-agent.tsx +9 -118
- package/src/v2/hooks/use-configure-suggestions.tsx +1 -1
- package/src/v2/hooks/use-default-render-tool.tsx +18 -1
- package/src/v2/hooks/use-frontend-tool.tsx +2 -2
- package/src/v2/hooks/use-human-in-the-loop.tsx +1 -1
- package/src/v2/hooks/use-interrupt.tsx +1 -1
- package/src/v2/hooks/use-render-activity-message.tsx +3 -11
- package/src/v2/hooks/use-render-custom-messages.tsx +1 -6
- package/src/v2/hooks/use-render-tool-call.tsx +36 -6
- package/src/v2/hooks/use-render-tool.tsx +2 -2
- package/src/v2/hooks/use-suggestions.tsx +1 -1
- package/src/v2/hooks/use-threads.tsx +1 -1
- package/src/v2/providers/CopilotKitProvider.tsx +19 -59
- package/src/v2/styles/globals.css +118 -0
- package/tsdown.config.ts +75 -0
- package/dist/copilotkit-CPe2-340.mjs.map +0 -1
- package/dist/copilotkit-DFaI4j2r.d.mts.map +0 -1
- package/dist/copilotkit-DGbvw8n2.cjs.map +0 -1
- package/dist/copilotkit-Dg4r4Gi_.d.cts.map +0 -1
- package/src/v2/hooks/__tests__/use-agent-thread-isolation.test.tsx +0 -333
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
import React$1, { ComponentType, ReactNode } from "react";
|
|
2
|
+
import { InferSchemaOutput, StandardSchemaV1 } from "@copilotkit/shared";
|
|
3
|
+
import { CopilotKitCore, CopilotKitCoreConfig, CopilotKitCoreSubscriber, CopilotKitCoreSubscription, DynamicSuggestionsConfig, FrontendTool, StaticSuggestionsConfig, Suggestion, ToolCallStatus } from "@copilotkit/core";
|
|
4
|
+
import { ActivityMessage, Message } from "@ag-ui/core";
|
|
5
|
+
import { AbstractAgent } from "@ag-ui/client";
|
|
6
|
+
|
|
7
|
+
//#region src/v2/types/react-tool-call-renderer.d.ts
|
|
8
|
+
interface ReactToolCallRenderer<T = unknown> {
|
|
9
|
+
name: string;
|
|
10
|
+
args: StandardSchemaV1<any, T>;
|
|
11
|
+
/**
|
|
12
|
+
* Optional agent ID to constrain this tool renderer to a specific agent.
|
|
13
|
+
* If specified, this renderer will only be used for the specified agent.
|
|
14
|
+
*/
|
|
15
|
+
agentId?: string;
|
|
16
|
+
render: React.ComponentType<{
|
|
17
|
+
name: string;
|
|
18
|
+
toolCallId: string;
|
|
19
|
+
args: Partial<T>;
|
|
20
|
+
status: ToolCallStatus.InProgress;
|
|
21
|
+
result: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
toolCallId: string;
|
|
25
|
+
args: T;
|
|
26
|
+
status: ToolCallStatus.Executing;
|
|
27
|
+
result: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
name: string;
|
|
30
|
+
toolCallId: string;
|
|
31
|
+
args: T;
|
|
32
|
+
status: ToolCallStatus.Complete;
|
|
33
|
+
result: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/v2/types/react-activity-message-renderer.d.ts
|
|
38
|
+
interface ReactActivityMessageRenderer<TActivityContent> {
|
|
39
|
+
/**
|
|
40
|
+
* Activity type to match when rendering. Use "*" as a wildcard renderer.
|
|
41
|
+
*/
|
|
42
|
+
activityType: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional agent ID to scope the renderer to a particular agent.
|
|
45
|
+
*/
|
|
46
|
+
agentId?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Schema describing the activity content payload.
|
|
49
|
+
*/
|
|
50
|
+
content: StandardSchemaV1<any, TActivityContent>;
|
|
51
|
+
/**
|
|
52
|
+
* React component invoked to render the activity message.
|
|
53
|
+
*/
|
|
54
|
+
render: React.ComponentType<{
|
|
55
|
+
activityType: string;
|
|
56
|
+
content: TActivityContent;
|
|
57
|
+
message: ActivityMessage;
|
|
58
|
+
agent: AbstractAgent | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/v2/types/react-custom-message-renderer.d.ts
|
|
63
|
+
type ReactCustomMessageRendererPosition = "before" | "after";
|
|
64
|
+
interface ReactCustomMessageRenderer {
|
|
65
|
+
agentId?: string;
|
|
66
|
+
render: React.ComponentType<{
|
|
67
|
+
message: Message;
|
|
68
|
+
position: ReactCustomMessageRendererPosition;
|
|
69
|
+
runId: string;
|
|
70
|
+
messageIndex: number;
|
|
71
|
+
messageIndexInRun: number;
|
|
72
|
+
numberOfMessagesInRun: number;
|
|
73
|
+
agentId: string;
|
|
74
|
+
stateSnapshot: any;
|
|
75
|
+
}> | null;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/v2/types/frontend-tool.d.ts
|
|
79
|
+
type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool<T> & {
|
|
80
|
+
render?: ReactToolCallRenderer<T>["render"];
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/v2/types/human-in-the-loop.d.ts
|
|
84
|
+
type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
85
|
+
render: React$1.ComponentType<{
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
args: Partial<T>;
|
|
89
|
+
status: ToolCallStatus.InProgress;
|
|
90
|
+
result: undefined;
|
|
91
|
+
respond: undefined;
|
|
92
|
+
} | {
|
|
93
|
+
name: string;
|
|
94
|
+
description: string;
|
|
95
|
+
args: T;
|
|
96
|
+
status: ToolCallStatus.Executing;
|
|
97
|
+
result: undefined;
|
|
98
|
+
respond: (result: unknown) => Promise<void>;
|
|
99
|
+
} | {
|
|
100
|
+
name: string;
|
|
101
|
+
description: string;
|
|
102
|
+
args: T;
|
|
103
|
+
status: ToolCallStatus.Complete;
|
|
104
|
+
result: string;
|
|
105
|
+
respond: undefined;
|
|
106
|
+
}>;
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/v2/types/interrupt.d.ts
|
|
110
|
+
interface InterruptEvent<TValue = unknown> {
|
|
111
|
+
name: string;
|
|
112
|
+
value: TValue;
|
|
113
|
+
}
|
|
114
|
+
interface InterruptHandlerProps<TValue = unknown> {
|
|
115
|
+
event: InterruptEvent<TValue>;
|
|
116
|
+
resolve: (response: unknown) => void;
|
|
117
|
+
}
|
|
118
|
+
interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
|
|
119
|
+
event: InterruptEvent<TValue>;
|
|
120
|
+
result: TResult;
|
|
121
|
+
resolve: (response: unknown) => void;
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/v2/lib/react-core.d.ts
|
|
125
|
+
interface CopilotKitCoreReactConfig extends CopilotKitCoreConfig {
|
|
126
|
+
renderToolCalls?: ReactToolCallRenderer<any>[];
|
|
127
|
+
renderActivityMessages?: ReactActivityMessageRenderer<any>[];
|
|
128
|
+
renderCustomMessages?: ReactCustomMessageRenderer[];
|
|
129
|
+
}
|
|
130
|
+
interface CopilotKitCoreReactSubscriber extends CopilotKitCoreSubscriber {
|
|
131
|
+
onRenderToolCallsChanged?: (event: {
|
|
132
|
+
copilotkit: CopilotKitCore;
|
|
133
|
+
renderToolCalls: ReactToolCallRenderer<any>[];
|
|
134
|
+
}) => void | Promise<void>;
|
|
135
|
+
onInterruptElementChanged?: (event: {
|
|
136
|
+
copilotkit: CopilotKitCore;
|
|
137
|
+
interruptElement: React$1.ReactElement | null;
|
|
138
|
+
}) => void | Promise<void>;
|
|
139
|
+
}
|
|
140
|
+
declare class CopilotKitCoreReact extends CopilotKitCore {
|
|
141
|
+
private _renderToolCalls;
|
|
142
|
+
private _hookRenderToolCalls;
|
|
143
|
+
private _cachedMergedRenderToolCalls;
|
|
144
|
+
private _renderCustomMessages;
|
|
145
|
+
private _renderActivityMessages;
|
|
146
|
+
private _interruptElement;
|
|
147
|
+
constructor(config: CopilotKitCoreReactConfig);
|
|
148
|
+
get renderCustomMessages(): Readonly<ReactCustomMessageRenderer[]>;
|
|
149
|
+
get renderActivityMessages(): Readonly<ReactActivityMessageRenderer<any>>[];
|
|
150
|
+
get renderToolCalls(): Readonly<ReactToolCallRenderer<any>>[];
|
|
151
|
+
setRenderActivityMessages(renderers: ReactActivityMessageRenderer<any>[]): void;
|
|
152
|
+
setRenderCustomMessages(renderers: ReactCustomMessageRenderer[]): void;
|
|
153
|
+
setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
|
|
154
|
+
addHookRenderToolCall(entry: ReactToolCallRenderer<any>): void;
|
|
155
|
+
removeHookRenderToolCall(name: string, agentId?: string): void;
|
|
156
|
+
private _notifyRenderToolCallsChanged;
|
|
157
|
+
get interruptElement(): React$1.ReactElement | null;
|
|
158
|
+
setInterruptElement(element: React$1.ReactElement | null): void;
|
|
159
|
+
subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription;
|
|
160
|
+
/**
|
|
161
|
+
* Wait for pending React state updates before the follow-up agent run.
|
|
162
|
+
*
|
|
163
|
+
* When a frontend tool handler calls setState(), React 18 batches the update
|
|
164
|
+
* and schedules a commit via its internal scheduler (MessageChannel). The
|
|
165
|
+
* useAgentContext hook registers context via useLayoutEffect, which runs
|
|
166
|
+
* synchronously after React commits that batch.
|
|
167
|
+
*
|
|
168
|
+
* Awaiting a zero-delay timeout yields to the macrotask queue. React's
|
|
169
|
+
* MessageChannel task runs first, committing the pending state and running
|
|
170
|
+
* useLayoutEffect (which updates the context store). The follow-up runAgent
|
|
171
|
+
* call then reads fresh context.
|
|
172
|
+
*/
|
|
173
|
+
waitForPendingFrameworkUpdates(): Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/v2/providers/CopilotChatConfigurationProvider.d.ts
|
|
177
|
+
declare const CopilotChatDefaultLabels: {
|
|
178
|
+
chatInputPlaceholder: string;
|
|
179
|
+
chatInputToolbarStartTranscribeButtonLabel: string;
|
|
180
|
+
chatInputToolbarCancelTranscribeButtonLabel: string;
|
|
181
|
+
chatInputToolbarFinishTranscribeButtonLabel: string;
|
|
182
|
+
chatInputToolbarAddButtonLabel: string;
|
|
183
|
+
chatInputToolbarToolsButtonLabel: string;
|
|
184
|
+
assistantMessageToolbarCopyCodeLabel: string;
|
|
185
|
+
assistantMessageToolbarCopyCodeCopiedLabel: string;
|
|
186
|
+
assistantMessageToolbarCopyMessageLabel: string;
|
|
187
|
+
assistantMessageToolbarThumbsUpLabel: string;
|
|
188
|
+
assistantMessageToolbarThumbsDownLabel: string;
|
|
189
|
+
assistantMessageToolbarReadAloudLabel: string;
|
|
190
|
+
assistantMessageToolbarRegenerateLabel: string;
|
|
191
|
+
userMessageToolbarCopyMessageLabel: string;
|
|
192
|
+
userMessageToolbarEditMessageLabel: string;
|
|
193
|
+
chatDisclaimerText: string;
|
|
194
|
+
chatToggleOpenLabel: string;
|
|
195
|
+
chatToggleCloseLabel: string;
|
|
196
|
+
modalHeaderTitle: string;
|
|
197
|
+
welcomeMessageText: string;
|
|
198
|
+
};
|
|
199
|
+
type CopilotChatLabels = typeof CopilotChatDefaultLabels;
|
|
200
|
+
interface CopilotChatConfigurationValue {
|
|
201
|
+
labels: CopilotChatLabels;
|
|
202
|
+
agentId: string;
|
|
203
|
+
threadId: string;
|
|
204
|
+
isModalOpen: boolean;
|
|
205
|
+
setModalOpen: (open: boolean) => void;
|
|
206
|
+
hasExplicitThreadId: boolean;
|
|
207
|
+
}
|
|
208
|
+
interface CopilotChatConfigurationProviderProps {
|
|
209
|
+
children: ReactNode;
|
|
210
|
+
labels?: Partial<CopilotChatLabels>;
|
|
211
|
+
agentId?: string;
|
|
212
|
+
threadId?: string;
|
|
213
|
+
hasExplicitThreadId?: boolean;
|
|
214
|
+
isModalDefaultOpen?: boolean;
|
|
215
|
+
}
|
|
216
|
+
declare const CopilotChatConfigurationProvider: React$1.FC<CopilotChatConfigurationProviderProps>;
|
|
217
|
+
declare const useCopilotChatConfiguration: () => CopilotChatConfigurationValue | null;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/v2/hooks/use-agent.d.ts
|
|
220
|
+
declare enum UseAgentUpdate {
|
|
221
|
+
OnMessagesChanged = "OnMessagesChanged",
|
|
222
|
+
OnStateChanged = "OnStateChanged",
|
|
223
|
+
OnRunStatusChanged = "OnRunStatusChanged"
|
|
224
|
+
}
|
|
225
|
+
interface UseAgentProps {
|
|
226
|
+
agentId?: string;
|
|
227
|
+
updates?: UseAgentUpdate[];
|
|
228
|
+
/**
|
|
229
|
+
* Throttle interval (in milliseconds) for re-renders triggered by
|
|
230
|
+
* `onMessagesChanged` and `onStateChanged` notifications. Useful to reduce
|
|
231
|
+
* re-render frequency during high-frequency streaming updates.
|
|
232
|
+
*
|
|
233
|
+
* Uses a leading+trailing pattern with a shared window — first update
|
|
234
|
+
* fires immediately, subsequent updates within the window are coalesced,
|
|
235
|
+
* and a trailing timer ensures the most recent update fires after the
|
|
236
|
+
* window expires. See `CopilotKitCore.subscribeToAgentWithOptions` in `@copilotkit/core`
|
|
237
|
+
* for details.
|
|
238
|
+
*
|
|
239
|
+
* Resolved as: `throttleMs ?? provider defaultThrottleMs ?? 0`.
|
|
240
|
+
* Passing `throttleMs={0}` explicitly disables throttling even when the
|
|
241
|
+
* provider specifies a non-zero `defaultThrottleMs`.
|
|
242
|
+
*
|
|
243
|
+
* Run lifecycle callbacks (`onRunInitialized`, `onRunFinalized`,
|
|
244
|
+
* `onRunFailed`, `onRunErrorEvent`) always fire immediately.
|
|
245
|
+
*
|
|
246
|
+
* @default undefined
|
|
247
|
+
* When unset, inherits from the provider's `defaultThrottleMs`;
|
|
248
|
+
* if that is also unset, the effective value is `0` (no throttle).
|
|
249
|
+
*/
|
|
250
|
+
throttleMs?: number;
|
|
251
|
+
}
|
|
252
|
+
declare function useAgent({
|
|
253
|
+
agentId,
|
|
254
|
+
updates,
|
|
255
|
+
throttleMs
|
|
256
|
+
}?: UseAgentProps): {
|
|
257
|
+
agent: AbstractAgent;
|
|
258
|
+
};
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/v2/hooks/use-frontend-tool.d.ts
|
|
261
|
+
declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>, deps?: ReadonlyArray<unknown>): void;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/v2/hooks/use-component.d.ts
|
|
264
|
+
type InferRenderProps<T> = T extends StandardSchemaV1 ? InferSchemaOutput<T> : any;
|
|
265
|
+
/**
|
|
266
|
+
* Registers a React component as a frontend tool renderer in chat.
|
|
267
|
+
*
|
|
268
|
+
* This hook is a convenience wrapper around `useFrontendTool` that:
|
|
269
|
+
* - builds a model-facing tool description,
|
|
270
|
+
* - forwards optional schema parameters (any Standard Schema V1 compatible library),
|
|
271
|
+
* - renders your component with tool call parameters.
|
|
272
|
+
*
|
|
273
|
+
* Use this when you want to display a typed visual component for a tool call
|
|
274
|
+
* without manually wiring a full frontend tool object.
|
|
275
|
+
*
|
|
276
|
+
* When `parameters` is provided, render props are inferred from the schema.
|
|
277
|
+
* When omitted, the render component may accept any props.
|
|
278
|
+
*
|
|
279
|
+
* @typeParam TSchema - Schema describing tool parameters, or `undefined` when no schema is given.
|
|
280
|
+
* @param config - Tool registration config.
|
|
281
|
+
* @param deps - Optional dependencies to refresh registration (same semantics as `useEffect`).
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```tsx
|
|
285
|
+
* // Without parameters — render accepts any props
|
|
286
|
+
* useComponent({
|
|
287
|
+
* name: "showGreeting",
|
|
288
|
+
* render: ({ message }: { message: string }) => <div>{message}</div>,
|
|
289
|
+
* });
|
|
290
|
+
* ```
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```tsx
|
|
294
|
+
* // With parameters — render props inferred from schema
|
|
295
|
+
* useComponent({
|
|
296
|
+
* name: "showWeatherCard",
|
|
297
|
+
* parameters: z.object({ city: z.string() }),
|
|
298
|
+
* render: ({ city }) => <div>{city}</div>,
|
|
299
|
+
* });
|
|
300
|
+
* ```
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```tsx
|
|
304
|
+
* useComponent(
|
|
305
|
+
* {
|
|
306
|
+
* name: "renderProfile",
|
|
307
|
+
* parameters: z.object({ userId: z.string() }),
|
|
308
|
+
* render: ProfileCard,
|
|
309
|
+
* agentId: "support-agent",
|
|
310
|
+
* },
|
|
311
|
+
* [selectedAgentId],
|
|
312
|
+
* );
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
declare function useComponent<TSchema extends StandardSchemaV1 | undefined = undefined>(config: {
|
|
316
|
+
name: string;
|
|
317
|
+
description?: string;
|
|
318
|
+
parameters?: TSchema;
|
|
319
|
+
render: ComponentType<NoInfer<InferRenderProps<TSchema>>>;
|
|
320
|
+
agentId?: string;
|
|
321
|
+
}, deps?: ReadonlyArray<unknown>): void;
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/v2/hooks/use-human-in-the-loop.d.ts
|
|
324
|
+
declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/v2/hooks/use-interrupt.d.ts
|
|
327
|
+
type InterruptHandlerFn<TValue, TResult> = (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
328
|
+
type InterruptResultFromHandler<THandler> = THandler extends ((...args: never[]) => infer TResult) ? TResult extends PromiseLike<infer TResolved> ? TResolved | null : TResult | null : null;
|
|
329
|
+
type InterruptResult<TValue, TResult> = InterruptResultFromHandler<InterruptHandlerFn<TValue, TResult>>;
|
|
330
|
+
type InterruptRenderInChat = boolean | undefined;
|
|
331
|
+
type UseInterruptReturn<TRenderInChat extends InterruptRenderInChat> = TRenderInChat extends false ? React$1.ReactElement | null : TRenderInChat extends true | undefined ? void : React$1.ReactElement | null | void;
|
|
332
|
+
/**
|
|
333
|
+
* Configuration options for `useInterrupt`.
|
|
334
|
+
*/
|
|
335
|
+
interface UseInterruptConfigBase<TValue = unknown, TResult = never> {
|
|
336
|
+
/**
|
|
337
|
+
* Render function for the interrupt UI.
|
|
338
|
+
*
|
|
339
|
+
* This is called once an interrupt is finalized and accepted by `enabled` (if provided).
|
|
340
|
+
* Use `resolve` from render props to resume the agent run with user input.
|
|
341
|
+
*/
|
|
342
|
+
render: (props: InterruptRenderProps<TValue, InterruptResult<TValue, TResult>>) => React$1.ReactElement;
|
|
343
|
+
/**
|
|
344
|
+
* Optional pre-render handler invoked when an interrupt is received.
|
|
345
|
+
*
|
|
346
|
+
* Return either a sync value or an async value to pass into `render` as `result`.
|
|
347
|
+
* Rejecting/throwing falls back to `result = null`.
|
|
348
|
+
*/
|
|
349
|
+
handler?: InterruptHandlerFn<TValue, TResult>;
|
|
350
|
+
/**
|
|
351
|
+
* Optional predicate to filter which interrupts should be handled by this hook.
|
|
352
|
+
* Return `false` to ignore an interrupt.
|
|
353
|
+
*/
|
|
354
|
+
enabled?: (event: InterruptEvent<TValue>) => boolean;
|
|
355
|
+
/** Optional agent id. Defaults to the current configured chat agent. */
|
|
356
|
+
agentId?: string;
|
|
357
|
+
}
|
|
358
|
+
type UseInterruptConfig<TValue = unknown, TResult = never, TRenderInChat extends InterruptRenderInChat = undefined> = UseInterruptConfigBase<TValue, TResult> & {
|
|
359
|
+
/** When true (default), the interrupt UI renders inside `<CopilotChat>` automatically. Set to false to render it yourself. */renderInChat?: TRenderInChat;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Handles agent interrupts (`on_interrupt`) with optional filtering, preprocessing, and resume behavior.
|
|
363
|
+
*
|
|
364
|
+
* The hook listens to custom events on the active agent, stores interrupt payloads per run,
|
|
365
|
+
* and surfaces a render callback once the run finalizes. Call `resolve` from your UI to resume
|
|
366
|
+
* execution with user-provided data.
|
|
367
|
+
*
|
|
368
|
+
* - `renderInChat: true` (default): the element is published into `<CopilotChat>` and this hook returns `void`.
|
|
369
|
+
* - `renderInChat: false`: the hook returns the interrupt element so you can place it anywhere in your component tree.
|
|
370
|
+
*
|
|
371
|
+
* `event.value` is typed as `any` since the interrupt payload shape depends on your agent.
|
|
372
|
+
* Type-narrow it in your callbacks (e.g. `handler`, `enabled`, `render`) as needed.
|
|
373
|
+
*
|
|
374
|
+
* @typeParam TResult - Inferred from `handler` return type. Exposed as `result` in `render`.
|
|
375
|
+
* @param config - Interrupt configuration (renderer, optional handler/filter, and render mode).
|
|
376
|
+
* @returns When `renderInChat` is `false`, returns the interrupt element (or `null` when idle).
|
|
377
|
+
* Otherwise returns `void` and publishes the element into chat. In `render`, `result` is always
|
|
378
|
+
* either the handler's resolved return value or `null` (including when no handler is provided,
|
|
379
|
+
* when filtering skips the interrupt, or when handler execution fails).
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```tsx
|
|
383
|
+
* import { useInterrupt } from "@copilotkit/react-core/v2";
|
|
384
|
+
*
|
|
385
|
+
* function InterruptUI() {
|
|
386
|
+
* useInterrupt({
|
|
387
|
+
* render: ({ event, resolve }) => (
|
|
388
|
+
* <div>
|
|
389
|
+
* <p>{event.value.question}</p>
|
|
390
|
+
* <button onClick={() => resolve({ approved: true })}>Approve</button>
|
|
391
|
+
* <button onClick={() => resolve({ approved: false })}>Reject</button>
|
|
392
|
+
* </div>
|
|
393
|
+
* ),
|
|
394
|
+
* });
|
|
395
|
+
*
|
|
396
|
+
* return null;
|
|
397
|
+
* }
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```tsx
|
|
402
|
+
* import { useInterrupt } from "@copilotkit/react-core/v2";
|
|
403
|
+
*
|
|
404
|
+
* function CustomPanel() {
|
|
405
|
+
* const interruptElement = useInterrupt({
|
|
406
|
+
* renderInChat: false,
|
|
407
|
+
* enabled: (event) => event.value.startsWith("approval:"),
|
|
408
|
+
* handler: async ({ event }) => ({ label: event.value.toUpperCase() }),
|
|
409
|
+
* render: ({ event, result, resolve }) => (
|
|
410
|
+
* <aside>
|
|
411
|
+
* <strong>{result?.label ?? ""}</strong>
|
|
412
|
+
* <button onClick={() => resolve({ value: event.value })}>Continue</button>
|
|
413
|
+
* </aside>
|
|
414
|
+
* ),
|
|
415
|
+
* });
|
|
416
|
+
*
|
|
417
|
+
* return <>{interruptElement}</>;
|
|
418
|
+
* }
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
declare function useInterrupt<TResult = never, TRenderInChat extends InterruptRenderInChat = undefined>(config: UseInterruptConfig<any, TResult, TRenderInChat>): UseInterruptReturn<TRenderInChat>;
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/v2/hooks/use-suggestions.d.ts
|
|
424
|
+
interface UseSuggestionsOptions {
|
|
425
|
+
agentId?: string;
|
|
426
|
+
}
|
|
427
|
+
interface UseSuggestionsResult {
|
|
428
|
+
suggestions: Suggestion[];
|
|
429
|
+
reloadSuggestions: () => void;
|
|
430
|
+
clearSuggestions: () => void;
|
|
431
|
+
isLoading: boolean;
|
|
432
|
+
}
|
|
433
|
+
declare function useSuggestions({
|
|
434
|
+
agentId
|
|
435
|
+
}?: UseSuggestionsOptions): UseSuggestionsResult;
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region src/v2/hooks/use-configure-suggestions.d.ts
|
|
438
|
+
type StaticSuggestionInput = Omit<Suggestion, "isLoading"> & Partial<Pick<Suggestion, "isLoading">>;
|
|
439
|
+
type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig, "suggestions"> & {
|
|
440
|
+
suggestions: StaticSuggestionInput[];
|
|
441
|
+
};
|
|
442
|
+
type SuggestionsConfigInput = DynamicSuggestionsConfig | StaticSuggestionsConfigInput;
|
|
443
|
+
declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, deps?: ReadonlyArray<unknown>): void;
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/v2/hooks/use-agent-context.d.ts
|
|
446
|
+
/**
|
|
447
|
+
* Represents any value that can be serialized to JSON.
|
|
448
|
+
*/
|
|
449
|
+
type JsonSerializable = string | number | boolean | null | JsonSerializable[] | {
|
|
450
|
+
[key: string]: JsonSerializable;
|
|
451
|
+
};
|
|
452
|
+
/**
|
|
453
|
+
* Context configuration for useAgentContext.
|
|
454
|
+
* Accepts any JSON-serializable value which will be converted to a string.
|
|
455
|
+
*/
|
|
456
|
+
interface AgentContextInput {
|
|
457
|
+
/** A human-readable description of what this context represents */
|
|
458
|
+
description: string;
|
|
459
|
+
/** The context value - will be converted to a JSON string if not already a string */
|
|
460
|
+
value: JsonSerializable;
|
|
461
|
+
}
|
|
462
|
+
declare function useAgentContext(context: AgentContextInput): void;
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/v2/hooks/use-threads.d.ts
|
|
465
|
+
/**
|
|
466
|
+
* A conversation thread managed by the Intelligence platform.
|
|
467
|
+
*
|
|
468
|
+
* Each thread has a unique `id`, an optional human-readable `name`, and
|
|
469
|
+
* timestamp fields tracking creation and update times.
|
|
470
|
+
*/
|
|
471
|
+
interface Thread {
|
|
472
|
+
id: string;
|
|
473
|
+
agentId: string;
|
|
474
|
+
name: string | null;
|
|
475
|
+
archived: boolean;
|
|
476
|
+
createdAt: string;
|
|
477
|
+
updatedAt: string;
|
|
478
|
+
/**
|
|
479
|
+
* ISO-8601 timestamp of the most recent agent run on this thread. Absent
|
|
480
|
+
* when the thread has never been run. Prefer this over `updatedAt` for
|
|
481
|
+
* user-facing "last activity" displays — it is not bumped by metadata-only
|
|
482
|
+
* actions like rename or archive.
|
|
483
|
+
*/
|
|
484
|
+
lastRunAt?: string;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Configuration for the {@link useThreads} hook.
|
|
488
|
+
*
|
|
489
|
+
* Thread operations are scoped to the runtime-authenticated user and the
|
|
490
|
+
* provided agent on the Intelligence platform.
|
|
491
|
+
*/
|
|
492
|
+
interface UseThreadsInput {
|
|
493
|
+
/** The ID of the agent whose threads to list and manage. */
|
|
494
|
+
agentId: string;
|
|
495
|
+
/** When `true`, archived threads are included in the list. Defaults to `false`. */
|
|
496
|
+
includeArchived?: boolean;
|
|
497
|
+
/** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */
|
|
498
|
+
limit?: number;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Return value of the {@link useThreads} hook.
|
|
502
|
+
*
|
|
503
|
+
* The `threads` array is kept in sync with the platform via a realtime
|
|
504
|
+
* WebSocket subscription (when available) and is sorted most-recently-updated
|
|
505
|
+
* first. Mutations reject with an `Error` if the platform request fails.
|
|
506
|
+
*/
|
|
507
|
+
interface UseThreadsResult {
|
|
508
|
+
/**
|
|
509
|
+
* Threads for the current user/agent pair, sorted by most recently
|
|
510
|
+
* updated first. Updated in realtime when the platform pushes metadata
|
|
511
|
+
* events. Includes archived threads only when `includeArchived` is set.
|
|
512
|
+
*/
|
|
513
|
+
threads: Thread[];
|
|
514
|
+
/**
|
|
515
|
+
* `true` while the initial thread list is being fetched from the platform.
|
|
516
|
+
* Subsequent realtime updates do not re-enter the loading state.
|
|
517
|
+
*/
|
|
518
|
+
isLoading: boolean;
|
|
519
|
+
/**
|
|
520
|
+
* The most recent error from fetching threads or executing a mutation,
|
|
521
|
+
* or `null` when there is no error. Reset to `null` on the next
|
|
522
|
+
* successful fetch.
|
|
523
|
+
*/
|
|
524
|
+
error: Error | null;
|
|
525
|
+
/**
|
|
526
|
+
* `true` when there are more threads available to fetch via
|
|
527
|
+
* {@link fetchMoreThreads}. Only meaningful when `limit` is set.
|
|
528
|
+
*/
|
|
529
|
+
hasMoreThreads: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* `true` while a subsequent page of threads is being fetched.
|
|
532
|
+
*/
|
|
533
|
+
isFetchingMoreThreads: boolean;
|
|
534
|
+
/**
|
|
535
|
+
* Fetch the next page of threads. No-op when {@link hasMoreThreads} is
|
|
536
|
+
* `false` or a fetch is already in progress.
|
|
537
|
+
*/
|
|
538
|
+
fetchMoreThreads: () => void;
|
|
539
|
+
/**
|
|
540
|
+
* Rename a thread on the platform.
|
|
541
|
+
* Resolves when the server confirms the update; rejects on failure.
|
|
542
|
+
*/
|
|
543
|
+
renameThread: (threadId: string, name: string) => Promise<void>;
|
|
544
|
+
/**
|
|
545
|
+
* Archive a thread on the platform.
|
|
546
|
+
* Archived threads are excluded from subsequent list results.
|
|
547
|
+
* Resolves when the server confirms the update; rejects on failure.
|
|
548
|
+
*/
|
|
549
|
+
archiveThread: (threadId: string) => Promise<void>;
|
|
550
|
+
/**
|
|
551
|
+
* Permanently delete a thread from the platform.
|
|
552
|
+
* This is irreversible. Resolves when the server confirms deletion;
|
|
553
|
+
* rejects on failure.
|
|
554
|
+
*/
|
|
555
|
+
deleteThread: (threadId: string) => Promise<void>;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* React hook for listing and managing Intelligence platform threads.
|
|
559
|
+
*
|
|
560
|
+
* On mount the hook fetches the thread list for the runtime-authenticated user
|
|
561
|
+
* and the given `agentId`. When the Intelligence platform exposes a WebSocket
|
|
562
|
+
* URL, it also opens a realtime subscription so the `threads` array stays
|
|
563
|
+
* current without polling — thread creates, renames, archives, and deletes
|
|
564
|
+
* from any client are reflected immediately.
|
|
565
|
+
*
|
|
566
|
+
* Mutation methods (`renameThread`, `archiveThread`, `deleteThread`) return
|
|
567
|
+
* promises that resolve once the platform confirms the operation and reject
|
|
568
|
+
* with an `Error` on failure.
|
|
569
|
+
*
|
|
570
|
+
* @param input - Agent identifier and optional list controls.
|
|
571
|
+
* @returns Thread list state and stable mutation callbacks.
|
|
572
|
+
*
|
|
573
|
+
* @example
|
|
574
|
+
* ```tsx
|
|
575
|
+
* import { useThreads } from "@copilotkit/react-core";
|
|
576
|
+
*
|
|
577
|
+
* function ThreadList() {
|
|
578
|
+
* const { threads, isLoading, renameThread, deleteThread } = useThreads({
|
|
579
|
+
* agentId: "agent-1",
|
|
580
|
+
* });
|
|
581
|
+
*
|
|
582
|
+
* if (isLoading) return <p>Loading…</p>;
|
|
583
|
+
*
|
|
584
|
+
* return (
|
|
585
|
+
* <ul>
|
|
586
|
+
* {threads.map((t) => (
|
|
587
|
+
* <li key={t.id}>
|
|
588
|
+
* {t.name ?? "Untitled"}
|
|
589
|
+
* <button onClick={() => renameThread(t.id, "New name")}>Rename</button>
|
|
590
|
+
* <button onClick={() => deleteThread(t.id)}>Delete</button>
|
|
591
|
+
* </li>
|
|
592
|
+
* ))}
|
|
593
|
+
* </ul>
|
|
594
|
+
* );
|
|
595
|
+
* }
|
|
596
|
+
* ```
|
|
597
|
+
*/
|
|
598
|
+
declare function useThreads({
|
|
599
|
+
agentId,
|
|
600
|
+
includeArchived,
|
|
601
|
+
limit
|
|
602
|
+
}: UseThreadsInput): UseThreadsResult;
|
|
603
|
+
//#endregion
|
|
604
|
+
export { type AgentContextInput, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatDefaultLabels, type CopilotChatLabels, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type JsonSerializable, type Thread, type UseAgentUpdate, type UseInterruptConfig, type UseThreadsInput, type UseThreadsResult, useAgent, useAgentContext, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useFrontendTool, useHumanInTheLoop, useInterrupt, useSuggestions, useThreads };
|
|
605
|
+
//# sourceMappingURL=headless.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.d.cts","names":[],"sources":["../../src/v2/types/react-tool-call-renderer.ts","../../src/v2/types/react-activity-message-renderer.ts","../../src/v2/types/react-custom-message-renderer.ts","../../src/v2/types/frontend-tool.ts","../../src/v2/types/human-in-the-loop.ts","../../src/v2/types/interrupt.ts","../../src/v2/lib/react-core.ts","../../src/v2/providers/CopilotChatConfigurationProvider.tsx","../../src/v2/hooks/use-agent.tsx","../../src/v2/hooks/use-frontend-tool.tsx","../../src/v2/hooks/use-component.tsx","../../src/v2/hooks/use-human-in-the-loop.tsx","../../src/v2/hooks/use-interrupt.tsx","../../src/v2/hooks/use-suggestions.tsx","../../src/v2/hooks/use-configure-suggestions.tsx","../../src/v2/hooks/use-agent-context.tsx","../../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