@xenosystem/agent-interface-ui 0.1.25 → 0.1.27
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/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
- package/dist/adapters/agentHostPlatformBridge.js +96 -16
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
- package/dist/adapters/hubAgentPlatformBridge.d.ts.map +1 -1
- package/dist/adapters/hubAgentPlatformBridge.js +2 -0
- package/dist/adapters/hubAgentPlatformBridge.js.map +1 -1
- package/dist/adapters/scopedBackupBridge.d.ts +4 -0
- package/dist/adapters/scopedBackupBridge.d.ts.map +1 -0
- package/dist/adapters/scopedBackupBridge.js +49 -0
- package/dist/adapters/scopedBackupBridge.js.map +1 -0
- package/dist/adapters/xenoAgentCompatibilityBridge.d.ts.map +1 -1
- package/dist/adapters/xenoAgentCompatibilityBridge.js +9 -1
- package/dist/adapters/xenoAgentCompatibilityBridge.js.map +1 -1
- package/dist/agent.css +13227 -0
- package/dist/components/agent/AgentIdentityGenerator.d.ts +16 -0
- package/dist/components/agent/AgentIdentityGenerator.d.ts.map +1 -0
- package/dist/components/agent/AgentIdentityGenerator.js +80 -0
- package/dist/components/agent/AgentIdentityGenerator.js.map +1 -0
- package/dist/components/agent/AgentInterface.d.ts +1 -0
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +1816 -643
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentNotificationBanner.d.ts +10 -0
- package/dist/components/agent/AgentNotificationBanner.d.ts.map +1 -0
- package/dist/components/agent/AgentNotificationBanner.js +28 -0
- package/dist/components/agent/AgentNotificationBanner.js.map +1 -0
- package/dist/components/agent/AgentOnboarding.d.ts +16 -2
- package/dist/components/agent/AgentOnboarding.d.ts.map +1 -1
- package/dist/components/agent/AgentOnboarding.js +93 -201
- package/dist/components/agent/AgentOnboarding.js.map +1 -1
- package/dist/components/agent/AgentView.d.ts.map +1 -1
- package/dist/components/agent/AgentView.js +533 -308
- package/dist/components/agent/AgentView.js.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.d.ts +3 -1
- package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkbenchPanel.js +3 -2
- package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts +4 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -1
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js +23 -195
- package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -1
- package/dist/components/agent/AgentsWorkspaceView.d.ts +12 -0
- package/dist/components/agent/AgentsWorkspaceView.d.ts.map +1 -0
- package/dist/components/agent/AgentsWorkspaceView.js +129 -0
- package/dist/components/agent/AgentsWorkspaceView.js.map +1 -0
- package/dist/components/agent/DevelopmentCoordinationPanel.d.ts +7 -0
- package/dist/components/agent/DevelopmentCoordinationPanel.d.ts.map +1 -1
- package/dist/components/agent/DevelopmentCoordinationPanel.js +57 -49
- package/dist/components/agent/DevelopmentCoordinationPanel.js.map +1 -1
- package/dist/components/agent/KnowledgePanel.d.ts.map +1 -1
- package/dist/components/agent/KnowledgePanel.js +17 -67
- package/dist/components/agent/KnowledgePanel.js.map +1 -1
- package/dist/components/agent/LiveConversationCollaboration.d.ts +27 -0
- package/dist/components/agent/LiveConversationCollaboration.d.ts.map +1 -0
- package/dist/components/agent/LiveConversationCollaboration.js +127 -0
- package/dist/components/agent/LiveConversationCollaboration.js.map +1 -0
- package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts.map +1 -1
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js +1 -1
- package/dist/components/agent/MonacoDiffWorkbenchEditor.js.map +1 -1
- package/dist/components/agent/MonacoWorkbenchEditor.d.ts.map +1 -1
- package/dist/components/agent/MonacoWorkbenchEditor.js +3 -3
- package/dist/components/agent/MonacoWorkbenchEditor.js.map +1 -1
- package/dist/components/agent/OwnedBrowserController.d.ts +55 -0
- package/dist/components/agent/OwnedBrowserController.d.ts.map +1 -0
- package/dist/components/agent/OwnedBrowserController.js +166 -0
- package/dist/components/agent/OwnedBrowserController.js.map +1 -0
- package/dist/components/agent/OwnedWorkforceView.d.ts +10 -0
- package/dist/components/agent/OwnedWorkforceView.d.ts.map +1 -0
- package/dist/components/agent/OwnedWorkforceView.js +256 -0
- package/dist/components/agent/OwnedWorkforceView.js.map +1 -0
- package/dist/components/agent/PluginManager.d.ts +34 -0
- package/dist/components/agent/PluginManager.d.ts.map +1 -1
- package/dist/components/agent/PluginManager.js +187 -126
- package/dist/components/agent/PluginManager.js.map +1 -1
- package/dist/components/agent/ProjectsWorkspaceView.d.ts +14 -0
- package/dist/components/agent/ProjectsWorkspaceView.d.ts.map +1 -0
- package/dist/components/agent/ProjectsWorkspaceView.js +176 -0
- package/dist/components/agent/ProjectsWorkspaceView.js.map +1 -0
- package/dist/components/agent/RunReviewPanel.d.ts +8 -13
- package/dist/components/agent/RunReviewPanel.d.ts.map +1 -1
- package/dist/components/agent/RunReviewPanel.js +120 -106
- package/dist/components/agent/RunReviewPanel.js.map +1 -1
- package/dist/components/agent/ScheduledWorkspaceView.d.ts +19 -0
- package/dist/components/agent/ScheduledWorkspaceView.d.ts.map +1 -0
- package/dist/components/agent/ScheduledWorkspaceView.js +150 -0
- package/dist/components/agent/ScheduledWorkspaceView.js.map +1 -0
- package/dist/components/agent/SdkSessionPanel.d.ts +25 -0
- package/dist/components/agent/SdkSessionPanel.d.ts.map +1 -0
- package/dist/components/agent/SdkSessionPanel.js +15 -0
- package/dist/components/agent/SdkSessionPanel.js.map +1 -0
- package/dist/components/agent/SlashCommandAutocomplete.d.ts +12 -0
- package/dist/components/agent/SlashCommandAutocomplete.d.ts.map +1 -0
- package/dist/components/agent/SlashCommandAutocomplete.js +33 -0
- package/dist/components/agent/SlashCommandAutocomplete.js.map +1 -0
- package/dist/components/agent/TeamsWorkspaceView.d.ts +12 -0
- package/dist/components/agent/TeamsWorkspaceView.d.ts.map +1 -0
- package/dist/components/agent/TeamsWorkspaceView.js +127 -0
- package/dist/components/agent/TeamsWorkspaceView.js.map +1 -0
- package/dist/components/agent/WorkspacePersistenceNotice.d.ts +3 -0
- package/dist/components/agent/WorkspacePersistenceNotice.d.ts.map +1 -0
- package/dist/components/agent/WorkspacePersistenceNotice.js +23 -0
- package/dist/components/agent/WorkspacePersistenceNotice.js.map +1 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.d.ts +1 -0
- package/dist/components/agent/acp/AcpAgentConfigForm.d.ts.map +1 -1
- package/dist/components/agent/acp/AcpAgentConfigForm.js +47 -14
- package/dist/components/agent/acp/AcpAgentConfigForm.js.map +1 -1
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js +1 -1
- package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpAgentManager.d.ts.map +1 -1
- package/dist/components/agent/acp/AcpAgentManager.js +18 -18
- package/dist/components/agent/acp/AcpAgentManager.js.map +1 -1
- package/dist/components/agent/acp/AcpAgentTestResultPanel.js +1 -1
- package/dist/components/agent/acp/AcpAgentTestResultPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpApprovalPanel.js +2 -2
- package/dist/components/agent/acp/AcpApprovalPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpCertificationPanel.js +1 -1
- package/dist/components/agent/acp/AcpCertificationPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js +1 -1
- package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpProviderManagerPanel.js +1 -1
- package/dist/components/agent/acp/AcpProviderManagerPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpProviderModelsPanel.js +1 -1
- package/dist/components/agent/acp/AcpProviderModelsPanel.js.map +1 -1
- package/dist/components/agent/acp/AcpSupportBundlePanel.js +1 -1
- package/dist/components/agent/acp/AcpSupportBundlePanel.js.map +1 -1
- package/dist/components/agent/collaborationWindow.d.ts +11 -0
- package/dist/components/agent/collaborationWindow.d.ts.map +1 -0
- package/dist/components/agent/collaborationWindow.js +10 -0
- package/dist/components/agent/collaborationWindow.js.map +1 -0
- package/dist/components/agent/conversationCollaborationAppendJournal.d.ts +25 -0
- package/dist/components/agent/conversationCollaborationAppendJournal.d.ts.map +1 -0
- package/dist/components/agent/conversationCollaborationAppendJournal.js +118 -0
- package/dist/components/agent/conversationCollaborationAppendJournal.js.map +1 -0
- package/dist/components/agent/conversationCollaborationController.d.ts +96 -0
- package/dist/components/agent/conversationCollaborationController.d.ts.map +1 -0
- package/dist/components/agent/conversationCollaborationController.js +597 -0
- package/dist/components/agent/conversationCollaborationController.js.map +1 -0
- package/dist/components/agent/destructiveConfirmation.d.ts +76 -0
- package/dist/components/agent/destructiveConfirmation.d.ts.map +1 -0
- package/dist/components/agent/destructiveConfirmation.js +231 -0
- package/dist/components/agent/destructiveConfirmation.js.map +1 -0
- package/dist/components/agent/developmentCoordinationController.d.ts +43 -0
- package/dist/components/agent/developmentCoordinationController.d.ts.map +1 -0
- package/dist/components/agent/developmentCoordinationController.js +94 -0
- package/dist/components/agent/developmentCoordinationController.js.map +1 -0
- package/dist/components/agent/developmentCoordinationProjection.d.ts +24 -0
- package/dist/components/agent/developmentCoordinationProjection.d.ts.map +1 -1
- package/dist/components/agent/developmentCoordinationProjection.js +34 -5
- package/dist/components/agent/developmentCoordinationProjection.js.map +1 -1
- package/dist/components/agent/editorOperationAuthority.d.ts +29 -0
- package/dist/components/agent/editorOperationAuthority.d.ts.map +1 -0
- package/dist/components/agent/editorOperationAuthority.js +73 -0
- package/dist/components/agent/editorOperationAuthority.js.map +1 -0
- package/dist/components/agent/knowledgePagination.d.ts +7 -0
- package/dist/components/agent/knowledgePagination.d.ts.map +1 -0
- package/dist/components/agent/knowledgePagination.js +7 -0
- package/dist/components/agent/knowledgePagination.js.map +1 -0
- package/dist/components/agent/knowledgePanelController.d.ts +32 -0
- package/dist/components/agent/knowledgePanelController.d.ts.map +1 -0
- package/dist/components/agent/knowledgePanelController.js +119 -0
- package/dist/components/agent/knowledgePanelController.js.map +1 -0
- package/dist/components/agent/monacoWorkbenchShared.js +1 -1
- package/dist/components/agent/onboardingModels.d.ts +31 -0
- package/dist/components/agent/onboardingModels.d.ts.map +1 -0
- package/dist/components/agent/onboardingModels.js +107 -0
- package/dist/components/agent/onboardingModels.js.map +1 -0
- package/dist/components/agent/personalConversationScope.d.ts +26 -0
- package/dist/components/agent/personalConversationScope.d.ts.map +1 -0
- package/dist/components/agent/personalConversationScope.js +43 -0
- package/dist/components/agent/personalConversationScope.js.map +1 -0
- package/dist/components/agent/reviewRequestScope.d.ts +16 -0
- package/dist/components/agent/reviewRequestScope.d.ts.map +1 -0
- package/dist/components/agent/reviewRequestScope.js +101 -0
- package/dist/components/agent/reviewRequestScope.js.map +1 -0
- package/dist/components/agent/scheduleCreationAttempt.d.ts +12 -0
- package/dist/components/agent/scheduleCreationAttempt.d.ts.map +1 -0
- package/dist/components/agent/scheduleCreationAttempt.js +30 -0
- package/dist/components/agent/scheduleCreationAttempt.js.map +1 -0
- package/dist/components/agent/settings/EntitySettingsLayout.d.ts +1 -1
- package/dist/components/agent/settings/EntitySettingsLayout.d.ts.map +1 -1
- package/dist/components/agent/settings/EntitySettingsLayout.js +64 -44
- package/dist/components/agent/settings/EntitySettingsLayout.js.map +1 -1
- package/dist/components/agent/settings/SettingsNavigation.d.ts.map +1 -1
- package/dist/components/agent/settings/SettingsNavigation.js +17 -17
- package/dist/components/agent/settings/SettingsNavigation.js.map +1 -1
- package/dist/components/agent/settings/entityArchiveState.d.ts +24 -0
- package/dist/components/agent/settings/entityArchiveState.d.ts.map +1 -0
- package/dist/components/agent/settings/entityArchiveState.js +12 -0
- package/dist/components/agent/settings/entityArchiveState.js.map +1 -0
- package/dist/components/agent/settings/sections/AccessMembersSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/AccessMembersSection.js +10 -25
- package/dist/components/agent/settings/sections/AccessMembersSection.js.map +1 -1
- package/dist/components/agent/settings/sections/AccountWorkspacePanel.d.ts +16 -0
- package/dist/components/agent/settings/sections/AccountWorkspacePanel.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/AccountWorkspacePanel.js +265 -0
- package/dist/components/agent/settings/sections/AccountWorkspacePanel.js.map +1 -0
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js +47 -32
- package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js.map +1 -1
- package/dist/components/agent/settings/sections/DangerZoneSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/DangerZoneSection.js +30 -6
- package/dist/components/agent/settings/sections/DangerZoneSection.js.map +1 -1
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js +47 -37
- package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js.map +1 -1
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js +30 -43
- package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/ExportBackupSection.d.ts +3 -1
- package/dist/components/agent/settings/sections/ExportBackupSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/ExportBackupSection.js +14 -12
- package/dist/components/agent/settings/sections/ExportBackupSection.js.map +1 -1
- package/dist/components/agent/settings/sections/GeneralSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/GeneralSection.js +47 -4
- package/dist/components/agent/settings/sections/GeneralSection.js.map +1 -1
- package/dist/components/agent/settings/sections/IntegrationsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/IntegrationsSection.js +14 -21
- package/dist/components/agent/settings/sections/IntegrationsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/NotificationsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/NotificationsSection.js +125 -20
- package/dist/components/agent/settings/sections/NotificationsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/ResourceLimitsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/ResourceLimitsSection.js +7 -7
- package/dist/components/agent/settings/sections/ResourceLimitsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/SecurityComplianceSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/SecurityComplianceSection.js +5 -4
- package/dist/components/agent/settings/sections/SecurityComplianceSection.js.map +1 -1
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.js +2 -3
- package/dist/components/agent/settings/sections/UsageAnalyticsSection.js.map +1 -1
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.d.ts.map +1 -1
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +39 -26
- package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -1
- package/dist/components/agent/settings/sections/WorkspaceKeysPanel.d.ts +6 -0
- package/dist/components/agent/settings/sections/WorkspaceKeysPanel.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/WorkspaceKeysPanel.js +205 -0
- package/dist/components/agent/settings/sections/WorkspaceKeysPanel.js.map +1 -0
- package/dist/components/agent/settings/sections/environmentDraftAction.d.ts +3 -0
- package/dist/components/agent/settings/sections/environmentDraftAction.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/environmentDraftAction.js +6 -0
- package/dist/components/agent/settings/sections/environmentDraftAction.js.map +1 -0
- package/dist/components/agent/settings/sections/membershipOperationProjection.d.ts +3 -0
- package/dist/components/agent/settings/sections/membershipOperationProjection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/membershipOperationProjection.js +9 -0
- package/dist/components/agent/settings/sections/membershipOperationProjection.js.map +1 -0
- package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.d.ts +6 -0
- package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.d.ts.map +1 -0
- package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.js +8 -0
- package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.js.map +1 -0
- package/dist/components/agent/settings/shared/InAppConfirmationDialog.d.ts +25 -0
- package/dist/components/agent/settings/shared/InAppConfirmationDialog.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/InAppConfirmationDialog.js +89 -0
- package/dist/components/agent/settings/shared/InAppConfirmationDialog.js.map +1 -0
- package/dist/components/agent/settings/shared/InputField.d.ts +1 -1
- package/dist/components/agent/settings/shared/InputField.d.ts.map +1 -1
- package/dist/components/agent/settings/shared/InputField.js +4 -3
- package/dist/components/agent/settings/shared/InputField.js.map +1 -1
- package/dist/components/agent/settings/shared/MembersTable.d.ts +3 -3
- package/dist/components/agent/settings/shared/MembersTable.d.ts.map +1 -1
- package/dist/components/agent/settings/shared/MembersTable.js +1 -1
- package/dist/components/agent/settings/shared/MembersTable.js.map +1 -1
- package/dist/components/agent/settings/shared/ScopedAuditPanel.d.ts +5 -0
- package/dist/components/agent/settings/shared/ScopedAuditPanel.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/ScopedAuditPanel.js +70 -0
- package/dist/components/agent/settings/shared/ScopedAuditPanel.js.map +1 -0
- package/dist/components/agent/settings/shared/SettingsCard.d.ts +2 -1
- package/dist/components/agent/settings/shared/SettingsCard.d.ts.map +1 -1
- package/dist/components/agent/settings/shared/SettingsCard.js +2 -2
- package/dist/components/agent/settings/shared/SettingsCard.js.map +1 -1
- package/dist/components/agent/settings/shared/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/agent/settings/shared/ToggleSwitch.js +1 -1
- package/dist/components/agent/settings/shared/ToggleSwitch.js.map +1 -1
- package/dist/components/agent/settings/shared/UsageChart.d.ts +10 -0
- package/dist/components/agent/settings/shared/UsageChart.d.ts.map +1 -1
- package/dist/components/agent/settings/shared/UsageChart.js +16 -10
- package/dist/components/agent/settings/shared/UsageChart.js.map +1 -1
- package/dist/components/agent/settings/shared/WorkspaceRulesControl.d.ts +8 -0
- package/dist/components/agent/settings/shared/WorkspaceRulesControl.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/WorkspaceRulesControl.js +26 -0
- package/dist/components/agent/settings/shared/WorkspaceRulesControl.js.map +1 -0
- package/dist/components/agent/settings/shared/useScopedConfirmation.d.ts +8 -0
- package/dist/components/agent/settings/shared/useScopedConfirmation.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/useScopedConfirmation.js +53 -0
- package/dist/components/agent/settings/shared/useScopedConfirmation.js.map +1 -0
- package/dist/components/agent/settings/shared/useSettingsConfirmation.d.ts +8 -0
- package/dist/components/agent/settings/shared/useSettingsConfirmation.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/useSettingsConfirmation.js +51 -0
- package/dist/components/agent/settings/shared/useSettingsConfirmation.js.map +1 -0
- package/dist/components/agent/settings/shared/workspaceRulesController.d.ts +28 -0
- package/dist/components/agent/settings/shared/workspaceRulesController.d.ts.map +1 -0
- package/dist/components/agent/settings/shared/workspaceRulesController.js +82 -0
- package/dist/components/agent/settings/shared/workspaceRulesController.js.map +1 -0
- package/dist/components/agent/sidebarEntityPins.d.ts +11 -0
- package/dist/components/agent/sidebarEntityPins.d.ts.map +1 -0
- package/dist/components/agent/sidebarEntityPins.js +37 -0
- package/dist/components/agent/sidebarEntityPins.js.map +1 -0
- package/dist/components/agent/workspaceHierarchy.d.ts +24 -0
- package/dist/components/agent/workspaceHierarchy.d.ts.map +1 -0
- package/dist/components/agent/workspaceHierarchy.js +50 -0
- package/dist/components/agent/workspaceHierarchy.js.map +1 -0
- package/dist/components/product/XenoAgentProductHeader.d.ts +4 -2
- package/dist/components/product/XenoAgentProductHeader.d.ts.map +1 -1
- package/dist/components/product/XenoAgentProductHeader.js +22 -4
- package/dist/components/product/XenoAgentProductHeader.js.map +1 -1
- package/dist/components/product/XenoAgentSessionTabs.js +1 -1
- package/dist/components/product/XenoAgentSessionTabs.js.map +1 -1
- package/dist/components/product/XenoAgentWorkspaceSelector.d.ts +7 -0
- package/dist/components/product/XenoAgentWorkspaceSelector.d.ts.map +1 -0
- package/dist/components/product/XenoAgentWorkspaceSelector.js +237 -0
- package/dist/components/product/XenoAgentWorkspaceSelector.js.map +1 -0
- package/dist/components/workspace/WorkspaceCreationWizard.d.ts +6 -0
- package/dist/components/workspace/WorkspaceCreationWizard.d.ts.map +1 -0
- package/dist/components/workspace/WorkspaceCreationWizard.js +48 -0
- package/dist/components/workspace/WorkspaceCreationWizard.js.map +1 -0
- package/dist/hooks/useSidebarLayoutPreference.d.ts +29 -0
- package/dist/hooks/useSidebarLayoutPreference.d.ts.map +1 -0
- package/dist/hooks/useSidebarLayoutPreference.js +83 -0
- package/dist/hooks/useSidebarLayoutPreference.js.map +1 -0
- package/dist/hooks/useWorkspaceCreation.d.ts +8 -0
- package/dist/hooks/useWorkspaceCreation.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceCreation.js +40 -0
- package/dist/hooks/useWorkspaceCreation.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/platformApiTypes.d.ts +77 -36
- package/dist/platformApiTypes.d.ts.map +1 -1
- package/dist/platformBridge.d.ts +4 -0
- package/dist/platformBridge.d.ts.map +1 -1
- package/dist/platformBridge.js +10 -0
- package/dist/platformBridge.js.map +1 -1
- package/dist/stores/agentChatStore.d.ts +120 -2
- package/dist/stores/agentChatStore.d.ts.map +1 -1
- package/dist/stores/agentChatStore.js +329 -35
- package/dist/stores/agentChatStore.js.map +1 -1
- package/dist/stores/agentCreationDefaults.d.ts +25 -0
- package/dist/stores/agentCreationDefaults.d.ts.map +1 -0
- package/dist/stores/agentCreationDefaults.js +11 -0
- package/dist/stores/agentCreationDefaults.js.map +1 -0
- package/dist/stores/entitySettingsStore.d.ts +37 -12
- package/dist/stores/entitySettingsStore.d.ts.map +1 -1
- package/dist/stores/entitySettingsStore.js +558 -585
- package/dist/stores/entitySettingsStore.js.map +1 -1
- package/dist/stores/suggestionStore.d.ts +9 -2
- package/dist/stores/suggestionStore.d.ts.map +1 -1
- package/dist/stores/suggestionStore.js +51 -24
- package/dist/stores/suggestionStore.js.map +1 -1
- package/dist/stores/workspaceCreationAttempt.d.ts +14 -0
- package/dist/stores/workspaceCreationAttempt.d.ts.map +1 -0
- package/dist/stores/workspaceCreationAttempt.js +35 -0
- package/dist/stores/workspaceCreationAttempt.js.map +1 -0
- package/dist/stores/workspaceReconciliation.d.ts +6 -0
- package/dist/stores/workspaceReconciliation.d.ts.map +1 -0
- package/dist/stores/workspaceReconciliation.js +33 -0
- package/dist/stores/workspaceReconciliation.js.map +1 -0
- package/dist/stores/workspaceStore.d.ts +44 -9
- package/dist/stores/workspaceStore.d.ts.map +1 -1
- package/dist/stores/workspaceStore.js +238 -99
- package/dist/stores/workspaceStore.js.map +1 -1
- package/dist/types/agentEditor.d.ts +1 -0
- package/dist/types/agentEditor.d.ts.map +1 -1
- package/dist/utils/advertisedReasoning.d.ts +25 -0
- package/dist/utils/advertisedReasoning.d.ts.map +1 -0
- package/dist/utils/advertisedReasoning.js +62 -0
- package/dist/utils/advertisedReasoning.js.map +1 -0
- package/dist/utils/clipboardCopy.d.ts +4 -0
- package/dist/utils/clipboardCopy.d.ts.map +1 -0
- package/dist/utils/clipboardCopy.js +27 -0
- package/dist/utils/clipboardCopy.js.map +1 -0
- package/dist/utils/providerCommandArgs.d.ts +11 -0
- package/dist/utils/providerCommandArgs.d.ts.map +1 -0
- package/dist/utils/providerCommandArgs.js +18 -0
- package/dist/utils/providerCommandArgs.js.map +1 -0
- package/dist/utils/rendererTeardown.d.ts +6 -0
- package/dist/utils/rendererTeardown.d.ts.map +1 -0
- package/dist/utils/rendererTeardown.js +18 -0
- package/dist/utils/rendererTeardown.js.map +1 -0
- package/package.json +20 -8
- package/src/agent.css +39 -9
|
@@ -393,6 +393,102 @@ export function findOldestQueuedTurn(conversations) {
|
|
|
393
393
|
}
|
|
394
394
|
return oldest;
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* 🔴 THE CONCURRENCY CEILING, and it is not optional.
|
|
398
|
+
*
|
|
399
|
+
* The global turn lock this file used to hold was accidentally also a RESOURCE ceiling:
|
|
400
|
+
* exactly one provider process could run at a time. Making turns per-conversation without
|
|
401
|
+
* replacing that ceiling would let a user with fifteen conversations spawn fifteen agent
|
|
402
|
+
* child processes, each with a real model bill — a worse bug than the one being fixed, and
|
|
403
|
+
* one a two-conversation test would never show.
|
|
404
|
+
*
|
|
405
|
+
* So the model is: **one turn per conversation, N turns overall.** Anything beyond N queues
|
|
406
|
+
* exactly as it does today, which is why the queue machinery is preserved rather than
|
|
407
|
+
* deleted — it becomes the ceiling's overflow path.
|
|
408
|
+
*
|
|
409
|
+
* N is a resource decision, not a correctness one. Three is chosen to be plainly more than
|
|
410
|
+
* one (the reported bug) and plainly less than "unbounded"; raise it deliberately, with the
|
|
411
|
+
* cost of a concurrent provider process in mind.
|
|
412
|
+
*/
|
|
413
|
+
export const MAX_CONCURRENT_TURNS = 3;
|
|
414
|
+
/** The requestId currently running IN this conversation, or null. */
|
|
415
|
+
export function conversationActiveRequestId(activeTurnsByConversation, conversationId) {
|
|
416
|
+
return activeTurnsByConversation[conversationId] ?? null;
|
|
417
|
+
}
|
|
418
|
+
export function activeTurnCount(activeTurnsByConversation) {
|
|
419
|
+
return Object.keys(activeTurnsByConversation).length;
|
|
420
|
+
}
|
|
421
|
+
export function decideTurnAdmission(conversations, activeTurnsByConversation, conversationId, maxConcurrentTurns = MAX_CONCURRENT_TURNS) {
|
|
422
|
+
if (conversationActiveRequestId(activeTurnsByConversation, conversationId)) {
|
|
423
|
+
return { admit: false, reason: 'conversation_busy' };
|
|
424
|
+
}
|
|
425
|
+
if ((conversations[conversationId]?.pendingTurns?.length ?? 0) > 0) {
|
|
426
|
+
return { admit: false, reason: 'conversation_queued' };
|
|
427
|
+
}
|
|
428
|
+
if (activeTurnCount(activeTurnsByConversation) >= maxConcurrentTurns) {
|
|
429
|
+
return { admit: false, reason: 'ceiling' };
|
|
430
|
+
}
|
|
431
|
+
return { admit: true };
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* The oldest queued turn in a conversation that could actually run right now.
|
|
435
|
+
*
|
|
436
|
+
* The old drain took the globally oldest queued turn and ran it only when NOTHING was
|
|
437
|
+
* active. With per-conversation turns that starves every other conversation behind one
|
|
438
|
+
* long-running turn, so the candidate set is filtered by the same admission rule.
|
|
439
|
+
*/
|
|
440
|
+
/**
|
|
441
|
+
* 🔴 COMPLETION MATCHING, and this is the function the whole design rests on.
|
|
442
|
+
*
|
|
443
|
+
* It releases the slot held BY THIS requestId, wherever it is — never "the current slot".
|
|
444
|
+
* That distinction is the entire bug the global field had: with one scalar, completing the
|
|
445
|
+
* SECOND turn freed the lock while the FIRST was still streaming, and the first completing
|
|
446
|
+
* later matched nothing and freed nothing. Keyed by requestId, a late or out-of-order
|
|
447
|
+
* terminal event can only ever free its own turn, and a stale one frees nothing.
|
|
448
|
+
*
|
|
449
|
+
* Returns the SAME object when there is nothing to release, so an unrelated terminal event
|
|
450
|
+
* cannot invalidate referential equality and churn every subscriber.
|
|
451
|
+
*/
|
|
452
|
+
export function releaseTurnSlot(activeTurnsByConversation, requestId) {
|
|
453
|
+
const owner = Object.keys(activeTurnsByConversation)
|
|
454
|
+
.find((conversationId) => activeTurnsByConversation[conversationId] === requestId);
|
|
455
|
+
if (!owner)
|
|
456
|
+
return activeTurnsByConversation;
|
|
457
|
+
const next = { ...activeTurnsByConversation };
|
|
458
|
+
delete next[owner];
|
|
459
|
+
return next;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Release whatever slot a conversation holds, because the conversation itself is going away.
|
|
463
|
+
*
|
|
464
|
+
* ⚠️ Without this, deleting a conversation mid-turn leaks its slot FOREVER: the map entry
|
|
465
|
+
* survives, no terminal event can ever arrive for a conversation that no longer exists, and
|
|
466
|
+
* the ceiling silently tightens by one every time it happens until nothing may start at all.
|
|
467
|
+
* The old global lock had no equivalent failure because it was cleared by conversation
|
|
468
|
+
* identity on the same path.
|
|
469
|
+
*/
|
|
470
|
+
export function releaseConversationSlot(activeTurnsByConversation, conversationId) {
|
|
471
|
+
if (!(conversationId in activeTurnsByConversation))
|
|
472
|
+
return activeTurnsByConversation;
|
|
473
|
+
const next = { ...activeTurnsByConversation };
|
|
474
|
+
delete next[conversationId];
|
|
475
|
+
return next;
|
|
476
|
+
}
|
|
477
|
+
export function findOldestAdmissibleQueuedTurn(conversations, activeTurnsByConversation, maxConcurrentTurns = MAX_CONCURRENT_TURNS) {
|
|
478
|
+
if (activeTurnCount(activeTurnsByConversation) >= maxConcurrentTurns)
|
|
479
|
+
return null;
|
|
480
|
+
let oldest = null;
|
|
481
|
+
for (const [conversationId, conversation] of Object.entries(conversations)) {
|
|
482
|
+
// A conversation with a live turn waits; its own queue drains in order behind it.
|
|
483
|
+
if (conversationActiveRequestId(activeTurnsByConversation, conversationId))
|
|
484
|
+
continue;
|
|
485
|
+
for (const turn of conversation.pendingTurns || []) {
|
|
486
|
+
if (!oldest || turn.queuedAt < oldest.turn.queuedAt)
|
|
487
|
+
oldest = { conversationId, turn };
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return oldest;
|
|
491
|
+
}
|
|
396
492
|
function generateTitle(content) {
|
|
397
493
|
const clean = content.replace(/\n/g, ' ').slice(0, 30);
|
|
398
494
|
return clean.length < content.length ? `${clean}...` : clean;
|
|
@@ -1618,6 +1714,7 @@ function reconcileRuntimeToolEvent(messages, requestId, event) {
|
|
|
1618
1714
|
const isToolTerminal = event.type === 'tool.completed'
|
|
1619
1715
|
|| event.type === 'acp.tool.completed'
|
|
1620
1716
|
|| event.type === 'acp.tool.failed';
|
|
1717
|
+
const hasToolOutputUpdate = event.type === 'acp.tool.updated' && event.rawOutput !== undefined;
|
|
1621
1718
|
// ACP `tool_call_update` notifications are allowed to carry only the
|
|
1622
1719
|
// stable toolCallId and terminal status. The started event already owns the
|
|
1623
1720
|
// human title. Requiring the title again here leaves the real card running,
|
|
@@ -1626,7 +1723,7 @@ function reconcileRuntimeToolEvent(messages, requestId, event) {
|
|
|
1626
1723
|
// shape a progress-only update takes. Requiring a title here dropped every such
|
|
1627
1724
|
// frame, so an in-flight job reported by a well-behaved agent was invisible for
|
|
1628
1725
|
// the same reason a completion without a title used to close the wrong card.
|
|
1629
|
-
if (!toolName && !(toolCallId && (isToolTerminal || eventWebJobProgress)))
|
|
1726
|
+
if (!toolName && !(toolCallId && (isToolTerminal || eventWebJobProgress || hasToolOutputUpdate)))
|
|
1630
1727
|
return messages;
|
|
1631
1728
|
const resolvedToolName = toolName || 'ACP Tool';
|
|
1632
1729
|
if (event.type === 'tool.started' || event.type === 'acp.tool.started') {
|
|
@@ -1672,7 +1769,7 @@ function reconcileRuntimeToolEvent(messages, requestId, event) {
|
|
|
1672
1769
|
// tool call is touched here: status, result and outcome stay exactly where the
|
|
1673
1770
|
// started and terminal branches put them, so a tool with no progress behaves as
|
|
1674
1771
|
// it did before this branch existed.
|
|
1675
|
-
if (!isToolTerminal && eventWebJobProgress) {
|
|
1772
|
+
if (!isToolTerminal && (eventWebJobProgress || hasToolOutputUpdate)) {
|
|
1676
1773
|
return messages.map((message) => {
|
|
1677
1774
|
if (message.id !== requestId)
|
|
1678
1775
|
return message;
|
|
@@ -1683,9 +1780,13 @@ function reconcileRuntimeToolEvent(messages, requestId, event) {
|
|
|
1683
1780
|
: reversed.find((toolCall) => (normalizeToolName(toolCall.toolName) === normalizeToolName(resolvedToolName) && toolCall.status === 'running'));
|
|
1684
1781
|
if (!target)
|
|
1685
1782
|
return message;
|
|
1783
|
+
// A delayed progress frame cannot reopen or overwrite a completed tool.
|
|
1784
|
+
if (target.status !== 'running')
|
|
1785
|
+
return message;
|
|
1686
1786
|
const merged = normalizeToolCall({
|
|
1687
1787
|
...target,
|
|
1688
|
-
webJobProgress: eventWebJobProgress,
|
|
1788
|
+
...(eventWebJobProgress ? { webJobProgress: eventWebJobProgress } : {}),
|
|
1789
|
+
...(hasToolOutputUpdate ? { result: getRuntimeEventOutput(event) } : {}),
|
|
1689
1790
|
}, target);
|
|
1690
1791
|
return {
|
|
1691
1792
|
...message,
|
|
@@ -2710,8 +2811,12 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
2710
2811
|
let queueDrainMicrotaskScheduled = false;
|
|
2711
2812
|
const runQueueDrain = () => {
|
|
2712
2813
|
const state = get();
|
|
2713
|
-
|
|
2714
|
-
|
|
2814
|
+
/* Retry while work exists that cannot run YET — a conversation still busy, or the ceiling
|
|
2815
|
+
* full. The old test was "is anything active at all", which parked the queue behind any
|
|
2816
|
+
* single turn anywhere; this parks it only behind the thing actually blocking it. */
|
|
2817
|
+
if (!findOldestAdmissibleQueuedTurn(state.conversations, state.activeTurnsByConversation)) {
|
|
2818
|
+
if (findOldestQueuedTurn(state.conversations))
|
|
2819
|
+
scheduleQueueDrain(250);
|
|
2715
2820
|
return;
|
|
2716
2821
|
}
|
|
2717
2822
|
get().resumeQueuedTurns();
|
|
@@ -3195,6 +3300,8 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3195
3300
|
...state.conversations,
|
|
3196
3301
|
[conversationId]: updated
|
|
3197
3302
|
},
|
|
3303
|
+
// The map is the authority; the two scalars below stay as the FOREGROUND turn.
|
|
3304
|
+
activeTurnsByConversation: { ...state.activeTurnsByConversation, [conversationId]: requestId },
|
|
3198
3305
|
activeRequestId: requestId,
|
|
3199
3306
|
activeConversationId: conversationId
|
|
3200
3307
|
};
|
|
@@ -3333,6 +3440,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3333
3440
|
execution: acpExecution,
|
|
3334
3441
|
contextCompaction: compactedContext.stats,
|
|
3335
3442
|
providerModel: options?.acpProviderModel,
|
|
3443
|
+
reasoningOptionId: runtime.reasoning.optionId,
|
|
3336
3444
|
...(resumableAcpBinding
|
|
3337
3445
|
? {
|
|
3338
3446
|
resumeSessionId: conv?.sessionUi?.acpSessionId,
|
|
@@ -3399,6 +3507,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3399
3507
|
requestId,
|
|
3400
3508
|
conversationId,
|
|
3401
3509
|
providerKind: 'xeno-cloud',
|
|
3510
|
+
reasoningOptionId: runtime.reasoning.optionId,
|
|
3402
3511
|
mode: agentRunMode,
|
|
3403
3512
|
workspaceId: conv?.workspaceId,
|
|
3404
3513
|
teamId: conv?.teamId,
|
|
@@ -3463,6 +3572,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3463
3572
|
requestId,
|
|
3464
3573
|
conversationId,
|
|
3465
3574
|
sdkSessionId: conv?.sessionUi?.sdkSessionId,
|
|
3575
|
+
reasoningOptionId: runtime.reasoning.optionId,
|
|
3466
3576
|
subagentRunId,
|
|
3467
3577
|
workspaceId: conv?.workspaceId,
|
|
3468
3578
|
teamId: conv?.teamId,
|
|
@@ -3526,6 +3636,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3526
3636
|
if (!conversationId) {
|
|
3527
3637
|
return {
|
|
3528
3638
|
...state,
|
|
3639
|
+
activeTurnsByConversation: releaseTurnSlot(state.activeTurnsByConversation, requestId),
|
|
3529
3640
|
activeRequestId: state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
3530
3641
|
activeConversationId: state.activeRequestId === requestId ? null : state.activeConversationId
|
|
3531
3642
|
};
|
|
@@ -3549,6 +3660,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3549
3660
|
...state.conversations,
|
|
3550
3661
|
[conversationId]: updated
|
|
3551
3662
|
},
|
|
3663
|
+
activeTurnsByConversation: releaseTurnSlot(state.activeTurnsByConversation, requestId),
|
|
3552
3664
|
activeRequestId: state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
3553
3665
|
activeConversationId: state.activeRequestId === requestId ? null : state.activeConversationId
|
|
3554
3666
|
};
|
|
@@ -3625,6 +3737,8 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3625
3737
|
...state.conversations,
|
|
3626
3738
|
[conversationId]: updated
|
|
3627
3739
|
},
|
|
3740
|
+
// The map is the authority; the two scalars below stay as the FOREGROUND turn.
|
|
3741
|
+
activeTurnsByConversation: { ...state.activeTurnsByConversation, [conversationId]: requestId },
|
|
3628
3742
|
activeRequestId: requestId,
|
|
3629
3743
|
activeConversationId: conversationId
|
|
3630
3744
|
};
|
|
@@ -3701,6 +3815,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3701
3815
|
];
|
|
3702
3816
|
try {
|
|
3703
3817
|
const existingFileResult = await getAgentPlatformBridge().workspace.readFile({
|
|
3818
|
+
conversationId,
|
|
3704
3819
|
path: targetPath,
|
|
3705
3820
|
allowedDirs: allowedDirectoriesForWrite
|
|
3706
3821
|
});
|
|
@@ -3755,6 +3870,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3755
3870
|
});
|
|
3756
3871
|
}
|
|
3757
3872
|
const writeResult = await getAgentPlatformBridge().workspace.writeFile({
|
|
3873
|
+
conversationId,
|
|
3758
3874
|
path: targetPath,
|
|
3759
3875
|
content: fileCreate.content,
|
|
3760
3876
|
allowedDirs: allowedDirectoriesForWrite
|
|
@@ -3815,11 +3931,70 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
3815
3931
|
};
|
|
3816
3932
|
return {
|
|
3817
3933
|
conversations: {},
|
|
3934
|
+
activeTurnsByConversation: {},
|
|
3818
3935
|
activeRequestId: null,
|
|
3819
3936
|
activeConversationId: null,
|
|
3820
3937
|
cloudRunEnabled: false,
|
|
3821
3938
|
cloudRuns: {},
|
|
3939
|
+
activeNotifications: {},
|
|
3940
|
+
availableCommands: {},
|
|
3941
|
+
mcpStatuses: {},
|
|
3822
3942
|
setCloudRunEnabled: (enabled) => set({ cloudRunEnabled: enabled }),
|
|
3943
|
+
dismissNotification: (conversationId, notificationIdOrKey) => {
|
|
3944
|
+
set((state) => {
|
|
3945
|
+
const convNotifs = { ...(state.activeNotifications[conversationId] || {}) };
|
|
3946
|
+
let matchedKey = notificationIdOrKey;
|
|
3947
|
+
if (convNotifs[notificationIdOrKey]) {
|
|
3948
|
+
delete convNotifs[notificationIdOrKey];
|
|
3949
|
+
}
|
|
3950
|
+
for (const [k, notif] of Object.entries(convNotifs)) {
|
|
3951
|
+
if (notif.id === notificationIdOrKey || notif.deduplicationKey === notificationIdOrKey) {
|
|
3952
|
+
matchedKey = notif.deduplicationKey || notif.id;
|
|
3953
|
+
delete convNotifs[k];
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
const conv = state.conversations[conversationId];
|
|
3957
|
+
if (conv) {
|
|
3958
|
+
const dismissedKeys = Array.from(new Set([...(conv.dismissedNotificationKeys || []), matchedKey, notificationIdOrKey]));
|
|
3959
|
+
const updatedConv = {
|
|
3960
|
+
...conv,
|
|
3961
|
+
activeNotifications: convNotifs,
|
|
3962
|
+
dismissedNotificationKeys: dismissedKeys,
|
|
3963
|
+
};
|
|
3964
|
+
persistConversation(updatedConv);
|
|
3965
|
+
return {
|
|
3966
|
+
activeNotifications: {
|
|
3967
|
+
...state.activeNotifications,
|
|
3968
|
+
[conversationId]: convNotifs,
|
|
3969
|
+
},
|
|
3970
|
+
conversations: {
|
|
3971
|
+
...state.conversations,
|
|
3972
|
+
[conversationId]: updatedConv,
|
|
3973
|
+
},
|
|
3974
|
+
};
|
|
3975
|
+
}
|
|
3976
|
+
return {
|
|
3977
|
+
activeNotifications: {
|
|
3978
|
+
...state.activeNotifications,
|
|
3979
|
+
[conversationId]: convNotifs,
|
|
3980
|
+
},
|
|
3981
|
+
};
|
|
3982
|
+
});
|
|
3983
|
+
},
|
|
3984
|
+
clearNotifications: (conversationId) => {
|
|
3985
|
+
set((state) => {
|
|
3986
|
+
const { [conversationId]: _, ...rest } = state.activeNotifications;
|
|
3987
|
+
return { activeNotifications: rest };
|
|
3988
|
+
});
|
|
3989
|
+
},
|
|
3990
|
+
setAvailableCommands: (conversationId, commands) => {
|
|
3991
|
+
set((state) => ({
|
|
3992
|
+
availableCommands: {
|
|
3993
|
+
...state.availableCommands,
|
|
3994
|
+
[conversationId]: commands,
|
|
3995
|
+
},
|
|
3996
|
+
}));
|
|
3997
|
+
},
|
|
3823
3998
|
getConversation: (conversationId) => get().conversations[conversationId],
|
|
3824
3999
|
getConversationRuntimeProjection: (conversationId) => {
|
|
3825
4000
|
const conversation = get().conversations[conversationId];
|
|
@@ -4232,6 +4407,10 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4232
4407
|
const isActive = state.activeConversationId === conversationId;
|
|
4233
4408
|
return {
|
|
4234
4409
|
conversations: next,
|
|
4410
|
+
// Keyed by the conversation, not by `isActive`: a BACKGROUND conversation being
|
|
4411
|
+
// deleted mid-turn also holds a slot, and that is precisely the case the foreground
|
|
4412
|
+
// scalars cannot see.
|
|
4413
|
+
activeTurnsByConversation: releaseConversationSlot(state.activeTurnsByConversation, conversationId),
|
|
4235
4414
|
activeConversationId: isActive ? null : state.activeConversationId,
|
|
4236
4415
|
activeRequestId: isActive ? null : state.activeRequestId
|
|
4237
4416
|
};
|
|
@@ -4262,7 +4441,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4262
4441
|
...options,
|
|
4263
4442
|
allowedDirectories: workspaceBinding.mode === 'workspace' ? workspaceBinding.allowedDirectories : [],
|
|
4264
4443
|
};
|
|
4265
|
-
if (get().
|
|
4444
|
+
if (!decideTurnAdmission(get().conversations, get().activeTurnsByConversation, conversationId).admit) {
|
|
4266
4445
|
logRendererAgentDebug('sendMessage queued', {
|
|
4267
4446
|
conversationId,
|
|
4268
4447
|
agentId,
|
|
@@ -4296,7 +4475,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4296
4475
|
acpAgentConfigId,
|
|
4297
4476
|
allowedDirectories: workspaceBinding.mode === 'workspace' ? workspaceBinding.allowedDirectories : [],
|
|
4298
4477
|
};
|
|
4299
|
-
if (get().
|
|
4478
|
+
if (!decideTurnAdmission(get().conversations, get().activeTurnsByConversation, conversationId).admit) {
|
|
4300
4479
|
logRendererAgentDebug('sendAcpMessage queued', {
|
|
4301
4480
|
conversationId,
|
|
4302
4481
|
agentId,
|
|
@@ -4327,7 +4506,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4327
4506
|
return;
|
|
4328
4507
|
}
|
|
4329
4508
|
const scopedOptions = { ...options, allowedDirectories: workspaceBinding.allowedDirectories };
|
|
4330
|
-
if (get().
|
|
4509
|
+
if (!decideTurnAdmission(get().conversations, get().activeTurnsByConversation, conversationId).admit) {
|
|
4331
4510
|
logRendererAgentDebug('sendDeterministicFileCreate queued', {
|
|
4332
4511
|
conversationId,
|
|
4333
4512
|
agentId,
|
|
@@ -4513,6 +4692,48 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4513
4692
|
},
|
|
4514
4693
|
lastMessageAt: Date.now()
|
|
4515
4694
|
};
|
|
4695
|
+
let nextActiveNotifications = state.activeNotifications;
|
|
4696
|
+
if (eventWithRequest.type === 'acp.notification' && eventWithRequest.notification) {
|
|
4697
|
+
const notif = eventWithRequest.notification;
|
|
4698
|
+
const conv = state.conversations[conversationId];
|
|
4699
|
+
const key = notif.deduplicationKey || notif.id;
|
|
4700
|
+
const isDismissed = conv?.dismissedNotificationKeys?.includes(key)
|
|
4701
|
+
|| conv?.dismissedNotificationKeys?.includes(notif.id);
|
|
4702
|
+
if (!isDismissed) {
|
|
4703
|
+
const convNotifs = { ...(state.activeNotifications[conversationId] || {}) };
|
|
4704
|
+
convNotifs[key] = notif;
|
|
4705
|
+
nextActiveNotifications = {
|
|
4706
|
+
...state.activeNotifications,
|
|
4707
|
+
[conversationId]: convNotifs,
|
|
4708
|
+
};
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
let nextAvailableCommands = state.availableCommands;
|
|
4712
|
+
if (eventWithRequest.type === 'acp.commands.update' && Array.isArray(eventWithRequest.availableCommands)) {
|
|
4713
|
+
nextAvailableCommands = {
|
|
4714
|
+
...state.availableCommands,
|
|
4715
|
+
[conversationId]: eventWithRequest.availableCommands,
|
|
4716
|
+
};
|
|
4717
|
+
}
|
|
4718
|
+
let nextMcpStatuses = state.mcpStatuses;
|
|
4719
|
+
if (eventWithRequest.type === 'acp.mcp.update' && eventWithRequest.mcpStatus) {
|
|
4720
|
+
const mcp = eventWithRequest.mcpStatus;
|
|
4721
|
+
const convMcp = { ...(state.mcpStatuses[conversationId] || {}) };
|
|
4722
|
+
convMcp[mcp.server] = mcp;
|
|
4723
|
+
nextMcpStatuses = {
|
|
4724
|
+
...state.mcpStatuses,
|
|
4725
|
+
[conversationId]: convMcp,
|
|
4726
|
+
};
|
|
4727
|
+
}
|
|
4728
|
+
if (nextActiveNotifications[conversationId]) {
|
|
4729
|
+
updated.activeNotifications = nextActiveNotifications[conversationId];
|
|
4730
|
+
}
|
|
4731
|
+
if (nextAvailableCommands[conversationId]) {
|
|
4732
|
+
updated.availableCommands = nextAvailableCommands[conversationId];
|
|
4733
|
+
}
|
|
4734
|
+
if (nextMcpStatuses[conversationId]) {
|
|
4735
|
+
updated.mcpStatuses = nextMcpStatuses[conversationId];
|
|
4736
|
+
}
|
|
4516
4737
|
if (isRuntimeTurnTerminal(eventWithRequest)) {
|
|
4517
4738
|
persistConversation(updated);
|
|
4518
4739
|
}
|
|
@@ -4524,6 +4745,17 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4524
4745
|
...state.conversations,
|
|
4525
4746
|
[conversationId]: updated
|
|
4526
4747
|
},
|
|
4748
|
+
activeNotifications: nextActiveNotifications,
|
|
4749
|
+
availableCommands: nextAvailableCommands,
|
|
4750
|
+
mcpStatuses: nextMcpStatuses,
|
|
4751
|
+
/* 🔴 Released on the requestId ALONE, deliberately not on `state.activeRequestId ===
|
|
4752
|
+
* requestId` like the two scalars below. A terminal event for a BACKGROUND turn never
|
|
4753
|
+
* matches the foreground scalar, so gating the map on it would leak that turn's slot
|
|
4754
|
+
* permanently — the exact asymmetry that makes a single global field unable to
|
|
4755
|
+
* represent two live turns. */
|
|
4756
|
+
activeTurnsByConversation: isRuntimeTurnTerminal(eventWithRequest)
|
|
4757
|
+
? releaseTurnSlot(state.activeTurnsByConversation, requestId)
|
|
4758
|
+
: state.activeTurnsByConversation,
|
|
4527
4759
|
activeRequestId: isRuntimeTurnTerminal(eventWithRequest) && state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
4528
4760
|
activeConversationId: isRuntimeTurnTerminal(eventWithRequest) && state.activeRequestId === requestId ? null : state.activeConversationId,
|
|
4529
4761
|
};
|
|
@@ -4940,6 +5172,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4940
5172
|
...state.conversations,
|
|
4941
5173
|
[conversationId]: updated
|
|
4942
5174
|
},
|
|
5175
|
+
activeTurnsByConversation: releaseTurnSlot(state.activeTurnsByConversation, requestId),
|
|
4943
5176
|
activeRequestId: state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
4944
5177
|
activeConversationId: state.activeRequestId === requestId ? null : state.activeConversationId
|
|
4945
5178
|
};
|
|
@@ -4957,11 +5190,26 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4957
5190
|
const convId = findConversationIdForRequest(get().conversations, requestId, get().activeConversationId);
|
|
4958
5191
|
set(state => {
|
|
4959
5192
|
const conversationId = findConversationIdForRequest(state.conversations, requestId, state.activeConversationId);
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
5193
|
+
const conv = conversationId ? state.conversations[conversationId] : undefined;
|
|
5194
|
+
if (!conversationId || !conv) {
|
|
5195
|
+
/* Release the turn lock even though there is nothing to render on.
|
|
5196
|
+
*
|
|
5197
|
+
* `findConversationIdForRequest` matches on a MESSAGE carrying this
|
|
5198
|
+
* requestId, so a turn that failed before its assistant placeholder
|
|
5199
|
+
* existed resolves to null -- which is precisely what a provider that
|
|
5200
|
+
* accepts a prompt and then says nothing produces. Returning `state`
|
|
5201
|
+
* here would leave `activeRequestId` held forever, and because the busy
|
|
5202
|
+
* check is global that wedges EVERY conversation, including ones that
|
|
5203
|
+
* have never run anything.
|
|
5204
|
+
*
|
|
5205
|
+
* There is no path on which "nothing happened" is a valid resting state
|
|
5206
|
+
* for a failed turn. */
|
|
5207
|
+
return {
|
|
5208
|
+
activeTurnsByConversation: releaseTurnSlot(state.activeTurnsByConversation, requestId),
|
|
5209
|
+
activeRequestId: state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
5210
|
+
activeConversationId: state.activeRequestId === requestId ? null : state.activeConversationId
|
|
5211
|
+
};
|
|
5212
|
+
}
|
|
4965
5213
|
const updated = {
|
|
4966
5214
|
...conv,
|
|
4967
5215
|
messages: conv.messages.map(m => m.id === requestId
|
|
@@ -4995,6 +5243,7 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
4995
5243
|
...state.conversations,
|
|
4996
5244
|
[conversationId]: updated
|
|
4997
5245
|
},
|
|
5246
|
+
activeTurnsByConversation: releaseTurnSlot(state.activeTurnsByConversation, requestId),
|
|
4998
5247
|
activeRequestId: state.activeRequestId === requestId ? null : state.activeRequestId,
|
|
4999
5248
|
activeConversationId: state.activeRequestId === requestId ? null : state.activeConversationId
|
|
5000
5249
|
};
|
|
@@ -5009,9 +5258,11 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
5009
5258
|
},
|
|
5010
5259
|
resumeQueuedTurns: () => {
|
|
5011
5260
|
const state = get();
|
|
5012
|
-
if (state.activeRequestId)
|
|
5013
|
-
|
|
5014
|
-
|
|
5261
|
+
/* 🔴 No `if (state.activeRequestId) return` any more. That single line was what made the
|
|
5262
|
+
* queue global: one live turn anywhere held every other conversation's queued work, even
|
|
5263
|
+
* work that could have run immediately. Admissibility is now decided per conversation,
|
|
5264
|
+
* under the ceiling, by the same rule that admits a fresh send. */
|
|
5265
|
+
const next = findOldestAdmissibleQueuedTurn(state.conversations, state.activeTurnsByConversation);
|
|
5015
5266
|
if (!next)
|
|
5016
5267
|
return;
|
|
5017
5268
|
if (next.turn.kind === 'deterministic_file_create') {
|
|
@@ -5039,8 +5290,14 @@ export const useAgentChatStore = create((set, get) => {
|
|
|
5039
5290
|
runtime: next.turn.runtime,
|
|
5040
5291
|
});
|
|
5041
5292
|
},
|
|
5042
|
-
abort: () => {
|
|
5043
|
-
|
|
5293
|
+
abort: (targetConversationId) => {
|
|
5294
|
+
/* Prefer the turn running in the NAMED conversation; fall back to the foreground turn
|
|
5295
|
+
* only when no conversation was given. Reading the global scalar unconditionally would
|
|
5296
|
+
* cancel whichever turn started most recently, which under concurrency is very often not
|
|
5297
|
+
* the one whose Stop button was pressed. */
|
|
5298
|
+
const activeRequestId = targetConversationId
|
|
5299
|
+
? conversationActiveRequestId(get().activeTurnsByConversation, targetConversationId)
|
|
5300
|
+
: get().activeRequestId;
|
|
5044
5301
|
if (!activeRequestId)
|
|
5045
5302
|
return;
|
|
5046
5303
|
const conversationId = findConversationIdForRequest(get().conversations, activeRequestId, get().activeConversationId);
|
|
@@ -5109,6 +5366,36 @@ export function setupAgentChatListeners() {
|
|
|
5109
5366
|
const hasNativeEquivalentRuntimeEvent = (requestId, event) => {
|
|
5110
5367
|
return hasRuntimeEventDedupFamily(nativeRuntimeEventFamiliesByRequest.get(requestId), event);
|
|
5111
5368
|
};
|
|
5369
|
+
/**
|
|
5370
|
+
* Terminal transition for a failed turn, reachable from EVERY error channel.
|
|
5371
|
+
*
|
|
5372
|
+
* 🔴 Finalisation is deliberately NOT behind `legacyCallbackRuntimeEventsEnabled`.
|
|
5373
|
+
* That flag decides whether a legacy runtime event is DISPLAYED; it must never
|
|
5374
|
+
* decide whether a failed turn is FINALISED. It used to: both error handlers did
|
|
5375
|
+
* nothing but call `appendCallbackRuntimeEvent`, whose first line returns early
|
|
5376
|
+
* when the flag is off -- and the flag is off unless DEV *and* a localStorage key
|
|
5377
|
+
* is set. So in every real build a failed turn released nothing, rendered nothing,
|
|
5378
|
+
* and held `activeRequestId` forever. Because the busy check is global, that one
|
|
5379
|
+
* dead turn queued every other conversation, including brand-new ones.
|
|
5380
|
+
*
|
|
5381
|
+
* The signal was never missing: the host publishes `turn.execution.abandoned` /
|
|
5382
|
+
* `.failed` (and arms the same path from its own deadlines), and
|
|
5383
|
+
* `agentHostPlatformBridge` already converts both into these error listeners.
|
|
5384
|
+
* Only this last link was broken.
|
|
5385
|
+
*
|
|
5386
|
+
* Idempotent and first-writer-wins via `nativeRuntimeTerminalRequestIds`, so a
|
|
5387
|
+
* native terminal event and a callback for the same turn cannot double-finalise.
|
|
5388
|
+
*/
|
|
5389
|
+
const finalizeFailedTurn = (requestId, error, context) => {
|
|
5390
|
+
if (nativeRuntimeTerminalRequestIds.has(requestId))
|
|
5391
|
+
return;
|
|
5392
|
+
nativeRuntimeTerminalRequestIds.add(requestId);
|
|
5393
|
+
// Display-only, and still gated exactly as before.
|
|
5394
|
+
appendCallbackRuntimeEvent(requestId, createLegacyTurnFailedRuntimeEvent({ requestId, error, context }));
|
|
5395
|
+
// Correctness: renders the error, clears streaming, releases the turn lock,
|
|
5396
|
+
// persists, and drains the queue. Never gated.
|
|
5397
|
+
useAgentChatStore.getState().setStreamError(requestId, error);
|
|
5398
|
+
};
|
|
5112
5399
|
const appendCallbackRuntimeEvent = (requestId, event) => {
|
|
5113
5400
|
if (!legacyCallbackRuntimeEventsEnabled) {
|
|
5114
5401
|
return false;
|
|
@@ -5175,14 +5462,7 @@ export function setupAgentChatListeners() {
|
|
|
5175
5462
|
}
|
|
5176
5463
|
});
|
|
5177
5464
|
getAgentPlatformBridge().llm.onChatError((data) => {
|
|
5178
|
-
|
|
5179
|
-
nativeRuntimeTerminalRequestIds.add(data.requestId);
|
|
5180
|
-
appendCallbackRuntimeEvent(data.requestId, createLegacyTurnFailedRuntimeEvent({
|
|
5181
|
-
requestId: data.requestId,
|
|
5182
|
-
error: data.error,
|
|
5183
|
-
context: 'llm',
|
|
5184
|
-
}));
|
|
5185
|
-
}
|
|
5465
|
+
finalizeFailedTurn(data.requestId, data.error, 'llm');
|
|
5186
5466
|
});
|
|
5187
5467
|
getAgentPlatformBridge().llm.onToolCall((data) => {
|
|
5188
5468
|
if (data.status === 'start') {
|
|
@@ -5399,14 +5679,7 @@ export function setupAgentChatListeners() {
|
|
|
5399
5679
|
error: displayError,
|
|
5400
5680
|
context: data.context
|
|
5401
5681
|
});
|
|
5402
|
-
|
|
5403
|
-
nativeRuntimeTerminalRequestIds.add(data.requestId);
|
|
5404
|
-
appendCallbackRuntimeEvent(data.requestId, createLegacyTurnFailedRuntimeEvent({
|
|
5405
|
-
requestId: data.requestId,
|
|
5406
|
-
error: displayError,
|
|
5407
|
-
context: data.context,
|
|
5408
|
-
}));
|
|
5409
|
-
}
|
|
5682
|
+
finalizeFailedTurn(data.requestId, displayError, data.context);
|
|
5410
5683
|
});
|
|
5411
5684
|
}
|
|
5412
5685
|
if (getAgentPlatformBridge()?.agentsCloud) {
|
|
@@ -5561,12 +5834,33 @@ export async function loadLocalAgentConversations() {
|
|
|
5561
5834
|
})),
|
|
5562
5835
|
branches: normalizeConversationBranches(conv.branches),
|
|
5563
5836
|
materializedBranches: { ...(conv.materializedBranches || {}) },
|
|
5837
|
+
activeNotifications: conv.activeNotifications,
|
|
5838
|
+
availableCommands: conv.availableCommands,
|
|
5839
|
+
mcpStatuses: conv.mcpStatuses,
|
|
5840
|
+
dismissedNotificationKeys: conv.dismissedNotificationKeys,
|
|
5564
5841
|
sessionUi
|
|
5565
5842
|
};
|
|
5566
5843
|
}
|
|
5567
5844
|
if (Object.keys(loaded).length > 0) {
|
|
5845
|
+
const persistedNotifs = {};
|
|
5846
|
+
const persistedCommands = {};
|
|
5847
|
+
const persistedMcp = {};
|
|
5848
|
+
for (const [id, c] of Object.entries(loaded)) {
|
|
5849
|
+
if (c.activeNotifications && Object.keys(c.activeNotifications).length > 0) {
|
|
5850
|
+
persistedNotifs[id] = c.activeNotifications;
|
|
5851
|
+
}
|
|
5852
|
+
if (c.availableCommands && c.availableCommands.length > 0) {
|
|
5853
|
+
persistedCommands[id] = c.availableCommands;
|
|
5854
|
+
}
|
|
5855
|
+
if (c.mcpStatuses && Object.keys(c.mcpStatuses).length > 0) {
|
|
5856
|
+
persistedMcp[id] = c.mcpStatuses;
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5568
5859
|
useAgentChatStore.setState(state => ({
|
|
5569
|
-
conversations: { ...loaded, ...state.conversations }
|
|
5860
|
+
conversations: { ...loaded, ...state.conversations },
|
|
5861
|
+
activeNotifications: { ...persistedNotifs, ...state.activeNotifications },
|
|
5862
|
+
availableCommands: { ...persistedCommands, ...state.availableCommands },
|
|
5863
|
+
mcpStatuses: { ...persistedMcp, ...state.mcpStatuses },
|
|
5570
5864
|
}));
|
|
5571
5865
|
window.setTimeout(() => {
|
|
5572
5866
|
useAgentChatStore.getState().resumeQueuedTurns();
|