@datalayer/agent-runtimes 1.3.84 → 1.3.85

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 (141) 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 +4 -4
  57. package/lib/components/teams/SceneTranscript.d.ts +29 -0
  58. package/lib/components/teams/SceneTranscript.js +54 -0
  59. package/lib/components/teams/SceneView.d.ts +41 -0
  60. package/lib/components/teams/SceneView.js +28 -0
  61. package/lib/components/teams/index.d.ts +3 -0
  62. package/lib/components/teams/index.js +3 -0
  63. package/lib/components/teams/sceneTranscript.d.ts +74 -0
  64. package/lib/components/teams/sceneTranscript.js +294 -0
  65. package/lib/components/teams/teamConnections.d.ts +2 -2
  66. package/lib/components/teams/teamConnections.js +3 -3
  67. package/lib/components/teams/useA2ATeam.d.ts +4 -4
  68. package/lib/components/teams/useA2ATeam.js +50 -46
  69. package/lib/examples/AgentA2ATeamExample.d.ts +10 -9
  70. package/lib/examples/AgentA2ATeamExample.js +70 -60
  71. package/lib/examples/AssistantExample.js +2 -2
  72. package/lib/loop/apps/AppComposer.d.ts +2 -1
  73. package/lib/loop/apps/AppComposer.js +6 -3
  74. package/lib/loop/apps/AppRenderer.d.ts +2 -1
  75. package/lib/loop/apps/AppRenderer.js +34 -25
  76. package/lib/loop/apps/appspec.d.ts +11 -1
  77. package/lib/loop/apps/appspec.js +115 -1
  78. package/lib/loop/apps/checks.d.ts +8 -0
  79. package/lib/loop/apps/checks.js +106 -4
  80. package/lib/loop/apps/customComponents.d.ts +41 -0
  81. package/lib/loop/apps/customComponents.js +260 -0
  82. package/lib/loop/apps/hostTools.d.ts +8 -1
  83. package/lib/loop/apps/hostTools.js +9 -0
  84. package/lib/loop/apps/index.d.ts +1 -0
  85. package/lib/loop/apps/index.js +1 -0
  86. package/lib/loop/core/a2uiComponents.d.ts +10 -0
  87. package/lib/loop/core/a2uiComponents.js +15 -0
  88. package/lib/loop/core/index.d.ts +1 -0
  89. package/lib/loop/core/index.js +3 -0
  90. package/lib/loop/embed/AppEmbed.d.ts +11 -3
  91. package/lib/loop/embed/AppEmbed.js +42 -16
  92. package/lib/loop/embed/element.d.ts +5 -0
  93. package/lib/loop/embed/element.js +61 -5
  94. package/lib/loop/embed/embedConfig.d.ts +8 -0
  95. package/lib/loop/embed/embedConfig.js +18 -0
  96. package/lib/loop/embed/hostBridge.d.ts +28 -2
  97. package/lib/loop/embed/hostBridge.js +22 -2
  98. package/lib/loop/index.d.ts +4 -3
  99. package/lib/loop/index.js +4 -3
  100. package/lib/loop/plugins/a2ui-surface/InlineSurface.d.ts +7 -1
  101. package/lib/loop/plugins/a2ui-surface/InlineSurface.js +7 -2
  102. package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +4 -1
  103. package/lib/loop/plugins/a2ui-surface/ownComponents.d.ts +6 -0
  104. package/lib/loop/plugins/a2ui-surface/ownComponents.js +30 -0
  105. package/lib/loop/plugins/app-components/index.d.ts +26 -0
  106. package/lib/loop/plugins/app-components/index.js +56 -0
  107. package/lib/loop/plugins/app-elements/AppElements.js +4 -1
  108. package/lib/loop/plugins/app-page/AppPage.d.ts +9 -0
  109. package/lib/loop/plugins/app-page/AppPage.js +106 -8
  110. package/lib/loop/plugins/app-page/appPageModel.d.ts +17 -1
  111. package/lib/loop/plugins/app-page/appPageModel.js +120 -4
  112. package/lib/loop/plugins/app-page/index.d.ts +1 -0
  113. package/lib/loop/plugins/app-page/index.js +1 -0
  114. package/lib/loop/plugins/app-page/pageRun.d.ts +46 -0
  115. package/lib/loop/plugins/app-page/pageRun.js +111 -0
  116. package/lib/loop/plugins/assistant/index.js +8 -6
  117. package/lib/loop/plugins/chat/ChatView.js +6 -4
  118. package/lib/loop/plugins/chat/index.d.ts +1 -1
  119. package/lib/loop/plugins/chat/index.js +2 -1
  120. package/lib/models/PageTag.d.ts +1 -1
  121. package/lib/runtimes/browser/a2aPeer.d.ts +2 -1
  122. package/lib/specs/actions.js +78 -1
  123. package/lib/specs/apps.d.ts +5 -0
  124. package/lib/specs/apps.js +1384 -231
  125. package/lib/specs/appspecSchema.js +191 -1
  126. package/lib/specs/teams/teams.d.ts +3 -0
  127. package/lib/specs/teams/teams.js +249 -0
  128. package/lib/types/agentspecs.d.ts +70 -0
  129. package/lib/types/chat.d.ts +6 -5
  130. package/lib/types/teams.d.ts +13 -2
  131. package/package.json +2 -2
  132. package/scripts/codegen/generate_apps.py +4 -2
  133. package/scripts/codegen/generate_teams.py +15 -2
  134. package/lib/components/inspector/JsonTree.d.ts +0 -24
  135. package/lib/components/inspector/JsonTree.js +0 -89
  136. package/lib/components/inspector/a2aInspect.d.ts +0 -56
  137. package/lib/components/inspector/a2aInspect.js +0 -478
  138. package/lib/components/inspector/agentInspector.d.ts +0 -179
  139. package/lib/components/inspector/agentInspector.js +0 -267
  140. package/lib/components/inspector/chatInspect.d.ts +0 -38
  141. 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.',
