@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
@@ -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
@@ -31,6 +31,7 @@ export * from './outputs';
31
31
  export * from './personas';
32
32
  export * from './protocol';
33
33
  export * from './sandbox';
34
+ export * from './scenes';
34
35
  export * from './skills';
35
36
  export * from './stream';
36
37
  export * from './teams';
@@ -35,6 +35,7 @@ export * from './outputs';
35
35
  export * from './personas';
36
36
  export * from './protocol';
37
37
  export * from './sandbox';
38
+ export * from './scenes';
38
39
  export * from './skills';
39
40
  export * from './stream';
40
41
  export * from './teams';
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Scenes (agentspecs `scenes`, `schema: loop.scene/v1`, LOOP A-11): a team,
3
+ * staged. The team says who is on stage; the scene says what happens there —
4
+ * the setting, the script, the stage directions, the audience, the rehearsal
5
+ * and where it plays.
6
+ *
7
+ * In the generated catalogue the cast is resolved: every member of the team,
8
+ * each with its persona filled from its application, and the `entry` said.
9
+ *
10
+ * @module types/scenes
11
+ */
12
+ import type { AppVerifiedSpec } from './agentspecs';
13
+ import type { TeamLinkSpec } from './teams';
14
+ /** How a member appears to the audience, in a scene. */
15
+ export interface ScenePersonaSpec {
16
+ /** The name the audience sees. */
17
+ name: string;
18
+ /** One emoji, its face on stage. */
19
+ face: string;
20
+ /** One line of *who I am here*. */
21
+ line: string;
22
+ }
23
+ /** A member of the cast: a member of the team, with its persona and its brief. */
24
+ export interface SceneCastMemberSpec {
25
+ /** Its id in the team. */
26
+ member: string;
27
+ /** The application it is, `id:version`; empty for an agent or a server. */
28
+ app: string;
29
+ /** The agent it is, when it is not an application. */
30
+ ref: string;
31
+ /** The MCP server it is, a system of the scene, when it is one. */
32
+ server: string;
33
+ /** What it is for, structurally: initiator, contributor, … */
34
+ role?: string;
35
+ /** Where its loop turns. */
36
+ runsIn?: 'browser' | 'runtime';
37
+ /** Whom it asks, and over what; absent when it asks nobody. */
38
+ talksTo?: TeamLinkSpec[];
39
+ persona: ScenePersonaSpec;
40
+ /** What it is for in this scene, over its application's instructions. */
41
+ brief: string;
42
+ }
43
+ /** A system on stage: an MCP server the cast reaches. */
44
+ export interface SceneSystemSpec {
45
+ /** The server, `id` or `id:version`. */
46
+ server: string;
47
+ /** The name the audience reads on the graph and in the transcript. */
48
+ as: string;
49
+ /** What it holds in this scene. */
50
+ holds: string;
51
+ }
52
+ /** The stage: what is on it, and what the audience is told. */
53
+ export interface SceneSettingSpec {
54
+ systems: SceneSystemSpec[];
55
+ /** The Frames the scene plays under, over the team's; absent when none. */
56
+ frames?: string[];
57
+ /** The data in play; absent when none. */
58
+ contents?: string[];
59
+ /** When the scene plays, in words. */
60
+ period: string;
61
+ /** The language it plays in, `en`. */
62
+ language: string;
63
+ /** What the audience is told before it starts: the line under the title. */
64
+ assumes: string;
65
+ }
66
+ /** What starts a beat: one of the three is said. */
67
+ export interface SceneCueSpec {
68
+ /** An opener the audience may say: the entry's suggestion on the page. */
69
+ say: string;
70
+ schedule: string;
71
+ event: string;
72
+ }
73
+ /** What kind of answer comes back, and what the page shows. */
74
+ export type SceneAnswerKind = 'words' | 'table' | 'chart' | 'notebook' | 'map' | 'file' | 'image';
75
+ /** How fast a beat plays for the audience. */
76
+ export type ScenePace = 'quick' | 'steady' | 'slow';
77
+ /** One member asking another over a protocol, or answering the audience. */
78
+ export interface SceneMoveSpec {
79
+ /** The member moving, by its id in the cast. */
80
+ who: string;
81
+ /** Whom: a member or a system; empty when it answers the audience. */
82
+ asks: string;
83
+ /** `a2a` to a member, `mcp` to a system. */
84
+ over?: 'a2a' | 'mcp';
85
+ /** What it asks for, or what it answers, in words. */
86
+ what: string;
87
+ /** Over `mcp`: the tool, by name or pattern. */
88
+ tool: string;
89
+ /** The kind of tool: `read`, `write`, … */
90
+ does?: string;
91
+ /** What kind of answer comes back. */
92
+ answers?: SceneAnswerKind;
93
+ }
94
+ /** What a beat does instead when a decision holds. */
95
+ export interface SceneBranchSpec {
96
+ decision: string;
97
+ expect: string;
98
+ /** The moves then, when they differ; absent otherwise. */
99
+ moves?: SceneMoveSpec[];
100
+ /** The beat that follows, by id. */
101
+ then: string;
102
+ }
103
+ /** One beat of the script. */
104
+ export interface SceneBeatSpec {
105
+ id: string;
106
+ cue: SceneCueSpec;
107
+ /** One line for the audience, read in the transcript. */
108
+ narration: string;
109
+ moves: SceneMoveSpec[];
110
+ /** What should happen, in words. */
111
+ expect: string;
112
+ /** What the page shows: said, or the kinds of the answers to the audience. */
113
+ shows: SceneAnswerKind[];
114
+ /** Its pace; the stage's when absent. */
115
+ pace?: ScenePace;
116
+ /** What it does instead, on a decision; absent when it never branches. */
117
+ branch?: SceneBranchSpec[];
118
+ }
119
+ /** Where a member stands: fractions of the box. */
120
+ export interface ScenePositionSpec {
121
+ x: number;
122
+ y: number;
123
+ }
124
+ /** What the transcript shows. */
125
+ export interface SceneTranscriptSpec {
126
+ tools: boolean;
127
+ narration: boolean;
128
+ /** Words withheld; absent when none. */
129
+ withhold?: ('credentials' | 'ids' | 'addresses' | 'amounts')[];
130
+ }
131
+ /** Directions for the page. */
132
+ export interface SceneStageSpec {
133
+ positions: Record<string, ScenePositionSpec>;
134
+ /** Whose balloon opens first; the entry's when empty. */
135
+ opensFirst: string;
136
+ transcript: SceneTranscriptSpec;
137
+ inspectors: ('agent' | 'tools' | 'a2a' | 'notebook' | 'cost')[];
138
+ /** How long the scene plays before it rests, `10m`. */
139
+ restsAfter: string;
140
+ pace: ScenePace;
141
+ }
142
+ /** Who may watch and ask, and what an ask may cost. */
143
+ export interface SceneAudienceSpec {
144
+ who: 'visitors' | 'signed-in' | 'nobody';
145
+ /** What one ask may cost, in USD; the site's when 0. */
146
+ ceilingPerAsk: number;
147
+ /** How many asks a visitor gets a day; the site's when 0. */
148
+ asksADay: number;
149
+ }
150
+ /** What a beat's transcript must look like. */
151
+ export interface SceneRehearsalBeatSpec {
152
+ beat: string;
153
+ /** The shape, in order: `Sales → Accounting`, `Accounting → Odoo: odoo_accounting_*`, `Accounting: a table`. */
154
+ lines: string[];
155
+ mustSay?: string[];
156
+ mustNotSay?: string[];
157
+ within: string;
158
+ }
159
+ /** A transcript recorded once, played when the scene cannot play live (LOOP H-08). */
160
+ export interface SceneRecordingSpec {
161
+ path: string;
162
+ taken: string;
163
+ note: string;
164
+ }
165
+ /** The scene's tests: a passing rehearsal is the gallery's *Live*. */
166
+ export interface SceneRehearsalSpec {
167
+ beats: SceneRehearsalBeatSpec[];
168
+ within: string;
169
+ recording?: SceneRecordingSpec;
170
+ verified: AppVerifiedSpec;
171
+ }
172
+ /** Where the scene plays. */
173
+ export interface SceneDeploymentSpec {
174
+ account: string;
175
+ /** The page it plays on. */
176
+ page: string;
177
+ /** For each member on a runtime, the variable its address is read from at build. */
178
+ addresses: Record<string, string>;
179
+ }
180
+ /** Specification for a scene: a team, staged. */
181
+ export interface SceneSpec {
182
+ /** The version of the spec itself: `loop.scene/v1`. */
183
+ schema: string;
184
+ id: string;
185
+ version: string;
186
+ /** The tab's name. */
187
+ name: string;
188
+ description: string;
189
+ tags: string[];
190
+ icon: string;
191
+ /** Its face: one emoji, drawn before its name. */
192
+ emoji: string;
193
+ /** The team it stages, `id:version`; empty when the cast was written inline. */
194
+ team: string;
195
+ /** The member the audience talks to. */
196
+ entry: string;
197
+ /** The cast, resolved: every member of the team with its persona filled. */
198
+ cast: SceneCastMemberSpec[];
199
+ setting: SceneSettingSpec;
200
+ script: SceneBeatSpec[];
201
+ stage: SceneStageSpec;
202
+ audience: SceneAudienceSpec;
203
+ rehearsal: SceneRehearsalSpec;
204
+ deployment: SceneDeploymentSpec;
205
+ /** What it names that is not enabled today, in sentences. */
206
+ setup: string[];
207
+ }
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -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. */