@heroui/agent 0.2.0-beta.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/CHANGELOG.md +64 -0
- package/LICENSE +21 -0
- package/README.md +205 -0
- package/dist/chart-content-VZ66GD22.js +1391 -0
- package/dist/chunk-3FG5NRTX.js +9 -0
- package/dist/chunk-CU6MPKAJ.js +359 -0
- package/dist/chunk-DW4AQRM5.js +297 -0
- package/dist/chunk-GDDNN2XY.js +954 -0
- package/dist/chunk-RQCTC4JB.js +1084 -0
- package/dist/chunk-TOOT6SZ2.js +74 -0
- package/dist/chunk-VJA52U5P.js +137 -0
- package/dist/component-renderer-IBJDNXSO.js +9780 -0
- package/dist/contracts.d.ts +1293 -0
- package/dist/contracts.js +2325 -0
- package/dist/css/index.css +2 -0
- package/dist/embed-runtime-XOPQY7Z5.js +7254 -0
- package/dist/identity-NYCXY1mT.d.ts +164 -0
- package/dist/index.d.ts +594 -0
- package/dist/index.js +28 -0
- package/dist/interactive-map-surface-67KHT3VB.js +362 -0
- package/dist/next.d.ts +4 -0
- package/dist/next.js +22 -0
- package/dist/server.d.ts +31 -0
- package/dist/server.js +256 -0
- package/package.json +133 -0
|
@@ -0,0 +1,1293 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { T as TrustedAgentClientData, S as SignedTrustedAgentClientData } from './identity-NYCXY1mT.js';
|
|
3
|
+
export { A as AGENT_CONVERSATION_SOURCE, a as AgentAuthIdentity, b as AgentAuthProfile, c as AgentAuthToken, d as AgentConversationSource, e as AgentProjectConfig, f as AgentSurfaceVariant, g as AgentTheme, h as AgentTokenClaims, C as CreateAgentAuthTokenRequest, i as agentAuthIdentitySchema, j as agentAuthProfileSchema, k as agentAuthTokenSchema, l as agentIdentityIdSchema, m as agentProjectConfigSchema, n as agentSurfaceVariantSchema, o as agentThemeSchema, p as agentTokenClaimsSchema, q as createAgentAuthTokenRequestSchema, r as pageContextSchema, s as signedTrustedAgentClientDataSchema, t as trustedAgentClientDataSchema } from './identity-NYCXY1mT.js';
|
|
4
|
+
import { UIMessage } from 'ai';
|
|
5
|
+
|
|
6
|
+
/** Maximum number of files accepted on one HeroUI Agent message. */
|
|
7
|
+
declare const HEROUI_AGENT_MAX_ATTACHMENTS = 5;
|
|
8
|
+
/** Maximum stored size for one HeroUI Agent attachment (10 MiB). */
|
|
9
|
+
declare const HEROUI_AGENT_ATTACHMENT_MAX_BYTES: number;
|
|
10
|
+
/**
|
|
11
|
+
* File types that the hosted model pipeline can process consistently.
|
|
12
|
+
*
|
|
13
|
+
* SVG and office/archive formats are intentionally excluded: SVG can carry
|
|
14
|
+
* active content, while provider support for zipped document formats varies.
|
|
15
|
+
*/
|
|
16
|
+
declare const HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE: {
|
|
17
|
+
readonly "application/json": "json";
|
|
18
|
+
readonly "application/pdf": "pdf";
|
|
19
|
+
readonly "image/gif": "gif";
|
|
20
|
+
readonly "image/jpeg": "jpg";
|
|
21
|
+
readonly "image/png": "png";
|
|
22
|
+
readonly "image/webp": "webp";
|
|
23
|
+
readonly "text/csv": "csv";
|
|
24
|
+
readonly "text/markdown": "md";
|
|
25
|
+
readonly "text/plain": "txt";
|
|
26
|
+
readonly "text/tab-separated-values": "tsv";
|
|
27
|
+
};
|
|
28
|
+
type HeroUIAgentAttachmentContentType = keyof typeof HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE;
|
|
29
|
+
declare const HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES: readonly ("application/json" | "application/pdf" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | "text/csv" | "text/markdown" | "text/plain" | "text/tab-separated-values")[];
|
|
30
|
+
declare const HEROUI_AGENT_ATTACHMENT_ACCEPT: string;
|
|
31
|
+
declare const HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES: ReadonlySet<string>;
|
|
32
|
+
declare function isHeroUIAgentAttachmentContentType(value: string): value is HeroUIAgentAttachmentContentType;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Public remote configuration document served by
|
|
36
|
+
* `GET /v1/agents/:agentId/appearance`.
|
|
37
|
+
*
|
|
38
|
+
* Validated by hand rather than with Zod on purpose: the embed reads this
|
|
39
|
+
* document on the panel-shell tier, which has to paint without loading any
|
|
40
|
+
* third-party runtime dependency. See `scripts/check-bundle-size.mjs`.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Shape version of the document.
|
|
45
|
+
*
|
|
46
|
+
* Bumped only when the document changes in a way an older SDK cannot read. An
|
|
47
|
+
* unrecognized version is ignored rather than rejected loudly, so a bump
|
|
48
|
+
* degrades to "no remote configuration" instead of a broken embed.
|
|
49
|
+
*/
|
|
50
|
+
declare const HEROUI_AGENT_REMOTE_CONFIG_VERSION = 1;
|
|
51
|
+
type AgentRemoteThemeColor = string | {
|
|
52
|
+
dark?: string;
|
|
53
|
+
light?: string;
|
|
54
|
+
};
|
|
55
|
+
type AgentRemoteConfig = {
|
|
56
|
+
appearance?: {
|
|
57
|
+
launcher?: {
|
|
58
|
+
background?: AgentRemoteThemeColor;
|
|
59
|
+
icon?: string;
|
|
60
|
+
position?: "bottom-left" | "bottom-right";
|
|
61
|
+
style?: Record<string, string>;
|
|
62
|
+
};
|
|
63
|
+
panel?: {
|
|
64
|
+
expandable?: boolean;
|
|
65
|
+
expanded?: boolean;
|
|
66
|
+
initialHeight?: number | string;
|
|
67
|
+
initialWidth?: number | string;
|
|
68
|
+
};
|
|
69
|
+
theme?: {
|
|
70
|
+
colorScheme?: "dark" | "light" | "system";
|
|
71
|
+
colors?: {
|
|
72
|
+
accent?: AgentRemoteThemeColor;
|
|
73
|
+
background?: AgentRemoteThemeColor;
|
|
74
|
+
foreground?: AgentRemoteThemeColor;
|
|
75
|
+
overlay?: AgentRemoteThemeColor;
|
|
76
|
+
surface?: AgentRemoteThemeColor;
|
|
77
|
+
surfaceSecondary?: AgentRemoteThemeColor;
|
|
78
|
+
tooltip?: AgentRemoteThemeColor;
|
|
79
|
+
};
|
|
80
|
+
designTheme?: "base" | "brutalism" | "glass" | "mouve";
|
|
81
|
+
radius?: "pill" | "round" | "sharp" | "soft";
|
|
82
|
+
typography?: {
|
|
83
|
+
baseSize?: number;
|
|
84
|
+
fontFamily?: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
viewMode?: "floating" | "sidebar";
|
|
88
|
+
};
|
|
89
|
+
capabilities?: {
|
|
90
|
+
imageSearch?: boolean;
|
|
91
|
+
webSearch?: boolean;
|
|
92
|
+
};
|
|
93
|
+
composer?: {
|
|
94
|
+
attachments?: HeroUIAgentAttachmentContentType[] | false;
|
|
95
|
+
defaultModel?: string;
|
|
96
|
+
dictation?: boolean;
|
|
97
|
+
disclaimer?: string | false;
|
|
98
|
+
modelPicker?: boolean;
|
|
99
|
+
placeholder?: string;
|
|
100
|
+
};
|
|
101
|
+
markdown?: {
|
|
102
|
+
animated?: false | {
|
|
103
|
+
animation: "blurIn" | "fadeIn" | "slideUp";
|
|
104
|
+
[key: string]: unknown;
|
|
105
|
+
};
|
|
106
|
+
caret?: "block" | "circle" | false;
|
|
107
|
+
};
|
|
108
|
+
permissions?: {
|
|
109
|
+
defaultMode?: "ask" | "auto" | "full";
|
|
110
|
+
showPicker?: boolean;
|
|
111
|
+
};
|
|
112
|
+
responseActions?: ("copy" | "feedback" | "retry")[] | false;
|
|
113
|
+
startScreen?: {
|
|
114
|
+
greeting?: string;
|
|
115
|
+
promptShortcuts?: boolean;
|
|
116
|
+
prompts?: string[];
|
|
117
|
+
};
|
|
118
|
+
/** Opaque cache validator; the SDK echoes it back as `If-None-Match`. */
|
|
119
|
+
revision: string;
|
|
120
|
+
version: number;
|
|
121
|
+
/**
|
|
122
|
+
* Webfont backing `appearance.theme.typography.fontFamily`. The SDK loads it
|
|
123
|
+
* into the host document, since the host page has no reason to have it.
|
|
124
|
+
*/
|
|
125
|
+
webfont?: {
|
|
126
|
+
familyName: string;
|
|
127
|
+
fontFaceUrl?: string;
|
|
128
|
+
stylesheetUrl?: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Parses an untrusted remote configuration payload.
|
|
133
|
+
*
|
|
134
|
+
* Returns `null` for anything unusable so callers fall back to local defaults.
|
|
135
|
+
* A single malformed field costs only the group it belongs to — discarding a
|
|
136
|
+
* customer's entire configuration over one bad color would be a far worse
|
|
137
|
+
* failure than losing one group.
|
|
138
|
+
*/
|
|
139
|
+
declare function parseAgentRemoteConfig(value: unknown): AgentRemoteConfig | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Small semantic icon vocabulary for model-generated UI. Keeping this list
|
|
143
|
+
* closed makes payloads deterministic and prevents arbitrary icon imports.
|
|
144
|
+
*/
|
|
145
|
+
declare const agentIconNames: readonly ["activity", "alert", "briefcase", "calendar", "chart", "check", "clock", "code", "credit-card", "database", "device-desktop", "device-mobile", "document", "dollar", "flag", "globe", "heart", "home", "info", "lightning", "location", "mail", "percent", "person", "question", "receipt", "rocket", "route", "search", "shopping-bag", "speedometer", "star", "tag", "target", "users"];
|
|
146
|
+
type AgentIconName = (typeof agentIconNames)[number];
|
|
147
|
+
type NumberFormat = {
|
|
148
|
+
compact?: boolean;
|
|
149
|
+
style: "number";
|
|
150
|
+
} | {
|
|
151
|
+
maximumFractionDigits?: number;
|
|
152
|
+
style: "percent";
|
|
153
|
+
} | {
|
|
154
|
+
compact?: boolean;
|
|
155
|
+
currency: string;
|
|
156
|
+
style: "currency";
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Theme-aware chart colors safe for model-generated UI. Semantic colors adapt
|
|
160
|
+
* to light/dark themes; chart-1..5 expose the host application's chart palette.
|
|
161
|
+
*/
|
|
162
|
+
type ChartColor = "accent" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "danger" | "default" | "success" | "warning";
|
|
163
|
+
type ComponentBase = {
|
|
164
|
+
description?: string;
|
|
165
|
+
id: string;
|
|
166
|
+
title: string;
|
|
167
|
+
};
|
|
168
|
+
type Datum = Record<string, boolean | null | number | string>;
|
|
169
|
+
type CartesianSeries = {
|
|
170
|
+
color?: ChartColor;
|
|
171
|
+
dataKey: string;
|
|
172
|
+
format?: NumberFormat;
|
|
173
|
+
label: string;
|
|
174
|
+
};
|
|
175
|
+
type CartesianRange = {
|
|
176
|
+
id: string;
|
|
177
|
+
label: string;
|
|
178
|
+
maxItems?: number;
|
|
179
|
+
};
|
|
180
|
+
type CartesianComponent = ComponentBase & {
|
|
181
|
+
data: Datum[];
|
|
182
|
+
defaultRangeId?: string;
|
|
183
|
+
ranges?: CartesianRange[];
|
|
184
|
+
series: CartesianSeries[];
|
|
185
|
+
showSummary?: boolean;
|
|
186
|
+
xKey: string;
|
|
187
|
+
};
|
|
188
|
+
type MetricGridComponent = ComponentBase & {
|
|
189
|
+
kind: "metric-grid";
|
|
190
|
+
metrics: Array<{
|
|
191
|
+
change?: number;
|
|
192
|
+
format?: NumberFormat;
|
|
193
|
+
icon?: AgentIconName;
|
|
194
|
+
label: string;
|
|
195
|
+
value: number;
|
|
196
|
+
}>;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Headline KPIs that each carry the series behind the number, drawn as a
|
|
200
|
+
* sparkline beside the value. `metric-grid` covers the same KPIs when no history
|
|
201
|
+
* is available; this kind exists so the trend is never faked from a single point.
|
|
202
|
+
*/
|
|
203
|
+
type KpiGridComponent = ComponentBase & {
|
|
204
|
+
kind: "kpi-grid";
|
|
205
|
+
metrics: Array<{
|
|
206
|
+
change?: number;
|
|
207
|
+
color?: ChartColor;
|
|
208
|
+
format?: NumberFormat;
|
|
209
|
+
icon?: AgentIconName;
|
|
210
|
+
label: string;
|
|
211
|
+
/** Oldest to newest. The last point should agree with `value`. */
|
|
212
|
+
trend: number[];
|
|
213
|
+
value: number;
|
|
214
|
+
}>;
|
|
215
|
+
};
|
|
216
|
+
type LineChartComponent = CartesianComponent & {
|
|
217
|
+
kind: "line-chart";
|
|
218
|
+
};
|
|
219
|
+
type AreaChartComponent = CartesianComponent & {
|
|
220
|
+
kind: "area-chart";
|
|
221
|
+
stacked?: boolean;
|
|
222
|
+
};
|
|
223
|
+
type BarChartComponent = CartesianComponent & {
|
|
224
|
+
kind: "bar-chart";
|
|
225
|
+
layout?: "horizontal" | "vertical";
|
|
226
|
+
stacked?: boolean;
|
|
227
|
+
};
|
|
228
|
+
type ComposedChartSeries = CartesianSeries & {
|
|
229
|
+
axis?: "left" | "right";
|
|
230
|
+
stacked?: boolean;
|
|
231
|
+
type: "area" | "bar" | "line";
|
|
232
|
+
};
|
|
233
|
+
type ComposedChartComponent = Omit<CartesianComponent, "series"> & {
|
|
234
|
+
kind: "composed-chart";
|
|
235
|
+
series: ComposedChartSeries[];
|
|
236
|
+
};
|
|
237
|
+
type PieChartComponent = ComponentBase & {
|
|
238
|
+
colors?: Record<string, ChartColor>;
|
|
239
|
+
data: Datum[];
|
|
240
|
+
format?: NumberFormat;
|
|
241
|
+
kind: "pie-chart";
|
|
242
|
+
labelKey: string;
|
|
243
|
+
valueKey: string;
|
|
244
|
+
};
|
|
245
|
+
type DonutChartComponent = Omit<PieChartComponent, "kind"> & {
|
|
246
|
+
kind: "donut-chart";
|
|
247
|
+
};
|
|
248
|
+
type RadarChartComponent = ComponentBase & {
|
|
249
|
+
angleKey: string;
|
|
250
|
+
data: Datum[];
|
|
251
|
+
kind: "radar-chart";
|
|
252
|
+
series: CartesianSeries[];
|
|
253
|
+
};
|
|
254
|
+
type RadialChartComponent = ComponentBase & {
|
|
255
|
+
colors?: Record<string, ChartColor>;
|
|
256
|
+
data: Datum[];
|
|
257
|
+
endAngle?: number;
|
|
258
|
+
format?: NumberFormat;
|
|
259
|
+
kind: "radial-chart";
|
|
260
|
+
labelKey: string;
|
|
261
|
+
maxValue?: number;
|
|
262
|
+
startAngle?: number;
|
|
263
|
+
valueKey: string;
|
|
264
|
+
};
|
|
265
|
+
type SankeyChartComponent = ComponentBase & {
|
|
266
|
+
format?: NumberFormat;
|
|
267
|
+
kind: "sankey-chart";
|
|
268
|
+
links: Array<{
|
|
269
|
+
source: string;
|
|
270
|
+
target: string;
|
|
271
|
+
value: number;
|
|
272
|
+
}>;
|
|
273
|
+
nodes: Array<{
|
|
274
|
+
id: string;
|
|
275
|
+
label: string;
|
|
276
|
+
}>;
|
|
277
|
+
};
|
|
278
|
+
type ScatterChartComponent = ComponentBase & {
|
|
279
|
+
colors?: Record<string, ChartColor>;
|
|
280
|
+
data: Datum[];
|
|
281
|
+
format?: NumberFormat;
|
|
282
|
+
groupKey?: string;
|
|
283
|
+
kind: "scatter-chart";
|
|
284
|
+
labelKey?: string;
|
|
285
|
+
sizeKey?: string;
|
|
286
|
+
xKey: string;
|
|
287
|
+
yKey: string;
|
|
288
|
+
};
|
|
289
|
+
type HeatmapComponent = ComponentBase & {
|
|
290
|
+
color?: ChartColor;
|
|
291
|
+
data: Datum[];
|
|
292
|
+
format?: NumberFormat;
|
|
293
|
+
kind: "heatmap";
|
|
294
|
+
valueKey: string;
|
|
295
|
+
xKey: string;
|
|
296
|
+
yKey: string;
|
|
297
|
+
};
|
|
298
|
+
type DataTableComponent = ComponentBase & {
|
|
299
|
+
columns: Array<{
|
|
300
|
+
format?: NumberFormat;
|
|
301
|
+
key: string;
|
|
302
|
+
label: string;
|
|
303
|
+
}>;
|
|
304
|
+
filterable?: boolean;
|
|
305
|
+
kind: "data-table";
|
|
306
|
+
rows: Datum[];
|
|
307
|
+
variant?: "primary" | "secondary";
|
|
308
|
+
};
|
|
309
|
+
type ComparisonListComponent = ComponentBase & {
|
|
310
|
+
items: Array<{
|
|
311
|
+
change?: number;
|
|
312
|
+
format?: NumberFormat;
|
|
313
|
+
label: string;
|
|
314
|
+
note?: string;
|
|
315
|
+
value: number;
|
|
316
|
+
}>;
|
|
317
|
+
kind: "comparison-list";
|
|
318
|
+
};
|
|
319
|
+
type MeterTone = "accent" | "danger" | "default" | "success" | "warning";
|
|
320
|
+
type MeterListComponent = ComponentBase & {
|
|
321
|
+
items: Array<{
|
|
322
|
+
description?: string;
|
|
323
|
+
format?: NumberFormat;
|
|
324
|
+
id: string;
|
|
325
|
+
label: string;
|
|
326
|
+
max?: number;
|
|
327
|
+
min?: number;
|
|
328
|
+
tone?: MeterTone;
|
|
329
|
+
value: number;
|
|
330
|
+
}>;
|
|
331
|
+
kind: "meter-list";
|
|
332
|
+
};
|
|
333
|
+
type FieldBase = {
|
|
334
|
+
description?: string;
|
|
335
|
+
label: string;
|
|
336
|
+
name: string;
|
|
337
|
+
required?: boolean;
|
|
338
|
+
};
|
|
339
|
+
type FormDateRange = {
|
|
340
|
+
end: string;
|
|
341
|
+
start: string;
|
|
342
|
+
};
|
|
343
|
+
type FormField = (FieldBase & {
|
|
344
|
+
defaultValue?: string;
|
|
345
|
+
inputType?: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
|
|
346
|
+
kind: "input";
|
|
347
|
+
placeholder?: string;
|
|
348
|
+
}) | (FieldBase & {
|
|
349
|
+
defaultValue?: string;
|
|
350
|
+
kind: "textarea";
|
|
351
|
+
placeholder?: string;
|
|
352
|
+
rows?: number;
|
|
353
|
+
}) | (FieldBase & {
|
|
354
|
+
defaultValue?: string;
|
|
355
|
+
kind: "select" | "radio-group";
|
|
356
|
+
options: Array<{
|
|
357
|
+
label: string;
|
|
358
|
+
value: string;
|
|
359
|
+
}>;
|
|
360
|
+
placeholder?: string;
|
|
361
|
+
}) | (FieldBase & {
|
|
362
|
+
defaultValue?: string[];
|
|
363
|
+
kind: "checkbox-group";
|
|
364
|
+
options: Array<{
|
|
365
|
+
label: string;
|
|
366
|
+
value: string;
|
|
367
|
+
}>;
|
|
368
|
+
}) | (FieldBase & {
|
|
369
|
+
defaultValue?: string[];
|
|
370
|
+
kind: "combobox";
|
|
371
|
+
/**
|
|
372
|
+
* Longer option lists than a select can carry, because the field filters
|
|
373
|
+
* as the user types instead of asking them to scan.
|
|
374
|
+
*/
|
|
375
|
+
options: Array<{
|
|
376
|
+
description?: string;
|
|
377
|
+
label: string;
|
|
378
|
+
value: string;
|
|
379
|
+
}>;
|
|
380
|
+
placeholder?: string;
|
|
381
|
+
selectionMode?: "multiple" | "single";
|
|
382
|
+
}) | (FieldBase & {
|
|
383
|
+
defaultValue?: number;
|
|
384
|
+
kind: "slider";
|
|
385
|
+
max: number;
|
|
386
|
+
min: number;
|
|
387
|
+
step?: number;
|
|
388
|
+
}) | (FieldBase & {
|
|
389
|
+
defaultValue?: number;
|
|
390
|
+
format?: NumberFormat;
|
|
391
|
+
kind: "number";
|
|
392
|
+
max?: number;
|
|
393
|
+
min?: number;
|
|
394
|
+
placeholder?: string;
|
|
395
|
+
step?: number;
|
|
396
|
+
}) | (FieldBase & {
|
|
397
|
+
defaultValue?: boolean;
|
|
398
|
+
kind: "switch";
|
|
399
|
+
}) | (FieldBase & {
|
|
400
|
+
defaultValue?: string;
|
|
401
|
+
kind: "date-picker";
|
|
402
|
+
max?: string;
|
|
403
|
+
min?: string;
|
|
404
|
+
}) | (FieldBase & {
|
|
405
|
+
defaultValue?: FormDateRange;
|
|
406
|
+
kind: "date-range-picker";
|
|
407
|
+
max?: string;
|
|
408
|
+
min?: string;
|
|
409
|
+
}) | (FieldBase & {
|
|
410
|
+
defaultValue?: string;
|
|
411
|
+
hourCycle?: 12 | 24;
|
|
412
|
+
kind: "time-field";
|
|
413
|
+
max?: string;
|
|
414
|
+
min?: string;
|
|
415
|
+
});
|
|
416
|
+
type FormComponent = ComponentBase & {
|
|
417
|
+
actions: ComponentActionSpec[];
|
|
418
|
+
fields: FormField[];
|
|
419
|
+
kind: "form";
|
|
420
|
+
};
|
|
421
|
+
type TextComponent = ComponentBase & {
|
|
422
|
+
content: string;
|
|
423
|
+
kind: "text";
|
|
424
|
+
variant?: "card" | "clear";
|
|
425
|
+
};
|
|
426
|
+
type CalloutComponent = ComponentBase & {
|
|
427
|
+
content: string;
|
|
428
|
+
icon?: AgentIconName;
|
|
429
|
+
kind: "callout";
|
|
430
|
+
tone?: "accent" | "danger" | "neutral" | "success" | "warning";
|
|
431
|
+
};
|
|
432
|
+
type ImageComponent = ComponentBase & {
|
|
433
|
+
images: Array<{
|
|
434
|
+
alt: string;
|
|
435
|
+
aspectRatio?: "landscape" | "portrait" | "square" | "wide";
|
|
436
|
+
caption?: string;
|
|
437
|
+
src: string;
|
|
438
|
+
}>;
|
|
439
|
+
kind: "image";
|
|
440
|
+
variant?: "grid" | "horizontal";
|
|
441
|
+
};
|
|
442
|
+
type MapCoordinate = {
|
|
443
|
+
latitude: number;
|
|
444
|
+
longitude: number;
|
|
445
|
+
};
|
|
446
|
+
type MapLocationActionBase = {
|
|
447
|
+
href: string;
|
|
448
|
+
id: string;
|
|
449
|
+
label: string;
|
|
450
|
+
variant?: ActionVariant;
|
|
451
|
+
};
|
|
452
|
+
type MapLocationAction = MapLocationActionBase & {
|
|
453
|
+
kind: "call" | "directions" | "other" | "website";
|
|
454
|
+
};
|
|
455
|
+
type MapLocation = MapCoordinate & {
|
|
456
|
+
actions?: MapLocationAction[];
|
|
457
|
+
address?: string;
|
|
458
|
+
category?: string;
|
|
459
|
+
id: string;
|
|
460
|
+
images?: Array<{
|
|
461
|
+
alt: string;
|
|
462
|
+
src: string;
|
|
463
|
+
}>;
|
|
464
|
+
notes?: string;
|
|
465
|
+
rating?: number;
|
|
466
|
+
relevance?: number;
|
|
467
|
+
reviewCount?: number;
|
|
468
|
+
title: string;
|
|
469
|
+
};
|
|
470
|
+
type MapComponent = ComponentBase & {
|
|
471
|
+
initialLocationId?: string;
|
|
472
|
+
kind: "map";
|
|
473
|
+
locations: MapLocation[];
|
|
474
|
+
viewport?: {
|
|
475
|
+
center: MapCoordinate;
|
|
476
|
+
zoom: number;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
type TagListComponent = ComponentBase & {
|
|
480
|
+
kind: "tag-list";
|
|
481
|
+
tags: string[];
|
|
482
|
+
};
|
|
483
|
+
type ListComponent = ComponentBase & {
|
|
484
|
+
items: Array<{
|
|
485
|
+
children?: string[];
|
|
486
|
+
checked?: boolean;
|
|
487
|
+
id: string;
|
|
488
|
+
text: string;
|
|
489
|
+
}>;
|
|
490
|
+
kind: "list";
|
|
491
|
+
style?: "bulleted" | "checklist" | "numbered";
|
|
492
|
+
};
|
|
493
|
+
type ListBlockComponent = ComponentBase & {
|
|
494
|
+
items: Array<{
|
|
495
|
+
description?: string;
|
|
496
|
+
id: string;
|
|
497
|
+
icon?: AgentIconName;
|
|
498
|
+
imageAlt?: string;
|
|
499
|
+
imageUrl?: string;
|
|
500
|
+
meta?: string;
|
|
501
|
+
rating?: number;
|
|
502
|
+
title: string;
|
|
503
|
+
}>;
|
|
504
|
+
kind: "list-block";
|
|
505
|
+
};
|
|
506
|
+
type AccordionComponent = ComponentBase & {
|
|
507
|
+
kind: "accordion";
|
|
508
|
+
sections: Array<{
|
|
509
|
+
content: string;
|
|
510
|
+
defaultOpen?: boolean;
|
|
511
|
+
id: string;
|
|
512
|
+
title: string;
|
|
513
|
+
}>;
|
|
514
|
+
};
|
|
515
|
+
type StepStatus = "blocked" | "cancelled" | "completed" | "failed" | "in-progress" | "pending"
|
|
516
|
+
/** @deprecated Use "completed". */
|
|
517
|
+
| "complete"
|
|
518
|
+
/** @deprecated Use "in-progress". */
|
|
519
|
+
| "current"
|
|
520
|
+
/** @deprecated Use "pending". */
|
|
521
|
+
| "upcoming";
|
|
522
|
+
type StepsComponent = ComponentBase & {
|
|
523
|
+
kind: "steps";
|
|
524
|
+
steps: Array<{
|
|
525
|
+
content?: string;
|
|
526
|
+
icon?: AgentIconName;
|
|
527
|
+
id: string;
|
|
528
|
+
image?: AgentUIImage;
|
|
529
|
+
meta?: string;
|
|
530
|
+
progress?: number;
|
|
531
|
+
status?: StepStatus;
|
|
532
|
+
timestamp?: string;
|
|
533
|
+
title: string;
|
|
534
|
+
}>;
|
|
535
|
+
variant?: "steps" | "timeline";
|
|
536
|
+
};
|
|
537
|
+
type CodeBlockComponent = ComponentBase & {
|
|
538
|
+
code: string;
|
|
539
|
+
kind: "code-block";
|
|
540
|
+
language?: string;
|
|
541
|
+
};
|
|
542
|
+
type DiagramComponent = ComponentBase & {
|
|
543
|
+
/**
|
|
544
|
+
* Mermaid source. Text in, diagram out — the whole structure costs one node
|
|
545
|
+
* instead of the dozens a hand-built tree would spend against the node cap.
|
|
546
|
+
*/
|
|
547
|
+
chart: string;
|
|
548
|
+
kind: "diagram";
|
|
549
|
+
};
|
|
550
|
+
type TabsComponent = ComponentBase & {
|
|
551
|
+
defaultValue?: string;
|
|
552
|
+
kind: "tabs";
|
|
553
|
+
tabs: Array<{
|
|
554
|
+
id: string;
|
|
555
|
+
label: string;
|
|
556
|
+
} & ({
|
|
557
|
+
/** Backwards-compatible plain-text panel content. */
|
|
558
|
+
children?: never;
|
|
559
|
+
content: string;
|
|
560
|
+
} | {
|
|
561
|
+
/** Rich panel content rendered through the same recursive Agent UI renderer. */
|
|
562
|
+
children: AgentUINode[];
|
|
563
|
+
content?: never;
|
|
564
|
+
})>;
|
|
565
|
+
variant?: "primary" | "secondary";
|
|
566
|
+
};
|
|
567
|
+
type ActionVariant = "danger" | "outline" | "primary" | "secondary" | "tertiary";
|
|
568
|
+
/**
|
|
569
|
+
* Direct client-tool invocation attached to an action button. The widget
|
|
570
|
+
* executes the named browser-registered tool with these arguments when the
|
|
571
|
+
* button is pressed — no model round trip. The runtime strips tool calls that
|
|
572
|
+
* do not match a registered, approval-free client tool.
|
|
573
|
+
*/
|
|
574
|
+
type ActionToolCall = {
|
|
575
|
+
arguments: Record<string, unknown>;
|
|
576
|
+
name: string;
|
|
577
|
+
};
|
|
578
|
+
type ComponentActionSpec = {
|
|
579
|
+
id: string;
|
|
580
|
+
label: string;
|
|
581
|
+
prompt?: string;
|
|
582
|
+
toolCall?: ActionToolCall;
|
|
583
|
+
variant?: ActionVariant;
|
|
584
|
+
};
|
|
585
|
+
type ItemCardVariant = "default" | "outline" | "secondary" | "tertiary" | "transparent";
|
|
586
|
+
type ItemCardComponent = ComponentBase & {
|
|
587
|
+
action?: ComponentActionSpec;
|
|
588
|
+
isDisabled?: boolean;
|
|
589
|
+
isSelected?: boolean;
|
|
590
|
+
kind: "item-card";
|
|
591
|
+
/** Compact leading slot, usually an icon or image node. */
|
|
592
|
+
left?: AgentUINode[];
|
|
593
|
+
/** Flexible primary slot, usually heading and clear text nodes. */
|
|
594
|
+
middle: AgentUINode[];
|
|
595
|
+
/** Compact trailing slot, usually a badge, value, icon, or button node. */
|
|
596
|
+
right?: AgentUINode[];
|
|
597
|
+
variant?: ItemCardVariant;
|
|
598
|
+
};
|
|
599
|
+
type ItemCardGroupComponent = ComponentBase & {
|
|
600
|
+
children: ItemCardComponent[];
|
|
601
|
+
columns?: 2 | 3;
|
|
602
|
+
kind: "item-card-group";
|
|
603
|
+
layout?: "grid" | "list";
|
|
604
|
+
showHeader?: boolean;
|
|
605
|
+
variant?: ItemCardVariant;
|
|
606
|
+
};
|
|
607
|
+
type ActionGroupComponent = ComponentBase & {
|
|
608
|
+
actions: ComponentActionSpec[];
|
|
609
|
+
kind: "action-group";
|
|
610
|
+
orientation?: "horizontal" | "vertical";
|
|
611
|
+
};
|
|
612
|
+
type FollowupComponent = ComponentBase & {
|
|
613
|
+
kind: "followup";
|
|
614
|
+
prompts: Array<{
|
|
615
|
+
id: string;
|
|
616
|
+
label: string;
|
|
617
|
+
prompt: string;
|
|
618
|
+
}>;
|
|
619
|
+
};
|
|
620
|
+
type SwitchGroupComponent = ComponentBase & {
|
|
621
|
+
items: Array<{
|
|
622
|
+
defaultSelected?: boolean;
|
|
623
|
+
description?: string;
|
|
624
|
+
id: string;
|
|
625
|
+
label: string;
|
|
626
|
+
}>;
|
|
627
|
+
kind: "switch-group";
|
|
628
|
+
};
|
|
629
|
+
type ToggleGroupComponent = ComponentBase & {
|
|
630
|
+
defaultValue?: string[];
|
|
631
|
+
items: Array<{
|
|
632
|
+
id: string;
|
|
633
|
+
label: string;
|
|
634
|
+
}>;
|
|
635
|
+
kind: "toggle-group";
|
|
636
|
+
selectionMode?: "multiple" | "single";
|
|
637
|
+
};
|
|
638
|
+
type CardComponentVariant = "outline" | "plain" | "surface" | "surface-secondary" | "surface-tertiary" | "widget";
|
|
639
|
+
type RecordCardLayout = "compact" | "details" | "media";
|
|
640
|
+
type RecordCardTone = "accent" | "danger" | "default" | "muted" | "success" | "warning";
|
|
641
|
+
type RecordCardComponent = ComponentBase & {
|
|
642
|
+
actions?: ComponentActionSpec[];
|
|
643
|
+
eyebrow?: string;
|
|
644
|
+
fields: Array<{
|
|
645
|
+
icon?: AgentIconName;
|
|
646
|
+
label: string;
|
|
647
|
+
tone?: RecordCardTone;
|
|
648
|
+
value: string;
|
|
649
|
+
}>;
|
|
650
|
+
image?: {
|
|
651
|
+
alt: string;
|
|
652
|
+
src: string;
|
|
653
|
+
};
|
|
654
|
+
kind: "record-card";
|
|
655
|
+
layout?: RecordCardLayout;
|
|
656
|
+
status?: {
|
|
657
|
+
label: string;
|
|
658
|
+
tone?: RecordCardTone;
|
|
659
|
+
};
|
|
660
|
+
variant?: CardComponentVariant;
|
|
661
|
+
};
|
|
662
|
+
type ProductCardPrice = {
|
|
663
|
+
amount: number;
|
|
664
|
+
currency?: string;
|
|
665
|
+
};
|
|
666
|
+
type ProductCardRating = {
|
|
667
|
+
count?: number;
|
|
668
|
+
value: number;
|
|
669
|
+
};
|
|
670
|
+
type ProductCardItem = {
|
|
671
|
+
actions?: ComponentActionSpec[];
|
|
672
|
+
badge?: {
|
|
673
|
+
label: string;
|
|
674
|
+
tone?: RecordCardTone;
|
|
675
|
+
};
|
|
676
|
+
description?: string;
|
|
677
|
+
id: string;
|
|
678
|
+
image: {
|
|
679
|
+
alt: string;
|
|
680
|
+
src: string;
|
|
681
|
+
};
|
|
682
|
+
meta?: string;
|
|
683
|
+
name: string;
|
|
684
|
+
price: ProductCardPrice;
|
|
685
|
+
rating?: ProductCardRating;
|
|
686
|
+
};
|
|
687
|
+
type ProductCardComponent = ComponentBase & {
|
|
688
|
+
actions?: ComponentActionSpec[];
|
|
689
|
+
kind: "product-card";
|
|
690
|
+
products: ProductCardItem[];
|
|
691
|
+
variant?: CardComponentVariant;
|
|
692
|
+
};
|
|
693
|
+
declare const weatherConditions: readonly ["clear", "partly-cloudy", "cloudy", "fog", "drizzle", "rain", "snow", "thunderstorm", "windy", "unknown"];
|
|
694
|
+
type WeatherCondition = (typeof weatherConditions)[number];
|
|
695
|
+
type WeatherUnit = "celsius" | "fahrenheit";
|
|
696
|
+
type AgentUIImage = {
|
|
697
|
+
alt: string;
|
|
698
|
+
src: string;
|
|
699
|
+
};
|
|
700
|
+
type AgentUIAmount = {
|
|
701
|
+
amount: number;
|
|
702
|
+
currency: string;
|
|
703
|
+
};
|
|
704
|
+
type FlightTrackerComponent = ComponentBase & {
|
|
705
|
+
airline: {
|
|
706
|
+
logo?: AgentUIImage;
|
|
707
|
+
name: string;
|
|
708
|
+
};
|
|
709
|
+
date: string;
|
|
710
|
+
destination: {
|
|
711
|
+
label: string;
|
|
712
|
+
status?: string;
|
|
713
|
+
time: string;
|
|
714
|
+
};
|
|
715
|
+
flightNumber: string;
|
|
716
|
+
kind: "flight-tracker";
|
|
717
|
+
origin: {
|
|
718
|
+
label: string;
|
|
719
|
+
status?: string;
|
|
720
|
+
time: string;
|
|
721
|
+
};
|
|
722
|
+
progress?: number;
|
|
723
|
+
};
|
|
724
|
+
type CreateEventComponent = ComponentBase & {
|
|
725
|
+
actions?: ComponentActionSpec[];
|
|
726
|
+
date: {
|
|
727
|
+
day: number;
|
|
728
|
+
weekday: string;
|
|
729
|
+
};
|
|
730
|
+
events: Array<{
|
|
731
|
+
id: string;
|
|
732
|
+
status?: "existing" | "proposed";
|
|
733
|
+
time: string;
|
|
734
|
+
title: string;
|
|
735
|
+
tone?: RecordCardTone;
|
|
736
|
+
}>;
|
|
737
|
+
kind: "create-event";
|
|
738
|
+
};
|
|
739
|
+
type PlaylistComponent = ComponentBase & {
|
|
740
|
+
actions?: ComponentActionSpec[];
|
|
741
|
+
cover?: AgentUIImage;
|
|
742
|
+
kind: "playlist";
|
|
743
|
+
tracks: Array<{
|
|
744
|
+
action?: ComponentActionSpec;
|
|
745
|
+
artist: string;
|
|
746
|
+
id: string;
|
|
747
|
+
image?: AgentUIImage;
|
|
748
|
+
title: string;
|
|
749
|
+
}>;
|
|
750
|
+
};
|
|
751
|
+
type RideStatusComponent = ComponentBase & {
|
|
752
|
+
driver: {
|
|
753
|
+
image?: AgentUIImage;
|
|
754
|
+
name: string;
|
|
755
|
+
};
|
|
756
|
+
eta: string;
|
|
757
|
+
kind: "ride-status";
|
|
758
|
+
pickup: string;
|
|
759
|
+
};
|
|
760
|
+
type PurchaseItemsComponent = ComponentBase & {
|
|
761
|
+
actions?: ComponentActionSpec[];
|
|
762
|
+
currency: string;
|
|
763
|
+
items: Array<{
|
|
764
|
+
description?: string;
|
|
765
|
+
id: string;
|
|
766
|
+
image?: AgentUIImage;
|
|
767
|
+
name: string;
|
|
768
|
+
price?: number;
|
|
769
|
+
quantity?: number;
|
|
770
|
+
}>;
|
|
771
|
+
kind: "purchase-items";
|
|
772
|
+
totals: Array<{
|
|
773
|
+
amount: number;
|
|
774
|
+
emphasis?: boolean;
|
|
775
|
+
label: string;
|
|
776
|
+
}>;
|
|
777
|
+
};
|
|
778
|
+
type ChannelMessageComponent = ComponentBase & {
|
|
779
|
+
attachments?: Array<{
|
|
780
|
+
id: string;
|
|
781
|
+
image?: AgentUIImage;
|
|
782
|
+
name: string;
|
|
783
|
+
}>;
|
|
784
|
+
author: {
|
|
785
|
+
image?: AgentUIImage;
|
|
786
|
+
name: string;
|
|
787
|
+
};
|
|
788
|
+
channel: string;
|
|
789
|
+
content: string;
|
|
790
|
+
kind: "channel-message";
|
|
791
|
+
timestamp: string;
|
|
792
|
+
};
|
|
793
|
+
type PurchaseCompleteComponent = ComponentBase & {
|
|
794
|
+
action?: ComponentActionSpec;
|
|
795
|
+
details: Array<{
|
|
796
|
+
label: string;
|
|
797
|
+
value: string;
|
|
798
|
+
}>;
|
|
799
|
+
kind: "purchase-complete";
|
|
800
|
+
paid?: AgentUIAmount;
|
|
801
|
+
product: {
|
|
802
|
+
description?: string;
|
|
803
|
+
image?: AgentUIImage;
|
|
804
|
+
name: string;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
type PlayerCardComponent = ComponentBase & {
|
|
808
|
+
backgroundImage?: AgentUIImage;
|
|
809
|
+
jerseyNumber?: string;
|
|
810
|
+
kind: "player-card";
|
|
811
|
+
playerName: string;
|
|
812
|
+
stats: Array<{
|
|
813
|
+
label: string;
|
|
814
|
+
value: number | string;
|
|
815
|
+
}>;
|
|
816
|
+
};
|
|
817
|
+
type ViewEventComponent = ComponentBase & {
|
|
818
|
+
date: string;
|
|
819
|
+
kind: "view-event";
|
|
820
|
+
time: string;
|
|
821
|
+
tone?: RecordCardTone;
|
|
822
|
+
};
|
|
823
|
+
type EventSessionComponent = ComponentBase & {
|
|
824
|
+
action?: ComponentActionSpec;
|
|
825
|
+
eyebrow?: string;
|
|
826
|
+
kind: "event-session";
|
|
827
|
+
location: string;
|
|
828
|
+
speakers: Array<{
|
|
829
|
+
image?: AgentUIImage;
|
|
830
|
+
name: string;
|
|
831
|
+
role: string;
|
|
832
|
+
}>;
|
|
833
|
+
time: string;
|
|
834
|
+
};
|
|
835
|
+
type EnableNotificationComponent = ComponentBase & {
|
|
836
|
+
actions: [ComponentActionSpec, ComponentActionSpec];
|
|
837
|
+
kind: "enable-notification";
|
|
838
|
+
};
|
|
839
|
+
type WeatherForecastComponent = ComponentBase & {
|
|
840
|
+
condition: WeatherCondition;
|
|
841
|
+
forecast: Array<{
|
|
842
|
+
condition: WeatherCondition;
|
|
843
|
+
label: string;
|
|
844
|
+
temperature: number;
|
|
845
|
+
}>;
|
|
846
|
+
high: number;
|
|
847
|
+
kind: "weather-forecast";
|
|
848
|
+
location: string;
|
|
849
|
+
low: number;
|
|
850
|
+
unit: WeatherUnit;
|
|
851
|
+
};
|
|
852
|
+
type WeatherCurrentComponent = ComponentBase & {
|
|
853
|
+
condition: WeatherCondition;
|
|
854
|
+
details?: Array<{
|
|
855
|
+
label: string;
|
|
856
|
+
value: string;
|
|
857
|
+
}>;
|
|
858
|
+
kind: "weather-current";
|
|
859
|
+
location: string;
|
|
860
|
+
temperature: number;
|
|
861
|
+
unit: WeatherUnit;
|
|
862
|
+
};
|
|
863
|
+
type AnalyticalLeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | DataTableComponent | ComparisonListComponent | MeterListComponent;
|
|
864
|
+
type ProductSignalsComponent = ComponentBase & {
|
|
865
|
+
defaultValue?: string;
|
|
866
|
+
kind: "product-signals";
|
|
867
|
+
tabs: Array<{
|
|
868
|
+
component: AnalyticalLeafComponent;
|
|
869
|
+
id: string;
|
|
870
|
+
label: string;
|
|
871
|
+
}>;
|
|
872
|
+
};
|
|
873
|
+
type AgentUILeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | DataTableComponent | ComparisonListComponent | MeterListComponent | FormComponent | TextComponent | CalloutComponent | ImageComponent | MapComponent | TagListComponent | ListComponent | ListBlockComponent | AccordionComponent | StepsComponent | CodeBlockComponent | DiagramComponent | TabsComponent | ActionGroupComponent | FollowupComponent | SwitchGroupComponent | ToggleGroupComponent | RecordCardComponent | ProductCardComponent | FlightTrackerComponent | CreateEventComponent | PlaylistComponent | RideStatusComponent | PurchaseItemsComponent | ChannelMessageComponent | PurchaseCompleteComponent | PlayerCardComponent | ViewEventComponent | EventSessionComponent | EnableNotificationComponent | WeatherForecastComponent | WeatherCurrentComponent | ProductSignalsComponent;
|
|
874
|
+
type DashboardComponent = ComponentBase & {
|
|
875
|
+
children: AgentUILeafComponent[];
|
|
876
|
+
kind: "dashboard";
|
|
877
|
+
layout: "chart-table" | "grid" | "metrics-chart" | "stack";
|
|
878
|
+
};
|
|
879
|
+
type AgentUIComponent = AgentUILeafComponent | DashboardComponent;
|
|
880
|
+
type LayoutAlign = "center" | "end" | "start" | "stretch";
|
|
881
|
+
type LayoutJustify = "between" | "center" | "end" | "start";
|
|
882
|
+
type LayoutGap = "lg" | "md" | "none" | "sm";
|
|
883
|
+
type RowComponent = {
|
|
884
|
+
align?: LayoutAlign;
|
|
885
|
+
children: AgentUINode[];
|
|
886
|
+
gap?: LayoutGap;
|
|
887
|
+
id: string;
|
|
888
|
+
justify?: LayoutJustify;
|
|
889
|
+
kind: "row";
|
|
890
|
+
};
|
|
891
|
+
type ColComponent = {
|
|
892
|
+
align?: LayoutAlign;
|
|
893
|
+
children: AgentUINode[];
|
|
894
|
+
gap?: LayoutGap;
|
|
895
|
+
id: string;
|
|
896
|
+
justify?: LayoutJustify;
|
|
897
|
+
kind: "col";
|
|
898
|
+
};
|
|
899
|
+
type GridComponent = {
|
|
900
|
+
children: AgentUINode[];
|
|
901
|
+
columns: 1 | 2 | 3 | 4;
|
|
902
|
+
gap?: LayoutGap;
|
|
903
|
+
id: string;
|
|
904
|
+
kind: "grid";
|
|
905
|
+
};
|
|
906
|
+
type CardComponent = ComponentBase & {
|
|
907
|
+
children: AgentUINode[];
|
|
908
|
+
kind: "card";
|
|
909
|
+
variant?: CardComponentVariant;
|
|
910
|
+
};
|
|
911
|
+
type SpacerComponent = {
|
|
912
|
+
id: string;
|
|
913
|
+
kind: "spacer";
|
|
914
|
+
size?: "auto" | "lg" | "md" | "sm";
|
|
915
|
+
};
|
|
916
|
+
type DividerComponent = {
|
|
917
|
+
id: string;
|
|
918
|
+
kind: "divider";
|
|
919
|
+
};
|
|
920
|
+
/**
|
|
921
|
+
* Chrome-free content primitives available only inside composed UI trees.
|
|
922
|
+
* They let the model build custom sections from HeroUI-styled parts when no
|
|
923
|
+
* full catalog component fits, without card wrappers or required titles.
|
|
924
|
+
*/
|
|
925
|
+
type HeadingComponent = {
|
|
926
|
+
icon?: AgentIconName;
|
|
927
|
+
id: string;
|
|
928
|
+
kind: "heading";
|
|
929
|
+
level?: 1 | 2 | 3 | 4;
|
|
930
|
+
text: string;
|
|
931
|
+
};
|
|
932
|
+
type ButtonComponent = {
|
|
933
|
+
icon?: AgentIconName;
|
|
934
|
+
id: string;
|
|
935
|
+
kind: "button";
|
|
936
|
+
label: string;
|
|
937
|
+
prompt?: string;
|
|
938
|
+
toolCall?: ActionToolCall;
|
|
939
|
+
variant?: ActionVariant;
|
|
940
|
+
};
|
|
941
|
+
type BadgeComponent = {
|
|
942
|
+
id: string;
|
|
943
|
+
kind: "badge";
|
|
944
|
+
label: string;
|
|
945
|
+
tone?: RecordCardTone;
|
|
946
|
+
variant?: "soft" | "solid";
|
|
947
|
+
};
|
|
948
|
+
type IconComponent = {
|
|
949
|
+
id: string;
|
|
950
|
+
kind: "icon";
|
|
951
|
+
name: AgentIconName;
|
|
952
|
+
size?: "lg" | "md" | "sm";
|
|
953
|
+
tone?: RecordCardTone;
|
|
954
|
+
};
|
|
955
|
+
type RatingComponent = {
|
|
956
|
+
count?: number;
|
|
957
|
+
id: string;
|
|
958
|
+
kind: "rating";
|
|
959
|
+
value: number;
|
|
960
|
+
};
|
|
961
|
+
type ProgressComponent = {
|
|
962
|
+
id: string;
|
|
963
|
+
kind: "progress";
|
|
964
|
+
label?: string;
|
|
965
|
+
value: number;
|
|
966
|
+
};
|
|
967
|
+
type AgentUIPrimitiveComponent = BadgeComponent | ButtonComponent | HeadingComponent | IconComponent | ProgressComponent | RatingComponent;
|
|
968
|
+
type AgentUILayoutLeafComponent = DividerComponent | SpacerComponent;
|
|
969
|
+
type AgentUIContainerComponent = CardComponent | ColComponent | GridComponent | ItemCardComponent | ItemCardGroupComponent | RowComponent;
|
|
970
|
+
/** Any node that can appear inside a composed UI tree (leaves, layout leaves, containers). */
|
|
971
|
+
type AgentUINode = AgentUIContainerComponent | AgentUILayoutLeafComponent | AgentUILeafComponent | AgentUIPrimitiveComponent;
|
|
972
|
+
/** Any payload the component renderer accepts: classic components or composed UI trees. */
|
|
973
|
+
type AgentUIRenderable = AgentUIComponent | AgentUIContainerComponent;
|
|
974
|
+
declare const cardComponentVariantSchema: z.ZodType<CardComponentVariant>;
|
|
975
|
+
declare const recordCardLayoutSchema: z.ZodType<RecordCardLayout>;
|
|
976
|
+
declare const numberFormatSchema: z.ZodType<NumberFormat>;
|
|
977
|
+
declare const chartColorSchema: z.ZodType<ChartColor>;
|
|
978
|
+
declare const agentIconSchema: z.ZodType<AgentIconName>;
|
|
979
|
+
declare const weatherConditionSchema: z.ZodType<WeatherCondition>;
|
|
980
|
+
declare const metricGridComponentSchema: z.ZodType<MetricGridComponent>;
|
|
981
|
+
declare const kpiGridComponentSchema: z.ZodType<KpiGridComponent>;
|
|
982
|
+
declare const lineChartComponentSchema: z.ZodType<LineChartComponent>;
|
|
983
|
+
declare const areaChartComponentSchema: z.ZodType<AreaChartComponent>;
|
|
984
|
+
declare const barChartComponentSchema: z.ZodType<BarChartComponent>;
|
|
985
|
+
declare const composedChartComponentSchema: z.ZodType<ComposedChartComponent>;
|
|
986
|
+
declare const pieChartComponentSchema: z.ZodType<PieChartComponent>;
|
|
987
|
+
declare const donutChartComponentSchema: z.ZodType<DonutChartComponent>;
|
|
988
|
+
declare const radarChartComponentSchema: z.ZodType<RadarChartComponent>;
|
|
989
|
+
declare const radialChartComponentSchema: z.ZodType<RadialChartComponent>;
|
|
990
|
+
declare const sankeyChartComponentSchema: z.ZodType<SankeyChartComponent>;
|
|
991
|
+
declare const scatterChartComponentSchema: z.ZodType<ScatterChartComponent>;
|
|
992
|
+
declare const heatmapComponentSchema: z.ZodType<HeatmapComponent>;
|
|
993
|
+
declare const dataTableComponentSchema: z.ZodType<DataTableComponent>;
|
|
994
|
+
declare const comparisonListComponentSchema: z.ZodType<ComparisonListComponent>;
|
|
995
|
+
declare const meterListComponentSchema: z.ZodType<MeterListComponent>;
|
|
996
|
+
declare const formComponentSchema: z.ZodType<FormComponent>;
|
|
997
|
+
declare const textComponentSchema: z.ZodType<TextComponent>;
|
|
998
|
+
declare const calloutComponentSchema: z.ZodType<CalloutComponent>;
|
|
999
|
+
declare const imageComponentSchema: z.ZodType<ImageComponent>;
|
|
1000
|
+
declare const mapComponentSchema: z.ZodType<MapComponent>;
|
|
1001
|
+
declare const tagListComponentSchema: z.ZodType<TagListComponent>;
|
|
1002
|
+
declare const listComponentSchema: z.ZodType<ListComponent>;
|
|
1003
|
+
declare const listBlockComponentSchema: z.ZodType<ListBlockComponent>;
|
|
1004
|
+
declare const accordionComponentSchema: z.ZodType<AccordionComponent>;
|
|
1005
|
+
declare const stepsComponentSchema: z.ZodType<StepsComponent>;
|
|
1006
|
+
declare const codeBlockComponentSchema: z.ZodType<CodeBlockComponent>;
|
|
1007
|
+
declare const diagramComponentSchema: z.ZodType<DiagramComponent>;
|
|
1008
|
+
declare const tabsComponentSchema: z.ZodType<TabsComponent>;
|
|
1009
|
+
declare const actionGroupComponentSchema: z.ZodType<ActionGroupComponent>;
|
|
1010
|
+
declare const followupComponentSchema: z.ZodType<FollowupComponent>;
|
|
1011
|
+
declare const switchGroupComponentSchema: z.ZodType<SwitchGroupComponent>;
|
|
1012
|
+
declare const toggleGroupComponentSchema: z.ZodType<ToggleGroupComponent>;
|
|
1013
|
+
declare const recordCardComponentSchema: z.ZodType<RecordCardComponent>;
|
|
1014
|
+
declare const productCardComponentSchema: z.ZodType<ProductCardComponent>;
|
|
1015
|
+
declare const flightTrackerComponentSchema: z.ZodType<FlightTrackerComponent>;
|
|
1016
|
+
declare const createEventComponentSchema: z.ZodType<CreateEventComponent>;
|
|
1017
|
+
declare const playlistComponentSchema: z.ZodType<PlaylistComponent>;
|
|
1018
|
+
declare const rideStatusComponentSchema: z.ZodType<RideStatusComponent>;
|
|
1019
|
+
declare const purchaseItemsComponentSchema: z.ZodType<PurchaseItemsComponent>;
|
|
1020
|
+
declare const channelMessageComponentSchema: z.ZodType<ChannelMessageComponent>;
|
|
1021
|
+
declare const purchaseCompleteComponentSchema: z.ZodType<PurchaseCompleteComponent>;
|
|
1022
|
+
declare const playerCardComponentSchema: z.ZodType<PlayerCardComponent>;
|
|
1023
|
+
declare const viewEventComponentSchema: z.ZodType<ViewEventComponent>;
|
|
1024
|
+
declare const eventSessionComponentSchema: z.ZodType<EventSessionComponent>;
|
|
1025
|
+
declare const enableNotificationComponentSchema: z.ZodType<EnableNotificationComponent>;
|
|
1026
|
+
declare const weatherForecastComponentSchema: z.ZodType<WeatherForecastComponent>;
|
|
1027
|
+
declare const weatherCurrentComponentSchema: z.ZodType<WeatherCurrentComponent>;
|
|
1028
|
+
declare const analyticalLeafComponentSchema: z.ZodType<AnalyticalLeafComponent>;
|
|
1029
|
+
declare const productSignalsComponentSchema: z.ZodType<ProductSignalsComponent>;
|
|
1030
|
+
declare const agentUILeafComponentSchema: z.ZodType<AgentUILeafComponent>;
|
|
1031
|
+
declare const dashboardComponentSchema: z.ZodType<DashboardComponent>;
|
|
1032
|
+
declare const agentUIComponentSchema: z.ZodType<AgentUIComponent>;
|
|
1033
|
+
declare const renderComponentInputSchema: z.ZodType<{
|
|
1034
|
+
component: AgentUIComponent;
|
|
1035
|
+
}>;
|
|
1036
|
+
/** Maximum nesting depth of a composed UI tree (root container counts as level 1). */
|
|
1037
|
+
declare const COMPOSED_UI_MAX_DEPTH = 6;
|
|
1038
|
+
/** Maximum total number of nodes (containers + leaves) in a composed UI tree. */
|
|
1039
|
+
declare const COMPOSED_UI_MAX_NODES = 48;
|
|
1040
|
+
/** Kinds that hold children. Exported so the catalog groups kinds from one source. */
|
|
1041
|
+
declare const AGENT_UI_CONTAINER_KINDS: ReadonlySet<AgentUINode["kind"]>;
|
|
1042
|
+
/** Kinds that only create separation between siblings. */
|
|
1043
|
+
declare const AGENT_UI_LAYOUT_LEAF_KINDS: ReadonlySet<AgentUINode["kind"]>;
|
|
1044
|
+
/** Fine-grained content kinds that compose custom sections inside containers. */
|
|
1045
|
+
declare const AGENT_UI_PRIMITIVE_KINDS: ReadonlySet<AgentUINode["kind"]>;
|
|
1046
|
+
declare function isAgentUIContainerComponent(node: AgentUINode): node is AgentUIContainerComponent;
|
|
1047
|
+
/** Returns every nested node regardless of the container's public slot anatomy. */
|
|
1048
|
+
declare function getAgentUIContainerChildren(node: AgentUIContainerComponent): AgentUINode[];
|
|
1049
|
+
declare function isAgentUILayoutLeafComponent(node: AgentUINode): node is AgentUILayoutLeafComponent;
|
|
1050
|
+
declare function isAgentUIPrimitiveComponent(node: AgentUINode): node is AgentUIPrimitiveComponent;
|
|
1051
|
+
declare const spacerComponentSchema: z.ZodType<SpacerComponent>;
|
|
1052
|
+
declare const dividerComponentSchema: z.ZodType<DividerComponent>;
|
|
1053
|
+
declare const headingComponentSchema: z.ZodType<HeadingComponent>;
|
|
1054
|
+
declare const buttonComponentSchema: z.ZodType<ButtonComponent>;
|
|
1055
|
+
declare const badgeComponentSchema: z.ZodType<BadgeComponent>;
|
|
1056
|
+
declare const iconComponentSchema: z.ZodType<IconComponent>;
|
|
1057
|
+
declare const ratingComponentSchema: z.ZodType<RatingComponent>;
|
|
1058
|
+
declare const progressComponentSchema: z.ZodType<ProgressComponent>;
|
|
1059
|
+
declare const itemCardComponentSchema: z.ZodType<ItemCardComponent>;
|
|
1060
|
+
declare const itemCardGroupComponentSchema: z.ZodType<ItemCardGroupComponent>;
|
|
1061
|
+
declare const rowComponentSchema: z.ZodType<RowComponent>;
|
|
1062
|
+
declare const colComponentSchema: z.ZodType<ColComponent>;
|
|
1063
|
+
declare const gridComponentSchema: z.ZodType<GridComponent>;
|
|
1064
|
+
declare const cardComponentSchema: z.ZodType<CardComponent>;
|
|
1065
|
+
declare const agentUINodeSchema: z.ZodType<AgentUINode>;
|
|
1066
|
+
declare const composedUIComponentSchema: z.ZodType<AgentUIContainerComponent>;
|
|
1067
|
+
declare const agentUIRenderableSchema: z.ZodType<AgentUIRenderable>;
|
|
1068
|
+
declare const composeUIInputSchema: z.ZodType<{
|
|
1069
|
+
component: AgentUIContainerComponent;
|
|
1070
|
+
}>;
|
|
1071
|
+
/** Every kind a renderable payload can use, whether as a root or nested in a tree. */
|
|
1072
|
+
type AgentUIRenderableKind = AgentUINode["kind"] | "dashboard";
|
|
1073
|
+
/**
|
|
1074
|
+
* Per-kind schemas for the model-facing catalog lookup, keyed by the `kind`
|
|
1075
|
+
* discriminator the model actually writes. Container, dashboard, and
|
|
1076
|
+
* product-signals entries describe their own props with opaque children.
|
|
1077
|
+
*/
|
|
1078
|
+
declare const AGENT_UI_KIND_SCHEMAS: Record<AgentUIRenderableKind, z.ZodType>;
|
|
1079
|
+
|
|
1080
|
+
type AgentUICatalogGroup = "actions" | "containers" | "data" | "display" | "forms" | "layout" | "primitives";
|
|
1081
|
+
type AgentUICatalogEntry = {
|
|
1082
|
+
group: AgentUICatalogGroup;
|
|
1083
|
+
summary: string;
|
|
1084
|
+
};
|
|
1085
|
+
/** Every renderable kind with the one-line purpose the model routes on. */
|
|
1086
|
+
declare const AGENT_UI_CATALOG: Record<AgentUIRenderableKind, AgentUICatalogEntry>;
|
|
1087
|
+
/** Sorted so the prompt block and the lookup tool's enum stay byte-stable across turns. */
|
|
1088
|
+
declare const AGENT_UI_KIND_NAMES: readonly AgentUIRenderableKind[];
|
|
1089
|
+
/**
|
|
1090
|
+
* The catalog as a compact prompt block: one line per group, `kind — purpose`
|
|
1091
|
+
* within it. Deterministic output keeps the system prompt's cacheable prefix
|
|
1092
|
+
* byte-identical between turns.
|
|
1093
|
+
*/
|
|
1094
|
+
declare function renderAgentUICatalogPrompt(): string;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Names owned by the hosted runtime; client tools may not shadow them.
|
|
1098
|
+
* `loadUIRenderers` is a retired runtime tool, still reserved so a client tool
|
|
1099
|
+
* cannot take over a name that appears in stored conversations.
|
|
1100
|
+
*/
|
|
1101
|
+
declare const RESERVED_AGENT_TOOL_NAMES: readonly ["composeUI", "executeSandbox", "getComponentSchema", "loadUIRenderers", "renderComponent", "searchKnowledge", "searchWeb"];
|
|
1102
|
+
/**
|
|
1103
|
+
* Namespace the runtime uses for tools borrowed from a project's MCP servers
|
|
1104
|
+
* (`mcp_<serverSlug>_<toolName>`). Reserved wholesale so a client tool can
|
|
1105
|
+
* never impersonate one of them.
|
|
1106
|
+
*/
|
|
1107
|
+
declare const RESERVED_AGENT_TOOL_PREFIX = "mcp_";
|
|
1108
|
+
declare const MAX_CLIENT_TOOLS = 20;
|
|
1109
|
+
declare const MAX_CLIENT_TOOLS_BYTES: number;
|
|
1110
|
+
/**
|
|
1111
|
+
* Browser-declared client tool manifest entry. Execution and rendering stay in
|
|
1112
|
+
* the customer's page; only the model-facing surface crosses the wire.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const clientToolManifestEntrySchema: z.ZodObject<{
|
|
1115
|
+
description: z.ZodString;
|
|
1116
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1117
|
+
name: z.ZodString;
|
|
1118
|
+
needsApproval: z.ZodOptional<z.ZodBoolean>;
|
|
1119
|
+
}, z.core.$strip>;
|
|
1120
|
+
declare const clientToolsSchema: z.ZodArray<z.ZodObject<{
|
|
1121
|
+
description: z.ZodString;
|
|
1122
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1123
|
+
name: z.ZodString;
|
|
1124
|
+
needsApproval: z.ZodOptional<z.ZodBoolean>;
|
|
1125
|
+
}, z.core.$strip>>;
|
|
1126
|
+
type ClientToolManifestEntry = z.infer<typeof clientToolManifestEntrySchema>;
|
|
1127
|
+
|
|
1128
|
+
declare const agentSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1129
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
1131
|
+
sourceId: z.ZodString;
|
|
1132
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1133
|
+
title: z.ZodString;
|
|
1134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1135
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
1137
|
+
sourceId: z.ZodString;
|
|
1138
|
+
sourceType: z.ZodOptional<z.ZodLiteral<"url">>;
|
|
1139
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1140
|
+
url: z.ZodString;
|
|
1141
|
+
}, z.core.$strip>]>;
|
|
1142
|
+
declare const agentSourcesSchema: z.ZodObject<{
|
|
1143
|
+
items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1144
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
1145
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
1146
|
+
sourceId: z.ZodString;
|
|
1147
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1148
|
+
title: z.ZodString;
|
|
1149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1150
|
+
excerpt: z.ZodOptional<z.ZodString>;
|
|
1151
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
1152
|
+
sourceId: z.ZodString;
|
|
1153
|
+
sourceType: z.ZodOptional<z.ZodLiteral<"url">>;
|
|
1154
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
url: z.ZodString;
|
|
1156
|
+
}, z.core.$strip>]>>;
|
|
1157
|
+
}, z.core.$strip>;
|
|
1158
|
+
type AgentSource = z.infer<typeof agentSourceSchema>;
|
|
1159
|
+
type AgentDataTypes = {
|
|
1160
|
+
activity: {
|
|
1161
|
+
detail?: string;
|
|
1162
|
+
kind?: "browse" | "chart" | "code" | "data" | "search" | "thinking";
|
|
1163
|
+
label: string;
|
|
1164
|
+
sources?: Array<{
|
|
1165
|
+
label: string;
|
|
1166
|
+
}>;
|
|
1167
|
+
stage: "preparing" | "querying" | "composing";
|
|
1168
|
+
};
|
|
1169
|
+
component: AgentUIRenderable;
|
|
1170
|
+
/** Server-generated conversation title, streamed on the first turn so the session picker updates live. */
|
|
1171
|
+
"conversation-title": {
|
|
1172
|
+
title: string;
|
|
1173
|
+
};
|
|
1174
|
+
progress: {
|
|
1175
|
+
label: string;
|
|
1176
|
+
stage: "preparing" | "querying" | "composing";
|
|
1177
|
+
};
|
|
1178
|
+
sources: z.infer<typeof agentSourcesSchema>;
|
|
1179
|
+
};
|
|
1180
|
+
type AgentMessage = UIMessage<unknown, AgentDataTypes>;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Deliberately Zod-free: the model catalogue is re-exported from the package
|
|
1184
|
+
* root, so importing Zod here would pull the whole validation library into the
|
|
1185
|
+
* panel shell's first-paint graph. The matching schema lives in
|
|
1186
|
+
* `./models.schema`, which only server and contract consumers need.
|
|
1187
|
+
*/
|
|
1188
|
+
/** Model ids the hosted agent accepts from the browser picker. */
|
|
1189
|
+
declare const AGENT_MODEL_IDS: readonly ["moonshotai/Kimi-K3", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "openai/gpt-5.6-sol", "google/gemini-3.6-flash", "anthropic/claude-sonnet-5", "anthropic/claude-opus-4.8"];
|
|
1190
|
+
type AgentModelId = (typeof AGENT_MODEL_IDS)[number];
|
|
1191
|
+
/**
|
|
1192
|
+
* Retired ids mapped to their replacement. Model ids are a public part of the
|
|
1193
|
+
* embed API — a customer pins one in their own code and projects store one as
|
|
1194
|
+
* their default — so a retired id keeps resolving instead of failing the
|
|
1195
|
+
* session with an "Invalid agent model" error.
|
|
1196
|
+
*/
|
|
1197
|
+
declare const LEGACY_AGENT_MODEL_IDS: Record<string, AgentModelId>;
|
|
1198
|
+
/** Resolves a possibly-retired model id to the id the runtime should use. */
|
|
1199
|
+
declare function resolveAgentModelId(value: string): string;
|
|
1200
|
+
type AgentModelTier = "codegen" | "complex" | "light";
|
|
1201
|
+
type AgentModelOption = {
|
|
1202
|
+
description: string;
|
|
1203
|
+
id: AgentModelId;
|
|
1204
|
+
label: string;
|
|
1205
|
+
provider: "Anthropic" | "Google" | "Moonshot AI" | "OpenAI";
|
|
1206
|
+
tier: AgentModelTier;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* Recommended default selected when the optional picker first opens. Luna
|
|
1210
|
+
* matches the hosted runtime's baked-in default (`DEFAULT_CHAT_MODEL_IDS.herouiAgent`),
|
|
1211
|
+
* so what users see in the picker is what actually runs by default.
|
|
1212
|
+
*/
|
|
1213
|
+
declare const DEFAULT_AGENT_PICKER_MODEL_ID = "openai/gpt-5.6-luna";
|
|
1214
|
+
/**
|
|
1215
|
+
* Small, tool-capable model catalog for HeroUI Agent. These ids are the
|
|
1216
|
+
* server-side allowlist as well as the browser picker source of truth.
|
|
1217
|
+
*/
|
|
1218
|
+
declare const AGENT_MODEL_OPTIONS: readonly [{
|
|
1219
|
+
readonly description: "Flagship model for coding, reasoning, and knowledge work";
|
|
1220
|
+
readonly id: "moonshotai/Kimi-K3";
|
|
1221
|
+
readonly label: "Kimi K3";
|
|
1222
|
+
readonly provider: "Moonshot AI";
|
|
1223
|
+
readonly tier: "light";
|
|
1224
|
+
}, {
|
|
1225
|
+
readonly description: "Fast answers and lightweight agent workflows";
|
|
1226
|
+
readonly id: "openai/gpt-5.6-luna";
|
|
1227
|
+
readonly label: "GPT-5.6 Luna";
|
|
1228
|
+
readonly provider: "OpenAI";
|
|
1229
|
+
readonly tier: "light";
|
|
1230
|
+
}, {
|
|
1231
|
+
readonly description: "Balanced reasoning for everyday agent tasks";
|
|
1232
|
+
readonly id: "openai/gpt-5.6-terra";
|
|
1233
|
+
readonly label: "GPT-5.6 Terra";
|
|
1234
|
+
readonly provider: "OpenAI";
|
|
1235
|
+
readonly tier: "codegen";
|
|
1236
|
+
}, {
|
|
1237
|
+
readonly description: "Deep reasoning for complex, multi-step analysis";
|
|
1238
|
+
readonly id: "openai/gpt-5.6-sol";
|
|
1239
|
+
readonly label: "GPT-5.6 Sol";
|
|
1240
|
+
readonly provider: "OpenAI";
|
|
1241
|
+
readonly tier: "complex";
|
|
1242
|
+
}, {
|
|
1243
|
+
readonly description: "Fast multimodal analysis with a large context window";
|
|
1244
|
+
readonly id: "google/gemini-3.6-flash";
|
|
1245
|
+
readonly label: "Gemini 3.6 Flash";
|
|
1246
|
+
readonly provider: "Google";
|
|
1247
|
+
readonly tier: "light";
|
|
1248
|
+
}, {
|
|
1249
|
+
readonly description: "Strong agentic reasoning and polished UI decisions";
|
|
1250
|
+
readonly id: "anthropic/claude-sonnet-5";
|
|
1251
|
+
readonly label: "Claude Sonnet 5";
|
|
1252
|
+
readonly provider: "Anthropic";
|
|
1253
|
+
readonly tier: "codegen";
|
|
1254
|
+
}, {
|
|
1255
|
+
readonly description: "Highest-capability Claude for difficult research and analysis";
|
|
1256
|
+
readonly id: "anthropic/claude-opus-4.8";
|
|
1257
|
+
readonly label: "Claude Opus 4.8";
|
|
1258
|
+
readonly provider: "Anthropic";
|
|
1259
|
+
readonly tier: "complex";
|
|
1260
|
+
}];
|
|
1261
|
+
declare function isAgentModelId(value: unknown): value is AgentModelId;
|
|
1262
|
+
/** Unknown/env-overridden models keep the hosted agent's historical light tier. */
|
|
1263
|
+
declare function getAgentModelTier(modelId?: string): AgentModelTier;
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Kept out of `./models` so the Zod dependency stays off the package root's
|
|
1267
|
+
* import graph — the panel shell is served from that graph and must not pay for
|
|
1268
|
+
* a validation library it never runs.
|
|
1269
|
+
*
|
|
1270
|
+
* Retired ids are rewritten to their replacement rather than rejected: this
|
|
1271
|
+
* schema guards the public embed API and the signed session payload, so an
|
|
1272
|
+
* embed pinning an old id (or a session signed before a model was retired)
|
|
1273
|
+
* has to keep working.
|
|
1274
|
+
*/
|
|
1275
|
+
declare const agentModelIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
1276
|
+
"moonshotai/Kimi-K3": "moonshotai/Kimi-K3";
|
|
1277
|
+
"openai/gpt-5.6-luna": "openai/gpt-5.6-luna";
|
|
1278
|
+
"openai/gpt-5.6-terra": "openai/gpt-5.6-terra";
|
|
1279
|
+
"openai/gpt-5.6-sol": "openai/gpt-5.6-sol";
|
|
1280
|
+
"google/gemini-3.6-flash": "google/gemini-3.6-flash";
|
|
1281
|
+
"anthropic/claude-sonnet-5": "anthropic/claude-sonnet-5";
|
|
1282
|
+
"anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
|
|
1283
|
+
}>>;
|
|
1284
|
+
|
|
1285
|
+
declare function signTrustedAgentClientData(secret: string, data: TrustedAgentClientData): Promise<SignedTrustedAgentClientData>;
|
|
1286
|
+
declare function verifyTrustedAgentClientData(secret: string, value: unknown): Promise<TrustedAgentClientData | null>;
|
|
1287
|
+
|
|
1288
|
+
declare const HEROUI_AGENT_PROTOCOL_VERSION: 5;
|
|
1289
|
+
declare const HEROUI_AGENT_SDK_VERSION: "0.2.0-beta.1";
|
|
1290
|
+
declare const HEROUI_AGENT_TASK_ID: "heroui-agents-runtime";
|
|
1291
|
+
declare const TRUSTED_AGENT_CLIENT_DATA_KEY: "__heroUiAgentApi";
|
|
1292
|
+
|
|
1293
|
+
export { AGENT_MODEL_IDS, AGENT_MODEL_OPTIONS, AGENT_UI_CATALOG, AGENT_UI_CONTAINER_KINDS, AGENT_UI_KIND_NAMES, AGENT_UI_KIND_SCHEMAS, AGENT_UI_LAYOUT_LEAF_KINDS, AGENT_UI_PRIMITIVE_KINDS, type AccordionComponent, type ActionGroupComponent, type ActionToolCall, type ActionVariant, type AgentDataTypes, type AgentIconName, type AgentMessage, type AgentModelId, type AgentModelOption, type AgentModelTier, type AgentRemoteConfig, type AgentRemoteThemeColor, type AgentSource, type AgentUIAmount, type AgentUICatalogEntry, type AgentUICatalogGroup, type AgentUIComponent, type AgentUIContainerComponent, type AgentUIImage, type AgentUILayoutLeafComponent, type AgentUILeafComponent, type AgentUINode, type AgentUIPrimitiveComponent, type AgentUIRenderable, type AgentUIRenderableKind, type AnalyticalLeafComponent, type AreaChartComponent, type BadgeComponent, type BarChartComponent, type ButtonComponent, COMPOSED_UI_MAX_DEPTH, COMPOSED_UI_MAX_NODES, type CalloutComponent, type CardComponent, type CardComponentVariant, type CartesianComponent, type CartesianRange, type CartesianSeries, type ChannelMessageComponent, type ChartColor, type ClientToolManifestEntry, type CodeBlockComponent, type ColComponent, type ComparisonListComponent, type ComponentActionSpec, type ComponentBase, type ComposedChartComponent, type ComposedChartSeries, type CreateEventComponent, DEFAULT_AGENT_PICKER_MODEL_ID, type DashboardComponent, type DataTableComponent, type Datum, type DiagramComponent, type DividerComponent, type DonutChartComponent, type EnableNotificationComponent, type EventSessionComponent, type FlightTrackerComponent, type FollowupComponent, type FormComponent, type FormDateRange, type FormField, type GridComponent, HEROUI_AGENT_ATTACHMENT_ACCEPT, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE, HEROUI_AGENT_ATTACHMENT_MAX_BYTES, HEROUI_AGENT_MAX_ATTACHMENTS, HEROUI_AGENT_PROTOCOL_VERSION, HEROUI_AGENT_REMOTE_CONFIG_VERSION, HEROUI_AGENT_SDK_VERSION, HEROUI_AGENT_TASK_ID, HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES, type HeadingComponent, type HeatmapComponent, type HeroUIAgentAttachmentContentType, type IconComponent, type ImageComponent, type ItemCardComponent, type ItemCardGroupComponent, type ItemCardVariant, type KpiGridComponent, LEGACY_AGENT_MODEL_IDS, type LayoutAlign, type LayoutGap, type LayoutJustify, type LineChartComponent, type ListBlockComponent, type ListComponent, MAX_CLIENT_TOOLS, MAX_CLIENT_TOOLS_BYTES, type MapComponent, type MapCoordinate, type MapLocation, type MapLocationAction, type MeterListComponent, type MeterTone, type MetricGridComponent, type NumberFormat, type PieChartComponent, type PlayerCardComponent, type PlaylistComponent, type ProductCardComponent, type ProductCardItem, type ProductCardPrice, type ProductCardRating, type ProductSignalsComponent, type ProgressComponent, type PurchaseCompleteComponent, type PurchaseItemsComponent, RESERVED_AGENT_TOOL_NAMES, RESERVED_AGENT_TOOL_PREFIX, type RadarChartComponent, type RadialChartComponent, type RatingComponent, type RecordCardComponent, type RecordCardLayout, type RecordCardTone, type RideStatusComponent, type RowComponent, type SankeyChartComponent, type ScatterChartComponent, SignedTrustedAgentClientData, type SpacerComponent, type StepStatus, type StepsComponent, type SwitchGroupComponent, TRUSTED_AGENT_CLIENT_DATA_KEY, type TabsComponent, type TagListComponent, type TextComponent, type ToggleGroupComponent, TrustedAgentClientData, type ViewEventComponent, type WeatherCondition, type WeatherCurrentComponent, type WeatherForecastComponent, type WeatherUnit, accordionComponentSchema, actionGroupComponentSchema, agentIconNames, agentIconSchema, agentModelIdSchema, agentSourceSchema, agentSourcesSchema, agentUIComponentSchema, agentUILeafComponentSchema, agentUINodeSchema, agentUIRenderableSchema, analyticalLeafComponentSchema, areaChartComponentSchema, badgeComponentSchema, barChartComponentSchema, buttonComponentSchema, calloutComponentSchema, cardComponentSchema, cardComponentVariantSchema, channelMessageComponentSchema, chartColorSchema, clientToolManifestEntrySchema, clientToolsSchema, codeBlockComponentSchema, colComponentSchema, comparisonListComponentSchema, composeUIInputSchema, composedChartComponentSchema, composedUIComponentSchema, createEventComponentSchema, dashboardComponentSchema, dataTableComponentSchema, diagramComponentSchema, dividerComponentSchema, donutChartComponentSchema, enableNotificationComponentSchema, eventSessionComponentSchema, flightTrackerComponentSchema, followupComponentSchema, formComponentSchema, getAgentModelTier, getAgentUIContainerChildren, gridComponentSchema, headingComponentSchema, heatmapComponentSchema, iconComponentSchema, imageComponentSchema, isAgentModelId, isAgentUIContainerComponent, isAgentUILayoutLeafComponent, isAgentUIPrimitiveComponent, isHeroUIAgentAttachmentContentType, itemCardComponentSchema, itemCardGroupComponentSchema, kpiGridComponentSchema, lineChartComponentSchema, listBlockComponentSchema, listComponentSchema, mapComponentSchema, meterListComponentSchema, metricGridComponentSchema, numberFormatSchema, parseAgentRemoteConfig, pieChartComponentSchema, playerCardComponentSchema, playlistComponentSchema, productCardComponentSchema, productSignalsComponentSchema, progressComponentSchema, purchaseCompleteComponentSchema, purchaseItemsComponentSchema, radarChartComponentSchema, radialChartComponentSchema, ratingComponentSchema, recordCardComponentSchema, recordCardLayoutSchema, renderAgentUICatalogPrompt, renderComponentInputSchema, resolveAgentModelId, rideStatusComponentSchema, rowComponentSchema, sankeyChartComponentSchema, scatterChartComponentSchema, signTrustedAgentClientData, spacerComponentSchema, stepsComponentSchema, switchGroupComponentSchema, tabsComponentSchema, tagListComponentSchema, textComponentSchema, toggleGroupComponentSchema, verifyTrustedAgentClientData, viewEventComponentSchema, weatherConditionSchema, weatherConditions, weatherCurrentComponentSchema, weatherForecastComponentSchema };
|