@heroui/agent 1.0.0-beta.3 → 1.0.0-beta.6

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +119 -68
  3. package/dist/chunk-3UR3CJAJ.js +1 -0
  4. package/dist/chunk-AR424OVX.js +1 -0
  5. package/dist/chunk-BYV3XUCN.js +1 -0
  6. package/dist/chunk-L5DXTMC2.js +1 -0
  7. package/dist/chunk-LMNV4H5B.js +1 -0
  8. package/dist/chunk-ZD5U6JIE.js +1 -0
  9. package/dist/client-tools-manifest-2T23ADUM.js +1 -0
  10. package/dist/css/index.css +1 -2
  11. package/dist/index.d.ts +9 -712
  12. package/dist/index.js +1 -1
  13. package/dist/internal/host.d.ts +108 -0
  14. package/dist/internal/host.js +1 -0
  15. package/dist/internal/shared.d.ts +63 -0
  16. package/dist/internal/shared.js +1 -0
  17. package/dist/next.d.ts +3 -4
  18. package/dist/next.js +1 -1
  19. package/dist/persistence-YI6JSYCT.js +1 -0
  20. package/dist/server.d.ts +21 -2
  21. package/dist/server.js +1 -1
  22. package/dist/types-BeXKAj2P.d.ts +549 -0
  23. package/dist/version-BOWn57s2.d.ts +5 -0
  24. package/package.json +18 -34
  25. package/dist/chart-content-YGW25P3Z.js +0 -1
  26. package/dist/chunk-4JEZZR5J.js +0 -1
  27. package/dist/chunk-6RWQT7JH.js +0 -2
  28. package/dist/chunk-6ZJJN322.js +0 -1
  29. package/dist/chunk-7CUSOLDM.js +0 -5
  30. package/dist/chunk-7KCGPNEN.js +0 -1
  31. package/dist/chunk-CLHBM3HQ.js +0 -1
  32. package/dist/chunk-CR3H7AVI.js +0 -1
  33. package/dist/chunk-E43KPTLS.js +0 -2
  34. package/dist/chunk-HCLXS4HQ.js +0 -1
  35. package/dist/chunk-JTZX5KVY.js +0 -1
  36. package/dist/chunk-KQTLIOZ3.js +0 -1
  37. package/dist/chunk-M22IGTLZ.js +0 -1
  38. package/dist/chunk-MXXCR5SR.js +0 -1
  39. package/dist/chunk-PZJ4NC3J.js +0 -1
  40. package/dist/chunk-RNNGE7KM.js +0 -1
  41. package/dist/chunk-T4VDCNDW.js +0 -1
  42. package/dist/chunk-UHHKMESI.js +0 -1
  43. package/dist/component-renderer-KWBZJPBV.js +0 -1
  44. package/dist/composer-draft-NSKK65F3.js +0 -1
  45. package/dist/composer-image-draft-KAGTNQR7.js +0 -1
  46. package/dist/contracts.d.ts +0 -1683
  47. package/dist/contracts.js +0 -2
  48. package/dist/embed-runtime-YK64GOPA.js +0 -5
  49. package/dist/identity-CAJPsGqJ.d.ts +0 -101
  50. package/dist/interactive-map-surface-WC2LPCR7.js +0 -1
  51. package/dist/internal/client-tools.js +0 -1
  52. package/dist/internal/models.js +0 -1
  53. package/dist/internal/runtime.js +0 -1
  54. package/dist/internal/theme.js +0 -1
  55. package/dist/model-picker-QTI5TDBG.js +0 -1
  56. package/dist/shell-permission-picker-KIC3VEYJ.js +0 -1
