@datalayer/agent-runtimes 1.0.4 → 1.0.6
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 +182 -1
- package/lib/AgentNode.d.ts +3 -0
- package/lib/AgentNode.js +676 -0
- package/lib/App.js +1 -1
- package/lib/agent-node/themeStore.d.ts +3 -0
- package/lib/agent-node/themeStore.js +156 -0
- package/lib/agent-node-main.d.ts +1 -0
- package/lib/agent-node-main.js +14 -0
- package/lib/agents/AgentDetails.d.ts +22 -1
- package/lib/agents/AgentDetails.js +34 -47
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +4 -2
- package/lib/chat/Chat.d.ts +5 -106
- package/lib/chat/Chat.js +20 -14
- package/lib/chat/ChatFloating.d.ts +7 -140
- package/lib/chat/ChatFloating.js +3 -3
- package/lib/chat/ChatPopupStandalone.d.ts +8 -47
- package/lib/chat/ChatPopupStandalone.js +3 -3
- package/lib/chat/ChatSidebar.d.ts +4 -69
- package/lib/chat/ChatSidebar.js +83 -51
- package/lib/chat/ChatStandalone.d.ts +4 -54
- package/lib/chat/ChatStandalone.js +3 -3
- package/lib/chat/base/ChatBase.js +1414 -174
- package/lib/chat/display/FloatingBrandButton.js +8 -1
- package/lib/chat/header/ChatHeader.d.ts +3 -1
- package/lib/chat/header/ChatHeader.js +15 -12
- package/lib/chat/header/ChatHeaderBase.d.ts +30 -5
- package/lib/chat/header/ChatHeaderBase.js +41 -16
- package/lib/chat/indicators/McpStatusIndicator.d.ts +7 -4
- package/lib/chat/indicators/McpStatusIndicator.js +7 -32
- package/lib/chat/indicators/SandboxStatusIndicator.d.ts +4 -1
- package/lib/chat/indicators/SandboxStatusIndicator.js +91 -56
- package/lib/chat/indicators/SkillsStatusIndicator.d.ts +7 -0
- package/lib/chat/indicators/SkillsStatusIndicator.js +88 -0
- package/lib/chat/indicators/index.d.ts +1 -0
- package/lib/chat/indicators/index.js +1 -0
- package/lib/chat/messages/ChatMessageList.d.ts +1 -1
- package/lib/chat/messages/ChatMessageList.js +154 -114
- package/lib/chat/messages/ChatMessages.js +6 -2
- package/lib/chat/prompt/InputFooter.d.ts +21 -6
- package/lib/chat/prompt/InputFooter.js +76 -20
- package/lib/chat/prompt/InputPrompt.d.ts +5 -1
- package/lib/chat/prompt/InputPrompt.js +4 -4
- package/lib/chat/prompt/InputPromptFooter.d.ts +3 -1
- package/lib/chat/prompt/InputPromptFooter.js +3 -3
- package/lib/chat/prompt/InputPromptLexical.d.ts +3 -1
- package/lib/chat/prompt/InputPromptLexical.js +12 -5
- package/lib/chat/prompt/InputPromptText.d.ts +3 -1
- package/lib/chat/prompt/InputPromptText.js +2 -2
- package/lib/chat/tools/ToolApprovalBanner.js +1 -1
- package/lib/chat/tools/ToolCallDisplay.d.ts +3 -1
- package/lib/chat/tools/ToolCallDisplay.js +2 -2
- package/lib/chat/usage/TokenUsageBar.js +20 -2
- package/lib/client/AgentRuntimesClientContext.d.ts +53 -0
- package/lib/client/AgentRuntimesClientContext.js +55 -0
- package/lib/client/AgentsMixin.d.ts +0 -18
- package/lib/client/AgentsMixin.js +20 -30
- package/lib/client/IAgentRuntimesClient.d.ts +215 -0
- package/lib/client/IAgentRuntimesClient.js +5 -0
- package/lib/client/SdkAgentRuntimesClient.d.ts +151 -0
- package/lib/client/SdkAgentRuntimesClient.js +134 -0
- package/lib/client/index.d.ts +4 -1
- package/lib/client/index.js +3 -1
- package/lib/components/NotificationEventCard.js +5 -1
- package/lib/config/AgentConfiguration.d.ts +22 -0
- package/lib/config/AgentConfiguration.js +319 -64
- package/lib/context/ContextDistribution.d.ts +3 -1
- package/lib/context/ContextDistribution.js +8 -27
- package/lib/context/ContextInspector.d.ts +3 -1
- package/lib/context/ContextInspector.js +19 -67
- package/lib/context/ContextPanel.d.ts +3 -1
- package/lib/context/ContextPanel.js +104 -64
- package/lib/context/ContextUsage.d.ts +3 -1
- package/lib/context/ContextUsage.js +3 -3
- package/lib/context/CostTracker.d.ts +9 -3
- package/lib/context/CostTracker.js +26 -47
- package/lib/context/CostUsageChart.d.ts +12 -0
- package/lib/context/CostUsageChart.js +378 -0
- package/lib/context/GraphFlowChart.d.ts +16 -0
- package/lib/context/GraphFlowChart.js +182 -0
- package/lib/context/TokenUsageChart.d.ts +8 -1
- package/lib/context/TokenUsageChart.js +349 -211
- package/lib/context/TurnGraphChart.d.ts +39 -0
- package/lib/context/TurnGraphChart.js +538 -0
- package/lib/context/otelWsPool.d.ts +20 -0
- package/lib/context/otelWsPool.js +69 -0
- package/lib/examples/A2UiComponentGalleryExample.d.ts +0 -17
- package/lib/examples/A2UiComponentGalleryExample.js +315 -522
- package/lib/examples/A2UiContactCardExample.d.ts +0 -18
- package/lib/examples/A2UiContactCardExample.js +154 -411
- package/lib/examples/A2UiRestaurantExample.d.ts +0 -30
- package/lib/examples/A2UiRestaurantExample.js +114 -212
- package/lib/examples/A2UiViewerExample.d.ts +0 -18
- package/lib/examples/A2UiViewerExample.js +283 -532
- package/lib/examples/AgUiBackendToolRenderingExample.js +1 -1
- package/lib/examples/AgUiHaikuGenUiExample.d.ts +1 -1
- package/lib/examples/AgUiHaikuGenUiExample.js +1 -1
- package/lib/examples/AgUiSharedStateExample.js +2 -1
- package/lib/examples/AgentCheckpointsExample.js +14 -28
- package/lib/examples/AgentCodemodeExample.d.ts +4 -6
- package/lib/examples/AgentCodemodeExample.js +603 -169
- package/lib/examples/AgentEvalsExample.js +339 -53
- package/lib/examples/AgentGuardrailsExample.js +383 -66
- package/lib/examples/AgentHooksExample.d.ts +3 -0
- package/lib/examples/AgentHooksExample.js +122 -0
- package/lib/examples/AgentInferenceProviderExample.d.ts +3 -0
- package/lib/examples/AgentInferenceProviderExample.js +329 -0
- package/lib/examples/AgentMCPExample.d.ts +3 -0
- package/lib/examples/AgentMCPExample.js +481 -0
- package/lib/examples/AgentMemoryExample.d.ts +1 -2
- package/lib/examples/AgentMemoryExample.js +78 -33
- package/lib/examples/AgentMonitoringExample.js +261 -200
- package/lib/examples/AgentNotificationsExample.d.ts +1 -2
- package/lib/examples/AgentNotificationsExample.js +114 -33
- package/lib/examples/AgentOtelExample.js +32 -42
- package/lib/examples/AgentOutputsExample.d.ts +11 -6
- package/lib/examples/AgentOutputsExample.js +433 -81
- package/lib/examples/AgentParametersExample.d.ts +3 -0
- package/lib/examples/AgentParametersExample.js +248 -0
- package/lib/examples/AgentSandboxExample.d.ts +3 -3
- package/lib/examples/AgentSandboxExample.js +74 -45
- package/lib/examples/AgentSkillsExample.js +95 -103
- package/lib/examples/AgentSubagentsExample.d.ts +14 -0
- package/lib/examples/AgentSubagentsExample.js +228 -0
- package/lib/examples/AgentToolApprovalsExample.js +49 -561
- package/lib/examples/AgentTriggersExample.js +823 -569
- package/lib/examples/{AgentspecExample.d.ts → AgentspecsExample.d.ts} +2 -2
- package/lib/examples/AgentspecsExample.js +1096 -0
- package/lib/examples/ChatCustomExample.js +16 -28
- package/lib/examples/ChatExample.js +13 -29
- package/lib/examples/CopilotKitLexicalExample.js +2 -1
- package/lib/examples/CopilotKitNotebookExample.js +2 -1
- package/lib/examples/HomeExample.d.ts +15 -0
- package/lib/examples/HomeExample.js +77 -0
- package/lib/examples/Lexical2Example.js +4 -2
- package/lib/examples/{LexicalExample.d.ts → LexicalAgentExample.d.ts} +4 -4
- package/lib/examples/{LexicalExample.js → LexicalAgentExample.js} +66 -17
- package/lib/examples/{LexicalSidebarExample.d.ts → LexicalAgentSidebarExample.d.ts} +5 -5
- package/lib/examples/LexicalAgentSidebarExample.js +261 -0
- package/lib/examples/NotebookAgentExample.d.ts +9 -0
- package/lib/examples/NotebookAgentExample.js +192 -0
- package/lib/examples/{NotebookSidebarExample.d.ts → NotebookAgentSidebarExample.d.ts} +2 -2
- package/lib/examples/NotebookAgentSidebarExample.js +221 -0
- package/lib/examples/{DatalayerNotebookExample.d.ts → NotebookCollaborationExample.d.ts} +4 -4
- package/lib/examples/{DatalayerNotebookExample.js → NotebookCollaborationExample.js} +3 -3
- package/lib/examples/NotebookExample.d.ts +4 -7
- package/lib/examples/NotebookExample.js +14 -146
- package/lib/examples/components/AuthRequiredView.d.ts +6 -0
- package/lib/examples/components/AuthRequiredView.js +33 -0
- package/lib/examples/components/ExampleWrapper.d.ts +9 -3
- package/lib/examples/components/ExampleWrapper.js +45 -9
- package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.js +1 -1
- package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.js +1 -1
- package/lib/examples/{ag-ui → components}/haiku/index.d.ts +1 -1
- package/lib/examples/{ag-ui → components}/haiku/index.js +1 -1
- package/lib/examples/components/index.d.ts +3 -0
- package/lib/examples/components/index.js +4 -0
- package/lib/examples/{ag-ui → components}/weather/index.d.ts +1 -1
- package/lib/examples/{ag-ui → components}/weather/index.js +1 -1
- package/lib/examples/example-selector.d.ts +17 -4
- package/lib/examples/example-selector.js +108 -41
- package/lib/examples/index.d.ts +10 -6
- package/lib/examples/index.js +10 -6
- package/lib/examples/lexical/initial-content.json +6 -6
- package/lib/examples/main.js +257 -27
- package/lib/examples/utils/a2ui.d.ts +18 -0
- package/lib/examples/utils/a2ui.js +69 -0
- package/lib/examples/utils/a2uiMarkdownProvider.d.ts +7 -0
- package/lib/examples/utils/a2uiMarkdownProvider.js +9 -0
- package/lib/examples/utils/agentId.d.ts +18 -0
- package/lib/examples/utils/agentId.js +54 -0
- package/lib/examples/utils/agents/earthquake-detector.json +11 -11
- package/lib/examples/utils/agents/sales-forecaster.json +11 -11
- package/lib/examples/utils/agents/social-post-generator.json +11 -11
- package/lib/examples/utils/agents/stock-market.json +11 -11
- package/lib/examples/utils/examplesStore.js +82 -27
- package/lib/examples/utils/useExampleAgentRuntimesUrl.d.ts +5 -0
- package/lib/examples/utils/useExampleAgentRuntimesUrl.js +19 -0
- package/lib/hooks/index.d.ts +8 -8
- package/lib/hooks/index.js +7 -7
- package/lib/hooks/useA2A.d.ts +2 -3
- package/lib/hooks/useAIAgentsWebSocket.d.ts +43 -4
- package/lib/hooks/useAIAgentsWebSocket.js +153 -12
- package/lib/hooks/useAcp.d.ts +1 -2
- package/lib/hooks/useAgUi.d.ts +1 -1
- package/lib/hooks/{useAgents.d.ts → useAgentRuntimes.d.ts} +70 -4
- package/lib/hooks/{useAgents.js → useAgentRuntimes.js} +237 -32
- package/lib/hooks/useAgentsCatalog.js +1 -1
- package/lib/hooks/useAgentsService.d.ts +2 -2
- package/lib/hooks/useAgentsService.js +7 -7
- package/lib/hooks/useCheckpoints.js +1 -1
- package/lib/hooks/useConfig.d.ts +4 -1
- package/lib/hooks/useConfig.js +10 -3
- package/lib/hooks/useContextSnapshot.d.ts +9 -4
- package/lib/hooks/useContextSnapshot.js +9 -37
- package/lib/hooks/useMonitoring.js +3 -0
- package/lib/hooks/useSandbox.d.ts +20 -8
- package/lib/hooks/useSandbox.js +105 -40
- package/lib/hooks/useSkills.d.ts +23 -5
- package/lib/hooks/useSkills.js +94 -39
- package/lib/hooks/useToolApprovals.d.ts +60 -36
- package/lib/hooks/useToolApprovals.js +318 -69
- package/lib/hooks/useVercelAI.d.ts +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1 -0
- package/lib/inference/index.d.ts +0 -1
- package/lib/middleware/index.d.ts +0 -1
- package/lib/protocols/AGUIAdapter.js +6 -0
- package/lib/protocols/VercelAIAdapter.d.ts +7 -0
- package/lib/protocols/VercelAIAdapter.js +59 -7
- package/lib/specs/agents/agents.d.ts +21 -4
- package/lib/specs/agents/agents.js +2879 -316
- package/lib/specs/agents/index.js +3 -1
- package/lib/specs/benchmarks.d.ts +20 -0
- package/lib/specs/benchmarks.js +205 -0
- package/lib/specs/envvars.js +27 -20
- package/lib/specs/evals.d.ts +10 -9
- package/lib/specs/evals.js +128 -88
- package/lib/specs/events.d.ts +3 -10
- package/lib/specs/events.js +127 -84
- package/lib/specs/frontendTools.js +2 -2
- package/lib/specs/guardrails.d.ts +0 -7
- package/lib/specs/guardrails.js +240 -159
- package/lib/specs/mcpServers.js +35 -6
- package/lib/specs/memory.d.ts +0 -2
- package/lib/specs/memory.js +4 -17
- package/lib/specs/models.d.ts +0 -2
- package/lib/specs/models.js +20 -15
- package/lib/specs/notifications.js +102 -18
- package/lib/specs/outputs.js +15 -9
- package/lib/specs/personas.d.ts +41 -0
- package/lib/specs/personas.js +168 -0
- package/lib/specs/skills.d.ts +1 -1
- package/lib/specs/skills.js +23 -23
- package/lib/specs/teams/index.js +3 -1
- package/lib/specs/teams/teams.js +468 -348
- package/lib/specs/tools.js +4 -4
- package/lib/specs/triggers.js +61 -11
- package/lib/stores/agentRuntimeStore.d.ts +208 -0
- package/lib/stores/agentRuntimeStore.js +650 -0
- package/lib/stores/conversationStore.js +2 -2
- package/lib/stores/index.d.ts +1 -1
- package/lib/stores/index.js +1 -1
- package/lib/tools/adapters/copilotkit/lexicalHooks.d.ts +1 -2
- package/lib/tools/adapters/copilotkit/lexicalHooks.js +1 -3
- package/lib/tools/adapters/copilotkit/notebookHooks.d.ts +1 -2
- package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -3
- package/lib/tools/index.d.ts +0 -2
- package/lib/tools/index.js +0 -1
- package/lib/types/agents-lifecycle.d.ts +18 -0
- package/lib/types/agents.d.ts +6 -0
- package/lib/types/agentspecs.d.ts +54 -1
- package/lib/types/benchmarks.d.ts +43 -0
- package/lib/types/benchmarks.js +5 -0
- package/lib/types/chat.d.ts +325 -8
- package/lib/types/context.d.ts +27 -0
- package/lib/types/cost.d.ts +2 -2
- package/lib/types/evals.d.ts +26 -17
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +3 -0
- package/lib/types/mcp.d.ts +8 -0
- package/lib/types/models.d.ts +2 -2
- package/lib/types/personas.d.ts +25 -0
- package/lib/types/personas.js +5 -0
- package/lib/types/skills.d.ts +43 -1
- package/lib/types/stream.d.ts +110 -0
- package/lib/types/stream.js +36 -0
- package/lib/utils/utils.d.ts +9 -5
- package/lib/utils/utils.js +9 -5
- package/package.json +19 -11
- package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_benchmarks.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/generate_events.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
- package/scripts/codegen/generate_agents.py +187 -45
- package/scripts/codegen/generate_benchmarks.py +441 -0
- package/scripts/codegen/generate_evals.py +94 -16
- package/scripts/codegen/generate_events.py +35 -14
- package/scripts/codegen/generate_personas.py +319 -0
- package/scripts/codegen/generate_skills.py +9 -9
- package/scripts/sync-jupyter.sh +26 -7
- package/lib/api/tool-approvals.d.ts +0 -62
- package/lib/api/tool-approvals.js +0 -145
- package/lib/examples/AgentspecExample.js +0 -705
- package/lib/examples/LexicalSidebarExample.js +0 -163
- package/lib/examples/NotebookSidebarExample.js +0 -119
- package/lib/examples/NotebookSimpleExample.d.ts +0 -6
- package/lib/examples/NotebookSimpleExample.js +0 -22
- package/lib/examples/ag-ui/index.d.ts +0 -10
- package/lib/examples/ag-ui/index.js +0 -16
- package/lib/hooks/useAgentsRegistry.d.ts +0 -10
- package/lib/hooks/useAgentsRegistry.js +0 -20
- package/lib/stores/agentsStore.d.ts +0 -123
- package/lib/stores/agentsStore.js +0 -270
- /package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.d.ts +0 -0
- /package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.d.ts +0 -0
- /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.d.ts +0 -0
- /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.js +0 -0
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This folder contains weather-specific components that demonstrate
|
|
5
5
|
* inline tool rendering similar to CopilotKit's useCopilotAction pattern.
|
|
6
6
|
*
|
|
7
|
-
* @module examples/
|
|
7
|
+
* @module examples/components/weather
|
|
8
8
|
*/
|
|
9
9
|
export { InlineWeatherCard, type InlineWeatherCardProps, type WeatherResult, } from './InlineWeatherCard';
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* This folder contains weather-specific components that demonstrate
|
|
9
9
|
* inline tool rendering similar to CopilotKit's useCopilotAction pattern.
|
|
10
10
|
*
|
|
11
|
-
* @module examples/
|
|
11
|
+
* @module examples/components/weather
|
|
12
12
|
*/
|
|
13
13
|
export { InlineWeatherCard, } from './InlineWeatherCard';
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
+
export type ExampleLoader = () => Promise<{
|
|
2
|
+
default: React.ComponentType;
|
|
3
|
+
}>;
|
|
4
|
+
export interface ExampleEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
loader: ExampleLoader;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Central examples registry. Keep all example definitions in this list so
|
|
13
|
+
* the header dropdown and the home cards always stay in sync.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EXAMPLE_ENTRIES: ExampleEntry[];
|
|
1
16
|
/**
|
|
2
17
|
* Registry of available examples with dynamic imports.
|
|
3
|
-
* Add new examples here to make them available in the example runner.
|
|
4
18
|
*/
|
|
5
|
-
export declare const EXAMPLES: Record<string,
|
|
6
|
-
default: React.ComponentType;
|
|
7
|
-
}>>;
|
|
19
|
+
export declare const EXAMPLES: Record<string, ExampleLoader>;
|
|
8
20
|
/**
|
|
9
21
|
* Get the list of available example names
|
|
10
22
|
*/
|
|
11
23
|
export declare function getExampleNames(): string[];
|
|
24
|
+
export declare function getExampleEntries(): ExampleEntry[];
|
|
12
25
|
/**
|
|
13
26
|
* Get the selected example based on environment variable
|
|
14
27
|
* Falls back to 'NotebookExample' if not specified or invalid
|
|
@@ -3,54 +3,121 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="vite/client" />
|
|
6
|
+
const DISPLAY_NAME_EXCEPTIONS = [
|
|
7
|
+
[/\bAg Ui\b/g, 'AG-UI'],
|
|
8
|
+
[/\bA2 Ui\b/g, 'A2UI'],
|
|
9
|
+
[/\bCopilot Kit\b/g, 'CopilotKit'],
|
|
10
|
+
[/\bGen Ui\b/g, 'Gen UI'],
|
|
11
|
+
[/\bM C P\b/g, 'MCP'],
|
|
12
|
+
[/\bOtel\b/g, 'OTEL'],
|
|
13
|
+
[/\bAgent Specs\b/g, 'Agent Specifications'],
|
|
14
|
+
];
|
|
15
|
+
function humanizeExampleName(name) {
|
|
16
|
+
let result = name
|
|
17
|
+
.replace(/Example$/, '')
|
|
18
|
+
.replace(/([A-Z])/g, ' $1')
|
|
19
|
+
.replace(/^\s+/, '')
|
|
20
|
+
.trim();
|
|
21
|
+
for (const [pattern, replacement] of DISPLAY_NAME_EXCEPTIONS) {
|
|
22
|
+
result = result.replace(pattern, replacement);
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
function inferTags(id) {
|
|
27
|
+
const tags = new Set(['example']);
|
|
28
|
+
if (id.startsWith('Agent'))
|
|
29
|
+
tags.add('agent');
|
|
30
|
+
if (id.startsWith('AgUi'))
|
|
31
|
+
tags.add('ag-ui');
|
|
32
|
+
if (id.startsWith('A2Ui'))
|
|
33
|
+
tags.add('a2ui');
|
|
34
|
+
if (id.includes('Notebook'))
|
|
35
|
+
tags.add('notebook');
|
|
36
|
+
if (id.includes('Lexical'))
|
|
37
|
+
tags.add('lexical');
|
|
38
|
+
if (id.includes('Chat'))
|
|
39
|
+
tags.add('chat');
|
|
40
|
+
if (id.includes('Sandbox'))
|
|
41
|
+
tags.add('sandbox');
|
|
42
|
+
if (id.includes('Monitoring') || id.includes('Otel'))
|
|
43
|
+
tags.add('observability');
|
|
44
|
+
if (id.includes('Skills'))
|
|
45
|
+
tags.add('skills');
|
|
46
|
+
if (id.includes('Subagent'))
|
|
47
|
+
tags.add('subagents');
|
|
48
|
+
if (id.includes('MCP'))
|
|
49
|
+
tags.add('mcp');
|
|
50
|
+
return Array.from(tags);
|
|
51
|
+
}
|
|
52
|
+
function makeEntry(id, loader, description, tags) {
|
|
53
|
+
return {
|
|
54
|
+
id,
|
|
55
|
+
title: humanizeExampleName(id),
|
|
56
|
+
description,
|
|
57
|
+
tags: tags ?? inferTags(id),
|
|
58
|
+
loader,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Central examples registry. Keep all example definitions in this list so
|
|
63
|
+
* the header dropdown and the home cards always stay in sync.
|
|
64
|
+
*/
|
|
65
|
+
export const EXAMPLE_ENTRIES = [
|
|
66
|
+
makeEntry('HomeExample', () => import('./HomeExample'), 'Browse all available examples with search and quick navigation.', ['home', 'navigation']),
|
|
67
|
+
makeEntry('A2UiComponentGalleryExample', () => import('./A2UiComponentGalleryExample'), 'Gallery showcasing A2UI component patterns.'),
|
|
68
|
+
makeEntry('A2UiContactCardExample', () => import('./A2UiContactCardExample'), 'A2UI example rendering contact card interactions.'),
|
|
69
|
+
makeEntry('A2UiRestaurantExample', () => import('./A2UiRestaurantExample'), 'A2UI restaurant flow example.'),
|
|
70
|
+
makeEntry('A2UiViewerExample', () => import('./A2UiViewerExample'), 'A2UI viewer integration example.'),
|
|
71
|
+
makeEntry('AgUiAgenticExample', () => import('./AgUiAgenticExample'), 'AG-UI agentic workflow example.'),
|
|
72
|
+
makeEntry('AgUiBackendToolRenderingExample', () => import('./AgUiBackendToolRenderingExample'), 'AG-UI backend tool rendering example.'),
|
|
73
|
+
makeEntry('AgUiHaikuGenUiExample', () => import('./AgUiHaikuGenUiExample'), 'AG-UI generative UI Haiku example.'),
|
|
74
|
+
makeEntry('AgUiHumanInTheLoopExample', () => import('./AgUiHumanInTheLoopExample'), 'AG-UI human-in-the-loop approvals example.'),
|
|
75
|
+
makeEntry('AgUiSharedStateExample', () => import('./AgUiSharedStateExample'), 'AG-UI shared state synchronization example.'),
|
|
76
|
+
makeEntry('AgUiToolsBasedGenUiExample', () => import('./AgUiToolsBasedGenUiExample'), 'AG-UI tool-based generative UI example.'),
|
|
77
|
+
makeEntry('AgentspecsExample', () => import('./AgentspecsExample'), 'Configure and run agents from specs and transports.'),
|
|
78
|
+
makeEntry('CellSimpleExample', () => import('./CellSimpleExample'), 'Simple Jupyter cell integration example.'),
|
|
79
|
+
makeEntry('ChatCustomExample', () => import('./ChatCustomExample'), 'Custom chat experience composition example.'),
|
|
80
|
+
makeEntry('ChatExample', () => import('./ChatExample'), 'Baseline chat integration example.'),
|
|
81
|
+
makeEntry('ChatStandaloneExample', () => import('./ChatStandaloneExample'), 'Standalone chat component usage example.'),
|
|
82
|
+
makeEntry('CopilotKitLexicalExample', () => import('./CopilotKitLexicalExample'), 'CopilotKit integration with Lexical editor.'),
|
|
83
|
+
makeEntry('CopilotKitNotebookExample', () => import('./CopilotKitNotebookExample'), 'CopilotKit integration with notebook workflows.'),
|
|
84
|
+
makeEntry('AgentCheckpointsExample', () => import('./AgentCheckpointsExample'), 'Checkpoint and resume lifecycle for agents.'),
|
|
85
|
+
makeEntry('AgentCodemodeExample', () => import('./AgentCodemodeExample'), 'Code mode execution and tool orchestration example.'),
|
|
86
|
+
makeEntry('AgentEvalsExample', () => import('./AgentEvalsExample'), 'Evaluation workflows for agent outputs.'),
|
|
87
|
+
makeEntry('AgentGuardrailsExample', () => import('./AgentGuardrailsExample'), 'Guardrails and safety checks for agent runs.'),
|
|
88
|
+
makeEntry('AgentHooksExample', () => import('./AgentHooksExample'), 'Pre-hooks and post-hooks lifecycle execution example.'),
|
|
89
|
+
makeEntry('AgentInferenceProviderExample', () => import('./AgentInferenceProviderExample'), 'Switch local and datalayer inference providers with live low-level provider events.', ['example', 'agent', 'inference', 'provider', 'runtime']),
|
|
90
|
+
makeEntry('AgentToolApprovalsExample', () => import('./AgentToolApprovalsExample'), 'Tool approval workflows and manual decisions.'),
|
|
91
|
+
makeEntry('AgentMemoryExample', () => import('./AgentMemoryExample'), 'Memory-aware conversation and retrieval example.'),
|
|
92
|
+
makeEntry('AgentSkillsExample', () => import('./AgentSkillsExample'), 'Skills discovery, execution, and monitoring example.'),
|
|
93
|
+
makeEntry('AgentMCPExample', () => import('./AgentMCPExample'), 'MCP servers and toolset integration example.'),
|
|
94
|
+
makeEntry('AgentOtelExample', () => import('./AgentOtelExample'), 'OpenTelemetry instrumentation and traces example.'),
|
|
95
|
+
makeEntry('AgentSandboxExample', () => import('./AgentSandboxExample'), 'Sandbox execution variants and context controls.'),
|
|
96
|
+
makeEntry('AgentMonitoringExample', () => import('./AgentMonitoringExample'), 'Runtime monitoring and live metrics example.'),
|
|
97
|
+
makeEntry('AgentSubagentsExample', () => import('./AgentSubagentsExample'), 'Multi-agent delegation with subagents-pydantic-ai.'),
|
|
98
|
+
makeEntry('AgentNotificationsExample', () => import('./AgentNotificationsExample'), 'Notifications and event routing example.'),
|
|
99
|
+
makeEntry('AgentOutputsExample', () => import('./AgentOutputsExample'), 'Structured outputs and rendering patterns.'),
|
|
100
|
+
makeEntry('AgentParametersExample', () => import('./AgentParametersExample'), 'Launch-time parameterized agent creation with JSON schema.'),
|
|
101
|
+
makeEntry('AgentTriggersExample', () => import('./AgentTriggersExample'), 'Scheduled and one-shot trigger flows.'),
|
|
102
|
+
makeEntry('LexicalAgentExample', () => import('./LexicalAgentExample'), 'Lexical document integration example.'),
|
|
103
|
+
makeEntry('LexicalAgentSidebarExample', () => import('./LexicalAgentSidebarExample'), 'Lexical with sidebar orchestration example.'),
|
|
104
|
+
makeEntry('NotebookAgentExample', () => import('./NotebookAgentExample'), 'Notebook orchestration and runtime example.'),
|
|
105
|
+
makeEntry('NotebookAgentSidebarExample', () => import('./NotebookAgentSidebarExample'), 'Notebook plus sidebar controls example.'),
|
|
106
|
+
makeEntry('NotebookExample', () => import('./NotebookExample'), 'Minimal notebook integration example.'),
|
|
107
|
+
makeEntry('NotebookCollaborationExample', () => import('./NotebookCollaborationExample'), 'Notebook collaboration runtime integration example.'),
|
|
108
|
+
];
|
|
6
109
|
/**
|
|
7
110
|
* Registry of available examples with dynamic imports.
|
|
8
|
-
* Add new examples here to make them available in the example runner.
|
|
9
111
|
*/
|
|
10
|
-
export const EXAMPLES =
|
|
11
|
-
// Lexical2Example: () => import('./Lexical2Example'),
|
|
12
|
-
A2UiComponentGalleryExample: () => import('./A2UiComponentGalleryExample'),
|
|
13
|
-
A2UiContactCardExample: () => import('./A2UiContactCardExample'),
|
|
14
|
-
A2UiRestaurantExample: () => import('./A2UiRestaurantExample'),
|
|
15
|
-
A2UiViewerExample: () => import('./A2UiViewerExample'),
|
|
16
|
-
AgUiAgenticExample: () => import('./AgUiAgenticExample'),
|
|
17
|
-
AgUiBackendToolRenderingExample: () => import('./AgUiBackendToolRenderingExample'),
|
|
18
|
-
AgUiHaikuGenUiExample: () => import('./AgUiHaikuGenUiExample'),
|
|
19
|
-
AgUiHumanInTheLoopExample: () => import('./AgUiHumanInTheLoopExample'),
|
|
20
|
-
AgUiSharedStateExample: () => import('./AgUiSharedStateExample'),
|
|
21
|
-
AgUiToolsBasedGenUiExample: () => import('./AgUiToolsBasedGenUiExample'),
|
|
22
|
-
AgentspecExample: () => import('./AgentspecExample'),
|
|
23
|
-
CellSimpleExample: () => import('./CellSimpleExample'),
|
|
24
|
-
ChatCustomExample: () => import('./ChatCustomExample'),
|
|
25
|
-
ChatExample: () => import('./ChatExample'),
|
|
26
|
-
ChatStandaloneExample: () => import('./ChatStandaloneExample'),
|
|
27
|
-
CopilotKitLexicalExample: () => import('./CopilotKitLexicalExample'),
|
|
28
|
-
CopilotKitNotebookExample: () => import('./CopilotKitNotebookExample'),
|
|
29
|
-
DatalayerNotebookExample: () => import('./DatalayerNotebookExample'),
|
|
30
|
-
AgentCheckpointsExample: () => import('./AgentCheckpointsExample'),
|
|
31
|
-
AgentCodemodeExample: () => import('./AgentCodemodeExample'),
|
|
32
|
-
AgentEvalsExample: () => import('./AgentEvalsExample'),
|
|
33
|
-
AgentGuardrailsExample: () => import('./AgentGuardrailsExample'),
|
|
34
|
-
AgentToolApprovalsExample: () => import('./AgentToolApprovalsExample'),
|
|
35
|
-
AgentMemoryExample: () => import('./AgentMemoryExample'),
|
|
36
|
-
AgentSkillsExample: () => import('./AgentSkillsExample'),
|
|
37
|
-
AgentOtelExample: () => import('./AgentOtelExample'),
|
|
38
|
-
AgentSandboxExample: () => import('./AgentSandboxExample'),
|
|
39
|
-
AgentMonitoringExample: () => import('./AgentMonitoringExample'),
|
|
40
|
-
AgentNotificationsExample: () => import('./AgentNotificationsExample'),
|
|
41
|
-
AgentOutputsExample: () => import('./AgentOutputsExample'),
|
|
42
|
-
AgentTriggersExample: () => import('./AgentTriggersExample'),
|
|
43
|
-
LexicalExample: () => import('./LexicalExample'),
|
|
44
|
-
LexicalSidebarExample: () => import('./LexicalSidebarExample'),
|
|
45
|
-
NotebookExample: () => import('./NotebookExample'),
|
|
46
|
-
NotebookSidebarExample: () => import('./NotebookSidebarExample'),
|
|
47
|
-
NotebookSimpleExample: () => import('./NotebookSimpleExample'),
|
|
48
|
-
};
|
|
112
|
+
export const EXAMPLES = Object.fromEntries(EXAMPLE_ENTRIES.map(entry => [entry.id, entry.loader]));
|
|
49
113
|
/**
|
|
50
114
|
* Get the list of available example names
|
|
51
115
|
*/
|
|
52
116
|
export function getExampleNames() {
|
|
53
|
-
return
|
|
117
|
+
return EXAMPLE_ENTRIES.map(entry => entry.id);
|
|
118
|
+
}
|
|
119
|
+
export function getExampleEntries() {
|
|
120
|
+
return [...EXAMPLE_ENTRIES];
|
|
54
121
|
}
|
|
55
122
|
/**
|
|
56
123
|
* Get the selected example based on environment variable
|
package/lib/examples/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as AgentspecsExample } from './AgentspecsExample';
|
|
2
2
|
export { default as A2UiComponentGalleryExample } from './A2UiComponentGalleryExample';
|
|
3
3
|
export { default as A2UiContactCardExample } from './A2UiContactCardExample';
|
|
4
4
|
export { default as A2UiRestaurantExample } from './A2UiRestaurantExample';
|
|
@@ -14,21 +14,25 @@ export { default as ChatStandaloneExample } from './ChatStandaloneExample';
|
|
|
14
14
|
export { default as CopilotKitLexicalExample } from './CopilotKitLexicalExample';
|
|
15
15
|
export { default as CopilotKitNotebookExample } from './CopilotKitNotebookExample';
|
|
16
16
|
export { default as CustomExample } from './ChatCustomExample';
|
|
17
|
-
export { default as
|
|
17
|
+
export { default as NotebookCollaborationExample } from './NotebookCollaborationExample';
|
|
18
18
|
export { default as AgentCheckpointsExample } from './AgentCheckpointsExample';
|
|
19
19
|
export { default as AgentCodemodeExample } from './AgentCodemodeExample';
|
|
20
20
|
export { default as AgentEvalsExample } from './AgentEvalsExample';
|
|
21
21
|
export { default as AgentGuardrailsExample } from './AgentGuardrailsExample';
|
|
22
|
+
export { default as AgentHooksExample } from './AgentHooksExample';
|
|
23
|
+
export { default as AgentInferenceProviderExample } from './AgentInferenceProviderExample';
|
|
22
24
|
export { default as AgentToolApprovalsExample } from './AgentToolApprovalsExample';
|
|
23
25
|
export { default as AgentMemoryExample } from './AgentMemoryExample';
|
|
24
26
|
export { default as AgentOtelExample } from './AgentOtelExample';
|
|
27
|
+
export { default as AgentMCPExample } from './AgentMCPExample';
|
|
25
28
|
export { default as AgentMonitoringExample } from './AgentMonitoringExample';
|
|
26
29
|
export { default as AgentNotificationsExample } from './AgentNotificationsExample';
|
|
27
30
|
export { default as AgentOutputsExample } from './AgentOutputsExample';
|
|
31
|
+
export { default as AgentParametersExample } from './AgentParametersExample';
|
|
28
32
|
export { default as AgentTriggersExample } from './AgentTriggersExample';
|
|
29
33
|
export { default as Lexical2Example } from './Lexical2Example';
|
|
30
|
-
export { default as
|
|
31
|
-
export { default as
|
|
34
|
+
export { default as LexicalAgentExample } from './LexicalAgentExample';
|
|
35
|
+
export { default as LexicalAgentSidebarExample } from './LexicalAgentSidebarExample';
|
|
36
|
+
export { default as NotebookAgentExample } from './NotebookAgentExample';
|
|
37
|
+
export { default as NotebookAgentSidebarExample } from './NotebookAgentSidebarExample';
|
|
32
38
|
export { default as NotebookExample } from './NotebookExample';
|
|
33
|
-
export { default as NotebookSidebarExample } from './NotebookSidebarExample';
|
|
34
|
-
export { default as NotebookSimpleExample } from './NotebookSimpleExample';
|
package/lib/examples/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
export { default as
|
|
5
|
+
export { default as AgentspecsExample } from './AgentspecsExample';
|
|
6
6
|
export { default as A2UiComponentGalleryExample } from './A2UiComponentGalleryExample';
|
|
7
7
|
export { default as A2UiContactCardExample } from './A2UiContactCardExample';
|
|
8
8
|
export { default as A2UiRestaurantExample } from './A2UiRestaurantExample';
|
|
@@ -18,21 +18,25 @@ export { default as ChatStandaloneExample } from './ChatStandaloneExample';
|
|
|
18
18
|
export { default as CopilotKitLexicalExample } from './CopilotKitLexicalExample';
|
|
19
19
|
export { default as CopilotKitNotebookExample } from './CopilotKitNotebookExample';
|
|
20
20
|
export { default as CustomExample } from './ChatCustomExample';
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as NotebookCollaborationExample } from './NotebookCollaborationExample';
|
|
22
22
|
export { default as AgentCheckpointsExample } from './AgentCheckpointsExample';
|
|
23
23
|
export { default as AgentCodemodeExample } from './AgentCodemodeExample';
|
|
24
24
|
export { default as AgentEvalsExample } from './AgentEvalsExample';
|
|
25
25
|
export { default as AgentGuardrailsExample } from './AgentGuardrailsExample';
|
|
26
|
+
export { default as AgentHooksExample } from './AgentHooksExample';
|
|
27
|
+
export { default as AgentInferenceProviderExample } from './AgentInferenceProviderExample';
|
|
26
28
|
export { default as AgentToolApprovalsExample } from './AgentToolApprovalsExample';
|
|
27
29
|
export { default as AgentMemoryExample } from './AgentMemoryExample';
|
|
28
30
|
export { default as AgentOtelExample } from './AgentOtelExample';
|
|
31
|
+
export { default as AgentMCPExample } from './AgentMCPExample';
|
|
29
32
|
export { default as AgentMonitoringExample } from './AgentMonitoringExample';
|
|
30
33
|
export { default as AgentNotificationsExample } from './AgentNotificationsExample';
|
|
31
34
|
export { default as AgentOutputsExample } from './AgentOutputsExample';
|
|
35
|
+
export { default as AgentParametersExample } from './AgentParametersExample';
|
|
32
36
|
export { default as AgentTriggersExample } from './AgentTriggersExample';
|
|
33
37
|
export { default as Lexical2Example } from './Lexical2Example';
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as
|
|
38
|
+
export { default as LexicalAgentExample } from './LexicalAgentExample';
|
|
39
|
+
export { default as LexicalAgentSidebarExample } from './LexicalAgentSidebarExample';
|
|
40
|
+
export { default as NotebookAgentExample } from './NotebookAgentExample';
|
|
41
|
+
export { default as NotebookAgentSidebarExample } from './NotebookAgentSidebarExample';
|
|
36
42
|
export { default as NotebookExample } from './NotebookExample';
|
|
37
|
-
export { default as NotebookSidebarExample } from './NotebookSidebarExample';
|
|
38
|
-
export { default as NotebookSimpleExample } from './NotebookSimpleExample';
|
|
@@ -1605,7 +1605,7 @@
|
|
|
1605
1605
|
"type": "jupyter-input",
|
|
1606
1606
|
"version": 1,
|
|
1607
1607
|
"language": "python",
|
|
1608
|
-
"jupyterInputNodeUuid": "collapsible-
|
|
1608
|
+
"jupyterInputNodeUuid": "collapsible-example-uuid"
|
|
1609
1609
|
},
|
|
1610
1610
|
{
|
|
1611
1611
|
"format": "",
|
|
@@ -1619,8 +1619,8 @@
|
|
|
1619
1619
|
"output_type": "stream"
|
|
1620
1620
|
}
|
|
1621
1621
|
],
|
|
1622
|
-
"jupyterInputNodeUuid": "collapsible-
|
|
1623
|
-
"jupyterOutputNodeUuid": "collapsible-
|
|
1622
|
+
"jupyterInputNodeUuid": "collapsible-example-uuid",
|
|
1623
|
+
"jupyterOutputNodeUuid": "collapsible-example-output-uuid"
|
|
1624
1624
|
}
|
|
1625
1625
|
],
|
|
1626
1626
|
"direction": "ltr",
|
|
@@ -2074,7 +2074,7 @@
|
|
|
2074
2074
|
"type": "jupyter-input",
|
|
2075
2075
|
"version": 1,
|
|
2076
2076
|
"language": "python",
|
|
2077
|
-
"jupyterInputNodeUuid": "plot-
|
|
2077
|
+
"jupyterInputNodeUuid": "plot-example-uuid"
|
|
2078
2078
|
},
|
|
2079
2079
|
{
|
|
2080
2080
|
"format": "",
|
|
@@ -2091,8 +2091,8 @@
|
|
|
2091
2091
|
"output_type": "execute_result"
|
|
2092
2092
|
}
|
|
2093
2093
|
],
|
|
2094
|
-
"jupyterInputNodeUuid": "plot-
|
|
2095
|
-
"jupyterOutputNodeUuid": "plot-
|
|
2094
|
+
"jupyterInputNodeUuid": "plot-example-uuid",
|
|
2095
|
+
"jupyterOutputNodeUuid": "plot-example-output-uuid"
|
|
2096
2096
|
},
|
|
2097
2097
|
{
|
|
2098
2098
|
"type": "horizontalrule",
|