@datalayer/agent-runtimes 1.0.8 → 1.0.10

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 (49) hide show
  1. package/lib/chat/Chat.js +24 -12
  2. package/lib/chat/base/ChatBase.js +39 -1
  3. package/lib/client/AgentsMixin.d.ts +4 -4
  4. package/lib/client/AgentsMixin.js +7 -7
  5. package/lib/components/ToolApprovalCard.js +13 -3
  6. package/lib/config/AgentConfiguration.d.ts +2 -2
  7. package/lib/config/index.d.ts +1 -1
  8. package/lib/examples/AgentCheckpointsExample.js +12 -12
  9. package/lib/examples/AgentEvalsExample.js +3 -3
  10. package/lib/examples/AgentGuardrailsExample.js +5 -5
  11. package/lib/examples/AgentHooksExample.js +3 -3
  12. package/lib/examples/AgentInferenceProviderExample.js +5 -5
  13. package/lib/examples/AgentMCPExample.js +2 -2
  14. package/lib/examples/AgentMemoryExample.js +2 -2
  15. package/lib/examples/AgentMonitoringExample.js +2 -2
  16. package/lib/examples/AgentNotificationsExample.js +2 -2
  17. package/lib/examples/AgentOtelExample.js +5 -5
  18. package/lib/examples/AgentOutputsExample.js +2 -2
  19. package/lib/examples/AgentParametersExample.js +4 -4
  20. package/lib/examples/AgentSandboxExample.js +2 -2
  21. package/lib/examples/AgentSkillsExample.js +2 -2
  22. package/lib/examples/AgentSubagentsExample.js +2 -2
  23. package/lib/examples/AgentToolApprovalsExample.js +33 -7
  24. package/lib/examples/AgentTriggersExample.js +4 -4
  25. package/lib/examples/ChatExample.js +3 -3
  26. package/lib/hooks/useAgentRuntimes.js +2 -2
  27. package/lib/hooks/useAgentsCatalog.d.ts +3 -3
  28. package/lib/hooks/useAgentsCatalog.js +4 -4
  29. package/lib/hooks/useCheckpoints.js +2 -2
  30. package/lib/hooks/useToolApprovals.d.ts +8 -0
  31. package/lib/hooks/useToolApprovals.js +20 -1
  32. package/lib/identity/identityStore.js +4 -4
  33. package/lib/index.d.ts +1 -1
  34. package/lib/specs/agents/agents.d.ts +51 -50
  35. package/lib/specs/agents/agents.js +154 -141
  36. package/lib/specs/agents/index.d.ts +5 -5
  37. package/lib/specs/agents/index.js +9 -9
  38. package/lib/tools/adapters/agent-runtimes/AgentRuntimesToolAdapter.js +0 -10
  39. package/lib/types/agents.d.ts +3 -3
  40. package/lib/types/agentspecs.d.ts +5 -3
  41. package/lib/types/teams.d.ts +2 -2
  42. package/package.json +7 -7
  43. package/scripts/codegen/generate_agents.py +75 -57
  44. package/scripts/codegen/generate_teams.py +4 -4
  45. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  46. package/scripts/codegen/__pycache__/generate_benchmarks.cpython-313.pyc +0 -0
  47. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  48. package/scripts/codegen/__pycache__/generate_events.cpython-313.pyc +0 -0
  49. package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
@@ -3,19 +3,19 @@
3
3
  *
4
4
  * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
5
5
  */
6
- import type { AgentSpec } from '../../types';
7
- export declare const AGENT_SPECS: Record<string, AgentSpec>;
6
+ import type { Agentspec } from '../../types';
7
+ export declare const AGENTSPECS: Record<string, Agentspec>;
8
8
  /**
9
9
  * Get an agent specification by ID.
10
10
  */
11
- export declare function getAgentSpecs(agentId: string): AgentSpec | undefined;
11
+ export declare function getAgentspecs(agentId: string): Agentspec | undefined;
12
12
  /**
13
13
  * List all available agent specifications.
14
14
  *
15
15
  * @param prefix - If provided, only return specs whose ID starts with this prefix.
16
16
  */
