@datalayer/agent-runtimes 1.3.89 → 1.3.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Agent.js +2 -18
- package/lib/AgentDocument.js +5 -55
- package/lib/AgentNode.js +31 -208
- package/lib/AgentNotebook.js +5 -59
- package/lib/agent-node/AgentNodeGallery.js +23 -111
- package/lib/agents/AgentDetails.js +36 -274
- package/lib/agents/AgentRuntimeChat.js +1 -8
- package/lib/chat/Chat.js +7 -46
- package/lib/chat/ChatFloating.js +15 -100
- package/lib/chat/ChatInline.js +5 -47
- package/lib/chat/ChatPopupStandalone.js +5 -53
- package/lib/chat/ChatSidebar.js +4 -51
- package/lib/chat/ChatStandalone.js +4 -45
- package/lib/chat/EphemeralSurfaceControl.js +5 -25
- package/lib/chat/assistant/AssistantContextMenu.d.ts +8 -0
- package/lib/chat/assistant/AssistantContextMenu.js +17 -1
- package/lib/chat/assistant/AssistantStage.js +6 -25
- package/lib/chat/assistant/BalloonParts.js +8 -40
- package/lib/chat/assistant/BalloonVisual.js +2 -2
- package/lib/chat/assistant/ConversationBalloon.js +2 -11
- package/lib/chat/assistant/DecisionAsk.js +3 -3
- package/lib/chat/assistant/SandboxDetailsDialog.js +3 -17
- package/lib/chat/assistant/SpeechBalloon.js +14 -78
- package/lib/chat/base/ChatBase.js +37 -172
- package/lib/chat/display/EmptyState.js +7 -35
- package/lib/chat/display/FloatingBrandButton.js +4 -34
- package/lib/chat/display/PoweredByTag.js +3 -14
- package/lib/chat/document/EphemeralDocument.js +3 -18
- package/lib/chat/header/ChatHeader.js +1 -17
- package/lib/chat/header/ChatHeaderBase.js +2 -24
- package/lib/chat/header/ChatViewModeToggle.js +7 -29
- package/lib/chat/indicators/McpStatusIndicator.js +3 -12
- package/lib/chat/indicators/SandboxStatusIndicator.js +6 -34
- package/lib/chat/indicators/SkillsStatusIndicator.js +3 -12
- package/lib/chat/indicators/TypingDots.js +1 -11
- package/lib/chat/messages/ChatMessageList.js +58 -185
- package/lib/chat/messages/ChatMessages.js +15 -79
- package/lib/chat/messages/FormSubmissionMessage.js +2 -33
- package/lib/chat/messages/NotebookToolSurfaces.js +12 -41
- package/lib/chat/messages/TurnFooter.js +4 -10
- package/lib/chat/notebook/EphemeralNotebook.js +2 -10
- package/lib/chat/parts/ReasoningPart.js +2 -16
- package/lib/chat/parts/TextPart.js +2 -12
- package/lib/chat/parts/ToolPart.js +16 -90
- package/lib/chat/presence/Presence.js +5 -33
- package/lib/chat/prompt/FloatingCard.js +1 -13
- package/lib/chat/prompt/InputPrompt.js +1 -6
- package/lib/chat/prompt/InputPromptBase.js +4 -17
- package/lib/chat/prompt/InputPromptLexical.js +44 -45
- package/lib/chat/prompt/InputPromptText.js +1 -1
- package/lib/chat/prompt/footer/InPromptFooter.js +1 -8
- package/lib/chat/prompt/menus/AgentsMenu.js +1 -1
- package/lib/chat/prompt/menus/InlineAgentsMenu.js +1 -1
- package/lib/chat/prompt/menus/ModelSelector.js +1 -5
- package/lib/chat/prompt/menus/SkillsMenu.js +3 -30
- package/lib/chat/prompt/menus/SuggestionsMenu.js +1 -1
- package/lib/chat/prompt/menus/ToolsMenu.js +4 -48
- package/lib/chat/prompt/plugins/AgentMentionPlugin.js +2 -9
- package/lib/chat/prompt/plugins/CommandPlugin.js +2 -9
- package/lib/chat/prompt/plugins/MentionChip.js +1 -15
- package/lib/chat/prompt/stack.js +1 -19
- package/lib/chat/tools/A2AAgentDialog.js +9 -42
- package/lib/chat/tools/SubagentActivity.js +5 -22
- package/lib/chat/tools/ToolApprovalBanner.js +4 -34
- package/lib/chat/tools/ToolApprovalDialog.js +4 -19
- package/lib/chat/tools/ToolCallDisplay.js +12 -97
- package/lib/chat/usage/ContextPie.js +4 -45
- package/lib/components/a2ui/datalayer/Chart.js +4 -10
- package/lib/components/a2ui/datalayer/Chat.js +2 -10
- package/lib/components/a2ui/datalayer/Download.js +1 -1
- package/lib/components/a2ui/datalayer/Evidence.js +1 -15
- package/lib/components/a2ui/datalayer/FileUpload.js +1 -12
- package/lib/components/a2ui/datalayer/Table.js +9 -17
- package/lib/components/a2ui/datalayer/formWidgets.js +3 -2
- package/lib/components/a2ui/datalayer/parts.js +1 -16
- package/lib/components/agents/AgentSummary.js +1 -51
- package/lib/components/cards/NotificationEventCard.js +6 -72
- package/lib/components/cards/OutputCard.js +4 -48
- package/lib/components/cards/ToolApprovalCard.js +2 -35
- package/lib/components/code-sandboxes/CodeSandboxCellVariables.js +1 -1
- package/lib/components/code-sandboxes/CodeSandboxEnvironmentSelect.js +4 -14
- package/lib/components/code-sandboxes/CodeSandboxPicker.js +16 -21
- package/lib/components/code-sandboxes/CodeSandboxVariables.js +2 -2
- package/lib/components/scheduler/ScheduleMenu.js +5 -10
- package/lib/components/specs/SpecPayloadPreview.js +1 -26
- package/lib/components/teams/A2ATeamGraph.d.ts +4 -3
- package/lib/components/teams/A2ATeamGraph.js +25 -71
- package/lib/components/teams/AnswerSurfacesView.js +2 -2
- package/lib/components/teams/NotebookPreview.js +1 -10
- package/lib/components/teams/NotebookPreviewView.js +2 -3
- package/lib/components/teams/SceneTranscript.js +3 -17
- package/lib/components/teams/SceneView.js +1 -8
- package/lib/components/teams/TeamNotebook.js +5 -13
- package/lib/components/teams/TeamNotebookView.js +2 -12
- package/lib/components/teams/index.d.ts +1 -0
- package/lib/components/teams/index.js +1 -0
- package/lib/components/teams/useBalloonRoom.d.ts +39 -0
- package/lib/components/teams/useBalloonRoom.js +89 -0
- package/lib/config/AgentConfiguration.js +22 -225
- package/lib/context/ContextDistribution.js +7 -41
- package/lib/context/ContextInspector.js +9 -107
- package/lib/context/ContextPanel.js +11 -86
- package/lib/context/ContextUsage.js +6 -34
- package/lib/context/CostTracker.js +7 -42
- package/lib/context/MessageHistory.js +3 -37
- package/lib/context/TurnGraphChart.js +9 -41
- package/lib/examples/A2UiAgentExample.js +6 -108
- package/lib/examples/A2UiComponentsGalleryExample.js +1 -1
- package/lib/examples/A2UiContactCardExample.js +1 -1
- package/lib/examples/A2UiJupyterOutputExample.js +25 -125
- package/lib/examples/A2UiRestaurantExample.js +1 -1
- package/lib/examples/A2UiViewerExample.js +1 -1
- package/lib/examples/AgUiAgenticExample.js +3 -35
- package/lib/examples/AgUiBackendToolRenderingExample.js +2 -25
- package/lib/examples/AgUiHaikuGenUiExample.js +2 -32
- package/lib/examples/AgUiHumanInTheLoopExample.js +5 -59
- package/lib/examples/AgUiSharedStateExample.js +6 -56
- package/lib/examples/AgUiToolsBasedGenUiExample.js +25 -120
- package/lib/examples/AgentA2AExample.js +1 -15
- package/lib/examples/AgentA2ATeamExample.js +6 -30
- package/lib/examples/AgentCheckpointsExample.js +11 -145
- package/lib/examples/AgentCodeSandboxExample.js +5 -108
- package/lib/examples/AgentCodeSandboxesExample.js +3 -30
- package/lib/examples/AgentCodemodeExample.js +9 -85
- package/lib/examples/AgentCompactionExample.js +3 -64
- package/lib/examples/AgentDecideExample.js +1 -13
- package/lib/examples/AgentEvalsExample.js +5 -60
- package/lib/examples/AgentGuardrailsExample.js +4 -28
- package/lib/examples/AgentHooksExample.js +1 -1
- package/lib/examples/AgentInferenceProviderExample.js +5 -96
- package/lib/examples/AgentMCPExample.js +7 -105
- package/lib/examples/AgentMemoryExample.js +5 -74
- package/lib/examples/AgentMonitoringExample.js +7 -53
- package/lib/examples/AgentNotificationsExample.js +3 -61
- package/lib/examples/AgentOtelExample.js +3 -72
- package/lib/examples/AgentOutputsExample.js +6 -81
- package/lib/examples/AgentParametersExample.js +2 -37
- package/lib/examples/AgentSkillsExample.js +3 -45
- package/lib/examples/AgentSubagentsExample.js +6 -56
- package/lib/examples/AgentToolApprovalsExample.js +1 -11
- package/lib/examples/AgentTriggersExample.js +29 -239
- package/lib/examples/AgentspecsExample.js +6 -60
- package/lib/examples/AssistantExample.js +5 -5
- package/lib/examples/AssistantGalleryExample.js +8 -65
- package/lib/examples/CellExample.js +1 -6
- package/lib/examples/ChatCustomExample.js +2 -31
- package/lib/examples/ChatExample.js +1 -9
- package/lib/examples/ChatStandaloneExample.js +3 -37
- package/lib/examples/CopilotKitLexicalExample.js +1 -24
- package/lib/examples/DecksAgent.js +1 -1
- package/lib/examples/DocumentPageAgent.js +1 -1
- package/lib/examples/HomeExample.js +14 -62
- package/lib/examples/Lexical2Example.js +3 -32
- package/lib/examples/LexicalAgentExample.js +2 -34
- package/lib/examples/LexicalAgentSidebarExample.js +3 -34
- package/lib/examples/LoopAppComputerExample.js +1 -1
- package/lib/examples/LoopShellExample.js +2 -2
- package/lib/examples/LoopStrategyExample.js +15 -87
- package/lib/examples/LoopWorkspaceEmbed.js +2 -18
- package/lib/examples/LoopWorkspaceExample.js +2 -2
- package/lib/examples/NotebookAgentExample.js +2 -33
- package/lib/examples/NotebookAgentSidebarExample.js +3 -46
- package/lib/examples/NotebookCollaborationExample.js +1 -31
- package/lib/examples/NotebookExample.js +1 -18
- package/lib/examples/NotebookPageAgent.js +1 -1
- package/lib/examples/ScenesExample.js +5 -24
- package/lib/examples/VoiceChatExample.js +1 -1
- package/lib/examples/components/AuthRequiredView.js +1 -7
- package/lib/examples/components/ErrorView.js +1 -8
- package/lib/examples/components/ExampleErrorBoundary.js +1 -14
- package/lib/examples/components/FooterMetrics.js +1 -7
- package/lib/examples/components/Header.js +12 -51
- package/lib/examples/components/HeaderControls.js +1 -9
- package/lib/examples/components/LexicalEditor.js +1 -8
- package/lib/examples/components/MainContent.js +1 -13
- package/lib/examples/components/MockFileBrowser.js +4 -40
- package/lib/examples/components/SessionTabs.js +1 -1
- package/lib/examples/components/TimeTravel.js +1 -13
- package/lib/examples/main.js +13 -81
- package/lib/examples/scenes/A2UiComponentsGalleryScene.js +3 -34
- package/lib/examples/scenes/A2UiContactCardScene.js +3 -35
- package/lib/examples/scenes/A2UiRestaurantScene.js +3 -53
- package/lib/examples/scenes/A2UiViewerScene.js +3 -34
- package/lib/examples/utils/AssistantGalleryGrid.js +6 -35
- package/lib/examples2/DatalayerNotebookExample.js +3 -33
- package/lib/examples2/NativeNavigationExample.js +4 -10
- package/lib/examples2/NotebookMutationsKernel.js +2 -1
- package/lib/examples2/NotebookMutationsServiceManager.js +2 -1
- package/lib/examples2/ReactRouterExample.js +14 -42
- package/lib/hooks/useToolApprovals.d.ts +2 -34
- package/lib/hooks/useToolApprovals.js +1 -64
- package/lib/identity/AgentIdentity.js +17 -62
- package/lib/identity/IdentityConnect.js +13 -59
- package/lib/identity/OAuthCallback.js +6 -44
- package/lib/lexical/ChatInlinePlugin.js +6 -14
- package/lib/loop/apps/AppRenderer.d.ts +4 -3
- package/lib/loop/apps/AppRenderer.js +11 -12
- package/lib/loop/apps/appspec.js +6 -3
- package/lib/loop/embed/AppEmbed.d.ts +1 -1
- package/lib/loop/embed/AppEmbed.js +2 -1
- package/lib/loop/embed/LoopEmbed.js +1 -7
- package/lib/loop/embed/embedConfig.d.ts +3 -3
- package/lib/loop/embed/embedConfig.js +2 -3
- package/lib/loop/embed/embedTheme.d.ts +4 -4
- package/lib/loop/embed/embedTheme.js +11 -7
- package/lib/loop/plugins/a2a-sidebar/A2ASidebar.js +7 -34
- package/lib/loop/plugins/a2ui/A2uiView.js +4 -12
- package/lib/loop/plugins/a2ui-surface/InlineSurface.js +1 -16
- package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +2 -12
- package/lib/loop/plugins/agents/AnonymousKeyBadge.js +3 -2
- package/lib/loop/plugins/agents/SandboxSelector.js +3 -7
- package/lib/loop/plugins/agents/SandboxView.js +4 -27
- package/lib/loop/plugins/agents/TeamMemberPicker.js +2 -2
- package/lib/loop/plugins/agentspecs/AgentspecPicker.js +3 -2
- package/lib/loop/plugins/app-activity/AppActivity.js +1 -1
- package/lib/loop/plugins/app-computer/AppComputer.js +5 -21
- package/lib/loop/plugins/app-elements/AppElements.js +2 -31
- package/lib/loop/plugins/app-page/AppPage.js +1 -1
- package/lib/loop/plugins/app-rules/AppRulesCard.js +4 -20
- package/lib/loop/plugins/assistant/index.js +1 -13
- package/lib/loop/plugins/chat/ChatView.js +40 -106
- package/lib/loop/plugins/checkpoints-sidebar/CheckpointsSidebar.js +2 -13
- package/lib/loop/plugins/decks/DeckSurface.js +2 -2
- package/lib/loop/plugins/document/DocumentView.js +4 -12
- package/lib/loop/plugins/document-toolbar/SandboxStatusItem.js +3 -8
- package/lib/loop/plugins/graph/GraphView.js +2 -2
- package/lib/loop/plugins/input-prompt/ComposerView.js +1 -1
- package/lib/loop/plugins/notebook/NotebookView.js +3 -11
- package/lib/loop/plugins/page-layout/SplitLayout.js +11 -34
- package/lib/loop/plugins/page-layout/TurnPanel.js +9 -35
- package/lib/loop/plugins/shell/useEditorPreviews.js +3 -2
- package/lib/loop/plugins/subagent-activity/SubagentPulse.js +1 -13
- package/lib/loop/plugins/window-frame/WindowFrame.js +10 -44
- package/lib/loop/plugins/window-frame/index.js +1 -1
- package/lib/loop/shell/LoopWorkspace.js +34 -77
- package/lib/loop/shell/PluginToggles.js +4 -15
- package/lib/loop/shell/SidebarRail.js +8 -40
- package/lib/loop/shell/ViewSwitcher.js +4 -24
- package/lib/loop-main.js +2 -3
- package/lib/mcp/McpServerManager.js +6 -37
- package/lib/portable/index.d.ts +11 -0
- package/lib/portable/index.js +20 -0
- package/lib/protocols/AGUIAdapter.js +2 -2
- package/lib/protocols/BaseProtocolAdapter.d.ts +2 -0
- package/lib/protocols/BaseProtocolAdapter.js +4 -0
- package/lib/specs/apps.js +6 -0
- package/lib/specs/appspecSchema.js +11 -4
- package/lib/stories/loop/ReferenceScreens.js +17 -91
- package/lib/stories/loop/pictures-main.js +1 -1
- package/lib/types/agentspecs.d.ts +5 -2
- package/lib/types/protocol.d.ts +2 -0
- package/lib/utils/approvals.d.ts +59 -0
- package/lib/utils/approvals.js +101 -0
- package/lib/voice/VoiceInput.js +3 -39
- package/package.json +2 -2
- package/lib/shims/primerAddonsBox.d.ts +0 -1
- package/lib/shims/primerAddonsBox.js +0 -7
|
@@ -196,91 +196,22 @@ const AgentMemoryInner = ({ onLogout }) => {
|
|
|
196
196
|
return _jsx(ErrorView, { error: hookError, onLogout: onLogout });
|
|
197
197
|
}
|
|
198
198
|
// ── Main layout ──────────────────────────────────────────────────────────
|
|
199
|
-
return (_jsxs(Box, { sx: {
|
|
200
|
-
height: '100%',
|
|
201
|
-
display: 'flex',
|
|
202
|
-
flexDirection: 'column',
|
|
203
|
-
bg: 'canvas.default',
|
|
204
|
-
}, children: [_jsxs(Box, { sx: {
|
|
205
|
-
display: 'flex',
|
|
206
|
-
alignItems: 'center',
|
|
207
|
-
gap: 2,
|
|
208
|
-
px: 3,
|
|
209
|
-
py: 2,
|
|
210
|
-
borderBottom: '1px solid',
|
|
211
|
-
borderColor: 'border.default',
|
|
212
|
-
flexShrink: 0,
|
|
213
|
-
}, children: [_jsx(DatabaseIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Durable Memory \u2014 ", runtimeName] })] }), _jsxs(Box, { sx: { display: 'flex', flex: 1, minHeight: 0 }, children: [_jsx(Box, { sx: {
|
|
214
|
-
flex: 1,
|
|
215
|
-
minWidth: 0,
|
|
216
|
-
borderRight: '1px solid',
|
|
217
|
-
borderColor: 'border.default',
|
|
218
|
-
}, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentId, editors: false, showHeader: true, plugins: LOOP_PLUGINS_AGENTMEM }) }), _jsxs(Box, { sx: {
|
|
219
|
-
width: 340,
|
|
220
|
-
flexShrink: 0,
|
|
221
|
-
display: 'flex',
|
|
222
|
-
flexDirection: 'column',
|
|
223
|
-
bg: 'canvas.default',
|
|
224
|
-
}, children: [_jsxs(Box, { sx: {
|
|
225
|
-
px: 3,
|
|
226
|
-
py: 2,
|
|
227
|
-
borderBottom: '1px solid',
|
|
228
|
-
borderColor: 'border.default',
|
|
229
|
-
}, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2, mb: 2 }, children: [_jsx(DatabaseIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2 }, children: "Memory Inspector" })] }), _jsx(Label, { variant: "accent", sx: { mb: 2 }, children: runtimeTarget === 'local'
|
|
199
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", bg: "canvas.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: [_jsx(DatabaseIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Durable Memory \u2014 ", runtimeName] })] }), _jsxs(Box, { display: "flex", flex: 1, minHeight: 0, children: [_jsx(Box, { flex: 1, minWidth: 0, borderRight: "1px solid", borderColor: "border.default", children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentId, editors: false, showHeader: true, plugins: LOOP_PLUGINS_AGENTMEM }) }), _jsxs(Box, { width: 340, flexShrink: 0, display: "flex", flexDirection: "column", bg: "canvas.default", children: [_jsxs(Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [_jsx(DatabaseIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2 }, children: "Memory Inspector" })] }), _jsx(Label, { variant: "accent", sx: { mb: 2 }, children: runtimeTarget === 'local'
|
|
230
200
|
? 'SQLite backend (local, persistent)'
|
|
231
|
-
: 'Mem0 pgvector backend (cloud)' }), _jsx(Flash, { variant: "default", sx: { fontSize: 0, mt: 2 }, children: "Memory persistence conditions: for local runs the agent uses a durable SQLite store; for cloud runs it uses Mem0. Durable facts are saved when the model emits a remember action (not every turn)." }), _jsxs(Box, {
|
|
232
|
-
px: 3,
|
|
233
|
-
py: 2,
|
|
234
|
-
borderBottom: '1px solid',
|
|
235
|
-
borderColor: 'border.default',
|
|
236
|
-
}, children: [_jsxs(Text, { sx: {
|
|
201
|
+
: 'Mem0 pgvector backend (cloud)' }), _jsx(Flash, { variant: "default", sx: { fontSize: 0, mt: 2 }, children: "Memory persistence conditions: for local runs the agent uses a durable SQLite store; for cloud runs it uses Mem0. Durable facts are saved when the model emits a remember action (not every turn)." }), _jsxs(Box, { display: "flex", gap: 1, mt: 2, children: [_jsx(TextInput, { size: "small", value: searchQuery, onChange: e => setSearchQuery(e.target.value), placeholder: "Search agent memory\u2026", sx: { flex: 1 }, onKeyDown: e => e.key === 'Enter' && handleSearch() }), _jsx(Button, { size: "small", leadingVisual: SearchIcon, onClick: handleSearch, disabled: searching, children: searching ? _jsx(Spinner, { size: "small" }) : 'Search' }), _jsx(Button, { size: "small", leadingVisual: ListUnorderedIcon, onClick: handleListAll, children: "List all" })] })] }), searchResults.length > 0 && (_jsxs(Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", children: [_jsxs(Text, { sx: {
|
|
237
202
|
fontWeight: 'semibold',
|
|
238
203
|
fontSize: 0,
|
|
239
204
|
display: 'block',
|
|
240
205
|
mb: 1,
|
|
241
|
-
}, children: ["Search Results (", searchResults.length, ")"] }), searchResults.map((entry, i) => (_jsxs(Box, { sx: {
|
|
242
|
-
p: 2,
|
|
243
|
-
mb: 1,
|
|
244
|
-
bg: 'canvas.default',
|
|
245
|
-
borderRadius: 2,
|
|
246
|
-
border: '1px solid',
|
|
247
|
-
borderColor: 'border.muted',
|
|
248
|
-
fontSize: 0,
|
|
249
|
-
}, children: [_jsx(Text, { sx: { display: 'block' }, children: entry.content }), entry.score != null && (_jsxs(Text, { sx: { color: 'fg.muted', fontSize: '10px' }, children: ["score: ", entry.score.toFixed(3)] }))] }, entry.id || i)))] })), searchAttempted &&
|
|
206
|
+
}, children: ["Search Results (", searchResults.length, ")"] }), searchResults.map((entry, i) => (_jsxs(Box, { p: 2, mb: 1, bg: "canvas.default", borderRadius: 2, border: "1px solid", borderColor: "border.muted", fontSize: 0, children: [_jsx(Text, { sx: { display: 'block' }, children: entry.content }), entry.score != null && (_jsxs(Text, { sx: { color: 'fg.muted', fontSize: '10px' }, children: ["score: ", entry.score.toFixed(3)] }))] }, entry.id || i)))] })), searchAttempted &&
|
|
250
207
|
!searching &&
|
|
251
208
|
searchQuery.trim() &&
|
|
252
|
-
searchResults.length === 0 && (_jsx(Box, { sx: {
|
|
253
|
-
px: 3,
|
|
254
|
-
py: 2,
|
|
255
|
-
borderBottom: '1px solid',
|
|
256
|
-
borderColor: 'border.default',
|
|
257
|
-
}, children: _jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No matching memories found for this query yet." }) })), _jsxs(Box, { sx: { flex: 1, overflow: 'auto', px: 3, py: 2 }, children: [_jsxs(Box, { sx: {
|
|
258
|
-
display: 'flex',
|
|
259
|
-
alignItems: 'center',
|
|
260
|
-
justifyContent: 'space-between',
|
|
261
|
-
mb: 2,
|
|
262
|
-
}, children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Stored Memories (", memories.length, ")"] }), _jsx(Button, { size: "small", variant: "invisible", onClick: fetchMemories, children: "Refresh" })] }), memories.length === 0 ? (_jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No memories yet. Start chatting \u2014 the agent will remember facts and preferences automatically." })) : (memories.map((entry, i) => (_jsx(Box, { sx: {
|
|
263
|
-
p: 2,
|
|
264
|
-
mb: 1,
|
|
265
|
-
bg: 'canvas.default',
|
|
266
|
-
borderRadius: 2,
|
|
267
|
-
border: '1px solid',
|
|
268
|
-
borderColor: 'border.muted',
|
|
269
|
-
fontSize: 0,
|
|
270
|
-
}, children: _jsx(Text, { sx: { display: 'block' }, children: entry.content }) }, entry.id || i)))), _jsxs(Box, { sx: { mt: 3 }, children: [_jsx(Text, { sx: {
|
|
209
|
+
searchResults.length === 0 && (_jsx(Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", children: _jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No matching memories found for this query yet." }) })), _jsxs(Box, { flex: 1, overflow: "auto", px: 3, py: 2, children: [_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 2, children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Stored Memories (", memories.length, ")"] }), _jsx(Button, { size: "small", variant: "invisible", onClick: fetchMemories, children: "Refresh" })] }), memories.length === 0 ? (_jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No memories yet. Start chatting \u2014 the agent will remember facts and preferences automatically." })) : (memories.map((entry, i) => (_jsx(Box, { p: 2, mb: 1, bg: "canvas.default", borderRadius: 2, border: "1px solid", borderColor: "border.muted", fontSize: 0, children: _jsx(Text, { sx: { display: 'block' }, children: entry.content }) }, entry.id || i)))), _jsxs(Box, { mt: 3, children: [_jsx(Text, { sx: {
|
|
271
210
|
fontWeight: 'semibold',
|
|
272
211
|
fontSize: 0,
|
|
273
212
|
display: 'block',
|
|
274
213
|
mb: 2,
|
|
275
|
-
}, children: "Runtimes API (account scoped)" }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block', mb: 2 }, children: "Uses listRuntimeMemories against /api/runtimes/v1/memories. This endpoint is only available when the runtimes service is configured; local example-only runs may return Not Found." }), accountMemoriesError ? (_jsx(Flash, { variant: "warning", sx: { fontSize: 0, mb: 2 }, children: accountMemoriesError })) : null, accountMemories.length === 0 ? (_jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No runtime memories returned." })) : (accountMemories.map((entry, i) => (_jsx(Box, { sx: {
|
|
276
|
-
p: 2,
|
|
277
|
-
mb: 1,
|
|
278
|
-
bg: 'canvas.default',
|
|
279
|
-
borderRadius: 2,
|
|
280
|
-
border: '1px solid',
|
|
281
|
-
borderColor: 'border.muted',
|
|
282
|
-
fontSize: 0,
|
|
283
|
-
}, children: _jsx(Text, { sx: { display: 'block' }, children: entry.content }) }, `runtime-${entry.id || i}`))))] })] })] })] })] }));
|
|
214
|
+
}, children: "Runtimes API (account scoped)" }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block', mb: 2 }, children: "Uses listRuntimeMemories against /api/runtimes/v1/memories. This endpoint is only available when the runtimes service is configured; local example-only runs may return Not Found." }), accountMemoriesError ? (_jsx(Flash, { variant: "warning", sx: { fontSize: 0, mb: 2 }, children: accountMemoriesError })) : null, accountMemories.length === 0 ? (_jsx(Flash, { variant: "default", sx: { fontSize: 0 }, children: "No runtime memories returned." })) : (accountMemories.map((entry, i) => (_jsx(Box, { p: 2, mb: 1, bg: "canvas.default", borderRadius: 2, border: "1px solid", borderColor: "border.muted", fontSize: 0, children: _jsx(Text, { sx: { display: 'block' }, children: entry.content }) }, `runtime-${entry.id || i}`))))] })] })] })] })] }));
|
|
284
215
|
};
|
|
285
216
|
// ─── Sync token to core IAM store ──────────────────────────────────────────
|
|
286
217
|
const syncTokenToIamStore = (token) => {
|
|
@@ -262,29 +262,12 @@ const AgentMonitoringInner = ({ onLogout, }) => {
|
|
|
262
262
|
if (runtimeStatus === 'error' || hookError) {
|
|
263
263
|
return _jsx(ErrorView, { error: hookError, onLogout: onLogout });
|
|
264
264
|
}
|
|
265
|
-
return (_jsxs(Box, { sx: {
|
|
266
|
-
height: '100%',
|
|
267
|
-
display: 'flex',
|
|
268
|
-
flexDirection: 'column',
|
|
269
|
-
}, children: [_jsxs(Box, { sx: {
|
|
270
|
-
display: 'flex',
|
|
271
|
-
alignItems: 'center',
|
|
272
|
-
gap: 2,
|
|
273
|
-
px: 3,
|
|
274
|
-
py: 2,
|
|
275
|
-
borderBottom: '1px solid',
|
|
276
|
-
borderColor: 'border.default',
|
|
277
|
-
flexShrink: 0,
|
|
278
|
-
}, children: [_jsx(GraphIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Monitoring \u2014 ", runtimeName] }), isReconnectedAgent && (_jsx(Label, { variant: "secondary", size: "small", children: "Reconnected" })), _jsxs(Label, { variant: monitorSocket.connectionState === 'connected'
|
|
265
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: [_jsx(GraphIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Monitoring \u2014 ", runtimeName] }), isReconnectedAgent && (_jsx(Label, { variant: "secondary", size: "small", children: "Reconnected" })), _jsxs(Label, { variant: monitorSocket.connectionState === 'connected'
|
|
279
266
|
? 'success'
|
|
280
|
-
: 'secondary', children: ["WS: ", monitorSocket.connectionState] })] }), _jsxs(Box, {
|
|
267
|
+
: 'secondary', children: ["WS: ", monitorSocket.connectionState] })] }), _jsxs(Box, { flex: 1, minHeight: 0, display: "flex", children: [_jsxs(Box, { borderRight: "1px solid", borderColor: "border.default", flexDirection: "column", overflow: "auto", sx: {
|
|
281
268
|
width: 320,
|
|
282
269
|
minWidth: 280,
|
|
283
|
-
borderRight: '1px solid',
|
|
284
|
-
borderColor: 'border.default',
|
|
285
270
|
display: 'flex',
|
|
286
|
-
flexDirection: 'column',
|
|
287
|
-
overflow: 'auto',
|
|
288
271
|
'@media (max-width: 1680px)': {
|
|
289
272
|
width: 300,
|
|
290
273
|
minWidth: 260,
|
|
@@ -292,31 +275,14 @@ const AgentMonitoringInner = ({ onLogout, }) => {
|
|
|
292
275
|
'@media (max-width: 1400px)': {
|
|
293
276
|
display: 'none',
|
|
294
277
|
},
|
|
295
|
-
}, children: [_jsxs(Box, { sx: {
|
|
296
|
-
p: 3,
|
|
297
|
-
borderBottom: '1px solid',
|
|
298
|
-
borderColor: 'border.default',
|
|
299
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Token Usage" }), _jsx(TokenUsageChart, { serviceName: otelServiceName, agentId: agentId, apiKey: token ?? undefined, otelUrl: otelBaseUrl, liveSystemPromptTokens: liveContextSnapshot?.systemPromptTokens, liveUserMessageTokens: liveContextSnapshot?.userMessageTokens, liveAgentMessageTokens: liveContextSnapshot?.assistantMessageTokens, liveToolsUsageTokens: liveContextSnapshot?.toolTokens, liveTimestampMs: monitorLastSnapshotAt, height: 180 })] }), _jsxs(Box, { sx: {
|
|
300
|
-
p: 3,
|
|
301
|
-
borderBottom: '1px solid',
|
|
302
|
-
borderColor: 'border.default',
|
|
303
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Cost" }), _jsx(CostUsageChart, { serviceName: otelServiceName, agentId: agentId, apiKey: token ?? undefined, otelUrl: otelBaseUrl, liveCumulativeUsd: liveCost?.cumulativeCostUsd, liveTimestampMs: monitorLastSnapshotAt, height: 180 })] }), _jsxs(Box, { sx: {
|
|
304
|
-
p: 3,
|
|
305
|
-
borderBottom: '1px solid',
|
|
306
|
-
borderColor: 'border.default',
|
|
307
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "LLM Cost Monitoring" }), liveCost ? (_jsx(CostTracker, { agentId: agentId, compact: false, liveData: liveCost })) : (_jsxs(Box, { children: [_jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Waiting for first websocket snapshot..." }), monitorSocket.lastClose?.detail && (_jsxs(Text, { sx: {
|
|
278
|
+
}, children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Token Usage" }), _jsx(TokenUsageChart, { serviceName: otelServiceName, agentId: agentId, apiKey: token ?? undefined, otelUrl: otelBaseUrl, liveSystemPromptTokens: liveContextSnapshot?.systemPromptTokens, liveUserMessageTokens: liveContextSnapshot?.userMessageTokens, liveAgentMessageTokens: liveContextSnapshot?.assistantMessageTokens, liveToolsUsageTokens: liveContextSnapshot?.toolTokens, liveTimestampMs: monitorLastSnapshotAt, height: 180 })] }), _jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Cost" }), _jsx(CostUsageChart, { serviceName: otelServiceName, agentId: agentId, apiKey: token ?? undefined, otelUrl: otelBaseUrl, liveCumulativeUsd: liveCost?.cumulativeCostUsd, liveTimestampMs: monitorLastSnapshotAt, height: 180 })] }), _jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "LLM Cost Monitoring" }), liveCost ? (_jsx(CostTracker, { agentId: agentId, compact: false, liveData: liveCost })) : (_jsxs(Box, { children: [_jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Waiting for first websocket snapshot..." }), monitorSocket.lastClose?.detail && (_jsxs(Text, { sx: {
|
|
308
279
|
color: 'danger.fg',
|
|
309
280
|
fontSize: 0,
|
|
310
281
|
mt: 1,
|
|
311
282
|
display: 'block',
|
|
312
|
-
}, children: ["Last close: ", monitorSocket.lastClose.detail] }))] }))] })] }), _jsx(Box, {
|
|
283
|
+
}, children: ["Last close: ", monitorSocket.lastClose.detail] }))] }))] })] }), _jsx(Box, { flex: 1, minWidth: 0, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentId, editors: false, showHeader: true, plugins: chatPlugins }) }), _jsxs(Box, { borderLeft: "1px solid", borderColor: "border.default", display: "flex", flexDirection: "column", overflow: "auto", sx: {
|
|
313
284
|
width: 360,
|
|
314
285
|
minWidth: 320,
|
|
315
|
-
borderLeft: '1px solid',
|
|
316
|
-
borderColor: 'border.default',
|
|
317
|
-
display: 'flex',
|
|
318
|
-
flexDirection: 'column',
|
|
319
|
-
overflow: 'auto',
|
|
320
286
|
'@media (max-width: 1680px)': {
|
|
321
287
|
width: 340,
|
|
322
288
|
minWidth: 300,
|
|
@@ -325,26 +291,14 @@ const AgentMonitoringInner = ({ onLogout, }) => {
|
|
|
325
291
|
width: 300,
|
|
326
292
|
minWidth: 260,
|
|
327
293
|
},
|
|
328
|
-
}, children: [_jsxs(Box, { sx: {
|
|
329
|
-
p: 3,
|
|
330
|
-
borderBottom: '1px solid',
|
|
331
|
-
borderColor: 'border.default',
|
|
332
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Turn and Session Usage" }), liveContext ? (_jsx(ContextPanel, { agentId: agentId, apiBase: agentBaseUrl, liveData: liveContext, defaultView: "overview", chartHeight: "160px" })) : (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Waiting for first websocket snapshot..." })), _jsxs(Text, { sx: { mt: 2, color: 'fg.muted', fontSize: 0 }, children: ["Live monitoring uses websocket snapshots only.", monitorLastSnapshotAt
|
|
294
|
+
}, children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Turn and Session Usage" }), liveContext ? (_jsx(ContextPanel, { agentId: agentId, apiBase: agentBaseUrl, liveData: liveContext, defaultView: "overview", chartHeight: "160px" })) : (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Waiting for first websocket snapshot..." })), _jsxs(Text, { sx: { mt: 2, color: 'fg.muted', fontSize: 0 }, children: ["Live monitoring uses websocket snapshots only.", monitorLastSnapshotAt
|
|
333
295
|
? ` Last snapshot ${new Date(monitorLastSnapshotAt).toLocaleTimeString()}.`
|
|
334
296
|
: '', monitorSocket.connectionState !== 'connected' &&
|
|
335
297
|
monitorSocket.reconnectAttempt > 0
|
|
336
298
|
? ` Reconnect attempt ${monitorSocket.reconnectAttempt}.`
|
|
337
|
-
: ''] })] }), liveGraphTelemetry && (_jsxs(Box, { sx: {
|
|
338
|
-
p: 3,
|
|
339
|
-
borderBottom: '1px solid',
|
|
340
|
-
borderColor: 'border.default',
|
|
341
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Graph Execution (live)" }), _jsx(GraphFlowChart, { data: liveGraphTelemetry, height: 240 }), _jsxs(Text, { sx: { mt: 1, color: 'fg.muted', fontSize: 0 }, children: [liveGraphTelemetry.totalNodesExecuted, " node(s) executed across", ' ', liveGraphTelemetry.runCount, " run(s)", liveGraphTelemetry.totalDurationMs
|
|
299
|
+
: ''] })] }), liveGraphTelemetry && (_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Graph Execution (live)" }), _jsx(GraphFlowChart, { data: liveGraphTelemetry, height: 240 }), _jsxs(Text, { sx: { mt: 1, color: 'fg.muted', fontSize: 0 }, children: [liveGraphTelemetry.totalNodesExecuted, " node(s) executed across", ' ', liveGraphTelemetry.runCount, " run(s)", liveGraphTelemetry.totalDurationMs
|
|
342
300
|
? ` — ${(liveGraphTelemetry.totalDurationMs / 1000).toFixed(2)}s total`
|
|
343
|
-
: ''] })] })), _jsxs(Box, { sx: {
|
|
344
|
-
p: 3,
|
|
345
|
-
borderBottom: '1px solid',
|
|
346
|
-
borderColor: 'border.default',
|
|
347
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Turn Execution Graph (OTEL traces)" }), _jsx(TurnGraphChart, { serviceName: otelServiceName, agentId: agentId, otelUrl: otelBaseUrl, apiKey: token ?? undefined, autoRefreshMs: 10_000, height: 280 })] })] })] })] }));
|
|
301
|
+
: ''] })] })), _jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Turn Execution Graph (OTEL traces)" }), _jsx(TurnGraphChart, { serviceName: otelServiceName, agentId: agentId, otelUrl: otelBaseUrl, apiKey: token ?? undefined, autoRefreshMs: 10_000, height: 280 })] })] })] })] }));
|
|
348
302
|
};
|
|
349
303
|
const syncTokenToIamStore = (token) => {
|
|
350
304
|
import('../state/substates').then(({ iamStore }) => {
|
|
@@ -200,73 +200,15 @@ const AgentNotificationsInner = ({ onLogout, }) => {
|
|
|
200
200
|
return AlertIcon; // placeholder for Slack icon
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
return (_jsxs(Box, { sx: {
|
|
204
|
-
height: '100%',
|
|
205
|
-
display: 'flex',
|
|
206
|
-
flexDirection: 'column',
|
|
207
|
-
}, children: [_jsxs(Box, { sx: {
|
|
208
|
-
display: 'flex',
|
|
209
|
-
alignItems: 'center',
|
|
210
|
-
gap: 2,
|
|
211
|
-
px: 3,
|
|
212
|
-
py: 2,
|
|
213
|
-
borderBottom: '1px solid',
|
|
214
|
-
borderColor: 'border.default',
|
|
215
|
-
flexShrink: 0,
|
|
216
|
-
}, children: [_jsx(BellIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Notifications \u2014 ", runtimeName] }), unreadCount > 0 && (_jsxs(Label, { variant: "accent", size: "small", children: [unreadCount, " unread"] }))] }), _jsxs(Box, { sx: { flex: 1, minHeight: 0, display: 'flex' }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentId, editors: false, showHeader: true, plugins: plugins }) }), _jsxs(Box, { sx: {
|
|
217
|
-
width: 380,
|
|
218
|
-
borderLeft: '1px solid',
|
|
219
|
-
borderColor: 'border.default',
|
|
220
|
-
display: 'flex',
|
|
221
|
-
flexDirection: 'column',
|
|
222
|
-
overflow: 'auto',
|
|
223
|
-
}, children: [_jsxs(Box, { sx: {
|
|
224
|
-
p: 3,
|
|
225
|
-
borderBottom: '1px solid',
|
|
226
|
-
borderColor: 'border.default',
|
|
227
|
-
}, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, mb: 2 }, children: [_jsx(BellIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2 }, children: "Channels" })] }), channels.map(ch => {
|
|
203
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: [_jsx(BellIcon, { size: 16 }), _jsxs(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: ["Notifications \u2014 ", runtimeName] }), unreadCount > 0 && (_jsxs(Label, { variant: "accent", size: "small", children: [unreadCount, " unread"] }))] }), _jsxs(Box, { flex: 1, minHeight: 0, display: "flex", children: [_jsx(Box, { flex: 1, minWidth: 0, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentId, editors: false, showHeader: true, plugins: plugins }) }), _jsxs(Box, { width: 380, borderLeft: "1px solid", borderColor: "border.default", display: "flex", flexDirection: "column", overflow: "auto", children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 1, mb: 2, children: [_jsx(BellIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2 }, children: "Channels" })] }), channels.map(ch => {
|
|
228
204
|
const Icon = channelIcon(ch.channel);
|
|
229
|
-
return (_jsxs(Box, { sx: {
|
|
230
|
-
p: 2,
|
|
231
|
-
mb: 2,
|
|
232
|
-
border: '1px solid',
|
|
233
|
-
borderColor: 'border.default',
|
|
234
|
-
borderRadius: 2,
|
|
235
|
-
}, children: [_jsxs(Box, { sx: {
|
|
236
|
-
display: 'flex',
|
|
237
|
-
justifyContent: 'space-between',
|
|
238
|
-
alignItems: 'center',
|
|
239
|
-
mb: ch.channel !== 'in-app' ? 1 : 0,
|
|
240
|
-
}, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { size: 14 }), _jsx(Text, { sx: { fontWeight: 'bold', fontSize: 1 }, children: ch.channel })] }), _jsx(Button, { size: "small", variant: ch.enabled ? 'danger' : 'primary', leadingVisual: ch.enabled ? MuteIcon : BellIcon, onClick: () => handleToggleChannel(ch.channel), disabled: isSaving, children: ch.enabled ? 'Disable' : 'Enable' })] }), ch.channel !== 'in-app' && (_jsx(TextInput, { value: editTargets[ch.channel] ?? ch.target ?? '', onChange: e => setEditTargets(prev => ({
|
|
205
|
+
return (_jsxs(Box, { p: 2, mb: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, children: [_jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: ch.channel !== 'in-app' ? 1 : 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [_jsx(Icon, { size: 14 }), _jsx(Text, { sx: { fontWeight: 'bold', fontSize: 1 }, children: ch.channel })] }), _jsx(Button, { size: "small", variant: ch.enabled ? 'danger' : 'primary', leadingVisual: ch.enabled ? MuteIcon : BellIcon, onClick: () => handleToggleChannel(ch.channel), disabled: isSaving, children: ch.enabled ? 'Disable' : 'Enable' })] }), ch.channel !== 'in-app' && (_jsx(TextInput, { value: editTargets[ch.channel] ?? ch.target ?? '', onChange: e => setEditTargets(prev => ({
|
|
241
206
|
...prev,
|
|
242
207
|
[ch.channel]: e.target.value,
|
|
243
208
|
})), placeholder: ch.channel === 'email'
|
|
244
209
|
? 'user@example.com'
|
|
245
210
|
: 'https://hooks.slack.com/…', size: "small", sx: { width: '100%' } }))] }, ch.channel));
|
|
246
|
-
}), _jsx(Button, { size: "small", leadingVisual: BellIcon, onClick: handleTestNotification, sx: { width: '100%' }, children: "Send Test Notification" }), flash && (_jsx(Flash, { variant: flash.includes('sent') ? 'success' : 'danger', sx: { mt: 2, fontSize: 0 }, children: flash }))] }), _jsxs(Box, { sx: {
|
|
247
|
-
p: 3,
|
|
248
|
-
borderBottom: '1px solid',
|
|
249
|
-
borderColor: 'border.default',
|
|
250
|
-
}, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Recent Alerts" }), recentAlerts.length === 0 ? (_jsxs(Box, { sx: {
|
|
251
|
-
p: 2,
|
|
252
|
-
border: '1px solid',
|
|
253
|
-
borderColor: 'border.default',
|
|
254
|
-
borderRadius: 2,
|
|
255
|
-
display: 'flex',
|
|
256
|
-
alignItems: 'center',
|
|
257
|
-
gap: 2,
|
|
258
|
-
}, children: [_jsx(CheckCircleIcon, { size: 16 }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "No active alerts." })] })) : (recentAlerts.map(alert => (_jsxs(Box, { sx: {
|
|
259
|
-
p: 2,
|
|
260
|
-
mb: 2,
|
|
261
|
-
border: '1px solid',
|
|
262
|
-
borderColor: 'border.default',
|
|
263
|
-
borderRadius: 2,
|
|
264
|
-
}, children: [_jsxs(Box, { sx: {
|
|
265
|
-
display: 'flex',
|
|
266
|
-
justifyContent: 'space-between',
|
|
267
|
-
alignItems: 'center',
|
|
268
|
-
mb: 1,
|
|
269
|
-
}, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 'bold' }, children: alert.title }), _jsx(Label, { size: "small", variant: alertVariant(alert.severity), children: alert.severity })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: new Date(alert.timestamp).toLocaleString() })] }, alert.id))))] }), _jsxs(Box, { sx: { p: 3, flex: 1, overflow: 'auto' }, children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Recent Notifications" }), notifications.length === 0 ? (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 0 }, children: "No notifications yet." })) : (_jsx(Timeline, { children: notifications.slice(0, 25).map(n => (_jsxs(Timeline.Item, { "data-notification": n.id, children: [_jsx(Timeline.Badge, { sx: { cursor: n.read ? 'default' : 'pointer' }, onClick: () => {
|
|
211
|
+
}), _jsx(Button, { size: "small", leadingVisual: BellIcon, onClick: handleTestNotification, sx: { width: '100%' }, children: "Send Test Notification" }), flash && (_jsx(Flash, { variant: flash.includes('sent') ? 'success' : 'danger', sx: { mt: 2, fontSize: 0 }, children: flash }))] }), _jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Recent Alerts" }), recentAlerts.length === 0 ? (_jsxs(Box, { p: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, display: "flex", alignItems: "center", gap: 2, children: [_jsx(CheckCircleIcon, { size: 16 }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "No active alerts." })] })) : (recentAlerts.map(alert => (_jsxs(Box, { p: 2, mb: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, children: [_jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 'bold' }, children: alert.title }), _jsx(Label, { size: "small", variant: alertVariant(alert.severity), children: alert.severity })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: new Date(alert.timestamp).toLocaleString() })] }, alert.id))))] }), _jsxs(Box, { p: 3, flex: 1, overflow: "auto", children: [_jsx(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: "Recent Notifications" }), notifications.length === 0 ? (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 0 }, children: "No notifications yet." })) : (_jsx(Timeline, { children: notifications.slice(0, 25).map(n => (_jsxs(Timeline.Item, { "data-notification": n.id, children: [_jsx(Timeline.Badge, { sx: { cursor: n.read ? 'default' : 'pointer' }, onClick: () => {
|
|
270
212
|
if (!n.read)
|
|
271
213
|
void handleMarkRead(n.id);
|
|
272
214
|
}, title: n.read ? 'Read' : 'Mark as read', children: n.read ? _jsx(CheckCircleIcon, {}) : _jsx(BellIcon, {}) }), _jsxs(Timeline.Body, { children: [_jsx(Text, { sx: {
|
|
@@ -76,29 +76,9 @@ const AgentLaunchPanel = ({ baseUrl, onConnected, onDisconnected, isConnected, c
|
|
|
76
76
|
void handleLaunch();
|
|
77
77
|
}, [handleLaunch, isConnected]);
|
|
78
78
|
if (isConnected) {
|
|
79
|
-
return (_jsxs(Box, { sx: {
|
|
80
|
-
px: 3,
|
|
81
|
-
py: 2,
|
|
82
|
-
borderBottom: '1px solid',
|
|
83
|
-
borderColor: 'border.default',
|
|
84
|
-
display: 'flex',
|
|
85
|
-
alignItems: 'center',
|
|
86
|
-
gap: 2,
|
|
87
|
-
flexShrink: 0,
|
|
88
|
-
bg: 'success.subtle',
|
|
89
|
-
}, children: [_jsx(PlugIcon, { size: 14 }), _jsx(Text, { sx: { fontSize: 1, flex: 1, color: 'success.fg' }, children: connectedAgentName ?? 'Agent connected' }), _jsx(Button, { size: "small", variant: "invisible", onClick: onDisconnected, leadingVisual: XIcon, sx: { color: 'fg.muted' }, children: "Disconnect" })] }));
|
|
79
|
+
return (_jsxs(Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", display: "flex", alignItems: "center", gap: 2, flexShrink: 0, bg: "success.subtle", children: [_jsx(PlugIcon, { size: 14 }), _jsx(Text, { sx: { fontSize: 1, flex: 1, color: 'success.fg' }, children: connectedAgentName ?? 'Agent connected' }), _jsx(Button, { size: "small", variant: "invisible", onClick: onDisconnected, leadingVisual: XIcon, sx: { color: 'fg.muted' }, children: "Disconnect" })] }));
|
|
90
80
|
}
|
|
91
|
-
return (_jsxs(Box, { sx: {
|
|
92
|
-
px: 3,
|
|
93
|
-
py: 2,
|
|
94
|
-
borderBottom: '1px solid',
|
|
95
|
-
borderColor: 'border.default',
|
|
96
|
-
display: 'flex',
|
|
97
|
-
flexDirection: 'column',
|
|
98
|
-
gap: 2,
|
|
99
|
-
flexShrink: 0,
|
|
100
|
-
bg: 'canvas.default',
|
|
101
|
-
}, children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: 'fg.muted' }, children: "AGENT" }), loading ? (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Spinner, { size: "small" }), _jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Launching ", AGENTSPEC_ID, "\u2026"] })] })) : error ? (_jsxs(_Fragment, { children: [_jsx(Text, { sx: { fontSize: 1, color: 'danger.fg' }, children: error }), _jsx(Button, { variant: "primary", size: "small", onClick: handleLaunch, leadingVisual: PlugIcon, sx: { width: '100%' }, children: "Retry" })] })) : (_jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Launching ", AGENTSPEC_ID, "\u2026"] }))] }));
|
|
81
|
+
return (_jsxs(Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", display: "flex", flexDirection: "column", gap: 2, flexShrink: 0, bg: "canvas.default", children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: 'fg.muted' }, children: "AGENT" }), loading ? (_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Spinner, { size: "small" }), _jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Launching ", AGENTSPEC_ID, "\u2026"] })] })) : error ? (_jsxs(_Fragment, { children: [_jsx(Text, { sx: { fontSize: 1, color: 'danger.fg' }, children: error }), _jsx(Button, { variant: "primary", size: "small", onClick: handleLaunch, leadingVisual: PlugIcon, sx: { width: '100%' }, children: "Retry" })] })) : (_jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: ["Launching ", AGENTSPEC_ID, "\u2026"] }))] }));
|
|
102
82
|
};
|
|
103
83
|
const TAB_SX = (active) => ({
|
|
104
84
|
px: 3,
|
|
@@ -157,56 +137,7 @@ const AgentOtelExampleInner = ({ token }) => {
|
|
|
157
137
|
setConnectedAgentId(null);
|
|
158
138
|
}, [connectedAgentId, agentBaseUrl]);
|
|
159
139
|
const otelPlugins = useMemo(() => [AgentOtelPlugin], []);
|
|
160
|
-
return (_jsxs(Box, { sx: {
|
|
161
|
-
display: 'flex',
|
|
162
|
-
flexDirection: 'column',
|
|
163
|
-
height: '100%',
|
|
164
|
-
overflow: 'hidden',
|
|
165
|
-
bg: 'canvas.default',
|
|
166
|
-
color: 'fg.default',
|
|
167
|
-
}, children: [_jsx(OtelHeader, { baseUrl: otelBaseUrl, token: token, onNavigate: handleNavigate, showGenerateButtons: true, showAccountControls: false, trailing: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(TelescopeIcon, { size: 16 }), _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: otelBaseUrl })] }) }), _jsxs(Box, { sx: {
|
|
168
|
-
display: 'flex',
|
|
169
|
-
flex: 1,
|
|
170
|
-
minHeight: 0,
|
|
171
|
-
overflow: 'hidden',
|
|
172
|
-
}, children: [_jsxs(Box, { sx: {
|
|
173
|
-
display: 'flex',
|
|
174
|
-
flexDirection: 'column',
|
|
175
|
-
flex: 1,
|
|
176
|
-
minWidth: 0,
|
|
177
|
-
overflow: 'hidden',
|
|
178
|
-
}, children: [_jsx(Box, { sx: {
|
|
179
|
-
display: 'flex',
|
|
180
|
-
alignItems: 'center',
|
|
181
|
-
px: 2,
|
|
182
|
-
bg: 'canvas.default',
|
|
183
|
-
borderBottom: '1px solid',
|
|
184
|
-
borderColor: 'border.default',
|
|
185
|
-
flexShrink: 0,
|
|
186
|
-
}, children: ['dashboard', 'sql', 'system'].map(v => (_jsx(Box, { sx: TAB_SX(view === v), onClick: () => setView(v), children: _jsx(Text, { children: v === 'dashboard' ? 'Live' : v === 'sql' ? 'SQL' : 'System' }) }, v))) }), _jsx(Box, { sx: {
|
|
187
|
-
display: 'flex',
|
|
188
|
-
flex: 1,
|
|
189
|
-
minHeight: 0,
|
|
190
|
-
overflow: 'hidden',
|
|
191
|
-
}, children: view === 'dashboard' ? (_jsx(DashboardView, { baseUrl: otelBaseUrl, wsBaseUrl: otelBaseUrl, token: token, autoRefreshMs: 5000, defaultSignal: "traces", limit: 200, onSignalRef: handleSignalRef })) : view === 'sql' ? (_jsx(SqlView, { baseUrl: otelBaseUrl, token: token })) : (_jsx(SystemView, { baseUrl: otelBaseUrl, token: token })) })] }), _jsxs(Box, { sx: {
|
|
192
|
-
width: 380,
|
|
193
|
-
flexShrink: 0,
|
|
194
|
-
display: 'flex',
|
|
195
|
-
flexDirection: 'column',
|
|
196
|
-
borderLeft: '1px solid',
|
|
197
|
-
borderColor: 'border.default',
|
|
198
|
-
bg: 'canvas.default',
|
|
199
|
-
minHeight: 0,
|
|
200
|
-
}, children: [_jsx(AgentLaunchPanel, { baseUrl: agentBaseUrl, onConnected: handleAgentConnected, onDisconnected: handleAgentDisconnected, isConnected: !!connectedAgentId, connectedAgentName: connectedAgentId ?? undefined }), _jsx(Box, { sx: { flex: 1, minHeight: 0 }, children: connectedAgentId ? (_jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: connectedAgentId, editors: false, plugins: otelPlugins }, connectedAgentId)) : (_jsx(Box, { sx: {
|
|
201
|
-
display: 'flex',
|
|
202
|
-
alignItems: 'center',
|
|
203
|
-
justifyContent: 'center',
|
|
204
|
-
height: '100%',
|
|
205
|
-
px: 3,
|
|
206
|
-
color: 'fg.muted',
|
|
207
|
-
fontSize: 1,
|
|
208
|
-
textAlign: 'center',
|
|
209
|
-
}, children: "Connect an agent to start chatting about your traces, logs, and metrics." })) })] })] })] }));
|
|
140
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", height: "100%", overflow: "hidden", bg: "canvas.default", color: "fg.default", children: [_jsx(OtelHeader, { baseUrl: otelBaseUrl, token: token, onNavigate: handleNavigate, showGenerateButtons: true, showAccountControls: false, trailing: _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(TelescopeIcon, { size: 16 }), _jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: otelBaseUrl })] }) }), _jsxs(Box, { display: "flex", flex: 1, minHeight: 0, overflow: "hidden", children: [_jsxs(Box, { display: "flex", flexDirection: "column", flex: 1, minWidth: 0, overflow: "hidden", children: [_jsx(Box, { display: "flex", alignItems: "center", px: 2, bg: "canvas.default", borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: ['dashboard', 'sql', 'system'].map(v => (_jsx(Box, { sx: TAB_SX(view === v), onClick: () => setView(v), children: _jsx(Text, { children: v === 'dashboard' ? 'Live' : v === 'sql' ? 'SQL' : 'System' }) }, v))) }), _jsx(Box, { display: "flex", flex: 1, minHeight: 0, overflow: "hidden", children: view === 'dashboard' ? (_jsx(DashboardView, { baseUrl: otelBaseUrl, wsBaseUrl: otelBaseUrl, token: token, autoRefreshMs: 5000, defaultSignal: "traces", limit: 200, onSignalRef: handleSignalRef })) : view === 'sql' ? (_jsx(SqlView, { baseUrl: otelBaseUrl, token: token })) : (_jsx(SystemView, { baseUrl: otelBaseUrl, token: token })) })] }), _jsxs(Box, { width: 380, flexShrink: 0, display: "flex", flexDirection: "column", borderLeft: "1px solid", borderColor: "border.default", bg: "canvas.default", minHeight: 0, children: [_jsx(AgentLaunchPanel, { baseUrl: agentBaseUrl, onConnected: handleAgentConnected, onDisconnected: handleAgentDisconnected, isConnected: !!connectedAgentId, connectedAgentName: connectedAgentId ?? undefined }), _jsx(Box, { flex: 1, minHeight: 0, children: connectedAgentId ? (_jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: connectedAgentId, editors: false, plugins: otelPlugins }, connectedAgentId)) : (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", px: 3, color: "fg.muted", fontSize: 1, textAlign: "center", children: "Connect an agent to start chatting about your traces, logs, and metrics." })) })] })] })] }));
|
|
210
141
|
};
|
|
211
142
|
/**
|
|
212
143
|
* AgentOtelExample – themed root with auth gate.
|
|
@@ -207,18 +207,9 @@ const MarkdownTable = ({ source }) => {
|
|
|
207
207
|
return { headers, rows };
|
|
208
208
|
}, [source]);
|
|
209
209
|
if (headers.length === 0) {
|
|
210
|
-
return (_jsx(Box, { as: "pre",
|
|
211
|
-
fontFamily: 'mono',
|
|
212
|
-
fontSize: 0,
|
|
213
|
-
whiteSpace: 'pre-wrap',
|
|
214
|
-
m: 0,
|
|
215
|
-
}, children: source }));
|
|
210
|
+
return (_jsx(Box, { as: "pre", fontFamily: "mono", fontSize: 0, whiteSpace: "pre-wrap", m: 0, children: source }));
|
|
216
211
|
}
|
|
217
|
-
return (_jsx(Box, {
|
|
218
|
-
width: '100%',
|
|
219
|
-
tableLayout: 'auto',
|
|
220
|
-
borderCollapse: 'collapse',
|
|
221
|
-
fontSize: 0,
|
|
212
|
+
return (_jsx(Box, { overflowX: "auto", children: _jsxs(Box, { as: "table", width: "100%", tableLayout: "auto", borderCollapse: "collapse", fontSize: 0, sx: {
|
|
222
213
|
'th, td': {
|
|
223
214
|
border: '1px solid',
|
|
224
215
|
borderColor: 'border.muted',
|
|
@@ -262,15 +253,7 @@ const ChartView = ({ source }) => {
|
|
|
262
253
|
return (_jsx(Text, { sx: { color: 'danger.fg', fontSize: 0 }, children: "Could not parse chart spec as JSON." }));
|
|
263
254
|
}
|
|
264
255
|
if (!ReactECharts) {
|
|
265
|
-
return (_jsx(Box, { as: "pre",
|
|
266
|
-
fontFamily: 'mono',
|
|
267
|
-
fontSize: 0,
|
|
268
|
-
whiteSpace: 'pre-wrap',
|
|
269
|
-
bg: 'canvas.default',
|
|
270
|
-
p: 2,
|
|
271
|
-
borderRadius: 2,
|
|
272
|
-
m: 0,
|
|
273
|
-
}, children: source }));
|
|
256
|
+
return (_jsx(Box, { as: "pre", fontFamily: "mono", fontSize: 0, whiteSpace: "pre-wrap", bg: "canvas.default", p: 2, borderRadius: 2, m: 0, children: source }));
|
|
274
257
|
}
|
|
275
258
|
return (_jsx(ReactECharts, { option: option, style: { height: 280, width: '100%' } }));
|
|
276
259
|
};
|
|
@@ -329,32 +312,7 @@ const AgentOutputsInner = () => {
|
|
|
329
312
|
document.body.removeChild(a);
|
|
330
313
|
URL.revokeObjectURL(url);
|
|
331
314
|
};
|
|
332
|
-
return (_jsxs(Box, { sx: {
|
|
333
|
-
height: '100%',
|
|
334
|
-
display: 'flex',
|
|
335
|
-
flexDirection: 'column',
|
|
336
|
-
}, children: [_jsxs(Box, { sx: {
|
|
337
|
-
display: 'flex',
|
|
338
|
-
alignItems: 'center',
|
|
339
|
-
gap: 2,
|
|
340
|
-
px: 3,
|
|
341
|
-
py: 2,
|
|
342
|
-
borderBottom: '1px solid',
|
|
343
|
-
borderColor: 'border.default',
|
|
344
|
-
flexShrink: 0,
|
|
345
|
-
}, children: [_jsx(TableIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: "Agent Outputs \u2014 Local Runtime" })] }), _jsxs(Box, { sx: { flex: 1, minHeight: 0, display: 'flex' }, children: [_jsx(Box, { sx: { flex: 1, minWidth: 0 }, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentName, editors: false, showHeader: true, plugins: LOOP_PLUGINS_AGENTOUT }) }), _jsxs(Box, { sx: {
|
|
346
|
-
width: 420,
|
|
347
|
-
borderLeft: '1px solid',
|
|
348
|
-
borderColor: 'border.default',
|
|
349
|
-
display: 'flex',
|
|
350
|
-
flexDirection: 'column',
|
|
351
|
-
overflow: 'hidden',
|
|
352
|
-
}, children: [_jsx(Box, { sx: {
|
|
353
|
-
display: 'flex',
|
|
354
|
-
borderBottom: '1px solid',
|
|
355
|
-
borderColor: 'border.default',
|
|
356
|
-
flexShrink: 0,
|
|
357
|
-
}, children: [
|
|
315
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, px: 3, py: 2, borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: [_jsx(TableIcon, { size: 16 }), _jsx(Heading, { as: "h3", sx: { fontSize: 2, flex: 1 }, children: "Agent Outputs \u2014 Local Runtime" })] }), _jsxs(Box, { flex: 1, minHeight: 0, display: "flex", children: [_jsx(Box, { flex: 1, minWidth: 0, children: _jsx(LoopEmbed, { serverUrl: agentBaseUrl, target: "local", showAgentVariants: true, agentId: agentName, editors: false, showHeader: true, plugins: LOOP_PLUGINS_AGENTOUT }) }), _jsxs(Box, { width: 420, borderLeft: "1px solid", borderColor: "border.default", display: "flex", flexDirection: "column", overflow: "hidden", children: [_jsx(Box, { display: "flex", borderBottom: "1px solid", borderColor: "border.default", flexShrink: 0, children: [
|
|
358
316
|
{ key: 'table', icon: TableIcon, label: 'Table' },
|
|
359
317
|
{ key: 'json', icon: CodeIcon, label: 'JSON' },
|
|
360
318
|
{ key: 'chart', icon: GraphIcon, label: 'Chart' },
|
|
@@ -370,47 +328,14 @@ const AgentOutputsInner = () => {
|
|
|
370
328
|
borderColor: activeTab === t.key ? 'accent.fg' : 'transparent',
|
|
371
329
|
fontWeight: activeTab === t.key ? 'bold' : 'normal',
|
|
372
330
|
}, children: [t.label, n > 0 ? ` (${n})` : ''] }, t.key));
|
|
373
|
-
}) }), _jsxs(Box, {
|
|
374
|
-
p: 2,
|
|
375
|
-
mb: 2,
|
|
376
|
-
border: '1px solid',
|
|
377
|
-
borderColor: 'border.default',
|
|
378
|
-
borderRadius: 2,
|
|
379
|
-
}, children: [_jsxs(Box, { sx: {
|
|
380
|
-
display: 'flex',
|
|
381
|
-
justifyContent: 'space-between',
|
|
382
|
-
alignItems: 'center',
|
|
383
|
-
mb: 2,
|
|
384
|
-
gap: 2,
|
|
385
|
-
}, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 'bold' }, children: d.filename ?? `${d.tab} output` }), _jsx(Label, { size: "small", variant: "secondary", children: d.tab })] }), d.tab === 'table' && _jsx(MarkdownTable, { source: d.payload }), d.tab === 'json' && (_jsx(Box, { as: "pre", sx: {
|
|
386
|
-
bg: 'canvas.default',
|
|
387
|
-
p: 2,
|
|
388
|
-
borderRadius: 2,
|
|
389
|
-
fontFamily: 'mono',
|
|
390
|
-
fontSize: 0,
|
|
391
|
-
maxHeight: 320,
|
|
392
|
-
overflow: 'auto',
|
|
393
|
-
whiteSpace: 'pre-wrap',
|
|
394
|
-
m: 0,
|
|
395
|
-
}, children: (() => {
|
|
331
|
+
}) }), _jsxs(Box, { p: 3, flex: 1, overflow: "auto", children: [_jsxs(Heading, { as: "h4", sx: { fontSize: 1, mb: 2 }, children: [activeTab.charAt(0).toUpperCase() + activeTab.slice(1), " outputs"] }), filtered.length === 0 ? (_jsxs(Text, { sx: { color: 'fg.muted', fontSize: 0 }, children: ["No ", activeTab, " outputs yet. Use one of the openers in the chat to produce one \u2014 the side panel will switch to the matching tab automatically."] })) : (filtered.map((d, idx) => (_jsxs(Box, { p: 2, mb: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, children: [_jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, gap: 2, children: [_jsx(Text, { sx: { fontSize: 1, fontWeight: 'bold' }, children: d.filename ?? `${d.tab} output` }), _jsx(Label, { size: "small", variant: "secondary", children: d.tab })] }), d.tab === 'table' && _jsx(MarkdownTable, { source: d.payload }), d.tab === 'json' && (_jsx(Box, { as: "pre", bg: "canvas.default", p: 2, borderRadius: 2, fontFamily: "mono", fontSize: 0, maxHeight: 320, overflow: "auto", whiteSpace: "pre-wrap", m: 0, children: (() => {
|
|
396
332
|
try {
|
|
397
333
|
return JSON.stringify(JSON.parse(d.payload), null, 2);
|
|
398
334
|
}
|
|
399
335
|
catch {
|
|
400
336
|
return d.payload;
|
|
401
337
|
}
|
|
402
|
-
})() })), d.tab === 'chart' && _jsx(ChartView, { source: d.payload }), d.tab === 'files' && (_jsxs(_Fragment, { children: [_jsx(Box, { as: "pre",
|
|
403
|
-
bg: 'canvas.default',
|
|
404
|
-
p: 2,
|
|
405
|
-
borderRadius: 2,
|
|
406
|
-
fontFamily: 'mono',
|
|
407
|
-
fontSize: 0,
|
|
408
|
-
maxHeight: 200,
|
|
409
|
-
overflow: 'auto',
|
|
410
|
-
whiteSpace: 'pre-wrap',
|
|
411
|
-
m: 0,
|
|
412
|
-
mb: 2,
|
|
413
|
-
}, children: d.payload }), _jsxs(Button, { size: "small", leadingVisual: DownloadIcon, onClick: () => download(d), children: ["Download ", d.filename ?? 'file'] })] }))] }, d.messageId + ':' + idx))))] })] })] })] }));
|
|
338
|
+
})() })), d.tab === 'chart' && _jsx(ChartView, { source: d.payload }), d.tab === 'files' && (_jsxs(_Fragment, { children: [_jsx(Box, { as: "pre", bg: "canvas.default", p: 2, borderRadius: 2, fontFamily: "mono", fontSize: 0, maxHeight: 200, overflow: "auto", whiteSpace: "pre-wrap", m: 0, mb: 2, children: d.payload }), _jsxs(Button, { size: "small", leadingVisual: DownloadIcon, onClick: () => download(d), children: ["Download ", d.filename ?? 'file'] })] }))] }, d.messageId + ':' + idx))))] })] })] })] }));
|
|
414
339
|
};
|
|
415
340
|
// ─── Sync token to core IAM store ──────────────────────────────────────────
|
|
416
341
|
const syncTokenToIamStore = (token) => {
|
|
@@ -176,44 +176,9 @@ const AgentParametersExample = () => {
|
|
|
176
176
|
};
|
|
177
177
|
const effectiveError = error || runtimeError;
|
|
178
178
|
if (!agentId) {
|
|
179
|
-
return (_jsx(ThemedProvider, { children: _jsxs(Box, { sx: {
|
|
180
|
-
maxWidth: 760,
|
|
181
|
-
mx: 'auto',
|
|
182
|
-
mt: 6,
|
|
183
|
-
px: 3,
|
|
184
|
-
py: 2,
|
|
185
|
-
border: '1px solid',
|
|
186
|
-
borderColor: 'border.default',
|
|
187
|
-
borderRadius: 2,
|
|
188
|
-
display: 'flex',
|
|
189
|
-
flexDirection: 'column',
|
|
190
|
-
gap: 2,
|
|
191
|
-
bg: 'canvas.default',
|
|
192
|
-
}, children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: 'fg.muted' }, children: "CONFIGURE AGENT" }), _jsx(Heading, { as: "h2", sx: { fontSize: 2 }, children: "Launch Parameterized Agent" }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1, maxWidth: 620 }, children: "Load the runtime schema directly from example-parameters, fill the generated form, then launch with validated parameters." }), _jsxs(Box, { sx: {
|
|
193
|
-
display: 'flex',
|
|
194
|
-
alignItems: 'center',
|
|
195
|
-
gap: 2,
|
|
196
|
-
flexWrap: 'wrap',
|
|
197
|
-
}, children: [_jsxs(Label, { variant: "accent", children: ["Spec: ", AGENTSPEC_ID] }), _jsx(Label, { variant: "secondary", children: "Transport: vercel-ai" })] }), _jsxs(Box, { sx: { display: 'flex', gap: 2, flexWrap: 'wrap' }, children: [_jsx(Button, { variant: "primary", size: "small", type: "button", onClick: loadSchemaForm, disabled: isSchemaLoading, children: isSchemaLoading ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "small" }), " Loading Schema..."] })) : ('Show Parameter Form') }), schema && (_jsx(Button, { variant: "invisible", size: "small", type: "button", onClick: () => {
|
|
179
|
+
return (_jsx(ThemedProvider, { children: _jsxs(Box, { maxWidth: 760, mx: "auto", mt: 6, px: 3, py: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, display: "flex", flexDirection: "column", gap: 2, bg: "canvas.default", children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: 'fg.muted' }, children: "CONFIGURE AGENT" }), _jsx(Heading, { as: "h2", sx: { fontSize: 2 }, children: "Launch Parameterized Agent" }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1, maxWidth: 620 }, children: "Load the runtime schema directly from example-parameters, fill the generated form, then launch with validated parameters." }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, flexWrap: "wrap", children: [_jsxs(Label, { variant: "accent", children: ["Spec: ", AGENTSPEC_ID] }), _jsx(Label, { variant: "secondary", children: "Transport: vercel-ai" })] }), _jsxs(Box, { display: "flex", gap: 2, flexWrap: "wrap", children: [_jsx(Button, { variant: "primary", size: "small", type: "button", onClick: loadSchemaForm, disabled: isSchemaLoading, children: isSchemaLoading ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "small" }), " Loading Schema..."] })) : ('Show Parameter Form') }), schema && (_jsx(Button, { variant: "invisible", size: "small", type: "button", onClick: () => {
|
|
198
180
|
setShowSchemaForm(v => !v);
|
|
199
|
-
}, children: showSchemaForm ? 'Hide Form' : 'Show Form' }))] }), schema && (_jsxs(Box, { sx: {
|
|
200
|
-
display: 'flex',
|
|
201
|
-
gap: 2,
|
|
202
|
-
flexWrap: 'wrap',
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
py: 2,
|
|
205
|
-
px: 3,
|
|
206
|
-
border: '1px solid',
|
|
207
|
-
borderColor: 'border.default',
|
|
208
|
-
borderRadius: 2,
|
|
209
|
-
bg: 'canvas.default',
|
|
210
|
-
}, children: [_jsxs(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: ["Required fields:", ' ', Array.isArray(schema.required) ? schema.required.length : 0] }), _jsx(Label, { variant: hasRequired ? 'success' : 'attention', children: hasRequired ? 'Ready to launch' : 'Complete required fields' })] })), showSchemaForm && schema && (_jsx(Box, { sx: {
|
|
211
|
-
border: '1px solid',
|
|
212
|
-
borderColor: 'border.default',
|
|
213
|
-
borderRadius: 2,
|
|
214
|
-
p: 2,
|
|
215
|
-
bg: 'canvas.default',
|
|
216
|
-
}, children: _jsx(Form, { schema: schema, formData: formData, uiSchema: { 'ui:submitButtonOptions': { norender: true } }, validator: validator, onChange: ({ formData: nextData }) => {
|
|
181
|
+
}, children: showSchemaForm ? 'Hide Form' : 'Show Form' }))] }), schema && (_jsxs(Box, { display: "flex", gap: 2, flexWrap: "wrap", alignItems: "center", py: 2, px: 3, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", children: [_jsxs(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: ["Required fields:", ' ', Array.isArray(schema.required) ? schema.required.length : 0] }), _jsx(Label, { variant: hasRequired ? 'success' : 'attention', children: hasRequired ? 'Ready to launch' : 'Complete required fields' })] })), showSchemaForm && schema && (_jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, p: 2, bg: "canvas.default", children: _jsx(Form, { schema: schema, formData: formData, uiSchema: { 'ui:submitButtonOptions': { norender: true } }, validator: validator, onChange: ({ formData: nextData }) => {
|
|
217
182
|
setFormTouched(true);
|
|
218
183
|
setFormData(nextData ?? {});
|
|
219
184
|
}, onSubmit: (_, event) => {
|