@agent-native/core 0.212.1 → 0.214.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/a2a/anthropic-managed-agents.js +1 -0
  2. package/dist/a2a/caller-auth.js +7 -2
  3. package/dist/a2a/client.d.ts +1 -0
  4. package/dist/a2a/client.js +27 -0
  5. package/dist/a2a/handlers.js +15 -3
  6. package/dist/a2a/organization-identity.d.ts +4 -1
  7. package/dist/a2a/organization-identity.js +3 -1
  8. package/dist/a2a/server.d.ts +6 -5
  9. package/dist/a2a/server.js +79 -6
  10. package/dist/a2a-claims.d.ts +1 -0
  11. package/dist/a2a-claims.js +1 -0
  12. package/dist/agent/actions/manage-provider-key-policy.js +4 -2
  13. package/dist/agent/app-model-defaults.js +2 -10
  14. package/dist/agent/loop-settings.js +2 -10
  15. package/dist/appearance/actions/get-theme-family.d.ts +8 -0
  16. package/dist/appearance/actions/get-theme-family.js +38 -0
  17. package/dist/appearance/actions/set-theme-family.d.ts +7 -0
  18. package/dist/appearance/actions/set-theme-family.js +33 -0
  19. package/dist/appearance/theme-family.d.ts +13 -0
  20. package/dist/appearance/theme-family.js +38 -0
  21. package/dist/audit/actions/export-audit-events.js +1 -0
  22. package/dist/audit/attribution.d.ts +5 -4
  23. package/dist/audit/attribution.js +2 -1
  24. package/dist/audit/index.d.ts +1 -1
  25. package/dist/audit/ocsf.js +1 -0
  26. package/dist/audit/read-scope.js +2 -12
  27. package/dist/audit/record.js +1 -0
  28. package/dist/audit/store.js +12 -3
  29. package/dist/audit/types.d.ts +4 -0
  30. package/dist/automation/index.d.ts +1 -1
  31. package/dist/automations/service.js +3 -10
  32. package/dist/client/org/hooks.d.ts +3 -0
  33. package/dist/client/org/hooks.js +12 -0
  34. package/dist/client/theme-family.d.ts +35 -0
  35. package/dist/client/theme-family.js +223 -0
  36. package/dist/client/theme.d.ts +1 -1
  37. package/dist/client/theme.js +5 -2
  38. package/dist/client/ui/index.d.ts +1 -0
  39. package/dist/client/ui/index.js +1 -0
  40. package/dist/collab/awareness.d.ts +2 -2
  41. package/dist/collab/routes.d.ts +2 -2
  42. package/dist/collab/struct-routes.d.ts +1 -1
  43. package/dist/connections/catalog.d.ts +1 -1
  44. package/dist/connections/catalog.js +7 -1
  45. package/dist/credentials/index.js +18 -2
  46. package/dist/data-widgets/index.d.ts +339 -4
  47. package/dist/data-widgets/index.js +150 -7
  48. package/dist/db/schema-snapshot.generated.js +5 -2
  49. package/dist/feature-flags/a2a-action-route.js +1 -0
  50. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  51. package/dist/file-upload/storage-settings.js +2 -9
  52. package/dist/framework-tools.js +2 -0
  53. package/dist/jobs/actions/manage-recurring-job.d.ts +1 -1
  54. package/dist/jobs/tools.js +2 -12
  55. package/dist/mcp/actions/service-token-access.js +15 -11
  56. package/dist/mcp/credential-issuance.js +9 -2
  57. package/dist/notifications/routes.d.ts +3 -3
  58. package/dist/observability/routes.d.ts +1 -1
  59. package/dist/org/actions.d.ts +1 -1
  60. package/dist/org/actions.js +3 -7
  61. package/dist/org/app-roles.js +10 -1
  62. package/dist/org/context.d.ts +1 -0
  63. package/dist/org/context.js +122 -24
  64. package/dist/org/federation.d.ts +1 -1
  65. package/dist/org/federation.js +2 -2
  66. package/dist/org/handlers.d.ts +4 -0
  67. package/dist/org/handlers.js +140 -44
  68. package/dist/org/index.d.ts +2 -1
  69. package/dist/org/membership.d.ts +6 -4
  70. package/dist/org/membership.js +7 -5
  71. package/dist/org/migrations.js +6 -0
  72. package/dist/org/plugin.d.ts +1 -0
  73. package/dist/org/plugin.js +9 -1
  74. package/dist/org/private-icon-handlers.js +4 -10
  75. package/dist/org/types.d.ts +2 -0
  76. package/dist/org/workspace-app-access.js +62 -14
  77. package/dist/progress/routes.d.ts +1 -1
  78. package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
  79. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  80. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  81. package/dist/secrets/routes.d.ts +6 -6
  82. package/dist/server/action-discovery.js +8 -0
  83. package/dist/server/action-routes.d.ts +1 -0
  84. package/dist/server/action-routes.js +13 -1
  85. package/dist/server/agent-chat/context-tools.js +43 -1
  86. package/dist/server/agent-chat/prompt-resources.js +1 -1
  87. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  88. package/dist/server/agent-engine-default-model-route.d.ts +1 -1
  89. package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
  90. package/dist/server/index.d.ts +1 -0
  91. package/dist/server/index.js +1 -0
  92. package/dist/server/org-admin.js +3 -2
  93. package/dist/server/personal-provider-key-holders.d.ts +1 -1
  94. package/dist/server/personal-provider-key-holders.js +7 -2
  95. package/dist/server/personal-provider-key-policy.d.ts +2 -0
  96. package/dist/server/personal-provider-key-policy.js +21 -5
  97. package/dist/server/request-context.d.ts +2 -0
  98. package/dist/server/request-context.js +7 -0
  99. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -13
  100. package/dist/triggers/actions/manage-automation.d.ts +4 -4
  101. package/dist/triggers/routes.js +2 -9
  102. package/dist/usage/alerts-store.js +2 -9
  103. package/dist/usage/metrics-store.js +2 -9
  104. package/dist/workspace-connections/actions/list-workspace-user-groups.d.ts +1 -1
  105. package/dist/workspace-connections/groups.js +2 -11
  106. package/package.json +3 -3
  107. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +16 -13