17
- export declare function listAgentSpecs(prefix?: string): AgentSpec[];
17
+ export declare function listAgentspecs(prefix?: string): Agentspec[];
18
18
  /**
19
19
  * Collect all required environment variables for an agent spec.
20
20
  */
21
- export declare function getAgentSpecRequiredEnvVars(spec: AgentSpec): string[];
21
+ export declare function getAgentspecRequiredEnvVars(spec: Agentspec): string[];
@@ -2,18 +2,18 @@
2
2
  * Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { AGENT_SPECS as ROOT_AGENTS } from './agents';
5
+ import { AGENTSPECS as ROOT_AGENTS } from './agents';
6
6
  // Merge all agent specs from subfolders
7
- export const AGENT_SPECS = {
7
+ export const AGENTSPECS = {
8
8
  ...ROOT_AGENTS,
9
9
  };
10
10
  function resolveAgentId(agentId) {
11
- if (agentId in AGENT_SPECS)
11
+ if (agentId in AGENTSPECS)
12
12
  return agentId;
13
13
  const idx = agentId.lastIndexOf(':');
14
14
  if (idx > 0) {
15
15
  const base = agentId.slice(0, idx);
16
- if (base in AGENT_SPECS)
16
+ if (base in AGENTSPECS)
17
17
  return base;
18
18
  }
19
19
  return agentId;
@@ -21,16 +21,16 @@ function resolveAgentId(agentId) {
21
21
  /**
22
22
  * Get an agent specification by ID.
23
23
  */
24
- export function getAgentSpecs(agentId) {
25
- return AGENT_SPECS[resolveAgentId(agentId)];
24
+ export function getAgentspecs(agentId) {
25
+ return AGENTSPECS[resolveAgentId(agentId)];
26
26
  }
27
27
  /**
28
28
  * List all available agent specifications.
29
29
  *
30
30
  * @param prefix - If provided, only return specs whose ID starts with this prefix.
31
31
  */
32
- export function listAgentSpecs(prefix) {
33
- const specs = Object.values(AGENT_SPECS);
32
+ export function listAgentspecs(prefix) {
33
+ const specs = Object.values(AGENTSPECS);
34
34
  return prefix !== undefined
35
35
  ? specs.filter(s => s.id.startsWith(prefix))
36
36
  : specs;
@@ -38,7 +38,7 @@ export function listAgentSpecs(prefix) {
38
38
  /**
39
39
  * Collect all required environment variables for an agent spec.
40
40
  */
41
- export function getAgentSpecRequiredEnvVars(spec) {
41
+ export function getAgentspecRequiredEnvVars(spec) {
42
42
  const vars = new Set();
43
43
  for (const server of spec.mcpServers) {
44
44
  for (const v of server.requiredEnvVars ?? []) {
@@ -24,7 +24,6 @@ function isRecentDuplicate(toolName, params) {
24
24
  if (lastExecution) {
25
25
  const timeSinceExecution = Date.now() - lastExecution;
26
26
  if (timeSinceExecution < CACHE_TTL_MS) {
27
- console.log(`[agent-runtimes] 🚫 DUPLICATE DETECTED - Skipping execution (${timeSinceExecution}ms since last call)`);
28
27
  return true;
29
28
  }
30
29
  }
@@ -53,7 +52,6 @@ function processParameters(params) {
53
52
  (value.startsWith('{') || value.startsWith('['))) {
54
53
  try {
55
54
  processed[key] = JSON.parse(value);
56
- console.log(`[agent-runtimes] 📝 Parsed JSON string for parameter '${key}'`);
57
55
  }
58
56
  catch {
59
57
  // If parsing fails, keep the original string
@@ -82,13 +80,8 @@ export function createAgentRuntimesTool(definition, operation, context) {
82
80
  description: definition.description,
83
81
  parameters: definition.parameters,
84
82
  handler: async (params) => {
85
- console.log(`[agent-runtimes] ========== HANDLER CALLED ==========`);
86
- console.log(`[agent-runtimes] Tool: ${definition.name}`);
87
- console.log(`[agent-runtimes] Operation: ${definition.operation}`);
88
- console.log(`[agent-runtimes] Params:`, params);
89
83
  // Check for duplicate execution
90
84
  if (isRecentDuplicate(definition.name, params)) {
91
- console.log(`[agent-runtimes] 🚫 DUPLICATE DETECTED - Returning early`);
92
85
  return {
93
86
  success: false,
94
87
  message: 'Operation already executed recently (duplicate detected)',
@@ -97,13 +90,11 @@ export function createAgentRuntimesTool(definition, operation, context) {
97
90
  try {
98
91
  // Process parameters to handle JSON strings
99
92
  const processedParams = processParameters(params);
100
- console.log(`[agent-runtimes] Processed params:`, processedParams);
101
93
  // Use OperationRunner to execute operation with TOON format
102
94
  const result = await runner.execute(operation, processedParams, {
103
95
  ...context,
104
96
  format: 'toon', // Return human/LLM-readable string
105
97
  });
106
- console.log(`[agent-runtimes] Operation result:`, result);
107
98
  return result;
108
99
  }
109
100
  catch (error) {
@@ -136,6 +127,5 @@ export function createAllAgentRuntimesTools(definitions, operations, context) {
136
127
  const tool = createAgentRuntimesTool(definition, operation, context);
137
128
  tools.push(tool);
138
129
  }
139
- console.log(`[agent-runtimes Tools] Created ${tools.length} frontend tools`);
140
130
  return tools;
141
131
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AI Agent model
3
3
  */
4
- import type { AgentSpec } from './agentspecs';
4
+ import type { Agentspec } from './agentspecs';
5
5
  import type { AgentConnection } from './connection';
6
6
  export type AgentLibrary = 'pydantic-ai' | 'langchain' | 'google-adk';
7
7
  /**
@@ -51,7 +51,7 @@ export type AgentRuntimeData = {
51
51
  ingress?: string;
52
52
  url?: string;
53
53
  token?: string;
54
- agentSpec?: AgentSpec;
54
+ agentSpec?: Agentspec;
55
55
  agent_spec_id?: string;
56
56
  billable_account_uid?: string;
57
57
  billable_account_type?: 'user' | 'organization' | 'team';
@@ -67,7 +67,7 @@ export interface RunningAgent {
67
67
  podName: string;
68
68
  /** Agent display name */
69
69
  name: string;
70
- /** AgentSpec ID used to create the agent */
70
+ /** Agentspec ID used to create the agent */
71
71
  specId?: string;
72
72
  /** Current agent status */
73
73
  status: AgentStatus;
@@ -14,7 +14,7 @@ import type { AgentCodemodeConfig, AgentAdvancedConfig } from './config';
14
14
  * Defines the configuration for a reusable agent template that can be
15
15
  * instantiated as an Agent Runtime.
16
16
  */
17
- export interface AgentSpec {
17
+ export interface Agentspec {
18
18
  /** Unique agent identifier */
19
19
  id: string;
20
20
  /** Version */
@@ -41,6 +41,8 @@ export interface AgentSpec {
41
41
  skills: SkillSpec[];
42
42
  /** Runtime tools available to this agent */
43
43
  tools?: ToolSpec[];
44
+ /** Disable tool approvals for this spec (default: false). */
45
+ disableToolApprovals?: boolean;
44
46
  /** Frontend tool sets available to this agent */
45
47
  frontendTools?: FrontendToolSpec[];
46
48
  /** Runtime environment name for this agent */
@@ -108,7 +110,7 @@ export interface AgentSpec {
108
110
  /**
109
111
  * Configuration for a subagent within an agent specification.
110
112
  */
111
- export interface SubAgentSpecConfig {
113
+ export interface SubAgentspecConfig {
112
114
  /** Unique identifier for the subagent */
113
115
  name: string;
114
116
  /** Brief description shown to the parent agent */
@@ -133,7 +135,7 @@ export interface SubAgentSpecConfig {
133
135
  */
134
136
  export interface SubAgentsConfig {
135
137
  /** List of subagent configurations */
136
- subagents: SubAgentSpecConfig[];
138
+ subagents: SubAgentspecConfig[];
137
139
  /** Default model for subagents that don't specify one */
138
140
  defaultModel?: string;
139
141
  /** Include a general-purpose fallback subagent */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Specification for an agent within a team.
3
3
  */
4
- export interface TeamAgentSpec {
4
+ export interface TeamAgentspec {
5
5
  /** Agent identifier within the team */
6
6
  id: string;
7
7
  /** Display name for the team agent */
@@ -121,7 +121,7 @@ export interface TeamSpec {
121
121
  /** Validation settings for the team */
122
122
  validation?: TeamValidationSpec;
123
123
  /** List of agents in the team */
124
- agents: TeamAgentSpec[];
124
+ agents: TeamAgentspec[];
125
125
  /** Reaction rules for automatic event handling */
126
126
  reactionRules?: TeamReactionRule[];
127
127
  /** Health monitoring configuration */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -132,7 +132,7 @@
132
132
  "@ag-ui/encoder": "^0.0.42",
133
133
  "@ag-ui/proto": "^0.0.42",
134
134
  "@agentclientprotocol/sdk": "^0.8.0",
135
- "@ai-sdk/react": "^4.0.0-beta.33",
135
+ "@ai-sdk/react": "^4.0.0-beta.116",
136
136
  "@anthropic-ai/sdk": "^0.52.0",
137
137
  "@datalayer/core": "^1.0.22",
138
138
  "@datalayer/icons-react": "^1.0.7",
@@ -199,7 +199,7 @@
199
199
  "@tanstack/react-query": "^5.90.6",
200
200
  "@toon-format/toon": "^1.3.0",
201
201
  "@xyflow/react": "^12.10.0",
202
- "ai": "^6.0.134",
202
+ "ai": "^7.0.0-beta.116",
203
203
  "ansi-to-html": "^0.7.2",
204
204
  "axios": "^1.7.7",
205
205
  "boring-avatars": "^2.0.1",
@@ -308,7 +308,7 @@
308
308
  },
309
309
  "resolutions": {
310
310
  "@langchain/core": "^0.3.80",
311
- "@ai-sdk/react": "^4.0.0-beta.33",
311
+ "@ai-sdk/react": "^4.0.0-beta.116",
312
312
  "@microsoft/fast-colors": "5.3.1",
313
313
  "@microsoft/fast-components": "2.30.6",
314
314
  "@microsoft/fast-element": "1.13.0",
@@ -318,7 +318,7 @@
318
318
  "@microsoft/load-themed-styles": "1.10.295",
319
319
  "@types/react": "18.3.20",
320
320
  "@types/react-dom": "18.3.6",
321
- "ai": "^6.0.134",
321
+ "ai": "^7.0.0-beta.116",
322
322
  "pyodide": "0.28.0",
323
323
  "react": "18.3.1",
324
324
  "react-dom": "18.3.1",
@@ -326,7 +326,7 @@
326
326
  },
327
327
  "overrides": {
328
328
  "@langchain/core": "^0.3.80",
329
- "@ai-sdk/react": "^4.0.0-beta.33",
329
+ "@ai-sdk/react": "^4.0.0-beta.116",
330
330
  "@microsoft/fast-colors": "5.3.1",
331
331
  "@microsoft/fast-components": "2.30.6",
332
332
  "@microsoft/fast-element": "1.13.0",
@@ -336,7 +336,7 @@
336
336
  "@microsoft/load-themed-styles": "1.10.295",
337
337
  "@types/react": "18.3.20",
338
338
  "@types/react-dom": "18.3.6",
339
- "ai": "^6.0.134",
339
+ "ai": "^7.0.0-beta.116",
340
340
  "pyodide": "0.28.0",
341
341
  "react": "18.3.1",
342
342
  "react-dom": "18.3.1",