@copilotkit/react-core 1.84.2-canary.openbot-intel-fixes → 1.86.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/MarkdownSurfaces-BCVdnDAk.cjs +161 -0
- package/dist/MarkdownSurfaces-BCVdnDAk.cjs.map +1 -0
- package/dist/MarkdownSurfaces-CjJduaJR.mjs +149 -0
- package/dist/MarkdownSurfaces-CjJduaJR.mjs.map +1 -0
- package/dist/{MarkdownSurfaces-3cGU5_0H.cjs → chat-BnsrQ0VS.cjs} +667 -320
- package/dist/chat-BnsrQ0VS.cjs.map +1 -0
- package/dist/{MarkdownSurfaces-D-W4f9Dy.mjs → chat-IWySXWXP.mjs} +647 -312
- package/dist/chat-IWySXWXP.mjs.map +1 -0
- package/dist/{copilotkit-UHD9sXsS.mjs → copilotkit-B1OLgEU8.mjs} +6 -354
- package/dist/copilotkit-B1OLgEU8.mjs.map +1 -0
- package/dist/{copilotkit-Dn4PbHJV.d.mts → copilotkit-C7G95NO-.d.mts} +4 -4
- package/dist/{copilotkit-Dn4PbHJV.d.mts.map → copilotkit-C7G95NO-.d.mts.map} +1 -1
- package/dist/{copilotkit-DYtl9zj0.cjs → copilotkit-Ca0IcTZU.cjs} +79 -427
- package/dist/copilotkit-Ca0IcTZU.cjs.map +1 -0
- package/dist/{copilotkit-CuTAoQF2.d.cts → copilotkit-DwD7D6jJ.d.cts} +2 -2
- package/dist/{copilotkit-CuTAoQF2.d.cts.map → copilotkit-DwD7D6jJ.d.cts.map} +1 -1
- package/dist/hooks-DMSkcNOl.d.cts +89 -0
- package/dist/hooks-DMSkcNOl.d.cts.map +1 -0
- package/dist/hooks-EwGvqYsW.d.mts +89 -0
- package/dist/hooks-EwGvqYsW.d.mts.map +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.umd.js +645 -140
- package/dist/index.umd.js.map +1 -1
- package/dist/refs-DL7ITFFD.cjs +43 -0
- package/dist/refs-DL7ITFFD.cjs.map +1 -0
- package/dist/refs-DiZXJ63p.mjs +31 -0
- package/dist/refs-DiZXJ63p.mjs.map +1 -0
- package/dist/{runtime-context-Er5UIbZA.d.mts → runtime-context-B4fKyzo6.d.mts} +31 -9
- package/dist/runtime-context-B4fKyzo6.d.mts.map +1 -0
- package/dist/{runtime-context-DrVNUYLi.d.cts → runtime-context-Da7T5vy4.d.cts} +31 -9
- package/dist/runtime-context-Da7T5vy4.d.cts.map +1 -0
- package/dist/use-generative-ui-root-CaTyBFNR.cjs +390 -0
- package/dist/use-generative-ui-root-CaTyBFNR.cjs.map +1 -0
- package/dist/use-generative-ui-root-WI9ERMpo.mjs +385 -0
- package/dist/use-generative-ui-root-WI9ERMpo.mjs.map +1 -0
- package/dist/v2/generative-ui/native.cjs +66 -0
- package/dist/v2/generative-ui/native.cjs.map +1 -0
- package/dist/v2/generative-ui/native.d.cts +155 -0
- package/dist/v2/generative-ui/native.d.cts.map +1 -0
- package/dist/v2/generative-ui/native.d.mts +155 -0
- package/dist/v2/generative-ui/native.d.mts.map +1 -0
- package/dist/v2/generative-ui/native.mjs +24 -0
- package/dist/v2/generative-ui/native.mjs.map +1 -0
- package/dist/v2/generative-ui.cjs +45 -70
- package/dist/v2/generative-ui.cjs.map +1 -1
- package/dist/v2/generative-ui.d.cts +229 -308
- package/dist/v2/generative-ui.d.cts.map +1 -1
- package/dist/v2/generative-ui.d.mts +229 -308
- package/dist/v2/generative-ui.d.mts.map +1 -1
- package/dist/v2/generative-ui.mjs +4 -29
- package/dist/v2/generative-ui.mjs.map +1 -1
- package/dist/v2/headless.d.cts +185 -294
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/index.cjs +5 -5
- 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 +645 -140
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +15 -11
- package/dist/MarkdownSurfaces-3cGU5_0H.cjs.map +0 -1
- package/dist/MarkdownSurfaces-D-W4f9Dy.mjs.map +0 -1
- package/dist/copilotkit-DYtl9zj0.cjs.map +0 -1
- package/dist/copilotkit-UHD9sXsS.mjs.map +0 -1
- package/dist/runtime-context-DrVNUYLi.d.cts.map +0 -1
- package/dist/runtime-context-Er5UIbZA.d.mts.map +0 -1
package/dist/v2/headless.d.cts
CHANGED
|
@@ -1,300 +1,10 @@
|
|
|
1
|
+
import { CopilotKitCoreReact, CopilotKitCoreReactConfig, useCopilotKit } from "@copilotkit/react-core/v2/context";
|
|
1
2
|
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, AgentCapabilities, Message, ToolCall, ToolMessage } from "@ag-ui/core";
|
|
5
3
|
import { AbstractAgent, Interrupt, ResumeEntry, ResumeStatus, RunAgentResult } from "@ag-ui/client";
|
|
4
|
+
import { DynamicSuggestionsConfig, FrontendTool, StaticSuggestionsConfig, Suggestion, ToolCallStatus } from "@copilotkit/core";
|
|
5
|
+
import { InferSchemaOutput, StandardSchemaV1 } from "@copilotkit/shared";
|
|
6
|
+
import { AgentCapabilities, ToolCall, ToolMessage } from "@ag-ui/core";
|
|
6
7
|
|
|
7
|
-
//#region src/v2/types/react-tool-call-renderer.d.ts
|
|
8
|
-
interface ReactToolCallRenderer<T = unknown> {
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Schema describing the tool arguments. Optional — renderers registered for
|
|
12
|
-
* tools without parameters (e.g. HITL confirm dialogs) have no schema.
|
|
13
|
-
*/
|
|
14
|
-
args?: StandardSchemaV1<any, T>;
|
|
15
|
-
/**
|
|
16
|
-
* Optional agent ID to constrain this tool renderer to a specific agent.
|
|
17
|
-
* If specified, this renderer will only be used for the specified agent.
|
|
18
|
-
*/
|
|
19
|
-
agentId?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Whether calls this renderer draws join the chat's tool-call groups (see
|
|
22
|
-
* `toolCallDisplay` on `CopilotChatMessageView`). CopilotKit's built-in card
|
|
23
|
-
* sets it; a renderer that leaves it unset always shows its calls on their
|
|
24
|
-
* own, since the chat can't tell what it draws (it may even draw nothing).
|
|
25
|
-
*/
|
|
26
|
-
group?: boolean;
|
|
27
|
-
render: React.ComponentType<{
|
|
28
|
-
name: string;
|
|
29
|
-
toolCallId: string;
|
|
30
|
-
args: Partial<T>;
|
|
31
|
-
status: ToolCallStatus.InProgress;
|
|
32
|
-
result: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
name: string;
|
|
35
|
-
toolCallId: string;
|
|
36
|
-
args: T;
|
|
37
|
-
status: ToolCallStatus.Executing;
|
|
38
|
-
result: undefined;
|
|
39
|
-
} | {
|
|
40
|
-
name: string;
|
|
41
|
-
toolCallId: string;
|
|
42
|
-
args: T;
|
|
43
|
-
status: ToolCallStatus.Complete;
|
|
44
|
-
result: string;
|
|
45
|
-
}>;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/v2/types/react-activity-message-renderer.d.ts
|
|
49
|
-
interface ReactActivityMessageRenderer<TActivityContent> {
|
|
50
|
-
/**
|
|
51
|
-
* Activity type to match when rendering. Use "*" as a wildcard renderer.
|
|
52
|
-
*/
|
|
53
|
-
activityType: string;
|
|
54
|
-
/**
|
|
55
|
-
* Optional agent ID to scope the renderer to a particular agent.
|
|
56
|
-
*/
|
|
57
|
-
agentId?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Schema describing the activity content payload.
|
|
60
|
-
*/
|
|
61
|
-
content: StandardSchemaV1<any, TActivityContent>;
|
|
62
|
-
/**
|
|
63
|
-
* React component invoked to render the activity message.
|
|
64
|
-
*/
|
|
65
|
-
render: React.ComponentType<{
|
|
66
|
-
activityType: string;
|
|
67
|
-
content: TActivityContent;
|
|
68
|
-
message: ActivityMessage;
|
|
69
|
-
agent: AbstractAgent | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/v2/types/react-custom-message-renderer.d.ts
|
|
74
|
-
type ReactCustomMessageRendererPosition = "before" | "after";
|
|
75
|
-
interface ReactCustomMessageRenderer {
|
|
76
|
-
agentId?: string;
|
|
77
|
-
render: React.ComponentType<{
|
|
78
|
-
message: Message;
|
|
79
|
-
position: ReactCustomMessageRendererPosition;
|
|
80
|
-
runId: string;
|
|
81
|
-
messageIndex: number;
|
|
82
|
-
messageIndexInRun: number;
|
|
83
|
-
numberOfMessagesInRun: number;
|
|
84
|
-
agentId: string;
|
|
85
|
-
stateSnapshot: any;
|
|
86
|
-
}> | null;
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/v2/types/frontend-tool.d.ts
|
|
90
|
-
type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool<T> & {
|
|
91
|
-
render?: ReactToolCallRenderer<T>["render"];
|
|
92
|
-
};
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/v2/types/human-in-the-loop.d.ts
|
|
95
|
-
type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
96
|
-
/**
|
|
97
|
-
* Render the human-in-the-loop UI for this tool call.
|
|
98
|
-
*
|
|
99
|
-
* Beyond the tool call's `args`/`status`/`result`, the render props carry
|
|
100
|
-
* attribution:
|
|
101
|
-
* - `toolCallId` — the AG-UI tool call id, unique per interrupt. It is the
|
|
102
|
-
* stable key for correlating this interrupt with runtime (sub)agent
|
|
103
|
-
* attribution — e.g. the `agentId` reported by `onToolExecutionStart`, or
|
|
104
|
-
* per-run attribution stamped on the event stream — so the UI can label
|
|
105
|
-
* the interrupt with the agent that actually raised it.
|
|
106
|
-
* - `agentId` — the agent this tool was *registered* to (the tool's own
|
|
107
|
-
* `agentId`), or `undefined` for an unscoped tool. This is the static
|
|
108
|
-
* registration scope; it is NOT necessarily the runtime (sub)agent that
|
|
109
|
-
* raised the interrupt. For runtime attribution, correlate `toolCallId`
|
|
110
|
-
* with the event-stream/`onToolExecutionStart` agent id.
|
|
111
|
-
*/
|
|
112
|
-
render: React$1.ComponentType<{
|
|
113
|
-
name: string;
|
|
114
|
-
description: string;
|
|
115
|
-
toolCallId: string;
|
|
116
|
-
agentId?: string;
|
|
117
|
-
args: Partial<T>;
|
|
118
|
-
status: ToolCallStatus.InProgress;
|
|
119
|
-
result: undefined;
|
|
120
|
-
respond: undefined;
|
|
121
|
-
} | {
|
|
122
|
-
name: string;
|
|
123
|
-
description: string;
|
|
124
|
-
toolCallId: string;
|
|
125
|
-
agentId?: string;
|
|
126
|
-
args: T;
|
|
127
|
-
status: ToolCallStatus.Executing;
|
|
128
|
-
result: undefined;
|
|
129
|
-
respond: (result: unknown) => Promise<void>;
|
|
130
|
-
} | {
|
|
131
|
-
name: string;
|
|
132
|
-
description: string;
|
|
133
|
-
toolCallId: string;
|
|
134
|
-
agentId?: string;
|
|
135
|
-
args: T;
|
|
136
|
-
status: ToolCallStatus.Complete;
|
|
137
|
-
result: string;
|
|
138
|
-
respond: undefined;
|
|
139
|
-
}>;
|
|
140
|
-
};
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/v2/types/defineToolCallRenderer.d.ts
|
|
143
|
-
/**
|
|
144
|
-
* Helper to define a type-safe tool call renderer entry.
|
|
145
|
-
* - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
|
|
146
|
-
* - Derives `args` type from the provided schema (any Standard Schema V1 compatible library).
|
|
147
|
-
* - Ensures the render function param type exactly matches ReactToolCallRenderer<T>["render"]'s param.
|
|
148
|
-
* - For wildcard tools (name: "*"), args is optional and defaults to z.any()
|
|
149
|
-
*/
|
|
150
|
-
type RenderProps<T> = {
|
|
151
|
-
name: string;
|
|
152
|
-
toolCallId: string;
|
|
153
|
-
args: Partial<T>;
|
|
154
|
-
status: ToolCallStatus.InProgress;
|
|
155
|
-
result: undefined;
|
|
156
|
-
} | {
|
|
157
|
-
name: string;
|
|
158
|
-
toolCallId: string;
|
|
159
|
-
args: T;
|
|
160
|
-
status: ToolCallStatus.Executing;
|
|
161
|
-
result: undefined;
|
|
162
|
-
} | {
|
|
163
|
-
name: string;
|
|
164
|
-
toolCallId: string;
|
|
165
|
-
args: T;
|
|
166
|
-
status: ToolCallStatus.Complete;
|
|
167
|
-
result: string;
|
|
168
|
-
};
|
|
169
|
-
declare function defineToolCallRenderer(def: {
|
|
170
|
-
name: "*";
|
|
171
|
-
render: (props: RenderProps<any>) => React$1.ReactElement | null;
|
|
172
|
-
agentId?: string;
|
|
173
|
-
group?: boolean;
|
|
174
|
-
}): ReactToolCallRenderer<any>;
|
|
175
|
-
declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
|
|
176
|
-
name: string;
|
|
177
|
-
args: S;
|
|
178
|
-
render: (props: RenderProps<InferSchemaOutput<S>>) => React$1.ReactElement | null;
|
|
179
|
-
agentId?: string;
|
|
180
|
-
group?: boolean;
|
|
181
|
-
}): ReactToolCallRenderer<InferSchemaOutput<S>>;
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region src/v2/types/interrupt.d.ts
|
|
184
|
-
/** Legacy custom-event interrupt payload (agent emits a custom `on_interrupt` event). */
|
|
185
|
-
interface InterruptEvent<TValue = unknown> {
|
|
186
|
-
name: string;
|
|
187
|
-
value: TValue;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Resolve the agent with user input for an interrupt.
|
|
191
|
-
*
|
|
192
|
-
* - Standard interrupts: records `{ status: "resolved", payload }` for the target
|
|
193
|
-
* interrupt (defaults to the primary one). Resumes once every open interrupt is
|
|
194
|
-
* addressed; returns the resume run result, or `void` while still awaiting others.
|
|
195
|
-
* - Legacy interrupts: resumes immediately via `command.resume = payload`.
|
|
196
|
-
*/
|
|
197
|
-
type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
198
|
-
/**
|
|
199
|
-
* Cancel an interrupt.
|
|
200
|
-
*
|
|
201
|
-
* - Standard interrupts: records `{ status: "cancelled" }` for the target interrupt
|
|
202
|
-
* (defaults to the primary one), then resumes once all are addressed.
|
|
203
|
-
* - Legacy interrupts: dismisses the pending interrupt without resuming.
|
|
204
|
-
*/
|
|
205
|
-
type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
206
|
-
interface InterruptHandlerProps<TValue = unknown> {
|
|
207
|
-
/**
|
|
208
|
-
* Legacy event shape (`{ name, value }`). Always present for back-compat: for
|
|
209
|
-
* standard interrupts, `value` is the primary `Interrupt` and `name` is `"on_interrupt"`.
|
|
210
|
-
* Prefer `interrupt` / `interrupts` for standard interrupts.
|
|
211
|
-
*/
|
|
212
|
-
event: InterruptEvent<TValue>;
|
|
213
|
-
/** Primary standard interrupt (`interrupts[0]`), or `null` for legacy interrupts. */
|
|
214
|
-
interrupt: Interrupt | null;
|
|
215
|
-
/** All open standard interrupts (empty array for legacy interrupts). */
|
|
216
|
-
interrupts: Interrupt[];
|
|
217
|
-
resolve: InterruptResolveFn;
|
|
218
|
-
cancel: InterruptCancelFn;
|
|
219
|
-
}
|
|
220
|
-
interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
|
|
221
|
-
event: InterruptEvent<TValue>;
|
|
222
|
-
interrupt: Interrupt | null;
|
|
223
|
-
interrupts: Interrupt[];
|
|
224
|
-
result: TResult;
|
|
225
|
-
resolve: InterruptResolveFn;
|
|
226
|
-
cancel: InterruptCancelFn;
|
|
227
|
-
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/v2/lib/react-core.d.ts
|
|
230
|
-
interface CopilotKitCoreReactConfig extends CopilotKitCoreConfig {
|
|
231
|
-
renderToolCalls?: ReactToolCallRenderer<any>[];
|
|
232
|
-
renderActivityMessages?: ReactActivityMessageRenderer<any>[];
|
|
233
|
-
renderCustomMessages?: ReactCustomMessageRenderer[];
|
|
234
|
-
}
|
|
235
|
-
interface CopilotKitCoreReactSubscriber extends CopilotKitCoreSubscriber {
|
|
236
|
-
onRenderToolCallsChanged?: (event: {
|
|
237
|
-
copilotkit: CopilotKitCore;
|
|
238
|
-
renderToolCalls: ReactToolCallRenderer<any>[];
|
|
239
|
-
}) => void | Promise<void>;
|
|
240
|
-
onInterruptElementChanged?: (event: {
|
|
241
|
-
copilotkit: CopilotKitCore;
|
|
242
|
-
interruptElement: React$1.ReactElement | null;
|
|
243
|
-
}) => void | Promise<void>;
|
|
244
|
-
}
|
|
245
|
-
declare class CopilotKitCoreReact extends CopilotKitCore {
|
|
246
|
-
private _renderToolCalls;
|
|
247
|
-
private _hookRenderToolCalls;
|
|
248
|
-
private _cachedMergedRenderToolCalls;
|
|
249
|
-
private _renderCustomMessages;
|
|
250
|
-
private _renderActivityMessages;
|
|
251
|
-
private _interruptElement;
|
|
252
|
-
constructor(config: CopilotKitCoreReactConfig);
|
|
253
|
-
get renderCustomMessages(): Readonly<ReactCustomMessageRenderer[]>;
|
|
254
|
-
get renderActivityMessages(): Readonly<ReactActivityMessageRenderer<any>>[];
|
|
255
|
-
get renderToolCalls(): Readonly<ReactToolCallRenderer<any>>[];
|
|
256
|
-
setRenderActivityMessages(renderers: ReactActivityMessageRenderer<any>[]): void;
|
|
257
|
-
setRenderCustomMessages(renderers: ReactCustomMessageRenderer[]): void;
|
|
258
|
-
setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
|
|
259
|
-
addHookRenderToolCall(entry: ReactToolCallRenderer<any>): void;
|
|
260
|
-
removeHookRenderToolCall(name: string, agentId?: string): void;
|
|
261
|
-
private _notifyRenderToolCallsChanged;
|
|
262
|
-
get interruptElement(): React$1.ReactElement | null;
|
|
263
|
-
setInterruptElement(element: React$1.ReactElement | null): void;
|
|
264
|
-
subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription;
|
|
265
|
-
/**
|
|
266
|
-
* Wait for pending React state updates before the follow-up agent run.
|
|
267
|
-
*
|
|
268
|
-
* When a frontend tool handler calls setState(), React 18 batches the update
|
|
269
|
-
* and schedules a commit via its internal scheduler (MessageChannel). The
|
|
270
|
-
* useAgentContext hook registers context via useLayoutEffect, which runs
|
|
271
|
-
* synchronously after React commits that batch.
|
|
272
|
-
*
|
|
273
|
-
* Awaiting a zero-delay timeout yields to the macrotask queue. React's
|
|
274
|
-
* MessageChannel task runs first, committing the pending state and running
|
|
275
|
-
* useLayoutEffect (which updates the context store). The follow-up runAgent
|
|
276
|
-
* call then reads fresh context.
|
|
277
|
-
*/
|
|
278
|
-
waitForPendingFrameworkUpdates(): Promise<void>;
|
|
279
|
-
}
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region src/v2/context.d.ts
|
|
282
|
-
interface CopilotKitContextValue {
|
|
283
|
-
copilotkit: CopilotKitCoreReact;
|
|
284
|
-
/**
|
|
285
|
-
* Whether CopilotKit should automatically mount Intelligence indicators.
|
|
286
|
-
* Defaults to true when omitted for compatibility with custom providers.
|
|
287
|
-
*/
|
|
288
|
-
showIntelligenceIndicator?: boolean;
|
|
289
|
-
/**
|
|
290
|
-
* Set of tool call IDs currently being executed.
|
|
291
|
-
* This is tracked at the provider level to ensure tool execution events
|
|
292
|
-
* are captured even before child components mount.
|
|
293
|
-
*/
|
|
294
|
-
executingToolCallIds: ReadonlySet<string>;
|
|
295
|
-
}
|
|
296
|
-
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
297
|
-
//#endregion
|
|
298
8
|
//#region src/v2/providers/CopilotChatConfigurationProvider.d.ts
|
|
299
9
|
declare const CopilotChatDefaultLabels: {
|
|
300
10
|
chatInputPlaceholder: string;
|
|
@@ -572,6 +282,52 @@ declare function useAgent({
|
|
|
572
282
|
isReady: boolean;
|
|
573
283
|
};
|
|
574
284
|
//#endregion
|
|
285
|
+
//#region src/v2/types/react-tool-call-renderer.d.ts
|
|
286
|
+
interface ReactToolCallRenderer<T = unknown> {
|
|
287
|
+
name: string;
|
|
288
|
+
/**
|
|
289
|
+
* Schema describing the tool arguments. Optional — renderers registered for
|
|
290
|
+
* tools without parameters (e.g. HITL confirm dialogs) have no schema.
|
|
291
|
+
*/
|
|
292
|
+
args?: StandardSchemaV1<any, T>;
|
|
293
|
+
/**
|
|
294
|
+
* Optional agent ID to constrain this tool renderer to a specific agent.
|
|
295
|
+
* If specified, this renderer will only be used for the specified agent.
|
|
296
|
+
*/
|
|
297
|
+
agentId?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Whether calls this renderer draws join the chat's tool-call groups (see
|
|
300
|
+
* `toolCallDisplay` on `CopilotChatMessageView`). CopilotKit's built-in card
|
|
301
|
+
* sets it; a renderer that leaves it unset always shows its calls on their
|
|
302
|
+
* own, since the chat can't tell what it draws (it may even draw nothing).
|
|
303
|
+
*/
|
|
304
|
+
group?: boolean;
|
|
305
|
+
render: React.ComponentType<{
|
|
306
|
+
name: string;
|
|
307
|
+
toolCallId: string;
|
|
308
|
+
args: Partial<T>;
|
|
309
|
+
status: ToolCallStatus.InProgress;
|
|
310
|
+
result: undefined;
|
|
311
|
+
} | {
|
|
312
|
+
name: string;
|
|
313
|
+
toolCallId: string;
|
|
314
|
+
args: T;
|
|
315
|
+
status: ToolCallStatus.Executing;
|
|
316
|
+
result: undefined;
|
|
317
|
+
} | {
|
|
318
|
+
name: string;
|
|
319
|
+
toolCallId: string;
|
|
320
|
+
args: T;
|
|
321
|
+
status: ToolCallStatus.Complete;
|
|
322
|
+
result: string;
|
|
323
|
+
}>;
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/v2/types/frontend-tool.d.ts
|
|
327
|
+
type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool<T> & {
|
|
328
|
+
render?: ReactToolCallRenderer<T>["render"];
|
|
329
|
+
};
|
|
330
|
+
//#endregion
|
|
575
331
|
//#region src/v2/hooks/use-frontend-tool.d.ts
|
|
576
332
|
declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>, deps?: ReadonlyArray<unknown>): void;
|
|
577
333
|
//#endregion
|
|
@@ -688,9 +444,103 @@ declare function useComponent<TSchema extends StandardSchemaV1<any, Record<strin
|
|
|
688
444
|
followUp?: boolean;
|
|
689
445
|
}, deps?: ReadonlyArray<unknown>): void;
|
|
690
446
|
//#endregion
|
|
447
|
+
//#region src/v2/types/human-in-the-loop.d.ts
|
|
448
|
+
type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
|
|
449
|
+
/**
|
|
450
|
+
* Render the human-in-the-loop UI for this tool call.
|
|
451
|
+
*
|
|
452
|
+
* Beyond the tool call's `args`/`status`/`result`, the render props carry
|
|
453
|
+
* attribution:
|
|
454
|
+
* - `toolCallId` — the AG-UI tool call id, unique per interrupt. It is the
|
|
455
|
+
* stable key for correlating this interrupt with runtime (sub)agent
|
|
456
|
+
* attribution — e.g. the `agentId` reported by `onToolExecutionStart`, or
|
|
457
|
+
* per-run attribution stamped on the event stream — so the UI can label
|
|
458
|
+
* the interrupt with the agent that actually raised it.
|
|
459
|
+
* - `agentId` — the agent this tool was *registered* to (the tool's own
|
|
460
|
+
* `agentId`), or `undefined` for an unscoped tool. This is the static
|
|
461
|
+
* registration scope; it is NOT necessarily the runtime (sub)agent that
|
|
462
|
+
* raised the interrupt. For runtime attribution, correlate `toolCallId`
|
|
463
|
+
* with the event-stream/`onToolExecutionStart` agent id.
|
|
464
|
+
*/
|
|
465
|
+
render: React$1.ComponentType<{
|
|
466
|
+
name: string;
|
|
467
|
+
description: string;
|
|
468
|
+
toolCallId: string;
|
|
469
|
+
agentId?: string;
|
|
470
|
+
args: Partial<T>;
|
|
471
|
+
status: ToolCallStatus.InProgress;
|
|
472
|
+
result: undefined;
|
|
473
|
+
respond: undefined;
|
|
474
|
+
} | {
|
|
475
|
+
name: string;
|
|
476
|
+
description: string;
|
|
477
|
+
toolCallId: string;
|
|
478
|
+
agentId?: string;
|
|
479
|
+
args: T;
|
|
480
|
+
status: ToolCallStatus.Executing;
|
|
481
|
+
result: undefined;
|
|
482
|
+
respond: (result: unknown) => Promise<void>;
|
|
483
|
+
} | {
|
|
484
|
+
name: string;
|
|
485
|
+
description: string;
|
|
486
|
+
toolCallId: string;
|
|
487
|
+
agentId?: string;
|
|
488
|
+
args: T;
|
|
489
|
+
status: ToolCallStatus.Complete;
|
|
490
|
+
result: string;
|
|
491
|
+
respond: undefined;
|
|
492
|
+
}>;
|
|
493
|
+
};
|
|
494
|
+
//#endregion
|
|
691
495
|
//#region src/v2/hooks/use-human-in-the-loop.d.ts
|
|
692
496
|
declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
|
|
693
497
|
//#endregion
|
|
498
|
+
//#region src/v2/types/interrupt.d.ts
|
|
499
|
+
/** Legacy custom-event interrupt payload (agent emits a custom `on_interrupt` event). */
|
|
500
|
+
interface InterruptEvent<TValue = unknown> {
|
|
501
|
+
name: string;
|
|
502
|
+
value: TValue;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Resolve the agent with user input for an interrupt.
|
|
506
|
+
*
|
|
507
|
+
* - Standard interrupts: records `{ status: "resolved", payload }` for the target
|
|
508
|
+
* interrupt (defaults to the primary one). Resumes once every open interrupt is
|
|
509
|
+
* addressed; returns the resume run result, or `void` while still awaiting others.
|
|
510
|
+
* - Legacy interrupts: resumes immediately via `command.resume = payload`.
|
|
511
|
+
*/
|
|
512
|
+
type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult | void>;
|
|
513
|
+
/**
|
|
514
|
+
* Cancel an interrupt.
|
|
515
|
+
*
|
|
516
|
+
* - Standard interrupts: records `{ status: "cancelled" }` for the target interrupt
|
|
517
|
+
* (defaults to the primary one), then resumes once all are addressed.
|
|
518
|
+
* - Legacy interrupts: dismisses the pending interrupt without resuming.
|
|
519
|
+
*/
|
|
520
|
+
type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult | void>;
|
|
521
|
+
interface InterruptHandlerProps<TValue = unknown> {
|
|
522
|
+
/**
|
|
523
|
+
* Legacy event shape (`{ name, value }`). Always present for back-compat: for
|
|
524
|
+
* standard interrupts, `value` is the primary `Interrupt` and `name` is `"on_interrupt"`.
|
|
525
|
+
* Prefer `interrupt` / `interrupts` for standard interrupts.
|
|
526
|
+
*/
|
|
527
|
+
event: InterruptEvent<TValue>;
|
|
528
|
+
/** Primary standard interrupt (`interrupts[0]`), or `null` for legacy interrupts. */
|
|
529
|
+
interrupt: Interrupt | null;
|
|
530
|
+
/** All open standard interrupts (empty array for legacy interrupts). */
|
|
531
|
+
interrupts: Interrupt[];
|
|
532
|
+
resolve: InterruptResolveFn;
|
|
533
|
+
cancel: InterruptCancelFn;
|
|
534
|
+
}
|
|
535
|
+
interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
|
|
536
|
+
event: InterruptEvent<TValue>;
|
|
537
|
+
interrupt: Interrupt | null;
|
|
538
|
+
interrupts: Interrupt[];
|
|
539
|
+
result: TResult;
|
|
540
|
+
resolve: InterruptResolveFn;
|
|
541
|
+
cancel: InterruptCancelFn;
|
|
542
|
+
}
|
|
543
|
+
//#endregion
|
|
694
544
|
//#region src/v2/hooks/use-interrupt.d.ts
|
|
695
545
|
type InterruptHandlerFn<TValue, TResult> = (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
|
|
696
546
|
type InterruptResultFromHandler<THandler> = THandler extends ((...args: never[]) => infer TResult) ? TResult extends PromiseLike<infer TResolved> ? TResolved | null : TResult | null : null;
|
|
@@ -1098,6 +948,47 @@ declare function useRenderToolCall(): ({
|
|
|
1098
948
|
toolMessage
|
|
1099
949
|
}: UseRenderToolCallProps) => React$1.ReactElement | null;
|
|
1100
950
|
//#endregion
|
|
951
|
+
//#region src/v2/types/defineToolCallRenderer.d.ts
|
|
952
|
+
/**
|
|
953
|
+
* Helper to define a type-safe tool call renderer entry.
|
|
954
|
+
* - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
|
|
955
|
+
* - Derives `args` type from the provided schema (any Standard Schema V1 compatible library).
|
|
956
|
+
* - Ensures the render function param type exactly matches ReactToolCallRenderer<T>["render"]'s param.
|
|
957
|
+
* - For wildcard tools (name: "*"), args is optional and defaults to z.any()
|
|
958
|
+
*/
|
|
959
|
+
type RenderProps<T> = {
|
|
960
|
+
name: string;
|
|
961
|
+
toolCallId: string;
|
|
962
|
+
args: Partial<T>;
|
|
963
|
+
status: ToolCallStatus.InProgress;
|
|
964
|
+
result: undefined;
|
|
965
|
+
} | {
|
|
966
|
+
name: string;
|
|
967
|
+
toolCallId: string;
|
|
968
|
+
args: T;
|
|
969
|
+
status: ToolCallStatus.Executing;
|
|
970
|
+
result: undefined;
|
|
971
|
+
} | {
|
|
972
|
+
name: string;
|
|
973
|
+
toolCallId: string;
|
|
974
|
+
args: T;
|
|
975
|
+
status: ToolCallStatus.Complete;
|
|
976
|
+
result: string;
|
|
977
|
+
};
|
|
978
|
+
declare function defineToolCallRenderer(def: {
|
|
979
|
+
name: "*";
|
|
980
|
+
render: (props: RenderProps<any>) => React$1.ReactElement | null;
|
|
981
|
+
agentId?: string;
|
|
982
|
+
group?: boolean;
|
|
983
|
+
}): ReactToolCallRenderer<any>;
|
|
984
|
+
declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
|
|
985
|
+
name: string;
|
|
986
|
+
args: S;
|
|
987
|
+
render: (props: RenderProps<InferSchemaOutput<S>>) => React$1.ReactElement | null;
|
|
988
|
+
agentId?: string;
|
|
989
|
+
group?: boolean;
|
|
990
|
+
}): ReactToolCallRenderer<InferSchemaOutput<S>>;
|
|
991
|
+
//#endregion
|
|
1101
992
|
//#region src/v2/hooks/use-capabilities.d.ts
|
|
1102
993
|
/**
|
|
1103
994
|
* Returns the capabilities declared by the given agent (or the agent resolved
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless.d.cts","names":[],"sources":["../../src/v2/
|
|
1
|
+
{"version":3,"file":"headless.d.cts","names":[],"sources":["../../src/v2/providers/CopilotChatConfigurationProvider.tsx","../../src/v2/hooks/use-agent.tsx","../../src/v2/types/react-tool-call-renderer.ts","../../src/v2/types/frontend-tool.ts","../../src/v2/hooks/use-frontend-tool.tsx","../../src/v2/hooks/use-frontend-tools.tsx","../../src/v2/hooks/use-component.tsx","../../src/v2/types/human-in-the-loop.ts","../../src/v2/hooks/use-human-in-the-loop.tsx","../../src/v2/types/interrupt.ts","../../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","../../src/v2/hooks/use-threads.tsx","../../src/v2/hooks/use-render-tool.tsx","../../src/v2/hooks/use-render-tool-call.tsx","../../src/v2/types/defineToolCallRenderer.ts","../../src/v2/hooks/use-capabilities.tsx"],"mappings":";;;;;;;;cAkBa,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkDD,iBAAA,UAA2B,wBAAA;AAAA,UA6BtB,6BAAA;EACf,MAAA,EAAQ,iBAAA;EACR,OAAA;EACA,QAAA;EACA,WAAA;EACA,YAAA,GAAe,IAAA;;;;AAlCjB;;EAwCE,UAAA;EAxCqC;;AA6BvC;;;EAiBE,aAAA,GAAgB,IAAA;EAhBhB;;;;;EAsBA,gBAAA;EAlBe;;;;;;;EA0Bf,cAAA;EAWuB;;;;;;;;;AA4CzB;EA5CE,oBAAA,GAAuB,UAAA,GAAa,IAAA;EAKpC,mBAAA;EAwCU;;;;;;;;;;;;;;;;AAc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AA,CAAM,YAAA;EAC3C,OAAA;EACA,KAAA;AAAA,IACE,qBAAA;AAAA,iBAGY,sBAAA,WAAiC,gBAAA,CAAA,CAAkB,GAAA;EACjE,IAAA;EACA,IAAA,EAAM,CAAA;EACN,MAAA,GACE,KAAA,EAAO,WAAA,CAAY,iBAAA,CAAkB,CAAA,OAClC,OAAA,CAAM,YAAA;EACX,OAAA;EACA,KAAA;AAAA,IACE,qBAAA,CAAsB,iBAAA,CAAkB,CAAA;;;;;;;;;;AjBnC5C;;;;;;iBkBFgB,eAAA,CACd,OAAA,YACC,iBAAA"}
|
package/dist/v2/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
const
|
|
5
|
-
const require_copilotkit = require('../copilotkit-
|
|
4
|
+
const require_chat = require('../chat-BnsrQ0VS.cjs');
|
|
5
|
+
const require_copilotkit = require('../copilotkit-Ca0IcTZU.cjs');
|
|
6
6
|
require("./index.css");
|
|
7
7
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
8
8
|
let _copilotkit_core = require("@copilotkit/core");
|
|
@@ -184,7 +184,7 @@ exports.CopilotChatAssistantMessage = require_copilotkit.CopilotChatAssistantMes
|
|
|
184
184
|
exports.CopilotChatAttachmentQueue = require_copilotkit.CopilotChatAttachmentQueue;
|
|
185
185
|
exports.CopilotChatAttachmentRenderer = require_copilotkit.CopilotChatAttachmentRenderer;
|
|
186
186
|
exports.CopilotChatAudioRecorder = require_copilotkit.CopilotChatAudioRecorder;
|
|
187
|
-
exports.CopilotChatConfigurationProvider =
|
|
187
|
+
exports.CopilotChatConfigurationProvider = require_chat.CopilotChatConfigurationProvider;
|
|
188
188
|
exports.CopilotChatInput = require_copilotkit.CopilotChatInput_default;
|
|
189
189
|
exports.CopilotChatMessageView = require_copilotkit.CopilotChatMessageView;
|
|
190
190
|
exports.CopilotChatReasoningMessage = require_copilotkit.CopilotChatReasoningMessage_default;
|
|
@@ -1077,7 +1077,7 @@ Object.defineProperty(exports, 'defaultApplyEvents', {
|
|
|
1077
1077
|
return _ag_ui_client.defaultApplyEvents;
|
|
1078
1078
|
}
|
|
1079
1079
|
});
|
|
1080
|
-
exports.defineToolCallRenderer =
|
|
1080
|
+
exports.defineToolCallRenderer = require_chat.defineToolCallRenderer;
|
|
1081
1081
|
Object.defineProperty(exports, 'emitInspectorActiveThread', {
|
|
1082
1082
|
enumerable: true,
|
|
1083
1083
|
get: function () {
|
|
@@ -1357,7 +1357,7 @@ exports.useAttachments = require_copilotkit.useAttachments;
|
|
|
1357
1357
|
exports.useCapabilities = require_copilotkit.useCapabilities;
|
|
1358
1358
|
exports.useComponent = require_copilotkit.useComponent;
|
|
1359
1359
|
exports.useConfigureSuggestions = require_copilotkit.useConfigureSuggestions;
|
|
1360
|
-
exports.useCopilotChatConfiguration =
|
|
1360
|
+
exports.useCopilotChatConfiguration = require_chat.useCopilotChatConfiguration;
|
|
1361
1361
|
Object.defineProperty(exports, 'useCopilotKit', {
|
|
1362
1362
|
enumerable: true,
|
|
1363
1363
|
get: function () {
|