@@ -21,22 +21,61 @@ export interface DataChartSeriesDefinition {
21
21
  label: string;
22
22
  color?: string;
23
23
  }
24
+ export type DataWidgetActionIcon = "explore" | "camera" | "notebook";
25
+ export interface DataWidgetAction {
26
+ label: string;
27
+ href: string;
28
+ icon?: DataWidgetActionIcon;
29
+ }
24
30
  export interface DataChartWidget {
25
31
  type: "bar" | "line" | "area";
26
32
  title?: string;
33
+ layout?: "horizontal" | "vertical";
34
+ xAxisTitle?: string;
35
+ yAxisTitle?: string;
36
+ showValueLabels?: boolean;
37
+ /** Total chart-body height in pixels, including content padding. */
38
+ contentHeight?: number;
39
+ /** Inner chart-body padding in pixels. */
40
+ contentPadding?: number;
41
+ /** Font family token used by chart labels. Defaults to the app's sans font. */
42
+ labelFontFamily?: "sans" | "serif" | "mono";
43
+ /** Chart-label size in pixels. Defaults to 11. */
44
+ labelFontSize?: number;
45
+ axisTitleFontSize?: number;
46
+ axisTitleFontWeight?: 400 | 500;
47
+ valueLabelFontSize?: number;
48
+ valueLabelFontWeight?: 400 | 500;
27
49
  xKey: string;
28
50
  series: DataChartSeriesDefinition[];
29
51
  data: Array<Record<string, unknown>>;
30
52
  sampled?: boolean;
53
+ actions?: DataWidgetAction[];
31
54
  }
32
55
  export interface DataWidgetDisplay {
33
56
  title?: string;
34
57
  description?: string;
35
- primaryAction?: {
36
- label: string;
37
- href: string;
38
- };
58
+ primaryAction?: DataWidgetAction;
59
+ sources?: DataWidgetDataSource[];
60
+ actions?: DataWidgetDisplayAction[];
39
61
  }
62
+ export interface DataWidgetDataSource {
63
+ id?: string;
64
+ label: string;
65
+ href?: string;
66
+ }
67
+ export type DataWidgetDisplayAction = {
68
+ id?: string;
69
+ type: "link";
70
+ label: string;
71
+ href: string;
72
+ icon?: DataWidgetActionIcon;
73
+ } | {
74
+ id?: string;
75
+ type: "copy";
76
+ label: string;
77
+ text: string;
78
+ };
40
79
  export interface DataWidgetResultMetadata {
41
80
  widgetId?: string;
42
81
  title?: string;
@@ -111,6 +150,25 @@ export declare const dataChartWidgetSchema: z.ZodObject<{
111
150
  line: "line";
112
151
  }>;
113
152
  title: z.ZodOptional<z.ZodString>;
153
+ layout: z.ZodOptional<z.ZodEnum<{
154
+ horizontal: "horizontal";
155
+ vertical: "vertical";
156
+ }>>;
157
+ xAxisTitle: z.ZodOptional<z.ZodString>;
158
+ yAxisTitle: z.ZodOptional<z.ZodString>;
159
+ showValueLabels: z.ZodOptional<z.ZodBoolean>;
160
+ contentHeight: z.ZodOptional<z.ZodNumber>;
161
+ contentPadding: z.ZodOptional<z.ZodNumber>;
162
+ labelFontFamily: z.ZodOptional<z.ZodEnum<{
163
+ mono: "mono";
164
+ sans: "sans";
165
+ serif: "serif";
166
+ }>>;
167
+ labelFontSize: z.ZodOptional<z.ZodNumber>;
168
+ axisTitleFontSize: z.ZodOptional<z.ZodNumber>;
169
+ axisTitleFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
170
+ valueLabelFontSize: z.ZodOptional<z.ZodNumber>;
171
+ valueLabelFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
114
172
  xKey: z.ZodString;
115
173
  series: z.ZodArray<z.ZodObject<{
116
174
  key: z.ZodString;
@@ -119,6 +177,15 @@ export declare const dataChartWidgetSchema: z.ZodObject<{
119
177
  }, z.core.$loose>>;
120
178
  data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
121
179
  sampled: z.ZodOptional<z.ZodBoolean>;
180
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
181
+ label: z.ZodString;
182
+ href: z.ZodString;
183
+ icon: z.ZodOptional<z.ZodEnum<{
184
+ camera: "camera";
185
+ explore: "explore";
186
+ notebook: "notebook";
187
+ }>>;
188
+ }, z.core.$loose>>>;
122
189
  }, z.core.$loose>;
