@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.
- package/README.md +13 -131
- package/lib/chat/Chat.d.ts +3 -1
- package/lib/chat/Chat.js +2 -2
- package/lib/chat/base/ChatBase.js +52 -1
- package/lib/chat/messages/ChatMessageList.js +17 -4
- package/lib/client/AgentsMixin.d.ts +48 -1
- package/lib/client/AgentsMixin.js +109 -0
- package/lib/components/NotificationEventCard.js +51 -26
- package/lib/components/OutputCard.js +21 -7
- package/lib/components/ToolApprovalCard.js +20 -2
- package/lib/examples/AgentCheckpointsExample.js +2 -8
- package/lib/examples/AgentCodemodeExample.js +3 -9
- package/lib/examples/AgentEvalsExample.js +3 -9
- package/lib/examples/AgentGuardrailsExample.js +3 -9
- package/lib/examples/AgentMemoryExample.js +3 -9
- package/lib/examples/AgentMonitoringExample.js +3 -9
- package/lib/examples/AgentNotificationsExample.js +2 -8
- package/lib/examples/AgentOutputsExample.js +3 -9
- package/lib/examples/AgentSandboxExample.js +3 -9
- package/lib/examples/AgentSkillsExample.js +3 -9
- package/lib/examples/AgentToolApprovalsExample.js +89 -24
- package/lib/examples/AgentTriggersExample.js +604 -37
- package/lib/examples/ChatExample.js +2 -10
- package/lib/examples/components/ErrorView.d.ts +14 -0
- package/lib/examples/components/ErrorView.js +20 -0
- package/lib/examples/components/index.d.ts +2 -0
- package/lib/examples/components/index.js +1 -0
- package/lib/examples/main.d.ts +1 -0
- package/lib/examples/main.js +1 -0
- package/lib/protocols/VercelAIAdapter.d.ts +2 -0
- package/lib/protocols/VercelAIAdapter.js +86 -20
- package/lib/shims/json5.d.ts +4 -0
- package/lib/shims/json5.js +8 -0
- package/lib/specs/agents/agents.js +241 -1390
- package/lib/specs/agents/index.js +1 -3
- package/lib/specs/envvars.js +20 -27
- package/lib/specs/evals.js +6 -6
- package/lib/specs/events.d.ts +10 -2
- package/lib/specs/events.js +84 -126
- package/lib/specs/frontendTools.js +2 -2
- package/lib/specs/guardrails.d.ts +7 -0
- package/lib/specs/guardrails.js +159 -240
- package/lib/specs/mcpServers.js +6 -35
- package/lib/specs/memory.d.ts +2 -0
- package/lib/specs/memory.js +17 -4
- package/lib/specs/models.js +5 -25
- package/lib/specs/notifications.js +18 -102
- package/lib/specs/outputs.js +9 -15
- package/lib/specs/skills.js +18 -18
- package/lib/specs/teams/index.js +1 -3
- package/lib/specs/teams/teams.js +348 -468
- package/lib/specs/tools.js +6 -3
- package/lib/specs/triggers.js +11 -61
- package/lib/types/tools.d.ts +2 -0
- package/package.json +1 -1
- package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
- package/scripts/codegen/generate_agents.py +4 -1
- package/scripts/codegen/generate_events.py +12 -4
- package/scripts/codegen/generate_tools.py +20 -0
- package/style/primer-primitives.css +1 -6
- package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_envvars.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_guardrails.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_mcp_servers.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_memory.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_models.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_notifications.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_outputs.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_skills.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_teams.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_tools.cpython-313.pyc +0 -0
- 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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
51
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
|
|
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
|
-
|
|
140
|
-
|
|
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);
|
package/lib/specs/outputs.js
CHANGED
|
@@ -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);
|
package/lib/specs/skills.js
CHANGED
|
@@ -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: [
|
|
17
|
+
requiredEnvVars: ["TAVILY_API_KEY:0.0.1"],
|
|
18
18
|
optionalEnvVars: [],
|
|
19
|
-
dependencies: [
|
|
20
|
-
tags: [
|
|
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: [
|
|
37
|
-
tags: [
|
|
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: [
|
|
51
|
+
requiredEnvVars: ["GITHUB_TOKEN:0.0.1"],
|
|
52
52
|
optionalEnvVars: [],
|
|
53
|
-
dependencies: [
|
|
54
|
-
tags: [
|
|
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: [
|
|
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: [
|
|
88
|
-
tags: [
|
|
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: [
|
|
105
|
-
tags: [
|
|
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() {
|
package/lib/specs/teams/index.js
CHANGED
|
@@ -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
|
}
|