@datalayer/agent-runtimes 1.3.15 โ†’ 1.3.17

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 (81) hide show
  1. package/README.md +1 -1
  2. package/lib/chat/base/ChatBase.js +3 -2
  3. package/lib/config/AgentConfiguration.d.ts +1 -1
  4. package/lib/loop/apps/AppRenderer.d.ts +24 -0
  5. package/lib/loop/apps/AppRenderer.js +101 -0
  6. package/lib/loop/apps/appspec.d.ts +69 -0
  7. package/lib/loop/apps/appspec.js +566 -0
  8. package/lib/loop/apps/checks.d.ts +21 -0
  9. package/lib/loop/apps/checks.js +556 -0
  10. package/lib/loop/apps/index.d.ts +10 -0
  11. package/lib/loop/apps/index.js +14 -0
  12. package/lib/loop/apps/rules.d.ts +64 -0
  13. package/lib/loop/apps/rules.js +289 -0
  14. package/lib/loop/apps/yaml.d.ts +17 -0
  15. package/lib/loop/apps/yaml.js +185 -0
  16. package/lib/loop/embed/LoopEmbed.d.ts +6 -1
  17. package/lib/loop/embed/LoopEmbed.js +3 -2
  18. package/lib/loop/index.d.ts +1 -0
  19. package/lib/loop/index.js +3 -0
  20. package/lib/loop/plugins/chat/ChatView.js +9 -4
  21. package/lib/loop/plugins/chat/index.d.ts +10 -0
  22. package/lib/loop/plugins/chat/index.js +1 -0
  23. package/lib/loop/presets.d.ts +6 -0
  24. package/lib/loop/presets.js +2 -1
  25. package/lib/loop/shell/LoopWorkspace.d.ts +14 -0
  26. package/lib/loop/shell/LoopWorkspace.js +20 -6
  27. package/lib/loop/shell/index.d.ts +1 -1
  28. package/lib/loop/shell/index.js +1 -1
  29. package/lib/loop/shell/useWorkspaceFullScreen.d.ts +17 -4
  30. package/lib/loop/shell/useWorkspaceFullScreen.js +23 -6
  31. package/lib/specs/actions.d.ts +30 -0
  32. package/lib/specs/actions.js +616 -0
  33. package/lib/specs/agents/agents.d.ts +1 -0
  34. package/lib/specs/agents/agents.js +338 -284
  35. package/lib/specs/apps.d.ts +25 -0
  36. package/lib/specs/apps.js +1064 -0
  37. package/lib/specs/cogs.d.ts +19 -0
  38. package/lib/specs/cogs.js +736 -0
  39. package/lib/specs/events.d.ts +6 -1
  40. package/lib/specs/events.js +144 -1
  41. package/lib/specs/frames.d.ts +19 -0
  42. package/lib/specs/frames.js +444 -0
  43. package/lib/specs/gates.d.ts +22 -0
  44. package/lib/specs/gates.js +177 -0
  45. package/lib/specs/guards.d.ts +26 -0
  46. package/lib/specs/guards.js +930 -0
  47. package/lib/specs/index.d.ts +10 -0
  48. package/lib/specs/index.js +10 -0
  49. package/lib/specs/mcpServers.js +2 -2
  50. package/lib/specs/memory.js +4 -0
  51. package/lib/specs/modelProviders.d.ts +22 -0
  52. package/lib/specs/modelProviders.js +102 -0
  53. package/lib/specs/models.d.ts +31 -0
  54. package/lib/specs/models.js +215 -0
  55. package/lib/specs/ops.d.ts +15 -0
  56. package/lib/specs/ops.js +1272 -0
  57. package/lib/specs/outputs.js +2 -2
  58. package/lib/specs/skills.js +1 -1
  59. package/lib/specs/teams/teams.js +18 -18
  60. package/lib/specs/tracks.d.ts +15 -0
  61. package/lib/specs/tracks.js +87 -0
  62. package/lib/specs/uiPlugins.d.ts +16 -0
  63. package/lib/specs/uiPlugins.js +40 -0
  64. package/lib/types/agentspecs.d.ts +453 -2
  65. package/lib/types/memory.d.ts +2 -0
  66. package/lib/types/models.d.ts +52 -0
  67. package/package.json +2 -1
  68. package/scripts/check-cloudflare-models.py +122 -0
  69. package/scripts/codegen/agentspecs_clone.py +53 -0
  70. package/scripts/codegen/compose.py +65 -0
  71. package/scripts/codegen/generate_agents.py +14 -4
  72. package/scripts/codegen/generate_apps.py +454 -0
  73. package/scripts/codegen/generate_cogs.py +308 -0
  74. package/scripts/codegen/generate_frames.py +278 -0
  75. package/scripts/codegen/generate_memory.py +2 -0
  76. package/scripts/codegen/generate_model_providers.py +246 -0
  77. package/scripts/codegen/generate_models.py +135 -4
  78. package/scripts/codegen/generate_ops.py +388 -0
  79. package/scripts/codegen/generate_sandbox_agents.py +1 -1
  80. package/scripts/codegen/generate_ui_plugins.py +226 -0
  81. package/scripts/gen_workers.py +2 -2