123
190
  export declare const dataTableWidgetResultSchema: z.ZodObject<{
124
191
  widgetId: z.ZodOptional<z.ZodString>;
@@ -130,7 +197,33 @@ export declare const dataTableWidgetResultSchema: z.ZodObject<{
130
197
  primaryAction: z.ZodOptional<z.ZodObject<{
131
198
  label: z.ZodString;
132
199
  href: z.ZodString;
200
+ icon: z.ZodOptional<z.ZodEnum<{
201
+ camera: "camera";
202
+ explore: "explore";
203
+ notebook: "notebook";
204
+ }>>;
133
205
  }, z.core.$loose>>;
206
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
+ id: z.ZodOptional<z.ZodString>;
208
+ label: z.ZodString;
209
+ href: z.ZodOptional<z.ZodString>;
210
+ }, z.core.$loose>>>;
211
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
212
+ id: z.ZodOptional<z.ZodString>;
213
+ type: z.ZodLiteral<"link">;
214
+ label: z.ZodString;
215
+ href: z.ZodString;
216
+ icon: z.ZodOptional<z.ZodEnum<{
217
+ camera: "camera";
218
+ explore: "explore";
219
+ notebook: "notebook";
220
+ }>>;
221
+ }, z.core.$loose>, z.ZodObject<{
222
+ id: z.ZodOptional<z.ZodString>;
223
+ type: z.ZodLiteral<"copy">;
224
+ label: z.ZodString;
225
+ text: z.ZodString;
226
+ }, z.core.$loose>], "type">>>;
134
227
  }, z.core.$loose>>;
135
228
  widget: z.ZodLiteral<"data-table">;
136
229
  table: z.ZodObject<{
@@ -159,7 +252,33 @@ export declare const dataChartWidgetResultSchema: z.ZodObject<{
159
252
  primaryAction: z.ZodOptional<z.ZodObject<{
160
253
  label: z.ZodString;
161
254
  href: z.ZodString;
255
+ icon: z.ZodOptional<z.ZodEnum<{
256
+ camera: "camera";
257
+ explore: "explore";
258
+ notebook: "notebook";
259
+ }>>;
162
260
  }, z.core.$loose>>;
261
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
+ id: z.ZodOptional<z.ZodString>;
263
+ label: z.ZodString;
264
+ href: z.ZodOptional<z.ZodString>;
265
+ }, z.core.$loose>>>;
266
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
267
+ id: z.ZodOptional<z.ZodString>;
268
+ type: z.ZodLiteral<"link">;
269
+ label: z.ZodString;
270
+ href: z.ZodString;
271
+ icon: z.ZodOptional<z.ZodEnum<{
272
+ camera: "camera";
273
+ explore: "explore";
274
+ notebook: "notebook";
275
+ }>>;
276
+ }, z.core.$loose>, z.ZodObject<{
277
+ id: z.ZodOptional<z.ZodString>;
278
+ type: z.ZodLiteral<"copy">;
279
+ label: z.ZodString;
280
+ text: z.ZodString;
281
+ }, z.core.$loose>], "type">>>;
163
282
  }, z.core.$loose>>;
164
283
  widget: z.ZodLiteral<"data-chart">;
