@stigmer/react 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/activity/group-activity.d.ts +13 -0
- package/activity/group-activity.d.ts.map +1 -0
- package/activity/group-activity.js +54 -0
- package/activity/group-activity.js.map +1 -0
- package/activity/index.d.ts +4 -0
- package/activity/index.d.ts.map +1 -0
- package/activity/index.js +3 -0
- package/activity/index.js.map +1 -0
- package/activity/types.d.ts +34 -0
- package/activity/types.d.ts.map +1 -0
- package/activity/types.js +2 -0
- package/activity/types.js.map +1 -0
- package/activity/useRecentActivity.d.ts +35 -0
- package/activity/useRecentActivity.d.ts.map +1 -0
- package/activity/useRecentActivity.js +73 -0
- package/activity/useRecentActivity.js.map +1 -0
- package/agent/AgentPicker.d.ts.map +1 -1
- package/agent/AgentPicker.js +4 -2
- package/agent/AgentPicker.js.map +1 -1
- package/billing/BillingSection.d.ts.map +1 -1
- package/billing/BillingSection.js +1 -1
- package/billing/BillingSection.js.map +1 -1
- package/composer/ComposerToolbar.d.ts +5 -1
- package/composer/ComposerToolbar.d.ts.map +1 -1
- package/composer/ComposerToolbar.js +4 -3
- package/composer/ComposerToolbar.js.map +1 -1
- package/composer/ContextChip.d.ts +7 -2
- package/composer/ContextChip.d.ts.map +1 -1
- package/composer/ContextChip.js +2 -1
- package/composer/ContextChip.js.map +1 -1
- package/composer/InteractionModePicker.d.ts +40 -0
- package/composer/InteractionModePicker.d.ts.map +1 -0
- package/composer/InteractionModePicker.js +76 -0
- package/composer/InteractionModePicker.js.map +1 -0
- package/composer/SessionComposer.d.ts +64 -64
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +52 -11
- package/composer/SessionComposer.js.map +1 -1
- package/composer/__tests__/SessionComposer-memo.test.js +10 -5
- package/composer/__tests__/SessionComposer-memo.test.js.map +1 -1
- package/composer/index.d.ts +3 -1
- package/composer/index.d.ts.map +1 -1
- package/composer/index.js +1 -0
- package/composer/index.js.map +1 -1
- package/dashboard/DashboardFailedRuns.d.ts +19 -0
- package/dashboard/DashboardFailedRuns.d.ts.map +1 -0
- package/dashboard/DashboardFailedRuns.js +35 -0
- package/dashboard/DashboardFailedRuns.js.map +1 -0
- package/dashboard/DashboardKPICards.d.ts +19 -0
- package/dashboard/DashboardKPICards.d.ts.map +1 -0
- package/dashboard/DashboardKPICards.js +80 -0
- package/dashboard/DashboardKPICards.js.map +1 -0
- package/dashboard/OperationalDashboard.d.ts +37 -0
- package/dashboard/OperationalDashboard.d.ts.map +1 -0
- package/dashboard/OperationalDashboard.js +48 -0
- package/dashboard/OperationalDashboard.js.map +1 -0
- package/dashboard/index.d.ts +8 -0
- package/dashboard/index.d.ts.map +1 -0
- package/dashboard/index.js +9 -0
- package/dashboard/index.js.map +1 -0
- package/dashboard/types.d.ts +49 -0
- package/dashboard/types.d.ts.map +1 -0
- package/dashboard/types.js +2 -0
- package/dashboard/types.js.map +1 -0
- package/dashboard/useAgentExecutionSummary.d.ts +33 -0
- package/dashboard/useAgentExecutionSummary.d.ts.map +1 -0
- package/dashboard/useAgentExecutionSummary.js +32 -0
- package/dashboard/useAgentExecutionSummary.js.map +1 -0
- package/dashboard/useDashboardFailedRuns.d.ts +18 -0
- package/dashboard/useDashboardFailedRuns.d.ts.map +1 -0
- package/dashboard/useDashboardFailedRuns.js +86 -0
- package/dashboard/useDashboardFailedRuns.js.map +1 -0
- package/dashboard/useDashboardSummary.d.ts +32 -0
- package/dashboard/useDashboardSummary.d.ts.map +1 -0
- package/dashboard/useDashboardSummary.js +67 -0
- package/dashboard/useDashboardSummary.js.map +1 -0
- package/environment/usePersonalEnvironment.d.ts.map +1 -1
- package/environment/usePersonalEnvironment.js +1 -0
- package/environment/usePersonalEnvironment.js.map +1 -1
- package/execution/ContextGauge.d.ts +45 -0
- package/execution/ContextGauge.d.ts.map +1 -0
- package/execution/ContextGauge.js +82 -0
- package/execution/ContextGauge.js.map +1 -0
- package/execution/InteractionModeBadge.d.ts +24 -0
- package/execution/InteractionModeBadge.d.ts.map +1 -0
- package/execution/InteractionModeBadge.js +29 -0
- package/execution/InteractionModeBadge.js.map +1 -0
- package/execution/MessageThread.d.ts +33 -3
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +51 -9
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +23 -0
- package/execution/PlanCompletionCard.d.ts.map +1 -0
- package/execution/PlanCompletionCard.js +28 -0
- package/execution/PlanCompletionCard.js.map +1 -0
- package/execution/SummarizationBadge.d.ts +30 -0
- package/execution/SummarizationBadge.d.ts.map +1 -0
- package/execution/SummarizationBadge.js +61 -0
- package/execution/SummarizationBadge.js.map +1 -0
- package/execution/SummarizationCard.d.ts +27 -0
- package/execution/SummarizationCard.d.ts.map +1 -0
- package/execution/SummarizationCard.js +47 -0
- package/execution/SummarizationCard.js.map +1 -0
- package/execution/__tests__/PlanCompletionCard.test.d.ts +2 -0
- package/execution/__tests__/PlanCompletionCard.test.d.ts.map +1 -0
- package/execution/__tests__/PlanCompletionCard.test.js +53 -0
- package/execution/__tests__/PlanCompletionCard.test.js.map +1 -0
- package/execution/__tests__/buildThreadItems-plan-completion.test.d.ts +2 -0
- package/execution/__tests__/buildThreadItems-plan-completion.test.d.ts.map +1 -0
- package/execution/__tests__/buildThreadItems-plan-completion.test.js +137 -0
- package/execution/__tests__/buildThreadItems-plan-completion.test.js.map +1 -0
- package/execution/__tests__/useContextWindow.test.d.ts +2 -0
- package/execution/__tests__/useContextWindow.test.d.ts.map +1 -0
- package/execution/__tests__/useContextWindow.test.js +121 -0
- package/execution/__tests__/useContextWindow.test.js.map +1 -0
- package/execution/index.d.ts +12 -0
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +6 -0
- package/execution/index.js.map +1 -1
- package/execution/useContextWindow.d.ts +71 -0
- package/execution/useContextWindow.d.ts.map +1 -0
- package/execution/useContextWindow.js +91 -0
- package/execution/useContextWindow.js.map +1 -0
- package/execution/useCreateAgentExecution.d.ts +9 -0
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +15 -3
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/index.d.ts +11 -6
- package/index.d.ts.map +1 -1
- package/index.js +13 -3
- package/index.js.map +1 -1
- package/inline-edit/InlineEditKeyValue.d.ts +5 -1
- package/inline-edit/InlineEditKeyValue.d.ts.map +1 -1
- package/inline-edit/InlineEditKeyValue.js +3 -3
- package/inline-edit/InlineEditKeyValue.js.map +1 -1
- package/internal/VirtualizedThread.d.ts +2 -1
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +3 -2
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/store/index.d.ts +1 -0
- package/internal/store/index.d.ts.map +1 -1
- package/internal/store/index.js +1 -0
- package/internal/store/index.js.map +1 -1
- package/internal/store/workflow-execution-event-store.d.ts +92 -0
- package/internal/store/workflow-execution-event-store.d.ts.map +1 -0
- package/internal/store/workflow-execution-event-store.js +298 -0
- package/internal/store/workflow-execution-event-store.js.map +1 -0
- package/internal/useFetch.js +2 -2
- package/internal/useFetch.js.map +1 -1
- package/library/ScopeToggle.d.ts +13 -9
- package/library/ScopeToggle.d.ts.map +1 -1
- package/library/ScopeToggle.js +43 -22
- package/library/ScopeToggle.js.map +1 -1
- package/library/VisibilityToggle.js +14 -5
- package/library/VisibilityToggle.js.map +1 -1
- package/library/index.d.ts +1 -0
- package/library/index.d.ts.map +1 -1
- package/library/index.js +1 -0
- package/library/index.js.map +1 -1
- package/library/useExportResource.d.ts +3 -2
- package/library/useExportResource.d.ts.map +1 -1
- package/library/useExportResource.js +11 -6
- package/library/useExportResource.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +169 -58
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/McpServerPicker.d.ts.map +1 -1
- package/mcp-server/McpServerPicker.js +4 -2
- package/mcp-server/McpServerPicker.js.map +1 -1
- package/models/ModelRegistryContext.d.ts +2 -0
- package/models/ModelRegistryContext.d.ts.map +1 -1
- package/models/ModelRegistryContext.js +1 -0
- package/models/ModelRegistryContext.js.map +1 -1
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +2 -2
- package/models/ModelSelector.js.map +1 -1
- package/models/__tests__/useModelRegistry.test.js +4 -3
- package/models/__tests__/useModelRegistry.test.js.map +1 -1
- package/models/useModelRegistry.d.ts +2 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +3 -2
- package/models/useModelRegistry.js.map +1 -1
- package/package.json +16 -5
- package/provider.d.ts.map +1 -1
- package/provider.js +232 -22
- package/provider.js.map +1 -1
- package/resource-detail/ResourceDetailShell.d.ts +1 -1
- package/resource-detail/ResourceDetailShell.d.ts.map +1 -1
- package/resource-detail/ResourceDetailShell.js +6 -6
- package/resource-detail/ResourceDetailShell.js.map +1 -1
- package/resource-detail/types.d.ts +23 -0
- package/resource-detail/types.d.ts.map +1 -1
- package/resource-detail/useDeleteResource.d.ts +1 -1
- package/resource-detail/useDeleteResource.d.ts.map +1 -1
- package/resource-detail/useDeleteResource.js +5 -0
- package/resource-detail/useDeleteResource.js.map +1 -1
- package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -1
- package/resource-workbench/components/ResourceWorkbench.js +2 -1
- package/resource-workbench/components/ResourceWorkbench.js.map +1 -1
- package/session/__tests__/session-spec-converters.test.d.ts +2 -0
- package/session/__tests__/session-spec-converters.test.d.ts.map +1 -0
- package/session/__tests__/session-spec-converters.test.js +162 -0
- package/session/__tests__/session-spec-converters.test.js.map +1 -0
- package/session/__tests__/useNewSessionFlow.test.js +2 -2
- package/session/__tests__/useNewSessionFlow.test.js.map +1 -1
- package/session/__tests__/usePersistedModel.test.js +1 -1
- package/session/__tests__/usePersistedModel.test.js.map +1 -1
- package/session/group-sessions.d.ts +17 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +46 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +4 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +2 -1
- package/session/index.js.map +1 -1
- package/session/session-spec-converters.d.ts +24 -0
- package/session/session-spec-converters.d.ts.map +1 -0
- package/session/session-spec-converters.js +72 -0
- package/session/session-spec-converters.js.map +1 -0
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +1 -0
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/useSessionConversation.d.ts +7 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +2 -56
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts +5 -0
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +21 -6
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionSearch.d.ts +57 -0
- package/session/useSessionSearch.d.ts.map +1 -0
- package/session/useSessionSearch.js +94 -0
- package/session/useSessionSearch.js.map +1 -0
- package/session/useSessionUsage.d.ts.map +1 -1
- package/session/useSessionUsage.js +65 -4
- package/session/useSessionUsage.js.map +1 -1
- package/settings/UsageSection.d.ts.map +1 -1
- package/settings/UsageSection.js +1 -4
- package/settings/UsageSection.js.map +1 -1
- package/skill/SkillPicker.d.ts.map +1 -1
- package/skill/SkillPicker.js +4 -2
- package/skill/SkillPicker.js.map +1 -1
- package/src/activity/group-activity.ts +65 -0
- package/src/activity/index.ts +13 -0
- package/src/activity/types.ts +35 -0
- package/src/activity/useRecentActivity.ts +131 -0
- package/src/agent/AgentPicker.tsx +6 -1
- package/src/billing/BillingSection.tsx +3 -2
- package/src/composer/ComposerToolbar.tsx +19 -1
- package/src/composer/ContextChip.tsx +20 -11
- package/src/composer/InteractionModePicker.tsx +189 -0
- package/src/composer/SessionComposer.tsx +137 -11
- package/src/composer/__tests__/SessionComposer-memo.test.ts +11 -6
- package/src/composer/index.ts +7 -0
- package/src/dashboard/DashboardFailedRuns.tsx +109 -0
- package/src/dashboard/DashboardKPICards.tsx +128 -0
- package/src/dashboard/OperationalDashboard.tsx +96 -0
- package/src/dashboard/index.ts +37 -0
- package/src/dashboard/types.ts +50 -0
- package/src/dashboard/useAgentExecutionSummary.ts +71 -0
- package/src/dashboard/useDashboardFailedRuns.ts +122 -0
- package/src/dashboard/useDashboardSummary.ts +109 -0
- package/src/environment/usePersonalEnvironment.ts +1 -0
- package/src/execution/ContextGauge.tsx +243 -0
- package/src/execution/InteractionModeBadge.tsx +70 -0
- package/src/execution/MessageThread.tsx +88 -3
- package/src/execution/PlanCompletionCard.tsx +105 -0
- package/src/execution/SummarizationBadge.tsx +188 -0
- package/src/execution/SummarizationCard.tsx +126 -0
- package/src/execution/__tests__/PlanCompletionCard.test.tsx +67 -0
- package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +197 -0
- package/src/execution/__tests__/useContextWindow.test.ts +167 -0
- package/src/execution/index.ts +22 -0
- package/src/execution/useContextWindow.ts +148 -0
- package/src/execution/useCreateAgentExecution.ts +26 -3
- package/src/index.ts +227 -0
- package/src/inline-edit/InlineEditKeyValue.tsx +23 -0
- package/src/internal/VirtualizedThread.tsx +4 -1
- package/src/internal/store/index.ts +6 -0
- package/src/internal/store/workflow-execution-event-store.ts +391 -0
- package/src/internal/useFetch.ts +2 -2
- package/src/library/ScopeToggle.tsx +88 -20
- package/src/library/VisibilityToggle.tsx +54 -13
- package/src/library/index.ts +2 -0
- package/src/library/useExportResource.ts +12 -9
- package/src/mcp-server/McpServerDetailView.tsx +509 -203
- package/src/mcp-server/McpServerPicker.tsx +6 -1
- package/src/models/ModelRegistryContext.ts +3 -0
- package/src/models/ModelSelector.tsx +25 -2
- package/src/models/__tests__/useModelRegistry.test.tsx +5 -3
- package/src/models/useModelRegistry.ts +5 -2
- package/src/provider.tsx +264 -26
- package/src/resource-detail/ResourceDetailShell.tsx +21 -4
- package/src/resource-detail/types.ts +25 -0
- package/src/resource-detail/useDeleteResource.ts +6 -1
- package/src/resource-workbench/components/ResourceWorkbench.tsx +4 -0
- package/src/session/__tests__/session-spec-converters.test.ts +185 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +2 -2
- package/src/session/__tests__/usePersistedModel.test.tsx +1 -1
- package/src/session/group-sessions.ts +65 -0
- package/src/session/index.ts +8 -2
- package/src/session/session-spec-converters.ts +86 -0
- package/src/session/useNewSessionFlow.ts +1 -0
- package/src/session/useSessionConversation.ts +13 -64
- package/src/session/useSessionPageFlow.ts +29 -7
- package/src/session/useSessionSearch.ts +149 -0
- package/src/session/useSessionUsage.ts +72 -4
- package/src/settings/UsageSection.tsx +1 -9
- package/src/skill/SkillPicker.tsx +6 -1
- package/src/workflow/ApprovalFormBuilder.tsx +1017 -0
- package/src/workflow/BranchConditionBuilder.tsx +451 -0
- package/src/workflow/CanvasActionsContext.ts +12 -0
- package/src/workflow/CanvasContextMenu.tsx +364 -0
- package/src/workflow/CanvasTaskNode.tsx +372 -0
- package/src/workflow/CanvasTransitionEdge.tsx +122 -0
- package/src/workflow/CostByWorkflowChart.tsx +120 -0
- package/src/workflow/ExecutionSummaryWidget.tsx +194 -0
- package/src/workflow/ExecutionTrendChart.tsx +157 -0
- package/src/workflow/FailedRunsWidget.tsx +109 -0
- package/src/workflow/PendingApprovalsWidget.tsx +115 -0
- package/src/workflow/TaskConfigForm.tsx +618 -0
- package/src/workflow/TaskKindRegistryContext.ts +36 -0
- package/src/workflow/TaskPickerPopover.tsx +326 -0
- package/src/workflow/WorkflowArchitectDialog.tsx +505 -0
- package/src/workflow/WorkflowCanvasEditor.tsx +651 -0
- package/src/workflow/WorkflowCanvasInner.tsx +160 -0
- package/src/workflow/WorkflowDashboard.tsx +124 -0
- package/src/workflow/WorkflowDetailView.tsx +527 -0
- package/src/workflow/WorkflowEditorView.tsx +547 -0
- package/src/workflow/WorkflowExecutionApprovalCard.tsx +129 -0
- package/src/workflow/WorkflowExecutionArtifactPanel.tsx +112 -0
- package/src/workflow/WorkflowExecutionCostPanel.tsx +131 -0
- package/src/workflow/WorkflowExecutionHeader.tsx +194 -0
- package/src/workflow/WorkflowExecutionPhaseBadge.tsx +188 -0
- package/src/workflow/WorkflowExecutionTaskPanel.tsx +135 -0
- package/src/workflow/WorkflowExecutionTimeline.tsx +118 -0
- package/src/workflow/WorkflowExecutionTimelineEvent.tsx +488 -0
- package/src/workflow/WorkflowExecutionViewer.tsx +248 -0
- package/src/workflow/WorkflowInspectorPanel.tsx +568 -0
- package/src/workflow/WorkflowRefinePanel.tsx +411 -0
- package/src/workflow/WorkflowRepairCard.tsx +433 -0
- package/src/workflow/WorkflowRunDialog.tsx +220 -0
- package/src/workflow/WorkflowRunForm.tsx +245 -0
- package/src/workflow/WorkflowTaskList.tsx +177 -0
- package/src/workflow/WorkflowTaskPalette.tsx +248 -0
- package/src/workflow/WorkflowTopologyGraph.tsx +250 -0
- package/src/workflow/WorkflowYamlEditor.tsx +271 -0
- package/src/workflow/__tests__/starter-workflow-yaml.test.ts +57 -0
- package/src/workflow/canvas-constants.ts +87 -0
- package/src/workflow/canvas-icons.tsx +36 -0
- package/src/workflow/extract-workflow-yaml.ts +87 -0
- package/src/workflow/graph-commands.ts +675 -0
- package/src/workflow/index.ts +375 -0
- package/src/workflow/serialize-workflow-yaml.ts +546 -0
- package/src/workflow/starter-workflow-yaml.ts +29 -0
- package/src/workflow/types.ts +99 -0
- package/src/workflow/useCanvasKeyboardShortcuts.ts +134 -0
- package/src/workflow/useDiagnoseExecutionFlow.ts +378 -0
- package/src/workflow/useGraphHistory.ts +138 -0
- package/src/workflow/usePendingApprovals.ts +89 -0
- package/src/workflow/useRefineWorkflowFlow.ts +321 -0
- package/src/workflow/useResolveAgentExecutionSession.ts +57 -0
- package/src/workflow/useRunWorkflowFlow.ts +235 -0
- package/src/workflow/useTaskKindRegistry.ts +135 -0
- package/src/workflow/useWorkflow.ts +78 -0
- package/src/workflow/useWorkflowArchitectFlow.ts +303 -0
- package/src/workflow/useWorkflowCanvas.ts +882 -0
- package/src/workflow/useWorkflowCount.ts +66 -0
- package/src/workflow/useWorkflowDashboardSummary.ts +71 -0
- package/src/workflow/useWorkflowEditor.ts +106 -0
- package/src/workflow/useWorkflowExecution.ts +67 -0
- package/src/workflow/useWorkflowExecutionActions.ts +179 -0
- package/src/workflow/useWorkflowExecutionArtifacts.ts +57 -0
- package/src/workflow/useWorkflowExecutionEventLog.ts +111 -0
- package/src/workflow/useWorkflowExecutionEventStream.ts +244 -0
- package/src/workflow/useWorkflowExecutionList.ts +121 -0
- package/src/workflow/useWorkflowInstances.ts +62 -0
- package/src/workflow/useWorkflowList.ts +79 -0
- package/src/workflow/useWorkflowSave.ts +84 -0
- package/src/workflow/useWorkflowTopology.ts +229 -0
- package/src/workflow/useWorkflowValidation.ts +329 -0
- package/src/workflow/useWorkflowYaml.ts +49 -0
- package/src/workflow/workflow-graph-conversions.ts +796 -0
- package/src/workflow/workflow-graph-model.ts +83 -0
- package/src/workflow/workflow-yaml-diff.ts +132 -0
- package/styles.css +1 -1
- package/workflow/ApprovalFormBuilder.d.ts +24 -0
- package/workflow/ApprovalFormBuilder.d.ts.map +1 -0
- package/workflow/ApprovalFormBuilder.js +347 -0
- package/workflow/ApprovalFormBuilder.js.map +1 -0
- package/workflow/BranchConditionBuilder.d.ts +29 -0
- package/workflow/BranchConditionBuilder.d.ts.map +1 -0
- package/workflow/BranchConditionBuilder.js +170 -0
- package/workflow/BranchConditionBuilder.js.map +1 -0
- package/workflow/CanvasActionsContext.d.ts +8 -0
- package/workflow/CanvasActionsContext.d.ts.map +1 -0
- package/workflow/CanvasActionsContext.js +4 -0
- package/workflow/CanvasActionsContext.js.map +1 -0
- package/workflow/CanvasContextMenu.d.ts +59 -0
- package/workflow/CanvasContextMenu.d.ts.map +1 -0
- package/workflow/CanvasContextMenu.js +98 -0
- package/workflow/CanvasContextMenu.js.map +1 -0
- package/workflow/CanvasTaskNode.d.ts +21 -0
- package/workflow/CanvasTaskNode.d.ts.map +1 -0
- package/workflow/CanvasTaskNode.js +125 -0
- package/workflow/CanvasTaskNode.js.map +1 -0
- package/workflow/CanvasTransitionEdge.d.ts +24 -0
- package/workflow/CanvasTransitionEdge.d.ts.map +1 -0
- package/workflow/CanvasTransitionEdge.js +50 -0
- package/workflow/CanvasTransitionEdge.js.map +1 -0
- package/workflow/CostByWorkflowChart.d.ts +15 -0
- package/workflow/CostByWorkflowChart.d.ts.map +1 -0
- package/workflow/CostByWorkflowChart.js +45 -0
- package/workflow/CostByWorkflowChart.js.map +1 -0
- package/workflow/ExecutionSummaryWidget.d.ts +16 -0
- package/workflow/ExecutionSummaryWidget.d.ts.map +1 -0
- package/workflow/ExecutionSummaryWidget.js +93 -0
- package/workflow/ExecutionSummaryWidget.js.map +1 -0
- package/workflow/ExecutionTrendChart.d.ts +14 -0
- package/workflow/ExecutionTrendChart.d.ts.map +1 -0
- package/workflow/ExecutionTrendChart.js +67 -0
- package/workflow/ExecutionTrendChart.js.map +1 -0
- package/workflow/FailedRunsWidget.d.ts +19 -0
- package/workflow/FailedRunsWidget.d.ts.map +1 -0
- package/workflow/FailedRunsWidget.js +37 -0
- package/workflow/FailedRunsWidget.js.map +1 -0
- package/workflow/PendingApprovalsWidget.d.ts +19 -0
- package/workflow/PendingApprovalsWidget.d.ts.map +1 -0
- package/workflow/PendingApprovalsWidget.js +35 -0
- package/workflow/PendingApprovalsWidget.js.map +1 -0
- package/workflow/TaskConfigForm.d.ts +29 -0
- package/workflow/TaskConfigForm.d.ts.map +1 -0
- package/workflow/TaskConfigForm.js +230 -0
- package/workflow/TaskConfigForm.js.map +1 -0
- package/workflow/TaskKindRegistryContext.d.ts +24 -0
- package/workflow/TaskKindRegistryContext.d.ts.map +1 -0
- package/workflow/TaskKindRegistryContext.js +25 -0
- package/workflow/TaskKindRegistryContext.js.map +1 -0
- package/workflow/TaskPickerPopover.d.ts +33 -0
- package/workflow/TaskPickerPopover.d.ts.map +1 -0
- package/workflow/TaskPickerPopover.js +110 -0
- package/workflow/TaskPickerPopover.js.map +1 -0
- package/workflow/WorkflowArchitectDialog.d.ts +48 -0
- package/workflow/WorkflowArchitectDialog.d.ts.map +1 -0
- package/workflow/WorkflowArchitectDialog.js +129 -0
- package/workflow/WorkflowArchitectDialog.js.map +1 -0
- package/workflow/WorkflowCanvasEditor.d.ts +38 -0
- package/workflow/WorkflowCanvasEditor.d.ts.map +1 -0
- package/workflow/WorkflowCanvasEditor.js +287 -0
- package/workflow/WorkflowCanvasEditor.js.map +1 -0
- package/workflow/WorkflowCanvasInner.d.ts +32 -0
- package/workflow/WorkflowCanvasInner.d.ts.map +1 -0
- package/workflow/WorkflowCanvasInner.js +49 -0
- package/workflow/WorkflowCanvasInner.js.map +1 -0
- package/workflow/WorkflowDashboard.d.ts +35 -0
- package/workflow/WorkflowDashboard.d.ts.map +1 -0
- package/workflow/WorkflowDashboard.js +59 -0
- package/workflow/WorkflowDashboard.js.map +1 -0
- package/workflow/WorkflowDetailView.d.ts +63 -0
- package/workflow/WorkflowDetailView.d.ts.map +1 -0
- package/workflow/WorkflowDetailView.js +202 -0
- package/workflow/WorkflowDetailView.js.map +1 -0
- package/workflow/WorkflowEditorView.d.ts +43 -0
- package/workflow/WorkflowEditorView.d.ts.map +1 -0
- package/workflow/WorkflowEditorView.js +165 -0
- package/workflow/WorkflowEditorView.js.map +1 -0
- package/workflow/WorkflowExecutionApprovalCard.d.ts +27 -0
- package/workflow/WorkflowExecutionApprovalCard.d.ts.map +1 -0
- package/workflow/WorkflowExecutionApprovalCard.js +32 -0
- package/workflow/WorkflowExecutionApprovalCard.js.map +1 -0
- package/workflow/WorkflowExecutionArtifactPanel.d.ts +15 -0
- package/workflow/WorkflowExecutionArtifactPanel.d.ts.map +1 -0
- package/workflow/WorkflowExecutionArtifactPanel.js +53 -0
- package/workflow/WorkflowExecutionArtifactPanel.js.map +1 -0
- package/workflow/WorkflowExecutionCostPanel.d.ts +18 -0
- package/workflow/WorkflowExecutionCostPanel.d.ts.map +1 -0
- package/workflow/WorkflowExecutionCostPanel.js +44 -0
- package/workflow/WorkflowExecutionCostPanel.js.map +1 -0
- package/workflow/WorkflowExecutionHeader.d.ts +26 -0
- package/workflow/WorkflowExecutionHeader.d.ts.map +1 -0
- package/workflow/WorkflowExecutionHeader.js +68 -0
- package/workflow/WorkflowExecutionHeader.js.map +1 -0
- package/workflow/WorkflowExecutionPhaseBadge.d.ts +23 -0
- package/workflow/WorkflowExecutionPhaseBadge.d.ts.map +1 -0
- package/workflow/WorkflowExecutionPhaseBadge.js +99 -0
- package/workflow/WorkflowExecutionPhaseBadge.js.map +1 -0
- package/workflow/WorkflowExecutionTaskPanel.d.ts +24 -0
- package/workflow/WorkflowExecutionTaskPanel.d.ts.map +1 -0
- package/workflow/WorkflowExecutionTaskPanel.js +59 -0
- package/workflow/WorkflowExecutionTaskPanel.js.map +1 -0
- package/workflow/WorkflowExecutionTimeline.d.ts +27 -0
- package/workflow/WorkflowExecutionTimeline.d.ts.map +1 -0
- package/workflow/WorkflowExecutionTimeline.js +51 -0
- package/workflow/WorkflowExecutionTimeline.js.map +1 -0
- package/workflow/WorkflowExecutionTimelineEvent.d.ts +18 -0
- package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +1 -0
- package/workflow/WorkflowExecutionTimelineEvent.js +210 -0
- package/workflow/WorkflowExecutionTimelineEvent.js.map +1 -0
- package/workflow/WorkflowExecutionViewer.d.ts +45 -0
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -0
- package/workflow/WorkflowExecutionViewer.js +75 -0
- package/workflow/WorkflowExecutionViewer.js.map +1 -0
- package/workflow/WorkflowInspectorPanel.d.ts +46 -0
- package/workflow/WorkflowInspectorPanel.d.ts.map +1 -0
- package/workflow/WorkflowInspectorPanel.js +152 -0
- package/workflow/WorkflowInspectorPanel.js.map +1 -0
- package/workflow/WorkflowRefinePanel.d.ts +30 -0
- package/workflow/WorkflowRefinePanel.d.ts.map +1 -0
- package/workflow/WorkflowRefinePanel.js +107 -0
- package/workflow/WorkflowRefinePanel.js.map +1 -0
- package/workflow/WorkflowRepairCard.d.ts +35 -0
- package/workflow/WorkflowRepairCard.d.ts.map +1 -0
- package/workflow/WorkflowRepairCard.js +113 -0
- package/workflow/WorkflowRepairCard.js.map +1 -0
- package/workflow/WorkflowRunDialog.d.ts +51 -0
- package/workflow/WorkflowRunDialog.d.ts.map +1 -0
- package/workflow/WorkflowRunDialog.js +75 -0
- package/workflow/WorkflowRunDialog.js.map +1 -0
- package/workflow/WorkflowRunForm.d.ts +62 -0
- package/workflow/WorkflowRunForm.d.ts.map +1 -0
- package/workflow/WorkflowRunForm.js +64 -0
- package/workflow/WorkflowRunForm.js.map +1 -0
- package/workflow/WorkflowTaskList.d.ts +25 -0
- package/workflow/WorkflowTaskList.d.ts.map +1 -0
- package/workflow/WorkflowTaskList.js +89 -0
- package/workflow/WorkflowTaskList.js.map +1 -0
- package/workflow/WorkflowTaskPalette.d.ts +22 -0
- package/workflow/WorkflowTaskPalette.d.ts.map +1 -0
- package/workflow/WorkflowTaskPalette.js +83 -0
- package/workflow/WorkflowTaskPalette.js.map +1 -0
- package/workflow/WorkflowTopologyGraph.d.ts +22 -0
- package/workflow/WorkflowTopologyGraph.d.ts.map +1 -0
- package/workflow/WorkflowTopologyGraph.js +123 -0
- package/workflow/WorkflowTopologyGraph.js.map +1 -0
- package/workflow/WorkflowYamlEditor.d.ts +43 -0
- package/workflow/WorkflowYamlEditor.d.ts.map +1 -0
- package/workflow/WorkflowYamlEditor.js +215 -0
- package/workflow/WorkflowYamlEditor.js.map +1 -0
- package/workflow/__tests__/starter-workflow-yaml.test.d.ts +2 -0
- package/workflow/__tests__/starter-workflow-yaml.test.d.ts.map +1 -0
- package/workflow/__tests__/starter-workflow-yaml.test.js +44 -0
- package/workflow/__tests__/starter-workflow-yaml.test.js.map +1 -0
- package/workflow/canvas-constants.d.ts +56 -0
- package/workflow/canvas-constants.d.ts.map +1 -0
- package/workflow/canvas-constants.js +74 -0
- package/workflow/canvas-constants.js.map +1 -0
- package/workflow/canvas-icons.d.ts +13 -0
- package/workflow/canvas-icons.d.ts.map +1 -0
- package/workflow/canvas-icons.js +21 -0
- package/workflow/canvas-icons.js.map +1 -0
- package/workflow/extract-workflow-yaml.d.ts +22 -0
- package/workflow/extract-workflow-yaml.d.ts.map +1 -0
- package/workflow/extract-workflow-yaml.js +63 -0
- package/workflow/extract-workflow-yaml.js.map +1 -0
- package/workflow/graph-commands.d.ts +209 -0
- package/workflow/graph-commands.d.ts.map +1 -0
- package/workflow/graph-commands.js +516 -0
- package/workflow/graph-commands.js.map +1 -0
- package/workflow/index.d.ts +66 -0
- package/workflow/index.d.ts.map +1 -0
- package/workflow/index.js +88 -0
- package/workflow/index.js.map +1 -0
- package/workflow/serialize-workflow-yaml.d.ts +39 -0
- package/workflow/serialize-workflow-yaml.d.ts.map +1 -0
- package/workflow/serialize-workflow-yaml.js +413 -0
- package/workflow/serialize-workflow-yaml.js.map +1 -0
- package/workflow/starter-workflow-yaml.d.ts +12 -0
- package/workflow/starter-workflow-yaml.d.ts.map +1 -0
- package/workflow/starter-workflow-yaml.js +30 -0
- package/workflow/starter-workflow-yaml.js.map +1 -0
- package/workflow/types.d.ts +80 -0
- package/workflow/types.d.ts.map +1 -0
- package/workflow/types.js +2 -0
- package/workflow/types.js.map +1 -0
- package/workflow/useCanvasKeyboardShortcuts.d.ts +34 -0
- package/workflow/useCanvasKeyboardShortcuts.d.ts.map +1 -0
- package/workflow/useCanvasKeyboardShortcuts.js +108 -0
- package/workflow/useCanvasKeyboardShortcuts.js.map +1 -0
- package/workflow/useDiagnoseExecutionFlow.d.ts +87 -0
- package/workflow/useDiagnoseExecutionFlow.d.ts.map +1 -0
- package/workflow/useDiagnoseExecutionFlow.js +257 -0
- package/workflow/useDiagnoseExecutionFlow.js.map +1 -0
- package/workflow/useGraphHistory.d.ts +28 -0
- package/workflow/useGraphHistory.d.ts.map +1 -0
- package/workflow/useGraphHistory.js +106 -0
- package/workflow/useGraphHistory.js.map +1 -0
- package/workflow/usePendingApprovals.d.ts +35 -0
- package/workflow/usePendingApprovals.d.ts.map +1 -0
- package/workflow/usePendingApprovals.js +50 -0
- package/workflow/usePendingApprovals.js.map +1 -0
- package/workflow/useRefineWorkflowFlow.d.ts +75 -0
- package/workflow/useRefineWorkflowFlow.d.ts.map +1 -0
- package/workflow/useRefineWorkflowFlow.js +216 -0
- package/workflow/useRefineWorkflowFlow.js.map +1 -0
- package/workflow/useResolveAgentExecutionSession.d.ts +33 -0
- package/workflow/useResolveAgentExecutionSession.d.ts.map +1 -0
- package/workflow/useResolveAgentExecutionSession.js +37 -0
- package/workflow/useResolveAgentExecutionSession.js.map +1 -0
- package/workflow/useRunWorkflowFlow.d.ts +82 -0
- package/workflow/useRunWorkflowFlow.d.ts.map +1 -0
- package/workflow/useRunWorkflowFlow.js +145 -0
- package/workflow/useRunWorkflowFlow.js.map +1 -0
- package/workflow/useTaskKindRegistry.d.ts +96 -0
- package/workflow/useTaskKindRegistry.d.ts.map +1 -0
- package/workflow/useTaskKindRegistry.js +75 -0
- package/workflow/useTaskKindRegistry.js.map +1 -0
- package/workflow/useWorkflow.d.ts +47 -0
- package/workflow/useWorkflow.d.ts.map +1 -0
- package/workflow/useWorkflow.js +53 -0
- package/workflow/useWorkflow.js.map +1 -0
- package/workflow/useWorkflowArchitectFlow.d.ts +96 -0
- package/workflow/useWorkflowArchitectFlow.d.ts.map +1 -0
- package/workflow/useWorkflowArchitectFlow.js +179 -0
- package/workflow/useWorkflowArchitectFlow.js.map +1 -0
- package/workflow/useWorkflowCanvas.d.ts +66 -0
- package/workflow/useWorkflowCanvas.d.ts.map +1 -0
- package/workflow/useWorkflowCanvas.js +628 -0
- package/workflow/useWorkflowCanvas.js.map +1 -0
- package/workflow/useWorkflowCount.d.ts +47 -0
- package/workflow/useWorkflowCount.d.ts.map +1 -0
- package/workflow/useWorkflowCount.js +26 -0
- package/workflow/useWorkflowCount.js.map +1 -0
- package/workflow/useWorkflowDashboardSummary.d.ts +34 -0
- package/workflow/useWorkflowDashboardSummary.d.ts.map +1 -0
- package/workflow/useWorkflowDashboardSummary.js +33 -0
- package/workflow/useWorkflowDashboardSummary.js.map +1 -0
- package/workflow/useWorkflowEditor.d.ts +45 -0
- package/workflow/useWorkflowEditor.d.ts.map +1 -0
- package/workflow/useWorkflowEditor.js +52 -0
- package/workflow/useWorkflowEditor.js.map +1 -0
- package/workflow/useWorkflowExecution.d.ts +37 -0
- package/workflow/useWorkflowExecution.d.ts.map +1 -0
- package/workflow/useWorkflowExecution.js +43 -0
- package/workflow/useWorkflowExecution.js.map +1 -0
- package/workflow/useWorkflowExecutionActions.d.ts +41 -0
- package/workflow/useWorkflowExecutionActions.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionActions.js +86 -0
- package/workflow/useWorkflowExecutionActions.js.map +1 -0
- package/workflow/useWorkflowExecutionArtifacts.d.ts +26 -0
- package/workflow/useWorkflowExecutionArtifacts.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionArtifacts.js +29 -0
- package/workflow/useWorkflowExecutionArtifacts.js.map +1 -0
- package/workflow/useWorkflowExecutionEventLog.d.ts +47 -0
- package/workflow/useWorkflowExecutionEventLog.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionEventLog.js +59 -0
- package/workflow/useWorkflowExecutionEventLog.js.map +1 -0
- package/workflow/useWorkflowExecutionEventStream.d.ts +61 -0
- package/workflow/useWorkflowExecutionEventStream.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionEventStream.js +161 -0
- package/workflow/useWorkflowExecutionEventStream.js.map +1 -0
- package/workflow/useWorkflowExecutionList.d.ts +49 -0
- package/workflow/useWorkflowExecutionList.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionList.js +65 -0
- package/workflow/useWorkflowExecutionList.js.map +1 -0
- package/workflow/useWorkflowInstances.d.ts +30 -0
- package/workflow/useWorkflowInstances.d.ts.map +1 -0
- package/workflow/useWorkflowInstances.js +33 -0
- package/workflow/useWorkflowInstances.js.map +1 -0
- package/workflow/useWorkflowList.d.ts +57 -0
- package/workflow/useWorkflowList.d.ts.map +1 -0
- package/workflow/useWorkflowList.js +29 -0
- package/workflow/useWorkflowList.js.map +1 -0
- package/workflow/useWorkflowSave.d.ts +25 -0
- package/workflow/useWorkflowSave.d.ts.map +1 -0
- package/workflow/useWorkflowSave.js +61 -0
- package/workflow/useWorkflowSave.js.map +1 -0
- package/workflow/useWorkflowTopology.d.ts +40 -0
- package/workflow/useWorkflowTopology.d.ts.map +1 -0
- package/workflow/useWorkflowTopology.js +163 -0
- package/workflow/useWorkflowTopology.js.map +1 -0
- package/workflow/useWorkflowValidation.d.ts +27 -0
- package/workflow/useWorkflowValidation.d.ts.map +1 -0
- package/workflow/useWorkflowValidation.js +253 -0
- package/workflow/useWorkflowValidation.js.map +1 -0
- package/workflow/useWorkflowYaml.d.ts +26 -0
- package/workflow/useWorkflowYaml.d.ts.map +1 -0
- package/workflow/useWorkflowYaml.js +26 -0
- package/workflow/useWorkflowYaml.js.map +1 -0
- package/workflow/workflow-graph-conversions.d.ts +70 -0
- package/workflow/workflow-graph-conversions.d.ts.map +1 -0
- package/workflow/workflow-graph-conversions.js +634 -0
- package/workflow/workflow-graph-conversions.js.map +1 -0
- package/workflow/workflow-graph-model.d.ts +83 -0
- package/workflow/workflow-graph-model.d.ts.map +1 -0
- package/workflow/workflow-graph-model.js +5 -0
- package/workflow/workflow-graph-model.js.map +1 -0
- package/workflow/workflow-yaml-diff.d.ts +24 -0
- package/workflow/workflow-yaml-diff.d.ts.map +1 -0
- package/workflow/workflow-yaml-diff.js +96 -0
- package/workflow/workflow-yaml-diff.js.map +1 -0
|
@@ -3,6 +3,7 @@ import { useCallback, useMemo } from "react";
|
|
|
3
3
|
import { parse as parseYaml } from "yaml";
|
|
4
4
|
import { toast } from "../feedback/toast";
|
|
5
5
|
import { serializeAgentYaml, serializeMcpServerYaml } from "./serialize-resource-yaml";
|
|
6
|
+
import { serializeWorkflowYaml } from "../workflow/serialize-workflow-yaml";
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
7
8
|
// Hook
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
@@ -42,14 +43,14 @@ export function useExportResource({ kind, resource, }) {
|
|
|
42
43
|
return null;
|
|
43
44
|
if (kind === "Agent")
|
|
44
45
|
return serializeAgentYaml(resource);
|
|
46
|
+
if (kind === "Workflow")
|
|
47
|
+
return serializeWorkflowYaml(resource);
|
|
45
48
|
return serializeMcpServerYaml(resource);
|
|
46
49
|
}, [kind, resource]);
|
|
47
50
|
const json = useMemo(() => {
|
|
48
51
|
if (!resource)
|
|
49
52
|
return null;
|
|
50
|
-
|
|
51
|
-
return serializeResourceJson(resource, "Agent");
|
|
52
|
-
return serializeResourceJson(resource, "McpServer");
|
|
53
|
+
return serializeResourceJson(resource, kind);
|
|
53
54
|
}, [kind, resource]);
|
|
54
55
|
const slug = useMemo(() => {
|
|
55
56
|
if (!resource)
|
|
@@ -92,9 +93,13 @@ export function useExportResource({ kind, resource, }) {
|
|
|
92
93
|
* to the YAML structure (snake_case fields, no status).
|
|
93
94
|
*/
|
|
94
95
|
function serializeResourceJson(resource, kind) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
let yamlStr;
|
|
97
|
+
if (kind === "Agent")
|
|
98
|
+
yamlStr = serializeAgentYaml(resource);
|
|
99
|
+
else if (kind === "Workflow")
|
|
100
|
+
yamlStr = serializeWorkflowYaml(resource);
|
|
101
|
+
else
|
|
102
|
+
yamlStr = serializeMcpServerYaml(resource);
|
|
98
103
|
const doc = parseYaml(yamlStr);
|
|
99
104
|
return JSON.stringify(doc, null, 2);
|
|
100
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExportResource.js","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useExportResource.js","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerDetailView.d.ts","sourceRoot":"","sources":["../../src/mcp-server/McpServerDetailView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AASxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAkB/F,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"McpServerDetailView.d.ts","sourceRoot":"","sources":["../../src/mcp-server/McpServerDetailView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AASxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAkB/F,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,0BAA0B,CAAC;AAQjF,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;AAE/D,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACvE;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjE,yDAAyD;IACzD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,aAAa,CAAC;IAC9C;;;;;;OAMG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAC7C;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAC9B,GAAG,EAAE,MAAM,KACR,OAAO,cAAc,EAAE,WAAW,GAAG,SAAS,CAAC;IACpD;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACzD,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,IAAI,EACJ,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,oBAA8B,EAC9B,yBAAiC,EACjC,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,OAAO,EACP,QAAgB,EAChB,iBAAiB,EACjB,SAAS,GACV,EAAE,wBAAwB,2CAob1B"}
|
|
@@ -20,7 +20,7 @@ import { ErrorMessage } from "../error/ErrorMessage";
|
|
|
20
20
|
import { EnvVarForm } from "../environment/EnvVarForm";
|
|
21
21
|
import { VisibilityToggle } from "../library/VisibilityToggle";
|
|
22
22
|
import { Tabs } from "../tabs/Tabs";
|
|
23
|
-
import {
|
|
23
|
+
import { ResourceDetailShell } from "../resource-detail/ResourceDetailShell";
|
|
24
24
|
import { Section } from "../resource-detail/Section";
|
|
25
25
|
import { InlineEditText } from "../inline-edit/InlineEditText";
|
|
26
26
|
import { InlineEditTextarea } from "../inline-edit/InlineEditTextarea";
|
|
@@ -126,21 +126,16 @@ export function McpServerDetailView({ org, slug, onResourceLoad, onVisibilityCha
|
|
|
126
126
|
await credentials.saveCredentials(values);
|
|
127
127
|
credentials.refetch();
|
|
128
128
|
}
|
|
129
|
-
setShowCredentialForm(false);
|
|
130
129
|
if (mcpServer?.metadata?.id) {
|
|
131
130
|
const envKeys = Object.keys(mcpServer.spec?.env ?? {});
|
|
132
131
|
const connectOrg = activeOrg ?? org;
|
|
133
|
-
|
|
134
|
-
await connection.connect(mcpServer.metadata.id, connectOrg, undefined, envKeys);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
await connection.connect(mcpServer.metadata.id, connectOrg, values, envKeys);
|
|
138
|
-
}
|
|
132
|
+
await connection.connect(mcpServer.metadata.id, connectOrg, values, envKeys);
|
|
139
133
|
refetch();
|
|
140
134
|
}
|
|
135
|
+
setShowCredentialForm(false);
|
|
141
136
|
}
|
|
142
137
|
catch {
|
|
143
|
-
// error state is managed by the hooks
|
|
138
|
+
// error state is managed by the hooks — form stays open for retry
|
|
144
139
|
}
|
|
145
140
|
}, [credentials, mcpServer, connection, refetch]);
|
|
146
141
|
const handleDisconnect = useCallback(async () => {
|
|
@@ -221,10 +216,30 @@ export function McpServerDetailView({ org, slug, onResourceLoad, onVisibilityCha
|
|
|
221
216
|
return _jsx(ErrorMessage, { error: error, retry: refetch, className: className });
|
|
222
217
|
if (!mcpServer)
|
|
223
218
|
return _jsx(NotFoundState, { className: className });
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
const meta = mcpServer.metadata;
|
|
220
|
+
const lastDiscoveredAt = capabilities?.lastDiscoveredAt
|
|
221
|
+
? timestampDate(capabilities.lastDiscoveredAt)
|
|
222
|
+
: null;
|
|
223
|
+
const headerMeta = {
|
|
224
|
+
name: meta?.name || meta?.slug || "Untitled",
|
|
225
|
+
nameElement: editable && saveMcpField ? (_jsx(InlineEditText, { value: meta?.name || "", onSave: (v) => saveMcpField("name", v), isSaving: isUpdating, variant: "heading", placeholder: "Server name", validate: (v) => (v.trim() ? null : "Name is required") })) : undefined,
|
|
226
|
+
id: meta?.id || "",
|
|
227
|
+
org: meta?.org,
|
|
228
|
+
slug: meta?.slug,
|
|
229
|
+
qualifiedSlug: meta?.slug
|
|
230
|
+
? (meta.org ? `${meta.org}/${meta.slug}` : meta.slug)
|
|
231
|
+
: undefined,
|
|
232
|
+
icon: editable && saveMcpField ? (_jsx(InlineEditImage, { value: spec?.iconUrl ?? "", onSave: (v) => saveMcpField("iconUrl", v || undefined), isSaving: isUpdating, fallback: _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }), size: "md" })) : spec?.iconUrl ? undefined : _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }),
|
|
233
|
+
iconUrl: editable ? undefined : spec?.iconUrl || undefined,
|
|
234
|
+
createdAt: specAudit?.createdAt ? timestampDate(specAudit.createdAt) : null,
|
|
235
|
+
updatedAt: specAudit?.updatedAt ? timestampDate(specAudit.updatedAt) : null,
|
|
236
|
+
};
|
|
237
|
+
const isPublic = meta?.visibility === ApiResourceVisibility.visibility_public;
|
|
238
|
+
const visibilityControl = onVisibilityChange && meta ? (_jsx(VisibilityToggle, { visibility: meta.visibility, onVisibilityChange: onVisibilityChange, isPending: isVisibilityPending })) : isPublic ? (_jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Public" })) : undefined;
|
|
239
|
+
const headerMetaExtra = (_jsxs(_Fragment, { children: [status && _jsx(ValidationStateBadge, { state: status.validationState }), lastDiscoveredAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Discovered ", formatDate(lastDiscoveredAt)] })] }))] }));
|
|
240
|
+
const headerBanner = status?.validationState === ValidationState.invalid &&
|
|
241
|
+
status.validationMessage ? (_jsx(ValidationBanner, { message: status.validationMessage })) : undefined;
|
|
242
|
+
return (_jsxs(ResourceDetailShell, { header: headerMeta, visibilityControl: visibilityControl, headerMetaExtra: headerMetaExtra, headerBanner: headerBanner, primaryAction: primaryAction, actions: actions, className: className, children: [(editable || spec?.description) && (_jsx(Section, { title: "Description", children: editable && saveMcpField ? (_jsx("div", { className: "max-h-20 overflow-y-auto p-3", children: _jsx(InlineEditTextarea, { value: spec?.description || "", onSave: (v) => saveMcpField("description", v || undefined), isSaving: isUpdating, placeholder: "Add a description", minRows: 2 }) })) : (_jsx("div", { className: "p-3", children: _jsx("pre", { className: "whitespace-pre-wrap break-words text-sm text-foreground font-sans", children: spec?.description }) })) })), hasSource && _jsx(SourceSection, { spec: spec }), (editable || spec?.serverType.case) && (_jsx(ServerConfigSection, { serverType: spec?.serverType, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), (editable || (spec?.env && Object.keys(spec.env).length > 0)) && (_jsx(EnvSection, { data: spec?.env ?? {}, oauthTargetEnvVar: credentials.oauthTargetEnvVar, editable: editable, isSaving: isUpdating, saveMcpField: saveMcpField })), _jsxs(Section, { title: "Connection", children: [_jsx(ConnectBar, { isConnecting: connection.isConnecting || oauth.isInProgress, connectionError: combinedError, onConnect: handleConnectClick, onClearConnectionError: combinedClearError, hasDiscoveredTools: hasDiscoveredTools, credentialsLoading: credentials.isLoading, oauthPhase: oauth.phase, authMode: credentials.authMode, isOAuthConnected: credentials.isOAuthConnected, connectionHealth: credentials.connectionHealth, canDisconnect: credentials.canDisconnect, onDisconnect: handleDisconnect, isDisconnecting: disconnectOAuth.isDisconnecting, disconnectError: disconnectOAuth.error, onClearDisconnectError: disconnectOAuth.clearError, serverName: mcpServer?.metadata?.name ?? slug, accessTokenExpiresAt: credentials.accessTokenExpiresAt, tokenLifetimeHint: credentials.tokenLifetimeHint, isVendorApprovalPending: credentials.isVendorApprovalPending, isVendorApprovalBlocked: credentials.isVendorApprovalBlocked, vendorApprovalDocsUrl: credentials.vendorApprovalDocsUrl, canBringOwnApp: credentials.canBringOwnApp, isOrgOAuthApp: credentials.isOrgOAuthApp, onBringOwnApp: () => setShowByoaForm(true), onRemoveOrgApp: handleRemoveOrgApp, isRemovingOrgApp: orgOAuthApp.isDeleting, removeOrgAppError: orgOAuthApp.deleteError, onClearRemoveOrgAppError: orgOAuthApp.clearErrors, manualOverride: credentials.manualOverride, onManualOverride: () => {
|
|
228
243
|
credentials.setManualOverride(true);
|
|
229
244
|
setShowCredentialForm(true);
|
|
230
245
|
}, onBackToOAuth: () => {
|
|
@@ -294,7 +309,7 @@ function healthStatusText(health, accessTokenExpiresAt, tokenLifetimeHint) {
|
|
|
294
309
|
return "Not connected yet";
|
|
295
310
|
}
|
|
296
311
|
}
|
|
297
|
-
function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectionError, hasDiscoveredTools,
|
|
312
|
+
function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectionError, hasDiscoveredTools, credentialsLoading, oauthPhase, authMode, isOAuthConnected, connectionHealth, canDisconnect, onDisconnect, isDisconnecting, disconnectError, onClearDisconnectError, serverName, accessTokenExpiresAt, tokenLifetimeHint, isVendorApprovalPending, isVendorApprovalBlocked, vendorApprovalDocsUrl, canBringOwnApp, isOrgOAuthApp, onBringOwnApp, onRemoveOrgApp, isRemovingOrgApp, removeOrgAppError, onClearRemoveOrgAppError, manualOverride, onManualOverride, onBackToOAuth, onCancelOAuth, }) {
|
|
298
313
|
const [disconnectPhase, setDisconnectPhase] = useState("idle");
|
|
299
314
|
const [removeOrgAppPhase, setRemoveOrgAppPhase] = useState("idle");
|
|
300
315
|
const isOAuthBusy = oauthPhase === "initiating" ||
|
|
@@ -337,7 +352,7 @@ function ConnectBar({ isConnecting, connectionError, onConnect, onClearConnectio
|
|
|
337
352
|
if (manualOverride)
|
|
338
353
|
return "Entering token manually";
|
|
339
354
|
if (hasDiscoveredTools)
|
|
340
|
-
return
|
|
355
|
+
return "Connected";
|
|
341
356
|
return "Not connected yet";
|
|
342
357
|
})();
|
|
343
358
|
const pill = healthPillProps(connectionHealth, isVendorApprovalPending && !isOAuthConnected);
|
|
@@ -398,13 +413,6 @@ function oauthPhaseLabel(phase) {
|
|
|
398
413
|
return "Connecting...";
|
|
399
414
|
}
|
|
400
415
|
}
|
|
401
|
-
function formatConnectionSummary(toolCount, policyCount) {
|
|
402
|
-
const toolLabel = `${toolCount} tool${toolCount !== 1 ? "s" : ""}`;
|
|
403
|
-
if (policyCount === 0)
|
|
404
|
-
return toolLabel;
|
|
405
|
-
const policyLabel = `${policyCount} ${policyCount !== 1 ? "policies" : "policy"}`;
|
|
406
|
-
return `${toolLabel}, ${policyLabel}`;
|
|
407
|
-
}
|
|
408
416
|
function formatTokenExpiry(expiresAtSeconds) {
|
|
409
417
|
if (expiresAtSeconds === BigInt(0))
|
|
410
418
|
return null;
|
|
@@ -429,14 +437,6 @@ function formatTokenExpiry(expiresAtSeconds) {
|
|
|
429
437
|
function ValidationBanner({ message }) {
|
|
430
438
|
return (_jsxs("div", { role: "alert", className: "flex items-start gap-2.5 rounded-lg border border-destructive/30 bg-destructive-subtle px-4 py-3", children: [_jsx(WarningIcon, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-sm font-medium text-destructive", children: "Invalid Configuration" }), _jsx("p", { className: "mt-0.5 text-xs text-destructive-muted", children: message })] })] }));
|
|
431
439
|
}
|
|
432
|
-
function Header({ server, createdAt, updatedAt, lastDiscoveredAt, onVisibilityChange, isVisibilityPending, editable, isSaving, saveMcpField, }) {
|
|
433
|
-
const meta = server.metadata;
|
|
434
|
-
const spec = server.spec;
|
|
435
|
-
const status = server.status;
|
|
436
|
-
const displayName = meta?.name || meta?.slug || "Untitled";
|
|
437
|
-
const isPublic = meta?.visibility === ApiResourceVisibility.visibility_public;
|
|
438
|
-
return (_jsxs("div", { className: "flex items-start gap-3", children: [editable && saveMcpField ? (_jsx(InlineEditImage, { value: spec?.iconUrl ?? "", onSave: (v) => saveMcpField("iconUrl", v || undefined), isSaving: isSaving, fallback: _jsx(McpServerIcon, { className: "size-6 text-muted-foreground" }), size: "md" })) : spec?.iconUrl ? (_jsx("img", { src: spec.iconUrl, alt: "", className: "mt-0.5 size-8 shrink-0 rounded object-cover" })) : (_jsx(McpServerIcon, { className: "mt-1 size-6 shrink-0 text-muted-foreground" })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [editable && saveMcpField ? (_jsx(InlineEditText, { value: meta?.name || "", onSave: (v) => saveMcpField("name", v), isSaving: isSaving, variant: "heading", placeholder: "Server name", validate: (v) => (v.trim() ? null : "Name is required") })) : (_jsx("h2", { className: "truncate text-lg font-semibold text-foreground", children: displayName })), onVisibilityChange && meta ? (_jsx(VisibilityToggle, { visibility: meta.visibility, onVisibilityChange: onVisibilityChange, isPending: isVisibilityPending })) : (isPublic && (_jsx("span", { className: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Public" })))] }), meta?.slug && (_jsx("span", { className: "mt-0.5 block truncate font-mono text-xs text-muted-foreground", children: meta.org ? `${meta.org}/${meta.slug}` : meta.slug })), _jsxs("div", { className: "mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground", children: [meta?.org && _jsx("span", { children: meta.org }), status && (_jsx(ValidationStateBadge, { state: status.validationState })), lastDiscoveredAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Discovered ", formatDate(lastDiscoveredAt)] })] })), createdAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Created ", formatDate(createdAt)] })] })), updatedAt && (_jsxs(_Fragment, { children: [_jsx(Dot, {}), _jsxs("span", { children: ["Updated ", formatDate(updatedAt)] })] }))] })] })] }));
|
|
439
|
-
}
|
|
440
440
|
function ValidationStateBadge({ state, }) {
|
|
441
441
|
switch (state) {
|
|
442
442
|
case ValidationState.valid:
|
|
@@ -452,6 +452,19 @@ const TRANSPORT_OPTIONS = [
|
|
|
452
452
|
{ value: "stdio", label: "Stdio", description: "Launch a local process with stdin/stdout" },
|
|
453
453
|
];
|
|
454
454
|
function ServerConfigSection({ serverType, editable, isSaving, saveMcpField, }) {
|
|
455
|
+
const [headersEditing, setHeadersEditing] = useState(false);
|
|
456
|
+
const [queryParamsEditing, setQueryParamsEditing] = useState(false);
|
|
457
|
+
const currentHttpConfig = useMemo(() => {
|
|
458
|
+
if (serverType?.case !== "http")
|
|
459
|
+
return null;
|
|
460
|
+
const v = serverType.value;
|
|
461
|
+
return {
|
|
462
|
+
url: v.url,
|
|
463
|
+
headers: v.headers && Object.keys(v.headers).length > 0 ? { ...v.headers } : undefined,
|
|
464
|
+
queryParams: v.queryParams && Object.keys(v.queryParams).length > 0 ? { ...v.queryParams } : undefined,
|
|
465
|
+
timeoutSeconds: v.timeoutSeconds || undefined,
|
|
466
|
+
};
|
|
467
|
+
}, [serverType]);
|
|
455
468
|
const handleTransportChange = useCallback(async (newType) => {
|
|
456
469
|
if (!saveMcpField)
|
|
457
470
|
return false;
|
|
@@ -466,28 +479,86 @@ function ServerConfigSection({ serverType, editable, isSaving, saveMcpField, })
|
|
|
466
479
|
await saveMcpField("http", undefined);
|
|
467
480
|
return ok;
|
|
468
481
|
}, [saveMcpField]);
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
482
|
+
const headerRows = useMemo(() => {
|
|
483
|
+
if (!currentHttpConfig?.headers)
|
|
484
|
+
return [];
|
|
485
|
+
return Object.entries(currentHttpConfig.headers).map(([key, value]) => ({ key, value }));
|
|
486
|
+
}, [currentHttpConfig?.headers]);
|
|
487
|
+
const queryParamRows = useMemo(() => {
|
|
488
|
+
if (!currentHttpConfig?.queryParams)
|
|
489
|
+
return [];
|
|
490
|
+
return Object.entries(currentHttpConfig.queryParams).map(([key, value]) => ({ key, value }));
|
|
491
|
+
}, [currentHttpConfig?.queryParams]);
|
|
492
|
+
const handleHeadersSave = useCallback(async (rows) => {
|
|
493
|
+
if (!saveMcpField || !currentHttpConfig)
|
|
494
|
+
return false;
|
|
495
|
+
const headers = {};
|
|
496
|
+
for (const row of rows) {
|
|
497
|
+
if (row.key.trim())
|
|
498
|
+
headers[row.key.trim()] = row.value;
|
|
499
|
+
}
|
|
500
|
+
return saveMcpField("http", {
|
|
501
|
+
...currentHttpConfig,
|
|
502
|
+
headers: Object.keys(headers).length > 0 ? headers : undefined,
|
|
503
|
+
});
|
|
504
|
+
}, [saveMcpField, currentHttpConfig]);
|
|
505
|
+
const handleQueryParamsSave = useCallback(async (rows) => {
|
|
506
|
+
if (!saveMcpField || !currentHttpConfig)
|
|
507
|
+
return false;
|
|
508
|
+
const queryParams = {};
|
|
509
|
+
for (const row of rows) {
|
|
510
|
+
if (row.key.trim())
|
|
511
|
+
queryParams[row.key.trim()] = row.value;
|
|
512
|
+
}
|
|
513
|
+
return saveMcpField("http", {
|
|
514
|
+
...currentHttpConfig,
|
|
515
|
+
queryParams: Object.keys(queryParams).length > 0 ? queryParams : undefined,
|
|
516
|
+
});
|
|
517
|
+
}, [saveMcpField, currentHttpConfig]);
|
|
518
|
+
return (_jsxs(Section, { title: "Server Configuration", children: [_jsxs("div", { className: "flex flex-col gap-2 p-3", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Type" }), editable && saveMcpField ? (_jsx(InlineEditSelect, { value: serverType?.case ?? "http", options: TRANSPORT_OPTIONS, onSave: handleTransportChange, isSaving: isSaving })) : (_jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-xs font-medium text-foreground", children: serverType?.case ?? "none" }))] }), serverType?.case === "stdio" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Command" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: `${serverType.value.command}${serverType.value.args.length > 0 ? ` ${serverType.value.args.join(" ")}` : ""}`, onSave: async (v) => {
|
|
519
|
+
const parts = v.trim().split(/\s+/);
|
|
520
|
+
return saveMcpField("stdio", {
|
|
521
|
+
command: parts[0] || "",
|
|
522
|
+
args: parts.slice(1),
|
|
523
|
+
});
|
|
524
|
+
}, isSaving: isSaving, placeholder: "e.g. npx -y @modelcontextprotocol/server" })) : (_jsxs("code", { className: "font-mono text-sm text-foreground", children: [serverType.value.command, serverType.value.args.length > 0 &&
|
|
525
|
+
` ${serverType.value.args.join(" ")}`] }))] }), (editable || serverType.value.workingDir) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Working Dir" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.workingDir ?? "", onSave: async (v) => saveMcpField("stdio", {
|
|
526
|
+
command: serverType.value.command,
|
|
527
|
+
args: [...serverType.value.args],
|
|
528
|
+
workingDir: v || undefined,
|
|
529
|
+
}), isSaving: isSaving, placeholder: "/path/to/working/dir" })) : (_jsx("code", { className: "font-mono text-xs text-foreground", children: serverType.value.workingDir }))] }))] })), serverType?.case === "http" && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "URL" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.url, onSave: async (v) => saveMcpField("http", { ...currentHttpConfig, url: v }), isSaving: isSaving, placeholder: "https://example.com/mcp" })) : (_jsx("code", { className: "break-all font-mono text-sm text-foreground", children: serverType.value.url }))] }), (editable || serverType.value.timeoutSeconds > 0) && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: "Timeout" }), editable && saveMcpField ? (_jsx(InlineEditText, { value: serverType.value.timeoutSeconds > 0 ? String(serverType.value.timeoutSeconds) : "", onSave: async (v) => saveMcpField("http", {
|
|
530
|
+
...currentHttpConfig,
|
|
531
|
+
timeoutSeconds: v ? Number(v) : undefined,
|
|
532
|
+
}), isSaving: isSaving, placeholder: "30", validate: (v) => {
|
|
533
|
+
if (v && (isNaN(Number(v)) || Number(v) < 0))
|
|
534
|
+
return "Must be a positive number";
|
|
535
|
+
return null;
|
|
536
|
+
} })) : (_jsxs("span", { className: "text-xs text-foreground", children: [serverType.value.timeoutSeconds, "s"] }))] }))] }))] }), serverType?.case === "http" && (editable || headerRows.length > 0) && (_jsx(HttpKeyValueSubsection, { title: "Headers", count: headerRows.length, rows: headerRows, editable: editable, isSaving: isSaving, editing: headersEditing, onEditingChange: setHeadersEditing, onSave: handleHeadersSave, keyLabel: "Header name" })), serverType?.case === "http" && (editable || queryParamRows.length > 0) && (_jsx(HttpKeyValueSubsection, { title: "Query Parameters", count: queryParamRows.length, rows: queryParamRows, editable: editable, isSaving: isSaving, editing: queryParamsEditing, onEditingChange: setQueryParamsEditing, onSave: handleQueryParamsSave, keyLabel: "Parameter name" }))] }));
|
|
537
|
+
}
|
|
538
|
+
/** Renders a key-value subsection (headers or query params) within ServerConfigSection. */
|
|
539
|
+
function HttpKeyValueSubsection({ title, count, rows, editable, isSaving, editing, onEditingChange, onSave, keyLabel, }) {
|
|
540
|
+
return (_jsxs("div", { className: "border-t border-border", children: [_jsxs("div", { className: "flex items-center justify-between px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-xs font-medium text-muted-foreground", children: title }), count > 0 && (_jsx("span", { className: "inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-muted px-1 py-px text-[10px] font-medium leading-none text-muted-foreground", children: count }))] }), editable && (_jsx("button", { type: "button", onClick: () => onEditingChange(!editing), className: "text-[11px] text-muted-foreground underline decoration-muted-foreground/40 underline-offset-2 hover:text-foreground hover:decoration-foreground", children: editing ? "Done" : "Edit" }))] }), editable && editing ? (_jsx(InlineEditKeyValue, { value: [...rows], onSave: onSave, isSaving: isSaving, editing: editing, onEditingChange: onEditingChange, keyLabel: keyLabel, showValue: true, valueLabel: "Value" })) : (_jsx("div", { className: "flex flex-col divide-y divide-border", children: rows.map((row) => (_jsxs("div", { className: "flex items-start gap-2 px-3 py-1.5", children: [_jsx("code", { className: "shrink-0 font-mono text-xs font-medium text-foreground", children: row.key }), _jsx("span", { className: "min-w-0 break-all font-mono text-xs text-muted-foreground", children: renderHeaderValue(row.value) })] }, row.key))) }))] }));
|
|
541
|
+
}
|
|
542
|
+
const ENV_VAR_PLACEHOLDER = /\$\{([^}]+)\}/g;
|
|
543
|
+
/** Renders a header value, highlighting ${VAR} placeholders with a variable badge. */
|
|
544
|
+
function renderHeaderValue(value) {
|
|
545
|
+
if (!ENV_VAR_PLACEHOLDER.test(value))
|
|
546
|
+
return value;
|
|
547
|
+
ENV_VAR_PLACEHOLDER.lastIndex = 0;
|
|
548
|
+
const parts = [];
|
|
549
|
+
let lastIndex = 0;
|
|
550
|
+
let match;
|
|
551
|
+
while ((match = ENV_VAR_PLACEHOLDER.exec(value)) !== null) {
|
|
552
|
+
if (match.index > lastIndex) {
|
|
553
|
+
parts.push(value.slice(lastIndex, match.index));
|
|
554
|
+
}
|
|
555
|
+
parts.push(_jsx("span", { className: "inline-flex items-center gap-0.5 rounded bg-primary-subtle px-1 py-px text-[10px] font-medium text-primary", title: `Resolved from environment variable: ${match[1]}`, children: match[0] }, match.index));
|
|
556
|
+
lastIndex = match.index + match[0].length;
|
|
557
|
+
}
|
|
558
|
+
if (lastIndex < value.length) {
|
|
559
|
+
parts.push(value.slice(lastIndex));
|
|
560
|
+
}
|
|
561
|
+
return _jsx(_Fragment, { children: parts });
|
|
491
562
|
}
|
|
492
563
|
function SourceSection({ spec, }) {
|
|
493
564
|
return (_jsx(Section, { title: "Source", children: _jsxs("div", { className: "flex flex-col gap-2 p-3", children: [spec.repositoryUrl && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "shrink-0 text-xs font-medium text-muted-foreground", children: "Repository" }), _jsxs("a", { href: spec.repositoryUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 break-all font-mono text-xs text-foreground underline decoration-muted-foreground/40 underline-offset-2 hover:decoration-foreground", children: [spec.repositoryUrl, _jsx(ExternalLinkIcon, { className: "size-3 shrink-0" })] })] })), spec.githubStars > 0 && (_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "shrink-0 text-xs font-medium text-muted-foreground", children: "Stars" }), _jsx("span", { className: "text-xs text-foreground", children: spec.githubStars.toLocaleString() })] }))] }) }));
|
|
@@ -544,24 +615,55 @@ function TagsSection({ tags, editable, isSaving, saveMcpField, }) {
|
|
|
544
615
|
// Capability tab contents (read-only)
|
|
545
616
|
// ---------------------------------------------------------------------------
|
|
546
617
|
function ToolsTabContent({ tools, }) {
|
|
618
|
+
const [search, setSearch] = useState("");
|
|
619
|
+
const [expandedTool, setExpandedTool] = useState(null);
|
|
620
|
+
const filtered = useMemo(() => {
|
|
621
|
+
if (!search.trim())
|
|
622
|
+
return tools;
|
|
623
|
+
const q = search.toLowerCase();
|
|
624
|
+
return tools.filter((t) => t.name.toLowerCase().includes(q) ||
|
|
625
|
+
t.description?.toLowerCase().includes(q));
|
|
626
|
+
}, [tools, search]);
|
|
547
627
|
if (tools.length === 0) {
|
|
548
628
|
return (_jsxs("div", { className: "px-3 py-8 text-center", children: [_jsx(ConnectIcon, { className: "mx-auto mb-2 size-6 text-muted-foreground-faint" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Connect to this MCP server to discover its available tools." })] }));
|
|
549
629
|
}
|
|
550
|
-
|
|
630
|
+
const isFiltered = search.trim().length > 0;
|
|
631
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 pb-2", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: "Search tools\u2026", "aria-label": "Search tools", className: "w-full rounded-md border border-border bg-background py-1.5 pl-7 pr-7 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring" }), isFiltered && (_jsx("button", { type: "button", onClick: () => setSearch(""), "aria-label": "Clear search", className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground", children: _jsx(CloseIcon, { className: "size-3" }) }))] }), _jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: isFiltered ? `${filtered.length} of ${tools.length}` : tools.length })] }), filtered.length === 0 ? (_jsx("div", { className: "px-3 py-6 text-center", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["No tools matching \u201C", search, "\u201D"] }) })) : (_jsx("div", { className: "max-h-96 overflow-y-auto", children: _jsx("div", { className: "flex flex-col divide-y divide-border", children: filtered.map((tool) => {
|
|
632
|
+
const isExpanded = expandedTool === tool.name;
|
|
633
|
+
const hasSchema = tool.inputSchema != null &&
|
|
634
|
+
Object.keys(tool.inputSchema).length > 0;
|
|
635
|
+
return (_jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => setExpandedTool(isExpanded ? null : tool.name), className: "flex w-full items-start gap-2 px-3 py-2.5 text-left transition-colors hover:bg-muted-faint", "aria-expanded": isExpanded, children: [_jsx(ChevronIcon, { className: cn("mt-0.5 size-3 shrink-0 text-muted-foreground transition-transform", isExpanded && "rotate-90") }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: tool.name }), tool.description && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: tool.description }))] }), hasSchema && (_jsx("span", { className: "mt-0.5 shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: "schema" }))] }), isExpanded && hasSchema && (_jsx("div", { className: "border-t border-border bg-muted-faint px-3 py-2", children: _jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded border border-border bg-background p-2 font-mono text-[11px] text-foreground", children: JSON.stringify(tool.inputSchema, null, 2) }) }))] }, tool.name));
|
|
636
|
+
}) }) }))] }));
|
|
551
637
|
}
|
|
552
638
|
function PoliciesTabContent({ pinnedPolicies, classifiedPolicies, hasDiscoveredTools, }) {
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
const hasAnyPolicies =
|
|
639
|
+
const [search, setSearch] = useState("");
|
|
640
|
+
const totalCount = pinnedPolicies.length + classifiedPolicies.length;
|
|
641
|
+
const hasAnyPolicies = totalCount > 0;
|
|
642
|
+
const filteredPinned = useMemo(() => {
|
|
643
|
+
if (!search.trim())
|
|
644
|
+
return pinnedPolicies;
|
|
645
|
+
const q = search.toLowerCase();
|
|
646
|
+
return pinnedPolicies.filter((p) => p.toolName.toLowerCase().includes(q) ||
|
|
647
|
+
p.message?.toLowerCase().includes(q));
|
|
648
|
+
}, [pinnedPolicies, search]);
|
|
649
|
+
const filteredClassified = useMemo(() => {
|
|
650
|
+
if (!search.trim())
|
|
651
|
+
return classifiedPolicies;
|
|
652
|
+
const q = search.toLowerCase();
|
|
653
|
+
return classifiedPolicies.filter((p) => p.toolName.toLowerCase().includes(q) ||
|
|
654
|
+
p.message?.toLowerCase().includes(q));
|
|
655
|
+
}, [classifiedPolicies, search]);
|
|
656
|
+
const filteredTotal = filteredPinned.length + filteredClassified.length;
|
|
657
|
+
const isFiltered = search.trim().length > 0;
|
|
556
658
|
if (!hasAnyPolicies) {
|
|
557
659
|
return (_jsxs("div", { className: "px-3 py-8 text-center", children: [_jsx(ShieldIcon, { className: "mx-auto mb-2 size-6 text-muted-foreground-faint" }), _jsx("p", { className: "text-xs text-muted-foreground", children: hasDiscoveredTools
|
|
558
660
|
? "No approval policies yet. Reconnect to reclassify tools."
|
|
559
661
|
: "Connect to discover tools and auto-classify approval policies." })] }));
|
|
560
662
|
}
|
|
561
|
-
return (_jsxs("div", { className: "flex flex-col", children: [
|
|
663
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 pb-2", children: [_jsxs("div", { className: "relative flex-1", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: "Search policies\u2026", "aria-label": "Search policies", className: "w-full rounded-md border border-border bg-background py-1.5 pl-7 pr-7 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring" }), isFiltered && (_jsx("button", { type: "button", onClick: () => setSearch(""), "aria-label": "Clear search", className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground", children: _jsx(CloseIcon, { className: "size-3" }) }))] }), _jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: isFiltered ? `${filteredTotal} of ${totalCount}` : totalCount })] }), filteredTotal === 0 ? (_jsx("div", { className: "px-3 py-6 text-center", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["No policies matching \u201C", search, "\u201D"] }) })) : (_jsxs("div", { className: "max-h-96 overflow-y-auto", children: [filteredPinned.length > 0 && (_jsx(PolicyGroup, { icon: _jsx(PinIcon, { className: "size-3.5" }), label: "Pinned", policies: filteredPinned })), filteredClassified.length > 0 && (_jsx(PolicyGroup, { icon: _jsx(SparklesIcon, { className: "size-3.5" }), label: "Auto-classified", policies: filteredClassified }))] }))] }));
|
|
562
664
|
}
|
|
563
665
|
function PolicyGroup({ icon, label, policies, }) {
|
|
564
|
-
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1.5 border-b border-border bg-muted-faint px-3 py-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: icon }), _jsx("span", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }), _jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", policies.length, ")"] })] }), _jsx("div", { className: "flex flex-col divide-y divide-border", children: policies.map((policy) => (_jsxs("div", { className: "px-3 py-2.5", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: policy.toolName }),
|
|
666
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1.5 border-b border-border bg-muted-faint px-3 py-1.5", children: [_jsx("span", { className: "text-muted-foreground", children: icon }), _jsx("span", { className: "text-[10px] font-medium uppercase tracking-wider text-muted-foreground", children: label }), _jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", policies.length, ")"] })] }), _jsx("div", { className: "flex flex-col divide-y divide-border", children: policies.map((policy) => (_jsxs("div", { className: "px-3 py-2.5", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("code", { className: "font-mono text-sm font-medium text-foreground", children: policy.toolName }), _jsxs("span", { className: "inline-flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400", children: [_jsx(ShieldIcon, { className: "size-2.5" }), "requires approval"] })] }), policy.message && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: policy.message }))] }, policy.toolName))) })] }));
|
|
565
667
|
}
|
|
566
668
|
// ---------------------------------------------------------------------------
|
|
567
669
|
// Shared layout primitives
|
|
@@ -621,6 +723,15 @@ function OAuthIcon({ className }) {
|
|
|
621
723
|
function ExternalLinkIcon({ className }) {
|
|
622
724
|
return (_jsxs("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("path", { d: "M12 8.667v4A1.333 1.333 0 0 1 10.667 14H3.333A1.333 1.333 0 0 1 2 12.667V5.333A1.333 1.333 0 0 1 3.333 4h4" }), _jsx("path", { d: "M10 2h4v4" }), _jsx("path", { d: "M6.667 9.333 14 2" })] }));
|
|
623
725
|
}
|
|
726
|
+
function SearchIcon({ className }) {
|
|
727
|
+
return (_jsxs("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("circle", { cx: "7", cy: "7", r: "4.5" }), _jsx("path", { d: "m10.5 10.5 3 3" })] }));
|
|
728
|
+
}
|
|
729
|
+
function CloseIcon({ className }) {
|
|
730
|
+
return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }));
|
|
731
|
+
}
|
|
732
|
+
function ChevronIcon({ className }) {
|
|
733
|
+
return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m6 4 4 4-4 4" }) }));
|
|
734
|
+
}
|
|
624
735
|
function Spinner() {
|
|
625
736
|
return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
|
|
626
737
|
}
|