@@ -11,7 +11,7 @@ export const CSV_OUTPUT_SPEC_0_0_1 = {
11
11
  name: 'CSV',
12
12
  description: 'Deliver results as a CSV file for easy import into spreadsheets, data pipelines, or other analysis tools.',
13
13
  icon: 'table',
14
- enabled: false,
14
+ enabled: true,
15
15
  supports_template: false,
16
16
  supports_storage: true,
17
17
  mime_types: ['text/csv'],
@@ -70,7 +70,7 @@ export const JSON_OUTPUT_SPEC_0_0_1 = {
70
70
  name: 'JSON',
71
71
  description: 'Deliver results as structured JSON data, suitable for programmatic consumption by APIs, pipelines, or dashboards.',
72
72
  icon: 'code',
73
- enabled: false,
73
+ enabled: true,
74
74
  supports_template: false,
75
75
  supports_storage: true,
76
76
  mime_types: ['application/json'],
@@ -37,7 +37,7 @@ export const CRAWL_SKILL_SPEC_0_0_1 = {
37
37
  tags: ['web', 'crawl', 'scraping'],
38
38
  icon: 'globe',
39
39
  emoji: '๐ŸŒ',
40
- enabled: false,
40
+ enabled: true,
41
41
  };
42
42
  export const EVENTS_SKILL_SPEC_0_0_1 = {
43
43
  id: 'events',
@@ -328,12 +328,12 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
328
328
  ref: '',
329
329
  role: 'contributor',
330
330
  goal: `Compare system counts vs physical counts and flag discrepancies`,
331
- dependsOn: [],
331
+ dependsOn: ['inv-1'],
332
332
  subagents: [],
333
333
  model: 'openai:gpt-4.1',
334
334
  mcpServer: 'Audit MCP',
335
335
  tools: ['Count Comparator', 'Discrepancy Logger', 'Shrinkage Calculator'],
336
- trigger: 'On completion of Inventory Scanner',
336
+ trigger: '',
337
337
  approval: 'auto',
338
338
  },
339
339
  {
@@ -342,7 +342,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
342
342
  ref: '',
343
343
  role: 'contributor',
344
344
  goal: `Forecast demand by SKU using historical sales and seasonal patterns`,
345
- dependsOn: [],
345
+ dependsOn: ['inv-2'],
346
346
  subagents: [],
347
347
  model: 'anthropic:claude-sonnet-4-20250514',
348
348
  mcpServer: 'Analytics MCP',
@@ -351,7 +351,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
351
351
  'Seasonal Analyzer',
352
352
  'External Signals Fetcher',
353
353
  ],
354
- trigger: 'On completion of Discrepancy Auditor',
354
+ trigger: '',
355
355
  approval: 'auto',
356
356
  },
357
357
  {
@@ -360,12 +360,12 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
360
360
  ref: '',
361
361
  role: 'contributor',
362
362
  goal: `Calculate optimal reorder points and generate purchase order recommendations`,
363
- dependsOn: [],
363
+ dependsOn: ['inv-3'],
364
364
  subagents: [],
365
365
  model: 'openai:gpt-4.1',
366
366
  mcpServer: 'Procurement MCP',
367
367
  tools: ['EOQ Calculator', 'Supplier Catalog', 'PO Generator'],
368
- trigger: 'On completion of Demand Forecaster',
368
+ trigger: '',
369
369
  approval: 'manual',
370
370
  },
371
371
  {
@@ -374,12 +374,12 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
374
374
  ref: '',
375
375
  role: 'finalizer',
376
376
  goal: `Compile inventory audit report with discrepancies, forecasts, and reorder plan`,
377
- dependsOn: [],
377
+ dependsOn: ['inv-4'],
378
378
  subagents: [],
379
379
  model: 'openai:gpt-4.1',
380
380
  mcpServer: 'Document Generation MCP',
381
381
  tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
382
- trigger: 'On completion of Reorder Planner',
382
+ trigger: '',
383
383
  approval: 'auto',
384
384
  },
385
385
  ],