165
284
  chartSeries: z.ZodObject<{
@@ -169,6 +288,25 @@ export declare const dataChartWidgetResultSchema: z.ZodObject<{
169
288
  line: "line";
170
289
  }>;
171
290
  title: z.ZodOptional<z.ZodString>;
291
+ layout: z.ZodOptional<z.ZodEnum<{
292
+ horizontal: "horizontal";
293
+ vertical: "vertical";
294
+ }>>;
295
+ xAxisTitle: z.ZodOptional<z.ZodString>;
296
+ yAxisTitle: z.ZodOptional<z.ZodString>;
297
+ showValueLabels: z.ZodOptional<z.ZodBoolean>;
298
+ contentHeight: z.ZodOptional<z.ZodNumber>;
299
+ contentPadding: z.ZodOptional<z.ZodNumber>;
300
+ labelFontFamily: z.ZodOptional<z.ZodEnum<{
301
+ mono: "mono";
302
+ sans: "sans";
303
+ serif: "serif";
304
+ }>>;
305
+ labelFontSize: z.ZodOptional<z.ZodNumber>;
306
+ axisTitleFontSize: z.ZodOptional<z.ZodNumber>;
307
+ axisTitleFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
308
+ valueLabelFontSize: z.ZodOptional<z.ZodNumber>;
309
+ valueLabelFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
172
310
  xKey: z.ZodString;
173
311
  series: z.ZodArray<z.ZodObject<{
174
312
  key: z.ZodString;
@@ -177,6 +315,15 @@ export declare const dataChartWidgetResultSchema: z.ZodObject<{
177
315
  }, z.core.$loose>>;
178
316
  data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
179
317
  sampled: z.ZodOptional<z.ZodBoolean>;
318
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
319
+ label: z.ZodString;
320
+ href: z.ZodString;
321
+ icon: z.ZodOptional<z.ZodEnum<{
322
+ camera: "camera";
323
+ explore: "explore";
324
+ notebook: "notebook";
325
+ }>>;
326
+ }, z.core.$loose>>>;
180
327
  }, z.core.$loose>;
181
328
  }, z.core.$loose>;
182
329
  export declare const dataInsightsWidgetResultSchema: z.ZodObject<{
@@ -189,7 +336,33 @@ export declare const dataInsightsWidgetResultSchema: z.ZodObject<{
189
336
  primaryAction: z.ZodOptional<z.ZodObject<{
190
337
  label: z.ZodString;
191
338
  href: z.ZodString;
339
+ icon: z.ZodOptional<z.ZodEnum<{
340
+ camera: "camera";
341
+ explore: "explore";
342
+ notebook: "notebook";
343
+ }>>;
192
344
  }, z.core.$loose>>;
345
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
346
+ id: z.ZodOptional<z.ZodString>;
347
+ label: z.ZodString;
348
+ href: z.ZodOptional<z.ZodString>;
349
+ }, z.core.$loose>>>;
350
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
351
+ id: z.ZodOptional<z.ZodString>;
352
+ type: z.ZodLiteral<"link">;
353
+ label: z.ZodString;
354
+ href: z.ZodString;
355
+ icon: z.ZodOptional<z.ZodEnum<{
356
+ camera: "camera";
357
+ explore: "explore";
358
+ notebook: "notebook";
359
+ }>>;
360
+ }, z.core.$loose>, z.ZodObject<{
361
+ id: z.ZodOptional<z.ZodString>;
362
+ type: z.ZodLiteral<"copy">;
363
+ label: z.ZodString;
364
+ text: z.ZodString;
365
+ }, z.core.$loose>], "type">>>;
193
366
  }, z.core.$loose>>;
194
367
  widget: z.ZodLiteral<"data-insights">;
195
368
  table: z.ZodOptional<z.ZodObject<{
@@ -214,6 +387,25 @@ export declare const dataInsightsWidgetResultSchema: z.ZodObject<{
214
387
  line: "line";
215
388
  }>;
216
389
  title: z.ZodOptional<z.ZodString>;
390
+ layout: z.ZodOptional<z.ZodEnum<{
391
+ horizontal: "horizontal";
392
+ vertical: "vertical";
393
+ }>>;
394
+ xAxisTitle: z.ZodOptional<z.ZodString>;
395
+ yAxisTitle: z.ZodOptional<z.ZodString>;
396
+ showValueLabels: z.ZodOptional<z.ZodBoolean>;
397
+ contentHeight: z.ZodOptional<z.ZodNumber>;
398
+ contentPadding: z.ZodOptional<z.ZodNumber>;
399
+ labelFontFamily: z.ZodOptional<z.ZodEnum<{
400
+ mono: "mono";
401
+ sans: "sans";
402
+ serif: "serif";
403
+ }>>;
404
+ labelFontSize: z.ZodOptional<z.ZodNumber>;
405
+ axisTitleFontSize: z.ZodOptional<z.ZodNumber>;
406
+ axisTitleFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
407
+ valueLabelFontSize: z.ZodOptional<z.ZodNumber>;
408
+ valueLabelFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
217
409
  xKey: z.ZodString;
218
410
  series: z.ZodArray<z.ZodObject<{
219
411
  key: z.ZodString;
@@ -222,6 +414,15 @@ export declare const dataInsightsWidgetResultSchema: z.ZodObject<{
222
414
  }, z.core.$loose>>;
223
415
  data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
224
416
  sampled: z.ZodOptional<z.ZodBoolean>;
417
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
418
+ label: z.ZodString;
419
+ href: z.ZodString;
420
+ icon: z.ZodOptional<z.ZodEnum<{
421
+ camera: "camera";
422
+ explore: "explore";
423
+ notebook: "notebook";
424
+ }>>;
425
+ }, z.core.$loose>>>;
225
426
  }, z.core.$loose>>;
