@datalayer/agent-runtimes 1.3.114 → 1.4.0
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/chunks/{ChatView-D41Nx5rC.js → ChatView-BpKZPdcp.js} +4 -4
- package/dist-embed/datalayer-app-main.js +150 -150
- package/lib/apps/apps/appspec.d.ts +13 -0
- package/lib/apps/apps/appspec.js +71 -0
- package/lib/apps/apps/checks.d.ts +1 -1
- package/lib/apps/apps/checks.js +2 -2
- package/lib/apps/apps/customComponents.js +1 -1
- package/lib/apps/core/canvasBlocks.d.ts +3 -3
- package/lib/apps/core/canvasParts.d.ts +6 -4
- package/lib/apps/embed/AppEmbed.js +3 -7
- package/lib/apps/embed/embedSession.d.ts +8 -4
- package/lib/apps/embed/embedSession.js +16 -9
- package/lib/apps/plugins/a2ui-surface/AnswerShows.d.ts +21 -0
- package/lib/apps/plugins/a2ui-surface/AnswerShows.js +29 -0
- package/lib/apps/plugins/a2ui-surface/SurfaceToolResult.js +4 -7
- package/lib/apps/plugins/a2ui-surface/index.d.ts +2 -1
- package/lib/apps/plugins/a2ui-surface/index.js +10 -1
- package/lib/apps/plugins/a2ui-surface/toolResult.d.ts +20 -11
- package/lib/apps/plugins/a2ui-surface/toolResult.js +27 -11
- package/lib/apps/plugins/app-components/index.d.ts +1 -1
- package/lib/apps/plugins/app-components/index.js +2 -2
- package/lib/apps/plugins/app-elements/AppElements.d.ts +3 -3
- package/lib/apps/plugins/app-elements/AppElements.js +5 -20
- package/lib/apps/plugins/app-elements/QuestionView.d.ts +28 -0
- package/lib/apps/plugins/app-elements/QuestionView.js +57 -0
- package/lib/apps/plugins/app-elements/index.d.ts +7 -4
- package/lib/apps/plugins/app-elements/index.js +14 -5
- package/lib/apps/plugins/canvas-blocks/index.d.ts +13 -13
- package/lib/apps/plugins/canvas-blocks/index.js +24 -24
- package/lib/apps/plugins/canvas-parts/index.d.ts +7 -1
- package/lib/apps/plugins/canvas-parts/index.js +36 -0
- package/lib/apps/plugins/chat/ChatView.js +7 -0
- package/lib/chat/base/ChatBase.js +234 -43
- package/lib/chat/base/loopElement.d.ts +16 -17
- package/lib/chat/base/loopElement.js +11 -27
- package/lib/chat/base/loopStep.d.ts +15 -15
- package/lib/chat/base/loopStep.js +10 -13
- package/lib/chat/base/loopWindow.d.ts +15 -20
- package/lib/chat/base/loopWindow.js +26 -27
- package/lib/chat/base/uiOps.d.ts +96 -0
- package/lib/chat/base/uiOps.js +251 -0
- package/lib/chat/messages/ChatMessageList.d.ts +8 -1
- package/lib/chat/messages/ChatMessageList.js +4 -4
- package/lib/components/a2ui/datalayer/Chart.d.ts +1 -1
- package/lib/components/a2ui/datalayer/schema.js +1 -1
- package/lib/components/teams/AnswerSurfaces.d.ts +3 -2
- package/lib/components/teams/AnswerSurfaces.js +7 -7
- package/lib/components/teams/useA2ATeam.d.ts +1 -1
- package/lib/config/AgentConfiguration.d.ts +1 -1
- package/lib/protocols/AGUIAdapter.d.ts +7 -0
- package/lib/protocols/AGUIAdapter.js +43 -3
- package/lib/specs/agents/agents.js +338 -169
- package/lib/specs/apps.js +47 -0
- package/lib/specs/appspecSchema.js +16 -0
- package/lib/specs/cogs.js +6 -3
- package/lib/specs/index.d.ts +2 -1
- package/lib/specs/index.js +2 -1
- package/lib/specs/protocols.d.ts +24 -0
- package/lib/specs/protocols.js +197 -0
- package/lib/specs/ui.d.ts +21 -0
- package/lib/specs/{uiPlugins.js → ui.js} +14 -14
- package/lib/types/agentspecs.d.ts +51 -5
- package/lib/types/messages.d.ts +7 -0
- package/lib/types/protocol.d.ts +8 -0
- package/package.json +2 -2
- package/scripts/codegen/generate_agents.py +43 -8
- package/scripts/codegen/generate_protocols.py +207 -0
- package/scripts/codegen/generate_sandbox_agents.py +1 -1
- package/scripts/codegen/{generate_ui_plugins.py → generate_ui.py} +40 -40
- package/scripts/gen_workers.py +2 -2
- package/lib/chat/base/loopMessage.d.ts +0 -37
- package/lib/chat/base/loopMessage.js +0 -37
- package/lib/specs/uiPlugins.d.ts +0 -21
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
-
* Distributed under the terms of the Modified BSD License.
|
|
4
|
-
*/
|
|
5
|
-
/** The `CUSTOM` event's name. */
|
|
6
|
-
export const LOOP_MESSAGE = 'loop.message';
|
|
7
|
-
/** The change an activity says, or `null` when it says none. */
|
|
8
|
-
export function loopMessageChange(activity) {
|
|
9
|
-
if (!activity || activity.type !== LOOP_MESSAGE)
|
|
10
|
-
return null;
|
|
11
|
-
const data = activity.data;
|
|
12
|
-
if (!data || typeof data.id !== 'string' || !data.id)
|
|
13
|
-
return null;
|
|
14
|
-
if (data.removed === true)
|
|
15
|
-
return { id: data.id, removed: true };
|
|
16
|
-
if (typeof data.author === 'string' && data.author.trim()) {
|
|
17
|
-
return { id: data.id, author: data.author.trim() };
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
/** Who a message is by, as the chat draws a named voice. */
|
|
22
|
-
export function speakerOf(author) {
|
|
23
|
-
return { id: `author:${author}`, name: author };
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* The conversation with the change made: the message taken away, or given its
|
|
27
|
-
* author. Items that are not that message — tool calls among them — are left
|
|
28
|
-
* as they are.
|
|
29
|
-
*/
|
|
30
|
-
export function withLoopMessage(items, change) {
|
|
31
|
-
if ('removed' in change) {
|
|
32
|
-
return items.filter(item => item.id !== change.id);
|
|
33
|
-
}
|
|
34
|
-
return items.map(item => item.id === change.id
|
|
35
|
-
? { ...item, speaker: speakerOf(change.author) }
|
|
36
|
-
: item);
|
|
37
|
-
}
|
package/lib/specs/uiPlugins.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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 { ComponentSpec, 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[];
|
|
17
|
-
/** The visual components the enabled UI plugins render, by the name a surface gives them (LOOP C-13). */
|
|
18
|
-
export declare const COMPONENT_CATALOGUE: Record<string, ComponentSpec>;
|
|
19
|
-
/** The component a layout names, or undefined. */
|
|
20
|
-
export declare function getComponent(name: string): ComponentSpec | undefined;
|
|
21
|
-
export declare function listComponents(): ComponentSpec[];
|