@@ -651,7 +651,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
651
651
  ref: '',
652
652
  role: 'finalizer',
653
653
  goal: `Compile all insights โ€” raw KPIs, anomalies, trends, and forecasts โ€” into a polished executive dashboard with charts, tables, and narrative commentary. Send the report via Slack and email. Highlight critical anomalies with a red-flag summary at the top.`,
654
- dependsOn: [],
654
+ dependsOn: ['sa-2', 'sa-3'],
655
655
  subagents: [],
656
656
  model: 'openai:gpt-4.1',
657
657
  mcpServer: 'Document Generation MCP',
@@ -661,7 +661,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
661
661
  'Email Sender',
662
662
  'Slack Notifier',
663
663
  ],
664
- trigger: 'On completion of Anomaly Detector & Trend Analyzer',
664
+ trigger: '',
665
665
  approval: 'manual',
666
666
  },
667
667
  ],
@@ -1220,7 +1220,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
1220
1220
  ref: '',
1221
1221
  role: 'contributor',
1222
1222
  goal: `Process and route requests to appropriate departments with required documentation`,
1223
- dependsOn: [],
1223
+ dependsOn: ['cit-1'],
1224
1224
  subagents: [],
1225
1225
  model: 'openai:gpt-4.1',
1226
1226
  mcpServer: 'Case Management MCP',
@@ -1230,7 +1230,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
1230
1230
  'Department Router',
1231
1231
  'Status Tracker',
1232
1232
  ],
1233
- trigger: 'On completion of Intake Agent',
1233
+ trigger: '',
1234
1234
  approval: 'auto',
1235
1235
  },
1236
1236
  {
@@ -1515,12 +1515,12 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1515
1515
  ref: '',
1516
1516
  role: 'contributor',
1517
1517
  goal: `Analyze collected data and identify patterns and duplicates`,
1518
- dependsOn: [],
1518
+ dependsOn: ['tm-1'],
1519
1519
  subagents: [],
1520
1520
  model: 'bedrock:us.anthropic.claude-sonnet-4-6',
1521
1521
  mcpServer: 'Analytics MCP',
1522
1522
  tools: ['Statistical Analysis', 'ML Predictor', 'Deduplicator'],
1523
- trigger: 'On completion of Data Collector',
1523
+ trigger: '',
1524
1524
  approval: 'manual',
1525
1525
  },
1526
1526
  {
@@ -1529,12 +1529,12 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1529
1529
  ref: '',
1530
1530
  role: 'contributor',
1531
1531
  goal: `Write cleaned and merged contacts back to the CRM systems`,
1532
- dependsOn: [],
1532
+ dependsOn: ['tm-2'],
1533
1533
  subagents: [],
1534
1534
  model: 'openai:gpt-4.1',
1535
1535
  mcpServer: 'CRM Write MCP',
1536
1536
  tools: ['Salesforce Connector', 'HubSpot Connector'],
1537
- trigger: 'On completion of Analyzer',
1537
+ trigger: '',
1538
1538
  approval: 'manual',
1539
1539
  },