226
427
  }, z.core.$loose>;
227
428
  export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
@@ -234,7 +435,33 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
234
435
  primaryAction: z.ZodOptional<z.ZodObject<{
235
436
  label: z.ZodString;
236
437
  href: z.ZodString;
438
+ icon: z.ZodOptional<z.ZodEnum<{
439
+ camera: "camera";
440
+ explore: "explore";
441
+ notebook: "notebook";
442
+ }>>;
237
443
  }, z.core.$loose>>;
444
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ id: z.ZodOptional<z.ZodString>;
446
+ label: z.ZodString;
447
+ href: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$loose>>>;
449
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
450
+ id: z.ZodOptional<z.ZodString>;
451
+ type: z.ZodLiteral<"link">;
452
+ label: z.ZodString;
453
+ href: z.ZodString;
454
+ icon: z.ZodOptional<z.ZodEnum<{
455
+ camera: "camera";
456
+ explore: "explore";
457
+ notebook: "notebook";
458
+ }>>;
459
+ }, z.core.$loose>, z.ZodObject<{
460
+ id: z.ZodOptional<z.ZodString>;
461
+ type: z.ZodLiteral<"copy">;
462
+ label: z.ZodString;
463
+ text: z.ZodString;
464
+ }, z.core.$loose>], "type">>>;
238
465
  }, z.core.$loose>>;
239
466
  widget: z.ZodLiteral<"data-table">;
240
467
  table: z.ZodObject<{
@@ -262,7 +489,33 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
262
489
  primaryAction: z.ZodOptional<z.ZodObject<{
263
490
  label: z.ZodString;
264
491
  href: z.ZodString;
492
+ icon: z.ZodOptional<z.ZodEnum<{
493
+ camera: "camera";
494
+ explore: "explore";
495
+ notebook: "notebook";
496
+ }>>;
265
497
  }, z.core.$loose>>;
498
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
499
+ id: z.ZodOptional<z.ZodString>;
500
+ label: z.ZodString;
501
+ href: z.ZodOptional<z.ZodString>;
502
+ }, z.core.$loose>>>;
503
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
504
+ id: z.ZodOptional<z.ZodString>;
505
+ type: z.ZodLiteral<"link">;
506
+ label: z.ZodString;
507
+ href: z.ZodString;
508
+ icon: z.ZodOptional<z.ZodEnum<{
509
+ camera: "camera";
510
+ explore: "explore";
511
+ notebook: "notebook";
512
+ }>>;
513
+ }, z.core.$loose>, z.ZodObject<{
514
+ id: z.ZodOptional<z.ZodString>;
515
+ type: z.ZodLiteral<"copy">;
516
+ label: z.ZodString;
517
+ text: z.ZodString;
518
+ }, z.core.$loose>], "type">>>;
266
519
  }, z.core.$loose>>;
267
520
  widget: z.ZodLiteral<"data-chart">;
268
521
  chartSeries: z.ZodObject<{
@@ -272,6 +525,25 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
272
525
  line: "line";
273
526
  }>;
274
527
  title: z.ZodOptional<z.ZodString>;
528
+ layout: z.ZodOptional<z.ZodEnum<{
529
+ horizontal: "horizontal";
530
+ vertical: "vertical";
531
+ }>>;
532
+ xAxisTitle: z.ZodOptional<z.ZodString>;
533
+ yAxisTitle: z.ZodOptional<z.ZodString>;
534
+ showValueLabels: z.ZodOptional<z.ZodBoolean>;
535
+ contentHeight: z.ZodOptional<z.ZodNumber>;
536
+ contentPadding: z.ZodOptional<z.ZodNumber>;
537
+ labelFontFamily: z.ZodOptional<z.ZodEnum<{
538
+ mono: "mono";
539
+ sans: "sans";
540
+ serif: "serif";
541
+ }>>;
542
+ labelFontSize: z.ZodOptional<z.ZodNumber>;
543
+ axisTitleFontSize: z.ZodOptional<z.ZodNumber>;
544
+ axisTitleFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
545
+ valueLabelFontSize: z.ZodOptional<z.ZodNumber>;
546
+ valueLabelFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
275
547
  xKey: z.ZodString;
276
548
  series: z.ZodArray<z.ZodObject<{
277
549
  key: z.ZodString;
@@ -280,6 +552,15 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
280
552
  }, z.core.$loose>>;
281
553
  data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
554
  sampled: z.ZodOptional<z.ZodBoolean>;
