@xenosystem/agent-interface-ui 0.1.25 → 0.1.26

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.
Files changed (380) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  2. package/dist/adapters/agentHostPlatformBridge.js +96 -16
  3. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  4. package/dist/adapters/hubAgentPlatformBridge.d.ts.map +1 -1
  5. package/dist/adapters/hubAgentPlatformBridge.js +2 -0
  6. package/dist/adapters/hubAgentPlatformBridge.js.map +1 -1
  7. package/dist/adapters/scopedBackupBridge.d.ts +4 -0
  8. package/dist/adapters/scopedBackupBridge.d.ts.map +1 -0
  9. package/dist/adapters/scopedBackupBridge.js +49 -0
  10. package/dist/adapters/scopedBackupBridge.js.map +1 -0
  11. package/dist/adapters/xenoAgentCompatibilityBridge.d.ts.map +1 -1
  12. package/dist/adapters/xenoAgentCompatibilityBridge.js +9 -1
  13. package/dist/adapters/xenoAgentCompatibilityBridge.js.map +1 -1
  14. package/dist/agent.css +13227 -0
  15. package/dist/components/agent/AgentIdentityGenerator.d.ts +16 -0
  16. package/dist/components/agent/AgentIdentityGenerator.d.ts.map +1 -0
  17. package/dist/components/agent/AgentIdentityGenerator.js +80 -0
  18. package/dist/components/agent/AgentIdentityGenerator.js.map +1 -0
  19. package/dist/components/agent/AgentInterface.d.ts +1 -0
  20. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  21. package/dist/components/agent/AgentInterface.js +1816 -643
  22. package/dist/components/agent/AgentInterface.js.map +1 -1
  23. package/dist/components/agent/AgentNotificationBanner.d.ts +10 -0
  24. package/dist/components/agent/AgentNotificationBanner.d.ts.map +1 -0
  25. package/dist/components/agent/AgentNotificationBanner.js +28 -0
  26. package/dist/components/agent/AgentNotificationBanner.js.map +1 -0
  27. package/dist/components/agent/AgentOnboarding.d.ts +16 -2
  28. package/dist/components/agent/AgentOnboarding.d.ts.map +1 -1
  29. package/dist/components/agent/AgentOnboarding.js +93 -201
  30. package/dist/components/agent/AgentOnboarding.js.map +1 -1
  31. package/dist/components/agent/AgentView.d.ts.map +1 -1
  32. package/dist/components/agent/AgentView.js +533 -308
  33. package/dist/components/agent/AgentView.js.map +1 -1
  34. package/dist/components/agent/AgentWorkbenchPanel.d.ts +3 -1
  35. package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
  36. package/dist/components/agent/AgentWorkbenchPanel.js +3 -2
  37. package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
  38. package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts +4 -1
  39. package/dist/components/agent/AgentWorkspaceBrowserPanel.d.ts.map +1 -1
  40. package/dist/components/agent/AgentWorkspaceBrowserPanel.js +23 -195
  41. package/dist/components/agent/AgentWorkspaceBrowserPanel.js.map +1 -1
  42. package/dist/components/agent/AgentsWorkspaceView.d.ts +12 -0
  43. package/dist/components/agent/AgentsWorkspaceView.d.ts.map +1 -0
  44. package/dist/components/agent/AgentsWorkspaceView.js +129 -0
  45. package/dist/components/agent/AgentsWorkspaceView.js.map +1 -0
  46. package/dist/components/agent/DevelopmentCoordinationPanel.d.ts +7 -0
  47. package/dist/components/agent/DevelopmentCoordinationPanel.d.ts.map +1 -1
  48. package/dist/components/agent/DevelopmentCoordinationPanel.js +57 -49
  49. package/dist/components/agent/DevelopmentCoordinationPanel.js.map +1 -1
  50. package/dist/components/agent/KnowledgePanel.d.ts.map +1 -1
  51. package/dist/components/agent/KnowledgePanel.js +17 -67
  52. package/dist/components/agent/KnowledgePanel.js.map +1 -1
  53. package/dist/components/agent/LiveConversationCollaboration.d.ts +27 -0
  54. package/dist/components/agent/LiveConversationCollaboration.d.ts.map +1 -0
  55. package/dist/components/agent/LiveConversationCollaboration.js +127 -0
  56. package/dist/components/agent/LiveConversationCollaboration.js.map +1 -0
  57. package/dist/components/agent/MonacoDiffWorkbenchEditor.d.ts.map +1 -1
  58. package/dist/components/agent/MonacoDiffWorkbenchEditor.js +1 -1
  59. package/dist/components/agent/MonacoDiffWorkbenchEditor.js.map +1 -1
  60. package/dist/components/agent/MonacoWorkbenchEditor.d.ts.map +1 -1
  61. package/dist/components/agent/MonacoWorkbenchEditor.js +3 -3
  62. package/dist/components/agent/MonacoWorkbenchEditor.js.map +1 -1
  63. package/dist/components/agent/OwnedBrowserController.d.ts +55 -0
  64. package/dist/components/agent/OwnedBrowserController.d.ts.map +1 -0
  65. package/dist/components/agent/OwnedBrowserController.js +166 -0
  66. package/dist/components/agent/OwnedBrowserController.js.map +1 -0
  67. package/dist/components/agent/OwnedWorkforceView.d.ts +10 -0
  68. package/dist/components/agent/OwnedWorkforceView.d.ts.map +1 -0
  69. package/dist/components/agent/OwnedWorkforceView.js +256 -0
  70. package/dist/components/agent/OwnedWorkforceView.js.map +1 -0
  71. package/dist/components/agent/PluginManager.d.ts +34 -0
  72. package/dist/components/agent/PluginManager.d.ts.map +1 -1
  73. package/dist/components/agent/PluginManager.js +187 -126
  74. package/dist/components/agent/PluginManager.js.map +1 -1
  75. package/dist/components/agent/ProjectsWorkspaceView.d.ts +14 -0
  76. package/dist/components/agent/ProjectsWorkspaceView.d.ts.map +1 -0
  77. package/dist/components/agent/ProjectsWorkspaceView.js +176 -0
  78. package/dist/components/agent/ProjectsWorkspaceView.js.map +1 -0
  79. package/dist/components/agent/RunReviewPanel.d.ts +8 -13
  80. package/dist/components/agent/RunReviewPanel.d.ts.map +1 -1
  81. package/dist/components/agent/RunReviewPanel.js +120 -106
  82. package/dist/components/agent/RunReviewPanel.js.map +1 -1
  83. package/dist/components/agent/ScheduledWorkspaceView.d.ts +19 -0
  84. package/dist/components/agent/ScheduledWorkspaceView.d.ts.map +1 -0
  85. package/dist/components/agent/ScheduledWorkspaceView.js +150 -0
  86. package/dist/components/agent/ScheduledWorkspaceView.js.map +1 -0
  87. package/dist/components/agent/SdkSessionPanel.d.ts +25 -0
  88. package/dist/components/agent/SdkSessionPanel.d.ts.map +1 -0
  89. package/dist/components/agent/SdkSessionPanel.js +15 -0
  90. package/dist/components/agent/SdkSessionPanel.js.map +1 -0
  91. package/dist/components/agent/SlashCommandAutocomplete.d.ts +12 -0
  92. package/dist/components/agent/SlashCommandAutocomplete.d.ts.map +1 -0
  93. package/dist/components/agent/SlashCommandAutocomplete.js +33 -0
  94. package/dist/components/agent/SlashCommandAutocomplete.js.map +1 -0
  95. package/dist/components/agent/TeamsWorkspaceView.d.ts +12 -0
  96. package/dist/components/agent/TeamsWorkspaceView.d.ts.map +1 -0
  97. package/dist/components/agent/TeamsWorkspaceView.js +127 -0
  98. package/dist/components/agent/TeamsWorkspaceView.js.map +1 -0
  99. package/dist/components/agent/WorkspacePersistenceNotice.d.ts +3 -0
  100. package/dist/components/agent/WorkspacePersistenceNotice.d.ts.map +1 -0
  101. package/dist/components/agent/WorkspacePersistenceNotice.js +23 -0
  102. package/dist/components/agent/WorkspacePersistenceNotice.js.map +1 -0
  103. package/dist/components/agent/acp/AcpAgentConfigForm.d.ts +1 -0
  104. package/dist/components/agent/acp/AcpAgentConfigForm.d.ts.map +1 -1
  105. package/dist/components/agent/acp/AcpAgentConfigForm.js +47 -14
  106. package/dist/components/agent/acp/AcpAgentConfigForm.js.map +1 -1
  107. package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js +1 -1
  108. package/dist/components/agent/acp/AcpAgentDiagnosticsPanel.js.map +1 -1
  109. package/dist/components/agent/acp/AcpAgentManager.d.ts.map +1 -1
  110. package/dist/components/agent/acp/AcpAgentManager.js +18 -18
  111. package/dist/components/agent/acp/AcpAgentManager.js.map +1 -1
  112. package/dist/components/agent/acp/AcpAgentTestResultPanel.js +1 -1
  113. package/dist/components/agent/acp/AcpAgentTestResultPanel.js.map +1 -1
  114. package/dist/components/agent/acp/AcpApprovalPanel.js +2 -2
  115. package/dist/components/agent/acp/AcpApprovalPanel.js.map +1 -1
  116. package/dist/components/agent/acp/AcpCertificationPanel.js +1 -1
  117. package/dist/components/agent/acp/AcpCertificationPanel.js.map +1 -1
  118. package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js +1 -1
  119. package/dist/components/agent/acp/AcpLiveProviderWorkflowPanel.js.map +1 -1
  120. package/dist/components/agent/acp/AcpProviderManagerPanel.js +1 -1
  121. package/dist/components/agent/acp/AcpProviderManagerPanel.js.map +1 -1
  122. package/dist/components/agent/acp/AcpProviderModelsPanel.js +1 -1
  123. package/dist/components/agent/acp/AcpProviderModelsPanel.js.map +1 -1
  124. package/dist/components/agent/acp/AcpSupportBundlePanel.js +1 -1
  125. package/dist/components/agent/acp/AcpSupportBundlePanel.js.map +1 -1
  126. package/dist/components/agent/collaborationWindow.d.ts +11 -0
  127. package/dist/components/agent/collaborationWindow.d.ts.map +1 -0
  128. package/dist/components/agent/collaborationWindow.js +10 -0
  129. package/dist/components/agent/collaborationWindow.js.map +1 -0
  130. package/dist/components/agent/conversationCollaborationAppendJournal.d.ts +25 -0
  131. package/dist/components/agent/conversationCollaborationAppendJournal.d.ts.map +1 -0
  132. package/dist/components/agent/conversationCollaborationAppendJournal.js +118 -0
  133. package/dist/components/agent/conversationCollaborationAppendJournal.js.map +1 -0
  134. package/dist/components/agent/conversationCollaborationController.d.ts +96 -0
  135. package/dist/components/agent/conversationCollaborationController.d.ts.map +1 -0
  136. package/dist/components/agent/conversationCollaborationController.js +597 -0
  137. package/dist/components/agent/conversationCollaborationController.js.map +1 -0
  138. package/dist/components/agent/destructiveConfirmation.d.ts +76 -0
  139. package/dist/components/agent/destructiveConfirmation.d.ts.map +1 -0
  140. package/dist/components/agent/destructiveConfirmation.js +231 -0
  141. package/dist/components/agent/destructiveConfirmation.js.map +1 -0
  142. package/dist/components/agent/developmentCoordinationController.d.ts +43 -0
  143. package/dist/components/agent/developmentCoordinationController.d.ts.map +1 -0
  144. package/dist/components/agent/developmentCoordinationController.js +94 -0
  145. package/dist/components/agent/developmentCoordinationController.js.map +1 -0
  146. package/dist/components/agent/developmentCoordinationProjection.d.ts +24 -0
  147. package/dist/components/agent/developmentCoordinationProjection.d.ts.map +1 -1
  148. package/dist/components/agent/developmentCoordinationProjection.js +34 -5
  149. package/dist/components/agent/developmentCoordinationProjection.js.map +1 -1
  150. package/dist/components/agent/editorOperationAuthority.d.ts +29 -0
  151. package/dist/components/agent/editorOperationAuthority.d.ts.map +1 -0
  152. package/dist/components/agent/editorOperationAuthority.js +73 -0
  153. package/dist/components/agent/editorOperationAuthority.js.map +1 -0
  154. package/dist/components/agent/knowledgePagination.d.ts +7 -0
  155. package/dist/components/agent/knowledgePagination.d.ts.map +1 -0
  156. package/dist/components/agent/knowledgePagination.js +7 -0
  157. package/dist/components/agent/knowledgePagination.js.map +1 -0
  158. package/dist/components/agent/knowledgePanelController.d.ts +32 -0
  159. package/dist/components/agent/knowledgePanelController.d.ts.map +1 -0
  160. package/dist/components/agent/knowledgePanelController.js +119 -0
  161. package/dist/components/agent/knowledgePanelController.js.map +1 -0
  162. package/dist/components/agent/monacoWorkbenchShared.js +1 -1
  163. package/dist/components/agent/onboardingModels.d.ts +31 -0
  164. package/dist/components/agent/onboardingModels.d.ts.map +1 -0
  165. package/dist/components/agent/onboardingModels.js +107 -0
  166. package/dist/components/agent/onboardingModels.js.map +1 -0
  167. package/dist/components/agent/personalConversationScope.d.ts +26 -0
  168. package/dist/components/agent/personalConversationScope.d.ts.map +1 -0
  169. package/dist/components/agent/personalConversationScope.js +43 -0
  170. package/dist/components/agent/personalConversationScope.js.map +1 -0
  171. package/dist/components/agent/reviewRequestScope.d.ts +16 -0
  172. package/dist/components/agent/reviewRequestScope.d.ts.map +1 -0
  173. package/dist/components/agent/reviewRequestScope.js +101 -0
  174. package/dist/components/agent/reviewRequestScope.js.map +1 -0
  175. package/dist/components/agent/scheduleCreationAttempt.d.ts +12 -0
  176. package/dist/components/agent/scheduleCreationAttempt.d.ts.map +1 -0
  177. package/dist/components/agent/scheduleCreationAttempt.js +30 -0
  178. package/dist/components/agent/scheduleCreationAttempt.js.map +1 -0
  179. package/dist/components/agent/settings/EntitySettingsLayout.d.ts +1 -1
  180. package/dist/components/agent/settings/EntitySettingsLayout.d.ts.map +1 -1
  181. package/dist/components/agent/settings/EntitySettingsLayout.js +64 -44
  182. package/dist/components/agent/settings/EntitySettingsLayout.js.map +1 -1
  183. package/dist/components/agent/settings/SettingsNavigation.d.ts.map +1 -1
  184. package/dist/components/agent/settings/SettingsNavigation.js +17 -17
  185. package/dist/components/agent/settings/SettingsNavigation.js.map +1 -1
  186. package/dist/components/agent/settings/entityArchiveState.d.ts +24 -0
  187. package/dist/components/agent/settings/entityArchiveState.d.ts.map +1 -0
  188. package/dist/components/agent/settings/entityArchiveState.js +12 -0
  189. package/dist/components/agent/settings/entityArchiveState.js.map +1 -0
  190. package/dist/components/agent/settings/sections/AccessMembersSection.d.ts.map +1 -1
  191. package/dist/components/agent/settings/sections/AccessMembersSection.js +10 -25
  192. package/dist/components/agent/settings/sections/AccessMembersSection.js.map +1 -1
  193. package/dist/components/agent/settings/sections/AccountWorkspacePanel.d.ts +16 -0
  194. package/dist/components/agent/settings/sections/AccountWorkspacePanel.d.ts.map +1 -0
  195. package/dist/components/agent/settings/sections/AccountWorkspacePanel.js +265 -0
  196. package/dist/components/agent/settings/sections/AccountWorkspacePanel.js.map +1 -0
  197. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.d.ts.map +1 -1
  198. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js +47 -32
  199. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js.map +1 -1
  200. package/dist/components/agent/settings/sections/DangerZoneSection.d.ts.map +1 -1
  201. package/dist/components/agent/settings/sections/DangerZoneSection.js +30 -6
  202. package/dist/components/agent/settings/sections/DangerZoneSection.js.map +1 -1
  203. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.d.ts.map +1 -1
  204. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js +47 -37
  205. package/dist/components/agent/settings/sections/DefaultAgentConfigSection.js.map +1 -1
  206. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.d.ts.map +1 -1
  207. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js +30 -43
  208. package/dist/components/agent/settings/sections/EnvironmentSecretsSection.js.map +1 -1
  209. package/dist/components/agent/settings/sections/ExportBackupSection.d.ts +3 -1
  210. package/dist/components/agent/settings/sections/ExportBackupSection.d.ts.map +1 -1
  211. package/dist/components/agent/settings/sections/ExportBackupSection.js +14 -12
  212. package/dist/components/agent/settings/sections/ExportBackupSection.js.map +1 -1
  213. package/dist/components/agent/settings/sections/GeneralSection.d.ts.map +1 -1
  214. package/dist/components/agent/settings/sections/GeneralSection.js +47 -4
  215. package/dist/components/agent/settings/sections/GeneralSection.js.map +1 -1
  216. package/dist/components/agent/settings/sections/IntegrationsSection.d.ts.map +1 -1
  217. package/dist/components/agent/settings/sections/IntegrationsSection.js +14 -21
  218. package/dist/components/agent/settings/sections/IntegrationsSection.js.map +1 -1
  219. package/dist/components/agent/settings/sections/NotificationsSection.d.ts.map +1 -1
  220. package/dist/components/agent/settings/sections/NotificationsSection.js +125 -20
  221. package/dist/components/agent/settings/sections/NotificationsSection.js.map +1 -1
  222. package/dist/components/agent/settings/sections/ResourceLimitsSection.d.ts.map +1 -1
  223. package/dist/components/agent/settings/sections/ResourceLimitsSection.js +7 -7
  224. package/dist/components/agent/settings/sections/ResourceLimitsSection.js.map +1 -1
  225. package/dist/components/agent/settings/sections/SecurityComplianceSection.d.ts.map +1 -1
  226. package/dist/components/agent/settings/sections/SecurityComplianceSection.js +5 -4
  227. package/dist/components/agent/settings/sections/SecurityComplianceSection.js.map +1 -1
  228. package/dist/components/agent/settings/sections/UsageAnalyticsSection.d.ts.map +1 -1
  229. package/dist/components/agent/settings/sections/UsageAnalyticsSection.js +2 -3
  230. package/dist/components/agent/settings/sections/UsageAnalyticsSection.js.map +1 -1
  231. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.d.ts.map +1 -1
  232. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js +39 -26
  233. package/dist/components/agent/settings/sections/WorkspaceDirectoryAccessSection.js.map +1 -1
  234. package/dist/components/agent/settings/sections/WorkspaceKeysPanel.d.ts +6 -0
  235. package/dist/components/agent/settings/sections/WorkspaceKeysPanel.d.ts.map +1 -0
  236. package/dist/components/agent/settings/sections/WorkspaceKeysPanel.js +205 -0
  237. package/dist/components/agent/settings/sections/WorkspaceKeysPanel.js.map +1 -0
  238. package/dist/components/agent/settings/sections/environmentDraftAction.d.ts +3 -0
  239. package/dist/components/agent/settings/sections/environmentDraftAction.d.ts.map +1 -0
  240. package/dist/components/agent/settings/sections/environmentDraftAction.js +6 -0
  241. package/dist/components/agent/settings/sections/environmentDraftAction.js.map +1 -0
  242. package/dist/components/agent/settings/sections/membershipOperationProjection.d.ts +3 -0
  243. package/dist/components/agent/settings/sections/membershipOperationProjection.d.ts.map +1 -0
  244. package/dist/components/agent/settings/sections/membershipOperationProjection.js +9 -0
  245. package/dist/components/agent/settings/sections/membershipOperationProjection.js.map +1 -0
  246. package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.d.ts +6 -0
  247. package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.d.ts.map +1 -0
  248. package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.js +8 -0
  249. package/dist/components/agent/settings/sections/workspaceKeyOperationProjection.js.map +1 -0
  250. package/dist/components/agent/settings/shared/InAppConfirmationDialog.d.ts +25 -0
  251. package/dist/components/agent/settings/shared/InAppConfirmationDialog.d.ts.map +1 -0
  252. package/dist/components/agent/settings/shared/InAppConfirmationDialog.js +89 -0
  253. package/dist/components/agent/settings/shared/InAppConfirmationDialog.js.map +1 -0
  254. package/dist/components/agent/settings/shared/InputField.d.ts +1 -1
  255. package/dist/components/agent/settings/shared/InputField.d.ts.map +1 -1
  256. package/dist/components/agent/settings/shared/InputField.js +4 -3
  257. package/dist/components/agent/settings/shared/InputField.js.map +1 -1
  258. package/dist/components/agent/settings/shared/MembersTable.d.ts +3 -3
  259. package/dist/components/agent/settings/shared/MembersTable.d.ts.map +1 -1
  260. package/dist/components/agent/settings/shared/MembersTable.js +1 -1
  261. package/dist/components/agent/settings/shared/MembersTable.js.map +1 -1
  262. package/dist/components/agent/settings/shared/ScopedAuditPanel.d.ts +5 -0
  263. package/dist/components/agent/settings/shared/ScopedAuditPanel.d.ts.map +1 -0
  264. package/dist/components/agent/settings/shared/ScopedAuditPanel.js +70 -0
  265. package/dist/components/agent/settings/shared/ScopedAuditPanel.js.map +1 -0
  266. package/dist/components/agent/settings/shared/SettingsCard.d.ts +2 -1
  267. package/dist/components/agent/settings/shared/SettingsCard.d.ts.map +1 -1
  268. package/dist/components/agent/settings/shared/SettingsCard.js +2 -2
  269. package/dist/components/agent/settings/shared/SettingsCard.js.map +1 -1
  270. package/dist/components/agent/settings/shared/ToggleSwitch.d.ts.map +1 -1
  271. package/dist/components/agent/settings/shared/ToggleSwitch.js +1 -1
  272. package/dist/components/agent/settings/shared/ToggleSwitch.js.map +1 -1
  273. package/dist/components/agent/settings/shared/UsageChart.d.ts +10 -0
  274. package/dist/components/agent/settings/shared/UsageChart.d.ts.map +1 -1
  275. package/dist/components/agent/settings/shared/UsageChart.js +16 -10
  276. package/dist/components/agent/settings/shared/UsageChart.js.map +1 -1
  277. package/dist/components/agent/settings/shared/WorkspaceRulesControl.d.ts +8 -0
  278. package/dist/components/agent/settings/shared/WorkspaceRulesControl.d.ts.map +1 -0
  279. package/dist/components/agent/settings/shared/WorkspaceRulesControl.js +26 -0
  280. package/dist/components/agent/settings/shared/WorkspaceRulesControl.js.map +1 -0
  281. package/dist/components/agent/settings/shared/useScopedConfirmation.d.ts +8 -0
  282. package/dist/components/agent/settings/shared/useScopedConfirmation.d.ts.map +1 -0
  283. package/dist/components/agent/settings/shared/useScopedConfirmation.js +53 -0
  284. package/dist/components/agent/settings/shared/useScopedConfirmation.js.map +1 -0
  285. package/dist/components/agent/settings/shared/useSettingsConfirmation.d.ts +8 -0
  286. package/dist/components/agent/settings/shared/useSettingsConfirmation.d.ts.map +1 -0
  287. package/dist/components/agent/settings/shared/useSettingsConfirmation.js +51 -0
  288. package/dist/components/agent/settings/shared/useSettingsConfirmation.js.map +1 -0
  289. package/dist/components/agent/settings/shared/workspaceRulesController.d.ts +28 -0
  290. package/dist/components/agent/settings/shared/workspaceRulesController.d.ts.map +1 -0
  291. package/dist/components/agent/settings/shared/workspaceRulesController.js +82 -0
  292. package/dist/components/agent/settings/shared/workspaceRulesController.js.map +1 -0
  293. package/dist/components/agent/sidebarEntityPins.d.ts +11 -0
  294. package/dist/components/agent/sidebarEntityPins.d.ts.map +1 -0
  295. package/dist/components/agent/sidebarEntityPins.js +37 -0
  296. package/dist/components/agent/sidebarEntityPins.js.map +1 -0
  297. package/dist/components/agent/workspaceHierarchy.d.ts +24 -0
  298. package/dist/components/agent/workspaceHierarchy.d.ts.map +1 -0
  299. package/dist/components/agent/workspaceHierarchy.js +50 -0
  300. package/dist/components/agent/workspaceHierarchy.js.map +1 -0
  301. package/dist/components/product/XenoAgentProductHeader.d.ts +4 -2
  302. package/dist/components/product/XenoAgentProductHeader.d.ts.map +1 -1
  303. package/dist/components/product/XenoAgentProductHeader.js +22 -4
  304. package/dist/components/product/XenoAgentProductHeader.js.map +1 -1
  305. package/dist/components/product/XenoAgentSessionTabs.js +1 -1
  306. package/dist/components/product/XenoAgentSessionTabs.js.map +1 -1
  307. package/dist/components/product/XenoAgentWorkspaceSelector.d.ts +7 -0
  308. package/dist/components/product/XenoAgentWorkspaceSelector.d.ts.map +1 -0
  309. package/dist/components/product/XenoAgentWorkspaceSelector.js +237 -0
  310. package/dist/components/product/XenoAgentWorkspaceSelector.js.map +1 -0
  311. package/dist/components/workspace/WorkspaceCreationWizard.d.ts +6 -0
  312. package/dist/components/workspace/WorkspaceCreationWizard.d.ts.map +1 -0
  313. package/dist/components/workspace/WorkspaceCreationWizard.js +48 -0
  314. package/dist/components/workspace/WorkspaceCreationWizard.js.map +1 -0
  315. package/dist/hooks/useSidebarLayoutPreference.d.ts +29 -0
  316. package/dist/hooks/useSidebarLayoutPreference.d.ts.map +1 -0
  317. package/dist/hooks/useSidebarLayoutPreference.js +83 -0
  318. package/dist/hooks/useSidebarLayoutPreference.js.map +1 -0
  319. package/dist/hooks/useWorkspaceCreation.d.ts +8 -0
  320. package/dist/hooks/useWorkspaceCreation.d.ts.map +1 -0
  321. package/dist/hooks/useWorkspaceCreation.js +40 -0
  322. package/dist/hooks/useWorkspaceCreation.js.map +1 -0
  323. package/dist/index.d.ts +3 -0
  324. package/dist/index.d.ts.map +1 -1
  325. package/dist/index.js +3 -0
  326. package/dist/index.js.map +1 -1
  327. package/dist/platformApiTypes.d.ts +77 -36
  328. package/dist/platformApiTypes.d.ts.map +1 -1
  329. package/dist/platformBridge.d.ts +4 -0
  330. package/dist/platformBridge.d.ts.map +1 -1
  331. package/dist/platformBridge.js +10 -0
  332. package/dist/platformBridge.js.map +1 -1
  333. package/dist/stores/agentChatStore.d.ts +120 -2
  334. package/dist/stores/agentChatStore.d.ts.map +1 -1
  335. package/dist/stores/agentChatStore.js +329 -35
  336. package/dist/stores/agentChatStore.js.map +1 -1
  337. package/dist/stores/agentCreationDefaults.d.ts +25 -0
  338. package/dist/stores/agentCreationDefaults.d.ts.map +1 -0
  339. package/dist/stores/agentCreationDefaults.js +11 -0
  340. package/dist/stores/agentCreationDefaults.js.map +1 -0
  341. package/dist/stores/entitySettingsStore.d.ts +37 -12
  342. package/dist/stores/entitySettingsStore.d.ts.map +1 -1
  343. package/dist/stores/entitySettingsStore.js +558 -585
  344. package/dist/stores/entitySettingsStore.js.map +1 -1
  345. package/dist/stores/suggestionStore.d.ts +9 -2
  346. package/dist/stores/suggestionStore.d.ts.map +1 -1
  347. package/dist/stores/suggestionStore.js +51 -24
  348. package/dist/stores/suggestionStore.js.map +1 -1
  349. package/dist/stores/workspaceCreationAttempt.d.ts +14 -0
  350. package/dist/stores/workspaceCreationAttempt.d.ts.map +1 -0
  351. package/dist/stores/workspaceCreationAttempt.js +35 -0
  352. package/dist/stores/workspaceCreationAttempt.js.map +1 -0
  353. package/dist/stores/workspaceReconciliation.d.ts +6 -0
  354. package/dist/stores/workspaceReconciliation.d.ts.map +1 -0
  355. package/dist/stores/workspaceReconciliation.js +33 -0
  356. package/dist/stores/workspaceReconciliation.js.map +1 -0
  357. package/dist/stores/workspaceStore.d.ts +44 -9
  358. package/dist/stores/workspaceStore.d.ts.map +1 -1
  359. package/dist/stores/workspaceStore.js +238 -99
  360. package/dist/stores/workspaceStore.js.map +1 -1
  361. package/dist/types/agentEditor.d.ts +1 -0
  362. package/dist/types/agentEditor.d.ts.map +1 -1
  363. package/dist/utils/advertisedReasoning.d.ts +25 -0
  364. package/dist/utils/advertisedReasoning.d.ts.map +1 -0
  365. package/dist/utils/advertisedReasoning.js +62 -0
  366. package/dist/utils/advertisedReasoning.js.map +1 -0
  367. package/dist/utils/clipboardCopy.d.ts +4 -0
  368. package/dist/utils/clipboardCopy.d.ts.map +1 -0
  369. package/dist/utils/clipboardCopy.js +27 -0
  370. package/dist/utils/clipboardCopy.js.map +1 -0
  371. package/dist/utils/providerCommandArgs.d.ts +11 -0
  372. package/dist/utils/providerCommandArgs.d.ts.map +1 -0
  373. package/dist/utils/providerCommandArgs.js +18 -0
  374. package/dist/utils/providerCommandArgs.js.map +1 -0
  375. package/dist/utils/rendererTeardown.d.ts +6 -0
  376. package/dist/utils/rendererTeardown.d.ts.map +1 -0
  377. package/dist/utils/rendererTeardown.js +18 -0
  378. package/dist/utils/rendererTeardown.js.map +1 -0
  379. package/package.json +20 -8
  380. 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
- if (state.activeRequestId && findOldestQueuedTurn(state.conversations)) {
2714
- scheduleQueueDrain(250);
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().activeRequestId || findOldestQueuedTurn(get().conversations)) {
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().activeRequestId || findOldestQueuedTurn(get().conversations)) {
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().activeRequestId || findOldestQueuedTurn(get().conversations)) {
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
- if (!conversationId)
4961
- return state;
4962
- const conv = state.conversations[conversationId];
4963
- if (!conv)
4964
- return state;
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
- return;
5014
- const next = findOldestQueuedTurn(state.conversations);
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
- const { activeRequestId } = get();
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
- if (!nativeRuntimeTerminalRequestIds.has(data.requestId)) {
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
- if (!nativeRuntimeTerminalRequestIds.has(data.requestId)) {
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();