@@ -10,7 +10,10 @@ export declare const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1: TeamSpec;
10
10
  export declare const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1: TeamSpec;
11
11
  export declare const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1: TeamSpec;
12
12
  export declare const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1: TeamSpec;
13
+ export declare const CROP_MONITORING_TEAM_SPEC_0_0_1: TeamSpec;
14
+ export declare const DISASTER_ASSESSMENT_TEAM_SPEC_0_0_1: TeamSpec;
13
15
  export declare const JUPYTER_TEAM_SPEC_0_0_1: TeamSpec;
16
+ export declare const MONTH_END_CLOSE_TEAM_SPEC_0_0_1: TeamSpec;
14
17
  export declare const NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1: TeamSpec;
15
18
  export declare const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1: TeamSpec;
16
19
  export declare const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1: TeamSpec;
@@ -704,6 +704,187 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
704
704
  storage: 's3://reports/sales-analytics/',
705
705
  },
706
706
  };
707
+ export const CROP_MONITORING_TEAM_SPEC_0_0_1 = {
708
+ id: 'crop-monitoring',
709
+ version: '0.0.1',
710
+ name: 'Crop monitoring',
711
+ description: `One agent, its data: Crop monitoring follows crop vigour and growth over a season from the satellite imagery NASA Earthdata holds, and flags the fields that need attention.`,
712
+ tags: [
713
+ 'example',
714
+ 'scene',
715
+ 'earth-observation',
716
+ 'agriculture',
717
+ 'earthdata',
718
+ 'a2a',
719
+ ],
720
+ enabled: true,
721
+ icon: 'telescope',
722
+ emoji: '🛰️',
723
+ color: '#1a7f37',
724
+ agentSpecId: '',
725
+ orchestrationProtocol: 'a2a',
726
+ executionMode: 'supervisor',
727
+ supervisor: {
728
+ name: 'Crop monitoring',
729
+ ref: '',
730
+ app: 'crop-monitoring:0.0.1',
731
+ model: '',
732
+ goal: ``,
733
+ instructions: ``,
734
+ approval: 'auto',
735
+ canTerminate: true,
736
+ },
737
+ routingInstructions: `Crop monitoring answers every request from the imagery itself, one search at a time, and reports what the granules show without adding to it.`,
738
+ entry: 'crop-monitoring',
739
+ suggestions: [
740
+ {
741
+ text: 'How has crop vigour evolved over the last three months around 45.5N, 10.2E?',
742
+ emoji: '🌱',
743
+ },
744
+ {
745
+ text: 'Which fields around 41.9N, 12.5E show a drop in vegetation this month compared with last?',
746
+ emoji: '🌾',
747
+ },
748
+ {
749
+ text: 'Which datasets and granules cover the Po valley for June 2026?',
750
+ emoji: '🛰️',
751
+ },
752
+ ],
753
+ delegation: {
754
+ maxDepth: 0,
755
+ allowPeerDelegation: false,
756
+ includeGeneralPurpose: false,
757
+ },
758
+ context: { sharing: 'shared' },
759
+ validation: { timeout: '300s', retryOnFailure: false, maxRetries: 0 },
760
+ agents: [
761
+ {
762
+ id: 'crop-monitoring',
763
+ name: '',
764
+ ref: '',
765
+ app: 'crop-monitoring:0.0.1',
766
+ runsIn: 'runtime',
767
+ role: 'initiator',
768
+ goal: `Take the person's field and period, search the imagery that covers them, and report the vigour, the growth and the fields to watch.`,
769
+ dependsOn: [],
770
+ subagents: [],
771
+ model: '',
772
+ mcpServer: '',
773
+ tools: [],
774
+ trigger: '',
775
+ approval: 'auto',
776
+ },
777
+ ],
778
+ };
779
+ export const DISASTER_ASSESSMENT_TEAM_SPEC_0_0_1 = {
780
+ id: 'disaster-assessment',
781
+ version: '0.0.1',
782
+ name: 'Disaster assessment',
783
+ description: `An event desk in the browser that gets the area a disaster affected and the damage from Disaster assessment, and what changed on the ground from Change detection, each on a runtime over A2A, each reading NASA Earthdata. Event response takes the event and reports; the two others read the imagery and answer.`,
784
+ tags: [
785
+ 'example',
786
+ 'scene',
787
+ 'earth-observation',
788
+ 'disaster',
789
+ 'insurance',
790
+ 'earthdata',
791
+ 'a2a',
792
+ ],
793
+ enabled: true,
794
+ icon: 'pulse',
795
+ emoji: '🛰️',
796
+ color: '#cf222e',
797
+ agentSpecId: '',
798
+ orchestrationProtocol: 'a2a',
799
+ executionMode: 'supervisor',
800
+ supervisor: {
801
+ name: 'Event response',
802
+ ref: '',
803
+ app: 'event-response:0.0.1',
804
+ model: '',
805
+ goal: ``,
806
+ instructions: ``,
807
+ approval: 'auto',
808
+ canTerminate: true,
809
+ },
810
+ routingInstructions: `Event response asks Disaster assessment for the area and the damage, and Change detection for the change on the ground, one request each, and reports what they answer without adding to it.`,
811
+ entry: 'event-response',
812
+ suggestions: [
813
+ {
814
+ text: 'Valencia, Spain, was flooded on 29 October 2024. What was affected, and what changed?',
815
+ emoji: '🌊',
816
+ },
817
+ {
818
+ text: 'Fires burned around Los Angeles from 7 January 2025. What was affected, and what changed?',
819
+ emoji: '🔥',
820
+ },
821
+ {
822
+ text: 'The Ahr valley was hit by a storm on 14 July 2021. What was affected, and what changed?',
823
+ emoji: '🌧️',
824
+ },
825
+ ],
826
+ delegation: {
827
+ maxDepth: 1,
828
+ allowPeerDelegation: true,
829
+ includeGeneralPurpose: false,
830
+ },
831
+ context: { sharing: 'shared' },
832
+ validation: { timeout: '600s', retryOnFailure: false, maxRetries: 0 },
833
+ agents: [
834
+ {
835
+ id: 'event-response',
836
+ name: '',
837
+ ref: '',
838
+ app: 'event-response:0.0.1',
839
+ runsIn: 'browser',
840
+ talksTo: [
841
+ { member: 'disaster-assessment', over: 'a2a' },
842
+ { member: 'change-detection', over: 'a2a' },
843
+ ],
844
+ role: 'initiator',
845
+ goal: `Take the person's event, ask Disaster assessment and Change detection for it, and report what they answered.`,
846
+ dependsOn: [],
847
+ subagents: [],
848
+ model: '',
849
+ mcpServer: '',
850
+ tools: [],
851
+ trigger: '',
852
+ approval: 'auto',
853
+ },
854
+ {
855
+ id: 'disaster-assessment',
856
+ name: '',
857
+ ref: '',
858
+ app: 'disaster-assessment:0.0.1',
859
+ runsIn: 'runtime',
860
+ role: 'contributor',
861
+ goal: `Estimate the area the event affected and the extent of the damage from the imagery before and after it, over A2A.`,
862
+ dependsOn: [],
863
+ subagents: [],
864
+ model: '',
865
+ mcpServer: '',
866
+ tools: [],
867
+ trigger: '',
868
+ approval: 'auto',
869
+ },
870
+ {
871
+ id: 'change-detection',
872
+ name: '',
873
+ ref: '',
874
+ app: 'change-detection:0.0.1',
875
+ runsIn: 'runtime',
876
+ role: 'contributor',
877
+ goal: `Find what changed on the ground between the two dates from the imagery, over A2A.`,
878
+ dependsOn: [],
879
+ subagents: [],
880
+ model: '',
881
+ mcpServer: '',
882
+ tools: [],
883
+ trigger: '',
884
+ approval: 'auto',
885
+ },
886
+ ],
887
+ };
707
888
  export const JUPYTER_TEAM_SPEC_0_0_1 = {
708
889
  id: 'jupyter',
709
890
  version: '0.0.1',
@@ -928,6 +1109,71 @@ export const JUPYTER_TEAM_SPEC_0_0_1 = {
928
1109
  storage: '',
929
1110
  },
930
1111
  };