555
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
556
+ label: z.ZodString;
557
+ href: z.ZodString;
558
+ icon: z.ZodOptional<z.ZodEnum<{
559
+ camera: "camera";
560
+ explore: "explore";
561
+ notebook: "notebook";
562
+ }>>;
563
+ }, z.core.$loose>>>;
283
564
  }, z.core.$loose>;
284
565
  }, z.core.$loose>, z.ZodObject<{
285
566
  widgetId: z.ZodOptional<z.ZodString>;
@@ -291,7 +572,33 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
291
572
  primaryAction: z.ZodOptional<z.ZodObject<{
292
573
  label: z.ZodString;
293
574
  href: z.ZodString;
575
+ icon: z.ZodOptional<z.ZodEnum<{
576
+ camera: "camera";
577
+ explore: "explore";
578
+ notebook: "notebook";
579
+ }>>;
294
580
  }, z.core.$loose>>;
581
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
582
+ id: z.ZodOptional<z.ZodString>;
583
+ label: z.ZodString;
584
+ href: z.ZodOptional<z.ZodString>;
585
+ }, z.core.$loose>>>;
586
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
587
+ id: z.ZodOptional<z.ZodString>;
588
+ type: z.ZodLiteral<"link">;
589
+ label: z.ZodString;
590
+ href: z.ZodString;
591
+ icon: z.ZodOptional<z.ZodEnum<{
592
+ camera: "camera";
593
+ explore: "explore";
594
+ notebook: "notebook";
595
+ }>>;
596
+ }, z.core.$loose>, z.ZodObject<{
597
+ id: z.ZodOptional<z.ZodString>;
598
+ type: z.ZodLiteral<"copy">;
599
+ label: z.ZodString;
600
+ text: z.ZodString;
601
+ }, z.core.$loose>], "type">>>;
295
602
  }, z.core.$loose>>;
296
603
  widget: z.ZodLiteral<"data-insights">;
297
604
  table: z.ZodOptional<z.ZodObject<{
@@ -316,6 +623,25 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
316
623
  line: "line";
317
624
  }>;
318
625
  title: z.ZodOptional<z.ZodString>;
626
+ layout: z.ZodOptional<z.ZodEnum<{
627
+ horizontal: "horizontal";
628
+ vertical: "vertical";
629
+ }>>;
630
+ xAxisTitle: z.ZodOptional<z.ZodString>;
631
+ yAxisTitle: z.ZodOptional<z.ZodString>;
632
+ showValueLabels: z.ZodOptional<z.ZodBoolean>;
633
+ contentHeight: z.ZodOptional<z.ZodNumber>;
634
+ contentPadding: z.ZodOptional<z.ZodNumber>;
635
+ labelFontFamily: z.ZodOptional<z.ZodEnum<{
636
+ mono: "mono";
637
+ sans: "sans";
638
+ serif: "serif";
639
+ }>>;
640
+ labelFontSize: z.ZodOptional<z.ZodNumber>;
641
+ axisTitleFontSize: z.ZodOptional<z.ZodNumber>;
642
+ axisTitleFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
643
+ valueLabelFontSize: z.ZodOptional<z.ZodNumber>;
644
+ valueLabelFontWeight: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<500>]>>;
319
645
  xKey: z.ZodString;
320
646
  series: z.ZodArray<z.ZodObject<{
321
647
  key: z.ZodString;
@@ -324,5 +650,14 @@ export declare const dataWidgetResultSchema: z.ZodUnion<readonly [z.ZodObject<{
324
650
  }, z.core.$loose>>;
325
651
  data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
652
  sampled: z.ZodOptional<z.ZodBoolean>;
653
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
+ label: z.ZodString;
655
+ href: z.ZodString;
656
+ icon: z.ZodOptional<z.ZodEnum<{
657
+ camera: "camera";
658
+ explore: "explore";
659
+ notebook: "notebook";
660
+ }>>;
661
+ }, z.core.$loose>>>;
327
662
  }, z.core.$loose>>;
328
663
  }, z.core.$loose>]>;
