@agno-hq/chat-react 0.1.1 → 0.3.1
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/README.md +407 -21
- package/dist/chat/index.cjs +334 -0
- package/dist/chat/index.cjs.map +1 -0
- package/dist/chat/index.d.cts +1335 -0
- package/dist/chat/index.d.ts +1335 -0
- package/dist/chat/index.js +5 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chunk-2WM3CCFE.cjs +106 -0
- package/dist/chunk-2WM3CCFE.cjs.map +1 -0
- package/dist/chunk-55HQJGLP.cjs +527 -0
- package/dist/chunk-55HQJGLP.cjs.map +1 -0
- package/dist/chunk-6V2YIPHF.js +503 -0
- package/dist/chunk-6V2YIPHF.js.map +1 -0
- package/dist/chunk-BZC2674Z.js +3501 -0
- package/dist/chunk-BZC2674Z.js.map +1 -0
- package/dist/chunk-JEPFGKHH.cjs +3588 -0
- package/dist/chunk-JEPFGKHH.cjs.map +1 -0
- package/dist/chunk-RE7ZT73K.js +102 -0
- package/dist/chunk-RE7ZT73K.js.map +1 -0
- package/dist/client-DUyVqxU9.d.cts +413 -0
- package/dist/client-DUyVqxU9.d.ts +413 -0
- package/dist/core/index.cjs +94 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +108 -0
- package/dist/core/index.d.ts +108 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/fonts.css +18 -0
- package/dist/index.cjs +415 -1954
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -835
- package/dist/index.d.ts +12 -835
- package/dist/index.js +3 -1920
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2102 -659
- package/dist/tokens.css +111 -0
- package/package.json +50 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,835 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
RunContentCompleted = "RunContentCompleted",
|
|
14
|
-
RunIntermediateContent = "RunIntermediateContent",
|
|
15
|
-
RunCompleted = "RunCompleted",
|
|
16
|
-
RunError = "RunError",
|
|
17
|
-
RunCancelled = "RunCancelled",
|
|
18
|
-
RunPaused = "RunPaused",
|
|
19
|
-
RunContinued = "RunContinued",
|
|
20
|
-
PreHookStarted = "PreHookStarted",
|
|
21
|
-
PreHookCompleted = "PreHookCompleted",
|
|
22
|
-
PostHookStarted = "PostHookStarted",
|
|
23
|
-
PostHookCompleted = "PostHookCompleted",
|
|
24
|
-
ToolCallStarted = "ToolCallStarted",
|
|
25
|
-
ToolCallCompleted = "ToolCallCompleted",
|
|
26
|
-
ToolCallError = "ToolCallError",
|
|
27
|
-
ReasoningStarted = "ReasoningStarted",
|
|
28
|
-
ReasoningStep = "ReasoningStep",
|
|
29
|
-
ReasoningContentDelta = "ReasoningContentDelta",
|
|
30
|
-
ReasoningCompleted = "ReasoningCompleted",
|
|
31
|
-
MemoryUpdateStarted = "MemoryUpdateStarted",
|
|
32
|
-
MemoryUpdateCompleted = "MemoryUpdateCompleted",
|
|
33
|
-
SessionSummaryStarted = "SessionSummaryStarted",
|
|
34
|
-
SessionSummaryCompleted = "SessionSummaryCompleted",
|
|
35
|
-
ParserModelResponseStarted = "ParserModelResponseStarted",
|
|
36
|
-
ParserModelResponseCompleted = "ParserModelResponseCompleted",
|
|
37
|
-
OutputModelResponseStarted = "OutputModelResponseStarted",
|
|
38
|
-
OutputModelResponseCompleted = "OutputModelResponseCompleted",
|
|
39
|
-
ModelRequestStarted = "ModelRequestStarted",
|
|
40
|
-
ModelRequestCompleted = "ModelRequestCompleted",
|
|
41
|
-
CompressionStarted = "CompressionStarted",
|
|
42
|
-
CompressionCompleted = "CompressionCompleted",
|
|
43
|
-
FollowupsStarted = "FollowupsStarted",
|
|
44
|
-
FollowupsCompleted = "FollowupsCompleted",
|
|
45
|
-
CustomEvent = "CustomEvent"
|
|
46
|
-
}
|
|
47
|
-
/** Team run event names. */
|
|
48
|
-
declare enum TeamRunEvent {
|
|
49
|
-
TeamRunStarted = "TeamRunStarted",
|
|
50
|
-
TeamRunContent = "TeamRunContent",
|
|
51
|
-
TeamRunIntermediateContent = "TeamRunIntermediateContent",
|
|
52
|
-
TeamRunContentCompleted = "TeamRunContentCompleted",
|
|
53
|
-
TeamRunCompleted = "TeamRunCompleted",
|
|
54
|
-
TeamRunError = "TeamRunError",
|
|
55
|
-
TeamRunCancelled = "TeamRunCancelled",
|
|
56
|
-
TeamRunPaused = "TeamRunPaused",
|
|
57
|
-
TeamRunContinued = "TeamRunContinued",
|
|
58
|
-
TeamToolCallStarted = "TeamToolCallStarted",
|
|
59
|
-
TeamToolCallCompleted = "TeamToolCallCompleted",
|
|
60
|
-
TeamToolCallError = "TeamToolCallError",
|
|
61
|
-
TeamReasoningStarted = "TeamReasoningStarted",
|
|
62
|
-
TeamReasoningStep = "TeamReasoningStep",
|
|
63
|
-
TeamReasoningContentDelta = "TeamReasoningContentDelta",
|
|
64
|
-
TeamReasoningCompleted = "TeamReasoningCompleted",
|
|
65
|
-
TeamMemoryUpdateStarted = "TeamMemoryUpdateStarted",
|
|
66
|
-
TeamMemoryUpdateCompleted = "TeamMemoryUpdateCompleted",
|
|
67
|
-
TeamTaskIterationStarted = "TeamTaskIterationStarted",
|
|
68
|
-
TeamTaskIterationCompleted = "TeamTaskIterationCompleted",
|
|
69
|
-
TeamTaskStateUpdated = "TeamTaskStateUpdated",
|
|
70
|
-
TeamTaskCreated = "TeamTaskCreated",
|
|
71
|
-
TeamTaskUpdated = "TeamTaskUpdated"
|
|
72
|
-
}
|
|
73
|
-
/** Workflow run event names. */
|
|
74
|
-
declare enum WorkflowRunEvent {
|
|
75
|
-
WorkflowStarted = "WorkflowStarted",
|
|
76
|
-
WorkflowCompleted = "WorkflowCompleted",
|
|
77
|
-
WorkflowPaused = "WorkflowPaused",
|
|
78
|
-
WorkflowCancelled = "WorkflowCancelled",
|
|
79
|
-
WorkflowError = "WorkflowError",
|
|
80
|
-
WorkflowAgentStarted = "WorkflowAgentStarted",
|
|
81
|
-
WorkflowAgentCompleted = "WorkflowAgentCompleted",
|
|
82
|
-
StepStarted = "StepStarted",
|
|
83
|
-
StepCompleted = "StepCompleted",
|
|
84
|
-
StepPaused = "StepPaused",
|
|
85
|
-
StepContinued = "StepContinued",
|
|
86
|
-
StepError = "StepError",
|
|
87
|
-
StepOutput = "StepOutput",
|
|
88
|
-
StepOutputReview = "StepOutputReview",
|
|
89
|
-
LoopExecutionStarted = "LoopExecutionStarted",
|
|
90
|
-
LoopIterationStarted = "LoopIterationStarted",
|
|
91
|
-
LoopIterationCompleted = "LoopIterationCompleted",
|
|
92
|
-
LoopExecutionCompleted = "LoopExecutionCompleted",
|
|
93
|
-
ParallelExecutionStarted = "ParallelExecutionStarted",
|
|
94
|
-
ParallelExecutionCompleted = "ParallelExecutionCompleted",
|
|
95
|
-
ConditionExecutionStarted = "ConditionExecutionStarted",
|
|
96
|
-
ConditionExecutionCompleted = "ConditionExecutionCompleted",
|
|
97
|
-
ConditionPaused = "ConditionPaused",
|
|
98
|
-
RouterExecutionStarted = "RouterExecutionStarted",
|
|
99
|
-
RouterExecutionCompleted = "RouterExecutionCompleted",
|
|
100
|
-
RouterPaused = "RouterPaused",
|
|
101
|
-
StepsExecutionStarted = "StepsExecutionStarted",
|
|
102
|
-
StepsExecutionCompleted = "StepsExecutionCompleted"
|
|
103
|
-
}
|
|
104
|
-
/** Any run event name, across agents, teams and workflows. */
|
|
105
|
-
type AnyRunEventName = RunEvent | TeamRunEvent | WorkflowRunEvent | string;
|
|
106
|
-
interface UserInputField {
|
|
107
|
-
name: string;
|
|
108
|
-
field_type?: string;
|
|
109
|
-
description?: string;
|
|
110
|
-
value?: unknown;
|
|
111
|
-
}
|
|
112
|
-
interface ToolExecution {
|
|
113
|
-
tool_call_id?: string;
|
|
114
|
-
tool_name?: string;
|
|
115
|
-
tool_args?: Record<string, unknown>;
|
|
116
|
-
tool_call_error?: boolean;
|
|
117
|
-
result?: string;
|
|
118
|
-
metrics?: {
|
|
119
|
-
time?: number;
|
|
120
|
-
};
|
|
121
|
-
created_at?: number;
|
|
122
|
-
stop_after_tool_call?: boolean;
|
|
123
|
-
requires_confirmation?: boolean;
|
|
124
|
-
confirmed?: boolean;
|
|
125
|
-
confirmation_note?: string;
|
|
126
|
-
requires_user_input?: boolean;
|
|
127
|
-
user_input_schema?: UserInputField[];
|
|
128
|
-
answered?: boolean;
|
|
129
|
-
external_execution_required?: boolean;
|
|
130
|
-
role?: string;
|
|
131
|
-
content?: string | null;
|
|
132
|
-
}
|
|
133
|
-
interface ReasoningStep {
|
|
134
|
-
title?: string;
|
|
135
|
-
action?: string;
|
|
136
|
-
result?: string;
|
|
137
|
-
reasoning?: string;
|
|
138
|
-
confidence?: number;
|
|
139
|
-
next_action?: string;
|
|
140
|
-
}
|
|
141
|
-
interface Reference {
|
|
142
|
-
content: string;
|
|
143
|
-
name?: string;
|
|
144
|
-
meta_data?: Record<string, unknown>;
|
|
145
|
-
}
|
|
146
|
-
interface ReferenceData {
|
|
147
|
-
query: string;
|
|
148
|
-
references: Reference[];
|
|
149
|
-
time?: number;
|
|
150
|
-
}
|
|
151
|
-
interface ImageData {
|
|
152
|
-
url?: string;
|
|
153
|
-
revised_prompt?: string;
|
|
154
|
-
content?: string;
|
|
155
|
-
}
|
|
156
|
-
interface VideoData {
|
|
157
|
-
id?: number | string;
|
|
158
|
-
url?: string;
|
|
159
|
-
eta?: number;
|
|
160
|
-
}
|
|
161
|
-
interface AudioData {
|
|
162
|
-
id?: string;
|
|
163
|
-
url?: string;
|
|
164
|
-
base64_audio?: string;
|
|
165
|
-
mime_type?: string;
|
|
166
|
-
content?: string;
|
|
167
|
-
transcript?: string;
|
|
168
|
-
channels?: number;
|
|
169
|
-
sample_rate?: number;
|
|
170
|
-
}
|
|
171
|
-
interface Citations$1 {
|
|
172
|
-
raw?: unknown;
|
|
173
|
-
urls?: Array<{
|
|
174
|
-
url?: string;
|
|
175
|
-
title?: string;
|
|
176
|
-
}>;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* A single run event off the wire, normalised to a flat object. The `event`
|
|
180
|
-
* field is the discriminator; other fields depend on the event type. This is a
|
|
181
|
-
* permissive superset — most fields are optional and present only for the
|
|
182
|
-
* events that carry them.
|
|
183
|
-
*/
|
|
184
|
-
interface RunEventData {
|
|
185
|
-
event: AnyRunEventName;
|
|
186
|
-
created_at?: number;
|
|
187
|
-
run_id?: string;
|
|
188
|
-
parent_run_id?: string;
|
|
189
|
-
session_id?: string;
|
|
190
|
-
agent_id?: string;
|
|
191
|
-
agent_name?: string;
|
|
192
|
-
team_id?: string;
|
|
193
|
-
team_name?: string;
|
|
194
|
-
workflow_id?: string;
|
|
195
|
-
workflow_name?: string;
|
|
196
|
-
content?: string | object | null;
|
|
197
|
-
content_type?: string;
|
|
198
|
-
reasoning_content?: string;
|
|
199
|
-
tool?: ToolExecution;
|
|
200
|
-
tools?: ToolExecution[];
|
|
201
|
-
reasoning_steps?: ReasoningStep[];
|
|
202
|
-
references?: ReferenceData[];
|
|
203
|
-
citations?: Citations$1;
|
|
204
|
-
images?: ImageData[];
|
|
205
|
-
videos?: VideoData[];
|
|
206
|
-
audio?: AudioData[];
|
|
207
|
-
response_audio?: AudioData;
|
|
208
|
-
step_name?: string;
|
|
209
|
-
step_index?: number | [number, number];
|
|
210
|
-
iteration?: number;
|
|
211
|
-
max_iterations?: number;
|
|
212
|
-
requirements?: RunRequirement[];
|
|
213
|
-
requires_confirmation?: boolean;
|
|
214
|
-
confirmation_message?: string;
|
|
215
|
-
requires_user_input?: boolean;
|
|
216
|
-
user_input_message?: string;
|
|
217
|
-
user_input_schema?: UserInputField[];
|
|
218
|
-
available_choices?: string[];
|
|
219
|
-
allow_multiple_selections?: boolean;
|
|
220
|
-
error?: string;
|
|
221
|
-
error_type?: string;
|
|
222
|
-
model?: string;
|
|
223
|
-
model_provider?: string;
|
|
224
|
-
input_tokens?: number;
|
|
225
|
-
output_tokens?: number;
|
|
226
|
-
total_tokens?: number;
|
|
227
|
-
metrics?: Record<string, unknown>;
|
|
228
|
-
extra_data?: {
|
|
229
|
-
reasoning_steps?: ReasoningStep[];
|
|
230
|
-
references?: ReferenceData[];
|
|
231
|
-
};
|
|
232
|
-
[key: string]: unknown;
|
|
233
|
-
}
|
|
234
|
-
type PauseType = 'confirmation' | 'user_input' | 'user_feedback' | 'external_execution';
|
|
235
|
-
interface RunRequirement {
|
|
236
|
-
id: string;
|
|
237
|
-
tool_execution?: ToolExecution;
|
|
238
|
-
confirmation?: boolean;
|
|
239
|
-
confirmation_note?: string;
|
|
240
|
-
user_input_schema?: UserInputField[];
|
|
241
|
-
external_execution_result?: string;
|
|
242
|
-
member_agent_id?: string;
|
|
243
|
-
member_agent_name?: string;
|
|
244
|
-
pause_type?: PauseType;
|
|
245
|
-
}
|
|
246
|
-
type ChatRole = 'user' | 'agent' | 'system';
|
|
247
|
-
type ChatStatus = 'idle' | 'streaming' | 'paused' | 'completed' | 'error' | 'cancelled';
|
|
248
|
-
type SubRunStatus = 'running' | 'completed' | 'error';
|
|
249
|
-
/**
|
|
250
|
-
* A nested run inside a team or workflow run — a team member's turn, or the
|
|
251
|
-
* agent/team that executes a workflow step. Accumulated from events that carry
|
|
252
|
-
* a `parent_run_id`.
|
|
253
|
-
*/
|
|
254
|
-
interface SubRun {
|
|
255
|
-
run_id: string;
|
|
256
|
-
kind: 'member' | 'executor';
|
|
257
|
-
name?: string;
|
|
258
|
-
agent_id?: string;
|
|
259
|
-
content: string;
|
|
260
|
-
tool_calls?: ToolExecution[];
|
|
261
|
-
status: SubRunStatus;
|
|
262
|
-
}
|
|
263
|
-
/** A workflow step and its output, accumulated from `Step*` events. */
|
|
264
|
-
interface WorkflowStep {
|
|
265
|
-
key: string;
|
|
266
|
-
name?: string;
|
|
267
|
-
index?: number | [number, number];
|
|
268
|
-
status: SubRunStatus;
|
|
269
|
-
content?: string;
|
|
270
|
-
error?: string;
|
|
271
|
-
}
|
|
272
|
-
interface ChatMessage {
|
|
273
|
-
id: string;
|
|
274
|
-
role: ChatRole;
|
|
275
|
-
content: string;
|
|
276
|
-
created_at: number;
|
|
277
|
-
/** Set while this message is being streamed. */
|
|
278
|
-
streaming?: boolean;
|
|
279
|
-
/** Run-level status, set for agent messages. */
|
|
280
|
-
status?: ChatStatus;
|
|
281
|
-
error?: string;
|
|
282
|
-
run_id?: string;
|
|
283
|
-
session_id?: string;
|
|
284
|
-
tool_calls?: ToolExecution[];
|
|
285
|
-
reasoning_steps?: ReasoningStep[];
|
|
286
|
-
references?: ReferenceData[];
|
|
287
|
-
citations?: Citations$1;
|
|
288
|
-
images?: ImageData[];
|
|
289
|
-
videos?: VideoData[];
|
|
290
|
-
audio?: AudioData[];
|
|
291
|
-
response_audio?: AudioData;
|
|
292
|
-
/** Live "what is it doing right now" label, e.g. "Calling get_weather". */
|
|
293
|
-
activity?: string;
|
|
294
|
-
/** Pause requirements when the run is waiting for a human. */
|
|
295
|
-
requirements?: RunRequirement[];
|
|
296
|
-
/** Team member turns / workflow step executors (nested runs). */
|
|
297
|
-
members?: SubRun[];
|
|
298
|
-
/** Workflow steps and their outputs. */
|
|
299
|
-
steps?: WorkflowStep[];
|
|
300
|
-
/** Every raw event that contributed to this message, in order. */
|
|
301
|
-
events?: RunEventData[];
|
|
302
|
-
}
|
|
303
|
-
interface Model {
|
|
304
|
-
name?: string;
|
|
305
|
-
model?: string;
|
|
306
|
-
provider?: string;
|
|
307
|
-
}
|
|
308
|
-
type EntityType = 'agent' | 'team' | 'workflow';
|
|
309
|
-
interface Entity {
|
|
310
|
-
type: EntityType;
|
|
311
|
-
id: string;
|
|
312
|
-
name: string;
|
|
313
|
-
description?: string;
|
|
314
|
-
model?: Model;
|
|
315
|
-
db_id?: string;
|
|
316
|
-
}
|
|
317
|
-
interface SessionEntry {
|
|
318
|
-
session_id: string;
|
|
319
|
-
session_name?: string;
|
|
320
|
-
/** Unix seconds, Unix milliseconds, or an ISO date string, depending on the backend. */
|
|
321
|
-
created_at: number | string;
|
|
322
|
-
updated_at?: number | string;
|
|
323
|
-
}
|
|
324
|
-
interface Pagination {
|
|
325
|
-
page: number;
|
|
326
|
-
limit: number;
|
|
327
|
-
total_pages: number;
|
|
328
|
-
total_count: number;
|
|
329
|
-
}
|
|
330
|
-
interface SessionsResponse {
|
|
331
|
-
data: SessionEntry[];
|
|
332
|
-
meta?: Pagination;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Streaming parser for AgentOS run endpoints.
|
|
337
|
-
*
|
|
338
|
-
* AgentOS streams a run as a sequence of JSON objects concatenated on the wire
|
|
339
|
-
* (not strictly newline-delimited). Each object is one "run event". This module
|
|
340
|
-
* reads the response body incrementally, extracts complete JSON objects as they
|
|
341
|
-
* arrive, and hands each one to a callback.
|
|
342
|
-
*
|
|
343
|
-
* It supports both the legacy shape (the event object sent directly) and the
|
|
344
|
-
* newer envelope shape ({ event: string, data: string | object }), normalising
|
|
345
|
-
* both into a flat event object with an `event` discriminator field.
|
|
346
|
-
*/
|
|
347
|
-
|
|
348
|
-
/** A parsed, normalised run event. Shape varies by `event` type — see types.ts. */
|
|
349
|
-
interface StreamEvent {
|
|
350
|
-
event: RunEvent | string;
|
|
351
|
-
[key: string]: unknown;
|
|
352
|
-
}
|
|
353
|
-
interface StreamRunOptions {
|
|
354
|
-
url: string;
|
|
355
|
-
body: FormData | Record<string, unknown>;
|
|
356
|
-
headers?: Record<string, string>;
|
|
357
|
-
signal?: AbortSignal;
|
|
358
|
-
onEvent: (event: StreamEvent) => void;
|
|
359
|
-
onError: (error: Error) => void;
|
|
360
|
-
onComplete: () => void;
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* POSTs a run request and streams the response, calling `onEvent` for every
|
|
364
|
-
* run event as it arrives. Resolves when the stream ends.
|
|
365
|
-
*/
|
|
366
|
-
declare function streamRun(options: StreamRunOptions): Promise<void>;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Thin client for an AgentOS HTTP backend.
|
|
370
|
-
*
|
|
371
|
-
* Wraps the discovery, run, continue, cancel and session endpoints. Streaming
|
|
372
|
-
* runs are handled by `streamRun` from ./stream; everything else is plain JSON.
|
|
373
|
-
*/
|
|
374
|
-
|
|
375
|
-
/** Normalise a base URL: add a scheme for bare hosts, strip trailing slash. */
|
|
376
|
-
declare function normaliseBaseUrl(value: string | null | undefined): string;
|
|
377
|
-
interface AgnoClientOptions {
|
|
378
|
-
/** AgentOS base URL, e.g. "http://localhost:7777". */
|
|
379
|
-
baseUrl: string;
|
|
380
|
-
/** Optional headers (e.g. Authorization) added to every request. */
|
|
381
|
-
headers?: Record<string, string>;
|
|
382
|
-
/** Default db_id used for session listing where the backend requires it. */
|
|
383
|
-
dbId?: string;
|
|
384
|
-
}
|
|
385
|
-
interface RunArgs {
|
|
386
|
-
type: EntityType;
|
|
387
|
-
id: string;
|
|
388
|
-
message?: string;
|
|
389
|
-
sessionId?: string;
|
|
390
|
-
userId?: string;
|
|
391
|
-
files?: File[];
|
|
392
|
-
/** Extra form fields appended verbatim. */
|
|
393
|
-
extra?: Record<string, string>;
|
|
394
|
-
signal?: AbortSignal;
|
|
395
|
-
onEvent: (event: RunEventData) => void;
|
|
396
|
-
onError: (error: Error) => void;
|
|
397
|
-
onComplete: () => void;
|
|
398
|
-
}
|
|
399
|
-
interface ContinueArgs {
|
|
400
|
-
type: EntityType;
|
|
401
|
-
id: string;
|
|
402
|
-
runId: string;
|
|
403
|
-
sessionId?: string;
|
|
404
|
-
userId?: string;
|
|
405
|
-
/** Resolved tool executions (agents/teams human-in-the-loop). */
|
|
406
|
-
tools?: ToolExecution[];
|
|
407
|
-
/** Resolved step requirements (workflow human-in-the-loop). */
|
|
408
|
-
stepRequirements?: unknown[];
|
|
409
|
-
signal?: AbortSignal;
|
|
410
|
-
onEvent: (event: RunEventData) => void;
|
|
411
|
-
onError: (error: Error) => void;
|
|
412
|
-
onComplete: () => void;
|
|
413
|
-
}
|
|
414
|
-
declare class AgnoClient {
|
|
415
|
-
readonly baseUrl: string;
|
|
416
|
-
readonly headers: Record<string, string>;
|
|
417
|
-
readonly dbId?: string;
|
|
418
|
-
constructor(options: AgnoClientOptions);
|
|
419
|
-
private getJson;
|
|
420
|
-
/** Liveness check against /health. Returns the HTTP status code. */
|
|
421
|
-
health(): Promise<number>;
|
|
422
|
-
getAgents(): Promise<Entity[]>;
|
|
423
|
-
getTeams(): Promise<Entity[]>;
|
|
424
|
-
getWorkflows(): Promise<Entity[]>;
|
|
425
|
-
/** All runnable entities (agents, teams, workflows) in one list. */
|
|
426
|
-
getEntities(): Promise<Entity[]>;
|
|
427
|
-
getSessions(type: EntityType, componentId: string, dbId?: string): Promise<SessionsResponse>;
|
|
428
|
-
/** Runs (with messages/tools/events) for a session — used to rehydrate chat history. */
|
|
429
|
-
getSessionRuns(type: EntityType, sessionId: string, dbId?: string): Promise<any[]>;
|
|
430
|
-
deleteSession(sessionId: string, dbId?: string): Promise<boolean>;
|
|
431
|
-
/** Start a streaming run for an agent, team or workflow. */
|
|
432
|
-
run(args: RunArgs): Promise<void>;
|
|
433
|
-
/** Continue a paused run (resolving a human-in-the-loop requirement). */
|
|
434
|
-
continueRun(args: ContinueArgs): Promise<void>;
|
|
435
|
-
/** Cancel an in-flight run. */
|
|
436
|
-
cancelRun(type: EntityType, id: string, runId: string, sessionId?: string): Promise<boolean>;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* useAgnoChat — a headless React hook for running any Agno agent, team or
|
|
441
|
-
* workflow against an AgentOS backend and consuming its streamed output.
|
|
442
|
-
*
|
|
443
|
-
* It owns the full chat lifecycle: sending a message, accumulating the streamed
|
|
444
|
-
* response (content, tool calls, reasoning, media), surfacing live status and
|
|
445
|
-
* the raw event feed, handling human-in-the-loop pauses, cancelling, and
|
|
446
|
-
* rehydrating prior sessions.
|
|
447
|
-
*
|
|
448
|
-
* The hook renders nothing — pair it with the components in this package or
|
|
449
|
-
* build your own UI from the values it returns.
|
|
450
|
-
*/
|
|
451
|
-
|
|
452
|
-
interface UseAgnoChatOptions {
|
|
453
|
-
/** AgentOS base URL, e.g. "http://localhost:7777". Ignored if `client` given. */
|
|
454
|
-
baseUrl?: string;
|
|
455
|
-
/** A pre-built client (use this to share headers/auth across hooks). */
|
|
456
|
-
client?: AgnoClient;
|
|
457
|
-
/** Extra request headers (e.g. Authorization). Used only with `baseUrl`. */
|
|
458
|
-
headers?: Record<string, string>;
|
|
459
|
-
/** The agent/team/workflow to run. Can change between turns. */
|
|
460
|
-
entity?: Entity | null;
|
|
461
|
-
/** User id sent with every run. */
|
|
462
|
-
userId?: string;
|
|
463
|
-
/** Initial session id; updated automatically once the backend assigns one. */
|
|
464
|
-
sessionId?: string;
|
|
465
|
-
/** Pre-seed the transcript (e.g. when restoring a session). */
|
|
466
|
-
initialMessages?: ChatMessage[];
|
|
467
|
-
/** Called with every raw run event, for logging/telemetry. */
|
|
468
|
-
onEvent?: (event: RunEventData) => void;
|
|
469
|
-
/** Called when the session id changes (e.g. first run of a new session). */
|
|
470
|
-
onSessionId?: (sessionId: string) => void;
|
|
471
|
-
}
|
|
472
|
-
interface SendOptions {
|
|
473
|
-
files?: File[];
|
|
474
|
-
}
|
|
475
|
-
interface UseAgnoChat {
|
|
476
|
-
/** Full transcript, oldest first. */
|
|
477
|
-
messages: ChatMessage[];
|
|
478
|
-
/** The agent message currently streaming, or null when idle. */
|
|
479
|
-
streamingMessage: ChatMessage | null;
|
|
480
|
-
/** Every raw event from the current/most-recent run, in arrival order. */
|
|
481
|
-
events: RunEventData[];
|
|
482
|
-
/** The most recent raw event. */
|
|
483
|
-
currentEvent: RunEventData | null;
|
|
484
|
-
/** Lifecycle status of the active run. */
|
|
485
|
-
status: ChatStatus;
|
|
486
|
-
/** Live "what is it doing" label, e.g. "Calling get_weather". */
|
|
487
|
-
activity: string | null;
|
|
488
|
-
isStreaming: boolean;
|
|
489
|
-
isPaused: boolean;
|
|
490
|
-
error: string | null;
|
|
491
|
-
sessionId: string | undefined;
|
|
492
|
-
/** Type of the selected entity (agent / team / workflow). */
|
|
493
|
-
entityType: EntityType | undefined;
|
|
494
|
-
/** Tool calls of the active/most-recent agent message. */
|
|
495
|
-
tools: ToolExecution[];
|
|
496
|
-
/** Reasoning steps of the active/most-recent agent message. */
|
|
497
|
-
reasoning: ChatMessage['reasoning_steps'];
|
|
498
|
-
/** Outstanding human-in-the-loop requirements, if the run is paused. */
|
|
499
|
-
pendingRequirements: RunRequirement[];
|
|
500
|
-
/** Past sessions for the selected entity (populated by `refreshSessions`). */
|
|
501
|
-
sessions: SessionEntry[];
|
|
502
|
-
sessionsLoading: boolean;
|
|
503
|
-
/** Send a user message and stream the response. */
|
|
504
|
-
sendMessage: (message: string, options?: SendOptions) => Promise<void>;
|
|
505
|
-
/** Stop the active run. */
|
|
506
|
-
cancel: () => Promise<void>;
|
|
507
|
-
/** Continue a paused run with explicitly resolved requirements. */
|
|
508
|
-
continueRun: (resolution: {
|
|
509
|
-
tools?: ToolExecution[];
|
|
510
|
-
stepRequirements?: unknown[];
|
|
511
|
-
}) => Promise<void>;
|
|
512
|
-
/** Approve or reject all pending tool confirmations, then continue. */
|
|
513
|
-
respondToConfirmation: (approve: boolean) => Promise<void>;
|
|
514
|
-
/** Provide values for pending tool user-input fields, then continue. */
|
|
515
|
-
submitUserInput: (values: Record<string, unknown>) => Promise<void>;
|
|
516
|
-
/** Fetch the list of past sessions for the selected entity. */
|
|
517
|
-
refreshSessions: () => Promise<void>;
|
|
518
|
-
/** Load a past session's transcript into the chat. */
|
|
519
|
-
loadSession: (sessionId: string) => Promise<void>;
|
|
520
|
-
/** Delete a past session, removing it from the list. */
|
|
521
|
-
deleteSession: (sessionId: string) => Promise<void>;
|
|
522
|
-
/** Clear the transcript and start a new session. */
|
|
523
|
-
reset: () => void;
|
|
524
|
-
/** Replace the transcript (e.g. after loading a session from the backend). */
|
|
525
|
-
setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
|
|
526
|
-
/** The underlying client, for ad-hoc calls (sessions, discovery, …). */
|
|
527
|
-
client: AgnoClient;
|
|
528
|
-
}
|
|
529
|
-
declare function useAgnoChat(options: UseAgnoChatOptions): UseAgnoChat;
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* Helpers for turning AgentOS session history into render-ready chat messages.
|
|
533
|
-
*
|
|
534
|
-
* `GET /sessions/{id}/runs` returns an array of run records. Each run carries
|
|
535
|
-
* the user input plus the agent's content, tools, reasoning, references and
|
|
536
|
-
* media — enough to reconstruct the transcript for a past session.
|
|
537
|
-
*/
|
|
538
|
-
|
|
539
|
-
interface SessionRun {
|
|
540
|
-
run_id?: string;
|
|
541
|
-
session_id?: string;
|
|
542
|
-
run_input?: unknown;
|
|
543
|
-
content?: unknown;
|
|
544
|
-
created_at?: number;
|
|
545
|
-
status?: string;
|
|
546
|
-
tools?: ToolExecution[];
|
|
547
|
-
images?: ChatMessage['images'];
|
|
548
|
-
videos?: ChatMessage['videos'];
|
|
549
|
-
audio?: ChatMessage['audio'];
|
|
550
|
-
response_audio?: ChatMessage['response_audio'];
|
|
551
|
-
extra_data?: {
|
|
552
|
-
reasoning_steps?: ReasoningStep[];
|
|
553
|
-
references?: ReferenceData[];
|
|
554
|
-
};
|
|
555
|
-
reasoning_steps?: ReasoningStep[];
|
|
556
|
-
references?: ReferenceData[];
|
|
557
|
-
}
|
|
558
|
-
/** Convert the runs of a session into an ordered list of chat messages. */
|
|
559
|
-
declare function sessionRunsToMessages(runs: SessionRun[]): ChatMessage[];
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Helpers for classifying run events and turning them into UI labels.
|
|
563
|
-
*
|
|
564
|
-
* Agent, team and workflow events share shapes but use different name prefixes
|
|
565
|
-
* (e.g. `RunContent` vs `TeamRunContent`). These helpers let the rest of the
|
|
566
|
-
* library treat them uniformly.
|
|
567
|
-
*/
|
|
568
|
-
|
|
569
|
-
declare const isContentEvent: (e: RunEventData) => boolean;
|
|
570
|
-
declare const isCompletedEvent: (e: RunEventData) => boolean;
|
|
571
|
-
declare const isErrorEvent: (e: RunEventData) => boolean;
|
|
572
|
-
declare const isPausedEvent: (e: RunEventData) => boolean;
|
|
573
|
-
declare const isToolEvent: (e: RunEventData) => boolean;
|
|
574
|
-
declare const isReasoningStepEvent: (e: RunEventData) => boolean;
|
|
575
|
-
/**
|
|
576
|
-
* A nested-run event — a team member's turn or a workflow step executor.
|
|
577
|
-
* Identified by a `parent_run_id` on an agent/team content/tool/run event.
|
|
578
|
-
*/
|
|
579
|
-
declare function isSubRunEvent(e: RunEventData): boolean;
|
|
580
|
-
/** A workflow step lifecycle event (start / output / complete / error). */
|
|
581
|
-
declare function isStepEvent(e: RunEventData): boolean;
|
|
582
|
-
/** Tool executions carried by an event, from either the single or array field. */
|
|
583
|
-
declare function toolsFromEvent(e: RunEventData): ToolExecution[];
|
|
584
|
-
/**
|
|
585
|
-
* A short human-readable label describing what a run is doing at the moment of
|
|
586
|
-
* this event — for a live status line ("Calling get_weather", "Reasoning…").
|
|
587
|
-
* Returns null for events that don't warrant a status change.
|
|
588
|
-
*/
|
|
589
|
-
declare function activityLabel(e: RunEventData): string | null;
|
|
590
|
-
/** Apply a nested member/executor run event into a message's `members`. */
|
|
591
|
-
declare function applySubRunEvent(message: ChatMessage, e: RunEventData, kind: SubRun['kind']): ChatMessage;
|
|
592
|
-
/** Apply a workflow `Step*` event into a message's `steps`. */
|
|
593
|
-
declare function applyStepEvent(message: ChatMessage, e: RunEventData): ChatMessage;
|
|
594
|
-
/** Merge a tool execution into a list, updating an existing entry by id/name. */
|
|
595
|
-
declare function mergeTool(list: ToolExecution[], tool: ToolExecution): ToolExecution[];
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* A tiny dependency-free Markdown renderer covering the subset commonly used in
|
|
599
|
-
* chat: fenced code blocks, inline code, bold/italic, links, headings and
|
|
600
|
-
* lists. It renders React nodes (no dangerouslySetInnerHTML).
|
|
601
|
-
*
|
|
602
|
-
* Need full Markdown (tables, GFM, math)? Pass your own renderer via the
|
|
603
|
-
* `renderMarkdown` prop on the chat components, e.g. one backed by
|
|
604
|
-
* `react-markdown`.
|
|
605
|
-
*/
|
|
606
|
-
|
|
607
|
-
interface MarkdownProps {
|
|
608
|
-
content: string;
|
|
609
|
-
className?: string;
|
|
610
|
-
}
|
|
611
|
-
declare function Markdown({ content, className }: MarkdownProps): React$1.ReactElement;
|
|
612
|
-
type RenderMarkdown = (content: string) => React$1.ReactNode;
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Zero-wiring chat widget. Point it at an AgentOS URL and it discovers the
|
|
616
|
-
* available agents/teams/workflows, lets the user pick one, and runs a full
|
|
617
|
-
* streaming chat — transcript, tools, reasoning, media, human-in-the-loop, and
|
|
618
|
-
* an optional live event log.
|
|
619
|
-
*
|
|
620
|
-
* For finer control (custom layout, auth headers, session restore), call
|
|
621
|
-
* `useAgnoChat` directly and render `<ChatWindow>`.
|
|
622
|
-
*/
|
|
623
|
-
|
|
624
|
-
interface AgnoChatProps {
|
|
625
|
-
/** AgentOS base URL, e.g. "http://localhost:7777". */
|
|
626
|
-
baseUrl?: string;
|
|
627
|
-
/** Pre-built client (overrides baseUrl); use for shared auth/headers. */
|
|
628
|
-
client?: AgnoClient;
|
|
629
|
-
headers?: Record<string, string>;
|
|
630
|
-
userId?: string;
|
|
631
|
-
/** Fix the entity (hides the selector). Otherwise the user picks one. */
|
|
632
|
-
entity?: Entity;
|
|
633
|
-
/** Provide entities explicitly instead of auto-discovering them. */
|
|
634
|
-
entities?: Entity[];
|
|
635
|
-
title?: string;
|
|
636
|
-
placeholder?: string;
|
|
637
|
-
allowFiles?: boolean;
|
|
638
|
-
/** Show the collapsible raw event log. Default false. */
|
|
639
|
-
showEventLog?: boolean;
|
|
640
|
-
/** Show the past-sessions sidebar. Default false. */
|
|
641
|
-
showSessions?: boolean;
|
|
642
|
-
renderMarkdown?: RenderMarkdown;
|
|
643
|
-
className?: string;
|
|
644
|
-
height?: number | string;
|
|
645
|
-
}
|
|
646
|
-
declare function AgnoChat(props: AgnoChatProps): React$1.ReactElement;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* A complete chat surface built from a `useAgnoChat` result. Pass the hook's
|
|
650
|
-
* return value as `chat`; this renders the transcript, the live status, the
|
|
651
|
-
* human-in-the-loop panel, and the input box.
|
|
652
|
-
*
|
|
653
|
-
* Use this when you call `useAgnoChat` yourself (so you control the entity,
|
|
654
|
-
* session, headers, etc.). For a zero-wiring widget, use `<AgnoChat>`.
|
|
655
|
-
*/
|
|
656
|
-
|
|
657
|
-
interface ChatWindowProps {
|
|
658
|
-
chat: UseAgnoChat;
|
|
659
|
-
placeholder?: string;
|
|
660
|
-
emptyState?: React$1.ReactNode;
|
|
661
|
-
allowFiles?: boolean;
|
|
662
|
-
disabled?: boolean;
|
|
663
|
-
renderMarkdown?: RenderMarkdown;
|
|
664
|
-
className?: string;
|
|
665
|
-
}
|
|
666
|
-
declare function ChatWindow({ chat, placeholder, emptyState, allowFiles, disabled, renderMarkdown, className, }: ChatWindowProps): React$1.ReactElement;
|
|
667
|
-
|
|
668
|
-
/** Scrollable transcript that auto-sticks to the bottom while streaming. */
|
|
669
|
-
|
|
670
|
-
interface MessageListProps {
|
|
671
|
-
messages: ChatMessage[];
|
|
672
|
-
status: ChatStatus;
|
|
673
|
-
activity?: string | null;
|
|
674
|
-
renderMarkdown?: RenderMarkdown;
|
|
675
|
-
emptyState?: React$1.ReactNode;
|
|
676
|
-
/** Rendered after the last message (e.g. a human-in-the-loop panel). */
|
|
677
|
-
footer?: React$1.ReactNode;
|
|
678
|
-
}
|
|
679
|
-
declare function MessageList({ messages, status, activity, renderMarkdown, emptyState, footer, }: MessageListProps): React$1.ReactElement;
|
|
680
|
-
|
|
681
|
-
/** Renders a single chat message: content, tools, reasoning, media, citations. */
|
|
682
|
-
|
|
683
|
-
interface MessageProps {
|
|
684
|
-
message: ChatMessage;
|
|
685
|
-
/** Override the Markdown renderer (e.g. plug in react-markdown). */
|
|
686
|
-
renderMarkdown?: RenderMarkdown;
|
|
687
|
-
/** Live activity label, shown inside the bubble while streaming with no content yet. */
|
|
688
|
-
activity?: string | null;
|
|
689
|
-
/** Hide the reasoning panel. */
|
|
690
|
-
hideReasoning?: boolean;
|
|
691
|
-
/** Hide tool calls. */
|
|
692
|
-
hideTools?: boolean;
|
|
693
|
-
}
|
|
694
|
-
declare function Message({ message, renderMarkdown, activity, hideReasoning, hideTools }: MessageProps): React$1.ReactElement;
|
|
695
|
-
|
|
696
|
-
/** Multiline chat input with optional file attachments, send and stop. */
|
|
697
|
-
|
|
698
|
-
interface ChatInputProps {
|
|
699
|
-
onSend: (message: string, files?: File[]) => void;
|
|
700
|
-
onStop?: () => void;
|
|
701
|
-
disabled?: boolean;
|
|
702
|
-
busy?: boolean;
|
|
703
|
-
placeholder?: string;
|
|
704
|
-
/** Allow attaching files. */
|
|
705
|
-
allowFiles?: boolean;
|
|
706
|
-
}
|
|
707
|
-
declare function ChatInput({ onSend, onStop, disabled, busy, placeholder, allowFiles, }: ChatInputProps): React$1.ReactElement;
|
|
708
|
-
|
|
709
|
-
/** Renders the tool calls attached to a message: name, args, result, status. */
|
|
710
|
-
|
|
711
|
-
declare function ToolCalls({ tools }: {
|
|
712
|
-
tools?: ToolExecution[];
|
|
713
|
-
}): React$1.ReactElement | null;
|
|
714
|
-
|
|
715
|
-
/** Renders a message's reasoning steps in a collapsible panel. */
|
|
716
|
-
|
|
717
|
-
declare function Reasoning({ steps, defaultOpen, }: {
|
|
718
|
-
steps?: ReasoningStep[];
|
|
719
|
-
defaultOpen?: boolean;
|
|
720
|
-
}): React$1.ReactElement | null;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Renders the nested runs of a team or workflow turn — each team member's
|
|
724
|
-
* response (or each workflow step's executor) as a collapsible card with the
|
|
725
|
-
* member's name, streamed content and tool calls.
|
|
726
|
-
*/
|
|
727
|
-
|
|
728
|
-
declare function MemberResponses({ members, renderMarkdown, title, }: {
|
|
729
|
-
members?: SubRun[];
|
|
730
|
-
renderMarkdown?: RenderMarkdown;
|
|
731
|
-
title?: string;
|
|
732
|
-
}): React$1.ReactElement | null;
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Renders the steps of a workflow run as an ordered progress list, each with a
|
|
736
|
-
* status indicator, the step name, and its collapsible output.
|
|
737
|
-
*/
|
|
738
|
-
|
|
739
|
-
declare function WorkflowSteps({ steps, renderMarkdown, title, }: {
|
|
740
|
-
steps?: WorkflowStep[];
|
|
741
|
-
renderMarkdown?: RenderMarkdown;
|
|
742
|
-
title?: string;
|
|
743
|
-
}): React$1.ReactElement | null;
|
|
744
|
-
|
|
745
|
-
/** Renders reference/citation data attached to a message. */
|
|
746
|
-
|
|
747
|
-
declare function Citations({ references, citations, }: {
|
|
748
|
-
references?: ReferenceData[];
|
|
749
|
-
citations?: Citations$1;
|
|
750
|
-
}): React$1.ReactElement | null;
|
|
751
|
-
|
|
752
|
-
/** Renders images, videos and audio attached to a message. */
|
|
753
|
-
|
|
754
|
-
declare function Multimedia({ images, videos, audio, responseAudio, }: {
|
|
755
|
-
images?: ImageData[];
|
|
756
|
-
videos?: VideoData[];
|
|
757
|
-
audio?: AudioData[];
|
|
758
|
-
responseAudio?: AudioData;
|
|
759
|
-
}): React$1.ReactElement | null;
|
|
760
|
-
|
|
761
|
-
/** A live status line showing what the run is currently doing. */
|
|
762
|
-
|
|
763
|
-
declare function StatusIndicator({ status, activity, }: {
|
|
764
|
-
status: ChatStatus;
|
|
765
|
-
activity?: string | null;
|
|
766
|
-
}): React$1.ReactElement | null;
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* A developer-facing live feed of run events. Consecutive repeats of the same
|
|
770
|
-
* event (e.g. the stream of `RunContent` deltas) are folded into a single row
|
|
771
|
-
* with a count, and each row is labelled with the agent/team/workflow it came
|
|
772
|
-
* from — so a streaming run reads as one "RunContent ×N" line, not hundreds.
|
|
773
|
-
*/
|
|
774
|
-
|
|
775
|
-
declare function EventLog({ events, autoScroll, maxHeight, }: {
|
|
776
|
-
events: RunEventData[];
|
|
777
|
-
autoScroll?: boolean;
|
|
778
|
-
maxHeight?: number;
|
|
779
|
-
}): React$1.ReactElement;
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* Human-in-the-loop panel, styled after the Agno OS chat HITL cards.
|
|
783
|
-
*
|
|
784
|
-
* When a run pauses, each pending tool / requirement renders as its own card:
|
|
785
|
-
* the tool icon + UPPERCASE name, a collapsible Arguments accordion, per-card
|
|
786
|
-
* Approve / Reject controls (with an optional rejection reason), and any
|
|
787
|
-
* requested input fields. Submitting resolves every card and continues the run.
|
|
788
|
-
*/
|
|
789
|
-
|
|
790
|
-
interface HumanInputProps {
|
|
791
|
-
message: ChatMessage;
|
|
792
|
-
entityType?: EntityType;
|
|
793
|
-
busy?: boolean;
|
|
794
|
-
/** Continue the run with the resolved tools (agent/team) or step requirements (workflow). */
|
|
795
|
-
onResolve: (resolution: {
|
|
796
|
-
tools?: ToolExecution[];
|
|
797
|
-
stepRequirements?: unknown[];
|
|
798
|
-
}) => void;
|
|
799
|
-
}
|
|
800
|
-
declare function HumanInput({ message, entityType, busy, onResolve }: HumanInputProps): React$1.ReactElement | null;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* Entity picker styled after the Agno OS chat selector: a compact bordered
|
|
804
|
-
* trigger showing the selection in mono-uppercase, opening a dark popover with
|
|
805
|
-
* muted group labels (Agents / Teams / Workflows) and a check on the active
|
|
806
|
-
* item. Custom popover (no native <select>, no extra deps).
|
|
807
|
-
*/
|
|
808
|
-
|
|
809
|
-
declare function EntitySelector({ entities, value, onChange, disabled, placeholder, }: {
|
|
810
|
-
entities: Entity[];
|
|
811
|
-
value?: Entity | null;
|
|
812
|
-
onChange: (entity: Entity) => void;
|
|
813
|
-
disabled?: boolean;
|
|
814
|
-
placeholder?: string;
|
|
815
|
-
}): React$1.ReactElement;
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* A sidebar listing the past sessions of the selected entity. Clicking a
|
|
819
|
-
* session loads its transcript; the trash icon deletes it.
|
|
820
|
-
*
|
|
821
|
-
* Pair with `useAgnoChat`: pass `chat.sessions`, `chat.loadSession`, etc.
|
|
822
|
-
*/
|
|
823
|
-
|
|
824
|
-
interface SessionListProps {
|
|
825
|
-
sessions: SessionEntry[];
|
|
826
|
-
activeSessionId?: string;
|
|
827
|
-
loading?: boolean;
|
|
828
|
-
onSelect: (sessionId: string) => void;
|
|
829
|
-
onDelete?: (sessionId: string) => void;
|
|
830
|
-
onNew?: () => void;
|
|
831
|
-
title?: string;
|
|
832
|
-
}
|
|
833
|
-
declare function SessionList({ sessions, activeSessionId, loading, onSelect, onDelete, onNew, title, }: SessionListProps): React$1.ReactElement;
|
|
834
|
-
|
|
835
|
-
export { AgnoChat, type AgnoChatProps, AgnoClient, type AgnoClientOptions, type AnyRunEventName, type AudioData, ChatInput, type ChatInputProps, type ChatMessage, type ChatRole, type ChatStatus, ChatWindow, type ChatWindowProps, Citations, type Entity, EntitySelector, type EntityType, EventLog, HumanInput, type HumanInputProps, type ImageData, Markdown, type MarkdownProps, MemberResponses, Message, MessageList, type MessageListProps, type MessageProps, type Model, Multimedia, type Pagination, type PauseType, Reasoning, type ReasoningStep, type Reference, type ReferenceData, type RenderMarkdown, RunEvent, type RunEventData, type RunRequirement, type SendOptions, type SessionEntry, SessionList, type SessionListProps, type SessionsResponse, StatusIndicator, type StreamEvent, type StreamRunOptions, type SubRun, type SubRunStatus, TeamRunEvent, ToolCalls, type ToolExecution, type UseAgnoChat, type UseAgnoChatOptions, type UserInputField, type VideoData, WorkflowRunEvent, type WorkflowStep, WorkflowSteps, activityLabel, applyStepEvent, applySubRunEvent, isCompletedEvent, isContentEvent, isErrorEvent, isPausedEvent, isReasoningStepEvent, isStepEvent, isSubRunEvent, isToolEvent, mergeTool, normaliseBaseUrl, sessionRunsToMessages, streamRun, toolsFromEvent, useAgnoChat };
|
|
1
|
+
export { A as AgnoClient, a as AgnoClientOptions, b as AnyRunEventName, c as AudioData, C as ChatMessage, d as ChatRole, e as ChatStatus, f as CitationsData, E as Entity, g as EntityType, I as ImageData, M as Model, P as Pagination, h as PauseType, R as ReasoningStep, i as Reference, j as ReferenceData, k as RunEvent, l as RunEventData, m as RunRequirement, S as SessionEntry, n as SessionsResponse, o as SubRun, p as SubRunStatus, T as TeamRunEvent, q as ToolExecution, U as UserInputField, V as VideoData, W as WorkflowRunEvent, r as WorkflowStep, s as normaliseBaseUrl } from './client-DUyVqxU9.js';
|
|
2
|
+
export { StreamEvent, StreamRunOptions, activityLabel, applyStepEvent, applySubRunEvent, isCompletedEvent, isContentEvent, isErrorEvent, isFollowupsCompletedEvent, isPausedEvent, isReasoningStepEvent, isStepEvent, isSubRunEvent, isToolEvent, mergeTool, sessionRunsToMessages, streamRun, toolsFromEvent } from './core/index.js';
|
|
3
|
+
export { AgnoChat, AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, ChatClassNames, ChatContextValue, ChatInput, ChatInputProps, ChatLauncher, ChatLauncherProps, ChatProvider, ChatProviderProps, ChatTextareaProps, ChatWindow, ChatWindowProps, Check, ChevronDown, Citations, CitationsProps, Close, Copy, EntityBadge, EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, FileLimits, FilePreview, FilePreviewProps, FileType, FileVideo, Followups, FollowupsProps, Globe, GridLoader, HoverPreview, HoverPreviewProps, HumanInput, HumanInputProps, LauncherPanel, LauncherPosition, LinkComponent, LinkIcon, LinkPreview, LinkPreviewCard, LinkPreviewCardProps, Markdown, MarkdownProps, MemberResponses, Memory, Message, MessageList, MessageListProps, MessageProps, Multimedia, Paperclip, Plus, Pulse, QuickPrompt, QuickPrompts, QuickPromptsProps, Reasoning, RenderMarkdown, Rerun, ResolveLinkPreview, SendOptions, SessionList, SessionListProps, Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, UseAgnoChat, UseAgnoChatOptions, WorkflowSteps, Wrench, admitFiles, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconUrl, fileAccepted, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkComponent, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard } from './chat/index.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'streamdown';
|
|
6
|
+
|
|
7
|
+
/** Class-name helpers shared by every component family. */
|
|
8
|
+
type ClassValue = string | false | null | undefined;
|
|
9
|
+
/** Join truthy class names; returns undefined when nothing is left. */
|
|
10
|
+
declare function cx(...parts: ClassValue[]): string | undefined;
|
|
11
|
+
|
|
12
|
+
export { type ClassValue, cx };
|