@datalayer/agent-runtimes 1.3.84 → 1.3.86

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 (162) hide show
  1. package/lib/chat/ChatFloating.d.ts +5 -4
  2. package/lib/chat/ChatFloating.js +8 -6
  3. package/lib/chat/ChatLanguage.d.ts +17 -0
  4. package/lib/chat/ChatLanguage.js +29 -0
  5. package/lib/chat/assistant/AssistantStage.d.ts +4 -4
  6. package/lib/chat/assistant/AssistantStage.js +4 -2
  7. package/lib/chat/assistant/BalloonParts.d.ts +2 -1
  8. package/lib/chat/assistant/BalloonParts.js +12 -5
  9. package/lib/chat/assistant/BalloonVisual.js +3 -1
  10. package/lib/chat/assistant/ConversationBalloon.d.ts +1 -1
  11. package/lib/chat/assistant/ConversationBalloon.js +3 -2
  12. package/lib/chat/assistant/SpeechBalloon.d.ts +1 -1
  13. package/lib/chat/assistant/SpeechBalloon.js +10 -7
  14. package/lib/chat/assistant/toolLine.d.ts +8 -4
  15. package/lib/chat/assistant/toolLine.js +13 -9
  16. package/lib/chat/base/ChatBase.js +14 -11
  17. package/lib/chat/display/EmptyState.js +3 -1
  18. package/lib/chat/index.d.ts +2 -0
  19. package/lib/chat/index.js +3 -0
  20. package/lib/chat/messages/ChatMessages.js +3 -1
  21. package/lib/chat/messages/TurnFooter.js +3 -1
  22. package/lib/chat/prompt/InputPrompt.js +3 -1
  23. package/lib/chat/prompt/InputPromptLexical.js +3 -1
  24. package/lib/chat/prompt/footer/InPromptFooter.js +3 -1
  25. package/lib/chat/tools/ToolApprovalBanner.js +5 -3
  26. package/lib/chat/tools/ToolApprovalDialog.js +5 -3
  27. package/lib/chat/tools/ToolCallDisplay.js +29 -25
  28. package/lib/chat/words.d.ts +102 -0
  29. package/lib/chat/words.js +460 -0
  30. package/lib/components/a2ui/custom/index.d.ts +39 -0
  31. package/lib/components/a2ui/custom/index.js +95 -0
  32. package/lib/components/a2ui/custom/sandbox.d.ts +73 -0
  33. package/lib/components/a2ui/custom/sandbox.js +188 -0
  34. package/lib/components/a2ui/datalayer/index.d.ts +1 -1
  35. package/lib/components/a2ui/datalayer/index.js +1 -1
  36. package/lib/components/a2ui/datalayer/schema.d.ts +10 -0
  37. package/lib/components/a2ui/datalayer/schema.js +12 -1
  38. package/lib/components/a2ui/index.d.ts +1 -0
  39. package/lib/components/a2ui/index.js +1 -0
  40. package/lib/components/a2ui/visibleWhen.d.ts +12 -1
  41. package/lib/components/a2ui/visibleWhen.js +24 -3
  42. package/lib/components/inspector/AgentInspector.d.ts +25 -44
  43. package/lib/components/inspector/AgentInspector.js +27 -215
  44. package/lib/components/inspector/AgentInspectorDialog.d.ts +6 -6
  45. package/lib/components/inspector/AgentInspectorDialog.js +2 -2
  46. package/lib/components/inspector/a2aSpans.d.ts +51 -0
  47. package/lib/components/inspector/a2aSpans.js +373 -0
  48. package/lib/components/inspector/agentSpans.d.ts +120 -0
  49. package/lib/components/inspector/agentSpans.js +253 -0
  50. package/lib/components/inspector/chatSpans.d.ts +36 -0
  51. package/lib/components/inspector/chatSpans.js +50 -0
  52. package/lib/components/inspector/classify.d.ts +11 -8
  53. package/lib/components/inspector/classify.js +23 -24
  54. package/lib/components/inspector/index.d.ts +7 -7
  55. package/lib/components/inspector/index.js +7 -7
  56. package/lib/components/teams/A2ATeamGraph.d.ts +117 -22
  57. package/lib/components/teams/A2ATeamGraph.js +217 -97
  58. package/lib/components/teams/SceneTranscript.d.ts +29 -0
  59. package/lib/components/teams/SceneTranscript.js +54 -0
  60. package/lib/components/teams/SceneView.d.ts +41 -0
  61. package/lib/components/teams/SceneView.js +28 -0
  62. package/lib/components/teams/index.d.ts +4 -0
  63. package/lib/components/teams/index.js +4 -0
  64. package/lib/components/teams/sceneStage.d.ts +120 -0
  65. package/lib/components/teams/sceneStage.js +170 -0
  66. package/lib/components/teams/sceneTranscript.d.ts +74 -0
  67. package/lib/components/teams/sceneTranscript.js +294 -0
  68. package/lib/components/teams/teamConnections.d.ts +2 -2
  69. package/lib/components/teams/teamConnections.js +3 -3
  70. package/lib/components/teams/useA2ATeam.d.ts +94 -22
  71. package/lib/components/teams/useA2ATeam.js +356 -140
  72. package/lib/examples/AgentA2ATeamExample.d.ts +10 -9
  73. package/lib/examples/AgentA2ATeamExample.js +70 -60
  74. package/lib/examples/AssistantExample.js +2 -2
  75. package/lib/examples/ScenesExample.d.ts +26 -0
  76. package/lib/examples/ScenesExample.js +241 -0
  77. package/lib/examples/example-selector.js +1 -0
  78. package/lib/examples/exampleGroups.js +3 -0
  79. package/lib/examples/index.d.ts +1 -0
  80. package/lib/examples/index.js +1 -0
  81. package/lib/examples/main.js +4 -0
  82. package/lib/loop/apps/AppComposer.d.ts +2 -1
  83. package/lib/loop/apps/AppComposer.js +6 -3
  84. package/lib/loop/apps/AppRenderer.d.ts +2 -1
  85. package/lib/loop/apps/AppRenderer.js +34 -25
  86. package/lib/loop/apps/appspec.d.ts +11 -1
  87. package/lib/loop/apps/appspec.js +115 -1
  88. package/lib/loop/apps/checks.d.ts +8 -0
  89. package/lib/loop/apps/checks.js +106 -4
  90. package/lib/loop/apps/customComponents.d.ts +41 -0
  91. package/lib/loop/apps/customComponents.js +260 -0
  92. package/lib/loop/apps/hostTools.d.ts +8 -1
  93. package/lib/loop/apps/hostTools.js +9 -0
  94. package/lib/loop/apps/index.d.ts +1 -0
  95. package/lib/loop/apps/index.js +1 -0
  96. package/lib/loop/core/a2uiComponents.d.ts +10 -0
  97. package/lib/loop/core/a2uiComponents.js +15 -0
  98. package/lib/loop/core/index.d.ts +1 -0
  99. package/lib/loop/core/index.js +3 -0
  100. package/lib/loop/embed/AppEmbed.d.ts +11 -3
  101. package/lib/loop/embed/AppEmbed.js +42 -16
  102. package/lib/loop/embed/element.d.ts +5 -0
  103. package/lib/loop/embed/element.js +61 -5
  104. package/lib/loop/embed/embedConfig.d.ts +8 -0
  105. package/lib/loop/embed/embedConfig.js +18 -0
  106. package/lib/loop/embed/hostBridge.d.ts +28 -2
  107. package/lib/loop/embed/hostBridge.js +22 -2
  108. package/lib/loop/index.d.ts +4 -3
  109. package/lib/loop/index.js +4 -3
  110. package/lib/loop/plugins/a2ui-surface/InlineSurface.d.ts +7 -1
  111. package/lib/loop/plugins/a2ui-surface/InlineSurface.js +7 -2
  112. package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +4 -1
  113. package/lib/loop/plugins/a2ui-surface/ownComponents.d.ts +6 -0
  114. package/lib/loop/plugins/a2ui-surface/ownComponents.js +30 -0
  115. package/lib/loop/plugins/app-components/index.d.ts +26 -0
  116. package/lib/loop/plugins/app-components/index.js +56 -0
  117. package/lib/loop/plugins/app-elements/AppElements.js +4 -1
  118. package/lib/loop/plugins/app-page/AppPage.d.ts +9 -0
  119. package/lib/loop/plugins/app-page/AppPage.js +106 -8
  120. package/lib/loop/plugins/app-page/appPageModel.d.ts +17 -1
  121. package/lib/loop/plugins/app-page/appPageModel.js +120 -4
  122. package/lib/loop/plugins/app-page/index.d.ts +1 -0
  123. package/lib/loop/plugins/app-page/index.js +1 -0
  124. package/lib/loop/plugins/app-page/pageRun.d.ts +46 -0
  125. package/lib/loop/plugins/app-page/pageRun.js +111 -0
  126. package/lib/loop/plugins/assistant/index.js +8 -6
  127. package/lib/loop/plugins/chat/ChatView.js +6 -4
  128. package/lib/loop/plugins/chat/index.d.ts +1 -1
  129. package/lib/loop/plugins/chat/index.js +2 -1
  130. package/lib/models/PageTag.d.ts +1 -1
  131. package/lib/runtimes/browser/a2aPeer.d.ts +2 -1
  132. package/lib/specs/actions.js +78 -1
  133. package/lib/specs/apps.d.ts +5 -0
  134. package/lib/specs/apps.js +1384 -231
  135. package/lib/specs/appspecSchema.js +191 -1
  136. package/lib/specs/index.d.ts +1 -0
  137. package/lib/specs/index.js +1 -0
  138. package/lib/specs/mcpServers.js +8 -2
  139. package/lib/specs/scenes.d.ts +21 -0
  140. package/lib/specs/scenes.js +1191 -0
  141. package/lib/specs/teams/teams.d.ts +3 -0
  142. package/lib/specs/teams/teams.js +249 -0
  143. package/lib/types/agentspecs.d.ts +70 -0
  144. package/lib/types/chat.d.ts +6 -5
  145. package/lib/types/index.d.ts +1 -0
  146. package/lib/types/index.js +1 -0
  147. package/lib/types/scenes.d.ts +207 -0
  148. package/lib/types/scenes.js +5 -0
  149. package/lib/types/teams.d.ts +13 -2
  150. package/package.json +4 -4
  151. package/scripts/codegen/generate_agents.py +1 -0
  152. package/scripts/codegen/generate_apps.py +4 -2
  153. package/scripts/codegen/generate_scenes.py +301 -0
  154. package/scripts/codegen/generate_teams.py +15 -2
  155. package/lib/components/inspector/JsonTree.d.ts +0 -24
  156. package/lib/components/inspector/JsonTree.js +0 -89
  157. package/lib/components/inspector/a2aInspect.d.ts +0 -56
  158. package/lib/components/inspector/a2aInspect.js +0 -478
  159. package/lib/components/inspector/agentInspector.d.ts +0 -179
  160. package/lib/components/inspector/agentInspector.js +0 -267
  161. package/lib/components/inspector/chatInspect.d.ts +0 -38
  162. package/lib/components/inspector/chatInspect.js +0 -65