1112
+ export const MONTH_END_CLOSE_TEAM_SPEC_0_0_1 = {
1113
+ id: 'month-end-close',
1114
+ version: '0.0.1',
1115
+ name: 'Month-end close',
1116
+ description: `One agent, its data: Month-end close drives the close from the Odoo books, which it only reads — the checklist, the accruals to book, the reconciliation gaps that remain.`,
1117
+ tags: ['example', 'scene', 'accounting', 'finance', 'odoo', 'a2a'],
1118
+ enabled: true,
1119
+ icon: 'sync',
1120
+ emoji: '🧾',
1121
+ color: '#bf8700',
1122
+ agentSpecId: '',
1123
+ orchestrationProtocol: 'a2a',
1124
+ executionMode: 'supervisor',
1125
+ supervisor: {
1126
+ name: 'Month-end close',
1127
+ ref: '',
1128
+ app: 'month-end-close:0.0.1',
1129
+ model: '',
1130
+ goal: ``,
1131
+ instructions: ``,
1132
+ approval: 'auto',
1133
+ canTerminate: true,
1134
+ },
1135
+ routingInstructions: `Month-end close answers every request from the books itself, one read at a time, and reports what the books hold without adding to it.`,
1136
+ entry: 'month-end-close',
1137
+ suggestions: [
1138
+ {
1139
+ text: 'Where does the month-end close stand for last month? Give me the checklist.',
1140
+ emoji: '☑️',
1141
+ },
1142
+ {
1143
+ text: 'Which accruals should be booked for last month, and for how much?',
1144
+ emoji: '🧾',
1145
+ },
1146
+ {
1147
+ text: 'Which bank lines and open items are still unreconciled for last month?',
1148
+ emoji: '🏦',
1149
+ },
1150
+ ],
1151
+ delegation: {
1152
+ maxDepth: 0,
1153
+ allowPeerDelegation: false,
1154
+ includeGeneralPurpose: false,
1155
+ },
1156
+ context: { sharing: 'shared' },
1157
+ validation: { timeout: '300s', retryOnFailure: false, maxRetries: 0 },
1158
+ agents: [
1159
+ {
1160
+ id: 'month-end-close',
1161
+ name: '',
1162
+ ref: '',
1163
+ app: 'month-end-close:0.0.1',
1164
+ runsIn: 'runtime',
1165
+ role: 'initiator',
1166
+ goal: `Take the person's request, read the period's books, and report where the close stands: what is done, what is to book, what is still open.`,
1167
+ dependsOn: [],
1168
+ subagents: [],
1169
+ model: '',
1170
+ mcpServer: '',
1171
+ tools: [],
1172
+ trigger: '',
1173
+ approval: 'auto',
1174
+ },
1175
+ ],
1176
+ };
931
1177
  export const NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1 = {
932
1178
  id: 'notebook-benchmark',
933
1179
  version: '0.0.1',
@@ -1679,7 +1925,10 @@ export const TEAM_SPECS = {
1679
1925
  'audit-inventory-levels': AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1,
1680
1926
  'automate-regulatory-reporting': AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1,
1681
1927
  'comprehensive-sales-analytics': COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1,
1928
+ 'crop-monitoring': CROP_MONITORING_TEAM_SPEC_0_0_1,
1929
+ 'disaster-assessment': DISASTER_ASSESSMENT_TEAM_SPEC_0_0_1,
1682
1930
  jupyter: JUPYTER_TEAM_SPEC_0_0_1,
1931
+ 'month-end-close': MONTH_END_CLOSE_TEAM_SPEC_0_0_1,
1683
1932
  'notebook-benchmark': NOTEBOOK_BENCHMARK_TEAM_SPEC_0_0_1,
1684
1933
  'optimize-grid-operations': OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1,
1685
1934
  'process-citizen-requests': PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1,
@@ -576,6 +576,64 @@ export interface AppSurfaceSpec {
576
576
  composedBy: string;
577
577
  composedAt: string;
578
578
  }
579
+ /** What a page's output is drawn with of the catalog (LOOP P-05). */
580
+ export type AppPageOutputComponent = 'Text' | 'Image' | 'Table' | 'Chart';
581
+ /**
582
+ * A component its developer wrote (LOOP P-17), of one application only: the
583
+ * catalog grows for it, it does not open. Reviewed as the catalog's own — its
584
+ * properties a JSON Schema, what it shows and sends bindings — and drawn in a
585
+ * sandboxed frame of no origin from the built ES module at `source`.
586
+ */
587
+ export interface AppCustomComponentSpec {
588
+ /** Its name on a surface (`Gauge`); none of the catalog's own. */
589
+ name: string;
590
+ /** What it is for, in a sentence: what the palette says. */
591
+ description: string;
592
+ /** Its properties: the JSON Schema of an object. */
593
+ props: Record<string, unknown>;
594
+ /** What it shows from the page's data: bindings. */
595
+ shows: string[];
596
+ /** What it sends back: bindings it writes, then its action. */
597
+ sends: string[];
598
+ /** The address of its module: `https://`, or `http://localhost` while written. */
599
+ source: string;
600
+ /** Its Subresource Integrity hash (`sha384-…`); empty when unsaid. */
601
+ integrity: string;
602
+ /** Its height on the page, in pixels. */
603
+ height: number;
604
+ /** A configuration its schema accepts: what the palette previews. */
605
+ example?: Record<string, unknown>;
606
+ }
607
+ /** One thing a widget's page shows for its inputs (LOOP P-05), at `/outputs/<name>`. */
608
+ export interface AppPageOutputSpec {
609
+ name: string;
610
+ /** What a person reads above it; none when empty. */
611
+ title: string;
612
+ /**
613
+ * `Text` (words) unless said, `Image` (an address), `Table` (rows), `Chart`
614
+ * (points) — an `AppPageOutputComponent` — or a component of the
615
+ * application's own (P-17), its value what it shows first.
616
+ */
617
+ component: string;
618
+ /** The component's other properties: a Table's `columns`, a Chart's `kind`, `x`, `y`. */
619
+ props: Record<string, unknown>;
620
+ }
621
+ /**
622
+ * A widget's page written in its code (LOOP P-05, `@app.page`): its inputs a
623
+ * form, drawn at `/inputs/<name>`; its outputs values, shown at
624
+ * `/outputs/<name>`. As an input changes, the function its code names runs
625
+ * again on all of them, and the outputs change in place.
626
+ */
627
+ export interface AppPageSpec {
628
+ /** The function of its code that runs it. */
629
+ function: string;
630
+ inputs: AppFormSchema;
631
+ /** How the inputs are drawn, as `settingsUi` draws the settings. */
632
+ inputsUi?: Record<string, unknown>;
633
+ outputs: AppPageOutputSpec[];
634
+ /** Whether it runs again as an input changes; else when Run is pressed. */
635
+ live: boolean;
636
+ }
579
637
  /**
580
638
  * An application's voice (VOICE.md VO-41), off unless said: whether a person
581
639
  * may talk to it, whether its answers are heard, with which voice of the
@@ -651,7 +709,11 @@ export interface AppInterfaceSpec {
651
709
  uploads?: AppUploadsSpec;
652
710
  /** The components of the catalog the surface may use. */
653
711
  components: string[];
712
+ /** Components its developer wrote (P-17); absent from a spec made before them. */
713
+ customComponents?: AppCustomComponentSpec[];
654
714
  surface?: AppSurfaceSpec;
715
+ /** A widget's page written in its code (P-05); none when unsaid. */
716
+ page?: AppPageSpec;
655
717
  /**
656
718
  * The character its floating assistant shows; the paper clip when unsaid.
657
719
  * Said, it wins over the one the person chose in their settings.
@@ -764,7 +826,15 @@ export interface AppHostFunctionSpec {
764
826
  export interface AppHostBridgeSpec {
765
827
  context: string[];
766
828
  functions: AppHostFunctionSpec[];
829
+ /**
830
+ * Who its user is (LOOP D-21): `claimed`, what the page says (unless
831
+ * said); `signed`, only a token the host's server signed with the
832
+ * deployment's secret — the unsigned one refused.
833
+ */
834
+ user?: AppHostUser;
767
835
  }
836
+ /** What the host page's word on its visitor is worth (LOOP D-21). */
837
+ export type AppHostUser = 'claimed' | 'signed';
768
838
  export interface AppDeploymentSpec {
769
839
  hosted?: {
770
840
  visibility: 'private' | 'invited' | 'organization' | 'link' | 'public';
@@ -8,7 +8,7 @@ import type { ComponentType, ReactNode } from 'react';
8
8
  import type { ICollaborationProvider } from '@datalayer/jupyter-react';
9
9
  import type { ChatMessage, MessageHandler } from './messages';
10
10
  import type { Protocol, ProtocolConfig } from './protocol';
11
- import type { AgentInspectorSink } from '../components/inspector/agentInspector';
11
+ import type { OtelLiveTracer } from '@datalayer/core/lib/otel/live';
12
12
  import type { McpServerSelection } from './inference';
13
13
  import type { MCPServerTool } from './mcp';
14
14
  import type { AgentRuntimeConfig } from './config';
@@ -1273,11 +1273,12 @@ export interface ChatBaseProps {
1273
1273
  */
1274
1274
  onToolCallComplete?: (context: ToolCallCompleteContext) => void;
1275
1275
  /**
1276
- * The Agent Inspector's sink: the agent's turns (its model, its tokens)
1277
- * and its tool calls, from start to end, are recorded there. Without it,
1278
- * the sink of the nearest `AgentInspectorProvider`, if any.
1276
+ * The Agent Inspector's tracer: the agent's turns (`invoke_agent` spans:
1277
+ * its model, its tokens) and its tool calls (`execute_tool` spans), from
1278
+ * start to end, are recorded there. Without it, the tracer of the nearest
1279
+ * `AgentInspectorProvider`, if any.
1279
1280
  */
1280
- inspector?: AgentInspectorSink | null;
1281
+ inspector?: OtelLiveTracer | null;
1281
1282
  /**
1282
1283
  * Whether to render the top-of-chat tool approval banner (and its review
1283
1284
  * dialog) when `pendingApprovals` is non-empty. The banner/dialog render
@@ -46,6 +46,11 @@ export interface TeamContextSpec {
46
46
  * what the team *is*.
47
47
  */
48
48
  sharing: TeamContextSharing;
49
+ /**
50
+ * The Frames every member works under, in order, `id` or `id:version`
51
+ * (LOOP A-04): the team's shared context, as a Cog names its own.
52
+ */
53
+ frames?: string[];
49
54
  }
50
55
  /** How far members may hand work to each other, and to subagents. */
51
56
  export interface TeamDelegationSpec {
@@ -60,8 +65,8 @@ export interface TeamDelegationSpec {
60
65
  export interface TeamLinkSpec {
61
66
  /** The member asked, by its id in the team. */
62
67
  member: string;
63
- /** The protocol: `a2a`. */
64
- over: 'a2a';
68
+ /** The protocol: `a2a` to an agent or an application, `mcp` to a server member. */
69
+ over: 'a2a' | 'mcp';
65
70
  }
66
71
  export interface TeamAgentspec {
67
72
  /** Agent identifier within the team */
@@ -80,6 +85,12 @@ export interface TeamAgentspec {
80
85
  * application, with its agent, connections, rules and interface.
81
86
  */
82
87
  app?: string;
88
+ /**
89
+ * MCP server catalogue reference, in place of `ref` and `app`: the member
90
+ * is that server, a system of the scene the others reach over MCP
91
+ * (LOOP A-04). It asks nobody.
92
+ */
93
+ server?: string;
83
94
  /** Where its loop turns: in the person's `browser`, or on a `runtime`. */
84
95
  runsIn?: 'browser' | 'runtime';
85
96
  /** The members it asks directly while it works, and over what. */