@xenosystem/agent-interface-ui 0.1.3
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/LICENSE +67 -0
- package/dist/adapters/agentHostPlatformBridge.d.ts +24 -0
- package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -0
- package/dist/adapters/agentHostPlatformBridge.js +1244 -0
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -0
- package/dist/adapters/hubAgentPlatformBridge.d.ts +17 -0
- package/dist/adapters/hubAgentPlatformBridge.d.ts.map +1 -0
- package/dist/adapters/hubAgentPlatformBridge.js +109 -0
- package/dist/adapters/hubAgentPlatformBridge.js.map +1 -0
- package/dist/adapters/xenoAgentCompatibilityBridge.d.ts +14 -0
- package/dist/adapters/xenoAgentCompatibilityBridge.d.ts.map +1 -0
- package/dist/adapters/xenoAgentCompatibilityBridge.js +237 -0
- package/dist/adapters/xenoAgentCompatibilityBridge.js.map +1 -0
- package/dist/adapters/xenoAgentHostCatalog.d.ts +40 -0
- package/dist/adapters/xenoAgentHostCatalog.d.ts.map +1 -0
- package/dist/adapters/xenoAgentHostCatalog.js +228 -0
- package/dist/adapters/xenoAgentHostCatalog.js.map +1 -0
- package/dist/components/agent/AIStatusIndicator.d.ts +25 -0
- package/dist/components/agent/AIStatusIndicator.d.ts.map +1 -0
- package/dist/components/agent/AIStatusIndicator.js +85 -0
- package/dist/components/agent/AIStatusIndicator.js.map +1 -0
- package/dist/components/agent/AgentInterface.d.ts +21 -0
- package/dist/components/agent/AgentInterface.d.ts.map +1 -0
- package/dist/components/agent/AgentInterface.js +7586 -0
- package/dist/components/agent/AgentInterface.js.map +1 -0
- package/dist/components/agent/AgentOnboarding.d.ts +16 -0
- package/dist/components/agent/AgentOnboarding.d.ts.map +1 -0
- package/dist/components/agent/AgentOnboarding.js +423 -0
- package/dist/components/agent/AgentOnboarding.js.map +1 -0
- package/dist/components/agent/AgentPtyTerminalPanel.d.ts +13 -0
- package/dist/components/agent/AgentPtyTerminalPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentPtyTerminalPanel.js +129 -0
- package/dist/components/agent/AgentPtyTerminalPanel.js.map +1 -0
- package/dist/components/agent/AgentView.d.ts +143 -0
- package/dist/components/agent/AgentView.d.ts.map +1 -0
- package/dist/components/agent/AgentView.js +7250 -0
- package/dist/components/agent/AgentView.js.map +1 -0
- package/dist/components/agent/AgentWorkbenchCliPanel.d.ts +15 -0
- package/dist/components/agent/AgentWorkbenchCliPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentWorkbenchCliPanel.js +275 -0
- package/dist/components/agent/AgentWorkbenchCliPanel.js.map +1 -0
- package/dist/components/agent/AgentWorkbenchPanel.d.ts +791 -0
- package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentWorkbenchPanel.js +584 -0
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -0
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts +11 -0
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -0
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js +198 -0
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -0
- package/dist/components/agent/AssistantTurnStatusNotice.d.ts +16 -0
- package/dist/components/agent/AssistantTurnStatusNotice.d.ts.map +1 -0
- package/dist/components/agent/AssistantTurnStatusNotice.js +54 -0
- package/dist/components/agent/AssistantTurnStatusNotice.js.map +1 -0
- package/dist/components/agent/CommandToolCard.d.ts +11 -0
- package/dist/components/agent/CommandToolCard.d.ts.map +1 -0
- package/dist/components/agent/CommandToolCard.js +29 -0
- package/dist/components/agent/CommandToolCard.js.map +1 -0
- package/dist/components/agent/FleetPanel.d.ts +28 -0
- package/dist/components/agent/FleetPanel.d.ts.map +1 -0
- package/dist/components/agent/FleetPanel.js +175 -0
- package/dist/components/agent/FleetPanel.js.map +1 -0
- package/dist/components/agent/GhostTextArea.d.ts +13 -0
- package/dist/components/agent/GhostTextArea.d.ts.map +1 -0
- package/dist/components/agent/GhostTextArea.js +21 -0
- package/dist/components/agent/GhostTextArea.js.map +1 -0
- package/dist/components/agent/IntakePanel.d.ts +29 -0
- package/dist/components/agent/IntakePanel.d.ts.map +1 -0
- package/dist/components/agent/IntakePanel.js +81 -0
- package/dist/components/agent/IntakePanel.js.map +1 -0
- package/dist/components/agent/KnowledgePanel.d.ts +25 -0
- package/dist/components/agent/KnowledgePanel.d.ts.map +1 -0
- package/dist/components/agent/KnowledgePanel.js +99 -0
- package/dist/components/agent/KnowledgePanel.js.map +1 -0
- package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts +9 -0
- package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts.map +1 -0
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js +204 -0
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js.map +1 -0
- package/dist/components/agent/MonacoWorkbenchEditor.d.ts +15 -0
- package/dist/components/agent/MonacoWorkbenchEditor.d.ts.map +1 -0
- package/dist/components/agent/MonacoWorkbenchEditor.js +380 -0
- package/dist/components/agent/MonacoWorkbenchEditor.js.map +1 -0
- package/dist/components/agent/PermissionDialog.d.ts +34 -0
- package/dist/components/agent/PermissionDialog.d.ts.map +1 -0
- package/dist/components/agent/PermissionDialog.js +67 -0
- package/dist/components/agent/PermissionDialog.js.map +1 -0
- package/dist/components/agent/PluginManager.d.ts +20 -0
- package/dist/components/agent/PluginManager.d.ts.map +1 -0
- package/dist/components/agent/PluginManager.js +506 -0
- package/dist/components/agent/PluginManager.js.map +1 -0
- package/dist/components/agent/RunReviewPanel.d.ts +52 -0
- package/dist/components/agent/RunReviewPanel.d.ts.map +1 -0
- package/dist/components/agent/RunReviewPanel.js +236 -0
- package/dist/components/agent/RunReviewPanel.js.map +1 -0
- package/dist/components/agent/SessionsPanel.d.ts +30 -0
- package/dist/components/agent/SessionsPanel.d.ts.map +1 -0
- package/dist/components/agent/SessionsPanel.js +247 -0
- package/dist/components/agent/SessionsPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.d.ts +19 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.js +85 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.js.map +1 -0
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.d.ts +10 -0
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js +80 -0
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpAgentManager.d.ts +3 -0
- package/dist/components/agent/acp/AcpAgentManager.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpAgentManager.js +152 -0
- package/dist/components/agent/acp/AcpAgentManager.js.map +1 -0
- package/dist/components/agent/acp/AcpAgentTestResultPanel.d.ts +9 -0
- package/dist/components/agent/acp/AcpAgentTestResultPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpAgentTestResultPanel.js +24 -0
- package/dist/components/agent/acp/AcpAgentTestResultPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpApprovalPanel.d.ts +29 -0
- package/dist/components/agent/acp/AcpApprovalPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpApprovalPanel.js +37 -0
- package/dist/components/agent/acp/AcpApprovalPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpCertificationPanel.d.ts +10 -0
- package/dist/components/agent/acp/AcpCertificationPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpCertificationPanel.js +41 -0
- package/dist/components/agent/acp/AcpCertificationPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.d.ts +11 -0
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js +32 -0
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpProviderManagerPanel.d.ts +7 -0
- package/dist/components/agent/acp/AcpProviderManagerPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpProviderManagerPanel.js +69 -0
- package/dist/components/agent/acp/AcpProviderManagerPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpProviderModelsPanel.d.ts +7 -0
- package/dist/components/agent/acp/AcpProviderModelsPanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpProviderModelsPanel.js +108 -0
- package/dist/components/agent/acp/AcpProviderModelsPanel.js.map +1 -0
- package/dist/components/agent/acp/AcpSupportBundlePanel.d.ts +8 -0
- package/dist/components/agent/acp/AcpSupportBundlePanel.d.ts.map +1 -0
- package/dist/components/agent/acp/AcpSupportBundlePanel.js +56 -0
- package/dist/components/agent/acp/AcpSupportBundlePanel.js.map +1 -0
- package/dist/components/agent/compactionSummary.d.ts +28 -0
- package/dist/components/agent/compactionSummary.d.ts.map +1 -0
- package/dist/components/agent/compactionSummary.js +41 -0
- package/dist/components/agent/compactionSummary.js.map +1 -0
- package/dist/components/agent/monacoWorkbenchShared.d.ts +13 -0
- package/dist/components/agent/monacoWorkbenchShared.d.ts.map +1 -0
- package/dist/components/agent/monacoWorkbenchShared.js +226 -0
- package/dist/components/agent/monacoWorkbenchShared.js.map +1 -0
- package/dist/components/agent/settings/EntitySettingsLayout.d.ts +61 -0
- package/dist/components/agent/settings/EntitySettingsLayout.d.ts.map +1 -0
- package/dist/components/agent/settings/EntitySettingsLayout.js +72 -0
- package/dist/components/agent/settings/EntitySettingsLayout.js.map +1 -0
- package/dist/components/agent/settings/SettingsNavigation.d.ts +8 -0
- package/dist/components/agent/settings/SettingsNavigation.d.ts.map +1 -0
- package/dist/components/agent/settings/SettingsNavigation.js +39 -0
- package/dist/components/agent/settings/SettingsNavigation.js.map +1 -0
- package/dist/components/agent/settings/sections/AccessMembersSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/AccessMembersSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/AccessMembersSection.js +31 -0
- package/dist/components/agent/settings/sections/AccessMembersSection.js.map +1 -0
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.d.ts +25 -0
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js +56 -0
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js.map +1 -0
- package/dist/components/agent/settings/sections/DangerZoneSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/DangerZoneSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/DangerZoneSection.js +19 -0
- package/dist/components/agent/settings/sections/DangerZoneSection.js.map +1 -0
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js +66 -0
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js.map +1 -0
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js +87 -0
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js.map +1 -0
- package/dist/components/agent/settings/sections/ExportBackupSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/ExportBackupSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/ExportBackupSection.js +23 -0
- package/dist/components/agent/settings/sections/ExportBackupSection.js.map +1 -0
- package/dist/components/agent/settings/sections/GeneralSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/GeneralSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/GeneralSection.js +15 -0
- package/dist/components/agent/settings/sections/GeneralSection.js.map +1 -0
- package/dist/components/agent/settings/sections/IntegrationsSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/IntegrationsSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/IntegrationsSection.js +40 -0
- package/dist/components/agent/settings/sections/IntegrationsSection.js.map +1 -0
- package/dist/components/agent/settings/sections/NotificationsSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/NotificationsSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/NotificationsSection.js +28 -0
- package/dist/components/agent/settings/sections/NotificationsSection.js.map +1 -0
- package/dist/components/agent/settings/sections/ResourceLimitsSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/ResourceLimitsSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/ResourceLimitsSection.js +17 -0
- package/dist/components/agent/settings/sections/ResourceLimitsSection.js.map +1 -0
- package/dist/components/agent/settings/sections/SecurityComplianceSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/SecurityComplianceSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/SecurityComplianceSection.js +28 -0
- package/dist/components/agent/settings/sections/SecurityComplianceSection.js.map +1 -0
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.d.ts +3 -0
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.js +17 -0
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.js.map +1 -0
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.d.ts +54 -0
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +333 -0
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -0
- package/dist/components/agent/settings/shared/CheckboxField.d.ts +13 -0
- package/dist/components/agent/settings/shared/CheckboxField.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/CheckboxField.js +8 -0
- package/dist/components/agent/settings/shared/CheckboxField.js.map +1 -0
- package/dist/components/agent/settings/shared/InputField.d.ts +15 -0
- package/dist/components/agent/settings/shared/InputField.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/InputField.js +7 -0
- package/dist/components/agent/settings/shared/InputField.js.map +1 -0
- package/dist/components/agent/settings/shared/MembersTable.d.ts +11 -0
- package/dist/components/agent/settings/shared/MembersTable.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/MembersTable.js +7 -0
- package/dist/components/agent/settings/shared/MembersTable.js.map +1 -0
- package/dist/components/agent/settings/shared/SettingRow.d.ts +11 -0
- package/dist/components/agent/settings/shared/SettingRow.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/SettingRow.js +6 -0
- package/dist/components/agent/settings/shared/SettingRow.js.map +1 -0
- package/dist/components/agent/settings/shared/SettingsCard.d.ts +11 -0
- package/dist/components/agent/settings/shared/SettingsCard.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/SettingsCard.js +8 -0
- package/dist/components/agent/settings/shared/SettingsCard.js.map +1 -0
- package/dist/components/agent/settings/shared/ToggleSwitch.d.ts +8 -0
- package/dist/components/agent/settings/shared/ToggleSwitch.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/ToggleSwitch.js +6 -0
- package/dist/components/agent/settings/shared/ToggleSwitch.js.map +1 -0
- package/dist/components/agent/settings/shared/UsageChart.d.ts +12 -0
- package/dist/components/agent/settings/shared/UsageChart.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/UsageChart.js +16 -0
- package/dist/components/agent/settings/shared/UsageChart.js.map +1 -0
- package/dist/components/agent/toolCardDisplay.d.ts +24 -0
- package/dist/components/agent/toolCardDisplay.d.ts.map +1 -0
- package/dist/components/agent/toolCardDisplay.js +85 -0
- package/dist/components/agent/toolCardDisplay.js.map +1 -0
- package/dist/components/product/XenoAgentProductHeader.d.ts +18 -0
- package/dist/components/product/XenoAgentProductHeader.d.ts.map +1 -0
- package/dist/components/product/XenoAgentProductHeader.js +25 -0
- package/dist/components/product/XenoAgentProductHeader.js.map +1 -0
- package/dist/components/product/XenoAgentSessionTabs.d.ts +18 -0
- package/dist/components/product/XenoAgentSessionTabs.d.ts.map +1 -0
- package/dist/components/product/XenoAgentSessionTabs.js +103 -0
- package/dist/components/product/XenoAgentSessionTabs.js.map +1 -0
- package/dist/components/ui/CodeBlock.d.ts +8 -0
- package/dist/components/ui/CodeBlock.d.ts.map +1 -0
- package/dist/components/ui/CodeBlock.js +89 -0
- package/dist/components/ui/CodeBlock.js.map +1 -0
- package/dist/components/ui/XenoLogo.d.ts +11 -0
- package/dist/components/ui/XenoLogo.d.ts.map +1 -0
- package/dist/components/ui/XenoLogo.js +9 -0
- package/dist/components/ui/XenoLogo.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/platformApiTypes.d.ts +3992 -0
- package/dist/platformApiTypes.d.ts.map +1 -0
- package/dist/platformApiTypes.js +2 -0
- package/dist/platformApiTypes.js.map +1 -0
- package/dist/platformBridge.d.ts +9 -0
- package/dist/platformBridge.d.ts.map +1 -0
- package/dist/platformBridge.js +19 -0
- package/dist/platformBridge.js.map +1 -0
- package/dist/providerSelector.d.ts +28 -0
- package/dist/providerSelector.d.ts.map +1 -0
- package/dist/providerSelector.js +104 -0
- package/dist/providerSelector.js.map +1 -0
- package/dist/services/connectionMode.d.ts +13 -0
- package/dist/services/connectionMode.d.ts.map +1 -0
- package/dist/services/connectionMode.js +31 -0
- package/dist/services/connectionMode.js.map +1 -0
- package/dist/sessionTabs.d.ts +48 -0
- package/dist/sessionTabs.d.ts.map +1 -0
- package/dist/sessionTabs.js +106 -0
- package/dist/sessionTabs.js.map +1 -0
- package/dist/stores/acpAgentStore.d.ts +264 -0
- package/dist/stores/acpAgentStore.d.ts.map +1 -0
- package/dist/stores/acpAgentStore.js +825 -0
- package/dist/stores/acpAgentStore.js.map +1 -0
- package/dist/stores/agentChatStore.d.ts +529 -0
- package/dist/stores/agentChatStore.d.ts.map +1 -0
- package/dist/stores/agentChatStore.js +5309 -0
- package/dist/stores/agentChatStore.js.map +1 -0
- package/dist/stores/agentIdeStore.d.ts +9 -0
- package/dist/stores/agentIdeStore.d.ts.map +1 -0
- package/dist/stores/agentIdeStore.js +8 -0
- package/dist/stores/agentIdeStore.js.map +1 -0
- package/dist/stores/agentSearchStore.d.ts +174 -0
- package/dist/stores/agentSearchStore.d.ts.map +1 -0
- package/dist/stores/agentSearchStore.js +305 -0
- package/dist/stores/agentSearchStore.js.map +1 -0
- package/dist/stores/authStore.d.ts +26 -0
- package/dist/stores/authStore.d.ts.map +1 -0
- package/dist/stores/authStore.js +163 -0
- package/dist/stores/authStore.js.map +1 -0
- package/dist/stores/entitySettingsStore.d.ts +236 -0
- package/dist/stores/entitySettingsStore.d.ts.map +1 -0
- package/dist/stores/entitySettingsStore.js +916 -0
- package/dist/stores/entitySettingsStore.js.map +1 -0
- package/dist/stores/permissionStore.d.ts +25 -0
- package/dist/stores/permissionStore.d.ts.map +1 -0
- package/dist/stores/permissionStore.js +58 -0
- package/dist/stores/permissionStore.js.map +1 -0
- package/dist/stores/suggestionStore.d.ts +29 -0
- package/dist/stores/suggestionStore.d.ts.map +1 -0
- package/dist/stores/suggestionStore.js +160 -0
- package/dist/stores/suggestionStore.js.map +1 -0
- package/dist/stores/tabStore.d.ts +30 -0
- package/dist/stores/tabStore.d.ts.map +1 -0
- package/dist/stores/tabStore.js +252 -0
- package/dist/stores/tabStore.js.map +1 -0
- package/dist/stores/themeStore.d.ts +13 -0
- package/dist/stores/themeStore.d.ts.map +1 -0
- package/dist/stores/themeStore.js +77 -0
- package/dist/stores/themeStore.js.map +1 -0
- package/dist/stores/workspaceStore.d.ts +175 -0
- package/dist/stores/workspaceStore.d.ts.map +1 -0
- package/dist/stores/workspaceStore.js +694 -0
- package/dist/stores/workspaceStore.js.map +1 -0
- package/dist/stores/xenoChatStore.d.ts +88 -0
- package/dist/stores/xenoChatStore.d.ts.map +1 -0
- package/dist/stores/xenoChatStore.js +572 -0
- package/dist/stores/xenoChatStore.js.map +1 -0
- package/dist/toolCardProjection.d.ts +33 -0
- package/dist/toolCardProjection.d.ts.map +1 -0
- package/dist/toolCardProjection.js +62 -0
- package/dist/toolCardProjection.js.map +1 -0
- package/dist/types/agentEditor.d.ts +39 -0
- package/dist/types/agentEditor.d.ts.map +1 -0
- package/dist/types/agentEditor.js +2 -0
- package/dist/types/agentEditor.js.map +1 -0
- package/dist/types/agentRuntimeProvider.d.ts +2 -0
- package/dist/types/agentRuntimeProvider.d.ts.map +1 -0
- package/dist/types/agentRuntimeProvider.js +2 -0
- package/dist/types/agentRuntimeProvider.js.map +1 -0
- package/dist/utils/acpExecutionAuthority.d.ts +18 -0
- package/dist/utils/acpExecutionAuthority.d.ts.map +1 -0
- package/dist/utils/acpExecutionAuthority.js +22 -0
- package/dist/utils/acpExecutionAuthority.js.map +1 -0
- package/dist/utils/agentAttachedContextPrompt.d.ts +2 -0
- package/dist/utils/agentAttachedContextPrompt.d.ts.map +1 -0
- package/dist/utils/agentAttachedContextPrompt.js +2 -0
- package/dist/utils/agentAttachedContextPrompt.js.map +1 -0
- package/dist/utils/agentModelContext.d.ts +2 -0
- package/dist/utils/agentModelContext.d.ts.map +1 -0
- package/dist/utils/agentModelContext.js +2 -0
- package/dist/utils/agentModelContext.js.map +1 -0
- package/dist/utils/agentReasoningEffort.d.ts +3 -0
- package/dist/utils/agentReasoningEffort.d.ts.map +1 -0
- package/dist/utils/agentReasoningEffort.js +2 -0
- package/dist/utils/agentReasoningEffort.js.map +1 -0
- package/dist/utils/agentRuntimeProvider.d.ts +3 -0
- package/dist/utils/agentRuntimeProvider.d.ts.map +1 -0
- package/dist/utils/agentRuntimeProvider.js +2 -0
- package/dist/utils/agentRuntimeProvider.js.map +1 -0
- package/dist/utils/cloudModels.d.ts +3 -0
- package/dist/utils/cloudModels.d.ts.map +1 -0
- package/dist/utils/cloudModels.js +181 -0
- package/dist/utils/cloudModels.js.map +1 -0
- package/dist/utils/conversationRuntime.d.ts +3 -0
- package/dist/utils/conversationRuntime.d.ts.map +1 -0
- package/dist/utils/conversationRuntime.js +2 -0
- package/dist/utils/conversationRuntime.js.map +1 -0
- package/dist/utils/fileCreateIntent.d.ts +16 -0
- package/dist/utils/fileCreateIntent.d.ts.map +1 -0
- package/dist/utils/fileCreateIntent.js +123 -0
- package/dist/utils/fileCreateIntent.js.map +1 -0
- package/dist/utils/legacyAgentRuntimeEvents.d.ts +2 -0
- package/dist/utils/legacyAgentRuntimeEvents.d.ts.map +1 -0
- package/dist/utils/legacyAgentRuntimeEvents.js +2 -0
- package/dist/utils/legacyAgentRuntimeEvents.js.map +1 -0
- package/dist/utils/markdownWindowsPaths.d.ts +2 -0
- package/dist/utils/markdownWindowsPaths.d.ts.map +1 -0
- package/dist/utils/markdownWindowsPaths.js +2 -0
- package/dist/utils/markdownWindowsPaths.js.map +1 -0
- package/dist/utils/workspaceSelectionContinuation.d.ts +2 -0
- package/dist/utils/workspaceSelectionContinuation.d.ts.map +1 -0
- package/dist/utils/workspaceSelectionContinuation.js +2 -0
- package/dist/utils/workspaceSelectionContinuation.js.map +1 -0
- package/package.json +53 -0
- package/src/agent.css +1156 -0
- package/src/foundation.css +62 -0
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
import { getAgentPlatformBridge } from '../platformBridge';
|
|
2
|
+
import { create } from 'zustand';
|
|
3
|
+
export function normalizeAcpAgentView(value) {
|
|
4
|
+
const record = asRecord(value);
|
|
5
|
+
const id = readString(record, 'id');
|
|
6
|
+
const name = readString(record, 'name');
|
|
7
|
+
if (!id || !name)
|
|
8
|
+
return null;
|
|
9
|
+
return {
|
|
10
|
+
id,
|
|
11
|
+
name,
|
|
12
|
+
command: readString(record, 'command') || 'redacted-command',
|
|
13
|
+
args: readStringArray(record.args),
|
|
14
|
+
cwd: readOptionalString(record, 'cwd'),
|
|
15
|
+
envKeys: readStringArray(record.envKeys),
|
|
16
|
+
enabled: record.enabled === true,
|
|
17
|
+
trustLevel: record.trustLevel === 'workspace' ? 'workspace' : 'restricted',
|
|
18
|
+
endpointKind: normalizeAcpEndpointKind(record.endpointKind),
|
|
19
|
+
certification: normalizeAcpCertification(record.certification),
|
|
20
|
+
providerReview: normalizeAcpProviderReview(record.providerReview),
|
|
21
|
+
providerVersionReadiness: normalizeAcpProviderVersionReadiness(record.providerVersionReadiness),
|
|
22
|
+
createdAt: readString(record, 'createdAt'),
|
|
23
|
+
updatedAt: readString(record, 'updatedAt'),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function normalizeAcpProviderCatalogSnapshot(value) {
|
|
27
|
+
const record = asRecord(value);
|
|
28
|
+
const source = record.source === 'network' || record.source === 'cache' || record.source === 'fallback'
|
|
29
|
+
? record.source
|
|
30
|
+
: null;
|
|
31
|
+
if (!source || !Array.isArray(record.entries))
|
|
32
|
+
return null;
|
|
33
|
+
return {
|
|
34
|
+
acpEnabled: record.acpEnabled !== false,
|
|
35
|
+
preferredAgentId: readOptionalString(record, 'preferredAgentId'),
|
|
36
|
+
source,
|
|
37
|
+
refreshedAt: readString(record, 'refreshedAt'),
|
|
38
|
+
entries: record.entries.map(normalizeAcpProviderCatalogEntry).filter((entry) => !!entry),
|
|
39
|
+
syncErrors: readStringArray(record.syncErrors),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function normalizeAcpProviderCatalogEntry(value) {
|
|
43
|
+
const record = asRecord(value);
|
|
44
|
+
const id = readString(record, 'id');
|
|
45
|
+
const name = readString(record, 'name');
|
|
46
|
+
const status = normalizeCatalogEntryStatus(record.status);
|
|
47
|
+
const distributionKind = normalizeCatalogDistributionKind(record.distributionKind);
|
|
48
|
+
if (!id || !name || !status || !distributionKind)
|
|
49
|
+
return null;
|
|
50
|
+
return {
|
|
51
|
+
id,
|
|
52
|
+
name,
|
|
53
|
+
description: readString(record, 'description'),
|
|
54
|
+
version: readOptionalString(record, 'version'),
|
|
55
|
+
iconUrl: readOptionalString(record, 'iconUrl'),
|
|
56
|
+
website: readOptionalString(record, 'website'),
|
|
57
|
+
repository: readOptionalString(record, 'repository'),
|
|
58
|
+
authors: readStringArray(record.authors),
|
|
59
|
+
license: readOptionalString(record, 'license'),
|
|
60
|
+
distributionKind,
|
|
61
|
+
installed: record.installed === true,
|
|
62
|
+
configured: record.configured === true,
|
|
63
|
+
enabled: record.enabled === true,
|
|
64
|
+
preferred: record.preferred === true,
|
|
65
|
+
canAutoSetup: record.canAutoSetup === true,
|
|
66
|
+
primaryAction: normalizeAcpProviderCatalogAction(record.primaryAction),
|
|
67
|
+
availableActions: Array.isArray(record.availableActions)
|
|
68
|
+
? record.availableActions.map(normalizeAcpProviderCatalogAction).filter((action) => !!action)
|
|
69
|
+
: [],
|
|
70
|
+
agentConfigId: readOptionalString(record, 'agentConfigId'),
|
|
71
|
+
status,
|
|
72
|
+
statusMessage: readString(record, 'statusMessage'),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function normalizeAcpProviderCatalogAction(value) {
|
|
76
|
+
const record = asRecord(value);
|
|
77
|
+
const id = readOptionalString(record, 'id');
|
|
78
|
+
const label = readOptionalString(record, 'label');
|
|
79
|
+
const validId = id === 'install' || id === 'enable' || id === 'disable' || id === 'update' || id === 'login' || id === 'certify' || id === 'configure';
|
|
80
|
+
if (!validId || !label || (record.mode !== 'automatic' && record.mode !== 'external'))
|
|
81
|
+
return undefined;
|
|
82
|
+
return { id, label, mode: record.mode };
|
|
83
|
+
}
|
|
84
|
+
function normalizeAcpEndpointKind(value) {
|
|
85
|
+
if (value === 'xeno-acp-provider' || value === 'native-acp' || value === 'custom-acp')
|
|
86
|
+
return value;
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
export function normalizeAcpProviderVersionReadiness(value) {
|
|
90
|
+
const record = asRecord(value);
|
|
91
|
+
const agentId = readOptionalString(record, 'agentId');
|
|
92
|
+
const status = readOptionalString(record, 'status');
|
|
93
|
+
if (!agentId || !isAcpProviderVersionReadinessStatus(status))
|
|
94
|
+
return undefined;
|
|
95
|
+
return {
|
|
96
|
+
agentId,
|
|
97
|
+
status,
|
|
98
|
+
ok: record.ok === true,
|
|
99
|
+
installedVersion: readOptionalString(record, 'installedVersion'),
|
|
100
|
+
minimumVersion: readOptionalString(record, 'minimumVersion'),
|
|
101
|
+
recommendedVersion: readOptionalString(record, 'recommendedVersion'),
|
|
102
|
+
updateHint: readOptionalString(record, 'updateHint'),
|
|
103
|
+
message: readString(record, 'message'),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export function normalizeAcpCertification(value) {
|
|
107
|
+
const record = asRecord(value);
|
|
108
|
+
const status = readOptionalString(record, 'status');
|
|
109
|
+
if (!isAcpCertificationStatus(status))
|
|
110
|
+
return undefined;
|
|
111
|
+
return {
|
|
112
|
+
status,
|
|
113
|
+
certifiedAt: readOptionalString(record, 'certifiedAt'),
|
|
114
|
+
certifiedBy: record.certifiedBy === 'harness' ? 'harness' : undefined,
|
|
115
|
+
protocolVersion: readNumber(record, 'protocolVersion'),
|
|
116
|
+
agentName: readOptionalString(record, 'agentName'),
|
|
117
|
+
agentVersion: readOptionalString(record, 'agentVersion'),
|
|
118
|
+
notes: readOptionalString(record, 'notes'),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export function normalizeAcpProviderReview(value) {
|
|
122
|
+
const record = asRecord(value);
|
|
123
|
+
const providerId = readOptionalString(record, 'providerId');
|
|
124
|
+
if (!providerId)
|
|
125
|
+
return undefined;
|
|
126
|
+
const secretBinding = normalizeAcpProviderSecretBinding(record.secretBinding);
|
|
127
|
+
const enforcementClassification = normalizeAcpProviderEnforcement(record.enforcementClassification);
|
|
128
|
+
return {
|
|
129
|
+
providerId,
|
|
130
|
+
displayName: readOptionalString(record, 'displayName'),
|
|
131
|
+
trustClass: readOptionalString(record, 'trustClass'),
|
|
132
|
+
runnable: record.runnable === true,
|
|
133
|
+
approvalState: normalizeAcpProviderApprovalState(record.approvalState),
|
|
134
|
+
runtimeEnvKeys: readStringArray(record.runtimeEnvKeys),
|
|
135
|
+
requiredAuthRefs: readStringArray(record.requiredAuthRefs),
|
|
136
|
+
optionalAuthRefs: readStringArray(record.optionalAuthRefs),
|
|
137
|
+
secretBinding,
|
|
138
|
+
enforcementClassification,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function normalizeAcpProviderSecretBinding(value) {
|
|
142
|
+
const record = asRecord(value);
|
|
143
|
+
if (Object.keys(record).length === 0)
|
|
144
|
+
return undefined;
|
|
145
|
+
return {
|
|
146
|
+
complete: record.complete === true,
|
|
147
|
+
missingRequiredRefs: readStringArray(record.missingRequiredRefs),
|
|
148
|
+
bindingCount: readNumber(record, 'bindingCount') || 0,
|
|
149
|
+
valuePolicy: readOptionalString(record, 'valuePolicy'),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function normalizeAcpProviderEnforcement(value) {
|
|
153
|
+
const record = asRecord(value);
|
|
154
|
+
const network = readOptionalString(record, 'network');
|
|
155
|
+
const filesystem = readOptionalString(record, 'filesystem');
|
|
156
|
+
if (!network && !filesystem)
|
|
157
|
+
return undefined;
|
|
158
|
+
return { network, filesystem };
|
|
159
|
+
}
|
|
160
|
+
export function normalizeAcpDiagnostics(value) {
|
|
161
|
+
const record = asRecord(value);
|
|
162
|
+
if (Object.keys(record).length === 0)
|
|
163
|
+
return null;
|
|
164
|
+
return {
|
|
165
|
+
path: readString(record, 'path') || 'acp-agents.json',
|
|
166
|
+
exists: record.exists === true,
|
|
167
|
+
version: readNumber(record, 'version') || 0,
|
|
168
|
+
agentCount: readNumber(record, 'agentCount') || 0,
|
|
169
|
+
enabledCount: readNumber(record, 'enabledCount') || 0,
|
|
170
|
+
repaired: record.repaired === true,
|
|
171
|
+
backupPath: readOptionalString(record, 'backupPath'),
|
|
172
|
+
agents: Array.isArray(record.agents)
|
|
173
|
+
? record.agents.map(normalizeAcpAgentView).filter((agent) => !!agent)
|
|
174
|
+
: [],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export function normalizeAcpTestResult(value) {
|
|
178
|
+
const record = asRecord(value);
|
|
179
|
+
const agentInfo = asRecord(record.agentInfo);
|
|
180
|
+
return {
|
|
181
|
+
success: record.success === true,
|
|
182
|
+
protocolVersion: readNumber(record, 'protocolVersion'),
|
|
183
|
+
agentInfo: Object.keys(agentInfo).length
|
|
184
|
+
? {
|
|
185
|
+
name: readOptionalString(agentInfo, 'name'),
|
|
186
|
+
title: readOptionalString(agentInfo, 'title'),
|
|
187
|
+
version: readOptionalString(agentInfo, 'version'),
|
|
188
|
+
}
|
|
189
|
+
: undefined,
|
|
190
|
+
updateCount: readNumber(record, 'updateCount') || 0,
|
|
191
|
+
stopReason: readOptionalString(record, 'stopReason'),
|
|
192
|
+
diagnostics: asRecord(record.diagnostics),
|
|
193
|
+
error: readOptionalString(record, 'error'),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
export function normalizeAcpExternalCertificationResult(value) {
|
|
197
|
+
const record = asRecord(value);
|
|
198
|
+
const status = readOptionalString(record, 'status');
|
|
199
|
+
if (!isAcpExternalCertificationStatus(status))
|
|
200
|
+
return null;
|
|
201
|
+
return {
|
|
202
|
+
status,
|
|
203
|
+
realExternalAttempted: record.realExternalAttempted === true,
|
|
204
|
+
fixtureSimulation: record.fixtureSimulation === true,
|
|
205
|
+
agentId: readString(record, 'agentId'),
|
|
206
|
+
agentName: readString(record, 'agentName'),
|
|
207
|
+
commandBasename: readString(record, 'commandBasename') || '[redacted-command]',
|
|
208
|
+
argsCount: readNumber(record, 'argsCount') || 0,
|
|
209
|
+
envKeys: readStringArray(record.envKeys),
|
|
210
|
+
protocolVersion: readNumber(record, 'protocolVersion'),
|
|
211
|
+
stopReason: readOptionalString(record, 'stopReason'),
|
|
212
|
+
updateCount: readNumber(record, 'updateCount') || 0,
|
|
213
|
+
certification: normalizeAcpCertification(record.certification),
|
|
214
|
+
diagnostics: asRecord(record.diagnostics),
|
|
215
|
+
error: readOptionalString(record, 'error'),
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
export function normalizeAcpProviderApprovalResult(value) {
|
|
219
|
+
const record = asRecord(value);
|
|
220
|
+
const status = readOptionalString(record, 'status');
|
|
221
|
+
if (status !== 'approved' && status !== 'revoked' && status !== 'failed')
|
|
222
|
+
return null;
|
|
223
|
+
return {
|
|
224
|
+
success: record.success === true,
|
|
225
|
+
status,
|
|
226
|
+
action: record.action === 'approve' || record.action === 'revoke' ? record.action : undefined,
|
|
227
|
+
providerId: readString(record, 'providerId'),
|
|
228
|
+
commandBasename: readString(record, 'commandBasename') || '[redacted-command]',
|
|
229
|
+
argsCount: readNumber(record, 'argsCount') || 0,
|
|
230
|
+
stdoutTail: readStringArray(record.stdoutTail),
|
|
231
|
+
stderrTail: readStringArray(record.stderrTail),
|
|
232
|
+
error: readOptionalString(record, 'error'),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
export function buildAcpSavePayload(input) {
|
|
236
|
+
const payload = {
|
|
237
|
+
id: input.id.trim(),
|
|
238
|
+
name: input.name.trim(),
|
|
239
|
+
enabled: input.enabled === true,
|
|
240
|
+
trustLevel: input.trustLevel === 'workspace' ? 'workspace' : 'restricted',
|
|
241
|
+
};
|
|
242
|
+
if (input.command?.trim())
|
|
243
|
+
payload.command = input.command.trim();
|
|
244
|
+
if (input.args)
|
|
245
|
+
payload.args = input.args;
|
|
246
|
+
if (input.cwd?.trim())
|
|
247
|
+
payload.cwd = input.cwd.trim();
|
|
248
|
+
if (input.env && Object.keys(input.env).length > 0)
|
|
249
|
+
payload.env = input.env;
|
|
250
|
+
return payload;
|
|
251
|
+
}
|
|
252
|
+
let catalogLoadInFlight = null;
|
|
253
|
+
let catalogSyncInFlight = null;
|
|
254
|
+
const catalogSetupPolls = new Map();
|
|
255
|
+
const runtimeAgentDetailLoads = new Map();
|
|
256
|
+
export const useAcpAgentStore = create((set, get) => ({
|
|
257
|
+
agents: [],
|
|
258
|
+
runtimeAgentDetails: {},
|
|
259
|
+
runtimeAgentDetailLoadingIds: [],
|
|
260
|
+
runtimeAgentDetailErrors: {},
|
|
261
|
+
catalog: null,
|
|
262
|
+
selectedAgentId: null,
|
|
263
|
+
diagnostics: null,
|
|
264
|
+
testResult: null,
|
|
265
|
+
certificationResult: null,
|
|
266
|
+
approvalResult: null,
|
|
267
|
+
loading: false,
|
|
268
|
+
catalogLoading: false,
|
|
269
|
+
catalogSyncing: false,
|
|
270
|
+
catalogActionId: null,
|
|
271
|
+
updatingProviderId: null,
|
|
272
|
+
saving: false,
|
|
273
|
+
diagnosticsLoading: false,
|
|
274
|
+
testingAgentId: null,
|
|
275
|
+
certifyingAgentId: null,
|
|
276
|
+
approvingAgentId: null,
|
|
277
|
+
removingAgentId: null,
|
|
278
|
+
error: null,
|
|
279
|
+
catalogError: null,
|
|
280
|
+
formError: null,
|
|
281
|
+
selectAgent: (id) => set({ selectedAgentId: id, formError: null, testResult: null, certificationResult: null, approvalResult: null }),
|
|
282
|
+
clearErrors: () => set({ error: null, formError: null }),
|
|
283
|
+
load: async () => {
|
|
284
|
+
set({ loading: true, error: null });
|
|
285
|
+
try {
|
|
286
|
+
const response = await getAgentPlatformBridge()?.acp?.listAgents();
|
|
287
|
+
if (!response?.success) {
|
|
288
|
+
set({ loading: false, agents: [], error: response?.error || 'ACP registry load failed.' });
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const agents = Array.isArray(response.agents)
|
|
292
|
+
? response.agents.map(normalizeAcpAgentView).filter((agent) => !!agent)
|
|
293
|
+
: [];
|
|
294
|
+
const current = get().selectedAgentId;
|
|
295
|
+
set({
|
|
296
|
+
agents,
|
|
297
|
+
selectedAgentId: current && agents.some((agent) => agent.id === current) ? current : agents[0]?.id || null,
|
|
298
|
+
loading: false,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
set({ loading: false, agents: [], error: safeError(error, 'ACP registry load failed.') });
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
loadAgentDetails: async (id, options = {}) => {
|
|
306
|
+
const agentId = id.trim();
|
|
307
|
+
if (!agentId)
|
|
308
|
+
return { success: false, error: 'ACP agent id is required.' };
|
|
309
|
+
const force = options.force === true;
|
|
310
|
+
if (!force && get().runtimeAgentDetails[agentId])
|
|
311
|
+
return { success: true };
|
|
312
|
+
const inFlight = runtimeAgentDetailLoads.get(agentId);
|
|
313
|
+
if (inFlight) {
|
|
314
|
+
const result = await inFlight;
|
|
315
|
+
if (!force || !result.success)
|
|
316
|
+
return result;
|
|
317
|
+
}
|
|
318
|
+
const operation = (async () => {
|
|
319
|
+
set((state) => ({
|
|
320
|
+
runtimeAgentDetails: force
|
|
321
|
+
? Object.fromEntries(Object.entries(state.runtimeAgentDetails).filter(([key]) => key !== agentId))
|
|
322
|
+
: state.runtimeAgentDetails,
|
|
323
|
+
runtimeAgentDetailLoadingIds: state.runtimeAgentDetailLoadingIds.includes(agentId)
|
|
324
|
+
? state.runtimeAgentDetailLoadingIds
|
|
325
|
+
: [...state.runtimeAgentDetailLoadingIds, agentId],
|
|
326
|
+
runtimeAgentDetailErrors: Object.fromEntries(Object.entries(state.runtimeAgentDetailErrors).filter(([key]) => key !== agentId)),
|
|
327
|
+
}));
|
|
328
|
+
try {
|
|
329
|
+
const response = await getAgentPlatformBridge()?.acp?.getAgent?.(agentId);
|
|
330
|
+
const agent = normalizeAcpAgentView(response?.agent);
|
|
331
|
+
if (!response?.success || !agent) {
|
|
332
|
+
const message = response?.error || 'ACP runtime readiness could not be loaded.';
|
|
333
|
+
set((state) => ({
|
|
334
|
+
runtimeAgentDetailLoadingIds: state.runtimeAgentDetailLoadingIds.filter((key) => key !== agentId),
|
|
335
|
+
runtimeAgentDetailErrors: { ...state.runtimeAgentDetailErrors, [agentId]: message },
|
|
336
|
+
}));
|
|
337
|
+
return { success: false, error: message };
|
|
338
|
+
}
|
|
339
|
+
set((state) => ({
|
|
340
|
+
runtimeAgentDetails: { ...state.runtimeAgentDetails, [agentId]: agent },
|
|
341
|
+
runtimeAgentDetailLoadingIds: state.runtimeAgentDetailLoadingIds.filter((key) => key !== agentId),
|
|
342
|
+
runtimeAgentDetailErrors: Object.fromEntries(Object.entries(state.runtimeAgentDetailErrors).filter(([key]) => key !== agentId)),
|
|
343
|
+
}));
|
|
344
|
+
return { success: true };
|
|
345
|
+
}
|
|
346
|
+
catch (error) {
|
|
347
|
+
const message = safeError(error, 'ACP runtime readiness could not be loaded.');
|
|
348
|
+
set((state) => ({
|
|
349
|
+
runtimeAgentDetailLoadingIds: state.runtimeAgentDetailLoadingIds.filter((key) => key !== agentId),
|
|
350
|
+
runtimeAgentDetailErrors: { ...state.runtimeAgentDetailErrors, [agentId]: message },
|
|
351
|
+
}));
|
|
352
|
+
return { success: false, error: message };
|
|
353
|
+
}
|
|
354
|
+
})();
|
|
355
|
+
runtimeAgentDetailLoads.set(agentId, operation);
|
|
356
|
+
try {
|
|
357
|
+
return await operation;
|
|
358
|
+
}
|
|
359
|
+
finally {
|
|
360
|
+
if (runtimeAgentDetailLoads.get(agentId) === operation)
|
|
361
|
+
runtimeAgentDetailLoads.delete(agentId);
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
loadCatalog: async (refresh = false) => {
|
|
365
|
+
if (catalogLoadInFlight)
|
|
366
|
+
return catalogLoadInFlight;
|
|
367
|
+
const operation = (async () => {
|
|
368
|
+
set({ catalogLoading: true, catalogError: null });
|
|
369
|
+
try {
|
|
370
|
+
const response = await getAgentPlatformBridge()?.acp?.listProviderCatalog?.(refresh);
|
|
371
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
372
|
+
if (!response?.success || !catalog) {
|
|
373
|
+
const message = response?.error || 'ACP provider catalog could not be loaded.';
|
|
374
|
+
set({ catalogLoading: false, catalogError: message });
|
|
375
|
+
return { success: false, error: message };
|
|
376
|
+
}
|
|
377
|
+
set({ catalogLoading: false, catalog, catalogError: null });
|
|
378
|
+
reconcileCatalogSetupPolls(catalog);
|
|
379
|
+
if (!refresh)
|
|
380
|
+
void get().syncCatalog();
|
|
381
|
+
return { success: true };
|
|
382
|
+
}
|
|
383
|
+
catch (error) {
|
|
384
|
+
const message = safeError(error, 'ACP provider catalog could not be loaded.');
|
|
385
|
+
set({ catalogLoading: false, catalogError: message });
|
|
386
|
+
return { success: false, error: message };
|
|
387
|
+
}
|
|
388
|
+
})();
|
|
389
|
+
catalogLoadInFlight = operation;
|
|
390
|
+
try {
|
|
391
|
+
return await operation;
|
|
392
|
+
}
|
|
393
|
+
finally {
|
|
394
|
+
if (catalogLoadInFlight === operation)
|
|
395
|
+
catalogLoadInFlight = null;
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
syncCatalog: async () => {
|
|
399
|
+
if (catalogSyncInFlight)
|
|
400
|
+
return catalogSyncInFlight;
|
|
401
|
+
const operation = (async () => {
|
|
402
|
+
set({ catalogSyncing: true });
|
|
403
|
+
try {
|
|
404
|
+
const response = await getAgentPlatformBridge()?.acp?.syncProviderCatalog?.(false);
|
|
405
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
406
|
+
if (!response?.success || !catalog) {
|
|
407
|
+
const message = response?.error || 'Automatic ACP provider discovery failed.';
|
|
408
|
+
set({ catalogSyncing: false, catalogError: message });
|
|
409
|
+
return { success: false, error: message };
|
|
410
|
+
}
|
|
411
|
+
set({ catalogSyncing: false, catalog, catalogError: null });
|
|
412
|
+
reconcileCatalogSetupPolls(catalog);
|
|
413
|
+
return { success: true };
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
const message = safeError(error, 'Automatic ACP provider discovery failed.');
|
|
417
|
+
set({ catalogSyncing: false, catalogError: message });
|
|
418
|
+
return { success: false, error: message };
|
|
419
|
+
}
|
|
420
|
+
})();
|
|
421
|
+
catalogSyncInFlight = operation;
|
|
422
|
+
try {
|
|
423
|
+
return await operation;
|
|
424
|
+
}
|
|
425
|
+
finally {
|
|
426
|
+
if (catalogSyncInFlight === operation)
|
|
427
|
+
catalogSyncInFlight = null;
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
setCatalogEnabled: async (enabled) => {
|
|
431
|
+
set({ catalogActionId: 'catalog', catalogError: null });
|
|
432
|
+
try {
|
|
433
|
+
const response = await getAgentPlatformBridge()?.acp?.setProviderCatalogEnabled?.(enabled);
|
|
434
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
435
|
+
if (!response?.success || !catalog) {
|
|
436
|
+
const message = response?.error || 'ACP could not be updated.';
|
|
437
|
+
set({ catalogActionId: null, catalogError: message });
|
|
438
|
+
return { success: false, error: message };
|
|
439
|
+
}
|
|
440
|
+
set({ catalogActionId: null, catalog });
|
|
441
|
+
reconcileCatalogSetupPolls(catalog);
|
|
442
|
+
return { success: true };
|
|
443
|
+
}
|
|
444
|
+
catch (error) {
|
|
445
|
+
const message = safeError(error, 'ACP could not be updated.');
|
|
446
|
+
set({ catalogActionId: null, catalogError: message });
|
|
447
|
+
return { success: false, error: message };
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
setCatalogProviderEnabled: async (providerId, enabled) => {
|
|
451
|
+
set({ catalogActionId: providerId, catalogError: null });
|
|
452
|
+
try {
|
|
453
|
+
const response = await getAgentPlatformBridge()?.acp?.setCatalogProviderEnabled?.(providerId, enabled);
|
|
454
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
455
|
+
if (!response?.success || !catalog) {
|
|
456
|
+
const message = response?.error || 'ACP provider setup failed.';
|
|
457
|
+
set({ catalogActionId: null, catalogError: message });
|
|
458
|
+
return { success: false, error: message };
|
|
459
|
+
}
|
|
460
|
+
set({ catalogActionId: null, catalog });
|
|
461
|
+
reconcileCatalogSetupPolls(catalog);
|
|
462
|
+
void get().load();
|
|
463
|
+
void get().refreshDiagnostics();
|
|
464
|
+
return { success: true };
|
|
465
|
+
}
|
|
466
|
+
catch (error) {
|
|
467
|
+
const message = safeError(error, 'ACP provider setup failed.');
|
|
468
|
+
set({ catalogActionId: null, catalogError: message });
|
|
469
|
+
return { success: false, error: message };
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
updateCatalogProvider: async (providerId) => {
|
|
473
|
+
set({ catalogActionId: providerId, updatingProviderId: providerId, catalogError: null });
|
|
474
|
+
try {
|
|
475
|
+
const response = await getAgentPlatformBridge()?.acp?.updateCatalogProvider?.(providerId);
|
|
476
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
477
|
+
if (!response?.success || !catalog) {
|
|
478
|
+
const message = response?.error || 'ACP provider update failed.';
|
|
479
|
+
set({ catalogActionId: null, updatingProviderId: null, catalogError: message });
|
|
480
|
+
return { success: false, error: message };
|
|
481
|
+
}
|
|
482
|
+
set({ catalogActionId: null, updatingProviderId: null, catalog, catalogError: null });
|
|
483
|
+
reconcileCatalogSetupPolls(catalog);
|
|
484
|
+
void get().load();
|
|
485
|
+
void get().refreshDiagnostics();
|
|
486
|
+
return { success: true };
|
|
487
|
+
}
|
|
488
|
+
catch (error) {
|
|
489
|
+
const message = safeError(error, 'ACP provider update failed.');
|
|
490
|
+
set({ catalogActionId: null, updatingProviderId: null, catalogError: message });
|
|
491
|
+
return { success: false, error: message };
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
setPreferredCatalogProvider: async (providerId) => {
|
|
495
|
+
set({ catalogActionId: providerId, catalogError: null });
|
|
496
|
+
try {
|
|
497
|
+
const response = await getAgentPlatformBridge()?.acp?.setPreferredCatalogProvider?.(providerId);
|
|
498
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
499
|
+
if (!response?.success || !catalog) {
|
|
500
|
+
const message = response?.error || 'Preferred ACP provider could not be updated.';
|
|
501
|
+
set({ catalogActionId: null, catalogError: message });
|
|
502
|
+
return { success: false, error: message };
|
|
503
|
+
}
|
|
504
|
+
set({ catalogActionId: null, catalog });
|
|
505
|
+
reconcileCatalogSetupPolls(catalog);
|
|
506
|
+
return { success: true };
|
|
507
|
+
}
|
|
508
|
+
catch (error) {
|
|
509
|
+
const message = safeError(error, 'Preferred ACP provider could not be updated.');
|
|
510
|
+
set({ catalogActionId: null, catalogError: message });
|
|
511
|
+
return { success: false, error: message };
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
refreshDiagnostics: async () => {
|
|
515
|
+
set({ diagnosticsLoading: true, error: null });
|
|
516
|
+
try {
|
|
517
|
+
const response = await getAgentPlatformBridge()?.acp?.getDiagnostics();
|
|
518
|
+
set({
|
|
519
|
+
diagnosticsLoading: false,
|
|
520
|
+
diagnostics: response?.success ? normalizeAcpDiagnostics(response.diagnostics) : null,
|
|
521
|
+
error: response?.success ? null : (response?.error || 'ACP diagnostics unavailable.'),
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
catch (error) {
|
|
525
|
+
set({ diagnosticsLoading: false, error: safeError(error, 'ACP diagnostics unavailable.') });
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
saveAgent: async (input) => {
|
|
529
|
+
set({ saving: true, formError: null, error: null });
|
|
530
|
+
try {
|
|
531
|
+
const response = await getAgentPlatformBridge()?.acp?.saveAgent(buildAcpSavePayload(input));
|
|
532
|
+
if (!response?.success) {
|
|
533
|
+
const message = response?.error || 'ACP agent save failed.';
|
|
534
|
+
set({ saving: false, formError: message });
|
|
535
|
+
return { success: false, error: message };
|
|
536
|
+
}
|
|
537
|
+
const agent = normalizeAcpAgentView(response.agent);
|
|
538
|
+
await get().load();
|
|
539
|
+
await get().refreshDiagnostics();
|
|
540
|
+
set({ saving: false, selectedAgentId: agent?.id || input.id, formError: null });
|
|
541
|
+
return { success: true };
|
|
542
|
+
}
|
|
543
|
+
catch (error) {
|
|
544
|
+
const message = safeError(error, 'ACP agent save failed.');
|
|
545
|
+
set({ saving: false, formError: message });
|
|
546
|
+
return { success: false, error: message };
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
removeAgent: async (id) => {
|
|
550
|
+
set({ removingAgentId: id, error: null });
|
|
551
|
+
try {
|
|
552
|
+
const response = await getAgentPlatformBridge()?.acp?.removeAgent(id);
|
|
553
|
+
if (!response?.success) {
|
|
554
|
+
const message = response?.error || 'ACP agent remove failed.';
|
|
555
|
+
set({ removingAgentId: null, error: message });
|
|
556
|
+
return { success: false, error: message };
|
|
557
|
+
}
|
|
558
|
+
await get().load();
|
|
559
|
+
await get().refreshDiagnostics();
|
|
560
|
+
set({ removingAgentId: null, testResult: null, certificationResult: null, approvalResult: null });
|
|
561
|
+
return { success: true };
|
|
562
|
+
}
|
|
563
|
+
catch (error) {
|
|
564
|
+
const message = safeError(error, 'ACP agent remove failed.');
|
|
565
|
+
set({ removingAgentId: null, error: message });
|
|
566
|
+
return { success: false, error: message };
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
testAgent: async (id) => {
|
|
570
|
+
set({ testingAgentId: id, testResult: null, error: null });
|
|
571
|
+
try {
|
|
572
|
+
const response = await getAgentPlatformBridge()?.acp?.testAgent(id);
|
|
573
|
+
const result = normalizeAcpTestResult(response);
|
|
574
|
+
set({ testingAgentId: null, testResult: result });
|
|
575
|
+
await get().refreshDiagnostics();
|
|
576
|
+
return result.success ? { success: true } : { success: false, error: result.error || 'ACP fixture test failed.' };
|
|
577
|
+
}
|
|
578
|
+
catch (error) {
|
|
579
|
+
const message = safeError(error, 'ACP fixture test failed.');
|
|
580
|
+
set({ testingAgentId: null, testResult: { success: false, updateCount: 0, diagnostics: {}, error: message } });
|
|
581
|
+
return { success: false, error: message };
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
certifyAgent: async (id) => {
|
|
585
|
+
set({ certifyingAgentId: id, certificationResult: null, error: null });
|
|
586
|
+
try {
|
|
587
|
+
const response = await getAgentPlatformBridge()?.acp?.certifyAgent?.(id);
|
|
588
|
+
const result = normalizeAcpExternalCertificationResult(response?.result);
|
|
589
|
+
if (!response?.success || !result) {
|
|
590
|
+
const message = response?.error || 'ACP certification harness failed.';
|
|
591
|
+
set({ certifyingAgentId: null, certificationResult: result, error: message });
|
|
592
|
+
return { success: false, error: message };
|
|
593
|
+
}
|
|
594
|
+
const agent = normalizeAcpAgentView(response.agent);
|
|
595
|
+
await get().load();
|
|
596
|
+
await get().refreshDiagnostics();
|
|
597
|
+
set({
|
|
598
|
+
certifyingAgentId: null,
|
|
599
|
+
certificationResult: result,
|
|
600
|
+
selectedAgentId: agent?.id || id,
|
|
601
|
+
});
|
|
602
|
+
if (result.status === 'PASSED' || result.status === 'FALLBACK_FIXTURE_ONLY')
|
|
603
|
+
return { success: true };
|
|
604
|
+
return { success: false, error: result.error || `ACP certification ${result.status}.` };
|
|
605
|
+
}
|
|
606
|
+
catch (error) {
|
|
607
|
+
const message = safeError(error, 'ACP certification harness failed.');
|
|
608
|
+
set({ certifyingAgentId: null, error: message });
|
|
609
|
+
return { success: false, error: message };
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
approveProvider: async (id, providerId) => {
|
|
613
|
+
set({ approvingAgentId: id, approvalResult: null, error: null });
|
|
614
|
+
try {
|
|
615
|
+
const response = await getAgentPlatformBridge()?.acp?.approveProvider?.(id, providerId);
|
|
616
|
+
const result = normalizeAcpProviderApprovalResult(response?.result);
|
|
617
|
+
if (!response?.success || !result) {
|
|
618
|
+
const message = response?.error || result?.error || 'ACP provider approval failed.';
|
|
619
|
+
set({ approvingAgentId: null, approvalResult: result, error: message });
|
|
620
|
+
return { success: false, error: message };
|
|
621
|
+
}
|
|
622
|
+
await get().load();
|
|
623
|
+
const detail = await get().loadAgentDetails(id, { force: true });
|
|
624
|
+
await get().refreshDiagnostics();
|
|
625
|
+
set({ approvingAgentId: null, approvalResult: result });
|
|
626
|
+
if (!detail.success) {
|
|
627
|
+
const message = `Provider approved, but runtime readiness refresh failed: ${detail.error || 'unknown error'}`;
|
|
628
|
+
set({ error: message });
|
|
629
|
+
return { success: false, error: message };
|
|
630
|
+
}
|
|
631
|
+
return { success: true };
|
|
632
|
+
}
|
|
633
|
+
catch (error) {
|
|
634
|
+
const message = safeError(error, 'ACP provider approval failed.');
|
|
635
|
+
set({ approvingAgentId: null, error: message });
|
|
636
|
+
return { success: false, error: message };
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
revokeProvider: async (id, providerId) => {
|
|
640
|
+
set({ approvingAgentId: id, approvalResult: null, error: null });
|
|
641
|
+
try {
|
|
642
|
+
const response = await getAgentPlatformBridge()?.acp?.revokeProvider?.(id, providerId);
|
|
643
|
+
const result = normalizeAcpProviderApprovalResult(response?.result);
|
|
644
|
+
if (!response?.success || !result) {
|
|
645
|
+
const message = response?.error || result?.error || 'ACP provider approval revoke failed.';
|
|
646
|
+
set({ approvingAgentId: null, approvalResult: result, error: message });
|
|
647
|
+
return { success: false, error: message };
|
|
648
|
+
}
|
|
649
|
+
await get().load();
|
|
650
|
+
const detail = await get().loadAgentDetails(id, { force: true });
|
|
651
|
+
await get().refreshDiagnostics();
|
|
652
|
+
set({ approvingAgentId: null, approvalResult: result });
|
|
653
|
+
if (!detail.success) {
|
|
654
|
+
const message = `Provider revoked, but runtime readiness refresh failed: ${detail.error || 'unknown error'}`;
|
|
655
|
+
set({ error: message });
|
|
656
|
+
return { success: false, error: message };
|
|
657
|
+
}
|
|
658
|
+
return { success: true };
|
|
659
|
+
}
|
|
660
|
+
catch (error) {
|
|
661
|
+
const message = safeError(error, 'ACP provider approval revoke failed.');
|
|
662
|
+
set({ approvingAgentId: null, error: message });
|
|
663
|
+
return { success: false, error: message };
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
createFixtureAgent: async () => {
|
|
667
|
+
set({ saving: true, formError: null, error: null });
|
|
668
|
+
try {
|
|
669
|
+
const response = await getAgentPlatformBridge()?.acp?.createFixtureAgent?.({ mode: 'normal', id: 'fixture-normal' });
|
|
670
|
+
if (!response?.success) {
|
|
671
|
+
const message = response?.error || 'Fixture ACP agent creation is unavailable.';
|
|
672
|
+
set({ saving: false, formError: message });
|
|
673
|
+
return { success: false, error: message };
|
|
674
|
+
}
|
|
675
|
+
const agent = normalizeAcpAgentView(response.agent);
|
|
676
|
+
await get().load();
|
|
677
|
+
await get().refreshDiagnostics();
|
|
678
|
+
set({ saving: false, selectedAgentId: agent?.id || 'fixture-normal' });
|
|
679
|
+
return { success: true };
|
|
680
|
+
}
|
|
681
|
+
catch (error) {
|
|
682
|
+
const message = safeError(error, 'Fixture ACP agent creation failed.');
|
|
683
|
+
set({ saving: false, formError: message });
|
|
684
|
+
return { success: false, error: message };
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
createLocalProviderAgent: async (providerId) => {
|
|
688
|
+
set({ saving: true, formError: null, error: null });
|
|
689
|
+
try {
|
|
690
|
+
const response = await getAgentPlatformBridge()?.acp?.createLocalProviderAgent?.(providerId);
|
|
691
|
+
if (!response?.success) {
|
|
692
|
+
const message = response?.error || 'Local ACP provider setup failed.';
|
|
693
|
+
set({ saving: false, formError: message });
|
|
694
|
+
return { success: false, error: message };
|
|
695
|
+
}
|
|
696
|
+
const agent = normalizeAcpAgentView(response.agent);
|
|
697
|
+
await get().load();
|
|
698
|
+
await get().refreshDiagnostics();
|
|
699
|
+
set({ saving: false, selectedAgentId: agent?.id || providerId });
|
|
700
|
+
return { success: true };
|
|
701
|
+
}
|
|
702
|
+
catch (error) {
|
|
703
|
+
const message = safeError(error, 'Local ACP provider setup failed.');
|
|
704
|
+
set({ saving: false, formError: message });
|
|
705
|
+
return { success: false, error: message };
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
}));
|
|
709
|
+
function cancelCatalogSetupPoll(providerId) {
|
|
710
|
+
const timer = catalogSetupPolls.get(providerId);
|
|
711
|
+
if (timer)
|
|
712
|
+
clearTimeout(timer);
|
|
713
|
+
catalogSetupPolls.delete(providerId);
|
|
714
|
+
}
|
|
715
|
+
function reconcileCatalogSetupPolls(catalog) {
|
|
716
|
+
const activeProviderIds = new Set(catalog.entries
|
|
717
|
+
.filter((provider) => provider.status === 'setting_up')
|
|
718
|
+
.map((provider) => provider.id));
|
|
719
|
+
for (const providerId of catalogSetupPolls.keys()) {
|
|
720
|
+
if (!activeProviderIds.has(providerId))
|
|
721
|
+
cancelCatalogSetupPoll(providerId);
|
|
722
|
+
}
|
|
723
|
+
for (const providerId of activeProviderIds)
|
|
724
|
+
scheduleCatalogSetupPoll(providerId);
|
|
725
|
+
}
|
|
726
|
+
function scheduleCatalogSetupPoll(providerId, attempt = 0) {
|
|
727
|
+
cancelCatalogSetupPoll(providerId);
|
|
728
|
+
if (attempt >= 130) {
|
|
729
|
+
useAcpAgentStore.setState({ catalogError: 'Provider setup is taking longer than expected. You can keep using Hub and retry later.' });
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
const timer = setTimeout(() => {
|
|
733
|
+
void (async () => {
|
|
734
|
+
try {
|
|
735
|
+
const response = await getAgentPlatformBridge()?.acp?.listProviderCatalog?.(false);
|
|
736
|
+
const catalog = normalizeAcpProviderCatalogSnapshot(response?.catalog);
|
|
737
|
+
if (!response?.success || !catalog) {
|
|
738
|
+
scheduleCatalogSetupPoll(providerId, attempt + 1);
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
useAcpAgentStore.setState({ catalog, catalogError: null });
|
|
742
|
+
const provider = catalog.entries.find((entry) => entry.id === providerId);
|
|
743
|
+
if (provider?.status === 'setting_up')
|
|
744
|
+
scheduleCatalogSetupPoll(providerId, attempt + 1);
|
|
745
|
+
else
|
|
746
|
+
cancelCatalogSetupPoll(providerId);
|
|
747
|
+
if (provider?.status === 'setting_up')
|
|
748
|
+
return;
|
|
749
|
+
void useAcpAgentStore.getState().load();
|
|
750
|
+
void useAcpAgentStore.getState().refreshDiagnostics();
|
|
751
|
+
}
|
|
752
|
+
catch {
|
|
753
|
+
scheduleCatalogSetupPoll(providerId, attempt + 1);
|
|
754
|
+
}
|
|
755
|
+
})();
|
|
756
|
+
}, 1_000);
|
|
757
|
+
catalogSetupPolls.set(providerId, timer);
|
|
758
|
+
}
|
|
759
|
+
function asRecord(value) {
|
|
760
|
+
return value && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
761
|
+
}
|
|
762
|
+
function readString(record, key) {
|
|
763
|
+
const value = record[key];
|
|
764
|
+
return typeof value === 'string' ? value : '';
|
|
765
|
+
}
|
|
766
|
+
function readOptionalString(record, key) {
|
|
767
|
+
const value = readString(record, key);
|
|
768
|
+
return value.trim() ? value : undefined;
|
|
769
|
+
}
|
|
770
|
+
function readNumber(record, key) {
|
|
771
|
+
const value = record[key];
|
|
772
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
773
|
+
}
|
|
774
|
+
function readStringArray(value) {
|
|
775
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
776
|
+
}
|
|
777
|
+
function isAcpCertificationStatus(value) {
|
|
778
|
+
return value === 'not_certified'
|
|
779
|
+
|| value === 'fixture_only'
|
|
780
|
+
|| value === 'certified'
|
|
781
|
+
|| value === 'authentication_required'
|
|
782
|
+
|| value === 'blocked_by_environment'
|
|
783
|
+
|| value === 'failed';
|
|
784
|
+
}
|
|
785
|
+
function isAcpExternalCertificationStatus(value) {
|
|
786
|
+
return value === 'PASSED'
|
|
787
|
+
|| value === 'AUTHENTICATION_REQUIRED'
|
|
788
|
+
|| value === 'BLOCKED_BY_ENVIRONMENT'
|
|
789
|
+
|| value === 'FAILED_WITH_BUG'
|
|
790
|
+
|| value === 'FALLBACK_FIXTURE_ONLY';
|
|
791
|
+
}
|
|
792
|
+
function isAcpProviderVersionReadinessStatus(value) {
|
|
793
|
+
return value === 'not_applicable'
|
|
794
|
+
|| value === 'ok'
|
|
795
|
+
|| value === 'outdated'
|
|
796
|
+
|| value === 'unavailable'
|
|
797
|
+
|| value === 'unknown';
|
|
798
|
+
}
|
|
799
|
+
function normalizeCatalogEntryStatus(value) {
|
|
800
|
+
return value === 'ready'
|
|
801
|
+
|| value === 'setting_up'
|
|
802
|
+
|| value === 'available'
|
|
803
|
+
|| value === 'disabled'
|
|
804
|
+
|| value === 'update_required'
|
|
805
|
+
|| value === 'needs_attention'
|
|
806
|
+
|| value === 'not_installed'
|
|
807
|
+
? value
|
|
808
|
+
: null;
|
|
809
|
+
}
|
|
810
|
+
function normalizeCatalogDistributionKind(value) {
|
|
811
|
+
return value === 'binary' || value === 'npx' || value === 'uvx' || value === 'custom' ? value : null;
|
|
812
|
+
}
|
|
813
|
+
function normalizeAcpProviderApprovalState(value) {
|
|
814
|
+
return value === 'approved'
|
|
815
|
+
|| value === 'missing'
|
|
816
|
+
|| value === 'stale'
|
|
817
|
+
|| value === 'blocked'
|
|
818
|
+
|| value === 'not_required'
|
|
819
|
+
? value
|
|
820
|
+
: undefined;
|
|
821
|
+
}
|
|
822
|
+
function safeError(error, fallback) {
|
|
823
|
+
return error instanceof Error && error.message.trim() ? error.message : fallback;
|
|
824
|
+
}
|
|
825
|
+
//# sourceMappingURL=acpAgentStore.js.map
|