@heroui/agent 0.2.0-beta.1 → 0.2.0-beta.10
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 +73 -2
- package/README.md +23 -13
- package/dist/chart-content-BBHQVMP4.js +1 -0
- package/dist/chunk-2XBFFSW2.js +1 -0
- package/dist/chunk-5XUOZ2ZC.js +2 -0
- package/dist/chunk-64RI74L5.js +1 -0
- package/dist/chunk-6ZJJN322.js +1 -0
- package/dist/chunk-7KCGPNEN.js +1 -0
- package/dist/chunk-A53R5SMW.js +2 -0
- package/dist/chunk-BBB5EHDN.js +5 -0
- package/dist/chunk-CR3H7AVI.js +1 -0
- package/dist/chunk-HCLXS4HQ.js +1 -0
- package/dist/chunk-MXLGM4WV.js +1 -0
- package/dist/chunk-OA3TG5CS.js +1 -0
- package/dist/chunk-PZJ4NC3J.js +1 -0
- package/dist/chunk-RNNGE7KM.js +1 -0
- package/dist/chunk-S6OIAJSC.js +1 -0
- package/dist/component-renderer-GG6JVRUG.js +1 -0
- package/dist/composer-draft-NSKK65F3.js +1 -0
- package/dist/composer-image-draft-KAGTNQR7.js +1 -0
- package/dist/contracts.d.ts +374 -20
- package/dist/contracts.js +2 -2325
- package/dist/css/index.css +1 -1
- package/dist/embed-runtime-ZZKIK7WA.js +5 -0
- package/dist/identity-3P8-17km.d.ts +95 -0
- package/dist/index.d.ts +67 -13
- package/dist/index.js +1 -28
- package/dist/interactive-map-surface-WC2LPCR7.js +1 -0
- package/dist/internal/client-tools.js +1 -0
- package/dist/internal/models.js +1 -0
- package/dist/internal/runtime.js +1 -0
- package/dist/internal/theme.js +1 -0
- package/dist/next.d.ts +2 -1
- package/dist/next.js +1 -22
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -256
- package/package.json +26 -27
- package/dist/chart-content-VZ66GD22.js +0 -1391
- package/dist/chunk-3FG5NRTX.js +0 -9
- package/dist/chunk-CU6MPKAJ.js +0 -359
- package/dist/chunk-DW4AQRM5.js +0 -297
- package/dist/chunk-GDDNN2XY.js +0 -954
- package/dist/chunk-RQCTC4JB.js +0 -1084
- package/dist/chunk-TOOT6SZ2.js +0 -74
- package/dist/chunk-VJA52U5P.js +0 -137
- package/dist/component-renderer-IBJDNXSO.js +0 -9780
- package/dist/embed-runtime-XOPQY7Z5.js +0 -7254
- package/dist/identity-NYCXY1mT.d.ts +0 -164
- package/dist/interactive-map-surface-67KHT3VB.js +0 -362
package/dist/contracts.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
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';
|
|
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-3P8-17km.js';
|
|
4
3
|
import { UIMessage } from 'ai';
|
|
5
4
|
|
|
6
5
|
/** Maximum number of files accepted on one HeroUI Agent message. */
|
|
@@ -88,6 +87,7 @@ type AgentRemoteConfig = {
|
|
|
88
87
|
};
|
|
89
88
|
capabilities?: {
|
|
90
89
|
imageSearch?: boolean;
|
|
90
|
+
newsSearch?: boolean;
|
|
91
91
|
webSearch?: boolean;
|
|
92
92
|
};
|
|
93
93
|
composer?: {
|
|
@@ -214,7 +214,17 @@ type KpiGridComponent = ComponentBase & {
|
|
|
214
214
|
}>;
|
|
215
215
|
};
|
|
216
216
|
type LineChartComponent = CartesianComponent & {
|
|
217
|
+
/**
|
|
218
|
+
* `profit-loss` splits one series around `baseline`; `live` keeps the newest
|
|
219
|
+
* window visible and emphasizes its latest value. Both modes require one
|
|
220
|
+
* series so their visual meaning stays unambiguous.
|
|
221
|
+
*/
|
|
222
|
+
baseline?: number;
|
|
217
223
|
kind: "line-chart";
|
|
224
|
+
mode?: "live" | "profit-loss" | "standard";
|
|
225
|
+
negativeColor?: ChartColor;
|
|
226
|
+
positiveColor?: ChartColor;
|
|
227
|
+
windowSize?: number;
|
|
218
228
|
};
|
|
219
229
|
type AreaChartComponent = CartesianComponent & {
|
|
220
230
|
kind: "area-chart";
|
|
@@ -295,6 +305,51 @@ type HeatmapComponent = ComponentBase & {
|
|
|
295
305
|
xKey: string;
|
|
296
306
|
yKey: string;
|
|
297
307
|
};
|
|
308
|
+
type CandlestickChartComponent = ComponentBase & {
|
|
309
|
+
closeKey: string;
|
|
310
|
+
data: Datum[];
|
|
311
|
+
downColor?: ChartColor;
|
|
312
|
+
format?: NumberFormat;
|
|
313
|
+
highKey: string;
|
|
314
|
+
kind: "candlestick-chart";
|
|
315
|
+
lowKey: string;
|
|
316
|
+
openKey: string;
|
|
317
|
+
upColor?: ChartColor;
|
|
318
|
+
xKey: string;
|
|
319
|
+
};
|
|
320
|
+
type FunnelChartComponent = ComponentBase & {
|
|
321
|
+
colors?: Record<string, ChartColor>;
|
|
322
|
+
data: Datum[];
|
|
323
|
+
format?: NumberFormat;
|
|
324
|
+
kind: "funnel-chart";
|
|
325
|
+
labelKey: string;
|
|
326
|
+
orientation?: "horizontal" | "vertical";
|
|
327
|
+
showPercentages?: boolean;
|
|
328
|
+
valueKey: string;
|
|
329
|
+
};
|
|
330
|
+
type GaugeChartComponent = ComponentBase & {
|
|
331
|
+
color?: ChartColor;
|
|
332
|
+
format?: NumberFormat;
|
|
333
|
+
kind: "gauge-chart";
|
|
334
|
+
label: string;
|
|
335
|
+
max?: number;
|
|
336
|
+
min?: number;
|
|
337
|
+
notches?: number;
|
|
338
|
+
orientation?: "arc" | "linear";
|
|
339
|
+
value: number;
|
|
340
|
+
};
|
|
341
|
+
type SunburstNode = {
|
|
342
|
+
children?: SunburstNode[];
|
|
343
|
+
color?: ChartColor;
|
|
344
|
+
id: string;
|
|
345
|
+
label: string;
|
|
346
|
+
value?: number;
|
|
347
|
+
};
|
|
348
|
+
type SunburstChartComponent = ComponentBase & {
|
|
349
|
+
data: SunburstNode;
|
|
350
|
+
format?: NumberFormat;
|
|
351
|
+
kind: "sunburst-chart";
|
|
352
|
+
};
|
|
298
353
|
type DataTableComponent = ComponentBase & {
|
|
299
354
|
columns: Array<{
|
|
300
355
|
format?: NumberFormat;
|
|
@@ -860,7 +915,7 @@ type WeatherCurrentComponent = ComponentBase & {
|
|
|
860
915
|
temperature: number;
|
|
861
916
|
unit: WeatherUnit;
|
|
862
917
|
};
|
|
863
|
-
type AnalyticalLeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | DataTableComponent | ComparisonListComponent | MeterListComponent;
|
|
918
|
+
type AnalyticalLeafComponent = MetricGridComponent | KpiGridComponent | LineChartComponent | AreaChartComponent | BarChartComponent | ComposedChartComponent | PieChartComponent | DonutChartComponent | RadarChartComponent | RadialChartComponent | SankeyChartComponent | ScatterChartComponent | HeatmapComponent | CandlestickChartComponent | FunnelChartComponent | GaugeChartComponent | SunburstChartComponent | DataTableComponent | ComparisonListComponent | MeterListComponent;
|
|
864
919
|
type ProductSignalsComponent = ComponentBase & {
|
|
865
920
|
defaultValue?: string;
|
|
866
921
|
kind: "product-signals";
|
|
@@ -870,7 +925,7 @@ type ProductSignalsComponent = ComponentBase & {
|
|
|
870
925
|
label: string;
|
|
871
926
|
}>;
|
|
872
927
|
};
|
|
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;
|
|
928
|
+
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;
|
|
874
929
|
type DashboardComponent = ComponentBase & {
|
|
875
930
|
children: AgentUILeafComponent[];
|
|
876
931
|
kind: "dashboard";
|
|
@@ -990,6 +1045,10 @@ declare const radialChartComponentSchema: z.ZodType<RadialChartComponent>;
|
|
|
990
1045
|
declare const sankeyChartComponentSchema: z.ZodType<SankeyChartComponent>;
|
|
991
1046
|
declare const scatterChartComponentSchema: z.ZodType<ScatterChartComponent>;
|
|
992
1047
|
declare const heatmapComponentSchema: z.ZodType<HeatmapComponent>;
|
|
1048
|
+
declare const candlestickChartComponentSchema: z.ZodType<CandlestickChartComponent>;
|
|
1049
|
+
declare const funnelChartComponentSchema: z.ZodType<FunnelChartComponent>;
|
|
1050
|
+
declare const gaugeChartComponentSchema: z.ZodType<GaugeChartComponent>;
|
|
1051
|
+
declare const sunburstChartComponentSchema: z.ZodType<SunburstChartComponent>;
|
|
993
1052
|
declare const dataTableComponentSchema: z.ZodType<DataTableComponent>;
|
|
994
1053
|
declare const comparisonListComponentSchema: z.ZodType<ComparisonListComponent>;
|
|
995
1054
|
declare const meterListComponentSchema: z.ZodType<MeterListComponent>;
|
|
@@ -1093,12 +1152,8 @@ declare const AGENT_UI_KIND_NAMES: readonly AgentUIRenderableKind[];
|
|
|
1093
1152
|
*/
|
|
1094
1153
|
declare function renderAgentUICatalogPrompt(): string;
|
|
1095
1154
|
|
|
1096
|
-
/**
|
|
1097
|
-
|
|
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"];
|
|
1155
|
+
/** Names owned by the hosted runtime; client tools may not shadow them. */
|
|
1156
|
+
declare const RESERVED_AGENT_TOOL_NAMES: readonly ["callMcpTool", "composeUI", "executeSandbox", "getComponentSchema", "renderComponent", "searchKnowledge", "searchMcpTools", "searchWeb"];
|
|
1102
1157
|
/**
|
|
1103
1158
|
* Namespace the runtime uses for tools borrowed from a project's MCP servers
|
|
1104
1159
|
* (`mcp_<serverSlug>_<toolName>`). Reserved wholesale so a client tool can
|
|
@@ -1125,6 +1180,45 @@ declare const clientToolsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1125
1180
|
}, z.core.$strip>>;
|
|
1126
1181
|
type ClientToolManifestEntry = z.infer<typeof clientToolManifestEntrySchema>;
|
|
1127
1182
|
|
|
1183
|
+
declare const HEROUI_AGENT_PROTOCOL_VERSION: 6;
|
|
1184
|
+
declare const HEROUI_AGENT_SDK_VERSION: "0.2.0-beta.10";
|
|
1185
|
+
|
|
1186
|
+
/** Browser event emitted when protocol-v6 runtime latency checkpoints arrive. */
|
|
1187
|
+
declare const HEROUI_AGENT_RUNTIME_TIMING_EVENT: "heroui-agent:runtime-timing";
|
|
1188
|
+
declare const HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE: "heroui_agent_turn_admitted";
|
|
1189
|
+
declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_METHOD: "getTurnAdmissionStatuses";
|
|
1190
|
+
declare const HEROUI_AGENT_TURN_ADMISSION_STATUS_MAX_IDS = 50;
|
|
1191
|
+
type AgentTurnAdmittedFrame = {
|
|
1192
|
+
protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
|
|
1193
|
+
turnId: string;
|
|
1194
|
+
type: typeof HEROUI_AGENT_TURN_ADMITTED_FRAME_TYPE;
|
|
1195
|
+
};
|
|
1196
|
+
type AgentTurnAdmissionStatusRequest = {
|
|
1197
|
+
protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
|
|
1198
|
+
turnIds: string[];
|
|
1199
|
+
};
|
|
1200
|
+
type AgentTurnAdmissionStatus = {
|
|
1201
|
+
status: "admitted" | "unknown";
|
|
1202
|
+
turnId: string;
|
|
1203
|
+
};
|
|
1204
|
+
type AgentTurnAdmissionStatusResponse = {
|
|
1205
|
+
protocolVersion: typeof HEROUI_AGENT_PROTOCOL_VERSION;
|
|
1206
|
+
turns: AgentTurnAdmissionStatus[];
|
|
1207
|
+
};
|
|
1208
|
+
type AgentActivityPhase = "accepted" | "preparing" | "generating" | "waiting-client-tool" | "running-server-tool" | "recovering";
|
|
1209
|
+
type AgentRuntimeTiming = {
|
|
1210
|
+
completedAt?: number;
|
|
1211
|
+
firstSemanticTextAt?: number;
|
|
1212
|
+
providerFirstEventAt?: number;
|
|
1213
|
+
providerRequestedAt?: number;
|
|
1214
|
+
runtimeAdmittedAt?: number;
|
|
1215
|
+
turnId?: string;
|
|
1216
|
+
};
|
|
1217
|
+
type AgentRuntimeTimingEventDetail = AgentRuntimeTiming & {
|
|
1218
|
+
agentId: string;
|
|
1219
|
+
conversationId: string;
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1128
1222
|
declare const agentSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1129
1223
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
1130
1224
|
locator: z.ZodOptional<z.ZodString>;
|
|
@@ -1164,7 +1258,10 @@ type AgentDataTypes = {
|
|
|
1164
1258
|
sources?: Array<{
|
|
1165
1259
|
label: string;
|
|
1166
1260
|
}>;
|
|
1167
|
-
|
|
1261
|
+
/** Protocol-v6 lifecycle phase. */
|
|
1262
|
+
stage: AgentActivityPhase;
|
|
1263
|
+
/** Model-generated workstream title; unlike `label`, this does not describe one step. */
|
|
1264
|
+
title?: string;
|
|
1168
1265
|
};
|
|
1169
1266
|
component: AgentUIRenderable;
|
|
1170
1267
|
/** Server-generated conversation title, streamed on the first turn so the session picker updates live. */
|
|
@@ -1173,8 +1270,10 @@ type AgentDataTypes = {
|
|
|
1173
1270
|
};
|
|
1174
1271
|
progress: {
|
|
1175
1272
|
label: string;
|
|
1176
|
-
stage:
|
|
1273
|
+
stage: AgentActivityPhase;
|
|
1177
1274
|
};
|
|
1275
|
+
/** Transient latency checkpoints; observed through HEROUI_AGENT_RUNTIME_TIMING_EVENT. */
|
|
1276
|
+
"runtime-timing": AgentRuntimeTiming;
|
|
1178
1277
|
sources: z.infer<typeof agentSourcesSchema>;
|
|
1179
1278
|
};
|
|
1180
1279
|
type AgentMessage = UIMessage<unknown, AgentDataTypes>;
|
|
@@ -1282,12 +1381,267 @@ declare const agentModelIdSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.
|
|
|
1282
1381
|
"anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
|
|
1283
1382
|
}>>;
|
|
1284
1383
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
declare const
|
|
1291
|
-
declare const
|
|
1384
|
+
/**
|
|
1385
|
+
* Browser experience events accepted by the hosted Agent telemetry endpoint.
|
|
1386
|
+
* Durable usage and success metrics come from the server-side runtime events,
|
|
1387
|
+
* not from this best-effort client channel.
|
|
1388
|
+
*/
|
|
1389
|
+
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", "first_chunk", "first_feedback_paint", "first_server_content_paint", "first_text_paint", "message_copied", "message_sent", "opened", "reconnected", "retry", "stopped", "turn_completed", "turn_stalled"];
|
|
1390
|
+
declare const HEROUI_AGENT_EMBED_EVENT_SOURCES: readonly ["client-inactivity-watchdog", "cloudflare-chat", "message-send-failed", "stream-error"];
|
|
1391
|
+
declare const HEROUI_AGENT_FEEDBACK_REASONS: readonly ["did_not_follow_instructions", "incomplete", "incorrect", "not_relevant", "other", "unclear"];
|
|
1392
|
+
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"];
|
|
1393
|
+
declare const heroUIAgentEmbedEventPropertiesSchema: z.ZodObject<{
|
|
1394
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
1395
|
+
componentId: z.ZodOptional<z.ZodString>;
|
|
1396
|
+
componentType: z.ZodOptional<z.ZodEnum<{
|
|
1397
|
+
map: "map";
|
|
1398
|
+
icon: "icon";
|
|
1399
|
+
"metric-grid": "metric-grid";
|
|
1400
|
+
"kpi-grid": "kpi-grid";
|
|
1401
|
+
"line-chart": "line-chart";
|
|
1402
|
+
"area-chart": "area-chart";
|
|
1403
|
+
"bar-chart": "bar-chart";
|
|
1404
|
+
"composed-chart": "composed-chart";
|
|
1405
|
+
"pie-chart": "pie-chart";
|
|
1406
|
+
"donut-chart": "donut-chart";
|
|
1407
|
+
"radar-chart": "radar-chart";
|
|
1408
|
+
"radial-chart": "radial-chart";
|
|
1409
|
+
"sankey-chart": "sankey-chart";
|
|
1410
|
+
"scatter-chart": "scatter-chart";
|
|
1411
|
+
heatmap: "heatmap";
|
|
1412
|
+
"candlestick-chart": "candlestick-chart";
|
|
1413
|
+
"funnel-chart": "funnel-chart";
|
|
1414
|
+
"gauge-chart": "gauge-chart";
|
|
1415
|
+
"sunburst-chart": "sunburst-chart";
|
|
1416
|
+
"data-table": "data-table";
|
|
1417
|
+
"comparison-list": "comparison-list";
|
|
1418
|
+
"meter-list": "meter-list";
|
|
1419
|
+
text: "text";
|
|
1420
|
+
form: "form";
|
|
1421
|
+
card: "card";
|
|
1422
|
+
callout: "callout";
|
|
1423
|
+
image: "image";
|
|
1424
|
+
grid: "grid";
|
|
1425
|
+
"tag-list": "tag-list";
|
|
1426
|
+
list: "list";
|
|
1427
|
+
"list-block": "list-block";
|
|
1428
|
+
accordion: "accordion";
|
|
1429
|
+
steps: "steps";
|
|
1430
|
+
"code-block": "code-block";
|
|
1431
|
+
diagram: "diagram";
|
|
1432
|
+
tabs: "tabs";
|
|
1433
|
+
"item-card": "item-card";
|
|
1434
|
+
"item-card-group": "item-card-group";
|
|
1435
|
+
"action-group": "action-group";
|
|
1436
|
+
followup: "followup";
|
|
1437
|
+
"switch-group": "switch-group";
|
|
1438
|
+
"toggle-group": "toggle-group";
|
|
1439
|
+
"record-card": "record-card";
|
|
1440
|
+
"product-card": "product-card";
|
|
1441
|
+
"flight-tracker": "flight-tracker";
|
|
1442
|
+
"create-event": "create-event";
|
|
1443
|
+
playlist: "playlist";
|
|
1444
|
+
"ride-status": "ride-status";
|
|
1445
|
+
"purchase-items": "purchase-items";
|
|
1446
|
+
"channel-message": "channel-message";
|
|
1447
|
+
"purchase-complete": "purchase-complete";
|
|
1448
|
+
"player-card": "player-card";
|
|
1449
|
+
"view-event": "view-event";
|
|
1450
|
+
"event-session": "event-session";
|
|
1451
|
+
"enable-notification": "enable-notification";
|
|
1452
|
+
"weather-forecast": "weather-forecast";
|
|
1453
|
+
"weather-current": "weather-current";
|
|
1454
|
+
"product-signals": "product-signals";
|
|
1455
|
+
dashboard: "dashboard";
|
|
1456
|
+
row: "row";
|
|
1457
|
+
col: "col";
|
|
1458
|
+
spacer: "spacer";
|
|
1459
|
+
divider: "divider";
|
|
1460
|
+
heading: "heading";
|
|
1461
|
+
button: "button";
|
|
1462
|
+
badge: "badge";
|
|
1463
|
+
rating: "rating";
|
|
1464
|
+
progress: "progress";
|
|
1465
|
+
}>>;
|
|
1466
|
+
feedbackComment: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
feedbackCommentLength: z.ZodOptional<z.ZodNumber>;
|
|
1468
|
+
feedbackReasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1469
|
+
other: "other";
|
|
1470
|
+
did_not_follow_instructions: "did_not_follow_instructions";
|
|
1471
|
+
incomplete: "incomplete";
|
|
1472
|
+
incorrect: "incorrect";
|
|
1473
|
+
not_relevant: "not_relevant";
|
|
1474
|
+
unclear: "unclear";
|
|
1475
|
+
}>>>;
|
|
1476
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
1477
|
+
json: "json";
|
|
1478
|
+
png: "png";
|
|
1479
|
+
csv: "csv";
|
|
1480
|
+
text: "text";
|
|
1481
|
+
svg: "svg";
|
|
1482
|
+
}>>;
|
|
1483
|
+
hasFeedbackComment: z.ZodOptional<z.ZodBoolean>;
|
|
1484
|
+
hasToolName: z.ZodOptional<z.ZodBoolean>;
|
|
1485
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
1486
|
+
latencyOrigin: z.ZodOptional<z.ZodLiteral<"user_submit">>;
|
|
1487
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
1488
|
+
protocolVersion: z.ZodOptional<z.ZodLiteral<6>>;
|
|
1489
|
+
sdkVersion: z.ZodOptional<z.ZodString>;
|
|
1490
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
1491
|
+
"client-inactivity-watchdog": "client-inactivity-watchdog";
|
|
1492
|
+
"cloudflare-chat": "cloudflare-chat";
|
|
1493
|
+
"message-send-failed": "message-send-failed";
|
|
1494
|
+
"stream-error": "stream-error";
|
|
1495
|
+
}>>;
|
|
1496
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
1497
|
+
}, z.core.$strict>;
|
|
1498
|
+
declare const heroUIAgentEmbedEventSchema: z.ZodObject<{
|
|
1499
|
+
conversationId: z.ZodString;
|
|
1500
|
+
event: z.ZodEnum<{
|
|
1501
|
+
retry: "retry";
|
|
1502
|
+
action_approved: "action_approved";
|
|
1503
|
+
action_declined: "action_declined";
|
|
1504
|
+
component_copy: "component_copy";
|
|
1505
|
+
component_export: "component_export";
|
|
1506
|
+
component_followup: "component_followup";
|
|
1507
|
+
component_rendered: "component_rendered";
|
|
1508
|
+
component_submit: "component_submit";
|
|
1509
|
+
component_tool: "component_tool";
|
|
1510
|
+
embed_loaded: "embed_loaded";
|
|
1511
|
+
failure: "failure";
|
|
1512
|
+
feedback_down: "feedback_down";
|
|
1513
|
+
feedback_up: "feedback_up";
|
|
1514
|
+
first_chunk: "first_chunk";
|
|
1515
|
+
first_feedback_paint: "first_feedback_paint";
|
|
1516
|
+
first_server_content_paint: "first_server_content_paint";
|
|
1517
|
+
first_text_paint: "first_text_paint";
|
|
1518
|
+
message_copied: "message_copied";
|
|
1519
|
+
message_sent: "message_sent";
|
|
1520
|
+
opened: "opened";
|
|
1521
|
+
reconnected: "reconnected";
|
|
1522
|
+
stopped: "stopped";
|
|
1523
|
+
turn_completed: "turn_completed";
|
|
1524
|
+
turn_stalled: "turn_stalled";
|
|
1525
|
+
}>;
|
|
1526
|
+
properties: z.ZodDefault<z.ZodObject<{
|
|
1527
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
componentId: z.ZodOptional<z.ZodString>;
|
|
1529
|
+
componentType: z.ZodOptional<z.ZodEnum<{
|
|
1530
|
+
map: "map";
|
|
1531
|
+
icon: "icon";
|
|
1532
|
+
"metric-grid": "metric-grid";
|
|
1533
|
+
"kpi-grid": "kpi-grid";
|
|
1534
|
+
"line-chart": "line-chart";
|
|
1535
|
+
"area-chart": "area-chart";
|
|
1536
|
+
"bar-chart": "bar-chart";
|
|
1537
|
+
"composed-chart": "composed-chart";
|
|
1538
|
+
"pie-chart": "pie-chart";
|
|
1539
|
+
"donut-chart": "donut-chart";
|
|
1540
|
+
"radar-chart": "radar-chart";
|
|
1541
|
+
"radial-chart": "radial-chart";
|
|
1542
|
+
"sankey-chart": "sankey-chart";
|
|
1543
|
+
"scatter-chart": "scatter-chart";
|
|
1544
|
+
heatmap: "heatmap";
|
|
1545
|
+
"candlestick-chart": "candlestick-chart";
|
|
1546
|
+
"funnel-chart": "funnel-chart";
|
|
1547
|
+
"gauge-chart": "gauge-chart";
|
|
1548
|
+
"sunburst-chart": "sunburst-chart";
|
|
1549
|
+
"data-table": "data-table";
|
|
1550
|
+
"comparison-list": "comparison-list";
|
|
1551
|
+
"meter-list": "meter-list";
|
|
1552
|
+
text: "text";
|
|
1553
|
+
form: "form";
|
|
1554
|
+
card: "card";
|
|
1555
|
+
callout: "callout";
|
|
1556
|
+
image: "image";
|
|
1557
|
+
grid: "grid";
|
|
1558
|
+
"tag-list": "tag-list";
|
|
1559
|
+
list: "list";
|
|
1560
|
+
"list-block": "list-block";
|
|
1561
|
+
accordion: "accordion";
|
|
1562
|
+
steps: "steps";
|
|
1563
|
+
"code-block": "code-block";
|
|
1564
|
+
diagram: "diagram";
|
|
1565
|
+
tabs: "tabs";
|
|
1566
|
+
"item-card": "item-card";
|
|
1567
|
+
"item-card-group": "item-card-group";
|
|
1568
|
+
"action-group": "action-group";
|
|
1569
|
+
followup: "followup";
|
|
1570
|
+
"switch-group": "switch-group";
|
|
1571
|
+
"toggle-group": "toggle-group";
|
|
1572
|
+
"record-card": "record-card";
|
|
1573
|
+
"product-card": "product-card";
|
|
1574
|
+
"flight-tracker": "flight-tracker";
|
|
1575
|
+
"create-event": "create-event";
|
|
1576
|
+
playlist: "playlist";
|
|
1577
|
+
"ride-status": "ride-status";
|
|
1578
|
+
"purchase-items": "purchase-items";
|
|
1579
|
+
"channel-message": "channel-message";
|
|
1580
|
+
"purchase-complete": "purchase-complete";
|
|
1581
|
+
"player-card": "player-card";
|
|
1582
|
+
"view-event": "view-event";
|
|
1583
|
+
"event-session": "event-session";
|
|
1584
|
+
"enable-notification": "enable-notification";
|
|
1585
|
+
"weather-forecast": "weather-forecast";
|
|
1586
|
+
"weather-current": "weather-current";
|
|
1587
|
+
"product-signals": "product-signals";
|
|
1588
|
+
dashboard: "dashboard";
|
|
1589
|
+
row: "row";
|
|
1590
|
+
col: "col";
|
|
1591
|
+
spacer: "spacer";
|
|
1592
|
+
divider: "divider";
|
|
1593
|
+
heading: "heading";
|
|
1594
|
+
button: "button";
|
|
1595
|
+
badge: "badge";
|
|
1596
|
+
rating: "rating";
|
|
1597
|
+
progress: "progress";
|
|
1598
|
+
}>>;
|
|
1599
|
+
feedbackComment: z.ZodOptional<z.ZodString>;
|
|
1600
|
+
feedbackCommentLength: z.ZodOptional<z.ZodNumber>;
|
|
1601
|
+
feedbackReasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1602
|
+
other: "other";
|
|
1603
|
+
did_not_follow_instructions: "did_not_follow_instructions";
|
|
1604
|
+
incomplete: "incomplete";
|
|
1605
|
+
incorrect: "incorrect";
|
|
1606
|
+
not_relevant: "not_relevant";
|
|
1607
|
+
unclear: "unclear";
|
|
1608
|
+
}>>>;
|
|
1609
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
1610
|
+
json: "json";
|
|
1611
|
+
png: "png";
|
|
1612
|
+
csv: "csv";
|
|
1613
|
+
text: "text";
|
|
1614
|
+
svg: "svg";
|
|
1615
|
+
}>>;
|
|
1616
|
+
hasFeedbackComment: z.ZodOptional<z.ZodBoolean>;
|
|
1617
|
+
hasToolName: z.ZodOptional<z.ZodBoolean>;
|
|
1618
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
1619
|
+
latencyOrigin: z.ZodOptional<z.ZodLiteral<"user_submit">>;
|
|
1620
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
1621
|
+
protocolVersion: z.ZodOptional<z.ZodLiteral<6>>;
|
|
1622
|
+
sdkVersion: z.ZodOptional<z.ZodString>;
|
|
1623
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
1624
|
+
"client-inactivity-watchdog": "client-inactivity-watchdog";
|
|
1625
|
+
"cloudflare-chat": "cloudflare-chat";
|
|
1626
|
+
"message-send-failed": "message-send-failed";
|
|
1627
|
+
"stream-error": "stream-error";
|
|
1628
|
+
}>>;
|
|
1629
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
}, z.core.$strict>>;
|
|
1631
|
+
}, z.core.$strict>;
|
|
1632
|
+
declare const heroUIAgentTurnErrorCodeSchema: z.ZodEnum<{
|
|
1633
|
+
unknown: "unknown";
|
|
1634
|
+
turn_stalled: "turn_stalled";
|
|
1635
|
+
client_stopped: "client_stopped";
|
|
1636
|
+
conversation_deleted: "conversation_deleted";
|
|
1637
|
+
provider_error: "provider_error";
|
|
1638
|
+
provider_rate_limited: "provider_rate_limited";
|
|
1639
|
+
provider_timeout: "provider_timeout";
|
|
1640
|
+
turn_deadline_exceeded: "turn_deadline_exceeded";
|
|
1641
|
+
}>;
|
|
1642
|
+
type HeroUIAgentEmbedEvent = z.infer<typeof heroUIAgentEmbedEventSchema>;
|
|
1643
|
+
type HeroUIAgentEmbedEventName = HeroUIAgentEmbedEvent["event"];
|
|
1644
|
+
type HeroUIAgentEmbedEventProperties = z.infer<typeof heroUIAgentEmbedEventPropertiesSchema>;
|
|
1645
|
+
type HeroUIAgentTurnErrorCode = z.infer<typeof heroUIAgentTurnErrorCodeSchema>;
|
|
1292
1646
|
|
|
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,
|
|
1647
|
+
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_ATTACHMENT_ACCEPT, HEROUI_AGENT_ATTACHMENT_CONTENT_TYPES, 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, rideStatusComponentSchema, rowComponentSchema, sankeyChartComponentSchema, scatterChartComponentSchema, spacerComponentSchema, stepsComponentSchema, sunburstChartComponentSchema, switchGroupComponentSchema, tabsComponentSchema, tagListComponentSchema, textComponentSchema, toggleGroupComponentSchema, viewEventComponentSchema, weatherConditionSchema, weatherConditions, weatherCurrentComponentSchema, weatherForecastComponentSchema };
|