@@ -1,1683 +0,0 @@
1
- import { z } from 'zod';
2
- 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 } from './identity-CAJPsGqJ.js';
3
- import { UIMessage } from 'ai';
4
-
5
- /** Maximum number of files accepted on one HeroUI Agent message. */
6
- declare const HEROUI_AGENT_MAX_ATTACHMENTS = 5;
7
- /** Maximum stored size for one HeroUI Agent attachment (10 MiB). */
8
- declare const HEROUI_AGENT_ATTACHMENT_MAX_BYTES: number;
9
- /**
10
- * File types that the hosted model pipeline can process consistently.
11
- *
12
- * SVG is intentionally excluded because it can carry active content. Hosted
13
- * document parsing handles the remaining office and publishing formats.
14
- */
15
- declare const HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE: {
16
- readonly "application/epub+zip": "epub";
17
- readonly "application/json": "json";
18
- readonly "application/msword": "doc";
19
- readonly "application/pdf": "pdf";
20
- readonly "application/rtf": "rtf";
21
- readonly "application/vnd.ms-excel": "xls";
22
- readonly "application/vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb";
23
- readonly "application/vnd.ms-excel.sheet.macroenabled.12": "xlsm";
24
- readonly "application/vnd.ms-powerpoint": "ppt";
25
- readonly "application/vnd.ms-powerpoint.presentation.macroenabled.12": "pptm";
26
- readonly "application/vnd.ms-word.document.macroenabled.12": "docm";
27
- readonly "application/vnd.oasis.opendocument.presentation": "odp";
28
- readonly "application/vnd.oasis.opendocument.spreadsheet": "ods";
29
- readonly "application/vnd.oasis.opendocument.text": "odt";
30
- readonly "application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx";
31
- readonly "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx";
32
- readonly "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx";
33
- readonly "image/gif": "gif";
34
- readonly "image/jpeg": "jpg";
35
- readonly "image/png": "png";
36
- readonly "image/webp": "webp";
37
- readonly "text/csv": "csv";
38
- readonly "text/html": "html";
39
- readonly "text/markdown": "md";
40
- readonly "text/plain": "txt";
41
- readonly "text/rtf": "rtf";
42
- readonly "text/tab-separated-values": "tsv";
43
- };
44
- type HeroUIAgentAttachmentContentType = keyof typeof HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE;
45
- declare const HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES: readonly ("application/epub+zip" | "application/json" | "application/msword" | "application/pdf" | "application/rtf" | "application/vnd.ms-excel" | "application/vnd.ms-excel.sheet.binary.macroenabled.12" | "application/vnd.ms-excel.sheet.macroenabled.12" | "application/vnd.ms-powerpoint" | "application/vnd.ms-powerpoint.presentation.macroenabled.12" | "application/vnd.ms-word.document.macroenabled.12" | "application/vnd.oasis.opendocument.presentation" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.text" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | "text/csv" | "text/html" | "text/markdown" | "text/plain" | "text/rtf" | "text/tab-separated-values")[];
46
- declare const HEROUI_AGENT_ATTACHMENT_ACCEPT: string;
47
- declare const HEROUI_AGENT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION: Readonly<Record<string, "application/epub+zip" | "application/json" | "application/msword" | "application/pdf" | "application/rtf" | "application/vnd.ms-excel" | "application/vnd.ms-excel.sheet.binary.macroenabled.12" | "application/vnd.ms-excel.sheet.macroenabled.12" | "application/vnd.ms-powerpoint" | "application/vnd.ms-powerpoint.presentation.macroenabled.12" | "application/vnd.ms-word.document.macroenabled.12" | "application/vnd.oasis.opendocument.presentation" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.text" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | "text/csv" | "text/html" | "text/markdown" | "text/plain" | "text/rtf" | "text/tab-separated-values">>;
48
- declare const HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES: ReadonlySet<string>;
49
- declare function isHeroUIAgentAttachmentContentType(value: string): value is HeroUIAgentAttachmentContentType;
50
- /** Browsers sometimes omit Office MIME types; fall back to the file extension. */
51
- declare function resolveHeroUIAgentAttachmentContentType(contentType: string, filename: string): HeroUIAgentAttachmentContentType | null;
52
-
53
- /**
54
- * Public remote configuration document served by
55
- * `GET /v1/agents/:agentId/appearance`.
56
- *
57
- * Validated by hand rather than with Zod on purpose: the embed reads this
58
- * document on the panel-shell tier, which has to paint without loading any
59
- * third-party runtime dependency. See `scripts/check-bundle-size.mjs`.
60
- */
61
-
62
- /**
63
- * Shape version of the document.
64
- *
65
- * Bumped only when the document changes in a way an older SDK cannot read. An
66
- * unrecognized version is ignored rather than rejected loudly, so a bump
67
- * degrades to "no remote configuration" instead of a broken embed.
68
- */
69
- declare const HEROUI_AGENT_REMOTE_CONFIG_VERSION = 1;
70
- type AgentRemoteThemeColor = string | {
71
- dark?: string;
72
- light?: string;
73
- };
74
- type AgentRemoteConfig = {
75
- appearance?: {
76
- componentSurfaceVariant?: "outline" | "plain" | "surface" | "surface-secondary";
77
- launcher?: {
78
- background?: AgentRemoteThemeColor;
79
- icon?: string;
80
- position?: "bottom-left" | "bottom-right";
81
- style?: Record<string, string>;
82
- };
83
- panel?: {
84
- expandable?: boolean;
85
- expanded?: boolean;
86
- initialHeight?: number | string;
87
- initialWidth?: number | string;
88
- };
89
- theme?: {
90
- colorScheme?: "dark" | "light" | "system";
91
- colors?: {
92
- accent?: AgentRemoteThemeColor;
93
- background?: AgentRemoteThemeColor;
94
- foreground?: AgentRemoteThemeColor;
95
- overlay?: AgentRemoteThemeColor;
96
- surface?: AgentRemoteThemeColor;
97
- surfaceSecondary?: AgentRemoteThemeColor;
98
- tooltip?: AgentRemoteThemeColor;
99
- };
100
- designTheme?: "base" | "brutalism" | "glass" | "mouve";
101
- radius?: "pill" | "round" | "sharp" | "soft";
102
- typography?: {
103
- baseSize?: number;
104
- fontFamily?: string;
105
- };
106
- };
107
- surfaceVariant?: "outline" | "plain" | "surface" | "surface-secondary";
108
- viewMode?: "floating" | "sidebar";
109
- };
110
- capabilities?: {
111
- imageSearch?: boolean;
112
- newsSearch?: boolean;
113
- webSearch?: boolean;
114
- };
115
- composer?: {
116
- attachments?: HeroUIAgentAttachmentContentType[] | false;
117
- defaultModel?: string;
118
- dictation?: boolean;
119
- disclaimer?: string | false;
120
- modelPicker?: boolean;
121
- placeholder?: string;
122
- };
123
- markdown?: {
124
- animated?: false | {
125
- animation: "blurIn" | "fadeIn" | "slideUp";
126
- [key: string]: unknown;
127
- };
128
- caret?: "block" | "circle" | false;
129
- };
130
- permissions?: {
131
- defaultMode?: "ask" | "auto" | "full";
132
- showPicker?: boolean;
133
- };
134
- responseActions?: ("copy" | "feedback" | "retry")[] | false;
135
- /** Compact Beta chip in the open panel header. */
136
- showBetaBadge?: boolean;
137
- startScreen?: {
138
- greeting?: string;
139
- promptShortcuts?: boolean;
140
- prompts?: string[];
141
- subtitle?: string;
142
- };
143
- /** Opaque cache validator; the SDK echoes it back as `If-None-Match`. */
144
- revision: string;
145
- version: number;
146
- /**
147
- * Webfont backing `appearance.theme.typography.fontFamily`. The SDK loads it
148
- * into the host document, since the host page has no reason to have it.
149
- */
150
- webfont?: {
151
- familyName: string;
152
- fontFaceUrl?: string;
153
- stylesheetUrl?: string;
154
- };
155
- };
156
- /**
157
- * Parses an untrusted remote configuration payload.
158
- *
159
- * Returns `null` for anything unusable so callers fall back to local defaults.
160
- * A single malformed field costs only the group it belongs to — discarding a
161
- * customer's entire configuration over one bad color would be a far worse
162
- * failure than losing one group.
163
- */
164
- declare function parseAgentRemoteConfig(value: unknown): AgentRemoteConfig | null;
165
-
166
- /**
167
- * Small semantic icon vocabulary for model-generated UI. Keeping this list
168
- * closed makes payloads deterministic and prevents arbitrary icon imports.
169
- */
170
- 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"];
171
- type AgentIconName = (typeof agentIconNames)[number];
172
- type NumberFormat = {
173
- compact?: boolean;
174
- style: "number";
175
- } | {
176
- maximumFractionDigits?: number;
177
- style: "percent";
178
- } | {
179
- compact?: boolean;
180
- currency: string;
181
- style: "currency";
182
- };
183
- /**
184
- * Theme-aware chart colors safe for model-generated UI. Semantic colors adapt
185
- * to light/dark themes; chart-1..5 expose the host application's chart palette.
186
- */
187
- type ChartColor = "accent" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5" | "danger" | "default" | "success" | "warning";
188
- type ComponentBase = {
189
- description?: string;
190
- id: string;
191
- title: string;
192
- };
193
- type Datum = Record<string, boolean | null | number | string>;
194
- type CartesianSeries = {
195
- color?: ChartColor;
196
- dataKey: string;
197
- format?: NumberFormat;
198
- label: string;
199
- };
200
- type CartesianRange = {
201
- id: string;
202
- label: string;
203
- maxItems?: number;
204
- };
205
- type CartesianComponent = ComponentBase & {
206
- data: Datum[];
207
- defaultRangeId?: string;
208
- ranges?: CartesianRange[];
209
- series: CartesianSeries[];
210
- showSummary?: boolean;
211
- xKey: string;
212
- };
213
- type MetricGridComponent = ComponentBase & {
214
- kind: "metric-grid";
215
- metrics: Array<{
216
- change?: number;
217
- format?: NumberFormat;
218
- icon?: AgentIconName;
219
- label: string;
220
- value: number;
221
- }>;
222
- };
223
- /**
224
- * Headline KPIs that each carry the series behind the number, drawn as a
225
- * sparkline beside the value. `metric-grid` covers the same KPIs when no history
226
- * is available; this kind exists so the trend is never faked from a single point.
227
- */
228
- type KpiGridComponent = ComponentBase & {
229
- kind: "kpi-grid";
230
- metrics: Array<{
231
- change?: number;
232
- color?: ChartColor;
233
- format?: NumberFormat;
234
- icon?: AgentIconName;
235
- label: string;
236
- /** Oldest to newest. The last point should agree with `value`. */
237
- trend: number[];
238
- value: number;
239
- }>;
240
- };
241
- type LineChartComponent = CartesianComponent & {
242
- /**
243
- * `profit-loss` splits one series around `baseline`; `live` keeps the newest
244
- * window visible and emphasizes its latest value. Both modes require one
245
- * series so their visual meaning stays unambiguous.
246
- */
247
- baseline?: number;
248
- kind: "line-chart";
249
- mode?: "live" | "profit-loss" | "standard";
250
- negativeColor?: ChartColor;
251
- positiveColor?: ChartColor;
252
- windowSize?: number;
253
- };
254
- type AreaChartComponent = CartesianComponent & {
255
- kind: "area-chart";
256
- stacked?: boolean;
257
- };
258
- type BarChartComponent = CartesianComponent & {
259
- kind: "bar-chart";
260
- layout?: "horizontal" | "vertical";
261
- stacked?: boolean;
262
- };
263
- type ComposedChartSeries = CartesianSeries & {
264
- axis?: "left" | "right";
265
- stacked?: boolean;
266
- type: "area" | "bar" | "line";
267
- };
268
- type ComposedChartComponent = Omit<CartesianComponent, "series"> & {
269
- kind: "composed-chart";
270
- series: ComposedChartSeries[];
271
- };
272
- type PieChartComponent = ComponentBase & {
273
- colors?: Record<string, ChartColor>;
274
- data: Datum[];
275
- format?: NumberFormat;
276
- kind: "pie-chart";
277
- labelKey: string;
278
- valueKey: string;
279
- };
280
- type DonutChartComponent = Omit<PieChartComponent, "kind"> & {
281
- kind: "donut-chart";
282
- };
283
- type RadarChartComponent = ComponentBase & {
284
- angleKey: string;
285
- data: Datum[];
286
- kind: "radar-chart";
287
- series: CartesianSeries[];
288
- };
289
- type RadialChartComponent = ComponentBase & {
290
- colors?: Record<string, ChartColor>;
291
- data: Datum[];
292
- endAngle?: number;
293
- format?: NumberFormat;
294
- kind: "radial-chart";
295
- labelKey: string;
296
- maxValue?: number;
297
- startAngle?: number;
298
- valueKey: string;
299
- };
300
- type SankeyChartComponent = ComponentBase & {
301
- format?: NumberFormat;
302
- kind: "sankey-chart";
303
- links: Array<{
304
- source: string;
305
- target: string;
306
- value: number;
307
- }>;
308
- nodes: Array<{
309
- id: string;
310
- label: string;
311
- }>;
312
- };
313
- type ScatterChartComponent = ComponentBase & {
314
- colors?: Record<string, ChartColor>;
315
- data: Datum[];
316
- format?: NumberFormat;
317
- groupKey?: string;
318
- kind: "scatter-chart";
319
- labelKey?: string;
320
- sizeKey?: string;
321
- xKey: string;
322
- yKey: string;
323
- };
324
- type HeatmapComponent = ComponentBase & {
325
- color?: ChartColor;
326
- data: Datum[];
327
- format?: NumberFormat;
328
- kind: "heatmap";
329
- valueKey: string;
330
- xKey: string;
331
- yKey: string;
332
- };
333
- type CandlestickChartComponent = ComponentBase & {
334
- closeKey: string;
335
- data: Datum[];
336
- downColor?: ChartColor;
337
- format?: NumberFormat;
338
- highKey: string;
339
- kind: "candlestick-chart";
340
- lowKey: string;
341
- openKey: string;
342
- upColor?: ChartColor;
343
- xKey: string;
344
- };
345
- type FunnelChartComponent = ComponentBase & {
346
- colors?: Record<string, ChartColor>;
347
- data: Datum[];
348
- format?: NumberFormat;
349
- kind: "funnel-chart";
350
- labelKey: string;
351
- orientation?: "horizontal" | "vertical";
352
- showPercentages?: boolean;
353
- valueKey: string;
354
- };
355
- type GaugeChartComponent = ComponentBase & {
356
- color?: ChartColor;
357
- format?: NumberFormat;
358
- kind: "gauge-chart";
359
- label: string;
360
- max?: number;
361
- min?: number;
362
- notches?: number;
363
- orientation?: "arc" | "linear";
364
- value: number;
365
- };
366
- type SunburstNode = {
367
- children?: SunburstNode[];
368
- color?: ChartColor;
369
- id: string;
370
- label: string;
371
- value?: number;
372
- };
373
- type SunburstChartComponent = ComponentBase & {
374
- data: SunburstNode;
375
- format?: NumberFormat;
376
- kind: "sunburst-chart";
377
- };
378
- type DataTableComponent = ComponentBase & {
379
- columns: Array<{
380
- format?: NumberFormat;
381
- key: string;
382
- label: string;
383
- }>;
384
- filterable?: boolean;
385
- kind: "data-table";
386
- rows: Datum[];
387
- variant?: "primary" | "secondary";
388
- };
389
- type ComparisonListComponent = ComponentBase & {
390
- items: Array<{
391
- change?: number;
392
- format?: NumberFormat;
393
- label: string;
394
- note?: string;
395
- value: number;
396
- }>;
397
- kind: "comparison-list";
398
- };
399
- type MeterTone = "accent" | "danger" | "default" | "success" | "warning";
400
- type MeterListComponent = ComponentBase & {
401
- items: Array<{
402
- description?: string;
403
- format?: NumberFormat;
404
- id: string;
405
- label: string;
406
- max?: number;
407
- min?: number;
408
- tone?: MeterTone;
409
- value: number;
410
- }>;
411
- kind: "meter-list";
412
- };
413
- type FieldBase = {
414
- description?: string;
415
- label: string;
416
- name: string;
417
- required?: boolean;
418
- };
419
- type FormDateRange = {
420
- end: string;
421
- start: string;
422
- };
423
- type FormField = (FieldBase & {
424
- defaultValue?: string;
425
- inputType?: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
426
- kind: "input";
427
- placeholder?: string;
428
- }) | (FieldBase & {
429
- defaultValue?: string;
430
- kind: "textarea";
431
- placeholder?: string;
432
- rows?: number;
433
- }) | (FieldBase & {
434
- defaultValue?: string;
435
- kind: "select" | "radio-group";
436
- options: Array<{
437
- label: string;
438
- value: string;
439
- }>;
440
- placeholder?: string;
441
- }) | (FieldBase & {
442
- defaultValue?: string[];
443
- kind: "checkbox-group";
444
- options: Array<{
445
- label: string;
446
- value: string;
447
- }>;
448
- }) | (FieldBase & {
449
- defaultValue?: string[];
450
- kind: "combobox";
451
- /**
452
- * Longer option lists than a select can carry, because the field filters
453
- * as the user types instead of asking them to scan.
454
- */
455
- options: Array<{
456
- description?: string;
457
- label: string;
458
- value: string;
459
- }>;
460
- placeholder?: string;
461
- selectionMode?: "multiple" | "single";
462
- }) | (FieldBase & {
463
- defaultValue?: number;
464
- kind: "slider";
465
- max: number;
466
- min: number;
467
- step?: number;
468
- }) | (FieldBase & {
469
- defaultValue?: number;
470
- format?: NumberFormat;
471
- kind: "number";
472
- max?: number;
473
- min?: number;
474
- placeholder?: string;
475
- step?: number;
476
- }) | (FieldBase & {
477
- defaultValue?: boolean;
478
- kind: "switch";
479
- }) | (FieldBase & {
480
- defaultValue?: string;
481
- kind: "date-picker";
482
- max?: string;
483
- min?: string;
484
- }) | (FieldBase & {
485
- defaultValue?: FormDateRange;
486
- kind: "date-range-picker";
487
- max?: string;
488
- min?: string;
489
- }) | (FieldBase & {
490
- defaultValue?: string;
491
- hourCycle?: 12 | 24;
492
- kind: "time-field";
493
- max?: string;
494
- min?: string;
495
- });
496
- type FormComponent = ComponentBase & {
497
- actions: ComponentActionSpec[];
498
- fields: FormField[];
499
- kind: "form";
500
- };
501
- type TextComponent = ComponentBase & {
502
- content: string;
503
- kind: "text";
504
- variant?: "card" | "clear";
505
- };
506
- type CalloutComponent = ComponentBase & {
507
- content: string;
508
- icon?: AgentIconName;
509
- kind: "callout";
510
- tone?: "accent" | "danger" | "neutral" | "success" | "warning";
511
- };
512
- type ImageComponent = ComponentBase & {
513
- images: Array<{
514
- alt: string;
515
- aspectRatio?: "landscape" | "portrait" | "square" | "wide";
516
- caption?: string;
517
- src: string;
518
- }>;
519
- kind: "image";
520
- variant?: "grid" | "horizontal";
521
- };
522
- type MapCoordinate = {
523
- latitude: number;
524
- longitude: number;
525
- };
526
- type MapLocationActionBase = {
527
- href: string;
528
- id: string;
529
- label: string;
530
- variant?: ActionVariant;
531
- };
532
- type MapLocationAction = MapLocationActionBase & {
533
- kind: "call" | "directions" | "other" | "website";
534
- };
535
- type MapLocation = MapCoordinate & {
536
- actions?: MapLocationAction[];
537
- address?: string;
538
- category?: string;
539
- id: string;
540
- images?: Array<{
541
- alt: string;
542
- src: string;
543
- }>;
544
- notes?: string;
545
- rating?: number;
546
- relevance?: number;
547
- reviewCount?: number;
548
- title: string;
549
- };
550
- type MapComponent = ComponentBase & {
551
- initialLocationId?: string;
552
- kind: "map";
553
- locations: MapLocation[];
554
- viewport?: {
555
- center: MapCoordinate;
556
- zoom: number;
557
- };
558
- };
559
- type TagListComponent = ComponentBase & {
560
- kind: "tag-list";
561
- tags: string[];
562
- };
563
- type ListComponent = ComponentBase & {
564
- items: Array<{
565
- children?: string[];
566
- checked?: boolean;
567
- id: string;
568
- text: string;
569
- }>;
570
- kind: "list";
571
- style?: "bulleted" | "checklist" | "numbered";
572
- };
573
- type ListBlockComponent = ComponentBase & {
574
- items: Array<{
575
- description?: string;
576
- id: string;
577
- icon?: AgentIconName;
578
- imageAlt?: string;
579
- imageUrl?: string;
580
- meta?: string;
581
- rating?: number;
582
- title: string;
583
- }>;
584
- kind: "list-block";
585
- };
586
- type AccordionComponent = ComponentBase & {
587
- kind: "accordion";
588
- sections: Array<{
589
- content: string;
590
- defaultOpen?: boolean;
591
- id: string;
592
- title: string;
593
- }>;
594
- };
595
- type StepStatus = "blocked" | "cancelled" | "completed" | "failed" | "in-progress" | "pending"
596
- /** @deprecated Use "completed". */
597
- | "complete"
598
- /** @deprecated Use "in-progress". */
599
- | "current"
600
- /** @deprecated Use "pending". */
601
- | "upcoming";
602
- type StepsComponent = ComponentBase & {
603
- kind: "steps";
604
- steps: Array<{
605
- content?: string;
606
- icon?: AgentIconName;
607
- id: string;
608
- image?: AgentUIImage;
609
- meta?: string;
610
- progress?: number;
611
- status?: StepStatus;
612
- timestamp?: string;
613
- title: string;
614
- }>;
615
- variant?: "steps" | "timeline";
616
- };
617
- type CodeBlockComponent = ComponentBase & {
618
- code: string;
619
- kind: "code-block";
620
- language?: string;
621
- };
622
- type DiagramComponent = ComponentBase & {
623
- /**
624
- * Mermaid source. Text in, diagram out — the whole structure costs one node
625
- * instead of the dozens a hand-built tree would spend against the node cap.
626
- */
627
- chart: string;
628
- kind: "diagram";
629
- };
630
- type TabsComponent = ComponentBase & {
631
- defaultValue?: string;
632
- kind: "tabs";
633
- tabs: Array<{
634
- id: string;
635
- label: string;
636
- } & ({
637
- /** Backwards-compatible plain-text panel content. */
638
- children?: never;
639
- content: string;
640
- } | {
641
- /** Rich panel content rendered through the same recursive Agent UI renderer. */
642
- children: AgentUINode[];
643
- content?: never;
644
- })>;
645
- variant?: "primary" | "secondary";
646
- };
647
- type ActionVariant = "danger" | "outline" | "primary" | "secondary" | "tertiary";
648
- /**
649
- * Direct client-tool invocation attached to an action button. The widget
650
- * executes the named browser-registered tool with these arguments when the
651
- * button is pressed — no model round trip. The runtime strips tool calls that
652
- * do not match a registered, approval-free client tool.
653
- */
654
- type ActionToolCall = {
655
- arguments: Record<string, unknown>;
656
- name: string;
657
- };
658
- type ComponentActionSpec = {
659
- id: string;
660
- label: string;
661
- prompt?: string;
662
- toolCall?: ActionToolCall;
663
- variant?: ActionVariant;
664
- };
665
- type ItemCardVariant = "default" | "outline" | "secondary" | "tertiary" | "transparent";
666
- type ItemCardComponent = ComponentBase & {
667
- action?: ComponentActionSpec;
668
- isDisabled?: boolean;
669
- isSelected?: boolean;
670
- kind: "item-card";
671
- /** Compact leading slot, usually an icon or image node. */
672
- left?: AgentUINode[];
673
- /** Flexible primary slot, usually heading and clear text nodes. */
674
- middle: AgentUINode[];
675
- /** Compact trailing slot, usually a badge, value, icon, or button node. */
676
- right?: AgentUINode[];
677
- variant?: ItemCardVariant;
678
- };
679
- type ItemCardGroupComponent = ComponentBase & {
680
- children: ItemCardComponent[];
681
- columns?: 2 | 3;
682
- kind: "item-card-group";
683
- layout?: "grid" | "list";
684
- showHeader?: boolean;
685
- variant?: ItemCardVariant;
686
- };
687
- type ActionGroupComponent = ComponentBase & {
688
- actions: ComponentActionSpec[];
689
- kind: "action-group";
690
- orientation?: "horizontal" | "vertical";
691
- };
692
- type FollowupComponent = ComponentBase & {
693
- kind: "followup";
694
- prompts: Array<{
695
- id: string;
696
- label: string;
697
- prompt: string;
698
- }>;
699
- };
700
- type SwitchGroupComponent = ComponentBase & {
701
- items: Array<{
702
- defaultSelected?: boolean;
703
- description?: string;
704
- id: string;
705
- label: string;
706
- }>;
707
- kind: "switch-group";
708
- };
709
- type ToggleGroupComponent = ComponentBase & {
710
- defaultValue?: string[];
711
- items: Array<{
712
- id: string;
713
- label: string;
714
- }>;
715
- kind: "toggle-group";
716
- selectionMode?: "multiple" | "single";
717
- };
718
- type CardComponentVariant = "outline" | "plain" | "surface" | "surface-secondary" | "surface-tertiary" | "widget";
719
- type RecordCardLayout = "compact" | "details" | "media";
720
- type RecordCardTone = "accent" | "danger" | "default" | "muted" | "success" | "warning";
721
- type RecordCardComponent = ComponentBase & {
722
- actions?: ComponentActionSpec[];
723
- eyebrow?: string;
724
- fields: Array<{
725
- icon?: AgentIconName;
726
- label: string;
727
- tone?: RecordCardTone;
728
- value: string;
729
- }>;
730
- image?: {
731
- alt: string;
732
- src: string;
733
- };
734
- kind: "record-card";
735
- layout?: RecordCardLayout;
736
- status?: {
737
- label: string;
738
- tone?: RecordCardTone;
739
- };
740
- variant?: CardComponentVariant;
741
- };
742
- type ProductCardPrice = {
743
- amount: number;
744
- currency?: string;
745
- };
746
- type ProductCardRating = {
747
- count?: number;
748
- value: number;
749
- };
750
- type ProductCardItem = {
751
- actions?: ComponentActionSpec[];
752
- badge?: {
753
- label: string;
754
- tone?: RecordCardTone;
755
- };
756
- description?: string;
757
- id: string;
758
- image: {
759
- alt: string;
760
- src: string;
761
- };
762
- meta?: string;
763
- name: string;
764
- price: ProductCardPrice;
765
- rating?: ProductCardRating;
766
- };
767
- type ProductCardComponent = ComponentBase & {
768
- actions?: ComponentActionSpec[];
769
- kind: "product-card";
770
- products: ProductCardItem[];
771
- variant?: CardComponentVariant;
772
- };
773
- declare const weatherConditions: readonly ["clear", "partly-cloudy", "cloudy", "fog", "drizzle", "rain", "snow", "thunderstorm", "windy", "unknown"];
774
- type WeatherCondition = (typeof weatherConditions)[number];
775
- type WeatherUnit = "celsius" | "fahrenheit";
776
- type AgentUIImage = {
777
- alt: string;
778
- src: string;
779
- };
780
- type AgentUIAmount = {
781
- amount: number;
782
- currency: string;
783
- };
784
- type FlightTrackerComponent = ComponentBase & {
785
- airline: {
786
- logo?: AgentUIImage;
787
- name: string;
788
- };
789
- date: string;
790
- destination: {
791
- label: string;
792
- status?: string;
793
- time: string;
794
- };
795
- flightNumber: string;
796
- kind: "flight-tracker";
797
- origin: {
798
- label: string;
799
- status?: string;
800
- time: string;
801
- };
802
- progress?: number;
803
- };
804
- type CreateEventComponent = ComponentBase & {
805
- actions?: ComponentActionSpec[];
806
- date: {
807
- day: number;
808
- weekday: string;
809
- };
810
- events: Array<{
811
- id: string;
812
- status?: "existing" | "proposed";
813
- time: string;
814
- title: string;
815
- tone?: RecordCardTone;
816
- }>;
817
- kind: "create-event";
818
- };
819
- type PlaylistComponent = ComponentBase & {
820
- actions?: ComponentActionSpec[];
821
- cover?: AgentUIImage;
822
- kind: "playlist";
823
- tracks: Array<{
824
- action?: ComponentActionSpec;
825
- artist: string;
826
- id: string;
827
- image?: AgentUIImage;
828
- title: string;
829
- }>;
830
- };
831
- type RideStatusComponent = ComponentBase & {
832
- driver: {
833
- image?: AgentUIImage;
834
- name: string;
835
- };
836
- eta: string;
837
- kind: "ride-status";
838
- pickup: string;
839
- };
840
- type PurchaseItemsComponent = ComponentBase & {
841
- actions?: ComponentActionSpec[];
842
- currency: string;
843
- items: Array<{
844
- description?: string;
845
- id: string;
846
- image?: AgentUIImage;
847
- name: string;
848
- price?: number;
849
- quantity?: number;
850
- }>;
851
- kind: "purchase-items";
852
- totals: Array<{
853
- amount: number;
854
- emphasis?: boolean;
855
- label: string;
856
- }>;
857
- };
858
- type ChannelMessageComponent = ComponentBase & {
859
- attachments?: Array<{
860
- id: string;
861
- image?: AgentUIImage;
862
- name: string;
863
- }>;
864
- author: {
865
- image?: AgentUIImage;
866
- name: string;
867
- };
868
- channel: string;
869
- content: string;
870
- kind: "channel-message";
871
- timestamp: string;
872
- };
873
- type PurchaseCompleteComponent = ComponentBase & {
874
- action?: ComponentActionSpec;
875
- details: Array<{
876
- label: string;
877
- value: string;
878
- }>;
879
- kind: "purchase-complete";
880
- paid?: AgentUIAmount;
881
- product: {
882
- description?: string;
883
- image?: AgentUIImage;
884
- name: string;
885
- };
886
- };
887
- type PlayerCardComponent = ComponentBase & {
888
- backgroundImage?: AgentUIImage;
889
- jerseyNumber?: string;
890
- kind: "player-card";
891
- playerName: string;
892
- stats: Array<{
893
- label: string;
894
- value: number | string;
895
- }>;
896
- };
897
- type ViewEventComponent = ComponentBase & {
898
- date: string;
899
- kind: "view-event";
900
- time: string;
901
- tone?: RecordCardTone;
902
- };
903
- type EventSessionComponent = ComponentBase & {
904
- action?: ComponentActionSpec;
905
- eyebrow?: string;
906
- kind: "event-session";
907
- location: string;
908
- speakers: Array<{
909
- image?: AgentUIImage;
910
- name: string;
911
- role: string;
912
- }>;
913
- time: string;
914
- };
915
- type EnableNotificationComponent = ComponentBase & {
916
- actions: [ComponentActionSpec, ComponentActionSpec];
917
- kind: "enable-notification";
918
- };
919
- type WeatherForecastComponent = ComponentBase & {
920
- condition: WeatherCondition;
921
- forecast: Array<{
922
- condition: WeatherCondition;
923
- label: string;
924
- temperature: number;
925
- }>;
926
- high: number;
927
- kind: "weather-forecast";
928
- location: string;
929
- low: number;
930
- unit: WeatherUnit;
931
- };
932
- type WeatherCurrentComponent = ComponentBase & {
933
- condition: WeatherCondition;
934
- details?: Array<{
935
- label: string;
936
- value: string;
937
- }>;
938
- kind: "weather-current";
939
- location: string;
940
- temperature: number;
941
- unit: WeatherUnit;
942
- };
943
- type AnalyticalLeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | CandlestickChartComponent | FunnelChartComponent | GaugeChartComponent | SunburstChartComponent | DataTableComponent | ComparisonListComponent | MeterListComponent;
944
- type ProductSignalsComponent = ComponentBase & {
945
- defaultValue?: string;
946
- kind: "product-signals";
947
- tabs: Array<{
948
- component: AnalyticalLeafComponent;
949
- id: string;
950
- label: string;
951
- }>;
952
- };
953
- type AgentUILeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | CandlestickChartComponent | FunnelChartComponent | GaugeChartComponent | SunburstChartComponent | 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;
954
- type DashboardComponent = ComponentBase & {
955
- children: AgentUILeafComponent[];
956
- kind: "dashboard";
957
- layout: "chart-table" | "grid" | "metrics-chart" | "stack";
958
- };
959
- type AgentUIComponent = AgentUILeafComponent | DashboardComponent;
960
- type LayoutAlign = "center" | "end" | "start" | "stretch";
961
- type LayoutJustify = "between" | "center" | "end" | "start";
962
- type LayoutGap = "lg" | "md" | "none" | "sm";
963
- type RowComponent = {
964
- align?: LayoutAlign;
965
- children: AgentUINode[];
966
- gap?: LayoutGap;
967
- id: string;
968
- justify?: LayoutJustify;
969
- kind: "row";
970
- };
971
- type ColComponent = {
972
- align?: LayoutAlign;
973
- children: AgentUINode[];
974
- gap?: LayoutGap;
975
- id: string;
976
- justify?: LayoutJustify;
977
- kind: "col";
978
- };
979
- type GridComponent = {
980
- children: AgentUINode[];
981
- columns: 1 | 2 | 3 | 4;
982
- gap?: LayoutGap;
983
- id: string;
984
- kind: "grid";
985
- };
986
- type CardComponent = ComponentBase & {
987
- children: AgentUINode[];
988
- kind: "card";
989
- variant?: CardComponentVariant;
990
- };
991
- type SpacerComponent = {
992
- id: string;
993
- kind: "spacer";
994
- size?: "auto" | "lg" | "md" | "sm";
995
- };
996
- type DividerComponent = {
997
- id: string;
998
- kind: "divider";
999
- };
1000
- /**
1001
- * Chrome-free content primitives available only inside composed UI trees.
1002
- * They let the model build custom sections from HeroUI-styled parts when no
1003
- * full catalog component fits, without card wrappers or required titles.
1004
- */
1005
- type HeadingComponent = {
1006
- icon?: AgentIconName;
1007
- id: string;
1008
- kind: "heading";
1009
- level?: 1 | 2 | 3 | 4;
1010
- text: string;
1011
- };
1012
- type ButtonComponent = {
1013
- icon?: AgentIconName;
1014
- id: string;
1015
- kind: "button";
1016
- label: string;
1017
- prompt?: string;
1018
- toolCall?: ActionToolCall;
1019
- variant?: ActionVariant;
1020
- };
1021
- type BadgeComponent = {
1022
- id: string;
1023
- kind: "badge";
1024
- label: string;
1025
- tone?: RecordCardTone;
1026
- variant?: "soft" | "solid";
1027
- };
1028
- type IconComponent = {
1029
- id: string;
1030
- kind: "icon";
1031
- name: AgentIconName;
1032
- size?: "lg" | "md" | "sm";
1033
- tone?: RecordCardTone;
1034
- };
1035
- type RatingComponent = {
1036
- count?: number;
1037
- id: string;
1038
- kind: "rating";
1039
- value: number;
1040
- };
1041
- type ProgressComponent = {
1042
- id: string;
1043
- kind: "progress";
1044
- label?: string;
1045
- value: number;
1046
- };
1047
- type AgentUIPrimitiveComponent = BadgeComponent | ButtonComponent | HeadingComponent | IconComponent | ProgressComponent | RatingComponent;
1048
- type AgentUILayoutLeafComponent = DividerComponent | SpacerComponent;
1049
- type AgentUIContainerComponent = CardComponent | ColComponent | GridComponent | ItemCardComponent | ItemCardGroupComponent | RowComponent;
1050
- /** Any node that can appear inside a composed UI tree (leaves, layout leaves, containers). */
1051
- type AgentUINode = AgentUIContainerComponent | AgentUILayoutLeafComponent | AgentUILeafComponent | AgentUIPrimitiveComponent;
1052
- /** Any payload the component renderer accepts: classic components or composed UI trees. */
1053
- type AgentUIRenderable = AgentUIComponent | AgentUIContainerComponent;
1054
- declare const cardComponentVariantSchema: z.ZodType<CardComponentVariant>;
1055
- declare const recordCardLayoutSchema: z.ZodType<RecordCardLayout>;
1056
- declare const numberFormatSchema: z.ZodType<NumberFormat>;
1057
- declare const chartColorSchema: z.ZodType<ChartColor>;
1058
- declare const agentIconSchema: z.ZodType<AgentIconName>;
1059
- declare const weatherConditionSchema: z.ZodType<WeatherCondition>;
1060
- declare const metricGridComponentSchema: z.ZodType<MetricGridComponent>;
1061
- declare const kpiGridComponentSchema: z.ZodType<KpiGridComponent>;
1062
- declare const lineChartComponentSchema: z.ZodType<LineChartComponent>;
1063
- declare const areaChartComponentSchema: z.ZodType<AreaChartComponent>;
1064
- declare const barChartComponentSchema: z.ZodType<BarChartComponent>;
1065
- declare const composedChartComponentSchema: z.ZodType<ComposedChartComponent>;
1066
- declare const pieChartComponentSchema: z.ZodType<PieChartComponent>;
1067
- declare const donutChartComponentSchema: z.ZodType<DonutChartComponent>;
1068
- declare const radarChartComponentSchema: z.ZodType<RadarChartComponent>;
1069
- declare const radialChartComponentSchema: z.ZodType<RadialChartComponent>;
1070
- declare const sankeyChartComponentSchema: z.ZodType<SankeyChartComponent>;
1071
- declare const scatterChartComponentSchema: z.ZodType<ScatterChartComponent>;
1072
- declare const heatmapComponentSchema: z.ZodType<HeatmapComponent>;
1073
- declare const candlestickChartComponentSchema: z.ZodType<CandlestickChartComponent>;
1074
- declare const funnelChartComponentSchema: z.ZodType<FunnelChartComponent>;
1075
- declare const gaugeChartComponentSchema: z.ZodType<GaugeChartComponent>;
1076
- declare const sunburstChartComponentSchema: z.ZodType<SunburstChartComponent>;
1077
- declare const dataTableComponentSchema: z.ZodType<DataTableComponent>;
1078
- declare const comparisonListComponentSchema: z.ZodType<ComparisonListComponent>;
1079
- declare const meterListComponentSchema: z.ZodType<MeterListComponent>;
1080
- declare const formComponentSchema: z.ZodType<FormComponent>;
1081
- declare const textComponentSchema: z.ZodType<TextComponent>;
1082
- declare const calloutComponentSchema: z.ZodType<CalloutComponent>;
1083
- declare const imageComponentSchema: z.ZodType<ImageComponent>;
1084
- declare const mapComponentSchema: z.ZodType<MapComponent>;
1085
- declare const tagListComponentSchema: z.ZodType<TagListComponent>;
1086
- declare const listComponentSchema: z.ZodType<ListComponent>;
1087
- declare const listBlockComponentSchema: z.ZodType<ListBlockComponent>;
1088
- declare const accordionComponentSchema: z.ZodType<AccordionComponent>;
1089
- declare const stepsComponentSchema: z.ZodType<StepsComponent>;
1090
- declare const codeBlockComponentSchema: z.ZodType<CodeBlockComponent>;
1091
- declare const diagramComponentSchema: z.ZodType<DiagramComponent>;
1092
- declare const tabsComponentSchema: z.ZodType<TabsComponent>;
1093
- declare const actionGroupComponentSchema: z.ZodType<ActionGroupComponent>;
1094
- declare const followupComponentSchema: z.ZodType<FollowupComponent>;
1095
- declare const switchGroupComponentSchema: z.ZodType<SwitchGroupComponent>;
1096
- declare const toggleGroupComponentSchema: z.ZodType<ToggleGroupComponent>;
1097
- declare const recordCardComponentSchema: z.ZodType<RecordCardComponent>;
1098
- declare const productCardComponentSchema: z.ZodType<ProductCardComponent>;
1099
- declare const flightTrackerComponentSchema: z.ZodType<FlightTrackerComponent>;
1100
- declare const createEventComponentSchema: z.ZodType<CreateEventComponent>;
1101
- declare const playlistComponentSchema: z.ZodType<PlaylistComponent>;
1102
- declare const rideStatusComponentSchema: z.ZodType<RideStatusComponent>;
1103
- declare const purchaseItemsComponentSchema: z.ZodType<PurchaseItemsComponent>;
1104
- declare const channelMessageComponentSchema: z.ZodType<ChannelMessageComponent>;
1105
- declare const purchaseCompleteComponentSchema: z.ZodType<PurchaseCompleteComponent>;
1106
- declare const playerCardComponentSchema: z.ZodType<PlayerCardComponent>;
1107
- declare const viewEventComponentSchema: z.ZodType<ViewEventComponent>;
1108
- declare const eventSessionComponentSchema: z.ZodType<EventSessionComponent>;
1109
- declare const enableNotificationComponentSchema: z.ZodType<EnableNotificationComponent>;
1110
- declare const weatherForecastComponentSchema: z.ZodType<WeatherForecastComponent>;
1111
- declare const weatherCurrentComponentSchema: z.ZodType<WeatherCurrentComponent>;
1112
- declare const analyticalLeafComponentSchema: z.ZodType<AnalyticalLeafComponent>;
1113
- declare const productSignalsComponentSchema: z.ZodType<ProductSignalsComponent>;
1114
- declare const agentUILeafComponentSchema: z.ZodType<AgentUILeafComponent>;
1115
- declare const dashboardComponentSchema: z.ZodType<DashboardComponent>;
1116
- declare const agentUIComponentSchema: z.ZodType<AgentUIComponent>;
1117
- declare const renderComponentInputSchema: z.ZodType<{
1118
- component: AgentUIComponent;
1119
- }>;
1120
- /** Maximum nesting depth of a composed UI tree (root container counts as level 1). */
1121
- declare const COMPOSED_UI_MAX_DEPTH = 6;
1122
- /** Maximum total number of nodes (containers + leaves) in a composed UI tree. */
1123
- declare const COMPOSED_UI_MAX_NODES = 48;
1124
- /** Kinds that hold children. Exported so the catalog groups kinds from one source. */
1125
- declare const AGENT_UI_CONTAINER_KINDS: ReadonlySet<AgentUINode["kind"]>;
1126
- /** Kinds that only create separation between siblings. */
1127
- declare const AGENT_UI_LAYOUT_LEAF_KINDS: ReadonlySet<AgentUINode["kind"]>;
1128
- /** Fine-grained content kinds that compose custom sections inside containers. */
1129
- declare const AGENT_UI_PRIMITIVE_KINDS: ReadonlySet<AgentUINode["kind"]>;
1130
- declare function isAgentUIContainerComponent(node: AgentUINode): node is AgentUIContainerComponent;
1131
- /** Returns every nested node regardless of the container's public slot anatomy. */
1132
- declare function getAgentUIContainerChildren(node: AgentUIContainerComponent): AgentUINode[];
1133
- declare function isAgentUILayoutLeafComponent(node: AgentUINode): node is AgentUILayoutLeafComponent;
1134
- declare function isAgentUIPrimitiveComponent(node: AgentUINode): node is AgentUIPrimitiveComponent;
1135
- declare const spacerComponentSchema: z.ZodType<SpacerComponent>;
1136
- declare const dividerComponentSchema: z.ZodType<DividerComponent>;
1137
- declare const headingComponentSchema: z.ZodType<HeadingComponent>;
1138
- declare const buttonComponentSchema: z.ZodType<ButtonComponent>;
1139
- declare const badgeComponentSchema: z.ZodType<BadgeComponent>;
1140
- declare const iconComponentSchema: z.ZodType<IconComponent>;
1141
- declare const ratingComponentSchema: z.ZodType<RatingComponent>;
1142
- declare const progressComponentSchema: z.ZodType<ProgressComponent>;
1143
- declare const itemCardComponentSchema: z.ZodType<ItemCardComponent>;
1144
- declare const itemCardGroupComponentSchema: z.ZodType<ItemCardGroupComponent>;
1145
- declare const rowComponentSchema: z.ZodType<RowComponent>;
1146
- declare const colComponentSchema: z.ZodType<ColComponent>;
1147
- declare const gridComponentSchema: z.ZodType<GridComponent>;
1148
- declare const cardComponentSchema: z.ZodType<CardComponent>;
1149
- declare const agentUINodeSchema: z.ZodType<AgentUINode>;
1150
- declare const composedUIComponentSchema: z.ZodType<AgentUIContainerComponent>;
1151
- declare const agentUIRenderableSchema: z.ZodType<AgentUIRenderable>;
1152
- declare const composeUIInputSchema: z.ZodType<{
1153
- component: AgentUIContainerComponent;
1154
- }>;
1155
- /** Every kind a renderable payload can use, whether as a root or nested in a tree. */
1156
- type AgentUIRenderableKind = AgentUINode["kind"] | "dashboard";
1157
- /**
1158
- * Per-kind schemas for the model-facing catalog lookup, keyed by the `kind`
1159
- * discriminator the model actually writes. Container, dashboard, and
1160
- * product-signals entries describe their own props with opaque children.
1161
- */
1162
- declare const AGENT_UI_KIND_SCHEMAS: Record<AgentUIRenderableKind, z.ZodType>;
1163
-
1164
- type AgentUICatalogGroup = "actions" | "containers" | "data" | "display" | "forms" | "layout" | "primitives";
1165
- type AgentUICatalogEntry = {
1166
- group: AgentUICatalogGroup;
1167
- summary: string;
1168
- };
1169
- /** Every renderable kind with the one-line purpose the model routes on. */
1170
- declare const AGENT_UI_CATALOG: Record<AgentUIRenderableKind, AgentUICatalogEntry>;
1171
- /** Sorted so the prompt block and the lookup tool's enum stay byte-stable across turns. */
1172
- declare const AGENT_UI_KIND_NAMES: readonly AgentUIRenderableKind[];
1173
- /**
1174
- * The catalog as a compact prompt block: one line per group, `kind — purpose`
1175
- * within it. Deterministic output keeps the system prompt's cacheable prefix
1176
- * byte-identical between turns.
1177
- */
1178
- declare function renderAgentUICatalogPrompt(): string;
1179
-
1180
- /** Names owned by the hosted runtime; client tools may not shadow them. */
1181
- declare const RESERVED_AGENT_TOOL_NAMES: readonly ["callMcpTool", "composeUI", "executeSandbox", "generateFile", "getComponentSchema", "renderComponent", "searchKnowledge", "searchMcpTools", "searchWeb"];
1182
- /**
1183
- * Namespace the runtime uses for tools borrowed from a project's MCP servers
1184
- * (`mcp_<serverSlug>_<toolName>`). Reserved wholesale so a client tool can
1185
- * never impersonate one of them.
1186
- */
1187
- declare const RESERVED_AGENT_TOOL_PREFIX = "mcp_";
1188
- declare const MAX_CLIENT_TOOLS = 20;
1189
- declare const MAX_CLIENT_TOOLS_BYTES: number;
1190
- /**
1191
- * Browser-declared client tool manifest entry. Execution and rendering stay in
1192
- * the customer's page; only the model-facing surface crosses the wire.
1193
- */
1194
- declare const clientToolManifestEntrySchema: z.ZodObject<{
1195
- description: z.ZodString;
1196
- inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1197
- name: z.ZodString;
1198
- needsApproval: z.ZodOptional<z.ZodBoolean>;
1199
- }, z.core.$strip>;
1200
- declare const clientToolsSchema: z.ZodArray<z.ZodObject<{
1201
- description: z.ZodString;
1202
- inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1203
- name: z.ZodString;
1204
- needsApproval: z.ZodOptional<z.ZodBoolean>;
1205
- }, z.core.$strip>>;
1206
- type ClientToolManifestEntry = z.infer<typeof clientToolManifestEntrySchema>;
1207
-
1208
- declare const HEROUI_AGENT_PROTOCOL_VERSION: 6;
1209
- declare const HEROUI_AGENT_SDK_VERSION: "1.0.0-beta.3";
1210
- /** Production Agent API origin used when hosts omit `_api.baseUrl` / `apiBaseUrl`. */
1211
- declare const HEROUI_AGENT_API_BASE_URL: "https://api.heroui.pro";
1212
-
1213
- /** Browser event emitted when protocol-v6 runtime latency checkpoints arrive. */
1214
- declare const HEROUI_AGENT_RUNTIME_TIMING_EVENT: "heroui-agent:runtime-timing";
1215
- declare const HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE: "heroui_agent_turn_admitted";
1216
- declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_METHOD: "getTurnAdmissionStatuses";
1217
- declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_MAX_IDS = 50;
1218
- type AgentTurnAdmittedFrame = {
1219
- protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1220
- turnId: string;
1221
- type: typeof HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE;
1222
- };
1223
- type AgentTurnAdmissionStatusRequest = {
1224
- protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1225
- turnIds: string[];
1226
- };
1227
- type AgentTurnAdmissionStatus = {
1228
- status: "admitted" | "unknown";
1229
- turnId: string;
1230
- };
1231
- type AgentTurnAdmissionStatusResponse = {
1232
- protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
1233
- turns: AgentTurnAdmissionStatus[];
1234
- };
1235
- type AgentActivityPhase = "accepted" | "preparing" | "generating" | "waiting-client-tool" | "running-server-tool" | "recovering";
1236
- type AgentRuntimeTiming = {
1237
- completedAt?: number;
1238
- firstSemanticTextAt?: number;
1239
- providerFirstEventAt?: number;
1240
- providerRequestedAt?: number;
1241
- runtimeAdmittedAt?: number;
1242
- turnId?: string;
1243
- };
1244
- type AgentRuntimeTimingEventDetail = AgentRuntimeTiming & {
1245
- agentId: string;
1246
- conversationId: string;
1247
- };
1248
-
1249
- declare const agentSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
1250
- excerpt: z.ZodOptional<z.ZodString>;
1251
- locator: z.ZodOptional<z.ZodString>;
1252
- sourceId: z.ZodString;
1253
- sourceType: z.ZodLiteral<"document">;
1254
- title: z.ZodString;
1255
- }, z.core.$strip>, z.ZodObject<{
1256
- excerpt: z.ZodOptional<z.ZodString>;
1257
- locator: z.ZodOptional<z.ZodString>;
1258
- sourceId: z.ZodString;
1259
- sourceType: z.ZodOptional<z.ZodLiteral<"url">>;
1260
- title: z.ZodOptional<z.ZodString>;
1261
- url: z.ZodString;
1262
- }, z.core.$strip>]>;
1263
- declare const agentSourcesSchema: z.ZodObject<{
1264
- items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1265
- excerpt: z.ZodOptional<z.ZodString>;
1266
- locator: z.ZodOptional<z.ZodString>;
1267
- sourceId: z.ZodString;
1268
- sourceType: z.ZodLiteral<"document">;
1269
- title: z.ZodString;
1270
- }, z.core.$strip>, z.ZodObject<{
1271
- excerpt: z.ZodOptional<z.ZodString>;
1272
- locator: z.ZodOptional<z.ZodString>;
1273
- sourceId: z.ZodString;
1274
- sourceType: z.ZodOptional<z.ZodLiteral<"url">>;
1275
- title: z.ZodOptional<z.ZodString>;
1276
- url: z.ZodString;
1277
- }, z.core.$strip>]>>;
1278
- }, z.core.$strip>;
1279
- type AgentSource = z.infer<typeof agentSourceSchema>;
1280
- type AgentDataTypes = {
1281
- activity: {
1282
- detail?: string;
1283
- kind?: "browse" | "chart" | "code" | "data" | "search" | "thinking";
1284
- label: string;
1285
- sources?: Array<{
1286
- label: string;
1287
- }>;
1288
- /** Protocol-v6 lifecycle phase. */
1289
- stage: AgentActivityPhase;
1290
- /** Model-generated workstream title; unlike `label`, this does not describe one step. */
1291
- title?: string;
1292
- };
1293
- component: AgentUIRenderable;
1294
- /** Server-generated conversation title, streamed on the first turn so the session picker updates live. */
1295
- "conversation-title": {
1296
- title: string;
1297
- };
1298
- progress: {
1299
- label: string;
1300
- stage: AgentActivityPhase;
1301
- };
1302
- /** Transient latency checkpoints; observed through HEROUI_AGENT_RUNTIME_TIMING_EVENT. */
1303
- "runtime-timing": AgentRuntimeTiming;
1304
- sources: z.infer<typeof agentSourcesSchema>;
1305
- };
1306
- type AgentMessage = UIMessage<unknown, AgentDataTypes>;
1307
-
1308
- /**
1309
- * Deliberately Zod-free: the model catalogue is re-exported from the package
1310
- * root, so importing Zod here would pull the whole validation library into the
1311
- * panel shell's first-paint graph. The matching schema lives in
1312
- * `./models.schema`, which only server and contract consumers need.
1313
- */
1314
- /** Model ids the hosted agent accepts from the browser picker. */
1315
- 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.7-flash", "anthropic/claude-sonnet-5", "anthropic/claude-opus-4.8"];
1316
- type AgentModelId = (typeof AGENT_MODEL_IDS)[number];
1317
- /**
1318
- * Retired ids mapped to their replacement. Model ids are a public part of the
1319
- * embed API — a customer pins one in their own code and projects store one as
1320
- * their default — so a retired id keeps resolving instead of failing the
1321
- * session with an "Invalid agent model" error.
1322
- */
1323
- declare const LEGACY_AGENT_MODEL_IDS: Record<string, AgentModelId>;
1324
- /** Resolves a possibly-retired model id to the id the runtime should use. */
1325
- declare function resolveAgentModelId(value: string): string;
1326
- type AgentModelTier = "codegen" | "complex" | "light";
1327
- type AgentModelOption = {
1328
- description: string;
1329
- id: AgentModelId;
1330
- label: string;
1331
- provider: "Anthropic" | "Google" | "Moonshot AI" | "OpenAI";
1332
- tier: AgentModelTier;
1333
- };
1334
- /**
1335
- * Recommended default selected when the optional picker first opens. Gemini 3.7 Flash
1336
- * matches the hosted runtime's baked-in default (`DEFAULT_CHAT_MODEL_IDS.herouiAgent`),
1337
- * so what users see in the picker is what actually runs by default.
1338
- */
1339
- declare const DEFAULT_AGENT_PICKER_MODEL_ID = "google/gemini-3.7-flash";
1340
- /**
1341
- * Small, tool-capable model catalog for HeroUI Agent. These ids are the
1342
- * server-side allowlist as well as the browser picker source of truth.
1343
- */
1344
- declare const AGENT_MODEL_OPTIONS: readonly [{
1345
- readonly description: "Flagship model for coding, reasoning, and knowledge work";
1346
- readonly id: "moonshotai/Kimi-K3";
1347
- readonly label: "Kimi K3";
1348
- readonly provider: "Moonshot AI";
1349
- readonly tier: "light";
1350
- }, {
1351
- readonly description: "Fast answers and lightweight agent workflows";
1352
- readonly id: "openai/gpt-5.6-luna";
1353
- readonly label: "GPT-5.6 Luna";
1354
- readonly provider: "OpenAI";
1355
- readonly tier: "light";
1356
- }, {
1357
- readonly description: "Balanced reasoning for everyday agent tasks";
1358
- readonly id: "openai/gpt-5.6-terra";
1359
- readonly label: "GPT-5.6 Terra";
1360
- readonly provider: "OpenAI";
1361
- readonly tier: "codegen";
1362
- }, {
1363
- readonly description: "Deep reasoning for complex, multi-step analysis";
1364
- readonly id: "openai/gpt-5.6-sol";
1365
- readonly label: "GPT-5.6 Sol";
1366
- readonly provider: "OpenAI";
1367
- readonly tier: "complex";
1368
- }, {
1369
- readonly description: "Fast multimodal analysis with a large context window";
1370
- readonly id: "google/gemini-3.7-flash";
1371
- readonly label: "Gemini 3.7 Flash";
1372
- readonly provider: "Google";
1373
- readonly tier: "light";
1374
- }, {
1375
- readonly description: "Strong agentic reasoning and polished UI decisions";
1376
- readonly id: "anthropic/claude-sonnet-5";
1377
- readonly label: "Claude Sonnet 5";
1378
- readonly provider: "Anthropic";
1379
- readonly tier: "codegen";
1380
- }, {
1381
- readonly description: "Highest-capability Claude for difficult research and analysis";
1382
- readonly id: "anthropic/claude-opus-4.8";
1383
- readonly label: "Claude Opus 4.8";
1384
- readonly provider: "Anthropic";
1385
- readonly tier: "complex";
1386
- }];
1387
- declare function isAgentModelId(value: unknown): value is AgentModelId;
1388
- /** Unknown/env-overridden models keep the hosted agent's historical light tier. */
1389
- declare function getAgentModelTier(modelId?: string): AgentModelTier;
1390
-
1391
- /**
1392
- * Kept out of `./models` so the Zod dependency stays off the package root's
1393
- * import graph — the panel shell is served from that graph and must not pay for
1394
- * a validation library it never runs.
1395
- *
1396
- * Retired ids are rewritten to their replacement rather than rejected: this
1397
- * schema guards the public embed API and the signed session payload, so an
1398
- * embed pinning an old id (or a session signed before a model was retired)
1399
- * has to keep working.
1400
- */
1401
- declare const agentModelIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
1402
- "moonshotai/Kimi-K3": "moonshotai/Kimi-K3";
1403
- "openai/gpt-5.6-luna": "openai/gpt-5.6-luna";
1404
- "openai/gpt-5.6-terra": "openai/gpt-5.6-terra";
1405
- "openai/gpt-5.6-sol": "openai/gpt-5.6-sol";
1406
- "google/gemini-3.7-flash": "google/gemini-3.7-flash";
1407
- "anthropic/claude-sonnet-5": "anthropic/claude-sonnet-5";
1408
- "anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
1409
- }>>;
1410
-
1411
- /**
1412
- * Browser experience events accepted by the hosted Agent telemetry endpoint.
1413
- * Durable usage and success metrics come from the server-side runtime events,
1414
- * not from this best-effort client channel.
1415
- */
1416
- declare const HEROUI_AGENT_EMBED_EVENT_NAMES: readonly ["action_approved", "action_declined", "component_copy", "component_export", "component_followup", "component_rendered", "component_submit", "component_tool", "embed_loaded", "failure", "feedback_down", "feedback_up", "file_download", "first_chunk", "first_feedback_paint", "first_server_content_paint", "first_text_paint", "message_copied", "message_sent", "opened", "reconnected", "retry", "stopped", "turn_completed", "turn_stalled"];
1417
- declare const HEROUI_AGENT_EMBED_EVENT_SOURCES: readonly ["client-inactivity-watchdog", "cloudflare-chat", "message-send-failed", "stream-error"];
1418
- declare const HEROUI_AGENT_FEEDBACK_REASONS: readonly ["did_not_follow_instructions", "incomplete", "incorrect", "not_relevant", "other", "unclear"];
1419
- declare const HEROUI_AGENT_TURN_ERROR_CODES: readonly ["client_stopped", "conversation_deleted", "provider_error", "provider_rate_limited", "provider_timeout", "turn_deadline_exceeded", "turn_stalled", "unknown"];
1420
- declare const heroUIAgentEmbedEventPropertiesSchema: z.ZodObject<{
1421
- actionId: z.ZodOptional<z.ZodString>;
1422
- componentId: z.ZodOptional<z.ZodString>;
1423
- componentType: z.ZodOptional<z.ZodEnum<{
1424
- map: "map";
1425
- icon: "icon";
1426
- "metric-grid": "metric-grid";
1427
- "kpi-grid": "kpi-grid";
1428
- "line-chart": "line-chart";
1429
- "area-chart": "area-chart";
1430
- "bar-chart": "bar-chart";
1431
- "composed-chart": "composed-chart";
1432
- "pie-chart": "pie-chart";
1433
- "donut-chart": "donut-chart";
1434
- "radar-chart": "radar-chart";
1435
- "radial-chart": "radial-chart";
1436
- "sankey-chart": "sankey-chart";
1437
- "scatter-chart": "scatter-chart";
1438
- heatmap: "heatmap";
1439
- "candlestick-chart": "candlestick-chart";
1440
- "funnel-chart": "funnel-chart";
1441
- "gauge-chart": "gauge-chart";
1442
- "sunburst-chart": "sunburst-chart";
1443
- "data-table": "data-table";
1444
- "comparison-list": "comparison-list";
1445
- "meter-list": "meter-list";
1446
- text: "text";
1447
- form: "form";
1448
- card: "card";
1449
- callout: "callout";
1450
- image: "image";
1451
- grid: "grid";
1452
- "tag-list": "tag-list";
1453
- list: "list";
1454
- "list-block": "list-block";
1455
- accordion: "accordion";
1456
- steps: "steps";
1457
- "code-block": "code-block";
1458
- diagram: "diagram";
1459
- tabs: "tabs";
1460
- "item-card": "item-card";
1461
- "item-card-group": "item-card-group";
1462
- "action-group": "action-group";
1463
- followup: "followup";
1464
- "switch-group": "switch-group";
1465
- "toggle-group": "toggle-group";
1466
- "record-card": "record-card";
1467
- "product-card": "product-card";
1468
- "flight-tracker": "flight-tracker";
1469
- "create-event": "create-event";
1470
- playlist: "playlist";
1471
- "ride-status": "ride-status";
1472
- "purchase-items": "purchase-items";
1473
- "channel-message": "channel-message";
1474
- "purchase-complete": "purchase-complete";
1475
- "player-card": "player-card";
1476
- "view-event": "view-event";
1477
- "event-session": "event-session";
1478
- "enable-notification": "enable-notification";
1479
- "weather-forecast": "weather-forecast";
1480
- "weather-current": "weather-current";
1481
- "product-signals": "product-signals";
1482
- dashboard: "dashboard";
1483
- row: "row";
1484
- col: "col";
1485
- spacer: "spacer";
1486
- divider: "divider";
1487
- heading: "heading";
1488
- button: "button";
1489
- badge: "badge";
1490
- rating: "rating";
1491
- progress: "progress";
1492
- }>>;
1493
- feedbackComment: z.ZodOptional<z.ZodString>;
1494
- feedbackCommentLength: z.ZodOptional<z.ZodNumber>;
1495
- feedbackReasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1496
- other: "other";
1497
- did_not_follow_instructions: "did_not_follow_instructions";
1498
- incomplete: "incomplete";
1499
- incorrect: "incorrect";
1500
- not_relevant: "not_relevant";
1501
- unclear: "unclear";
1502
- }>>>;
1503
- format: z.ZodOptional<z.ZodEnum<{
1504
- json: "json";
1505
- pdf: "pdf";
1506
- xlsx: "xlsx";
1507
- png: "png";
1508
- csv: "csv";
1509
- markdown: "markdown";
1510
- text: "text";
1511
- svg: "svg";
1512
- }>>;
1513
- hasFeedbackComment: z.ZodOptional<z.ZodBoolean>;
1514
- hasToolName: z.ZodOptional<z.ZodBoolean>;
1515
- latencyMs: z.ZodOptional<z.ZodNumber>;
1516
- latencyOrigin: z.ZodOptional<z.ZodLiteral<"user_submit">>;
1517
- messageId: z.ZodOptional<z.ZodString>;
1518
- outputBytes: z.ZodOptional<z.ZodNumber>;
1519
- protocolVersion: z.ZodOptional<z.ZodLiteral<6>>;
1520
- sdkVersion: z.ZodOptional<z.ZodString>;
1521
- source: z.ZodOptional<z.ZodEnum<{
1522
- "client-inactivity-watchdog": "client-inactivity-watchdog";
1523
- "cloudflare-chat": "cloudflare-chat";
1524
- "message-send-failed": "message-send-failed";
1525
- "stream-error": "stream-error";
1526
- }>>;
1527
- toolName: z.ZodOptional<z.ZodString>;
1528
- }, z.core.$strict>;
1529
- declare const heroUIAgentEmbedEventSchema: z.ZodObject<{
1530
- conversationId: z.ZodString;
1531
- event: z.ZodEnum<{
1532
- retry: "retry";
1533
- action_approved: "action_approved";
1534
- action_declined: "action_declined";
1535
- component_copy: "component_copy";
1536
- component_export: "component_export";
1537
- component_followup: "component_followup";
1538
- component_rendered: "component_rendered";
1539
- component_submit: "component_submit";
1540
- component_tool: "component_tool";
1541
- embed_loaded: "embed_loaded";
1542
- failure: "failure";
1543
- feedback_down: "feedback_down";
1544
- feedback_up: "feedback_up";
1545
- file_download: "file_download";
1546
- first_chunk: "first_chunk";
1547
- first_feedback_paint: "first_feedback_paint";
1548
- first_server_content_paint: "first_server_content_paint";
1549
- first_text_paint: "first_text_paint";
1550
- message_copied: "message_copied";
1551
- message_sent: "message_sent";
1552
- opened: "opened";
1553
- reconnected: "reconnected";
1554
- stopped: "stopped";
1555
- turn_completed: "turn_completed";
1556
- turn_stalled: "turn_stalled";
1557
- }>;
1558
- properties: z.ZodDefault<z.ZodObject<{
1559
- actionId: z.ZodOptional<z.ZodString>;
1560
- componentId: z.ZodOptional<z.ZodString>;
1561
- componentType: z.ZodOptional<z.ZodEnum<{
1562
- map: "map";
1563
- icon: "icon";
1564
- "metric-grid": "metric-grid";
1565
- "kpi-grid": "kpi-grid";
1566
- "line-chart": "line-chart";
1567
- "area-chart": "area-chart";
1568
- "bar-chart": "bar-chart";
1569
- "composed-chart": "composed-chart";
1570
- "pie-chart": "pie-chart";
1571
- "donut-chart": "donut-chart";
1572
- "radar-chart": "radar-chart";
1573
- "radial-chart": "radial-chart";
1574
- "sankey-chart": "sankey-chart";
1575
- "scatter-chart": "scatter-chart";
1576
- heatmap: "heatmap";
1577
- "candlestick-chart": "candlestick-chart";
1578
- "funnel-chart": "funnel-chart";
1579
- "gauge-chart": "gauge-chart";
1580
- "sunburst-chart": "sunburst-chart";
1581
- "data-table": "data-table";
1582
- "comparison-list": "comparison-list";
1583
- "meter-list": "meter-list";
1584
- text: "text";
1585
- form: "form";
1586
- card: "card";
1587
- callout: "callout";
1588
- image: "image";
1589
- grid: "grid";
1590
- "tag-list": "tag-list";
1591
- list: "list";
1592
- "list-block": "list-block";
1593
- accordion: "accordion";
1594
- steps: "steps";
1595
- "code-block": "code-block";
1596
- diagram: "diagram";
1597
- tabs: "tabs";
1598
- "item-card": "item-card";
1599
- "item-card-group": "item-card-group";
1600
- "action-group": "action-group";
1601
- followup: "followup";
1602
- "switch-group": "switch-group";
1603
- "toggle-group": "toggle-group";
1604
- "record-card": "record-card";
1605
- "product-card": "product-card";
1606
- "flight-tracker": "flight-tracker";
1607
- "create-event": "create-event";
1608
- playlist: "playlist";
1609
- "ride-status": "ride-status";
1610
- "purchase-items": "purchase-items";
1611
- "channel-message": "channel-message";
1612
- "purchase-complete": "purchase-complete";
1613
- "player-card": "player-card";
1614
- "view-event": "view-event";
1615
- "event-session": "event-session";
1616
- "enable-notification": "enable-notification";
1617
- "weather-forecast": "weather-forecast";
1618
- "weather-current": "weather-current";
1619
- "product-signals": "product-signals";
1620
- dashboard: "dashboard";
1621
- row: "row";
1622
- col: "col";
1623
- spacer: "spacer";
1624
- divider: "divider";
1625
- heading: "heading";
1626
- button: "button";
1627
- badge: "badge";
1628
- rating: "rating";
1629
- progress: "progress";
1630
- }>>;
1631
- feedbackComment: z.ZodOptional<z.ZodString>;
1632
- feedbackCommentLength: z.ZodOptional<z.ZodNumber>;
1633
- feedbackReasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1634
- other: "other";
1635
- did_not_follow_instructions: "did_not_follow_instructions";
1636
- incomplete: "incomplete";
1637
- incorrect: "incorrect";
1638
- not_relevant: "not_relevant";
1639
- unclear: "unclear";
1640
- }>>>;
1641
- format: z.ZodOptional<z.ZodEnum<{
1642
- json: "json";
1643
- pdf: "pdf";
1644
- xlsx: "xlsx";
1645
- png: "png";
1646
- csv: "csv";
1647
- markdown: "markdown";
1648
- text: "text";
1649
- svg: "svg";
1650
- }>>;
1651
- hasFeedbackComment: z.ZodOptional<z.ZodBoolean>;
1652
- hasToolName: z.ZodOptional<z.ZodBoolean>;
1653
- latencyMs: z.ZodOptional<z.ZodNumber>;
1654
- latencyOrigin: z.ZodOptional<z.ZodLiteral<"user_submit">>;
1655
- messageId: z.ZodOptional<z.ZodString>;
1656
- outputBytes: z.ZodOptional<z.ZodNumber>;
1657
- protocolVersion: z.ZodOptional<z.ZodLiteral<6>>;
1658
- sdkVersion: z.ZodOptional<z.ZodString>;
1659
- source: z.ZodOptional<z.ZodEnum<{
1660
- "client-inactivity-watchdog": "client-inactivity-watchdog";
1661
- "cloudflare-chat": "cloudflare-chat";
1662
- "message-send-failed": "message-send-failed";
1663
- "stream-error": "stream-error";
1664
- }>>;
1665
- toolName: z.ZodOptional<z.ZodString>;
1666
- }, z.core.$strict>>;
1667
- }, z.core.$strict>;
1668
- declare const heroUIAgentTurnErrorCodeSchema: z.ZodEnum<{
1669
- unknown: "unknown";
1670
- turn_stalled: "turn_stalled";
1671
- client_stopped: "client_stopped";
1672
- conversation_deleted: "conversation_deleted";
1673
- provider_error: "provider_error";
1674
- provider_rate_limited: "provider_rate_limited";
1675
- provider_timeout: "provider_timeout";
1676
- turn_deadline_exceeded: "turn_deadline_exceeded";
1677
- }>;
1678
- type HeroUIAgentEmbedEvent = z.infer<typeof heroUIAgentEmbedEventSchema>;
1679
- type HeroUIAgentEmbedEventName = HeroUIAgentEmbedEvent["event"];
1680
- type HeroUIAgentEmbedEventProperties = z.infer<typeof heroUIAgentEmbedEventPropertiesSchema>;
1681
- type HeroUIAgentTurnErrorCode = z.infer<typeof heroUIAgentTurnErrorCodeSchema>;
1682
-
1683
- 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 AgentActivityPhase, type AgentDataTypes, type AgentIconName, type AgentMessage, type AgentModelId, type AgentModelOption, type AgentModelTier, type AgentRemoteConfig, type AgentRemoteThemeColor, type AgentRuntimeTiming, type AgentRuntimeTimingEventDetail, type AgentSource, type AgentTurnAdmissionStatus, type AgentTurnAdmissionStatusRequest, type AgentTurnAdmissionStatusResponse, type AgentTurnAdmittedFrame, 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 CandlestickChartComponent, 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 FunnelChartComponent, type GaugeChartComponent, type GridComponent, HEROUI_AGENT_API_BASE_URL, HEROUI_AGENT_ATTACHMENT_ACCEPT, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPE_BY_EXTENSION, HEROUI_AGENT_ATTACHMENT_EXTENSION_BY_CONTENT_TYPE, HEROUI_AGENT_ATTACHMENT_MAX_BYTES, HEROUI_AGENT_EMBED_EVENT_NAMES, HEROUI_AGENT_EMBED_EVENT_SOURCES, HEROUI_AGENT_FEEDBACK_REASONS, HEROUI_AGENT_MAX_ATTACHMENTS, HEROUI_AGENT_PROTOCOL_VERSION, HEROUI_AGENT_REMOTE_CONFIG_VERSION, HEROUI_AGENT_RUNTIME_TIMING_EVENT, HEROUI_AGENT_SDK_VERSION, HEROUI_AGENT_TEXT_ATTACHMENT_CONTENT_TYPES, HEROUI_AGENT_TURN_ADMISSION_STATUS_MAX_IDS, HEROUI_AGENT_TURN_ADMISSION_STATUS_METHOD, HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE, HEROUI_AGENT_TURN_ERROR_CODES, type HeadingComponent, type HeatmapComponent, type HeroUIAgentAttachmentContentType, type HeroUIAgentEmbedEvent, type HeroUIAgentEmbedEventName, type HeroUIAgentEmbedEventProperties, type HeroUIAgentTurnErrorCode, 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, type SpacerComponent, type StepStatus, type StepsComponent, type SunburstChartComponent, type SunburstNode, type SwitchGroupComponent, type TabsComponent, type TagListComponent, type TextComponent, type ToggleGroupComponent, 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, candlestickChartComponentSchema, cardComponentSchema, cardComponentVariantSchema, channelMessageComponentSchema, chartColorSchema, clientToolManifestEntrySchema, clientToolsSchema, codeBlockComponentSchema, colComponentSchema, comparisonListComponentSchema, composeUIInputSchema, composedChartComponentSchema, composedUIComponentSchema, createEventComponentSchema, dashboardComponentSchema, dataTableComponentSchema, diagramComponentSchema, dividerComponentSchema, donutChartComponentSchema, enableNotificationComponentSchema, eventSessionComponentSchema, flightTrackerComponentSchema, followupComponentSchema, formComponentSchema, funnelChartComponentSchema, gaugeChartComponentSchema, getAgentModelTier, getAgentUIContainerChildren, gridComponentSchema, headingComponentSchema, heatmapComponentSchema, heroUIAgentEmbedEventPropertiesSchema, heroUIAgentEmbedEventSchema, heroUIAgentTurnErrorCodeSchema, 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, resolveHeroUIAgentAttachmentContentType, rideStatusComponentSchema, rowComponentSchema, sankeyChartComponentSchema, scatterChartComponentSchema, spacerComponentSchema, stepsComponentSchema, sunburstChartComponentSchema, switchGroupComponentSchema, tabsComponentSchema, tagListComponentSchema, textComponentSchema, toggleGroupComponentSchema, viewEventComponentSchema, weatherConditionSchema, weatherConditions, weatherCurrentComponentSchema, weatherForecastComponentSchema };