@@ -230,6 +230,82 @@ export const APPSPEC_SCHEMA = {
230
230
  title: 'AppCriterion',
231
231
  type: 'object',
232
232
  },
233
+ AppCustomComponent: {
234
+ additionalProperties: false,
235
+ description: "A component the developer writes (LOOP P-17), an A2UI component of this\napplication only: the catalog grows for it, it does not open.\n\nReviewed like any component of the catalog — its properties a JSON\nSchema, what it shows and sends bindings into the page's data — and drawn\nin a sandboxed frame of no origin, its module loaded from `source` and\nnothing else: what it is given is its properties and data, and what it\ngives back is what it sends.",
236
+ properties: {
237
+ name: {
238
+ description: "Its name on a surface, as a catalog component's (`Gauge`); none of the catalog's own",
239
+ pattern: '^[A-Z][A-Za-z0-9]{0,63}$',
240
+ title: 'Name',
241
+ type: 'string',
242
+ },
243
+ description: {
244
+ description: 'What it is for, in a sentence: what the palette says',
245
+ minLength: 1,
246
+ title: 'Description',
247
+ type: 'string',
248
+ },
249
+ props: {
250
+ additionalProperties: true,
251
+ description: 'Its properties, as the JSON Schema of an object: each typed `string`, `integer`, `number`, `boolean`, `array` or `object`, or an `enum` of words, with its `title`, `description` and `default`; `required` among them',
252
+ title: 'Props',
253
+ type: 'object',
254
+ },
255
+ shows: {
256
+ description: "What it shows from the page's data: each a binding, given a path or a value in place",
257
+ items: {
258
+ type: 'string',
259
+ },
260
+ title: 'Shows',
261
+ type: 'array',
262
+ },
263
+ sends: {
264
+ description: 'What it sends back: each a binding it writes, then its `action` dispatched',
265
+ items: {
266
+ type: 'string',
267
+ },
268
+ title: 'Sends',
269
+ type: 'array',
270
+ },
271
+ source: {
272
+ description: "The address of its module, a built ES module whose default export draws it (`export default function (root, {props, send})`): over `https://`, or `http://localhost` while it is written. A module of the application's folder waits for its packaging (LOOP P-29)",
273
+ title: 'Source',
274
+ type: 'string',
275
+ },
276
+ integrity: {
277
+ default: '',
278
+ description: 'The module as it was reviewed: its Subresource Integrity hash (`sha384-…`); a module that differs is not drawn. Any module at the address when unsaid',
279
+ title: 'Integrity',
280
+ type: 'string',
281
+ },
282
+ height: {
283
+ default: 240,
284
+ description: 'Its height on the page, in pixels',
285
+ maximum: 2000,
286
+ minimum: 40,
287
+ title: 'Height',
288
+ type: 'integer',
289
+ },
290
+ example: {
291
+ anyOf: [
292
+ {
293
+ additionalProperties: true,
294
+ type: 'object',
295
+ },
296
+ {
297
+ type: 'null',
298
+ },
299
+ ],
300
+ default: null,
301
+ description: 'A configuration of it its schema accepts: what the palette previews',
302
+ title: 'Example',
303
+ },
304
+ },
305
+ required: ['name', 'description', 'source'],
306
+ title: 'AppCustomComponent',
307
+ type: 'object',
308
+ },
233
309
  AppDecision: {
234
310
  additionalProperties: false,
235
311
  description: 'What a decision application decides.',
@@ -475,6 +551,14 @@ export const APPSPEC_SCHEMA = {
475
551
  title: 'Components',
476
552
  type: 'array',
477
553
  },
554
+ custom_components: {
555
+ description: "Components its developer wrote (LOOP P-17), of this application only: each named, its props a JSON Schema, its module's address; placed, shown and drawn as the catalog's own",
556
+ items: {
557
+ $ref: '#/$defs/AppCustomComponent',
558
+ },
559
+ title: 'Custom Components',
560
+ type: 'array',
561
+ },
478
562
  surface: {
479
563
  anyOf: [
480
564
  {
@@ -487,6 +571,18 @@ export const APPSPEC_SCHEMA = {
487
571
  default: null,
488
572
  description: 'The component tree, when there is one',
489
573
  },
574
+ page: {
575
+ anyOf: [
576
+ {
577
+ $ref: '#/$defs/AppPage',
578
+ },
579
+ {
580
+ type: 'null',
581
+ },
582
+ ],
583
+ default: null,
584
+ description: "A widget's page written in its code (`@app.page`, LOOP P-05): its inputs as a form, its outputs as values; run again as an input changes, its outputs shown in place. None when unsaid",
585
+ },
490
586
  assistant: {
491
587
  anyOf: [
492
588
  {
@@ -669,6 +765,89 @@ export const APPSPEC_SCHEMA = {
669
765
  title: 'AppOptionTranslation',
670
766
  type: 'object',
671
767
  },
768
+ AppPage: {
769
+ additionalProperties: false,
770
+ description: "A widget's page written in its code (LOOP P-05): `@app.page`.\n\nIts inputs are a form, drawn on the page; as one changes, the function\nof its code runs again on them and the page shows what it returned, in\nplace. Without its file nothing runs it, and validation says so.",
771
+ properties: {
772
+ function: {
773
+ description: 'The function of its code that runs the page',
774
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*$',
775
+ title: 'Function',
776
+ type: 'string',
777
+ },
778
+ inputs: {
779
+ additionalProperties: true,
780
+ description: 'Its inputs: the JSON Schema of a form, an object of named fields, each with its `title` and its `default`; on the page at `/inputs/<name>`, checked by the runtime against the same schema',
781
+ title: 'Inputs',
782
+ type: 'object',
783
+ },
784
+ inputs_ui: {
785
+ anyOf: [
786
+ {
787
+ additionalProperties: true,
788
+ type: 'object',
789
+ },
790
+ {
791
+ type: 'null',
792
+ },
793
+ ],
794
+ default: null,
795
+ description: 'How its inputs are drawn, as `interface.settings_ui` draws the settings: a uiSchema by field name',
796
+ title: 'Inputs Ui',
797
+ },
798
+ outputs: {
799
+ description: 'What it shows for its inputs, in order, each at `/outputs/<name>`',
800
+ items: {
801
+ $ref: '#/$defs/AppPageOutput',
802
+ },
803
+ minItems: 1,
804
+ title: 'Outputs',
805
+ type: 'array',
806
+ },
807
+ live: {
808
+ default: true,
809
+ description: 'Whether it runs again as an input changes; `false`: when the person presses Run',
810
+ title: 'Live',
811
+ type: 'boolean',
812
+ },
813
+ },
814
+ required: ['function', 'inputs', 'outputs'],
815
+ title: 'AppPage',
816
+ type: 'object',
817
+ },
818
+ AppPageOutput: {
819
+ additionalProperties: false,
820
+ description: 'One thing a page shows for its inputs (LOOP P-05): a value, drawn with a component.',
821
+ properties: {
822
+ name: {
823
+ description: 'Its name: what its code returns it under, and where the page shows it (`/outputs/<name>`)',
824
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*$',
825
+ title: 'Name',
826
+ type: 'string',
827
+ },
828
+ title: {
829
+ default: '',
830
+ description: 'What a person reads above it; none when unsaid',
831
+ title: 'Title',
832
+ type: 'string',
833
+ },
834
+ component: {
835
+ default: 'Text',
836
+ description: "What draws it: `Text` (words, unless said), `Image` (an address), `Table` (rows) or `Chart` (points), or a component of the application's own (`interface.custom_components`, LOOP P-17), its value what it shows first",
837
+ title: 'Component',
838
+ type: 'string',
839
+ },
840
+ props: {
841
+ additionalProperties: true,
842
+ description: "The component's other properties: a Table's `columns`, a Chart's `kind`, `x` and `y`",
843
+ title: 'Props',
844
+ type: 'object',
845
+ },
846
+ },
847
+ required: ['name'],
848
+ title: 'AppPageOutput',
849
+ type: 'object',
850
+ },
672
851
  AppPermissions: {
673
852
  additionalProperties: false,
674
853
  description: 'What the application may reach beside its connections. Nothing, unless said.',
@@ -1371,7 +1550,7 @@ export const APPSPEC_SCHEMA = {
1371
1550
  },
1372
1551
  HostBridge: {
1373
1552
  additionalProperties: false,
1374
- description: "What the host page and the application say to each other (LOOP D-10).\n\nThe values of the host it reads (`context`: `user`, `page`, or a name of\nthe host's own), through the tool `host_context`; the functions of the\nhost it may call, each through `host_<name>`. Every one of these tools is\ndecided by a rule that names it, as any tool is: one no rule names is\nleft to the person.",
1553
+ description: "What the host page and the application say to each other (LOOP D-10).\n\nThe values of the host it reads (`context`: `user`, `page`, or a name of\nthe host's own), through the tool `host_context`; the functions of the\nhost it may call, each through `host_<name>`. Every one of these tools is\ndecided by a rule that names it, as any tool is: one no rule names is\nleft to the person.\n\nWho its user is (`user`, LOOP D-21): what the page says (`claimed`), or\nonly what the host's server signed (`signed`) — a short token, HS256\nwith the deployment's secret, naming `sub`, `name` and `exp` at most an\nhour away. An application that acts in each user's name, or shows data\nthat is theirs, says `signed`.",
1375
1554
  properties: {
1376
1555
  context: {
1377
1556
  description: "The host's values it reads: `user`, `page`, or names of the host's own",
@@ -1389,6 +1568,11 @@ export const APPSPEC_SCHEMA = {
1389
1568
  title: 'Functions',
1390
1569
  type: 'array',
1391
1570
  },
1571
+ user: {
1572
+ $ref: '#/$defs/HostUser',
1573
+ default: 'claimed',
1574
+ description: "Who its user is: `claimed`, what the page says; `signed`, only a token the host's server signed with the deployment's secret, the unsigned one refused",
1575
+ },
1392
1576
  },
1393
1577
  title: 'HostBridge',
1394
1578
  type: 'object',
@@ -1418,6 +1602,12 @@ export const APPSPEC_SCHEMA = {
1418
1602
  title: 'HostFunction',
1419
1603
  type: 'object',
1420
1604
  },
1605
+ HostUser: {
1606
+ description: "What the host page's word on its visitor is worth (LOOP D-21).",
1607
+ enum: ['claimed', 'signed'],
1608
+ title: 'HostUser',
1609
+ type: 'string',
1610
+ },
1421
1611
  HostedDeployment: {
1422
1612
  additionalProperties: false,
1423
1613
  description: 'The application at an address of its own.',
@@ -27,5 +27,6 @@ export * from './gates';
27
27
  export * from './tracks';
28
28
  export * from './ops';
29
29
  export * from './apps';
30
+ export * from './scenes';
30
31
  export * from './actions';
31
32
  export * from './appspecSchema';
@@ -31,5 +31,6 @@ export * from './gates';
31
31
  export * from './tracks';
32
32
  export * from './ops';
33
33
  export * from './apps';
34
+ export * from './scenes';
34
35
  export * from './actions';
35
36
  export * from './appspecSchema';
@@ -68,12 +68,18 @@ export const EARTHDATA_MCP_SERVER_0_0_1 = {
68
68
  emoji: '🌍',
69
69
  url: '',
70
70
  command: 'npx',
71
- args: ['-y', 'earthdata-mcp-server'],
71
+ args: [
72
+ '-y',
73
+ 'mcp-remote',
74
+ 'https://mcp.datalayer.run/mcp?only=earthdata',
75
+ '--header',
76
+ 'Authorization: Bearer ${DATALAYER_API_KEY}',
77
+ ],
72
78
  transport: 'stdio',
73
79
  enabled: true,
74
80
  isAvailable: false,
75
81
  tools: [],
76
- requiredEnvVars: ['EARTHDATA_USERNAME:0.0.1', 'EARTHDATA_PASSWORD:0.0.1'],
82
+ requiredEnvVars: ['DATALAYER_API_KEY:0.0.1'],
77
83
  };
78
84
  export const EURUS_MCP_SERVER_0_0_1 = {
79
85
  id: 'eurus',
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Scene Catalog.
3
+ *
4
+ * A team, staged: the setting, the script, the stage directions, the
5
+ * audience, the rehearsal and where it plays. The cast is resolved.
6
+ *
7
+ * This file is AUTO-GENERATED from YAML specifications.
8
+ * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
9
+ */
10
+ import type { SceneSpec } from '../types/scenes';
11
+ export declare const CROP_MONITORING_SCENE_0_0_1: SceneSpec;
12
+ export declare const DISASTER_ASSESSMENT_SCENE_0_0_1: SceneSpec;
13
+ export declare const MONTH_END_CLOSE_SCENE_0_0_1: SceneSpec;
14
+ export declare const SALES_AND_ACCOUNTING_SCENE_0_0_1: SceneSpec;
15
+ export declare const SCENE_CATALOGUE: Record<string, SceneSpec>;
16
+ /** A scene, by `id` or `id:version`, or undefined. */
17
+ export declare function getSceneSpec(ref: string): SceneSpec | undefined;
18
+ /** Every scene of the catalogue, in the catalogue's order, or those carrying a tag. */
19
+ export declare function listSceneSpecs(tag?: string): SceneSpec[];
20
+ /** Every scene that stages a team, by its id with or without a version. */
21
+ export declare function scenesStaging(teamId: string): SceneSpec[];