@datalayer/agent-runtimes 1.0.3 → 1.0.5
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 +35 -119
- package/lib/App.js +1 -1
- 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 -104
- package/lib/chat/Chat.js +4 -4
- package/lib/chat/ChatFloating.d.ts +7 -140
- package/lib/chat/ChatFloating.js +2 -2
- 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 +2 -2
- package/lib/chat/ChatStandalone.d.ts +4 -54
- package/lib/chat/ChatStandalone.js +3 -3
- package/lib/chat/base/ChatBase.js +1118 -141
- package/lib/chat/header/ChatHeaderBase.d.ts +11 -6
- package/lib/chat/header/ChatHeaderBase.js +18 -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 +9 -9
- 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 +110 -102
- package/lib/chat/prompt/InputFooter.d.ts +19 -6
- package/lib/chat/prompt/InputFooter.js +71 -18
- package/lib/chat/prompt/InputPrompt.d.ts +3 -1
- package/lib/chat/prompt/InputPrompt.js +4 -4
- package/lib/chat/prompt/InputPromptFooter.js +1 -1
- 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 +48 -19
- package/lib/client/AgentsMixin.js +115 -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 +55 -26
- package/lib/components/OutputCard.js +21 -7
- package/lib/components/ToolApprovalCard.js +20 -2
- package/lib/config/AgentConfiguration.js +3 -3
- 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/AgentCheckpointsExample.js +14 -34
- package/lib/examples/AgentCodemodeExample.d.ts +4 -6
- package/lib/examples/AgentCodemodeExample.js +591 -175
- package/lib/examples/AgentEvalsExample.js +13 -23
- package/lib/examples/AgentGuardrailsExample.js +371 -71
- package/lib/examples/AgentHooksExample.d.ts +3 -0
- package/lib/examples/AgentHooksExample.js +104 -0
- package/lib/examples/AgentMCPExample.d.ts +3 -0
- package/lib/examples/AgentMCPExample.js +480 -0
- package/lib/examples/AgentMemoryExample.js +14 -24
- package/lib/examples/AgentMonitoringExample.js +261 -206
- package/lib/examples/AgentNotificationsExample.js +50 -24
- package/lib/examples/AgentOtelExample.js +2 -3
- package/lib/examples/AgentOutputsExample.d.ts +11 -6
- package/lib/examples/AgentOutputsExample.js +383 -88
- package/lib/examples/AgentParametersExample.d.ts +3 -0
- package/lib/examples/AgentParametersExample.js +246 -0
- package/lib/examples/AgentSandboxExample.d.ts +2 -2
- package/lib/examples/AgentSandboxExample.js +69 -47
- package/lib/examples/AgentSkillsExample.js +92 -106
- package/lib/examples/{AgentspecExample.js → AgentSpecsExample.js} +10 -21
- package/lib/examples/AgentSubagentsExample.d.ts +14 -0
- package/lib/examples/AgentSubagentsExample.js +228 -0
- package/lib/examples/AgentToolApprovalsExample.js +30 -493
- package/lib/examples/AgentTriggersExample.js +1067 -246
- package/lib/examples/ChatCustomExample.js +11 -24
- package/lib/examples/ChatExample.js +9 -34
- 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} +65 -16
- 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/ErrorView.d.ts +14 -0
- package/lib/examples/components/ErrorView.js +20 -0
- package/lib/examples/components/ExampleWrapper.d.ts +7 -0
- package/lib/examples/components/ExampleWrapper.js +25 -6
- 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 +5 -0
- package/lib/examples/components/index.js +5 -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 +107 -41
- package/lib/examples/index.d.ts +9 -6
- package/lib/examples/index.js +9 -6
- package/lib/examples/main.d.ts +1 -0
- package/lib/examples/main.js +218 -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/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 +118 -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} +39 -2
- package/lib/hooks/{useAgents.js → useAgentRuntimes.js} +125 -15
- 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 +9 -0
- package/lib/protocols/VercelAIAdapter.js +144 -26
- package/lib/shims/json5.d.ts +4 -0
- package/lib/shims/json5.js +8 -0
- package/lib/specs/agents/agents.d.ts +10 -0
- package/lib/specs/agents/agents.js +752 -24
- package/lib/specs/envvars.d.ts +1 -0
- package/lib/specs/envvars.js +11 -0
- package/lib/specs/events.d.ts +1 -0
- package/lib/specs/events.js +1 -0
- package/lib/specs/index.d.ts +1 -0
- package/lib/specs/index.js +1 -0
- package/lib/specs/personas.d.ts +41 -0
- package/lib/specs/personas.js +168 -0
- package/lib/specs/skills.d.ts +2 -1
- package/lib/specs/skills.js +23 -5
- package/lib/specs/tools.js +3 -0
- package/lib/stores/agentRuntimeStore.d.ts +204 -0
- package/lib/stores/agentRuntimeStore.js +636 -0
- 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/agentspecs.d.ts +50 -1
- package/lib/types/chat.d.ts +309 -8
- package/lib/types/context.d.ts +27 -0
- package/lib/types/cost.d.ts +2 -2
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -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/types/tools.d.ts +2 -0
- package/lib/utils/utils.d.ts +9 -5
- package/lib/utils/utils.js +9 -5
- package/package.json +13 -9
- package/scripts/codegen/__pycache__/generate_agents.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 +106 -7
- package/scripts/codegen/generate_events.py +47 -17
- package/scripts/codegen/generate_personas.py +319 -0
- package/scripts/codegen/generate_skills.py +9 -9
- package/scripts/codegen/generate_tools.py +20 -0
- package/scripts/sync-jupyter.sh +26 -7
- package/style/primer-primitives.css +1 -6
- package/lib/api/tool-approvals.d.ts +0 -62
- package/lib/api/tool-approvals.js +0 -145
- 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/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
- /package/lib/examples/{AgentspecExample.d.ts → AgentSpecsExample.d.ts} +0 -0
- /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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* {@link IAgentRuntimesClient} implementation that forwards every call to a
|
|
7
|
+
* pre-composed `DatalayerClient + AgentsMixin` instance.
|
|
8
|
+
*
|
|
9
|
+
* Construct with:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { DatalayerClient } from '@datalayer/core/lib/client';
|
|
13
|
+
* import { AgentsMixin, SdkAgentRuntimesClient } from '@datalayer/agent-runtimes';
|
|
14
|
+
*
|
|
15
|
+
* const ClientWithAgents = AgentsMixin(DatalayerClient);
|
|
16
|
+
* const sdk = new ClientWithAgents({ iamRunUrl, runtimesRunUrl, spacerRunUrl });
|
|
17
|
+
* const client = new SdkAgentRuntimesClient(sdk);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export class SdkAgentRuntimesClient {
|
|
21
|
+
sdk;
|
|
22
|
+
/**
|
|
23
|
+
* Constructs the default client.
|
|
24
|
+
*
|
|
25
|
+
* @param sdk - A composed `DatalayerClient + AgentsMixin` instance whose
|
|
26
|
+
* `getToken()` / service URL resolvers already return valid values.
|
|
27
|
+
* When `null`, every method throws — pass a real SDK to use the client.
|
|
28
|
+
*/
|
|
29
|
+
constructor(sdk) {
|
|
30
|
+
this.sdk = sdk;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Asserts the SDK is available for control-plane operations.
|
|
34
|
+
*
|
|
35
|
+
* @throws When the client was constructed without an SDK.
|
|
36
|
+
*
|
|
37
|
+
* @returns The SDK instance.
|
|
38
|
+
*/
|
|
39
|
+
requireSdk() {
|
|
40
|
+
if (!this.sdk) {
|
|
41
|
+
throw new Error('Control-plane operations require an SDK instance. ' +
|
|
42
|
+
'Construct SdkAgentRuntimesClient with a DatalayerClient+AgentsMixin.');
|
|
43
|
+
}
|
|
44
|
+
return this.sdk;
|
|
45
|
+
}
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
async listRunningAgents() {
|
|
48
|
+
return this.requireSdk().getRunningAgents();
|
|
49
|
+
}
|
|
50
|
+
/** @inheritdoc */
|
|
51
|
+
async getAgentStatus(podName, agentId) {
|
|
52
|
+
return this.requireSdk().getAgentStatus(podName, agentId);
|
|
53
|
+
}
|
|
54
|
+
/** @inheritdoc */
|
|
55
|
+
async pauseAgent(podName) {
|
|
56
|
+
return this.requireSdk().pauseAgent(podName);
|
|
57
|
+
}
|
|
58
|
+
/** @inheritdoc */
|
|
59
|
+
async resumeAgent(podName) {
|
|
60
|
+
return this.requireSdk().resumeAgent(podName);
|
|
61
|
+
}
|
|
62
|
+
/** @inheritdoc */
|
|
63
|
+
async getAgentCheckpoints(podName, agentId) {
|
|
64
|
+
return this.requireSdk().getAgentCheckpoints(podName, agentId);
|
|
65
|
+
}
|
|
66
|
+
/** @inheritdoc */
|
|
67
|
+
async getAgentUsage(podName, agentId) {
|
|
68
|
+
return this.requireSdk().getAgentUsage(podName, agentId);
|
|
69
|
+
}
|
|
70
|
+
/** @inheritdoc */
|
|
71
|
+
async listNotifications(filters) {
|
|
72
|
+
return this.requireSdk().getNotifications(filters);
|
|
73
|
+
}
|
|
74
|
+
/** @inheritdoc */
|
|
75
|
+
async markNotificationRead(notificationId) {
|
|
76
|
+
return this.requireSdk().markNotificationRead(notificationId);
|
|
77
|
+
}
|
|
78
|
+
/** @inheritdoc */
|
|
79
|
+
async markAllNotificationsRead() {
|
|
80
|
+
return this.requireSdk().markAllNotificationsRead();
|
|
81
|
+
}
|
|
82
|
+
/** @inheritdoc */
|
|
83
|
+
async createEvent(data) {
|
|
84
|
+
return this.requireSdk().createEvent(data);
|
|
85
|
+
}
|
|
86
|
+
/** @inheritdoc */
|
|
87
|
+
async listEvents(agentId, params) {
|
|
88
|
+
return this.requireSdk().listEvents(agentId, params);
|
|
89
|
+
}
|
|
90
|
+
/** @inheritdoc */
|
|
91
|
+
async getEvent(agentId, eventId) {
|
|
92
|
+
return this.requireSdk().getEvent(agentId, eventId);
|
|
93
|
+
}
|
|
94
|
+
/** @inheritdoc */
|
|
95
|
+
async updateEvent(agentId, eventId, data) {
|
|
96
|
+
return this.requireSdk().updateEvent(agentId, eventId, data);
|
|
97
|
+
}
|
|
98
|
+
/** @inheritdoc */
|
|
99
|
+
async getAgentOutputs(agentId) {
|
|
100
|
+
return this.requireSdk().getAgentOutputs(agentId);
|
|
101
|
+
}
|
|
102
|
+
/** @inheritdoc */
|
|
103
|
+
async getAgentOutput(agentId, outputId) {
|
|
104
|
+
return this.requireSdk().getAgentOutput(agentId, outputId);
|
|
105
|
+
}
|
|
106
|
+
/** @inheritdoc */
|
|
107
|
+
async generateAgentOutput(agentId, format, options) {
|
|
108
|
+
return this.requireSdk().generateAgentOutput(agentId, format, options);
|
|
109
|
+
}
|
|
110
|
+
/** @inheritdoc */
|
|
111
|
+
async runEvals(agentId, request) {
|
|
112
|
+
return this.requireSdk().runEvals(agentId, request);
|
|
113
|
+
}
|
|
114
|
+
/** @inheritdoc */
|
|
115
|
+
async listEvals(agentId) {
|
|
116
|
+
return this.requireSdk().listEvals(agentId);
|
|
117
|
+
}
|
|
118
|
+
/** @inheritdoc */
|
|
119
|
+
async getEval(agentId, evalId) {
|
|
120
|
+
return this.requireSdk().getEval(agentId, evalId);
|
|
121
|
+
}
|
|
122
|
+
/** @inheritdoc */
|
|
123
|
+
async getContextUsage(agentId) {
|
|
124
|
+
return this.requireSdk().getContextUsage(agentId);
|
|
125
|
+
}
|
|
126
|
+
/** @inheritdoc */
|
|
127
|
+
async getCostUsage(agentId) {
|
|
128
|
+
return this.requireSdk().getCostUsage(agentId);
|
|
129
|
+
}
|
|
130
|
+
/** @inheritdoc */
|
|
131
|
+
async createAgentRuntime(data) {
|
|
132
|
+
return this.requireSdk().createAgentRuntime(data);
|
|
133
|
+
}
|
|
134
|
+
}
|
package/lib/client/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Client mixins for agent-runtimes.
|
|
2
|
+
* Client mixins and domain-level client abstractions for agent-runtimes.
|
|
3
3
|
*
|
|
4
4
|
* @module client
|
|
5
5
|
*/
|
|
6
6
|
export { AgentsMixin } from './AgentsMixin';
|
|
7
|
+
export type { IAgentRuntimesClient } from './IAgentRuntimesClient';
|
|
8
|
+
export { SdkAgentRuntimesClient, type AgentsSdkLike, } from './SdkAgentRuntimesClient';
|
|
9
|
+
export { AgentRuntimesClientProvider, useAgentRuntimesClient, useOptionalAgentRuntimesClient, type AgentRuntimesClientProviderProps, } from './AgentRuntimesClientContext';
|
package/lib/client/index.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* Client mixins for agent-runtimes.
|
|
6
|
+
* Client mixins and domain-level client abstractions for agent-runtimes.
|
|
7
7
|
*
|
|
8
8
|
* @module client
|
|
9
9
|
*/
|
|
10
10
|
export { AgentsMixin } from './AgentsMixin';
|
|
11
|
+
export { SdkAgentRuntimesClient, } from './SdkAgentRuntimesClient';
|
|
12
|
+
export { AgentRuntimesClientProvider, useAgentRuntimesClient, useOptionalAgentRuntimesClient, } from './AgentRuntimesClientContext';
|
|
@@ -3,12 +3,22 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
+
import { useState } from 'react';
|
|
6
7
|
import { Button, Label, Text, Truncate } from '@primer/react';
|
|
7
8
|
import { Box } from '@datalayer/primer-addons';
|
|
8
|
-
import { DownloadIcon, EyeClosedIcon, EyeIcon, TrashIcon, } from '@primer/octicons-react';
|
|
9
|
-
import { createMarkdownDownloadPayload, downloadTextPayload, formatRelativeTime, } from '@datalayer/core/lib/utils';
|
|
9
|
+
import { ChevronDownIcon, DownloadIcon, EyeClosedIcon, EyeIcon, TrashIcon, } from '@primer/octicons-react';
|
|
10
|
+
import { createMarkdownDownloadPayload, downloadTextPayload, formatDurationMs, formatRelativeTime, } from '@datalayer/core/lib/utils';
|
|
10
11
|
import { Streamdown } from 'streamdown';
|
|
11
12
|
import { streamdownMarkdownStyles } from '../chat/styles/streamdownStyles';
|
|
13
|
+
const EVENT_KIND_VARIANT = {
|
|
14
|
+
'agent-start-requested': 'attention',
|
|
15
|
+
'agent-assigned': 'accent',
|
|
16
|
+
'agent-started': 'success',
|
|
17
|
+
'agent-output': 'accent',
|
|
18
|
+
'agent-termination-requested': 'attention',
|
|
19
|
+
'agent-terminated': 'danger',
|
|
20
|
+
'tool-approval-requested': 'attention',
|
|
21
|
+
};
|
|
12
22
|
const eventStartedAt = (evt) => {
|
|
13
23
|
const startedAt = evt?.started_at || evt?.payload?.started_at;
|
|
14
24
|
return typeof startedAt === 'string' && startedAt ? startedAt : null;
|
|
@@ -17,15 +27,15 @@ const eventEndedAt = (evt) => {
|
|
|
17
27
|
const endedAt = evt?.ended_at || evt?.payload?.ended_at;
|
|
18
28
|
return typeof endedAt === 'string' && endedAt ? endedAt : null;
|
|
19
29
|
};
|
|
20
|
-
const isRunningEvent = (evt) => {
|
|
21
|
-
const status = String(evt?.status ?? '').toLowerCase();
|
|
22
|
-
return evt?.kind === 'agent-started' && status === 'running';
|
|
23
|
-
};
|
|
24
30
|
export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAgent, }) {
|
|
31
|
+
const [isOutputExpanded, setIsOutputExpanded] = useState(false);
|
|
32
|
+
const [isDetailsExpanded, setIsDetailsExpanded] = useState(false);
|
|
33
|
+
const eventKind = String(event?.kind ?? '').toLowerCase();
|
|
34
|
+
const eventTitle = String(event?.title ?? '');
|
|
35
|
+
const eventOrigin = String(event?.metadata?.origin || '');
|
|
25
36
|
const startedAt = eventStartedAt(event);
|
|
26
37
|
const endedAt = eventEndedAt(event);
|
|
27
|
-
const
|
|
28
|
-
const outputText = event.kind === 'agent-ended' && event.payload?.outputs
|
|
38
|
+
const outputText = eventKind === 'agent-output' && event.payload?.outputs
|
|
29
39
|
? String(event.payload.outputs)
|
|
30
40
|
: null;
|
|
31
41
|
const runtimeId = String(event?.agent_id ||
|
|
@@ -33,6 +43,7 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
33
43
|
event?.payload?.runtime_id ||
|
|
34
44
|
event?.payload?.agent_id ||
|
|
35
45
|
'runtime');
|
|
46
|
+
const hasAgentRoute = Boolean(onOpenAgent) && runtimeId !== 'runtime';
|
|
36
47
|
const detailEntries = [];
|
|
37
48
|
const detailLineSx = { fontSize: 0, overflowWrap: 'anywhere' };
|
|
38
49
|
const detailLabelSx = { color: 'fg.muted' };
|
|
@@ -51,9 +62,6 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
51
62
|
detailEntries.push({ label: key, value: String(value) });
|
|
52
63
|
});
|
|
53
64
|
Object.entries(event?.payload || {}).forEach(([key, value]) => {
|
|
54
|
-
if (key === 'outputs') {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
65
|
if (value === undefined || value === null || value === '') {
|
|
58
66
|
return;
|
|
59
67
|
}
|
|
@@ -88,13 +96,7 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
88
96
|
gap: 2,
|
|
89
97
|
minWidth: 0,
|
|
90
98
|
flex: 1,
|
|
91
|
-
}, children: [_jsx(Label, { variant:
|
|
92
|
-
? 'accent'
|
|
93
|
-
: event.kind === 'agent-ended'
|
|
94
|
-
? 'success'
|
|
95
|
-
: event.kind?.includes('alert')
|
|
96
|
-
? 'danger'
|
|
97
|
-
: 'attention', children: event.kind }), _jsx(Truncate, { maxWidth: "50%", title: String(event.title || ''), sx: { fontWeight: 'semibold', fontSize: 1, minWidth: 0 }, children: event.title }), event.kind === 'agent-ended' && event.payload?.exit_status && (_jsxs(Label, { variant: "success", sx: { fontSize: 0, whiteSpace: 'nowrap' }, children: ["Status: ", String(event.payload.exit_status)] })), event.agent_id && (_jsx(Truncate, { maxWidth: 240, title: String(event.agent_id), children: _jsx(Label, { variant: "secondary", sx: { fontSize: 0, maxWidth: '100%' }, children: event.agent_id }) }))] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, flexShrink: 0 }, children: [running && event.agent_id && (_jsx(Button, { size: "small", variant: "invisible", onClick: () => onOpenAgent?.(String(event.agent_id)), children: "Open agent" })), event.created_at && (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', whiteSpace: 'nowrap' }, children: new Date(event.created_at).toLocaleString() })), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onToggleRead(event), sx: { p: 1 }, children: event.read ? _jsx(EyeClosedIcon, { size: 12 }) : _jsx(EyeIcon, { size: 12 }) }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onDelete(event), sx: { p: 1, color: 'danger.fg' }, children: _jsx(TrashIcon, { size: 12 }) })] })] }), event.payload && (_jsxs(Box, { sx: {
|
|
99
|
+
}, children: [_jsx(Label, { variant: EVENT_KIND_VARIANT[eventKind] ?? 'secondary', children: eventKind }), _jsx(Truncate, { maxWidth: "50%", title: String(eventTitle || ''), sx: { fontWeight: 'semibold', fontSize: 1, minWidth: 0 }, children: eventTitle }), eventKind === 'agent-output' && event.payload?.exit_status && (_jsxs(Label, { variant: "success", sx: { fontSize: 0, whiteSpace: 'nowrap' }, children: ["Status: ", String(event.payload.exit_status)] })), event.agent_id && (_jsx(Truncate, { maxWidth: 240, title: String(event.agent_id), children: _jsx(Label, { variant: "secondary", sx: { fontSize: 0, maxWidth: '100%' }, children: event.agent_id }) })), eventOrigin && (_jsxs(Label, { variant: "secondary", sx: { fontSize: 0, whiteSpace: 'nowrap' }, children: ["Origin: ", eventOrigin] }))] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, flexShrink: 0 }, children: [hasAgentRoute && (_jsx(Button, { size: "small", variant: "invisible", onClick: () => onOpenAgent?.(runtimeId), children: "View agent" })), event.created_at && (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', whiteSpace: 'nowrap' }, children: new Date(event.created_at).toLocaleString() })), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onToggleRead(event), sx: { p: 1 }, children: event.read ? _jsx(EyeClosedIcon, { size: 12 }) : _jsx(EyeIcon, { size: 12 }) }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onDelete(event), sx: { p: 1, color: 'danger.fg' }, children: _jsx(TrashIcon, { size: 12 }) })] })] }), event.payload && (_jsxs(Box, { sx: {
|
|
98
100
|
fontSize: 0,
|
|
99
101
|
color: 'fg.muted',
|
|
100
102
|
mt: 1,
|
|
@@ -102,21 +104,24 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
102
104
|
overflowWrap: 'anywhere',
|
|
103
105
|
}, children: [(startedAt ||
|
|
104
106
|
endedAt ||
|
|
105
|
-
(
|
|
107
|
+
(eventKind === 'agent-output' &&
|
|
106
108
|
event.payload.duration_ms != null)) && (_jsxs(Text, { as: "p", children: [startedAt ? `Started: ${formatRelativeTime(startedAt)}` : '', startedAt && endedAt ? ' · ' : '', endedAt ? `Ended: ${formatRelativeTime(endedAt)}` : '', (startedAt || endedAt) &&
|
|
107
|
-
|
|
109
|
+
eventKind === 'agent-output' &&
|
|
108
110
|
event.payload.duration_ms != null
|
|
109
111
|
? ' · '
|
|
110
|
-
: '',
|
|
111
|
-
? `Duration: ${(Number(event.payload.duration_ms)
|
|
112
|
-
: ''] })),
|
|
112
|
+
: '', eventKind === 'agent-output' && event.payload.duration_ms != null
|
|
113
|
+
? `Duration: ${formatDurationMs(Number(event.payload.duration_ms))}`
|
|
114
|
+
: ''] })), eventKind.includes('guardrail') && event.payload.message && (_jsx(Text, { as: "p", sx: { mb: 1 }, children: String(event.payload.message) })), eventKind.includes('guardrail') && event.payload.action_taken && (_jsxs(Text, { as: "p", children: ["Action: ", String(event.payload.action_taken)] })), eventKind === 'agent-started' && event.payload.trigger_type && (_jsxs(Text, { as: "p", children: ["Trigger: ", String(event.payload.trigger_type)] })), outputText && (_jsx(Box, { sx: {
|
|
113
115
|
mt: 2,
|
|
114
116
|
p: 2,
|
|
115
117
|
borderRadius: 2,
|
|
116
118
|
border: '1px solid',
|
|
117
119
|
borderColor: 'border.muted',
|
|
118
120
|
bg: 'canvas.subtle',
|
|
119
|
-
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'flex-start', gap: 1 }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsxs("details", { children: [_jsx("summary", {
|
|
121
|
+
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'flex-start', gap: 1 }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsxs("details", { open: isOutputExpanded, children: [_jsx("summary", { onClick: e => {
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
setIsOutputExpanded(prev => !prev);
|
|
124
|
+
}, style: {
|
|
120
125
|
cursor: 'pointer',
|
|
121
126
|
display: 'flex',
|
|
122
127
|
alignItems: 'center',
|
|
@@ -128,7 +133,16 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
128
133
|
minWidth: 0,
|
|
129
134
|
width: '100%',
|
|
130
135
|
flexWrap: 'nowrap',
|
|
131
|
-
}, children: [_jsx(
|
|
136
|
+
}, children: [_jsx(Box, { sx: {
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
color: 'fg.muted',
|
|
140
|
+
flexShrink: 0,
|
|
141
|
+
transition: 'transform 0.15s ease',
|
|
142
|
+
transform: isOutputExpanded
|
|
143
|
+
? 'rotate(180deg)'
|
|
144
|
+
: 'rotate(0deg)',
|
|
145
|
+
}, children: _jsx(ChevronDownIcon, { size: 12 }) }), _jsx(Text, { sx: {
|
|
132
146
|
fontSize: 0,
|
|
133
147
|
fontWeight: 'semibold',
|
|
134
148
|
flexShrink: 0,
|
|
@@ -147,6 +161,21 @@ export function NotificationEventCard({ event, onToggleRead, onDelete, onOpenAge
|
|
|
147
161
|
border: '1px solid',
|
|
148
162
|
borderColor: 'border.muted',
|
|
149
163
|
bg: 'canvas.subtle',
|
|
150
|
-
}, children: _jsxs("details", {
|
|
164
|
+
}, children: _jsxs("details", { open: isDetailsExpanded, children: [_jsx("summary", { onClick: e => {
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
setIsDetailsExpanded(prev => !prev);
|
|
167
|
+
}, style: {
|
|
168
|
+
cursor: 'pointer',
|
|
169
|
+
display: 'flex',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx(Box, { sx: {
|
|
172
|
+
display: 'flex',
|
|
173
|
+
alignItems: 'center',
|
|
174
|
+
color: 'fg.muted',
|
|
175
|
+
transition: 'transform 0.15s ease',
|
|
176
|
+
transform: isDetailsExpanded
|
|
177
|
+
? 'rotate(180deg)'
|
|
178
|
+
: 'rotate(0deg)',
|
|
179
|
+
}, children: _jsx(ChevronDownIcon, { size: 12 }) }), _jsx(Text, { sx: { fontSize: 0, fontWeight: 'semibold' }, children: "View details" })] }) }), _jsx(Box, { sx: { mt: 2, display: 'grid', gap: 1 }, children: detailEntries.map(({ label, value }) => (_jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: [label, ":", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: value })] }, label))) })] }) })] }))] }));
|
|
151
180
|
}
|
|
152
181
|
export default NotificationEventCard;
|
|
@@ -3,14 +3,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
+
import { useState } from 'react';
|
|
6
7
|
import { Button, Label, Text, Truncate } from '@primer/react';
|
|
7
8
|
import { Box } from '@datalayer/primer-addons';
|
|
8
|
-
import { DownloadIcon, EyeClosedIcon, EyeIcon, TrashIcon, } from '@primer/octicons-react';
|
|
9
|
-
import { createMarkdownDownloadPayload, downloadTextPayload, formatRelativeTime, } from '@datalayer/core/lib/utils';
|
|
9
|
+
import { ChevronDownIcon, DownloadIcon, EyeClosedIcon, EyeIcon, TrashIcon, } from '@primer/octicons-react';
|
|
10
|
+
import { createMarkdownDownloadPayload, downloadTextPayload, formatDurationMs, formatRelativeTime, } from '@datalayer/core/lib/utils';
|
|
10
11
|
import { Streamdown } from 'streamdown';
|
|
11
12
|
import { streamdownMarkdownStyles } from '../chat/styles/streamdownStyles';
|
|
12
13
|
export function OutputCard({ event, onToggleRead, onDelete, onOpenAgent, }) {
|
|
13
|
-
const
|
|
14
|
+
const [isOutputExpanded, setIsOutputExpanded] = useState(false);
|
|
15
|
+
const outputText = event.kind === 'agent-output' && event.payload?.outputs
|
|
14
16
|
? String(event.payload.outputs)
|
|
15
17
|
: null;
|
|
16
18
|
const runtimeId = String(event?.agent_id ||
|
|
@@ -20,7 +22,7 @@ export function OutputCard({ event, onToggleRead, onDelete, onOpenAgent, }) {
|
|
|
20
22
|
'runtime');
|
|
21
23
|
const startedAt = event?.started_at || event?.payload?.started_at || null;
|
|
22
24
|
const endedAt = event?.ended_at || event?.payload?.ended_at || null;
|
|
23
|
-
const durationMs = event.kind === 'agent-
|
|
25
|
+
const durationMs = event.kind === 'agent-output' ? event.payload?.duration_ms : null;
|
|
24
26
|
return (_jsxs(Box, { sx: {
|
|
25
27
|
minWidth: 0,
|
|
26
28
|
maxWidth: '100%',
|
|
@@ -44,14 +46,17 @@ export function OutputCard({ event, onToggleRead, onDelete, onOpenAgent, }) {
|
|
|
44
46
|
minWidth: 0,
|
|
45
47
|
flex: 1,
|
|
46
48
|
}, children: [_jsx(Label, { variant: "success", children: "output" }), _jsx(Truncate, { maxWidth: "50%", title: String(event.title || runtimeId), sx: { fontWeight: 'semibold', fontSize: 1, minWidth: 0 }, children: event.title || runtimeId }), event.payload?.exit_status && (_jsxs(Label, { variant: "success", sx: { fontSize: 0, whiteSpace: 'nowrap' }, children: ["Status: ", String(event.payload.exit_status)] })), event.agent_id && (_jsx(Truncate, { maxWidth: 240, title: String(event.agent_id), children: _jsx(Label, { variant: "secondary", sx: { fontSize: 0, maxWidth: '100%' }, children: event.agent_id }) }))] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, flexShrink: 0 }, children: [event.agent_id && onOpenAgent && (_jsx(Button, { size: "small", variant: "invisible", onClick: () => onOpenAgent(String(event.agent_id)), children: "Open agent" })), event.created_at && (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', whiteSpace: 'nowrap' }, children: new Date(event.created_at).toLocaleString() })), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onToggleRead(event), sx: { p: 1 }, children: event.read ? _jsx(EyeClosedIcon, { size: 12 }) : _jsx(EyeIcon, { size: 12 }) }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onDelete(event), sx: { p: 1, color: 'danger.fg' }, children: _jsx(TrashIcon, { size: 12 }) })] })] }), (startedAt || endedAt || durationMs != null) && (_jsxs(Text, { as: "p", sx: { fontSize: 0, color: 'fg.muted', mb: 2 }, children: [startedAt ? `Started: ${formatRelativeTime(startedAt)}` : '', startedAt && endedAt ? ' · ' : '', endedAt ? `Ended: ${formatRelativeTime(endedAt)}` : '', (startedAt || endedAt) && durationMs != null ? ' · ' : '', durationMs != null
|
|
47
|
-
? `Duration: ${(Number(durationMs)
|
|
49
|
+
? `Duration: ${formatDurationMs(Number(durationMs))}`
|
|
48
50
|
: ''] })), outputText && (_jsx(Box, { sx: {
|
|
49
51
|
p: 2,
|
|
50
52
|
borderRadius: 2,
|
|
51
53
|
border: '1px solid',
|
|
52
54
|
borderColor: 'border.muted',
|
|
53
55
|
bg: 'canvas.subtle',
|
|
54
|
-
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'flex-start', gap: 1 }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsxs("details", { children: [_jsx("summary", {
|
|
56
|
+
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'flex-start', gap: 1 }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsxs("details", { open: isOutputExpanded, children: [_jsx("summary", { onClick: e => {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
setIsOutputExpanded(prev => !prev);
|
|
59
|
+
}, style: {
|
|
55
60
|
cursor: 'pointer',
|
|
56
61
|
display: 'flex',
|
|
57
62
|
alignItems: 'center',
|
|
@@ -63,7 +68,16 @@ export function OutputCard({ event, onToggleRead, onDelete, onOpenAgent, }) {
|
|
|
63
68
|
minWidth: 0,
|
|
64
69
|
width: '100%',
|
|
65
70
|
flexWrap: 'nowrap',
|
|
66
|
-
}, children: [_jsx(
|
|
71
|
+
}, children: [_jsx(Box, { sx: {
|
|
72
|
+
display: 'flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
color: 'fg.muted',
|
|
75
|
+
flexShrink: 0,
|
|
76
|
+
transition: 'transform 0.15s ease',
|
|
77
|
+
transform: isOutputExpanded
|
|
78
|
+
? 'rotate(180deg)'
|
|
79
|
+
: 'rotate(0deg)',
|
|
80
|
+
}, children: _jsx(ChevronDownIcon, { size: 12 }) }), _jsx(Text, { sx: {
|
|
67
81
|
fontSize: 0,
|
|
68
82
|
fontWeight: 'semibold',
|
|
69
83
|
flexShrink: 0,
|
|
@@ -3,9 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
|
+
import { useState } from 'react';
|
|
6
7
|
import { Button, Label, Text } from '@primer/react';
|
|
7
8
|
import { Box } from '@datalayer/primer-addons';
|
|
8
|
-
import { CheckCircleIcon, EyeClosedIcon, EyeIcon, TrashIcon, XCircleIcon, } from '@primer/octicons-react';
|
|
9
|
+
import { CheckCircleIcon, ChevronDownIcon, EyeClosedIcon, EyeIcon, TrashIcon, XCircleIcon, } from '@primer/octicons-react';
|
|
9
10
|
import { formatRelativeTime } from '@datalayer/core/lib/utils';
|
|
10
11
|
export const TOOL_APPROVAL_STATUS_CONFIG = {
|
|
11
12
|
pending: { label: 'Pending', variant: 'attention' },
|
|
@@ -19,6 +20,7 @@ const RISK_CONFIG = {
|
|
|
19
20
|
high: { label: 'High Risk', variant: 'severe' },
|
|
20
21
|
};
|
|
21
22
|
export function ToolApprovalCard({ approval, onApprove, onReject, onToggleRead, onDelete, }) {
|
|
23
|
+
const [isDetailsExpanded, setIsDetailsExpanded] = useState(false);
|
|
22
24
|
const statusConfig = TOOL_APPROVAL_STATUS_CONFIG[approval.status];
|
|
23
25
|
const riskConfig = RISK_CONFIG[approval.riskLevel];
|
|
24
26
|
const parameterCount = approval.parameters
|
|
@@ -55,6 +57,22 @@ export function ToolApprovalCard({ approval, onApprove, onReject, onToggleRead,
|
|
|
55
57
|
border: '1px solid',
|
|
56
58
|
borderColor: 'border.muted',
|
|
57
59
|
bg: 'canvas.subtle',
|
|
58
|
-
}, children: _jsxs("details", {
|
|
60
|
+
}, children: _jsxs("details", { open: isDetailsExpanded, children: [_jsx("summary", { onClick: e => {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
setIsDetailsExpanded(prev => !prev);
|
|
63
|
+
}, style: {
|
|
64
|
+
cursor: 'pointer',
|
|
65
|
+
display: 'flex',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
minWidth: 0,
|
|
68
|
+
}, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx(Box, { sx: {
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
color: 'fg.muted',
|
|
72
|
+
transition: 'transform 0.15s ease',
|
|
73
|
+
transform: isDetailsExpanded
|
|
74
|
+
? 'rotate(180deg)'
|
|
75
|
+
: 'rotate(0deg)',
|
|
76
|
+
}, children: _jsx(ChevronDownIcon, { size: 12 }) }), _jsx(Text, { sx: { fontSize: 0, fontWeight: 'semibold' }, children: "View details" })] }) }), _jsxs(Box, { sx: { mt: 2, display: 'grid', gap: 1 }, children: [_jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Source:", ' '] }), _jsxs(Text, { as: "span", sx: detailValueSx, children: [approval.sourceName, " (", approval.sourceType, ")"] })] }), _jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Request ID:", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: approval.id })] }), _jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Requested at:", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: new Date(approval.requestedAt).toLocaleString() })] }), _jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Requested by:", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: approval.requestedBy })] }), approval.reviewedAt && (_jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Reviewed at:", ' '] }), _jsxs(Text, { as: "span", sx: detailValueSx, children: [new Date(approval.reviewedAt).toLocaleString(), " by", ' ', approval.reviewedBy || 'reviewer'] })] })), _jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Parameters:", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: parameterCount })] }), _jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: ["Reason:", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: approval.reason || approval.toolDescription })] })] }), parameterCount > 0 && (_jsx(Box, { sx: { mt: 2, display: 'grid', gap: 1 }, children: Object.entries(approval.parameters || {}).map(([key, value]) => (_jsxs(Text, { sx: detailLineSx, children: [_jsxs(Text, { as: "span", sx: detailLabelSx, children: [key, ":", ' '] }), _jsx(Text, { as: "span", sx: detailValueSx, children: String(value) })] }, key))) }))] }) })] }), approval.status === 'pending' && (_jsxs(Box, { sx: { display: 'flex', gap: 2, flexShrink: 0 }, children: [_jsx(Button, { size: "small", variant: "primary", leadingVisual: CheckCircleIcon, onClick: () => onApprove?.(approval.id), children: "Approve" }), _jsx(Button, { size: "small", variant: "danger", leadingVisual: XCircleIcon, onClick: () => onReject?.(approval.id), children: "Reject" })] })), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, flexShrink: 0 }, children: [_jsx(Button, { size: "small", variant: "invisible", onClick: () => onToggleRead?.(approval.id, isRead), sx: { p: 1 }, title: `Mark as ${isRead ? 'unread' : 'read'}`, "aria-label": `Mark as ${isRead ? 'unread' : 'read'}`, children: isRead ? _jsx(EyeClosedIcon, { size: 12 }) : _jsx(EyeIcon, { size: 12 }) }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => onDelete?.(approval.id), sx: { p: 1, color: 'danger.fg' }, title: "Delete", "aria-label": "Delete", children: _jsx(TrashIcon, { size: 12 }) })] })] }) }));
|
|
59
77
|
}
|
|
60
78
|
export default ToolApprovalCard;
|
|
@@ -431,7 +431,7 @@ export const AgentConfiguration = ({ agentLibrary, protocol: transport, extensio
|
|
|
431
431
|
.map(spec => {
|
|
432
432
|
const pkg = spec.id.includes('/') ? spec.id.split('/')[0] : '';
|
|
433
433
|
return (_jsxs(Select.Option, { value: `spec:${spec.id}`, children: [spec.emoji ? `${spec.emoji} ` : '', pkg ? `[${pkg}] ` : '', spec.name] }, `spec:${spec.id}`));
|
|
434
|
-
}), agents.map(agent => (_jsxs(Select.Option, { value: agent.id, children: ["[
|
|
434
|
+
}), agents.map(agent => (_jsxs(Select.Option, { value: agent.id, children: ["[Persona] ", agent.status === 'running' && '● ', agent.name] }, agent.id)))] }), _jsx(FormControl.Caption, { children: isNewAgentMode
|
|
435
435
|
? selectedSpec
|
|
436
436
|
? `Creating from spec: ${selectedSpec.name} — capabilities are locked`
|
|
437
437
|
: 'Configure a new custom agent'
|
|
@@ -444,7 +444,7 @@ export const AgentConfiguration = ({ agentLibrary, protocol: transport, extensio
|
|
|
444
444
|
: 'The base URL of your agent-runtimes server' })] }), _jsxs(Box, { sx: { display: 'flex', gap: 3, marginBottom: 3 }, children: [_jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "Agent Library" }), _jsx(Select, { value: agentLibrary, onChange: e => onAgentLibraryChange(e.target.value), sx: { width: '100%' }, children: AGENT_LIBRARIES.map(lib => (_jsxs(Select.Option, { value: lib.value, disabled: lib.disabled, children: [lib.label, lib.disabled && ' (Coming Soon)'] }, lib.value))) })] }), _jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly || models.length === 0, children: [_jsx(FormControl.Label, { children: "Model" }), _jsx(Select, { value: model, onChange: e => onModelChange(e.target.value), sx: { width: '100%' }, children: models.length === 0 ? (_jsx(Select.Option, { value: "", children: "Loading models..." })) : (models.map(m => (_jsxs(Select.Option, { value: m.id, disabled: !m.isAvailable, children: [m.name, !m.isAvailable && ' (API key required)'] }, m.id)))) })] }), _jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "Transport" }), _jsx(Select, { value: transport, onChange: e => onTransportChange(e.target.value), sx: { width: '100%' }, children: TRANSPORTS.map(t => (_jsx(Select.Option, { value: t.value, children: t.label }, t.value))) })] }), _jsxs(FormControl, { sx: { flex: 1 }, children: [_jsx(FormControl.Label, { children: "Extensions" }), _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: EXTENSIONS.map(ext => (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { value: ext.value, checked: extensions.includes(ext.value), disabled: isFormReadOnly || !isExtensionEnabled(ext.value), onChange: e => handleExtensionChange(ext.value, e.target.checked) }), _jsx(Text, { children: ext.label })] }, ext.value))) })] })] }), _jsxs(FormControl, { sx: { marginBottom: 3 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "System Prompt" }), _jsx(TextInput, { value: systemPrompt, onChange: e => onSystemPromptChange(e.target.value), placeholder: "You are a helpful AI assistant.", sx: { width: '100%' } })] }), _jsxs(FormControl, { sx: { marginBottom: 3 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "System Prompt Codemode Addons" }), _jsx(TextInput, { value: systemPromptCodemodeAddons, onChange: e => onSystemPromptCodemodeAddonsChange(e.target.value), placeholder: "Additional codemode instructions", sx: { width: '100%' } })] }), _jsxs(Box, { sx: { display: 'flex', gap: 3, marginBottom: 3 }, children: [_jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "Tools (comma-separated)" }), _jsx(TextInput, { value: tools.join(', '), onChange: e => onToolsChange(e.target.value
|
|
445
445
|
.split(',')
|
|
446
446
|
.map(tool => tool.trim())
|
|
447
|
-
.filter(Boolean)), placeholder: "tool_a, tool_b", sx: { width: '100%' } })] }), _jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "Sandbox Variant" }), _jsxs(Select, { value: sandboxVariant, onChange: e => onSandboxVariantChange(e.target.value), sx: { width: '100%' }, children: [_jsx(Select.Option, { value: "", children: "Default" }), _jsx(Select.Option, { value: "
|
|
447
|
+
.filter(Boolean)), placeholder: "tool_a, tool_b", sx: { width: '100%' } })] }), _jsxs(FormControl, { sx: { flex: 1 }, disabled: isFormReadOnly, children: [_jsx(FormControl.Label, { children: "Sandbox Variant" }), _jsxs(Select, { value: sandboxVariant, onChange: e => onSandboxVariantChange(e.target.value), sx: { width: '100%' }, children: [_jsx(Select.Option, { value: "", children: "Default" }), _jsx(Select.Option, { value: "eval", children: "eval" }), _jsx(Select.Option, { value: "jupyter", children: "jupyter" })] })] })] }), _jsxs(Box, { sx: {
|
|
448
448
|
marginBottom: 3,
|
|
449
449
|
padding: 3,
|
|
450
450
|
border: '1px solid',
|
|
@@ -470,7 +470,7 @@ export const AgentConfiguration = ({ agentLibrary, protocol: transport, extensio
|
|
|
470
470
|
color: 'fg.muted',
|
|
471
471
|
fontWeight: 'normal',
|
|
472
472
|
ml: 2,
|
|
473
|
-
}, children: "\u2014 defined by spec" }))] }), _jsx(Box, { sx: { display: 'flex', gap: 4, opacity: isSpecMode ? 0.6 : 1 }, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: enableCodemode, disabled: !isNewAgentMode || isSpecMode, onChange: e => onEnableCodemodeChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Codemode" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Execute code to compose tools" })] })] }) }), skillsEnabled && enableCodemode && (_jsx(Flash, { variant: "default", sx: { mt: 3 }, children: _jsx(Text, { sx: { fontSize: 0 }, children: "Skills provide curated capabilities; Codemode composes tools with Python for multi-step execution." }) })), skillsEnabled && !enableCodemode && (_jsx(Flash, { variant: "default", sx: { mt: 3 }, children: _jsx(Text, { sx: { fontSize: 0 }, children: "Skills will run with a standalone code sandbox for script execution. Enable Codemode to compose skills with other tools." }) })), enableCodemode && (_jsxs(Box, { sx: { mt: 3, display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: allowDirectToolCalls, disabled: !isNewAgentMode || isSpecMode, onChange: e => onAllowDirectToolCallsChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Allow direct tool calls" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Expose call_tool for simple, single-tool operations" })] })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: enableToolReranker, disabled: !isNewAgentMode || isSpecMode, onChange: e => onEnableToolRerankerChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Enable tool reranker" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Reorder search results using the configured reranker" })] })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: useJupyterSandbox, disabled: !isNewAgentMode || isSpecMode, onChange: e => onUseJupyterSandboxChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Use Jupyter Sandbox" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Execute code in a Jupyter Sandbox instead of
|
|
473
|
+
}, children: "\u2014 defined by spec" }))] }), _jsx(Box, { sx: { display: 'flex', gap: 4, opacity: isSpecMode ? 0.6 : 1 }, children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: enableCodemode, disabled: !isNewAgentMode || isSpecMode, onChange: e => onEnableCodemodeChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Codemode" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Execute code to compose tools" })] })] }) }), skillsEnabled && enableCodemode && (_jsx(Flash, { variant: "default", sx: { mt: 3 }, children: _jsx(Text, { sx: { fontSize: 0 }, children: "Skills provide curated capabilities; Codemode composes tools with Python for multi-step execution." }) })), skillsEnabled && !enableCodemode && (_jsx(Flash, { variant: "default", sx: { mt: 3 }, children: _jsx(Text, { sx: { fontSize: 0 }, children: "Skills will run with a standalone code sandbox for script execution. Enable Codemode to compose skills with other tools." }) })), enableCodemode && (_jsxs(Box, { sx: { mt: 3, display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: allowDirectToolCalls, disabled: !isNewAgentMode || isSpecMode, onChange: e => onAllowDirectToolCallsChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Allow direct tool calls" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Expose call_tool for simple, single-tool operations" })] })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: enableToolReranker, disabled: !isNewAgentMode || isSpecMode, onChange: e => onEnableToolRerankerChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Enable tool reranker" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Reorder search results using the configured reranker" })] })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Checkbox, { checked: useJupyterSandbox, disabled: !isNewAgentMode || isSpecMode, onChange: e => onUseJupyterSandboxChange?.(e.target.checked) }), _jsxs(Box, { children: [_jsx(Text, { sx: { fontSize: 1 }, children: "Use Jupyter Sandbox" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: "Execute code in a Jupyter Sandbox instead of eval Sandbox" })] })] })] }))] }), _jsxs(Box, { sx: {
|
|
474
474
|
marginBottom: 3,
|
|
475
475
|
padding: 3,
|
|
476
476
|
border: '1px solid',
|
|
@@ -103,9 +103,11 @@ export interface ContextDistributionProps {
|
|
|
103
103
|
agentId: string;
|
|
104
104
|
/** Height of the chart */
|
|
105
105
|
height?: string;
|
|
106
|
+
/** Live snapshot data from WS — bypasses REST polling when provided */
|
|
107
|
+
liveData?: ContextSnapshotResponse | null;
|
|
106
108
|
}
|
|
107
109
|
/**
|
|
108
110
|
* ContextDistribution component displays context distribution as a treemap.
|
|
109
111
|
*/
|
|
110
|
-
export declare function ContextDistribution({ agentId, height, }: ContextDistributionProps): import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
export declare function ContextDistribution({ agentId, height, liveData, }: ContextDistributionProps): import("react/jsx-runtime").JSX.Element;
|
|
111
113
|
export default ContextDistribution;
|
|
@@ -6,18 +6,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { Box, Text, Spinner, Button } from '@primer/react';
|
|
8
8
|
import { ListUnorderedIcon } from '@primer/octicons-react';
|
|
9
|
-
import { useQuery } from '@tanstack/react-query';
|
|
10
9
|
import ReactECharts from 'echarts-for-react';
|
|
11
10
|
import { useState } from 'react';
|
|
12
|
-
function getLocalApiBase() {
|
|
13
|
-
if (typeof window === 'undefined') {
|
|
14
|
-
return '';
|
|
15
|
-
}
|
|
16
|
-
const host = window.location.hostname;
|
|
17
|
-
return host === 'localhost' || host === '127.0.0.1'
|
|
18
|
-
? 'http://127.0.0.1:8765'
|
|
19
|
-
: '';
|
|
20
|
-
}
|
|
21
11
|
/**
|
|
22
12
|
* Format token count for display
|
|
23
13
|
*/
|
|
@@ -33,23 +23,14 @@ function formatTokens(tokens) {
|
|
|
33
23
|
/**
|
|
34
24
|
* ContextDistribution component displays context distribution as a treemap.
|
|
35
25
|
*/
|
|
36
|
-
export function ContextDistribution({ agentId, height = '250px', }) {
|
|
26
|
+
export function ContextDistribution({ agentId, height = '250px', liveData, }) {
|
|
37
27
|
const [showDetails, setShowDetails] = useState(false);
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
throw new Error('Failed to fetch context snapshot');
|
|
45
|
-
}
|
|
46
|
-
return response.json();
|
|
47
|
-
},
|
|
48
|
-
refetchInterval: 10000, // Refresh every 10 seconds
|
|
49
|
-
refetchOnMount: 'always',
|
|
50
|
-
staleTime: 0,
|
|
51
|
-
});
|
|
52
|
-
if (isLoading) {
|
|
28
|
+
const hasLiveData = liveData !== undefined;
|
|
29
|
+
// REST polling removed — data comes exclusively via WS `agent.snapshot`.
|
|
30
|
+
const snapshotData = liveData;
|
|
31
|
+
const showLoading = !hasLiveData;
|
|
32
|
+
const hasError = false;
|
|
33
|
+
if (showLoading) {
|
|
53
34
|
return (_jsxs(Box, { sx: {
|
|
54
35
|
p: 3,
|
|
55
36
|
display: 'flex',
|
|
@@ -58,7 +39,7 @@ export function ContextDistribution({ agentId, height = '250px', }) {
|
|
|
58
39
|
height,
|
|
59
40
|
}, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { ml: 2, fontSize: 1, color: 'fg.muted' }, children: "Loading context distribution..." })] }));
|
|
60
41
|
}
|
|
61
|
-
if (
|
|
42
|
+
if (hasError || !snapshotData) {
|
|
62
43
|
return (_jsx(Box, { sx: {
|
|
63
44
|
p: 3,
|
|
64
45
|
bg: 'canvas.subtle',
|
|
@@ -73,9 +73,11 @@ export interface ContextInspectorProps {
|
|
|
73
73
|
agentId: string;
|
|
74
74
|
/** API base URL for fetching context data */
|
|
75
75
|
apiBase?: string;
|
|
76
|
+
/** Live full-context data from WS — bypasses REST polling when provided */
|
|
77
|
+
liveData?: FullContextResponse | null;
|
|
76
78
|
}
|
|
77
79
|
/**
|
|
78
80
|
* ContextInspector component displays full detailed context snapshot.
|
|
79
81
|
*/
|
|
80
|
-
export declare function ContextInspector({ agentId, apiBase }: ContextInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
export declare function ContextInspector({ agentId, apiBase, liveData, }: ContextInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
81
83
|
export default ContextInspector;
|