@@ -39,27 +39,118 @@ export function isDataChartWidget(value) {
39
39
  if (!isRecord(value))
40
40
  return false;
41
41
  return ((value.type === "bar" || value.type === "line" || value.type === "area") &&
42
+ (value.layout === undefined ||
43
+ value.layout === "horizontal" ||
44
+ value.layout === "vertical") &&
45
+ (value.xAxisTitle === undefined || typeof value.xAxisTitle === "string") &&
46
+ (value.yAxisTitle === undefined || typeof value.yAxisTitle === "string") &&
47
+ (value.showValueLabels === undefined ||
48
+ typeof value.showValueLabels === "boolean") &&
49
+ (value.contentHeight === undefined ||
50
+ (typeof value.contentHeight === "number" &&
51
+ Number.isFinite(value.contentHeight) &&
52
+ value.contentHeight > 0 &&
53
+ value.contentHeight <= 1200)) &&
54
+ (value.contentPadding === undefined ||
55
+ (typeof value.contentPadding === "number" &&
56
+ Number.isFinite(value.contentPadding) &&
57
+ value.contentPadding >= 0 &&
58
+ value.contentPadding <= 64)) &&
59
+ (value.labelFontFamily === undefined ||
60
+ value.labelFontFamily === "sans" ||
61
+ value.labelFontFamily === "serif" ||
62
+ value.labelFontFamily === "mono") &&
63
+ (value.labelFontSize === undefined ||
64
+ (typeof value.labelFontSize === "number" &&
65
+ Number.isInteger(value.labelFontSize) &&
66
+ value.labelFontSize >= 8 &&
67
+ value.labelFontSize <= 24)) &&
68
+ (value.axisTitleFontSize === undefined ||
69
+ (typeof value.axisTitleFontSize === "number" &&
70
+ Number.isInteger(value.axisTitleFontSize) &&
71
+ value.axisTitleFontSize >= 8 &&
72
+ value.axisTitleFontSize <= 24)) &&
73
+ (value.axisTitleFontWeight === undefined ||
74
+ value.axisTitleFontWeight === 400 ||
75
+ value.axisTitleFontWeight === 500) &&
76
+ (value.valueLabelFontSize === undefined ||
77
+ (typeof value.valueLabelFontSize === "number" &&
78
+ Number.isInteger(value.valueLabelFontSize) &&
79
+ value.valueLabelFontSize >= 8 &&
80
+ value.valueLabelFontSize <= 24)) &&
81
+ (value.valueLabelFontWeight === undefined ||
82
+ value.valueLabelFontWeight === 400 ||
83
+ value.valueLabelFontWeight === 500) &&
42
84
  isString(value.xKey) &&
43
85
  Array.isArray(value.series) &&
44
86
  value.series.every((series) => isRecord(series) &&
45
87
  isString(series.key) &&
46
88
  isString(series.label) &&
47
89
  (series.color === undefined || typeof series.color === "string")) &&
90
+ (value.actions === undefined ||
91
+ (Array.isArray(value.actions) &&
92
+ value.actions.every(isDataWidgetAction))) &&
48
93
  Array.isArray(value.data) &&
49
94
  value.data.every(isRecord));
50
95
  }
