@datalayer/agent-runtimes 1.0.3 → 1.0.4

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 (73) hide show
  1. package/README.md +13 -131
  2. package/lib/chat/Chat.d.ts +3 -1
  3. package/lib/chat/Chat.js +2 -2
  4. package/lib/chat/base/ChatBase.js +52 -1
  5. package/lib/chat/messages/ChatMessageList.js +17 -4
  6. package/lib/client/AgentsMixin.d.ts +48 -1
  7. package/lib/client/AgentsMixin.js +109 -0
  8. package/lib/components/NotificationEventCard.js +51 -26
  9. package/lib/components/OutputCard.js +21 -7
  10. package/lib/components/ToolApprovalCard.js +20 -2
  11. package/lib/examples/AgentCheckpointsExample.js +2 -8
  12. package/lib/examples/AgentCodemodeExample.js +3 -9
  13. package/lib/examples/AgentEvalsExample.js +3 -9
  14. package/lib/examples/AgentGuardrailsExample.js +3 -9
  15. package/lib/examples/AgentMemoryExample.js +3 -9
  16. package/lib/examples/AgentMonitoringExample.js +3 -9
  17. package/lib/examples/AgentNotificationsExample.js +2 -8
  18. package/lib/examples/AgentOutputsExample.js +3 -9
  19. package/lib/examples/AgentSandboxExample.js +3 -9
  20. package/lib/examples/AgentSkillsExample.js +3 -9
  21. package/lib/examples/AgentToolApprovalsExample.js +89 -24
  22. package/lib/examples/AgentTriggersExample.js +604 -37
  23. package/lib/examples/ChatExample.js +2 -10
  24. package/lib/examples/components/ErrorView.d.ts +14 -0
  25. package/lib/examples/components/ErrorView.js +20 -0
  26. package/lib/examples/components/index.d.ts +2 -0
  27. package/lib/examples/components/index.js +1 -0
  28. package/lib/examples/main.d.ts +1 -0
  29. package/lib/examples/main.js +1 -0
  30. package/lib/protocols/VercelAIAdapter.d.ts +2 -0
  31. package/lib/protocols/VercelAIAdapter.js +86 -20
  32. package/lib/shims/json5.d.ts +4 -0
  33. package/lib/shims/json5.js +8 -0
  34. package/lib/specs/agents/agents.js +241 -1390
  35. package/lib/specs/agents/index.js +1 -3
  36. package/lib/specs/envvars.js +20 -27
  37. package/lib/specs/evals.js +6 -6
  38. package/lib/specs/events.d.ts +10 -2
  39. package/lib/specs/events.js +84 -126
  40. package/lib/specs/frontendTools.js +2 -2
  41. package/lib/specs/guardrails.d.ts +7 -0
  42. package/lib/specs/guardrails.js +159 -240
  43. package/lib/specs/mcpServers.js +6 -35
  44. package/lib/specs/memory.d.ts +2 -0
  45. package/lib/specs/memory.js +17 -4
  46. package/lib/specs/models.js +5 -25
  47. package/lib/specs/notifications.js +18 -102
  48. package/lib/specs/outputs.js +9 -15
  49. package/lib/specs/skills.js +18 -18
  50. package/lib/specs/teams/index.js +1 -3
  51. package/lib/specs/teams/teams.js +348 -468
  52. package/lib/specs/tools.js +6 -3
  53. package/lib/specs/triggers.js +11 -61
  54. package/lib/types/tools.d.ts +2 -0
  55. package/package.json +1 -1
  56. package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
  57. package/scripts/codegen/generate_agents.py +4 -1
  58. package/scripts/codegen/generate_events.py +12 -4
  59. package/scripts/codegen/generate_tools.py +20 -0
  60. package/style/primer-primitives.css +1 -6
  61. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  62. package/scripts/codegen/__pycache__/generate_envvars.cpython-313.pyc +0 -0
  63. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  64. package/scripts/codegen/__pycache__/generate_guardrails.cpython-313.pyc +0 -0
  65. package/scripts/codegen/__pycache__/generate_mcp_servers.cpython-313.pyc +0 -0
  66. package/scripts/codegen/__pycache__/generate_memory.cpython-313.pyc +0 -0
  67. package/scripts/codegen/__pycache__/generate_models.cpython-313.pyc +0 -0
  68. package/scripts/codegen/__pycache__/generate_notifications.cpython-313.pyc +0 -0
  69. package/scripts/codegen/__pycache__/generate_outputs.cpython-313.pyc +0 -0
  70. package/scripts/codegen/__pycache__/generate_skills.cpython-313.pyc +0 -0
  71. package/scripts/codegen/__pycache__/generate_teams.cpython-313.pyc +0 -0
  72. package/scripts/codegen/__pycache__/generate_tools.cpython-313.pyc +0 -0
  73. package/scripts/codegen/__pycache__/generate_triggers.cpython-313.pyc +0 -0