1540
1540
  {
@@ -1543,12 +1543,12 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1543
1543
  ref: '',
1544
1544
  role: 'finalizer',
1545
1545
  goal: `Generate sync summary reports and send notifications`,
1546
- dependsOn: [],
1546
+ dependsOn: ['tm-3'],
1547
1547
  subagents: [],
1548
1548
  model: 'openai:gpt-4.1',
1549
1549
  mcpServer: 'Document Generation MCP',
1550
1550
  tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
1551
- trigger: 'On completion of Sync Writer',
1551
+ trigger: '',
1552
1552
  approval: 'auto',
1553
1553
  },
1554
1554
  ],
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Track Catalog.
3
+ *
4
+ * What evidence a run keeps, for how long, and who may read it.
5
+ *
6
+ * This file is AUTO-GENERATED from YAML specifications.
7
+ * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
8
+ */
9
+ import type { TrackSpec } from '../types/agentspecs';
10
+ export declare const FINANCIAL_REPORTING_TRACK_0_0_1: TrackSpec;
11
+ export declare const STANDARD_TRACK_0_0_1: TrackSpec;
12
+ export declare const TRACK_CATALOGUE: Record<string, TrackSpec>;
13
+ /** A Track, by `id` or `id:version`, or undefined. */
14
+ export declare function getTrack(ref: string): TrackSpec | undefined;
15
+ export declare function listTracks(): TrackSpec[];
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export const FINANCIAL_REPORTING_TRACK_0_0_1 = {
6
+ id: 'financial-reporting',
7
+ version: '0.0.1',
8
+ name: 'Financial Reporting Track',
9
+ description: 'The complete record of an Op that produces financial reporting: every input and source, every model and setting, every Guard result, Gate decision, approval and edit. Kept seven years, readable by Finance and by audit, and fed back to Organizational Memory.',
10
+ retainFor: '7_years',
11
+ include: [
12
+ 'op',
13
+ 'frames_used',
14
+ 'cogs_invoked',
15
+ 'input_data',
16
+ 'source_documents',
17
+ 'model_versions',
18
+ 'configuration',
19
+ 'guard_results',
20
+ 'gate_decisions',
21
+ 'human_approvals',
22
+ 'human_edits',
23
+ 'final_output',
24
+ 'actions_taken',
25
+ 'timestamps',
26
+ 'user_identity',
27
+ 'permissions',
28
+ 'environment',
29
+ 'memory_links',
30
+ ],
31
+ readers: ['finance', 'internal-audit'],
32
+ redact: ['*Password*', '*Secret*', '*Token*', '*IBAN*'],
33
+ feedsMemory: true,
34
+ exchangeable: false,
35
+ enabled: true,
36
+ tags: ['finance', 'audit'],
37
+ icon: 'log',
38
+ emoji: '๐Ÿงพ',
39
+ retentionDays: 2555,
40
+ };
41
+ export const STANDARD_TRACK_0_0_1 = {
42
+ id: 'standard',
43
+ version: '0.0.1',
44
+ name: 'Standard Track',
45
+ description: 'The record of an ordinary Op: what ran, under which Frames, what the Guards found and the Gates decided, and what was produced. Kept one year.',
46
+ retainFor: '1_years',
47
+ include: [
48
+ 'op',
49
+ 'frames_used',
50
+ 'cogs_invoked',
51
+ 'model_versions',
52
+ 'guard_results',
53
+ 'gate_decisions',
54
+ 'human_approvals',
55
+ 'final_output',
56
+ 'timestamps',
57
+ 'user_identity',
58
+ ],
59
+ readers: [],
60
+ redact: ['*Password*', '*Secret*', '*Token*'],
61
+ feedsMemory: false,
62
+ exchangeable: false,
63
+ enabled: true,
64
+ tags: ['default'],
65
+ icon: 'log',
66
+ emoji: '๐Ÿงพ',
67
+ retentionDays: 365,
68
+ };
69
+ export const TRACK_CATALOGUE = {
70
+ 'financial-reporting': FINANCIAL_REPORTING_TRACK_0_0_1,
71
+ standard: STANDARD_TRACK_0_0_1,
72
+ };
73
+ /** A Track, by `id` or `id:version`, or undefined. */
74
+ export function getTrack(ref) {
75
+ // Own entries only: `constructor` and `toString` are not Tracks.
76
+ const own = (id) => Object.prototype.hasOwnProperty.call(TRACK_CATALOGUE, id)
77
+ ? TRACK_CATALOGUE[id]
78
+ : undefined;
79
+ const at = ref.lastIndexOf(':');
80
+ return (own(ref) ??
81
+ (at > 0 && ref.slice(at + 1).includes('.')
82
+ ? own(ref.slice(0, at))
83
+ : undefined));
84
+ }
85
+ export function listTracks() {
86
+ return Object.values(TRACK_CATALOGUE);
87
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * UI Plugin Catalog.
3
+ *
4
+ * How an agent's answer becomes an interface: the protocols a host renders.
5
+ *
6
+ * This file is AUTO-GENERATED from YAML specifications.
7
+ * DO NOT EDIT MANUALLY - run 'make specs' to regenerate.
8
+ */
9
+ import type { UIPluginSpec } from '../types/agentspecs';
10
+ export declare const A2UI_UI_PLUGIN_0_0_1: UIPluginSpec;
11
+ export declare const MCP_APPS_UI_PLUGIN_0_0_1: UIPluginSpec;
12
+ export declare const MCP_UI_UI_PLUGIN_0_0_1: UIPluginSpec;
13
+ export declare const UI_PLUGIN_CATALOGUE: Record<string, UIPluginSpec>;
14
+ /** The plugin an agent spec's `uiPlugin` names, or undefined. */
15
+ export declare function getUIPlugin(pluginId: string): UIPluginSpec | undefined;
16
+ export declare function listUIPlugins(): UIPluginSpec[];
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export const A2UI_UI_PLUGIN_0_0_1 = {
6
+ id: 'a2ui',
7
+ version: '0.0.1',
8
+ name: 'A2UI',
9
+ description: 'An agent describes an interface โ€” a form, a table, a card โ€” as a tree of components from a catalogue the host allows, and the host renders it; what the user does in it comes back to the agent as an action.',
10
+ docsUrl: 'https://a2ui.org/',
11
+ enabled: true,
12
+ };
13
+ export const MCP_APPS_UI_PLUGIN_0_0_1 = {
14
+ id: 'mcp-apps',
15
+ version: '0.0.1',
16
+ name: 'MCP Apps',
17
+ description: "An MCP server ships an interactive app with a tool: the host renders it in a sandboxed frame beside the conversation, and the app calls the server's tools through the host.",
18
+ docsUrl: 'https://modelcontextprotocol.io/docs/extensions/apps',
19
+ enabled: false,
20
+ };
21
+ export const MCP_UI_UI_PLUGIN_0_0_1 = {
22
+ id: 'mcp-ui',
23
+ version: '0.0.1',
24
+ name: 'MCP UI',
25
+ description: 'An MCP tool answers with a UI resource โ€” HTML, a remote page or a component โ€” that the host renders in place of plain text.',
26
+ docsUrl: 'https://mcpui.dev/',
27
+ enabled: false,
28
+ };
29
+ export const UI_PLUGIN_CATALOGUE = {
30
+ a2ui: A2UI_UI_PLUGIN_0_0_1,
31
+ 'mcp-apps': MCP_APPS_UI_PLUGIN_0_0_1,
32
+ 'mcp-ui': MCP_UI_UI_PLUGIN_0_0_1,
33
+ };
34
+ /** The plugin an agent spec's `uiPlugin` names, or undefined. */
35
+ export function getUIPlugin(pluginId) {
36
+ return UI_PLUGIN_CATALOGUE[pluginId];
37
+ }
38
+ export function listUIPlugins() {
39
+ return Object.values(UI_PLUGIN_CATALOGUE);
40
+ }