51
- function isPrimaryAction(value) {
52
- return isRecord(value) && isString(value.label) && isString(value.href);
96
+ function isDataWidgetActionIcon(value) {
97
+ return value === "explore" || value === "camera" || value === "notebook";
98
+ }
99
+ function isDataWidgetAction(value) {
100
+ return (isRecord(value) &&
101
+ isString(value.label) &&
102
+ isString(value.href) &&
103
+ (value.icon === undefined || isDataWidgetActionIcon(value.icon)));
104
+ }
105
+ function normalizePrimaryAction(value) {
106
+ if (!isRecord(value) || !isString(value.label) || !isString(value.href)) {
107
+ return undefined;
108
+ }
109
+ return {
110
+ label: value.label,
111
+ href: value.href,
112
+ ...(isDataWidgetActionIcon(value.icon) ? { icon: value.icon } : {}),
113
+ };
114
+ }
115
+ function isDataWidgetDataSource(value) {
116
+ return (isRecord(value) &&
117
+ isString(value.label) &&
118
+ (value.id === undefined || typeof value.id === "string") &&
119
+ (value.href === undefined || isString(value.href)));
120
+ }
121
+ function isDataWidgetDisplayAction(value) {
122
+ if (!isRecord(value) ||
123
+ !isString(value.label) ||
124
+ (value.id !== undefined && typeof value.id !== "string")) {
125
+ return false;
126
+ }
127
+ if (value.type === "link") {
128
+ return (isString(value.href) &&
129
+ (value.icon === undefined || isDataWidgetActionIcon(value.icon)));
130
+ }
131
+ if (value.type === "copy")
132
+ return isString(value.text);
133
+ return false;
53
134
  }
54
135
  function normalizeDisplay(value) {
55
- if (!isRecord(value))
136
+ if (value === undefined)
56
137
  return undefined;
138
+ if (!isRecord(value))
139
+ return null;
140
+ if ((value.sources !== undefined &&
141
+ (!Array.isArray(value.sources) ||
142
+ !value.sources.every(isDataWidgetDataSource))) ||
143
+ (value.actions !== undefined &&
144
+ (!Array.isArray(value.actions) ||
145
+ !value.actions.every(isDataWidgetDisplayAction)))) {
146
+ return null;
147
+ }
57
148
  return {
58
149
  title: typeof value.title === "string" ? value.title : undefined,
59
150
  description: typeof value.description === "string" ? value.description : undefined,
60
- primaryAction: isPrimaryAction(value.primaryAction)
61
- ? value.primaryAction
62
- : undefined,
151
+ primaryAction: normalizePrimaryAction(value.primaryAction),
152
+ sources: value.sources,
153
+ actions: value.actions,
63
154
  };
64
155
  }
65
156
  function assertDataTableWidget(table) {
@@ -107,6 +198,9 @@ export function normalizeDataWidgetResult(value) {
107
198
  const widget = normalizeDataWidgetKind(value.widget);
108
199
  if (!widget)
109
200
  return null;
201
+ const display = normalizeDisplay(value.display);
202
+ if (display === null)
203
+ return null;
110
204
  const table = isDataTableWidget(value.table) ? value.table : undefined;
111
205
  const chartSeries = isDataChartWidget(value.chartSeries)
112
206
  ? value.chartSeries
@@ -115,7 +209,7 @@ export function normalizeDataWidgetResult(value) {
115
209
  widgetId: typeof value.widgetId === "string" ? value.widgetId : undefined,
116
210
  title: typeof value.title === "string" ? value.title : undefined,
117
211
  summary: isRecord(value.summary) ? value.summary : undefined,
118
- display: normalizeDisplay(value.display),
212
+ display,
119
213
  };
120
214
  if (widget === DATA_TABLE_WIDGET) {
121
215
  if (!table)
@@ -201,27 +295,76 @@ const dataChartSeriesDefinitionSchema = z
201
295
  color: z.string().optional(),
202
296
  })
203
297
  .passthrough();
298
+ const dataWidgetActionSchema = z
299
+ .object({
300
+ label: z.string().min(1),
301
+ href: z.string().min(1),
302
+ icon: z.enum(["explore", "camera", "notebook"]).optional(),
303
+ })
304
+ .passthrough();
204
305
  export const dataChartWidgetSchema = z
205
306
  .object({
206
307
  type: z.enum(["bar", "line", "area"]),
207
308
  title: z.string().optional(),
309
+ layout: z.enum(["horizontal", "vertical"]).optional(),
310
+ xAxisTitle: z.string().optional(),
311
+ yAxisTitle: z.string().optional(),
312
+ showValueLabels: z.boolean().optional(),
313
+ contentHeight: z.number().positive().max(1200).optional(),
314
+ contentPadding: z.number().min(0).max(64).optional(),
315
+ labelFontFamily: z.enum(["sans", "serif", "mono"]).optional(),
316
+ labelFontSize: z.number().int().min(8).max(24).optional(),
317
+ axisTitleFontSize: z.number().int().min(8).max(24).optional(),
318
+ axisTitleFontWeight: z.union([z.literal(400), z.literal(500)]).optional(),
319
+ valueLabelFontSize: z.number().int().min(8).max(24).optional(),
320
+ valueLabelFontWeight: z.union([z.literal(400), z.literal(500)]).optional(),
208
321
  xKey: z.string().min(1),
209
322
  series: z.array(dataChartSeriesDefinitionSchema).min(1),
210
323
  data: z.array(z.record(z.string(), z.unknown())),
211
324
  sampled: z.boolean().optional(),
325
+ actions: z.array(dataWidgetActionSchema).optional(),
212
326
  })
213
327
  .passthrough();
214
328
  const primaryActionSchema = z
215
329
  .object({
216
330
  label: z.string().min(1),
217
331
  href: z.string().min(1),
332
+ icon: z.enum(["explore", "camera", "notebook"]).optional(),
333
+ })
334
+ .passthrough();
335
+ const dataWidgetDataSourceSchema = z
336
+ .object({
337
+ id: z.string().optional(),
338
+ label: z.string().min(1),
339
+ href: z.string().min(1).optional(),
218
340
  })
219
341
  .passthrough();
342
+ const dataWidgetDisplayActionSchema = z.discriminatedUnion("type", [
343
+ z
344
+ .object({
345
+ id: z.string().optional(),
346
+ type: z.literal("link"),
347
+ label: z.string().min(1),
348
+ href: z.string().min(1),
349
+ icon: z.enum(["explore", "camera", "notebook"]).optional(),
350
+ })
351
+ .passthrough(),
352
+ z
353
+ .object({
354
+ id: z.string().optional(),
355
+ type: z.literal("copy"),
356
+ label: z.string().min(1),
357
+ text: z.string().min(1),
358
+ })
359
+ .passthrough(),
360
+ ]);
220
361
  const dataWidgetDisplaySchema = z
221
362
  .object({
222
363
  title: z.string().optional(),
223
364
  description: z.string().optional(),
224
365
  primaryAction: primaryActionSchema.optional(),
366
+ sources: z.array(dataWidgetDataSourceSchema).optional(),
367
+ actions: z.array(dataWidgetDisplayActionSchema).optional(),
225
368
  })
226
369
  .passthrough();
227
370
  const dataWidgetBaseSchema = z