@@ -14,27 +14,9 @@ export const API_PUSH_NOTIFICATION_SPEC_0_0_1 = {
14
14
  available: false,
15
15
  coming_soon: true,
16
16
  fields: [
17
- {
18
- name: 'url',
19
- label: 'Endpoint URL',
20
- type: 'string',
21
- required: true,
22
- placeholder: 'https://api.example.com/agent-results',
23
- },
24
- {
25
- name: 'secret',
26
- label: 'Signing Secret',
27
- type: 'string',
28
- required: false,
29
- placeholder: 'Optional HMAC secret for payload signing',
30
- },
31
- {
32
- name: 'include_output',
33
- label: 'Include Output',
34
- type: 'boolean',
35
- required: false,
36
- default: true,
37
- },
17
+ { name: 'url', label: 'Endpoint URL', type: 'string', required: true, placeholder: 'https://api.example.com/agent-results' },
18
+ { name: 'secret', label: 'Signing Secret', type: 'string', required: false, placeholder: 'Optional HMAC secret for payload signing' },
19
+ { name: 'include_output', label: 'Include Output', type: 'boolean', required: false, default: true },
38
20
  ],
39
21
  };
40
22
  export const EMAIL_NOTIFICATION_SPEC_0_0_1 = {
@@ -46,27 +28,9 @@ export const EMAIL_NOTIFICATION_SPEC_0_0_1 = {
46
28
  available: true,
47
29
  coming_soon: false,
48
30
  fields: [
49
- {
50
- name: 'recipients',
51
- label: 'Recipients',
52
- type: 'string',
53
- required: true,
54
- placeholder: 'ops@company.com, team-lead@company.com',
55
- },
56
- {
57
- name: 'subject_template',
58
- label: 'Subject Template',
59
- type: 'string',
60
- required: false,
61
- placeholder: '[Agent] {{agent_name}} — {{event_type}}',
62
- },
63
- {
64
- name: 'include_output',
65
- label: 'Include Output',
66
- type: 'boolean',
67
- required: false,
68
- default: true,
69
- },
31
+ { name: 'recipients', label: 'Recipients', type: 'string', required: true, placeholder: 'ops@company.com, team-lead@company.com' },
32
+ { name: 'subject_template', label: 'Subject Template', type: 'string', required: false, placeholder: '[Agent] {{agent_name}} — {{event_type}}' },
33
+ { name: 'include_output', label: 'Include Output', type: 'boolean', required: false, default: true },
70
34
  ],
71
35
  };
72
36
  export const SLACK_NOTIFICATION_SPEC_0_0_1 = {
@@ -78,27 +42,9 @@ export const SLACK_NOTIFICATION_SPEC_0_0_1 = {
78
42
  available: true,
79
43
  coming_soon: false,
80
44
  fields: [
81
- {
82
- name: 'channel',
83
- label: 'Channel',
84
- type: 'string',
85
- required: true,
86
- placeholder: '#sales-analytics',
87
- },
88
- {
89
- name: 'mention_on_failure',
90
- label: 'Mention on Failure',
91
- type: 'string',
92
- required: false,
93
- placeholder: '@oncall-team',
94
- },
95
- {
96
- name: 'include_output',
97
- label: 'Include Output',
98
- type: 'boolean',
99
- required: false,
100
- default: false,
101
- },
45
+ { name: 'channel', label: 'Channel', type: 'string', required: true, placeholder: '#sales-analytics' },
46
+ { name: 'mention_on_failure', label: 'Mention on Failure', type: 'string', required: false, placeholder: '@oncall-team' },
47
+ { name: 'include_output', label: 'Include Output', type: 'boolean', required: false, default: false },
102
48
  ],
103
49
  };
104
50
  export const TEAMS_NOTIFICATION_SPEC_0_0_1 = {
@@ -110,20 +56,8 @@ export const TEAMS_NOTIFICATION_SPEC_0_0_1 = {
110
56
  available: false,
111
57
  coming_soon: true,
112
58
  fields: [
113
- {
114
- name: 'webhook_url',
115
- label: 'Webhook URL',
116
- type: 'string',
117
- required: true,
118
- placeholder: 'https://outlook.office.com/webhook/...',
119
- },
120
- {
121
- name: 'include_output',
122
- label: 'Include Output',
123
- type: 'boolean',
124
- required: false,
125
- default: false,
126
- },
59
+ { name: 'webhook_url', label: 'Webhook URL', type: 'string', required: true, placeholder: 'https://outlook.office.com/webhook/...' },
60
+ { name: 'include_output', label: 'Include Output', type: 'boolean', required: false, default: false },
127
61
  ],
128
62
  };
129
63
  export const WEBHOOK_NOTIFICATION_SPEC_0_0_1 = {
@@ -135,27 +69,9 @@ export const WEBHOOK_NOTIFICATION_SPEC_0_0_1 = {
135
69
  available: false,
136
70
  coming_soon: true,
137
71
  fields: [
138
- {
139
- name: 'url',
140
- label: 'Webhook URL',
141
- type: 'string',
142
- required: true,
143
- placeholder: 'https://api.example.com/agent-events',
144
- },
145
- {
146
- name: 'secret',
147
- label: 'Signing Secret',
148
- type: 'string',
149
- required: false,
150
- placeholder: 'Optional HMAC secret for payload signing',
151
- },
152
- {
153
- name: 'include_output',
154
- label: 'Include Output',
155
- type: 'boolean',
156
- required: false,
157
- default: true,
158
- },
72
+ { name: 'url', label: 'Webhook URL', type: 'string', required: true, placeholder: 'https://api.example.com/agent-events' },
73
+ { name: 'secret', label: 'Signing Secret', type: 'string', required: false, placeholder: 'Optional HMAC secret for payload signing' },
74
+ { name: 'include_output', label: 'Include Output', type: 'boolean', required: false, default: true },
159
75
  ],
160
76
  };
161
77
  // ============================================================================
@@ -163,10 +79,10 @@ export const WEBHOOK_NOTIFICATION_SPEC_0_0_1 = {
163
79
  // ============================================================================
164
80
  export const NOTIFICATION_CATALOG = {
165
81
  'api-push': API_PUSH_NOTIFICATION_SPEC_0_0_1,
166
- email: EMAIL_NOTIFICATION_SPEC_0_0_1,
167
- slack: SLACK_NOTIFICATION_SPEC_0_0_1,
168
- teams: TEAMS_NOTIFICATION_SPEC_0_0_1,
169
- webhook: WEBHOOK_NOTIFICATION_SPEC_0_0_1,
82
+ 'email': EMAIL_NOTIFICATION_SPEC_0_0_1,
83
+ 'slack': SLACK_NOTIFICATION_SPEC_0_0_1,
84
+ 'teams': TEAMS_NOTIFICATION_SPEC_0_0_1,
85
+ 'webhook': WEBHOOK_NOTIFICATION_SPEC_0_0_1,
170
86
  };
171
87
  export function getNotificationSpecs() {
172
88
  return Object.values(NOTIFICATION_CATALOG);
@@ -33,11 +33,7 @@ export const DOCUMENT_OUTPUT_SPEC_0_0_1 = {
33
33
  icon: 'file',
34
34
  supports_template: true,
35
35
  supports_storage: true,
36
- mime_types: [
37
- 'application/pdf',
38
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
39
- 'text/markdown',
40
- ],
36
+ mime_types: ['application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'text/markdown'],
41
37
  };
42
38
  export const EMAIL_OUTPUT_SPEC_0_0_1 = {
43
39
  id: 'email',
@@ -77,21 +73,19 @@ export const SPREADSHEET_OUTPUT_SPEC_0_0_1 = {
77
73
  icon: 'table',
78
74
  supports_template: true,
79
75
  supports_storage: true,
80
- mime_types: [
81
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
82
- ],
76
+ mime_types: ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
83
77
  };
84
78
  // ============================================================================
85
79
  // Output Catalog
86
80
  // ============================================================================
87
81
  export const OUTPUT_CATALOG = {
88
- csv: CSV_OUTPUT_SPEC_0_0_1,
89
- dashboard: DASHBOARD_OUTPUT_SPEC_0_0_1,
90
- document: DOCUMENT_OUTPUT_SPEC_0_0_1,
91
- email: EMAIL_OUTPUT_SPEC_0_0_1,
92
- json: JSON_OUTPUT_SPEC_0_0_1,
93
- notebook: NOTEBOOK_OUTPUT_SPEC_0_0_1,
94
- spreadsheet: SPREADSHEET_OUTPUT_SPEC_0_0_1,
82
+ 'csv': CSV_OUTPUT_SPEC_0_0_1,
83
+ 'dashboard': DASHBOARD_OUTPUT_SPEC_0_0_1,
84
+ 'document': DOCUMENT_OUTPUT_SPEC_0_0_1,
85
+ 'email': EMAIL_OUTPUT_SPEC_0_0_1,
86
+ 'json': JSON_OUTPUT_SPEC_0_0_1,
87
+ 'notebook': NOTEBOOK_OUTPUT_SPEC_0_0_1,
88
+ 'spreadsheet': SPREADSHEET_OUTPUT_SPEC_0_0_1,
95
89
  };
96
90
  export function getOutputSpecs() {
97
91
  return Object.values(OUTPUT_CATALOG);
@@ -14,10 +14,10 @@ export const CRAWL_SKILL_SPEC_0_0_1 = {
14
14
  package: undefined,
15
15
  method: undefined,
16
16
  path: undefined,
17
- requiredEnvVars: ['TAVILY_API_KEY:0.0.1'],
17
+ requiredEnvVars: ["TAVILY_API_KEY:0.0.1"],
18
18
  optionalEnvVars: [],
19
- dependencies: ['requests>=2.31.0', 'beautifulsoup4>=4.12.0'],
20
- tags: ['web', 'crawl', 'scraping'],
19
+ dependencies: ["requests>=2.31.0", "beautifulsoup4>=4.12.0"],
20
+ tags: ["web", "crawl", "scraping"],
21
21
  icon: 'globe',
22
22
  emoji: '🌐',
23
23
  enabled: true,
@@ -33,8 +33,8 @@ export const EVENTS_SKILL_SPEC_0_0_1 = {
33
33
  path: undefined,
34
34
  requiredEnvVars: [],
35
35
  optionalEnvVars: [],
36
- dependencies: ['httpx>=0.27.0'],
37
- tags: ['events', 'orchestration', 'automation'],
36
+ dependencies: ["httpx>=0.27.0"],
37
+ tags: ["events", "orchestration", "automation"],
38
38
  icon: 'bell',
39
39
  emoji: '📅',
40
40
  enabled: true,
@@ -48,10 +48,10 @@ export const GITHUB_SKILL_SPEC_0_0_1 = {
48
48
  package: undefined,
49
49
  method: undefined,
50
50
  path: undefined,
51
- requiredEnvVars: ['GITHUB_TOKEN:0.0.1'],
51
+ requiredEnvVars: ["GITHUB_TOKEN:0.0.1"],
52
52
  optionalEnvVars: [],
53
- dependencies: ['PyGithub>=2.1.0'],
54
- tags: ['github', 'git', 'code'],
53
+ dependencies: ["PyGithub>=2.1.0"],
54
+ tags: ["github", "git", "code"],
55
55
  icon: 'mark-github',
56
56
  emoji: '🐙',
57
57
  enabled: true,
@@ -68,7 +68,7 @@ export const JOKES_SKILL_SPEC_0_0_1 = {
68
68
  requiredEnvVars: [],
69
69
  optionalEnvVars: [],
70
70
  dependencies: [],
71
- tags: ['fun', 'humor', 'demo'],
71
+ tags: ["fun", "humor", "demo"],
72
72
  icon: 'smiley',
73
73
  emoji: '😄',
74
74
  enabled: true,
@@ -84,8 +84,8 @@ export const PDF_SKILL_SPEC_0_0_1 = {
84
84
  path: undefined,
85
85
  requiredEnvVars: [],
86
86
  optionalEnvVars: [],
87
- dependencies: ['PyPDF2>=3.0.0', 'pdfplumber>=0.10.0'],
88
- tags: ['pdf', 'documents', 'extraction'],
87
+ dependencies: ["PyPDF2>=3.0.0", "pdfplumber>=0.10.0"],
88
+ tags: ["pdf", "documents", "extraction"],
89
89
  icon: 'file',
90
90
  emoji: '📄',
91
91
  enabled: true,
@@ -101,8 +101,8 @@ export const TEXT_SUMMARIZER_SKILL_SPEC_0_0_1 = {
101
101
  path: undefined,
102
102
  requiredEnvVars: [],
103
103
  optionalEnvVars: [],
104
- dependencies: ['agent-skills>=0.0.1'],
105
- tags: ['nlp', 'summarization', 'text-processing'],
104
+ dependencies: ["agent-skills>=0.0.1"],
105
+ tags: ["nlp", "summarization", "text-processing"],
106
106
  icon: 'note',
107
107
  emoji: '📝',
108
108
  enabled: true,
@@ -111,11 +111,11 @@ export const TEXT_SUMMARIZER_SKILL_SPEC_0_0_1 = {
111
111
  // Skill Catalog
112
112
  // ============================================================================
113
113
  export const SKILL_CATALOG = {
114
- crawl: CRAWL_SKILL_SPEC_0_0_1,
115
- events: EVENTS_SKILL_SPEC_0_0_1,
116
- github: GITHUB_SKILL_SPEC_0_0_1,
117
- jokes: JOKES_SKILL_SPEC_0_0_1,
118
- pdf: PDF_SKILL_SPEC_0_0_1,
114
+ 'crawl': CRAWL_SKILL_SPEC_0_0_1,
115
+ 'events': EVENTS_SKILL_SPEC_0_0_1,
116
+ 'github': GITHUB_SKILL_SPEC_0_0_1,
117
+ 'jokes': JOKES_SKILL_SPEC_0_0_1,
118
+ 'pdf': PDF_SKILL_SPEC_0_0_1,
119
119
  'text-summarizer': TEXT_SUMMARIZER_SKILL_SPEC_0_0_1,
120
120
  };
121
121
  export function getSkillSpecs() {
@@ -31,7 +31,5 @@ export function getTeamSpec(teamId) {
31
31
  */
32
32
  export function listTeamSpecs(prefix) {
33
33
  const specs = Object.values(TEAM_SPECS);
34
- return prefix !== undefined
35
- ? specs.filter(s => s.id.startsWith(prefix))
36
- : specs;
34
+ return prefix !== undefined ? specs.filter(s => s.id.startsWith(prefix)) : specs;
37
35
  }