@datalayer/agent-runtimes 1.5.88 → 1.5.90
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/dist-embed/datalayer-app-main.js +57 -40
- package/lib/apps/embed/element.js +20 -5
- package/lib/apps/embed/visitorApp.d.ts +23 -45
- package/lib/apps/embed/visitorApp.js +65 -13
- package/lib/apps/plugins/agent-outputs/sheets.d.ts +76 -0
- package/lib/apps/plugins/agent-outputs/sheets.js +230 -0
- package/lib/chat/messages/ChatMarkdown.d.ts +3 -1
- package/lib/chat/messages/ChatMarkdown.js +4 -1
- package/lib/chat/messages/codeBlocks.d.ts +50 -0
- package/lib/chat/messages/codeBlocks.js +81 -0
- package/lib/components/teams/A2ATeamGraph.d.ts +28 -7
- package/lib/components/teams/A2ATeamGraph.js +64 -27
- package/lib/components/teams/a2aTeamFlow.d.ts +16 -7
- package/lib/components/teams/a2aTeamFlow.js +17 -14
- package/lib/examples/AgentOutputsExample.d.ts +7 -0
- package/lib/examples/AgentOutputsExample.js +47 -7
- package/lib/examples/utils/agentOutputsPlugins.d.ts +2 -0
- package/lib/examples/utils/agentOutputsPlugins.js +27 -0
- package/lib/portable/hosts/agentClient.d.ts +8 -0
- package/lib/portable/hosts/agentClient.js +2 -0
- package/lib/portable/hosts/approvalRenderers.d.ts +10 -2
- package/lib/portable/hosts/approvalRenderers.js +81 -2
- package/lib/portable/hosts/contracts.d.ts +1 -0
- package/lib/portable/hosts/contracts.js +2 -0
- package/lib/portable/hosts/contracts.json +56 -2
- package/lib/specs/agents/agents.js +30 -8
- package/lib/specs/frontendTools.d.ts +1 -0
- package/lib/specs/frontendTools.js +18 -0
- package/lib/specs/mcpServers.js +20 -50
- package/lib/types/mcp.d.ts +4 -2
- package/package.json +2 -1
- package/scripts/codegen/generate_mcp_servers.py +35 -20
|
@@ -105,6 +105,11 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
|
|
|
105
105
|
icon = f'"{spec.get("icon")}"' if spec.get("icon") else "None"
|
|
106
106
|
emoji = f'"{spec.get("emoji")}"' if spec.get("emoji") else "None"
|
|
107
107
|
|
|
108
|
+
# A remote server names no command: it is reached at its url with its
|
|
109
|
+
# headers (`transport: streamable-http`, the Datalayer gateway's
|
|
110
|
+
# toolsets). A local one names the command that runs it.
|
|
111
|
+
command = f'"{spec["command"]}"' if spec.get("command") else "None"
|
|
112
|
+
|
|
108
113
|
lines.extend(
|
|
109
114
|
[
|
|
110
115
|
f"{const_name} = MCPServer(",
|
|
@@ -114,17 +119,26 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
|
|
|
114
119
|
f' description="{spec["description"]}",',
|
|
115
120
|
f" icon={icon},",
|
|
116
121
|
f" emoji={emoji},",
|
|
117
|
-
f
|
|
122
|
+
f" command={command},",
|
|
118
123
|
f" args={args_formatted},",
|
|
119
124
|
f' transport="{spec.get("transport", "stdio")}",',
|
|
120
125
|
f" enabled={spec.get('enabled', False)},",
|
|
121
126
|
" tools=[],",
|
|
122
127
|
]
|
|
123
128
|
)
|
|
124
|
-
#
|
|
125
|
-
#
|
|
129
|
+
# Where an HTTP server is reached: a remote one is connected to there
|
|
130
|
+
# (`odoo-accounting`), a local one's command listens there (W-02,
|
|
131
|
+
# `google-workspace`).
|
|
126
132
|
if spec.get("url"):
|
|
127
133
|
lines.append(f' url="{spec["url"]}",')
|
|
134
|
+
# The headers a remote server is sent with every request, their
|
|
135
|
+
# `${VAR}` expanded as it starts (the bearer among them).
|
|
136
|
+
headers = spec.get("headers") or {}
|
|
137
|
+
if headers:
|
|
138
|
+
lines.append(" headers={")
|
|
139
|
+
for key, value in headers.items():
|
|
140
|
+
lines.append(f' "{key}": "{value}",')
|
|
141
|
+
lines.append(" },")
|
|
128
142
|
|
|
129
143
|
# Add env field if present
|
|
130
144
|
if env_formatted:
|
|
@@ -285,8 +299,20 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
|
|
|
285
299
|
f" icon: {icon},",
|
|
286
300
|
f" emoji: {emoji},",
|
|
287
301
|
f" url: '{spec.get('url', '')}',",
|
|
288
|
-
f" command: '{spec['command']}',",
|
|
302
|
+
*([f" command: '{spec['command']}',"] if spec.get("command") else []),
|
|
289
303
|
f" args: {args_formatted},",
|
|
304
|
+
*(
|
|
305
|
+
[
|
|
306
|
+
" headers: {"
|
|
307
|
+
+ ", ".join(
|
|
308
|
+
f"'{key}': '{value}'"
|
|
309
|
+
for key, value in (spec.get("headers") or {}).items()
|
|
310
|
+
)
|
|
311
|
+
+ "},"
|
|
312
|
+
]
|
|
313
|
+
if spec.get("headers")
|
|
314
|
+
else []
|
|
315
|
+
),
|
|
290
316
|
f" transport: '{spec.get('transport', 'stdio')}',",
|
|
291
317
|
f" enabled: {str(spec.get('enabled', False)).lower()},",
|
|
292
318
|
" isAvailable: false,",
|
|
@@ -330,18 +356,6 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
|
|
|
330
356
|
|
|
331
357
|
def update_init_file(specs: list[dict[str, Any]], init_file: Path) -> None:
|
|
332
358
|
"""Update the __init__.py file with correct imports based on generated specs."""
|
|
333
|
-
# Generate list of MCP server constant names
|
|
334
|
-
server_constants = []
|
|
335
|
-
for spec in specs:
|
|
336
|
-
server_id = spec["id"]
|
|
337
|
-
version = spec.get("version", "0.0.1")
|
|
338
|
-
const_name = (
|
|
339
|
-
server_id.upper().replace("-", "_")
|
|
340
|
-
+ "_MCP_SERVER"
|
|
341
|
-
+ version_suffix(version)
|
|
342
|
-
)
|
|
343
|
-
server_constants.append(const_name)
|
|
344
|
-
|
|
345
359
|
# Read the current __init__.py
|
|
346
360
|
init_content = init_file.read_text()
|
|
347
361
|
|
|
@@ -360,9 +374,12 @@ def update_init_file(specs: list[dict[str, Any]], init_file: Path) -> None:
|
|
|
360
374
|
return
|
|
361
375
|
|
|
362
376
|
# Generate new import lines - all names sorted alphabetically (ruff/isort order)
|
|
377
|
+
# Only the catalogue and its readers are re-exported: entries are read by
|
|
378
|
+
# id, never by a version-named constant (decided 14 October 2026), so the
|
|
379
|
+
# *_MCP_SERVER_<version> constants stay in catalog_mcp_servers alone and a
|
|
380
|
+
# version bump touches no caller (test_catalogue_by_id.py holds it).
|
|
363
381
|
all_names = sorted(
|
|
364
|
-
|
|
365
|
-
+ [
|
|
382
|
+
[
|
|
366
383
|
"MCP_SERVER_CATALOG",
|
|
367
384
|
"check_env_vars_available",
|
|
368
385
|
"get_catalog_server",
|
|
@@ -397,8 +414,6 @@ def update_init_file(specs: list[dict[str, Any]], init_file: Path) -> None:
|
|
|
397
414
|
' "get_catalog_server",',
|
|
398
415
|
' "list_catalog_servers",',
|
|
399
416
|
]
|
|
400
|
-
for const in sorted(server_constants):
|
|
401
|
-
all_entries.append(f' "{const}",')
|
|
402
417
|
all_entries.append("]")
|
|
403
418
|
|
|
404
419
|
# Replace the section
|