@taskforcehq/taskforce 0.3.324 → 0.3.327

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 (1361) hide show
  1. package/LICENSE.md +68 -0
  2. package/README.md +19 -0
  3. package/dist/Taskforce.module.css +2191 -540
  4. package/dist/TaskforceCore.d.ts +1 -0
  5. package/dist/TaskforceCore.js +65 -22
  6. package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.d.ts +1 -0
  7. package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +3 -2
  8. package/dist/annotatedAttachments/commandService.d.ts +68 -0
  9. package/dist/annotatedAttachments/commandService.js +348 -0
  10. package/dist/annotatedAttachments/service.d.ts +2 -0
  11. package/dist/annotatedAttachments/service.js +13 -12
  12. package/dist/cli.js +158 -9
  13. package/dist/cliOpenPort.d.ts +1 -0
  14. package/dist/cliOpenPort.js +4 -0
  15. package/dist/compat/taskforceAgentDefinitionCompat.d.ts +12 -0
  16. package/dist/compat/taskforceAgentDefinitionCompat.js +25 -0
  17. package/dist/compat/workspaceSyncCompat.js +6 -2
  18. package/dist/compat/workspaceSyncV3CombinedCoverageCompat.d.ts +6 -0
  19. package/dist/compat/workspaceSyncV3CombinedCoverageCompat.js +22 -0
  20. package/dist/compat/workspaceSyncV3OperationCompat.d.ts +7 -0
  21. package/dist/compat/workspaceSyncV3OperationCompat.js +30 -0
  22. package/dist/components/activity/EntityActivityTimeline.d.ts +10 -2
  23. package/dist/components/activity/EntityActivityTimeline.js +73 -35
  24. package/dist/components/context/AttachmentPreviewHost.d.ts +6 -0
  25. package/dist/components/context/AttachmentPreviewHost.js +222 -0
  26. package/dist/components/context/ContextAttachmentManager.d.ts +4 -0
  27. package/dist/components/context/ContextAttachmentManager.js +418 -208
  28. package/dist/components/features/AiProfilesModule.d.ts +24 -0
  29. package/dist/components/features/AiProfilesModule.js +744 -0
  30. package/dist/components/features/AnnotatedAttachmentWorkspace.d.ts +4 -1
  31. package/dist/components/features/AnnotatedAttachmentWorkspace.js +351 -79
  32. package/dist/components/features/DocumentGenerateModal.js +23 -5
  33. package/dist/components/features/DocumentIndex.d.ts +19 -1
  34. package/dist/components/features/DocumentIndex.js +104 -15
  35. package/dist/components/features/DocumentViewer.d.ts +9 -1
  36. package/dist/components/features/DocumentViewer.js +721 -100
  37. package/dist/components/features/DocumentWorkspace.d.ts +37 -2
  38. package/dist/components/features/DocumentWorkspace.js +21 -6
  39. package/dist/components/features/TaskSettings.d.ts +6 -27
  40. package/dist/components/features/TaskSettings.js +257 -151
  41. package/dist/components/features/TaskforceAgentsModule.d.ts +36 -0
  42. package/dist/components/features/TaskforceAgentsModule.js +1782 -0
  43. package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.d.ts +94 -0
  44. package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.js +70 -0
  45. package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +65 -0
  46. package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.js +115 -0
  47. package/dist/components/features/agentRoles/RoleManagerPanel.d.ts +4 -0
  48. package/dist/components/features/agentRoles/RoleManagerPanel.js +382 -0
  49. package/dist/components/features/agentSkills/SkillManagerPanel.d.ts +5 -0
  50. package/dist/components/features/agentSkills/SkillManagerPanel.js +355 -0
  51. package/dist/components/features/documentWorkspaceModel.d.ts +16 -4
  52. package/dist/components/features/documentWorkspaceModel.js +30 -5
  53. package/dist/components/features/planning/PlanningArchiveConfirmation.d.ts +9 -0
  54. package/dist/components/features/planning/PlanningArchiveConfirmation.js +19 -0
  55. package/dist/components/features/planning/PlanningCardIdentity.d.ts +12 -0
  56. package/dist/components/features/planning/PlanningCardIdentity.js +44 -0
  57. package/dist/components/features/planning/PlanningEntityDetails.d.ts +36 -0
  58. package/dist/components/features/planning/PlanningEntityDetails.js +131 -0
  59. package/dist/components/features/planning/PlanningEntitySummary.d.ts +44 -0
  60. package/dist/components/features/planning/PlanningEntitySummary.js +97 -0
  61. package/dist/components/features/planning/PlanningLinkPicker.d.ts +9 -0
  62. package/dist/components/features/planning/PlanningLinkPicker.js +26 -0
  63. package/dist/components/features/planning/PlanningModule.d.ts +6 -0
  64. package/dist/components/features/planning/PlanningModule.js +571 -0
  65. package/dist/components/features/planning/PlanningOwnerDropdown.d.ts +27 -0
  66. package/dist/components/features/planning/PlanningOwnerDropdown.js +80 -0
  67. package/dist/components/features/planning/PlanningTaskArrangeControl.d.ts +5 -0
  68. package/dist/components/features/planning/PlanningTaskArrangeControl.js +11 -0
  69. package/dist/components/features/planning/PlanningTaskCard.d.ts +20 -0
  70. package/dist/components/features/planning/PlanningTaskCard.js +26 -0
  71. package/dist/components/features/planning/PlanningTaskOrderList.d.ts +10 -0
  72. package/dist/components/features/planning/PlanningTaskOrderList.js +52 -0
  73. package/dist/components/features/planning/PlanningUnlinkConfirmation.d.ts +15 -0
  74. package/dist/components/features/planning/PlanningUnlinkConfirmation.js +7 -0
  75. package/dist/components/features/planning/planningCreateIntent.d.ts +10 -0
  76. package/dist/components/features/planning/planningCreateIntent.js +16 -0
  77. package/dist/components/features/planning/planningNavigator.d.ts +33 -0
  78. package/dist/components/features/planning/planningNavigator.js +96 -0
  79. package/dist/components/features/planning/planningTaskArrangement.d.ts +18 -0
  80. package/dist/components/features/planning/planningTaskArrangement.js +106 -0
  81. package/dist/components/features/planning/planningWorkspaceModel.d.ts +121 -0
  82. package/dist/components/features/planning/planningWorkspaceModel.js +5 -0
  83. package/dist/components/features/settings/CategoryManager.js +2 -2
  84. package/dist/components/features/settings/TaxonomyEditor.js +1 -1
  85. package/dist/components/features/settings/TaxonomyManager.js +1 -1
  86. package/dist/components/features/settings/TypeManager.js +1 -1
  87. package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.d.ts +10 -0
  88. package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +175 -0
  89. package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.d.ts +27 -0
  90. package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.js +24 -0
  91. package/dist/components/features/taskforceAgentEditorModel.d.ts +109 -0
  92. package/dist/components/features/taskforceAgentEditorModel.js +145 -0
  93. package/dist/components/features/useDocumentWorkspaceController.d.ts +20 -1
  94. package/dist/components/features/useDocumentWorkspaceController.js +106 -21
  95. package/dist/components/features/workflowManager/WorkflowManagerModule.d.ts +11 -0
  96. package/dist/components/features/workflowManager/WorkflowManagerModule.js +313 -0
  97. package/dist/components/features/workflowManager/WorkflowPublishDialog.d.ts +11 -0
  98. package/dist/components/features/workflowManager/WorkflowPublishDialog.js +8 -0
  99. package/dist/components/features/workflowManager/types.d.ts +74 -0
  100. package/dist/components/features/workflowManager/types.js +1 -0
  101. package/dist/components/features/workflowManager/useWorkflowManager.d.ts +30 -0
  102. package/dist/components/features/workflowManager/useWorkflowManager.js +213 -0
  103. package/dist/components/features/workflowManager/workflowManagerApi.d.ts +52 -0
  104. package/dist/components/features/workflowManager/workflowManagerApi.js +142 -0
  105. package/dist/components/task/TaskActionHeader.d.ts +6 -3
  106. package/dist/components/task/TaskActionHeader.js +46 -53
  107. package/dist/components/task/TaskCard.d.ts +10 -2
  108. package/dist/components/task/TaskCard.js +103 -54
  109. package/dist/components/task/TaskContextUpload.d.ts +1 -0
  110. package/dist/components/task/TaskContextUpload.js +3 -2
  111. package/dist/components/task/TaskForm.d.ts +12 -17
  112. package/dist/components/task/TaskForm.js +544 -199
  113. package/dist/components/task/TaskImageReviews.d.ts +8 -0
  114. package/dist/components/task/TaskImageReviews.js +47 -0
  115. package/dist/components/task/TaskKanban.d.ts +11 -12
  116. package/dist/components/task/TaskKanban.js +70 -18
  117. package/dist/components/task/TaskList.d.ts +9 -8
  118. package/dist/components/task/TaskList.js +46 -32
  119. package/dist/components/task/TaskReferenceBadge.d.ts +2 -1
  120. package/dist/components/task/TaskReferenceBadge.js +3 -2
  121. package/dist/components/task/TaskStatusActions.d.ts +3 -1
  122. package/dist/components/task/TaskStatusActions.js +17 -6
  123. package/dist/components/task/TaskWorkflowAssignmentField.d.ts +18 -0
  124. package/dist/components/task/TaskWorkflowAssignmentField.js +362 -0
  125. package/dist/components/task/TaskWorkstreamPicker.d.ts +8 -0
  126. package/dist/components/task/TaskWorkstreamPicker.js +24 -0
  127. package/dist/components/task/TrashRestoreControls.d.ts +18 -0
  128. package/dist/components/task/TrashRestoreControls.js +71 -0
  129. package/dist/components/ui/AiIdentityRosterCard.d.ts +20 -0
  130. package/dist/components/ui/AiIdentityRosterCard.js +5 -0
  131. package/dist/components/ui/AssetTraySortControl.d.ts +10 -0
  132. package/dist/components/ui/AssetTraySortControl.js +38 -0
  133. package/dist/components/ui/AssigneeIdentity.d.ts +12 -0
  134. package/dist/components/ui/AssigneeIdentity.js +41 -0
  135. package/dist/components/ui/DiscardChangesDialog.d.ts +10 -0
  136. package/dist/components/ui/DiscardChangesDialog.js +7 -0
  137. package/dist/components/ui/DisclosureSectionHeader.d.ts +4 -1
  138. package/dist/components/ui/DisclosureSectionHeader.js +2 -2
  139. package/dist/components/ui/EditableAvatarButton.d.ts +6 -1
  140. package/dist/components/ui/EditableAvatarButton.js +6 -5
  141. package/dist/components/ui/HierarchyActionBadge.d.ts +2 -1
  142. package/dist/components/ui/HierarchyActionBadge.js +2 -2
  143. package/dist/components/ui/Markdown.d.ts +13 -3
  144. package/dist/components/ui/Markdown.fixture.d.ts +1 -0
  145. package/dist/components/ui/Markdown.fixture.js +23 -0
  146. package/dist/components/ui/Markdown.js +158 -68
  147. package/dist/components/ui/Modal.d.ts +3 -1
  148. package/dist/components/ui/Modal.js +85 -19
  149. package/dist/components/ui/MultiSelectFilter.d.ts +9 -2
  150. package/dist/components/ui/MultiSelectFilter.js +26 -5
  151. package/dist/components/ui/ReferenceBadgeButton.js +2 -3
  152. package/dist/components/ui/TaxonomyDropdown.d.ts +10 -1
  153. package/dist/components/ui/TaxonomyDropdown.js +149 -58
  154. package/dist/components/ui/TopNoticeLayer.d.ts +2 -1
  155. package/dist/components/ui/TopNoticeLayer.js +5 -2
  156. package/dist/components/ui/useFallbackImageUrl.d.ts +4 -0
  157. package/dist/components/ui/useFallbackImageUrl.js +20 -0
  158. package/dist/components/views/AppShellHeader.js +2 -2
  159. package/dist/components/views/StandaloneLayout.d.ts +1 -0
  160. package/dist/components/views/StandaloneLayout.js +1684 -620
  161. package/dist/components/views/WidgetView.d.ts +1 -0
  162. package/dist/components/views/WidgetView.js +95 -30
  163. package/dist/components/views/chrome/WorkspaceChromeSections.d.ts +4 -2
  164. package/dist/components/views/chrome/WorkspaceChromeSections.js +3 -6
  165. package/dist/components/views/chrome/workspaceChrome.d.ts +5 -8
  166. package/dist/components/views/chrome/workspaceChrome.js +62 -27
  167. package/dist/components/views/panels/FilterToolbar.d.ts +4 -3
  168. package/dist/components/views/panels/FilterToolbar.js +8 -5
  169. package/dist/components/views/panels/FilterToolbarControls.d.ts +11 -2
  170. package/dist/components/views/panels/FilterToolbarControls.js +35 -20
  171. package/dist/components/views/panels/PlanningDrawer.d.ts +62 -51
  172. package/dist/components/views/panels/PlanningDrawer.js +993 -314
  173. package/dist/components/views/planningScope.d.ts +4 -0
  174. package/dist/components/views/planningScope.js +12 -1
  175. package/dist/components/views/standalone/modals/AccountSettingsModal.d.ts +62 -0
  176. package/dist/components/views/standalone/modals/AccountSettingsModal.js +197 -0
  177. package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +7 -2
  178. package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +56 -9
  179. package/dist/components/views/standalone/modals/HelpModal.d.ts +1 -2
  180. package/dist/components/views/standalone/modals/HelpModal.js +3 -4
  181. package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +8 -9
  182. package/dist/components/views/standalone/modals/SyncStatusModal.js +85 -25
  183. package/dist/components/views/standalone/modals/TeamManagementModal.js +1 -1
  184. package/dist/config/applicationBaseUrl.d.ts +2 -0
  185. package/dist/config/applicationBaseUrl.js +23 -0
  186. package/dist/config/envSchema.d.ts +1 -1
  187. package/dist/config/envSchema.js +166 -5
  188. package/dist/core/AdminAuditRetentionService.d.ts +43 -0
  189. package/dist/core/AdminAuditRetentionService.js +126 -0
  190. package/dist/core/AiProfileService.d.ts +34 -0
  191. package/dist/core/AiProfileService.js +516 -252
  192. package/dist/core/AttachmentLinkService.d.ts +10 -2
  193. package/dist/core/AttachmentLinkService.js +44 -12
  194. package/dist/core/AuthIdentityService.d.ts +6 -0
  195. package/dist/core/AuthIdentityService.js +38 -0
  196. package/dist/core/AuthTokenService.d.ts +1 -0
  197. package/dist/core/AuthTokenService.js +13 -0
  198. package/dist/core/DeletedTaskLifecycleService.d.ts +4 -2
  199. package/dist/core/DeletedTaskLifecycleService.js +124 -38
  200. package/dist/core/GlobalSettingsService.d.ts +3 -1
  201. package/dist/core/GlobalSettingsService.js +30 -4
  202. package/dist/core/InitiativeDurableMutationService.d.ts +89 -0
  203. package/dist/core/InitiativeDurableMutationService.js +187 -0
  204. package/dist/core/McpTokenService.d.ts +1 -0
  205. package/dist/core/McpTokenService.js +39 -13
  206. package/dist/core/PlanningCommandPreparationService.d.ts +60 -0
  207. package/dist/core/PlanningCommandPreparationService.js +149 -0
  208. package/dist/core/ScheduleCommandService.d.ts +76 -0
  209. package/dist/core/ScheduleCommandService.js +165 -0
  210. package/dist/core/SyncReconciliationService.d.ts +29 -6
  211. package/dist/core/SyncReconciliationService.js +256 -84
  212. package/dist/core/TaskActivityService.d.ts +22 -2
  213. package/dist/core/TaskActivityService.js +177 -29
  214. package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +31 -0
  215. package/dist/core/TaskAttachmentLinksDurableMutationService.js +231 -0
  216. package/dist/core/TaskChecklistCommandService.d.ts +50 -0
  217. package/dist/core/TaskChecklistCommandService.js +111 -0
  218. package/dist/core/TaskDurableCreateMutationService.d.ts +38 -0
  219. package/dist/core/TaskDurableCreateMutationService.js +85 -0
  220. package/dist/core/TaskDurableDeleteMutationService.d.ts +47 -0
  221. package/dist/core/TaskDurableDeleteMutationService.js +54 -0
  222. package/dist/core/TaskDurableLifecycleMutationService.d.ts +38 -0
  223. package/dist/core/TaskDurableLifecycleMutationService.js +42 -0
  224. package/dist/core/TaskDurableRelationshipMutationService.d.ts +58 -0
  225. package/dist/core/TaskDurableRelationshipMutationService.js +66 -0
  226. package/dist/core/TaskDurableRestoreMutationService.d.ts +31 -0
  227. package/dist/core/TaskDurableRestoreMutationService.js +33 -0
  228. package/dist/core/TaskDurableStatusMutationService.d.ts +74 -0
  229. package/dist/core/TaskDurableStatusMutationService.js +247 -0
  230. package/dist/core/TaskDurableSyncMutationService.d.ts +34 -0
  231. package/dist/core/TaskDurableSyncMutationService.js +70 -0
  232. package/dist/core/TaskDurableWorkflowMutationService.d.ts +48 -0
  233. package/dist/core/TaskDurableWorkflowMutationService.js +59 -0
  234. package/dist/core/TaskLifecycleCommandService.d.ts +101 -0
  235. package/dist/core/TaskLifecycleCommandService.js +161 -0
  236. package/dist/core/TaskRootCommandPreparationService.d.ts +35 -0
  237. package/dist/core/TaskRootCommandPreparationService.js +103 -0
  238. package/dist/core/Taskforce.d.ts +479 -59
  239. package/dist/core/Taskforce.js +3671 -841
  240. package/dist/core/WorkflowAssignmentService.d.ts +40 -0
  241. package/dist/core/WorkflowAssignmentService.js +158 -0
  242. package/dist/core/WorkflowExecutionService.d.ts +69 -0
  243. package/dist/core/WorkflowExecutionService.js +342 -0
  244. package/dist/core/WorkflowTaskActivationService.d.ts +32 -0
  245. package/dist/core/WorkflowTaskActivationService.js +63 -0
  246. package/dist/core/WorkflowTemplateService.d.ts +64 -0
  247. package/dist/core/WorkflowTemplateService.js +223 -0
  248. package/dist/core/WorkspaceLifecycleService.d.ts +1 -0
  249. package/dist/core/WorkspaceLifecycleService.js +18 -0
  250. package/dist/core/WorkstreamDurableMutationService.d.ts +90 -0
  251. package/dist/core/WorkstreamDurableMutationService.js +184 -0
  252. package/dist/core/planningReferencePolicy.d.ts +14 -0
  253. package/dist/core/planningReferencePolicy.js +53 -0
  254. package/dist/core/taskReferencePolicy.js +24 -3
  255. package/dist/core/types.d.ts +10 -10
  256. package/dist/documentReviews/DocumentReviewCommentStore.d.ts +22 -2
  257. package/dist/documentReviews/DocumentReviewCommentStore.js +92 -8
  258. package/dist/documentReviews/commandService.d.ts +51 -0
  259. package/dist/documentReviews/commandService.js +63 -0
  260. package/dist/documentReviews/service.d.ts +20 -1
  261. package/dist/documentReviews/service.js +234 -24
  262. package/dist/documentReviews/types.d.ts +18 -1
  263. package/dist/hooks/sync/bootstrap.d.ts +3 -7
  264. package/dist/hooks/sync/bootstrap.js +6 -14
  265. package/dist/hooks/sync/browserSyncAuthority.d.ts +21 -0
  266. package/dist/hooks/sync/browserSyncAuthority.js +70 -0
  267. package/dist/hooks/sync/browserSyncRemoteServices.d.ts +29 -0
  268. package/dist/hooks/sync/browserSyncRemoteServices.js +58 -0
  269. package/dist/hooks/sync/controlPlane.d.ts +1 -37
  270. package/dist/hooks/sync/controlPlane.js +1 -78
  271. package/dist/hooks/sync/lifecyclePolicy.d.ts +1 -45
  272. package/dist/hooks/sync/lifecyclePolicy.js +1 -93
  273. package/dist/hooks/sync/orchestratorShared.d.ts +9 -3
  274. package/dist/hooks/sync/orchestratorShared.js +70 -96
  275. package/dist/hooks/sync/pullLifecycle.d.ts +1 -31
  276. package/dist/hooks/sync/pullLifecycle.js +1 -24
  277. package/dist/hooks/sync/realtime.d.ts +4 -1
  278. package/dist/hooks/sync/realtime.js +103 -3
  279. package/dist/hooks/sync/recovery.d.ts +1 -84
  280. package/dist/hooks/sync/recovery.js +1 -245
  281. package/dist/hooks/sync/transfers.d.ts +8 -129
  282. package/dist/hooks/sync/transfers.js +19 -581
  283. package/dist/hooks/sync/useDataVersionRefresh.d.ts +6 -1
  284. package/dist/hooks/sync/useDataVersionRefresh.js +127 -12
  285. package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +14 -0
  286. package/dist/hooks/sync/useDurableLocalOutboxDrain.js +208 -0
  287. package/dist/hooks/sync/useDurableTaskCreateMutation.d.ts +15 -0
  288. package/dist/hooks/sync/useDurableTaskCreateMutation.js +152 -0
  289. package/dist/hooks/sync/useDurableTaskDeleteMutation.d.ts +11 -0
  290. package/dist/hooks/sync/useDurableTaskDeleteMutation.js +21 -0
  291. package/dist/hooks/sync/useDurableTaskLifecycleMutation.d.ts +12 -0
  292. package/dist/hooks/sync/useDurableTaskLifecycleMutation.js +22 -0
  293. package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +14 -0
  294. package/dist/hooks/sync/useDurableTaskMetadataMutation.js +24 -0
  295. package/dist/hooks/sync/useDurableTaskRestoreMutation.d.ts +12 -0
  296. package/dist/hooks/sync/useDurableTaskRestoreMutation.js +24 -0
  297. package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +18 -0
  298. package/dist/hooks/sync/useDurableTaskStatusMutation.js +23 -0
  299. package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.d.ts +23 -0
  300. package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +414 -0
  301. package/dist/hooks/sync/useSyncStatusActions.d.ts +2 -1
  302. package/dist/hooks/sync/useSyncStatusActions.js +8 -3
  303. package/dist/hooks/tasks/taskHttpMutation.d.ts +25 -0
  304. package/dist/hooks/tasks/taskHttpMutation.js +134 -0
  305. package/dist/hooks/tasks/useCurrentTaskRelations.d.ts +6 -1
  306. package/dist/hooks/tasks/useCurrentTaskRelations.js +32 -6
  307. package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +4 -3
  308. package/dist/hooks/tasks/useTaskEditorNavigation.js +9 -13
  309. package/dist/hooks/tasks/useTaskFormActions.d.ts +17 -2
  310. package/dist/hooks/tasks/useTaskFormActions.js +309 -55
  311. package/dist/hooks/tasks/useTaskReferenceContract.d.ts +5 -0
  312. package/dist/hooks/tasks/useTaskReferenceContract.js +17 -0
  313. package/dist/hooks/tasks/useTaskRelationships.d.ts +1 -3
  314. package/dist/hooks/tasks/useTaskRelationships.js +5 -25
  315. package/dist/hooks/tasks/useTrashSelection.d.ts +12 -0
  316. package/dist/hooks/tasks/useTrashSelection.js +49 -0
  317. package/dist/hooks/ui/useInitiativeTemplates.d.ts +24 -0
  318. package/dist/hooks/ui/useInitiativeTemplates.js +22 -0
  319. package/dist/hooks/ui/useSettingsModel.d.ts +5 -29
  320. package/dist/hooks/ui/useSettingsModel.js +31 -15
  321. package/dist/hooks/ui/useSettingsPersistence.d.ts +0 -1
  322. package/dist/hooks/ui/useSettingsPersistence.js +4 -8
  323. package/dist/hooks/ui/useSettingsTaxonomyManagement.js +31 -0
  324. package/dist/hooks/useFilterSort.d.ts +2 -2
  325. package/dist/hooks/useFilterSort.js +19 -15
  326. package/dist/hooks/useRealtimeSync.d.ts +10 -0
  327. package/dist/hooks/useRealtimeSync.js +57 -4
  328. package/dist/hooks/useSyncOrchestrator.d.ts +32 -1
  329. package/dist/hooks/useSyncOrchestrator.js +963 -287
  330. package/dist/hooks/useTaskData.d.ts +11 -2
  331. package/dist/hooks/useTaskData.js +59 -26
  332. package/dist/hooks/useTaskMutations.d.ts +42 -5
  333. package/dist/hooks/useTaskMutations.js +750 -125
  334. package/dist/hooks/useTaskforce.d.ts +114 -118
  335. package/dist/hooks/useTaskforce.js +1106 -396
  336. package/dist/hooks/useUiNotice.d.ts +5 -1
  337. package/dist/hooks/useUiNotice.js +13 -2
  338. package/dist/hooks/useWorkspaceSyncController.d.ts +9 -0
  339. package/dist/hooks/useWorkspaceSyncController.js +159 -17
  340. package/dist/hooks/workspace/usePersistedAppUiState.d.ts +74 -0
  341. package/dist/hooks/workspace/usePersistedAppUiState.js +325 -0
  342. package/dist/hooks/workspace/usePersistedLayoutUiState.d.ts +76 -0
  343. package/dist/hooks/workspace/usePersistedLayoutUiState.js +479 -0
  344. package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +2 -7
  345. package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +42 -31
  346. package/dist/hooks/workspace/workspaceLocalState.d.ts +42 -6
  347. package/dist/hooks/workspace/workspaceLocalState.js +213 -5
  348. package/dist/hooks/workstreams/workstreamHttpMutation.d.ts +23 -0
  349. package/dist/hooks/workstreams/workstreamHttpMutation.js +134 -0
  350. package/dist/localization/locales/en-US.d.ts +3 -3
  351. package/dist/localization/locales/en-US.js +3 -3
  352. package/dist/localization/locales/es-419.js +3 -3
  353. package/dist/localization/locales/pt-BR.js +3 -3
  354. package/dist/mcp/adminWorkspaceRegistrar.js +2 -40
  355. package/dist/mcp/aiProfileBootstrap.d.ts +3 -0
  356. package/dist/mcp/aiProfileBootstrap.js +4 -0
  357. package/dist/mcp/canonicalAssetHelpers.d.ts +16 -4
  358. package/dist/mcp/canonicalAssetHelpers.js +104 -35
  359. package/dist/mcp/clientIntegrations.d.ts +4 -2
  360. package/dist/mcp/clientIntegrations.js +104 -53
  361. package/dist/mcp/clientRegistry.d.ts +30 -0
  362. package/dist/mcp/clientRegistry.js +134 -0
  363. package/dist/mcp/collaborationRegistrar.js +21 -7
  364. package/dist/mcp/documentAssetRegistrar.js +227 -107
  365. package/dist/mcp/documentContentCommand.d.ts +94 -0
  366. package/dist/mcp/documentContentCommand.js +226 -0
  367. package/dist/mcp/documentHelpers.d.ts +14 -59
  368. package/dist/mcp/documentHelpers.js +52 -61
  369. package/dist/mcp/durableTaskMutationRouter.d.ts +65 -0
  370. package/dist/mcp/durableTaskMutationRouter.js +217 -0
  371. package/dist/mcp/durableTaskRelationshipMutationRouter.d.ts +38 -0
  372. package/dist/mcp/durableTaskRelationshipMutationRouter.js +168 -0
  373. package/dist/mcp/durableTaskRootMutationRouter.d.ts +64 -0
  374. package/dist/mcp/durableTaskRootMutationRouter.js +226 -0
  375. package/dist/mcp/gitWorktreeRoots.d.ts +2 -0
  376. package/dist/mcp/gitWorktreeRoots.js +19 -0
  377. package/dist/mcp/legacyServer.d.ts +1 -0
  378. package/dist/mcp/legacyServer.js +42 -0
  379. package/dist/mcp/localCliHealth.d.ts +56 -0
  380. package/dist/mcp/localCliHealth.js +170 -0
  381. package/dist/mcp/localServiceProxy.d.ts +23 -0
  382. package/dist/mcp/localServiceProxy.js +255 -0
  383. package/dist/mcp/mcpInputValidator.d.ts +17 -0
  384. package/dist/mcp/mcpInputValidator.js +58 -0
  385. package/dist/mcp/planningAttachmentCommandAdapter.d.ts +127 -0
  386. package/dist/mcp/planningAttachmentCommandAdapter.js +188 -0
  387. package/dist/mcp/programScaffoldCommandAdapter.d.ts +6 -0
  388. package/dist/mcp/programScaffoldCommandAdapter.js +39 -0
  389. package/dist/mcp/proxyServer.d.ts +1 -0
  390. package/dist/mcp/proxyServer.js +2 -0
  391. package/dist/mcp/runtime.d.ts +86 -1
  392. package/dist/mcp/runtime.js +4562 -2270
  393. package/dist/mcp/server.js +29 -2
  394. package/dist/mcp/sharedLocalServiceGateD.d.ts +115 -0
  395. package/dist/mcp/sharedLocalServiceGateD.js +344 -0
  396. package/dist/mcp/stdioLifecycle.d.ts +22 -0
  397. package/dist/mcp/stdioLifecycle.js +54 -0
  398. package/dist/mcp/taskAttachmentCommandAdapter.d.ts +190 -0
  399. package/dist/mcp/taskAttachmentCommandAdapter.js +464 -0
  400. package/dist/mcp/taskAttachmentHelpers.d.ts +8 -6
  401. package/dist/mcp/taskAttachmentHelpers.js +74 -2
  402. package/dist/mcp/taskAttachmentTypes.d.ts +26 -5
  403. package/dist/mcp/taskPlanCommand.d.ts +64 -0
  404. package/dist/mcp/taskPlanCommand.js +98 -0
  405. package/dist/mcp/taskPlanningRegistrar.js +253 -101
  406. package/dist/mcp/toolCallCompatibility.d.ts +6 -0
  407. package/dist/mcp/toolCallCompatibility.js +16 -0
  408. package/dist/mcp/toolCatalog.d.ts +3 -1
  409. package/dist/mcp/toolProfiles.d.ts +18 -0
  410. package/dist/mcp/toolProfiles.js +79 -0
  411. package/dist/mcp/toolRegistry.d.ts +102 -609
  412. package/dist/mcp/toolRegistry.js +108 -88
  413. package/dist/mcp/workflowExecutionRegistrar.d.ts +2 -0
  414. package/dist/mcp/workflowExecutionRegistrar.js +51 -0
  415. package/dist/migrations/taskSchemaMigrations.d.ts +35 -0
  416. package/dist/migrations/taskSchemaMigrations.js +1797 -4
  417. package/dist/migrations/taskUpdatedAtSyncDriftMigration.d.ts +20 -0
  418. package/dist/migrations/taskUpdatedAtSyncDriftMigration.js +153 -0
  419. package/dist/migrations/taskforceAgentDefinitionMigration.d.ts +26 -0
  420. package/dist/migrations/taskforceAgentDefinitionMigration.js +116 -0
  421. package/dist/plugins/vite.js +48 -17
  422. package/dist/public/Taskforce_Van.webp +0 -0
  423. package/dist/runtime/appGateDefinitions.d.ts +16 -10
  424. package/dist/runtime/appGateDefinitions.js +16 -10
  425. package/dist/runtime/appGates.d.ts +5 -4
  426. package/dist/runtime/appGates.js +4 -3
  427. package/dist/server/aiProfileAvatarAssets.d.ts +11 -8
  428. package/dist/server/aiProfileAvatarAssets.js +159 -70
  429. package/dist/server/auth.js +15 -1
  430. package/dist/server/cors.d.ts +2 -1
  431. package/dist/server/cors.js +45 -8
  432. package/dist/server/email.d.ts +3 -1
  433. package/dist/server/email.js +46 -8
  434. package/dist/server/index.d.ts +24 -1
  435. package/dist/server/index.js +342 -46
  436. package/dist/server/localDataOwnerPermit.d.ts +18 -0
  437. package/dist/server/localDataOwnerPermit.js +58 -0
  438. package/dist/server/localDatabaseIdentity.d.ts +14 -0
  439. package/dist/server/localDatabaseIdentity.js +69 -0
  440. package/dist/server/localRealtimeFileInvalidation.d.ts +1 -0
  441. package/dist/server/localRealtimeFileInvalidation.js +7 -0
  442. package/dist/server/localServiceLease.d.ts +62 -0
  443. package/dist/server/localServiceLease.js +477 -0
  444. package/dist/server/localServiceOwnershipBootstrap.d.ts +19 -0
  445. package/dist/server/localServiceOwnershipBootstrap.js +84 -0
  446. package/dist/server/localServiceSessions.d.ts +87 -0
  447. package/dist/server/localServiceSessions.js +309 -0
  448. package/dist/server/localServiceWindowsAcl.d.ts +8 -0
  449. package/dist/server/localServiceWindowsAcl.js +60 -0
  450. package/dist/server/localSyncProcessLockBootstrap.d.ts +3 -0
  451. package/dist/server/localSyncProcessLockBootstrap.js +16 -0
  452. package/dist/server/localWorkspaceSyncServerComposition.d.ts +59 -0
  453. package/dist/server/localWorkspaceSyncServerComposition.js +91 -0
  454. package/dist/server/localWorkspaceSyncServerRuntime.d.ts +119 -0
  455. package/dist/server/localWorkspaceSyncServerRuntime.js +1163 -0
  456. package/dist/server/rateLimit.d.ts +1 -0
  457. package/dist/server/rateLimit.js +16 -0
  458. package/dist/server/routes/admin.d.ts +2 -4
  459. package/dist/server/routes/admin.js +199 -337
  460. package/dist/server/routes/agentRoles.d.ts +13 -0
  461. package/dist/server/routes/agentRoles.js +273 -0
  462. package/dist/server/routes/agentSkills.d.ts +16 -0
  463. package/dist/server/routes/agentSkills.js +291 -0
  464. package/dist/server/routes/agents.d.ts +49 -0
  465. package/dist/server/routes/agents.js +1455 -0
  466. package/dist/server/routes/annotatedAttachments.js +46 -9
  467. package/dist/server/routes/assetAccess.d.ts +36 -0
  468. package/dist/server/routes/assetAccess.js +93 -0
  469. package/dist/server/routes/auth.d.ts +4 -3
  470. package/dist/server/routes/auth.js +236 -21
  471. package/dist/server/routes/authSupport.d.ts +3 -1
  472. package/dist/server/routes/authSupport.js +22 -8
  473. package/dist/server/routes/documentReviews.d.ts +2 -0
  474. package/dist/server/routes/documentReviews.js +155 -15
  475. package/dist/server/routes/documents.d.ts +1 -0
  476. package/dist/server/routes/documents.js +335 -141
  477. package/dist/server/routes/durableTaskHttpRouters.d.ts +165 -0
  478. package/dist/server/routes/durableTaskHttpRouters.js +89 -0
  479. package/dist/server/routes/localMcpHealth.d.ts +11 -0
  480. package/dist/server/routes/localMcpHealth.js +29 -0
  481. package/dist/server/routes/localService.d.ts +13 -0
  482. package/dist/server/routes/localService.js +444 -0
  483. package/dist/server/routes/localUpdate.d.ts +11 -0
  484. package/dist/server/routes/localUpdate.js +154 -0
  485. package/dist/server/routes/primitives.d.ts +27 -0
  486. package/dist/server/routes/primitives.js +18 -0
  487. package/dist/server/routes/resources.d.ts +1 -10
  488. package/dist/server/routes/resources.js +1 -153
  489. package/dist/server/routes/shared.d.ts +31 -2
  490. package/dist/server/routes/shared.js +394 -0
  491. package/dist/server/routes/sync.d.ts +2 -0
  492. package/dist/server/routes/sync.js +184 -272
  493. package/dist/server/routes/syncAuxRoutes.d.ts +3 -1
  494. package/dist/server/routes/syncAuxRoutes.js +9 -4
  495. package/dist/server/routes/syncCoordinatorLocalRoutes.d.ts +6 -0
  496. package/dist/server/routes/syncCoordinatorLocalRoutes.js +867 -0
  497. package/dist/server/routes/syncPullApplyRoutes.d.ts +29 -1
  498. package/dist/server/routes/syncPullApplyRoutes.js +520 -17
  499. package/dist/server/routes/syncPushRoutes.d.ts +33 -4
  500. package/dist/server/routes/syncPushRoutes.js +251 -62
  501. package/dist/server/routes/syncRouteTypes.d.ts +1 -1
  502. package/dist/server/routes/syncSnapshotRoutes.d.ts +15 -7
  503. package/dist/server/routes/syncSnapshotRoutes.js +95 -17
  504. package/dist/server/routes/syncV3DiagnosticsRoutes.d.ts +14 -0
  505. package/dist/server/routes/syncV3DiagnosticsRoutes.js +72 -0
  506. package/dist/server/routes/syncV3FeedRoutes.d.ts +20 -0
  507. package/dist/server/routes/syncV3FeedRoutes.js +462 -0
  508. package/dist/server/routes/syncV3LocalCaptureRoutes.d.ts +37 -0
  509. package/dist/server/routes/syncV3LocalCaptureRoutes.js +897 -0
  510. package/dist/server/routes/syncV3LocalDispatchRoutes.d.ts +17 -0
  511. package/dist/server/routes/syncV3LocalDispatchRoutes.js +280 -0
  512. package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +17 -0
  513. package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +493 -0
  514. package/dist/server/routes/syncV3LocalOwnershipRoutes.d.ts +10 -0
  515. package/dist/server/routes/syncV3LocalOwnershipRoutes.js +51 -0
  516. package/dist/server/routes/syncV3LocalRecoveryRoutes.d.ts +12 -0
  517. package/dist/server/routes/syncV3LocalRecoveryRoutes.js +78 -0
  518. package/dist/server/routes/syncV3OperationRoutes.d.ts +35 -0
  519. package/dist/server/routes/syncV3OperationRoutes.js +1136 -0
  520. package/dist/server/routes/tasks.d.ts +0 -2
  521. package/dist/server/routes/tasks.js +932 -195
  522. package/dist/server/routes/workflows.d.ts +26 -0
  523. package/dist/server/routes/workflows.js +500 -0
  524. package/dist/server/routes.d.ts +1 -6
  525. package/dist/server/routes.js +148 -339
  526. package/dist/server/smtpTransport.d.ts +11 -3
  527. package/dist/server/smtpTransport.js +9 -2
  528. package/dist/server/start.js +42 -10
  529. package/dist/service/localServiceCli.d.ts +33 -0
  530. package/dist/service/localServiceCli.js +365 -0
  531. package/dist/service/localServiceClientLifecycle.d.ts +25 -0
  532. package/dist/service/localServiceClientLifecycle.js +128 -0
  533. package/dist/service/localServiceOpen.d.ts +17 -0
  534. package/dist/service/localServiceOpen.js +27 -0
  535. package/dist/services/agentRoleResolver.d.ts +4 -0
  536. package/dist/services/agentRoleResolver.js +7 -0
  537. package/dist/services/aiProfileAvatarGenerationService.d.ts +41 -0
  538. package/dist/services/aiProfileAvatarGenerationService.js +158 -0
  539. package/dist/services/avatarImageProvider.d.ts +33 -0
  540. package/dist/services/avatarImageProvider.js +140 -0
  541. package/dist/services/bedrockAnthropicMessagesModelGateway.d.ts +24 -0
  542. package/dist/services/bedrockAnthropicMessagesModelGateway.js +95 -0
  543. package/dist/services/bedrockMantleModelGateway.d.ts +43 -0
  544. package/dist/services/bedrockMantleModelGateway.js +81 -0
  545. package/dist/services/bedrockModelGateway.d.ts +26 -0
  546. package/dist/services/bedrockModelGateway.js +94 -0
  547. package/dist/services/modelGateway.d.ts +82 -0
  548. package/dist/services/modelGateway.js +61 -0
  549. package/dist/services/taskforceAgentAvatarImageProvider.d.ts +8 -0
  550. package/dist/services/taskforceAgentAvatarImageProvider.js +24 -0
  551. package/dist/services/taskforceAgentMcpBridge.d.ts +77 -0
  552. package/dist/services/taskforceAgentMcpBridge.js +527 -0
  553. package/dist/shared/agentRoleDefinition.d.ts +34 -0
  554. package/dist/shared/agentRoleDefinition.js +207 -0
  555. package/dist/shared/aiProfileAvatarEligibility.d.ts +10 -0
  556. package/dist/shared/aiProfileAvatarEligibility.js +27 -0
  557. package/dist/shared/aiProfileColors.d.ts +7 -0
  558. package/dist/shared/aiProfileColors.js +33 -0
  559. package/dist/shared/colorPalette.d.ts +3 -0
  560. package/dist/shared/colorPalette.js +20 -0
  561. package/dist/shared/commentProvenance.d.ts +4 -0
  562. package/dist/shared/commentProvenance.js +6 -0
  563. package/dist/shared/deletedTaskRetention.d.ts +2 -0
  564. package/dist/shared/deletedTaskRetention.js +7 -0
  565. package/dist/shared/passwordPolicy.d.ts +2 -1
  566. package/dist/shared/passwordPolicy.js +9 -0
  567. package/dist/shared/taskDeepLinks.d.ts +28 -0
  568. package/dist/shared/taskDeepLinks.js +48 -0
  569. package/dist/shared/taskRestoreDestination.d.ts +2 -0
  570. package/dist/shared/taskRestoreDestination.js +5 -0
  571. package/dist/shared/taskforceAgentDefinition.d.ts +88 -0
  572. package/dist/shared/taskforceAgentDefinition.js +434 -0
  573. package/dist/shared/taskforceAgentExecutionSnapshot.d.ts +50 -0
  574. package/dist/shared/taskforceAgentExecutionSnapshot.js +68 -0
  575. package/dist/shared/taskforceAgentModels.d.ts +56 -0
  576. package/dist/shared/taskforceAgentModels.js +314 -0
  577. package/dist/shared/taskforceAgentRunContext.d.ts +23 -0
  578. package/dist/shared/taskforceAgentRunContext.js +21 -0
  579. package/dist/shared/taskforceAgentRuntimeResolution.d.ts +31 -0
  580. package/dist/shared/taskforceAgentRuntimeResolution.js +72 -0
  581. package/dist/shared/taskforceAgentSkill.d.ts +33 -0
  582. package/dist/shared/taskforceAgentSkill.js +149 -0
  583. package/dist/shared/taxonomyLibrary.js +1 -1
  584. package/dist/storage/agentRoleStore.d.ts +91 -0
  585. package/dist/storage/agentRoleStore.js +385 -0
  586. package/dist/storage/databaseAdapter.d.ts +1 -0
  587. package/dist/storage/databaseAdapter.js +7 -1
  588. package/dist/storage/documentIntegrity.d.ts +12 -3
  589. package/dist/storage/documentIntegrity.js +105 -27
  590. package/dist/storage/objectStorageClient.d.ts +10 -4
  591. package/dist/storage/objectStorageClient.js +73 -43
  592. package/dist/storage/postgresAdapter.d.ts +2 -1
  593. package/dist/storage/postgresAdapter.js +38 -6
  594. package/dist/storage/postgresWorker.js +65 -1
  595. package/dist/storage/sqliteAdapter.d.ts +1 -1
  596. package/dist/storage/sqliteAdapter.js +7 -1
  597. package/dist/storage/sqliteWalHealth.d.ts +71 -0
  598. package/dist/storage/sqliteWalHealth.js +176 -0
  599. package/dist/storage/taskDataPath.d.ts +1 -0
  600. package/dist/storage/taskDataPath.js +20 -0
  601. package/dist/storage/taskforceAgentConversationStore.d.ts +66 -0
  602. package/dist/storage/taskforceAgentConversationStore.js +264 -0
  603. package/dist/storage/taskforceAgentSkillStore.d.ts +93 -0
  604. package/dist/storage/taskforceAgentSkillStore.js +355 -0
  605. package/dist/storage/taskforceAgentStore.d.ts +105 -0
  606. package/dist/storage/taskforceAgentStore.js +549 -0
  607. package/dist/storage/workflowStore.d.ts +223 -0
  608. package/dist/storage/workflowStore.js +1032 -0
  609. package/dist/storage/workspaceAssetStore.d.ts +70 -0
  610. package/dist/storage/workspaceAssetStore.js +418 -25
  611. package/dist/sync/aiProfileAvatarSyncPaths.d.ts +14 -0
  612. package/dist/sync/aiProfileAvatarSyncPaths.js +56 -0
  613. package/dist/sync/cloudSyncApi.d.ts +329 -0
  614. package/dist/sync/cloudSyncApi.js +596 -4
  615. package/dist/sync/collaborationSyncPayload.d.ts +5 -1
  616. package/dist/sync/collaborationSyncPayload.js +213 -1
  617. package/dist/sync/collaborationSyncState.d.ts +23 -3
  618. package/dist/sync/collaborationSyncState.js +92 -3
  619. package/dist/sync/contentSyncPayload.d.ts +9 -0
  620. package/dist/sync/contentSyncPayload.js +29 -0
  621. package/dist/sync/contentSyncState.d.ts +79 -4
  622. package/dist/sync/contentSyncState.js +1113 -313
  623. package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.d.ts +39 -0
  624. package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.js +234 -0
  625. package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.d.ts +7 -0
  626. package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.js +10 -0
  627. package/dist/sync/coordinator/localSyncCommittedApplyPolicy.d.ts +7 -0
  628. package/dist/sync/coordinator/localSyncCommittedApplyPolicy.js +41 -0
  629. package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.d.ts +178 -0
  630. package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.js +131 -0
  631. package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.d.ts +25 -0
  632. package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.js +200 -0
  633. package/dist/sync/coordinator/localSyncCoordinatorHost.d.ts +84 -0
  634. package/dist/sync/coordinator/localSyncCoordinatorHost.js +435 -0
  635. package/dist/sync/coordinator/localSyncCoordinatorRouteServices.d.ts +33 -0
  636. package/dist/sync/coordinator/localSyncCoordinatorRouteServices.js +1 -0
  637. package/dist/sync/coordinator/localSyncCoordinatorStore.d.ts +122 -0
  638. package/dist/sync/coordinator/localSyncCoordinatorStore.js +1039 -0
  639. package/dist/sync/coordinator/localSyncCoordinatorTypes.d.ts +82 -0
  640. package/dist/sync/coordinator/localSyncCoordinatorTypes.js +9 -0
  641. package/dist/sync/coordinator/localSyncDispatchTracker.d.ts +15 -0
  642. package/dist/sync/coordinator/localSyncDispatchTracker.js +68 -0
  643. package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +200 -0
  644. package/dist/sync/coordinator/localSyncExecutionPermitStore.js +1388 -0
  645. package/dist/sync/coordinator/localSyncExecutionPermitTypes.d.ts +52 -0
  646. package/dist/sync/coordinator/localSyncExecutionPermitTypes.js +8 -0
  647. package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.d.ts +33 -0
  648. package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.js +83 -0
  649. package/dist/sync/coordinator/localSyncPermitTransactionHooks.d.ts +9 -0
  650. package/dist/sync/coordinator/localSyncPermitTransactionHooks.js +27 -0
  651. package/dist/sync/coordinator/localSyncProcessLock.d.ts +12 -0
  652. package/dist/sync/coordinator/localSyncProcessLock.js +212 -0
  653. package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.d.ts +17 -0
  654. package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.js +82 -0
  655. package/dist/sync/coordinator/localWorkspaceSyncRunner.d.ts +134 -0
  656. package/dist/sync/coordinator/localWorkspaceSyncRunner.js +981 -0
  657. package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +189 -0
  658. package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +961 -0
  659. package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.d.ts +19 -0
  660. package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.js +83 -0
  661. package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +117 -0
  662. package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +323 -0
  663. package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.d.ts +11 -0
  664. package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.js +51 -0
  665. package/dist/sync/coordinator/workspaceSyncTransportGateway.d.ts +139 -0
  666. package/dist/sync/coordinator/workspaceSyncTransportGateway.js +738 -0
  667. package/dist/sync/engine/localWorkspaceContentManifestService.d.ts +21 -0
  668. package/dist/sync/engine/localWorkspaceContentManifestService.js +44 -0
  669. package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.d.ts +36 -0
  670. package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.js +203 -0
  671. package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +21 -0
  672. package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.js +13 -0
  673. package/dist/sync/engine/workspaceSyncContentPullObligationStore.d.ts +65 -0
  674. package/dist/sync/engine/workspaceSyncContentPullObligationStore.js +160 -0
  675. package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +216 -0
  676. package/dist/sync/engine/workspaceSyncContentVersionStore.js +1068 -0
  677. package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.d.ts +28 -0
  678. package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +543 -0
  679. package/dist/sync/engine/workspaceSyncEngineContracts.d.ts +78 -0
  680. package/dist/sync/engine/workspaceSyncEngineContracts.js +1 -0
  681. package/dist/sync/engine/workspaceSyncEngineControlPlane.d.ts +37 -0
  682. package/dist/sync/engine/workspaceSyncEngineControlPlane.js +79 -0
  683. package/dist/sync/engine/workspaceSyncEngineIdentity.d.ts +1 -0
  684. package/dist/sync/engine/workspaceSyncEngineIdentity.js +4 -0
  685. package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.d.ts +68 -0
  686. package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +180 -0
  687. package/dist/sync/engine/workspaceSyncEngineLocalApply.d.ts +72 -0
  688. package/dist/sync/engine/workspaceSyncEngineLocalApply.js +132 -0
  689. package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +70 -0
  690. package/dist/sync/engine/workspaceSyncEngineLocalServices.js +25 -0
  691. package/dist/sync/engine/workspaceSyncEngineParity.d.ts +8 -0
  692. package/dist/sync/engine/workspaceSyncEngineParity.js +7 -0
  693. package/dist/sync/engine/workspaceSyncEnginePullPolicy.d.ts +32 -0
  694. package/dist/sync/engine/workspaceSyncEnginePullPolicy.js +27 -0
  695. package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +20 -0
  696. package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +87 -0
  697. package/dist/sync/engine/workspaceSyncEngineRecovery.d.ts +56 -0
  698. package/dist/sync/engine/workspaceSyncEngineRecovery.js +288 -0
  699. package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +104 -0
  700. package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +21 -0
  701. package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +61 -0
  702. package/dist/sync/engine/workspaceSyncEngineRuntime.js +59 -0
  703. package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.d.ts +28 -0
  704. package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.js +86 -0
  705. package/dist/sync/engine/workspaceSyncEngineServerLocalServices.d.ts +73 -0
  706. package/dist/sync/engine/workspaceSyncEngineServerLocalServices.js +452 -0
  707. package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.d.ts +23 -0
  708. package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +451 -0
  709. package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +125 -0
  710. package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +1124 -0
  711. package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.d.ts +63 -0
  712. package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +276 -0
  713. package/dist/sync/engine/workspaceSyncEngineTransferCompletion.d.ts +20 -0
  714. package/dist/sync/engine/workspaceSyncEngineTransferCompletion.js +37 -0
  715. package/dist/sync/engine/workspaceSyncEngineTransferTypes.d.ts +7 -0
  716. package/dist/sync/engine/workspaceSyncEngineTransferTypes.js +1 -0
  717. package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +240 -0
  718. package/dist/sync/engine/workspaceSyncEngineTransfers.js +1184 -0
  719. package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.d.ts +39 -0
  720. package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.js +39 -0
  721. package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.d.ts +25 -0
  722. package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.js +83 -0
  723. package/dist/sync/engine/workspaceSyncImmutableContentProvider.d.ts +71 -0
  724. package/dist/sync/engine/workspaceSyncImmutableContentProvider.js +209 -0
  725. package/dist/sync/engine/workspaceSyncImmutableContentStager.d.ts +32 -0
  726. package/dist/sync/engine/workspaceSyncImmutableContentStager.js +202 -0
  727. package/dist/sync/engine/workspaceSyncPublishedContentResolver.d.ts +43 -0
  728. package/dist/sync/engine/workspaceSyncPublishedContentResolver.js +142 -0
  729. package/dist/sync/engine/workspaceSyncServerContentRuntime.d.ts +26 -0
  730. package/dist/sync/engine/workspaceSyncServerContentRuntime.js +41 -0
  731. package/dist/sync/engine/workspaceSyncServerDataServices.d.ts +44 -0
  732. package/dist/sync/engine/workspaceSyncServerDataServices.js +143 -0
  733. package/dist/sync/engine/workspaceSyncTransferEvidence.d.ts +39 -0
  734. package/dist/sync/engine/workspaceSyncTransferEvidence.js +45 -0
  735. package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +44 -0
  736. package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +990 -0
  737. package/dist/sync/engine/workspaceSyncV2PreparedContent.d.ts +82 -0
  738. package/dist/sync/engine/workspaceSyncV2PreparedContent.js +219 -0
  739. package/dist/sync/planningCanonicalFields.d.ts +41 -0
  740. package/dist/sync/planningCanonicalFields.js +211 -0
  741. package/dist/sync/planningSyncPayload.d.ts +5 -1
  742. package/dist/sync/planningSyncPayload.js +88 -4
  743. package/dist/sync/syncApplyHandlers.d.ts +98 -8
  744. package/dist/sync/syncApplyHandlers.js +816 -78
  745. package/dist/sync/syncResourceAdapters.d.ts +10 -0
  746. package/dist/sync/syncResourceAdapters.js +21 -1
  747. package/dist/sync/syncService.d.ts +57 -1
  748. package/dist/sync/syncService.js +1085 -138
  749. package/dist/sync/taskNestedContent.d.ts +2 -0
  750. package/dist/sync/taskNestedContent.js +8 -0
  751. package/dist/sync/taskSyncChangeKey.js +0 -1
  752. package/dist/sync/taskSyncPayload.d.ts +0 -1
  753. package/dist/sync/taskSyncPayload.js +14 -3
  754. package/dist/sync/v3/canonicalWorkspaceSyncJson.d.ts +2 -0
  755. package/dist/sync/v3/canonicalWorkspaceSyncJson.js +26 -0
  756. package/dist/sync/v3/combinedFeedCapability.d.ts +21 -0
  757. package/dist/sync/v3/combinedFeedCapability.js +80 -0
  758. package/dist/sync/v3/combinedFeedPrerequisites.d.ts +18 -0
  759. package/dist/sync/v3/combinedFeedPrerequisites.js +184 -0
  760. package/dist/sync/v3/durableInitiativeMutationRouter.d.ts +61 -0
  761. package/dist/sync/v3/durableInitiativeMutationRouter.js +287 -0
  762. package/dist/sync/v3/durableOperationReplay.d.ts +36 -0
  763. package/dist/sync/v3/durableOperationReplay.js +103 -0
  764. package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +49 -0
  765. package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +198 -0
  766. package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +47 -0
  767. package/dist/sync/v3/durableTaskChecklistMutationRouter.js +182 -0
  768. package/dist/sync/v3/durableTaskCommentMutationRouter.d.ts +47 -0
  769. package/dist/sync/v3/durableTaskCommentMutationRouter.js +191 -0
  770. package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +60 -0
  771. package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +320 -0
  772. package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +40 -0
  773. package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +518 -0
  774. package/dist/sync/v3/durableTaxonomyMutationRouter.d.ts +63 -0
  775. package/dist/sync/v3/durableTaxonomyMutationRouter.js +289 -0
  776. package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +77 -0
  777. package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +361 -0
  778. package/dist/sync/v3/durableWorkstreamMutationRouter.d.ts +61 -0
  779. package/dist/sync/v3/durableWorkstreamMutationRouter.js +287 -0
  780. package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.d.ts +42 -0
  781. package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +122 -0
  782. package/dist/sync/v3/entityEventLegacyAdoptionContract.d.ts +6 -0
  783. package/dist/sync/v3/entityEventLegacyAdoptionContract.js +6 -0
  784. package/dist/sync/v3/entityEventLegacyAdoptionService.d.ts +62 -0
  785. package/dist/sync/v3/entityEventLegacyAdoptionService.js +180 -0
  786. package/dist/sync/v3/initiativeActivityAuthoritativeRevision.d.ts +11 -0
  787. package/dist/sync/v3/initiativeActivityAuthoritativeRevision.js +23 -0
  788. package/dist/sync/v3/initiativeActivityIdentity.d.ts +8 -0
  789. package/dist/sync/v3/initiativeActivityIdentity.js +14 -0
  790. package/dist/sync/v3/initiativeCoexistence.d.ts +26 -0
  791. package/dist/sync/v3/initiativeCoexistence.js +148 -0
  792. package/dist/sync/v3/initiativeFeedActivationCapability.d.ts +6 -0
  793. package/dist/sync/v3/initiativeFeedActivationCapability.js +16 -0
  794. package/dist/sync/v3/initiativeMutationPayload.d.ts +26 -0
  795. package/dist/sync/v3/initiativeMutationPayload.js +144 -0
  796. package/dist/sync/v3/initiativeMutationService.d.ts +62 -0
  797. package/dist/sync/v3/initiativeMutationService.js +206 -0
  798. package/dist/sync/v3/localEntityEventLegacyAdoption.d.ts +31 -0
  799. package/dist/sync/v3/localEntityEventLegacyAdoption.js +607 -0
  800. package/dist/sync/v3/localInitiativeOutboxHandler.d.ts +8 -0
  801. package/dist/sync/v3/localInitiativeOutboxHandler.js +88 -0
  802. package/dist/sync/v3/localInitiativeOutboxService.d.ts +50 -0
  803. package/dist/sync/v3/localInitiativeOutboxService.js +495 -0
  804. package/dist/sync/v3/localOperationIdentityStore.d.ts +81 -0
  805. package/dist/sync/v3/localOperationIdentityStore.js +388 -0
  806. package/dist/sync/v3/localOutboxDispatchCapability.d.ts +7 -0
  807. package/dist/sync/v3/localOutboxDispatchCapability.js +13 -0
  808. package/dist/sync/v3/localOutboxDispatchRuntime.d.ts +16 -0
  809. package/dist/sync/v3/localOutboxDispatchRuntime.js +269 -0
  810. package/dist/sync/v3/localOutboxDispatcher.d.ts +53 -0
  811. package/dist/sync/v3/localOutboxDispatcher.js +362 -0
  812. package/dist/sync/v3/localOutboxDrainClient.d.ts +50 -0
  813. package/dist/sync/v3/localOutboxDrainClient.js +250 -0
  814. package/dist/sync/v3/localOutboxOperationHandler.d.ts +31 -0
  815. package/dist/sync/v3/localOutboxOperationHandler.js +10 -0
  816. package/dist/sync/v3/localOutboxRecoveryClient.d.ts +14 -0
  817. package/dist/sync/v3/localOutboxRecoveryClient.js +45 -0
  818. package/dist/sync/v3/localOutboxRecoveryPreparationService.d.ts +12 -0
  819. package/dist/sync/v3/localOutboxRecoveryPreparationService.js +151 -0
  820. package/dist/sync/v3/localSyncIdentityStore.d.ts +9 -0
  821. package/dist/sync/v3/localSyncIdentityStore.js +43 -0
  822. package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.d.ts +10 -0
  823. package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.js +70 -0
  824. package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +45 -0
  825. package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +291 -0
  826. package/dist/sync/v3/localTaskChecklistOutboxHandler.d.ts +10 -0
  827. package/dist/sync/v3/localTaskChecklistOutboxHandler.js +54 -0
  828. package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +47 -0
  829. package/dist/sync/v3/localTaskChecklistOutboxService.js +221 -0
  830. package/dist/sync/v3/localTaskCommentOutboxHandler.d.ts +10 -0
  831. package/dist/sync/v3/localTaskCommentOutboxHandler.js +94 -0
  832. package/dist/sync/v3/localTaskCommentOutboxService.d.ts +75 -0
  833. package/dist/sync/v3/localTaskCommentOutboxService.js +391 -0
  834. package/dist/sync/v3/localTaskCreateClient.d.ts +27 -0
  835. package/dist/sync/v3/localTaskCreateClient.js +209 -0
  836. package/dist/sync/v3/localTaskCreateOutboxHandler.d.ts +8 -0
  837. package/dist/sync/v3/localTaskCreateOutboxHandler.js +147 -0
  838. package/dist/sync/v3/localTaskCreateOutboxService.d.ts +77 -0
  839. package/dist/sync/v3/localTaskCreateOutboxService.js +397 -0
  840. package/dist/sync/v3/localTaskDeleteClient.d.ts +10 -0
  841. package/dist/sync/v3/localTaskDeleteClient.js +23 -0
  842. package/dist/sync/v3/localTaskDeleteOutboxHandler.d.ts +8 -0
  843. package/dist/sync/v3/localTaskDeleteOutboxHandler.js +54 -0
  844. package/dist/sync/v3/localTaskDeleteOutboxService.d.ts +38 -0
  845. package/dist/sync/v3/localTaskDeleteOutboxService.js +235 -0
  846. package/dist/sync/v3/localTaskLegacyRootAdoption.d.ts +28 -0
  847. package/dist/sync/v3/localTaskLegacyRootAdoption.js +219 -0
  848. package/dist/sync/v3/localTaskLifecycleClient.d.ts +49 -0
  849. package/dist/sync/v3/localTaskLifecycleClient.js +57 -0
  850. package/dist/sync/v3/localTaskLifecycleOutboxHandler.d.ts +8 -0
  851. package/dist/sync/v3/localTaskLifecycleOutboxHandler.js +94 -0
  852. package/dist/sync/v3/localTaskLifecycleOutboxService.d.ts +60 -0
  853. package/dist/sync/v3/localTaskLifecycleOutboxService.js +304 -0
  854. package/dist/sync/v3/localTaskMetadataClient.d.ts +13 -0
  855. package/dist/sync/v3/localTaskMetadataClient.js +30 -0
  856. package/dist/sync/v3/localTaskMetadataOutboxHandler.d.ts +8 -0
  857. package/dist/sync/v3/localTaskMetadataOutboxHandler.js +70 -0
  858. package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +48 -0
  859. package/dist/sync/v3/localTaskMetadataOutboxService.js +229 -0
  860. package/dist/sync/v3/localTaskOperationClient.d.ts +72 -0
  861. package/dist/sync/v3/localTaskOperationClient.js +195 -0
  862. package/dist/sync/v3/localTaskRelationshipOutboxHandler.d.ts +8 -0
  863. package/dist/sync/v3/localTaskRelationshipOutboxHandler.js +114 -0
  864. package/dist/sync/v3/localTaskRelationshipOutboxService.d.ts +45 -0
  865. package/dist/sync/v3/localTaskRelationshipOutboxService.js +192 -0
  866. package/dist/sync/v3/localTaskRestoreClient.d.ts +13 -0
  867. package/dist/sync/v3/localTaskRestoreClient.js +32 -0
  868. package/dist/sync/v3/localTaskRestoreOutboxHandler.d.ts +8 -0
  869. package/dist/sync/v3/localTaskRestoreOutboxHandler.js +41 -0
  870. package/dist/sync/v3/localTaskRestoreOutboxService.d.ts +56 -0
  871. package/dist/sync/v3/localTaskRestoreOutboxService.js +323 -0
  872. package/dist/sync/v3/localTaskStatusClient.d.ts +17 -0
  873. package/dist/sync/v3/localTaskStatusClient.js +35 -0
  874. package/dist/sync/v3/localTaskStatusOutboxHandler.d.ts +8 -0
  875. package/dist/sync/v3/localTaskStatusOutboxHandler.js +75 -0
  876. package/dist/sync/v3/localTaskStatusOutboxService.d.ts +53 -0
  877. package/dist/sync/v3/localTaskStatusOutboxService.js +422 -0
  878. package/dist/sync/v3/localTaxonomyCompositeOutboxService.d.ts +34 -0
  879. package/dist/sync/v3/localTaxonomyCompositeOutboxService.js +290 -0
  880. package/dist/sync/v3/localTaxonomyOutboxHandler.d.ts +9 -0
  881. package/dist/sync/v3/localTaxonomyOutboxHandler.js +106 -0
  882. package/dist/sync/v3/localTaxonomyOutboxService.d.ts +30 -0
  883. package/dist/sync/v3/localTaxonomyOutboxService.js +181 -0
  884. package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.d.ts +8 -0
  885. package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.js +113 -0
  886. package/dist/sync/v3/localWorkflowRuntimeOutboxService.d.ts +37 -0
  887. package/dist/sync/v3/localWorkflowRuntimeOutboxService.js +330 -0
  888. package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.d.ts +63 -0
  889. package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.js +264 -0
  890. package/dist/sync/v3/localWorkstreamOutboxHandler.d.ts +8 -0
  891. package/dist/sync/v3/localWorkstreamOutboxHandler.js +102 -0
  892. package/dist/sync/v3/localWorkstreamOutboxService.d.ts +52 -0
  893. package/dist/sync/v3/localWorkstreamOutboxService.js +579 -0
  894. package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.d.ts +10 -0
  895. package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.js +57 -0
  896. package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.d.ts +30 -0
  897. package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.js +128 -0
  898. package/dist/sync/v3/planningActivation.d.ts +13 -0
  899. package/dist/sync/v3/planningActivation.js +33 -0
  900. package/dist/sync/v3/planningAttachmentActivityValidation.d.ts +9 -0
  901. package/dist/sync/v3/planningAttachmentActivityValidation.js +87 -0
  902. package/dist/sync/v3/programScaffoldService.d.ts +143 -0
  903. package/dist/sync/v3/programScaffoldService.js +478 -0
  904. package/dist/sync/v3/syncDurabilityStore.d.ts +773 -0
  905. package/dist/sync/v3/syncDurabilityStore.js +4635 -0
  906. package/dist/sync/v3/taskActivityAuthoritativeRevision.d.ts +16 -0
  907. package/dist/sync/v3/taskActivityAuthoritativeRevision.js +67 -0
  908. package/dist/sync/v3/taskActivityJournal.d.ts +20 -0
  909. package/dist/sync/v3/taskActivityJournal.js +195 -0
  910. package/dist/sync/v3/taskAttachmentLinksActivityIdentity.d.ts +6 -0
  911. package/dist/sync/v3/taskAttachmentLinksActivityIdentity.js +14 -0
  912. package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +111 -0
  913. package/dist/sync/v3/taskAttachmentLinksMutationService.js +202 -0
  914. package/dist/sync/v3/taskChecklistActivityIdentity.d.ts +6 -0
  915. package/dist/sync/v3/taskChecklistActivityIdentity.js +14 -0
  916. package/dist/sync/v3/taskChecklistMutationService.d.ts +92 -0
  917. package/dist/sync/v3/taskChecklistMutationService.js +156 -0
  918. package/dist/sync/v3/taskCommentActivityIdentity.d.ts +7 -0
  919. package/dist/sync/v3/taskCommentActivityIdentity.js +15 -0
  920. package/dist/sync/v3/taskCommentMutationService.d.ts +150 -0
  921. package/dist/sync/v3/taskCommentMutationService.js +392 -0
  922. package/dist/sync/v3/taskCommentReconcileProvenance.d.ts +58 -0
  923. package/dist/sync/v3/taskCommentReconcileProvenance.js +170 -0
  924. package/dist/sync/v3/taskCreateActivation.d.ts +19 -0
  925. package/dist/sync/v3/taskCreateActivation.js +84 -0
  926. package/dist/sync/v3/taskCreateActivityIdentity.d.ts +7 -0
  927. package/dist/sync/v3/taskCreateActivityIdentity.js +18 -0
  928. package/dist/sync/v3/taskCreateMutationService.d.ts +103 -0
  929. package/dist/sync/v3/taskCreateMutationService.js +283 -0
  930. package/dist/sync/v3/taskDeleteActivation.d.ts +7 -0
  931. package/dist/sync/v3/taskDeleteActivation.js +14 -0
  932. package/dist/sync/v3/taskDeleteMutationService.d.ts +35 -0
  933. package/dist/sync/v3/taskDeleteMutationService.js +133 -0
  934. package/dist/sync/v3/taskLegacyRootAdoptionService.d.ts +78 -0
  935. package/dist/sync/v3/taskLegacyRootAdoptionService.js +175 -0
  936. package/dist/sync/v3/taskLifecycleActivityIdentity.d.ts +9 -0
  937. package/dist/sync/v3/taskLifecycleActivityIdentity.js +18 -0
  938. package/dist/sync/v3/taskLifecycleMutationPayload.d.ts +5 -0
  939. package/dist/sync/v3/taskLifecycleMutationPayload.js +28 -0
  940. package/dist/sync/v3/taskLifecycleMutationService.d.ts +66 -0
  941. package/dist/sync/v3/taskLifecycleMutationService.js +92 -0
  942. package/dist/sync/v3/taskMetadataActivation.d.ts +12 -0
  943. package/dist/sync/v3/taskMetadataActivation.js +38 -0
  944. package/dist/sync/v3/taskMetadataActivityIdentity.d.ts +7 -0
  945. package/dist/sync/v3/taskMetadataActivityIdentity.js +18 -0
  946. package/dist/sync/v3/taskMetadataCoexistence.d.ts +37 -0
  947. package/dist/sync/v3/taskMetadataCoexistence.js +134 -0
  948. package/dist/sync/v3/taskMetadataMutationService.d.ts +71 -0
  949. package/dist/sync/v3/taskMetadataMutationService.js +199 -0
  950. package/dist/sync/v3/taskRelationshipLegacyAdoptionService.d.ts +48 -0
  951. package/dist/sync/v3/taskRelationshipLegacyAdoptionService.js +164 -0
  952. package/dist/sync/v3/taskRelationshipMutationService.d.ts +50 -0
  953. package/dist/sync/v3/taskRelationshipMutationService.js +148 -0
  954. package/dist/sync/v3/taskRestoreMutationService.d.ts +90 -0
  955. package/dist/sync/v3/taskRestoreMutationService.js +179 -0
  956. package/dist/sync/v3/taskStatusActivation.d.ts +7 -0
  957. package/dist/sync/v3/taskStatusActivation.js +15 -0
  958. package/dist/sync/v3/taskStatusMutationService.d.ts +76 -0
  959. package/dist/sync/v3/taskStatusMutationService.js +308 -0
  960. package/dist/sync/v3/taskWorkflowMutationPayload.d.ts +4 -0
  961. package/dist/sync/v3/taskWorkflowMutationPayload.js +22 -0
  962. package/dist/sync/v3/taskWorkflowMutationService.d.ts +64 -0
  963. package/dist/sync/v3/taskWorkflowMutationService.js +102 -0
  964. package/dist/sync/v3/taxonomyCoexistence.d.ts +10 -0
  965. package/dist/sync/v3/taxonomyCoexistence.js +19 -0
  966. package/dist/sync/v3/taxonomyCompositeMutationService.d.ts +110 -0
  967. package/dist/sync/v3/taxonomyCompositeMutationService.js +304 -0
  968. package/dist/sync/v3/taxonomyMutationService.d.ts +57 -0
  969. package/dist/sync/v3/taxonomyMutationService.js +106 -0
  970. package/dist/sync/v3/taxonomyStateMutation.d.ts +22 -0
  971. package/dist/sync/v3/taxonomyStateMutation.js +49 -0
  972. package/dist/sync/v3/taxonomySyncPayload.d.ts +9 -0
  973. package/dist/sync/v3/taxonomySyncPayload.js +199 -0
  974. package/dist/sync/v3/workflowAssignmentSync.d.ts +22 -0
  975. package/dist/sync/v3/workflowAssignmentSync.js +213 -0
  976. package/dist/sync/v3/workflowRuntimeMutationService.d.ts +89 -0
  977. package/dist/sync/v3/workflowRuntimeMutationService.js +359 -0
  978. package/dist/sync/v3/workflowRuntimeOperationIdentity.d.ts +13 -0
  979. package/dist/sync/v3/workflowRuntimeOperationIdentity.js +35 -0
  980. package/dist/sync/v3/workflowRuntimeSync.d.ts +141 -0
  981. package/dist/sync/v3/workflowRuntimeSync.js +485 -0
  982. package/dist/sync/v3/workspaceSyncJournalReader.d.ts +43 -0
  983. package/dist/sync/v3/workspaceSyncJournalReader.js +45 -0
  984. package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.d.ts +28 -0
  985. package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.js +81 -0
  986. package/dist/sync/v3/workspaceSyncPayloadFingerprint.d.ts +1 -0
  987. package/dist/sync/v3/workspaceSyncPayloadFingerprint.js +5 -0
  988. package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +16 -0
  989. package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +161 -0
  990. package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +83 -0
  991. package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +161 -0
  992. package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +16 -0
  993. package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +90 -0
  994. package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.d.ts +65 -0
  995. package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +356 -0
  996. package/dist/sync/v3/workspaceSyncV3CombinedCoverage.d.ts +51 -0
  997. package/dist/sync/v3/workspaceSyncV3CombinedCoverage.js +171 -0
  998. package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.d.ts +43 -0
  999. package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +535 -0
  1000. package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.d.ts +50 -0
  1001. package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +1149 -0
  1002. package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.d.ts +96 -0
  1003. package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.js +672 -0
  1004. package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +42 -0
  1005. package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +598 -0
  1006. package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +65 -0
  1007. package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +505 -0
  1008. package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +78 -0
  1009. package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +511 -0
  1010. package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +45 -0
  1011. package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +125 -0
  1012. package/dist/sync/v3/workspaceSyncV3CoverageRegistry.d.ts +13 -0
  1013. package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +34 -0
  1014. package/dist/sync/v3/workspaceSyncV3CursorEncoding.d.ts +1 -0
  1015. package/dist/sync/v3/workspaceSyncV3CursorEncoding.js +6 -0
  1016. package/dist/sync/v3/workspaceSyncV3DomainAdmission.d.ts +43 -0
  1017. package/dist/sync/v3/workspaceSyncV3DomainAdmission.js +118 -0
  1018. package/dist/sync/v3/workspaceSyncV3Feed.d.ts +95 -0
  1019. package/dist/sync/v3/workspaceSyncV3Feed.js +243 -0
  1020. package/dist/sync/v3/workspaceSyncV3FeedApply.d.ts +13 -0
  1021. package/dist/sync/v3/workspaceSyncV3FeedApply.js +67 -0
  1022. package/dist/sync/v3/workspaceSyncV3FeedClientContract.d.ts +3 -0
  1023. package/dist/sync/v3/workspaceSyncV3FeedClientContract.js +46 -0
  1024. package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.d.ts +10 -0
  1025. package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.js +58 -0
  1026. package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.d.ts +31 -0
  1027. package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.js +228 -0
  1028. package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +32 -0
  1029. package/dist/sync/v3/workspaceSyncV3FeedProfile.js +21 -0
  1030. package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.d.ts +36 -0
  1031. package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.js +163 -0
  1032. package/dist/sync/v3/workspaceSyncV3InitiativeRepair.d.ts +33 -0
  1033. package/dist/sync/v3/workspaceSyncV3InitiativeRepair.js +118 -0
  1034. package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +10 -0
  1035. package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +45 -0
  1036. package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.d.ts +27 -0
  1037. package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.js +83 -0
  1038. package/dist/sync/v3/workspaceSyncV3NestedCoverage.d.ts +10 -0
  1039. package/dist/sync/v3/workspaceSyncV3NestedCoverage.js +40 -0
  1040. package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +83 -0
  1041. package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +325 -0
  1042. package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +59 -0
  1043. package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +302 -0
  1044. package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +47 -0
  1045. package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +329 -0
  1046. package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +19 -0
  1047. package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +41 -0
  1048. package/dist/sync/v3/workspaceSyncV3NestedWireContract.d.ts +6 -0
  1049. package/dist/sync/v3/workspaceSyncV3NestedWireContract.js +16 -0
  1050. package/dist/sync/v3/workspaceSyncV3OperationProjection.d.ts +8 -0
  1051. package/dist/sync/v3/workspaceSyncV3OperationProjection.js +52 -0
  1052. package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +229 -0
  1053. package/dist/sync/v3/workspaceSyncV3OperationProtocol.js +1 -0
  1054. package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +165 -0
  1055. package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +414 -0
  1056. package/dist/sync/v3/workspaceSyncV3OriginActor.d.ts +36 -0
  1057. package/dist/sync/v3/workspaceSyncV3OriginActor.js +61 -0
  1058. package/dist/sync/v3/workspaceSyncV3OriginAssertion.d.ts +46 -0
  1059. package/dist/sync/v3/workspaceSyncV3OriginAssertion.js +121 -0
  1060. package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.d.ts +1 -0
  1061. package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.js +1 -0
  1062. package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.d.ts +10 -0
  1063. package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.js +34 -0
  1064. package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.d.ts +6 -0
  1065. package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.js +10 -0
  1066. package/dist/sync/v3/workspaceSyncV3ProjectionState.d.ts +105 -0
  1067. package/dist/sync/v3/workspaceSyncV3ProjectionState.js +467 -0
  1068. package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.d.ts +56 -0
  1069. package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +250 -0
  1070. package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.d.ts +30 -0
  1071. package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.js +142 -0
  1072. package/dist/sync/v3/workspaceSyncV3TaskRootProjection.d.ts +40 -0
  1073. package/dist/sync/v3/workspaceSyncV3TaskRootProjection.js +246 -0
  1074. package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.d.ts +39 -0
  1075. package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.js +185 -0
  1076. package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.d.ts +10 -0
  1077. package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.js +36 -0
  1078. package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.d.ts +17 -0
  1079. package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.js +143 -0
  1080. package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.d.ts +9 -0
  1081. package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.js +195 -0
  1082. package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.d.ts +11 -0
  1083. package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.js +12 -0
  1084. package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.d.ts +4 -0
  1085. package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.js +98 -0
  1086. package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.d.ts +9 -0
  1087. package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.js +72 -0
  1088. package/dist/sync/v3/workstreamActivityAuthoritativeRevision.d.ts +11 -0
  1089. package/dist/sync/v3/workstreamActivityAuthoritativeRevision.js +23 -0
  1090. package/dist/sync/v3/workstreamActivityIdentity.d.ts +8 -0
  1091. package/dist/sync/v3/workstreamActivityIdentity.js +14 -0
  1092. package/dist/sync/v3/workstreamCoexistence.d.ts +19 -0
  1093. package/dist/sync/v3/workstreamCoexistence.js +64 -0
  1094. package/dist/sync/v3/workstreamMutationPayload.d.ts +27 -0
  1095. package/dist/sync/v3/workstreamMutationPayload.js +147 -0
  1096. package/dist/sync/v3/workstreamMutationService.d.ts +72 -0
  1097. package/dist/sync/v3/workstreamMutationService.js +256 -0
  1098. package/dist/sync/v3/workstreamTaskOrderMutationService.d.ts +55 -0
  1099. package/dist/sync/v3/workstreamTaskOrderMutationService.js +110 -0
  1100. package/dist/sync/v3/workstreamTaskOrderSync.d.ts +14 -0
  1101. package/dist/sync/v3/workstreamTaskOrderSync.js +25 -0
  1102. package/dist/sync/workspaceContentManifest.d.ts +86 -0
  1103. package/dist/sync/workspaceContentManifest.js +123 -0
  1104. package/dist/sync/workspacePullFeed.d.ts +186 -2
  1105. package/dist/sync/workspacePullFeed.js +513 -136
  1106. package/dist/sync/workspacePushPreparedPlan.d.ts +21 -0
  1107. package/dist/sync/workspacePushPreparedPlan.js +1 -0
  1108. package/dist/sync/workspaceRepair.d.ts +17 -25
  1109. package/dist/sync/workspaceRepair.js +348 -25
  1110. package/dist/sync/workspaceSyncContentDecryption.d.ts +6 -0
  1111. package/dist/sync/workspaceSyncContentDecryption.js +11 -0
  1112. package/dist/sync/workspaceSyncModel.d.ts +216 -5
  1113. package/dist/sync/workspaceSyncModel.js +371 -35
  1114. package/dist/sync/workspaceSyncSnapshotProjection.d.ts +11 -0
  1115. package/dist/sync/workspaceSyncSnapshotProjection.js +101 -0
  1116. package/dist/sync/workspaceSyncState.d.ts +13 -0
  1117. package/dist/sync/workspaceSyncState.js +36 -0
  1118. package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +106 -0
  1119. package/dist/sync/workspaceSyncV2SnapshotBuilder.js +193 -0
  1120. package/dist/types.d.ts +23 -15
  1121. package/dist/types.js +2 -4
  1122. package/dist/ui/ai-profile-clients/amazon-nova.svg +1 -0
  1123. package/dist/ui/ai-profile-clients/antigravity.png +0 -0
  1124. package/dist/ui/ai-profile-clients/chatgpt.svg +10 -0
  1125. package/dist/ui/ai-profile-clients/claude-chat.svg +1 -0
  1126. package/dist/ui/ai-profile-clients/claude-code.svg +15 -0
  1127. package/dist/ui/ai-profile-clients/cline-app-icon-light.png +0 -0
  1128. package/dist/ui/ai-profile-clients/cline.svg +16 -0
  1129. package/dist/ui/ai-profile-clients/codex.svg +1 -0
  1130. package/dist/ui/ai-profile-clients/copilot.png +0 -0
  1131. package/dist/ui/ai-profile-clients/cursor.svg +1 -0
  1132. package/dist/ui/ai-profile-clients/deepseek.svg +1 -0
  1133. package/dist/ui/ai-profile-clients/gemini-cli-icon.png +0 -0
  1134. package/dist/ui/ai-profile-clients/gemini.svg +10 -0
  1135. package/dist/ui/ai-profile-clients/grok.svg +31 -0
  1136. package/dist/ui/ai-profile-clients/kiro.svg +11 -0
  1137. package/dist/ui/ai-profile-clients/llama.svg +1 -0
  1138. package/dist/ui/ai-profile-clients/mistral.svg +1 -0
  1139. package/dist/ui/ai-profile-clients/ms_copilot.jpeg +0 -0
  1140. package/dist/ui/ai-profile-clients/openclaw.png +0 -0
  1141. package/dist/ui/ai-profile-clients/perplexity.svg +1 -0
  1142. package/dist/ui/ai-profile-clients/vscode.svg +41 -0
  1143. package/dist/ui/ai-profile-clients/windsurf.svg +11 -0
  1144. package/dist/ui/assets/AiIdentityRosterCard-DB1BLO_j.js +1 -0
  1145. package/dist/ui/assets/AiProfilesModule-DPxQeF9N.js +1 -0
  1146. package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +1 -0
  1147. package/dist/ui/assets/AnnotatedAttachmentWorkspace-DHNYaNg6.js +3 -0
  1148. package/dist/ui/assets/AssetTraySortControl-B9k5caQW.css +1 -0
  1149. package/dist/ui/assets/AssetTraySortControl-DphbyHVc.js +1 -0
  1150. package/dist/ui/assets/ContextAttachmentManager-CMxSzHqc.js +3 -0
  1151. package/dist/ui/assets/DocumentWorkspace-BC7sy5TG.js +261 -0
  1152. package/dist/ui/assets/DocumentWorkspace-BIBGBfd7.css +1 -0
  1153. package/dist/ui/assets/EntityActivityTimeline-BfJbZRdl.css +1 -0
  1154. package/dist/ui/assets/EntityActivityTimeline-pJ2ZjZ-k.js +1 -0
  1155. package/dist/ui/assets/PlanningModule-CeTqXMMz.css +1 -0
  1156. package/dist/ui/assets/PlanningModule-t5GbvVR9.js +1 -0
  1157. package/dist/ui/assets/PlansPage-BVH_NfgT.js +1 -0
  1158. package/dist/ui/assets/PlansPage-C2nkK2Bp.css +1 -0
  1159. package/dist/ui/assets/TaskContextUpload-Ds4LnDzV.css +1 -0
  1160. package/dist/ui/assets/TaskContextUpload-bl4fOOUz.js +1 -0
  1161. package/dist/ui/assets/TaskSettings-xVsxSa0g.js +12 -0
  1162. package/dist/ui/assets/TaskforceAgentsModule-CkAxW19K.js +21 -0
  1163. package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +1 -0
  1164. package/dist/ui/assets/WorkflowManagerModule-BKqIGVnF.js +1 -0
  1165. package/dist/ui/assets/WorkflowManagerModule-DF10XENz.css +1 -0
  1166. package/dist/ui/assets/antigravity-DRKQga2U.png +0 -0
  1167. package/dist/ui/assets/cursor-BM_3k4Y4.svg +1 -0
  1168. package/dist/ui/assets/gemini-cli-icon-dBAVjCcn.png +0 -0
  1169. package/dist/ui/assets/grok-BuodbWaG.svg +31 -0
  1170. package/dist/ui/assets/index-BzJlVnNS.css +1 -0
  1171. package/dist/ui/assets/index-Cx7vZJHL.js +7 -0
  1172. package/dist/ui/assets/{vendor-dnd-DRzYolkg.js → vendor-dnd-CJ-AjP-Y.js} +1 -1
  1173. package/dist/ui/assets/{vendor-icons-CLnehDTw.js → vendor-icons-B8ZNsH1g.js} +1 -1
  1174. package/dist/ui/assets/{vendor-markdown-BUxTU7dS.js → vendor-markdown-_lhNCyq-.js} +9 -9
  1175. package/dist/ui/assets/vendor-router-AqJMU8Lz.js +3 -0
  1176. package/dist/ui/assets/vscode-C_7wk1WI.svg +41 -0
  1177. package/dist/ui/branding/logos/logo_dark_bg.png +0 -0
  1178. package/dist/ui/branding/logos/logo_favicon_dark.png +0 -0
  1179. package/dist/ui/branding/logos/logo_favicon_dark.svg +56 -0
  1180. package/dist/ui/branding/logos/logo_favicon_light.png +0 -0
  1181. package/dist/ui/branding/logos/logo_light_bg.png +0 -0
  1182. package/dist/ui/images/Taskforce_Van.webp +0 -0
  1183. package/dist/ui/index.html +6 -6
  1184. package/dist/update/uiUpdateService.d.ts +43 -0
  1185. package/dist/update/uiUpdateService.js +149 -0
  1186. package/dist/update/updateCli.d.ts +15 -0
  1187. package/dist/update/updateCli.js +76 -0
  1188. package/dist/update/updateExecutor.d.ts +40 -0
  1189. package/dist/update/updateExecutor.js +474 -0
  1190. package/dist/update/updateStatus.d.ts +83 -0
  1191. package/dist/update/updateStatus.js +703 -0
  1192. package/dist/utils/aiProfileAvatarPaths.d.ts +14 -0
  1193. package/dist/utils/aiProfileAvatarPaths.js +52 -0
  1194. package/dist/utils/aiProfileDefaultLogo.d.ts +7 -0
  1195. package/dist/utils/aiProfileDefaultLogo.js +84 -0
  1196. package/dist/utils/aiProfileEvents.d.ts +9 -1
  1197. package/dist/utils/annotatedAttachments.d.ts +8 -0
  1198. package/dist/utils/annotatedAttachments.js +17 -1
  1199. package/dist/utils/assetTraySorting.d.ts +25 -0
  1200. package/dist/utils/assetTraySorting.js +83 -0
  1201. package/dist/utils/assignees.d.ts +5 -0
  1202. package/dist/utils/assignees.js +14 -9
  1203. package/dist/utils/authLogin.d.ts +10 -0
  1204. package/dist/utils/authLogin.js +8 -0
  1205. package/dist/utils/authSessionEvents.d.ts +2 -0
  1206. package/dist/utils/authSessionEvents.js +6 -0
  1207. package/dist/utils/avatarUpload.js +5 -5
  1208. package/dist/utils/canonicalReferenceAttachments.d.ts +12 -0
  1209. package/dist/utils/canonicalReferenceAttachments.js +42 -0
  1210. package/dist/utils/cloudAssetDisplay.d.ts +2 -0
  1211. package/dist/utils/cloudAssetDisplay.js +8 -0
  1212. package/dist/utils/constants.d.ts +4 -11
  1213. package/dist/utils/constants.js +5 -64
  1214. package/dist/utils/contextAttachmentPreview.d.ts +11 -0
  1215. package/dist/utils/contextAttachmentPreview.js +8 -0
  1216. package/dist/utils/contextAttachmentUpload.d.ts +8 -0
  1217. package/dist/utils/contextAttachmentUpload.js +144 -0
  1218. package/dist/utils/documentNames.js +6 -4
  1219. package/dist/utils/entityReferences.d.ts +14 -0
  1220. package/dist/utils/entityReferences.js +21 -0
  1221. package/dist/utils/httpSetCookie.d.ts +3 -0
  1222. package/dist/utils/httpSetCookie.js +22 -0
  1223. package/dist/utils/imageNoteStoragePaths.d.ts +3 -0
  1224. package/dist/utils/imageNoteStoragePaths.js +19 -0
  1225. package/dist/utils/imageReferences.d.ts +6 -0
  1226. package/dist/utils/imageReferences.js +1 -0
  1227. package/dist/utils/planningArchiveOrchestrator.d.ts +23 -0
  1228. package/dist/utils/planningArchiveOrchestrator.js +37 -0
  1229. package/dist/utils/planningArchivePresentation.d.ts +20 -0
  1230. package/dist/utils/planningArchivePresentation.js +23 -0
  1231. package/dist/utils/planningArchiveReadiness.d.ts +26 -0
  1232. package/dist/utils/planningArchiveReadiness.js +30 -0
  1233. package/dist/utils/planningFavorites.d.ts +7 -0
  1234. package/dist/utils/planningFavorites.js +34 -0
  1235. package/dist/utils/syncEventPresentation.js +53 -0
  1236. package/dist/utils/syncStatusPresentation.d.ts +25 -0
  1237. package/dist/utils/syncStatusPresentation.js +86 -5
  1238. package/dist/utils/taskActivity.d.ts +9 -2
  1239. package/dist/utils/taskActivity.js +61 -0
  1240. package/dist/utils/taskDraftDefaults.d.ts +0 -8
  1241. package/dist/utils/taskDraftDefaults.js +0 -4
  1242. package/dist/utils/taskEvents.d.ts +11 -0
  1243. package/dist/utils/taskEvents.js +6 -0
  1244. package/dist/utils/taskHeaderQuickFilter.d.ts +14 -0
  1245. package/dist/utils/taskHeaderQuickFilter.js +32 -0
  1246. package/dist/utils/taskInvalidation.d.ts +23 -0
  1247. package/dist/utils/taskInvalidation.js +67 -0
  1248. package/dist/utils/taskNormalization.d.ts +2 -1
  1249. package/dist/utils/taskNormalization.js +44 -18
  1250. package/dist/utils/taskReferences.d.ts +16 -0
  1251. package/dist/utils/taskReferences.js +63 -0
  1252. package/dist/utils/taskforceAgentEvents.d.ts +8 -0
  1253. package/dist/utils/taskforceAgentEvents.js +6 -0
  1254. package/dist/utils/taskforceAgentSkillEvents.d.ts +7 -0
  1255. package/dist/utils/taskforceAgentSkillEvents.js +8 -0
  1256. package/dist/utils/theme.js +1 -1
  1257. package/dist/utils/uiNotice.d.ts +3 -0
  1258. package/dist/utils/uiNotice.js +1 -1
  1259. package/dist/utils/workspaceResourceEvents.d.ts +7 -0
  1260. package/dist/utils/workspaceResourceEvents.js +6 -0
  1261. package/dist/utils/workspaceSyncPresentation.d.ts +24 -0
  1262. package/dist/utils/workspaceSyncPresentation.js +243 -6
  1263. package/package.json +69 -21
  1264. package/dist/components/features/AgentsModule.d.ts +0 -18
  1265. package/dist/components/features/AgentsModule.js +0 -479
  1266. package/dist/components/features/InitiativesModule.d.ts +0 -22
  1267. package/dist/components/features/InitiativesModule.js +0 -33
  1268. package/dist/components/features/WorkflowsModule.d.ts +0 -27
  1269. package/dist/components/features/WorkflowsModule.js +0 -21
  1270. package/dist/components/features/settings/WorkflowEditor.d.ts +0 -15
  1271. package/dist/components/features/settings/WorkflowEditor.js +0 -245
  1272. package/dist/components/views/panels/DocumentFilterToolbar.d.ts +0 -10
  1273. package/dist/components/views/panels/DocumentFilterToolbar.js +0 -7
  1274. package/dist/components/views/standalone/modals/AccountHubModal.d.ts +0 -61
  1275. package/dist/components/views/standalone/modals/AccountHubModal.js +0 -108
  1276. package/dist/components/views/standalone/modals/EditProfileModal.d.ts +0 -19
  1277. package/dist/components/views/standalone/modals/EditProfileModal.js +0 -11
  1278. package/dist/hooks/ui/useResourceExport.d.ts +0 -21
  1279. package/dist/hooks/ui/useResourceExport.js +0 -87
  1280. package/dist/hooks/ui/useWorkflowTemplates.d.ts +0 -37
  1281. package/dist/hooks/ui/useWorkflowTemplates.js +0 -116
  1282. package/dist/mcp/clientProfileDefaults.d.ts +0 -12
  1283. package/dist/mcp/clientProfileDefaults.js +0 -37
  1284. package/dist/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
  1285. package/dist/resources/templates/environments/aider.yaml +0 -14
  1286. package/dist/resources/templates/environments/antigravity.yaml +0 -10
  1287. package/dist/resources/templates/environments/claude.yaml +0 -10
  1288. package/dist/resources/templates/environments/cline.yaml +0 -10
  1289. package/dist/resources/templates/environments/codex.yaml +0 -13
  1290. package/dist/resources/templates/environments/copilot.yaml +0 -10
  1291. package/dist/resources/templates/environments/cursor.yaml +0 -9
  1292. package/dist/resources/templates/environments/gemini.yaml +0 -9
  1293. package/dist/resources/templates/environments/windsurf.yaml +0 -10
  1294. package/dist/resources/templates/workflow-sources/README.md +0 -9
  1295. package/dist/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
  1296. package/dist/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
  1297. package/dist/resources/templates/workflows/collaborate.yaml +0 -110
  1298. package/dist/resources/templates/workflows/do.yaml +0 -88
  1299. package/dist/resources/templates/workflows/evaluate.yaml +0 -117
  1300. package/dist/resources/templates/workflows/execute.yaml +0 -159
  1301. package/dist/resources/templates/workflows/plan.yaml +0 -119
  1302. package/dist/resources/templates/workflows/review.yaml +0 -115
  1303. package/dist/services/formatTransformers.d.ts +0 -29
  1304. package/dist/services/formatTransformers.js +0 -56
  1305. package/dist/services/templateEngine.d.ts +0 -46
  1306. package/dist/services/templateEngine.js +0 -148
  1307. package/dist/shared/workflowDefaults.d.ts +0 -9
  1308. package/dist/shared/workflowDefaults.js +0 -11
  1309. package/dist/ui/agent-logos/Gemini CLI.jpeg +0 -0
  1310. package/dist/ui/agent-logos/antigravity.jpeg +0 -0
  1311. package/dist/ui/agent-logos/chatgpt.png +0 -0
  1312. package/dist/ui/agent-logos/claude-code.jpeg +0 -0
  1313. package/dist/ui/agent-logos/codex.jpeg +0 -0
  1314. package/dist/ui/agent-logos/cursor.png +0 -0
  1315. package/dist/ui/agent-logos/openclaw.jpeg +0 -0
  1316. package/dist/ui/agent-logos/windsurf.png +0 -0
  1317. package/dist/ui/assets/AgentsModule-DvkbUHi0.js +0 -1
  1318. package/dist/ui/assets/AnnotatedAttachmentWorkspace-BVKew-mH.css +0 -1
  1319. package/dist/ui/assets/AnnotatedAttachmentWorkspace-jhOhxqHT.js +0 -3
  1320. package/dist/ui/assets/ContextAttachmentManager-BAmEyLHL.js +0 -3
  1321. package/dist/ui/assets/DocumentWorkspace-D4rJKXzd.css +0 -1
  1322. package/dist/ui/assets/DocumentWorkspace-X-CpD5OO.js +0 -252
  1323. package/dist/ui/assets/EntityActivityTimeline-DD33onAC.js +0 -1
  1324. package/dist/ui/assets/EntityActivityTimeline-DyqvvhuF.css +0 -1
  1325. package/dist/ui/assets/InitiativesModule-5nDXtIjf.js +0 -1
  1326. package/dist/ui/assets/PlansPage-B8nDR1hQ.js +0 -1
  1327. package/dist/ui/assets/PlansPage-DeAzWYTb.css +0 -1
  1328. package/dist/ui/assets/TaskContextUpload-DrGrXJHm.js +0 -1
  1329. package/dist/ui/assets/TaskSettings-BXVvZZwH.js +0 -9
  1330. package/dist/ui/assets/WorkflowsModule-DWCGhEWT.js +0 -5
  1331. package/dist/ui/assets/documentReferences-Crup321p.js +0 -1
  1332. package/dist/ui/assets/index-B9k24Aym.js +0 -5
  1333. package/dist/ui/assets/index-DNeR5dYW.css +0 -1
  1334. package/dist/ui/assets/vendor-router-BbWMxlnO.js +0 -3
  1335. package/dist/ui/branding/logos/logo_black_01.png +0 -0
  1336. package/dist/ui/branding/logos/logo_black_02.png +0 -0
  1337. package/dist/ui/branding/logos/logo_white_01.png +0 -0
  1338. package/dist/ui/branding/logos/logo_white_02.png +0 -0
  1339. package/scripts/generate-workflow-templates.mjs +0 -134
  1340. package/src/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
  1341. package/src/resources/templates/environments/aider.yaml +0 -14
  1342. package/src/resources/templates/environments/antigravity.yaml +0 -10
  1343. package/src/resources/templates/environments/claude.yaml +0 -10
  1344. package/src/resources/templates/environments/cline.yaml +0 -10
  1345. package/src/resources/templates/environments/codex.yaml +0 -13
  1346. package/src/resources/templates/environments/copilot.yaml +0 -10
  1347. package/src/resources/templates/environments/cursor.yaml +0 -9
  1348. package/src/resources/templates/environments/gemini.yaml +0 -9
  1349. package/src/resources/templates/environments/windsurf.yaml +0 -10
  1350. package/src/resources/templates/workflow-sources/README.md +0 -9
  1351. package/src/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
  1352. package/src/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
  1353. package/src/resources/templates/workflows/collaborate.yaml +0 -110
  1354. package/src/resources/templates/workflows/do.yaml +0 -88
  1355. package/src/resources/templates/workflows/evaluate.yaml +0 -117
  1356. package/src/resources/templates/workflows/execute.yaml +0 -159
  1357. package/src/resources/templates/workflows/plan.yaml +0 -119
  1358. package/src/resources/templates/workflows/review.yaml +0 -115
  1359. /package/dist/ui/branding/logos/{logo_dark.svg → logo_dark_no_bg.svg} +0 -0
  1360. /package/dist/ui/branding/logos/{logo_favicon.svg → logo_favicon_light.svg} +0 -0
  1361. /package/dist/ui/branding/logos/{logo_light.svg → logo_light_no_bg.svg} +0 -0
@@ -0,0 +1,12 @@
1
+ import{r as i,j as e,R as Ms}from"./vendor-react-CKJs5o3c.js";import{g as fn,t as s,T as Ds,P as Qe,A as Es,I as xe,r as Q,D as jn,a as Ta,b as Cn,l as Ra,c as kn,M as Nn,n as Tn,d as wa}from"./index-Cx7vZJHL.js";import{T as Xe,P as ms,X as Bs,g as Ga,f as za,I as kt,aj as St,r as wn,h as _e,t as Sn,ak as Sa,q as Z,c as $n,al as $a,am as _a,an as $t,b as Oa,ao as _n,e as ne,i as Le,ap as Ln,aq as In,w as Mn,N as Fa,a as Nt,ar as Pn,aa as Tt,V as Ye,J as Bn,v as An,ae as La,as as Dn,at as En,au as Rn}from"./vendor-icons-B8ZNsH1g.js";import"./vendor-markdown-_lhNCyq-.js";import"./vendor-dnd-CJ-AjP-Y.js";import"./vendor-router-AqJMU8Lz.js";function Gn(n){return n==="general"?{}:{TASKFORCE_MCP_CLIENT_ID:n}}function zn(...n){const o=n.map(g=>String(g||"").trim().toLowerCase()).join("|");let d=2166136261,u=3339675911;for(let g=0;g<o.length;g+=1){const C=o.charCodeAt(g);d=Math.imul(d^C,16777619),u=Math.imul(u^C,2246822519)}return`mcp-${(d>>>0).toString(16).padStart(8,"0")}${(u>>>0).toString(16).padStart(8,"0")}`}const wt=fn();function _t(n,o){return String(n||"").toLowerCase().replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/-+/g,"-").replace(/^[-_]+|[-_]+$/g,"")||o.toLowerCase()}function On(n,o){const u=_t(n||o||"workspace","workspace").slice(0,25)||"workspace";return _t(`taskforce-${u}`,"taskforce-workspace")}function Fn(n){return{Authorization:`Bearer ${n.tokenValue}`,...n.clientId==="general"?{}:{"X-Taskforce-MCP-Client-ID":n.clientId}}}function he(n,o){return`${n} Use the generated config exactly as shown. Resolve your AI profile before the first write; stateless clients should keep the returned profileToken only in private client state.`}function ge(n){return`${n} Use the generated config exactly as shown. No connection token is required for local stdio MCP. Resolve your AI profile before the first write; stateless clients should keep the returned profileToken only in private client state.`}function As(n){return JSON.stringify(n)}function Ia(n){return`[${n.map(o=>As(o)).join(", ")}]`}function Ma(n){return!n||Object.keys(n).length===0?[]:[`env = { ${Object.entries(n).map(([o,d])=>`${o} = ${As(d)}`).join(", ")} }`]}function Pa(n){return/^[A-Za-z0-9_./:@%+=,-]+$/.test(n)?n:`'${n.replace(/'/g,`'"'"'`)}'`}function Hn(n){const{clientId:o,endpoint:d,tokenValue:u,serverId:g}=n,C=Fn(n);C.Authorization;const T=Object.entries(C).filter(([S])=>S!=="Authorization").map(([S,M])=>` --header "${S}: ${M}"`).join("");switch(o){case"general":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:d,headers:C},instructionLabel:"General MCP Configuration Instructions",instructionText:he("Add this server to your MCP client using its standard remote HTTP configuration format.")};case"cursor":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:d,headers:C},instructionLabel:"Cursor Configuration Instructions",instructionText:he("Open Cursor settings, find MCP servers, and paste this config.")};case"cline":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:d,type:"streamableHttp",headers:C},instructionLabel:"Cline Configuration Instructions",instructionText:he("Open Cline MCP Servers, add a remote server, or paste this into the Cline MCP config with Streamable HTTP selected.")};case"vscode":return{clientId:o,kind:"json",rootKey:"servers",serverConfig:{type:"http",url:d,headers:C},instructionLabel:"VS Code Configuration Instructions",instructionText:he("Open .vscode/mcp.json or MCP: Open User Configuration and add this server under the servers object.")};case"kiro":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:d,headers:C},instructionLabel:"Kiro Configuration Instructions",instructionText:he("Open .kiro/settings/mcp.json in your workspace (or ~/.kiro/settings/mcp.json for user-level config) and add this server under mcpServers.")};case"windsurf":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{serverUrl:d,headers:C},instructionLabel:"Windsurf Configuration Instructions",instructionText:he("Open Windsurf MCP settings, add a server, and paste this config.")};case"antigravity":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{serverUrl:d,headers:C},instructionLabel:"Antigravity Configuration Instructions",instructionText:he("Open Antigravity MCP settings, view the raw config, and paste this Antigravity-specific configuration.")};case"openclaw":return{clientId:o,kind:"json",rootKey:"servers",wrapperKeys:["mcp"],serverConfig:{transport:"streamable-http",url:d,headers:C},instructionLabel:"OpenClaw Configuration Instructions",instructionText:he("Open ~/.openclaw/openclaw.json and add this server under mcp.servers.")};case"codex":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${g}]`,`url = "${d}"`,`http_headers = { ${Object.entries(C).map(([S,M])=>`${S} = "${M}"`).join(", ")} }`].join(`
2
+ `),instructionLabel:"Codex Configuration Instructions",instructionText:he("Open ~/.codex/config.toml and add this Codex MCP entry.")};case"grok":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${g}]`,`url = "${d}"`,`headers = { ${Object.entries(C).map(([S,M])=>`${S} = "${M}"`).join(", ")} }`].join(`
3
+ `),instructionLabel:"Grok CLI Configuration Instructions",instructionText:he("Open ~/.grok/config.toml (or .grok/config.toml in your project for project-scoped config) and add this Grok CLI MCP entry.")};case"claude-code":return{clientId:o,kind:"text",renderedText:`claude mcp add --transport http ${g} ${d} --header "Authorization: Bearer ${u}"${T}`,instructionLabel:"Claude Code Configuration Instructions",instructionText:he("Run this Claude Code command in your terminal to add the remote Taskforce MCP server.")};case"gemini-cli":return{clientId:o,kind:"text",renderedText:`gemini mcp add ${g} ${d} --transport http --header "Authorization: Bearer ${u}"${T}`,instructionLabel:"Gemini CLI Configuration Instructions",instructionText:he("Run this Gemini CLI command in your terminal to add the remote Taskforce MCP server. Add --scope user if you want it available across all projects.")};case"claude-chat":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"Claude Chat Configuration Instructions",instructionText:"Open Claude Settings > Connectors, paste this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace."};case"grok-chat":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"Grok Configuration Instructions",instructionText:"Go to grok.com/connectors, create a custom connector with this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace."};case"gemini-chat":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"Gemini Spark Configuration Instructions",instructionText:"Open Gemini Settings & help > Connected Apps, add a custom app for Spark with this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace."};case"mistral-chat":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"Mistral Vibe Configuration Instructions",instructionText:"Open Mistral Vibe (formerly Le Chat) > Intelligence > Connectors, add a custom connector with this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace."};case"perplexity-chat":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"Perplexity Configuration Instructions",instructionText:"Open Perplexity Settings > Connectors, add a custom remote connector with this MCP server URL, choose OAuth, and complete the Taskforce authorization flow for one workspace."};case"chatgpt-desktop":return{clientId:o,kind:"text",renderedText:d,instructionLabel:"ChatGPT Desktop Configuration Instructions",instructionText:"Open ChatGPT Apps & Connectors / developer mode, paste this MCP server URL, and complete the Taskforce OAuth authorize flow when ChatGPT opens it."};default:{const S=o;throw new Error(`Unsupported MCP client: ${S}`)}}}function Un(n){const{clientId:o,serverId:d,serverConfig:u}=n,g={command:u.command,args:u.args,...u.env&&Object.keys(u.env).length>0?{env:u.env}:{}},C=Object.entries(u.env||{}).map(([S,M])=>` --env ${Pa(`${S}=${M}`)}`).join(""),T=[u.command,...u.args].map(S=>Pa(S)).join(" ");switch(o){case"general":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"General MCP Configuration Instructions",instructionText:ge("Add this server to your MCP client using its standard local stdio configuration format.")};case"cursor":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Cursor Configuration Instructions",instructionText:ge("Open Cursor settings, find MCP servers, and paste this local stdio config.")};case"cline":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Cline Configuration Instructions",instructionText:ge("Open Cline MCP Servers and paste this local stdio server config.")};case"vscode":return{clientId:o,kind:"json",rootKey:"servers",serverConfig:{type:"stdio",...g},instructionLabel:"VS Code Configuration Instructions",instructionText:ge("Open .vscode/mcp.json or MCP: Open User Configuration and add this server under the servers object.")};case"kiro":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Kiro Configuration Instructions",instructionText:ge("Open .kiro/settings/mcp.json in your workspace (or ~/.kiro/settings/mcp.json for user-level config) and add this server under mcpServers.")};case"windsurf":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Windsurf Configuration Instructions",instructionText:ge("Open Windsurf MCP settings and paste this local stdio config.")};case"antigravity":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Antigravity Configuration Instructions",instructionText:ge("Open Antigravity MCP settings, view the raw config, and paste this local stdio configuration.")};case"openclaw":return{clientId:o,kind:"json",rootKey:"servers",wrapperKeys:["mcp"],serverConfig:{transport:"stdio",...g},instructionLabel:"OpenClaw Configuration Instructions",instructionText:ge("Open ~/.openclaw/openclaw.json and add this local stdio server under mcp.servers.")};case"codex":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${d}]`,`command = ${As(u.command)}`,`args = ${Ia(u.args)}`,...Ma(u.env)].join(`
4
+ `),instructionLabel:"Codex Configuration Instructions",instructionText:ge("Open ~/.codex/config.toml and add this local MCP entry.")};case"grok":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${d}]`,`command = ${As(u.command)}`,`args = ${Ia(u.args)}`,...Ma(u.env)].join(`
5
+ `),instructionLabel:"Grok CLI Configuration Instructions",instructionText:ge("Open ~/.grok/config.toml (or .grok/config.toml in your project for project-scoped config) and add this local Grok CLI MCP entry.")};case"claude-code":return{clientId:o,kind:"text",renderedText:`claude mcp add ${d}${C} -- ${T}`,instructionLabel:"Claude Code Configuration Instructions",instructionText:ge("Run this Claude Code command in your terminal to add the local Taskforce MCP server.")};case"gemini-cli":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:g,instructionLabel:"Gemini CLI Configuration Instructions",instructionText:ge("Open ~/.gemini/settings.json and add this local MCP server under mcpServers.")};case"claude-chat":case"grok-chat":case"gemini-chat":case"mistral-chat":case"perplexity-chat":case"chatgpt-desktop":throw new Error(`Unsupported local MCP client: ${o}`);default:{const S=o;throw new Error(`Unsupported local MCP client: ${S}`)}}}const Wn="_categoryManagerContainer_1ibti_1",Vn="_pathInputGroupStretch_1ibti_9",Kn="_emptyStateItalic_1ibti_13",qn="_emptyStateBox_1ibti_28",Jn="_emptyStateBare_1ibti_44",Yn="_emptyStateIcon_1ibti_49",Zn="_taxonomyGrid_1ibti_55",Qn="_checkboxRow_1ibti_61",Xn="_checkboxLabel_1ibti_67",ei="_checkboxSmall_1ibti_75",si="_flexGap8_1ibti_80",ti="_optionOrderButtons_1ibti_85",ai="_addTaxonomyBtnSmall_1ibti_92",D={categoryManagerContainer:Wn,pathInputGroupStretch:Vn,emptyStateItalic:Kn,emptyStateBox:qn,emptyStateBare:Jn,emptyStateIcon:Yn,taxonomyGrid:Zn,checkboxRow:Qn,checkboxLabel:Xn,checkboxSmall:ei,flexGap8:si,optionOrderButtons:ti,addTaxonomyBtnSmall:ai},ni="_taxonomyDrillDown_1oekr_1",ii="_drillDownList_1oekr_7",oi="_librarySection_1oekr_13",li="_libraryLauncher_1oekr_18",ri="_libraryLauncherInfo_1oekr_40",ci="_libraryLauncherIcon_1oekr_47",di="_libraryLauncherText_1oekr_60",pi="_libraryLauncherLabel_1oekr_67",ui="_libraryLauncherSubtext_1oekr_73",mi="_libraryLauncherMeta_1oekr_79",hi="_drillDownSection_1oekr_89",gi="_drillDownSectionHeader_1oekr_95",xi="_drillDownSectionTitle_1oekr_102",bi="_drillDownItem_1oekr_111",yi="_drillDownItemAction_1oekr_126",vi="_drillDownItemDimmed_1oekr_145",fi="_drillDownItemInfo_1oekr_153",ji="_drillDownItemText_1oekr_159",Ci="_drillDownItemLabel_1oekr_165",ki="_drillDownItemSubtext_1oekr_170",Ni="_systemIcon_1oekr_175",Ti="_chevron_1oekr_179",wi="_orderButtons_1oekr_184",Si="_createOverlay_1oekr_195",$i="_createDialog_1oekr_209",_i="_createDialogTitle_1oekr_218",Li="_inputGroup_1oekr_224",Ii="_dialogActions_1oekr_228",Mi="_createSubmit_1oekr_234",Pi="_createCancel_1oekr_238",Bi="_taxonomyDetailView_1oekr_242",Ai="_detailHeader_1oekr_249",Di="_taxonomyBreadcrumbs_1oekr_257",Ei="_breadcrumbPrev_1oekr_263",Ri="_breadcrumbIcon_1oekr_284",Gi="_breadcrumbDivider_1oekr_288",zi="_breadcrumbActive_1oekr_293",Oi="_detailContent_1oekr_301",y={taxonomyDrillDown:ni,drillDownList:ii,librarySection:oi,libraryLauncher:li,libraryLauncherInfo:ri,libraryLauncherIcon:ci,libraryLauncherText:di,libraryLauncherLabel:pi,libraryLauncherSubtext:ui,libraryLauncherMeta:mi,drillDownSection:hi,drillDownSectionHeader:gi,drillDownSectionTitle:xi,drillDownItem:bi,drillDownItemAction:yi,drillDownItemDimmed:vi,drillDownItemInfo:fi,drillDownItemText:ji,drillDownItemLabel:Ci,drillDownItemSubtext:ki,systemIcon:Ni,chevron:Ti,orderButtons:wi,createOverlay:Si,createDialog:$i,createDialogTitle:_i,inputGroup:Li,dialogActions:Ii,createSubmit:Mi,createCancel:Pi,taxonomyDetailView:Bi,detailHeader:Ai,taxonomyBreadcrumbs:Di,breadcrumbPrev:Ei,breadcrumbIcon:Ri,breadcrumbDivider:Gi,breadcrumbActive:zi,detailContent:Oi};function Fi(n){const o=[{id:"categories",label:n.displayLabels?.category||"Categories",kind:"system",summary:`${n.categories.length} configured`},{id:"types",label:n.displayLabels?.type||"Task Types",kind:"system",summary:`${n.types.length} active`},{id:"priorities",label:n.displayLabels?.priority||"Priority Levels",kind:"system",summary:`${n.priorities.length} levels`},{id:"complexities",label:"Complexity",kind:"attribute",summary:n.manualComplexityEnabled?"Enabled":"Disabled (default)"}],d=n.taxonomies.map(u=>({id:u.id,label:u.label,kind:"custom",summary:`${u.options.length} options${u.status==="retired"?" · Retired":""}`,taxonomy:u}));return[...o,...d]}function Hi({taxonomy:n,onUpdateTaxonomy:o,onRemoveTaxonomy:d,onRestoreTaxonomy:u}){const[g,C]=i.useState(""),[T,S]=i.useState(!1),[M,G]=i.useState(""),[O,j]=i.useState(n.label),[$,P]=i.useState((n.aliases||[]).join(", ")),[W,B]=i.useState(""),[x,w]=i.useState(null),N=a=>{const c=a.split(",").map(L=>L.trim()).filter(Boolean);return c.length>0?Array.from(new Set(c)):void 0};i.useEffect(()=>{j(n.label),P((n.aliases||[]).join(", "));const a=n.options.find(c=>String(c.value)===String(g));w(a||null),B((a?.aliases||[]).join(", "))},[n,g]);const k=a=>{o({...n,...a})},E=()=>{if(!M.trim())return;const a=M.toLowerCase().trim().replace(/\s+/g,"-");if(n.options.some(L=>L.value===a)){alert("Option value already exists");return}const c={value:a,label:M.trim(),color:Qe[n.options.length%Qe.length],status:"active"};k({options:[...n.options,c]}),G(""),S(!1),C(a)},m=(a,c)=>{k({options:n.options.map(L=>String(L.value)===String(a)?{...L,...c}:L)})},U=a=>{m(a,{status:"retired"})},h=a=>{m(a,{status:"active"})},_=(a,c)=>{const L=n.options.findIndex(F=>String(F.value)===String(a));if(L<0)return;const f=L+c;if(f<0||f>=n.options.length)return;const R=[...n.options],[p]=R.splice(L,1);R.splice(f,0,p),k({options:R})};return e.jsxs("div",{className:D.categoryManagerContainer,children:[e.jsxs("div",{className:`${s.categoryConfigPanel} ${s.configPanel} ${s.marginBottom24}`,children:[e.jsxs("div",{className:`${s.flexBetween} ${s.marginBottom16}`,children:[e.jsx("div",{className:s.flex1,children:e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock} ${s.marginBottom8}`,children:"Taxonomy Settings"})}),!n.isSystem&&(n.status==="retired"?e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:()=>u?.(n.id),children:"Restore Taxonomy"}):d&&e.jsxs("button",{type:"button",className:`${s.destructiveBtn} ${s.deleteBtnSmall}`,onClick:()=>{confirm(`Retire taxonomy "${n.label}"? Existing task data will be preserved as legacy values.`)&&d(n.id)},children:[e.jsx(Xe,{size:14,className:s.trashIcon})," Retire Taxonomy"]}))]}),n.status==="retired"&&e.jsx("p",{className:s.settingsHint,style:{marginTop:"-4px",marginBottom:"16px"},children:"This taxonomy is retired. Existing tasks keep their values, but it is hidden from normal new-task entry unless a task already uses it."}),e.jsxs("div",{className:D.taxonomyGrid,children:[e.jsxs("div",{className:s.settingGroup,style:{margin:0},children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Display Label"}),e.jsx("input",{className:s.input,value:O,onChange:a=>j(a.target.value),onBlur:()=>k({label:O}),disabled:n.isSystem,placeholder:"Enter taxonomy name"})]}),e.jsxs("div",{className:s.settingGroup,style:{margin:0},children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Description"}),e.jsx("textarea",{className:s.textarea,value:n.description||"",onChange:a=>k({description:a.target.value}),placeholder:"Optional guidance for when and how to use this taxonomy...",rows:3,style:{minHeight:"88px"}})]}),e.jsxs("div",{className:s.settingGroup,style:{margin:0},children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Aliases"}),e.jsx("input",{className:s.input,value:$,onChange:a=>P(a.target.value),onBlur:()=>k({aliases:N($)}),placeholder:"Optional aliases, comma-separated"})]}),e.jsxs("div",{className:s.settingGroup,style:{margin:0},children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Widget Type"}),e.jsxs("select",{className:s.select,value:n.widgetType,onChange:a=>{const c=a.target.value;k({widgetType:c,multiSelect:c==="level"?!1:n.multiSelect})},children:[e.jsx("option",{value:"select",children:"Dropdown (Select Box)"}),e.jsx("option",{value:"level",children:"Level Selector (Segmented)"})]})]})]}),e.jsxs("div",{className:D.checkboxRow,children:[e.jsxs("label",{className:D.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:n.isRequired,onChange:a=>k({isRequired:a.target.checked}),className:D.checkboxSmall}),"Mark as Required"]}),e.jsxs("label",{className:`${D.checkboxLabel} ${n.widgetType==="level"?s.opacity50:""}`,children:[e.jsx("input",{type:"checkbox",checked:n.multiSelect,onChange:a=>k({multiSelect:a.target.checked}),disabled:n.widgetType==="level",className:D.checkboxSmall}),"Allow Multi-select"]})]}),e.jsxs("div",{className:D.checkboxRow,children:[e.jsxs("label",{className:D.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:n.formEnabled!==!1,onChange:a=>k({formEnabled:a.target.checked}),className:D.checkboxSmall}),"Show in Task Form"]}),e.jsxs("label",{className:D.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:n.filterEnabled!==!1,onChange:a=>k({filterEnabled:a.target.checked}),className:D.checkboxSmall}),"Show in Filters"]}),e.jsxs("label",{className:D.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:n.sortEnabled===!0,onChange:a=>k({sortEnabled:a.target.checked}),className:D.checkboxSmall}),"Show in Sorts"]})]})]}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin24}`}),e.jsxs("div",{className:`${s.configPanel} ${s.flex1} ${s.flexCol}`,children:[e.jsxs("div",{className:`${s.headerFlex}`,style:{marginBottom:x&&!T||T?"16px":"0"},children:[e.jsx("div",{style:{flex:1},children:e.jsx(Ds,{value:g,options:[{value:"",label:"Select an option to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...n.options.map(a=>({value:a.value,label:a.status==="retired"?`${a.label} (Retired)`:a.label,icon:a.icon,color:a.color}))],onChange:a=>{C(a),S(!1)},disabled:T})}),T?e.jsx("button",{type:"button",onClick:()=>S(!1),title:"Cancel",className:`${s.browseBtn} ${s.cancelBtnRed}`,children:e.jsx(Bs,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>S(!0),title:"Add Option",children:e.jsx(ms,{size:18})})]}),T&&e.jsx("div",{className:`${s.configItem} ${s.marginBottom16}`,children:e.jsxs("div",{className:D.flexGap8,children:[e.jsx("input",{type:"text",className:s.input,placeholder:"New option label...",value:M,onChange:a=>G(a.target.value),onKeyDown:a=>{a.key==="Enter"&&E()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:E,disabled:!M.trim(),children:"Add Option"})]})}),x&&!T&&e.jsxs("div",{className:s.flex1,children:[e.jsx("div",{className:`${s.configDivider} ${s.marginBottom20}`}),e.jsxs("div",{className:`${s.flexBetweenCenter} ${s.marginBottom20}`,children:[e.jsxs("div",{className:`${s.flexColGap4} ${s.flex1}`,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Option Label"}),e.jsxs("div",{className:s.gridConfig,children:[e.jsx("input",{className:s.input,value:x.label,onChange:a=>m(x.value,{label:a.target.value}),placeholder:"Option Label"}),x.status==="retired"?e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:()=>h(x.value),title:"Restore Option",children:"Restore"}):e.jsxs("button",{type:"button",className:`${s.destructiveBtn} ${s.deleteBtnMedium}`,onClick:()=>U(x.value),title:"Retire Option",children:[e.jsx(Xe,{size:14,className:s.trashIcon})," Retire"]})]})]}),e.jsxs("div",{className:D.optionOrderButtons,children:[e.jsx("button",{type:"button",className:s.browseBtn,title:"Move option up",onClick:()=>_(x.value,-1),disabled:n.options[0]?.value===x.value,children:e.jsx(Ga,{size:16})}),e.jsx("button",{type:"button",className:s.browseBtn,title:"Move option down",onClick:()=>_(x.value,1),disabled:n.options[n.options.length-1]?.value===x.value,children:e.jsx(za,{size:16})})]})]}),e.jsx("p",{className:s.settingsHint,style:{marginBottom:"20px"},children:"Retired options stay visible for existing tasks and filters, but they should not be used for new work."}),e.jsxs("div",{className:s.settingGroup,style:{marginBottom:"20px"},children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Aliases"}),e.jsx("input",{className:s.input,value:W,onChange:a=>B(a.target.value),onBlur:()=>m(x.value,{aliases:N(W)}),placeholder:"Optional aliases, comma-separated"})]}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin}`}),e.jsxs("div",{className:s.configSection,children:[e.jsx("label",{className:`${s.label} ${s.inputLabelBlock}`,children:"Visual Style"}),e.jsxs("div",{className:s.categorySubConfig,children:[e.jsx("div",{className:s.colorPickerGrid,children:Qe.map(a=>{const c=Q(a)||"#000000",L=x.color===a,f=x.icon&&kt[x.icon]?kt[x.icon]:St;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${L?s.colorSwatchActive:""}`,style:{borderColor:L?c:void 0,"--swatch-color":c,"--swatch-border-color":`${c}80`},onClick:()=>m(x.value,{color:a}),title:a,children:e.jsx(f,{size:14,style:{color:c}})},a)})}),e.jsx("div",{className:s.iconGrid,children:Es.map(a=>{const c=kt[a]||xe[a]||St;return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${x.icon===a?s.iconPickerBtnActive:""}`,style:x.icon===a?{borderColor:Q(x.color),color:Q(x.color),background:`${Q(x.color)}15`}:{},onClick:()=>m(x.value,{icon:a}),title:a,children:e.jsx(c,{size:16})},a)})})]})]})]}),!x&&!T&&e.jsxs("div",{className:`${D.emptyStateBox} ${D.emptyStateBare}`,children:[e.jsx(wn,{size:24,className:D.emptyStateIcon}),"Select an option above to configure its appearance"]})]})]})}function Ui(n){const{displayLabel:o,categories:d,pathValidation:u,onUpdateDisplayLabel:g,onUpdateCategory:C,onRemoveCategory:T,onSaveCategory:S,onAddPath:M,onRemovePath:G,onUpdateCategoryIcon:O,onUpdateCategoryColor:j,onBrowseFolders:$}=n,[P,W]=i.useState(""),[B,x]=i.useState(!1),[w,N]=i.useState(""),[k,E]=i.useState(""),[m,U]=i.useState(o||""),[h,_]=i.useState("");i.useEffect(()=>{U(o||"")},[o]),i.useEffect(()=>{const p=d.find(F=>F.value===P);p&&E(p.label)},[P,d]);const a=()=>{if(!w.trim())return;S(w);const p=w.trim().toLowerCase().replace(/\s+/g,"-");N(""),x(!1),setTimeout(()=>W(p),100)},c=p=>{k&&k!==p.label&&C({...p,label:k},p.label)},L=p=>{const F=[];if(p.path&&F.push(p.path),p.paths&&p.paths.length>0)for(const J of p.paths)F.includes(J)||F.push(J);return F},f=d.find(p=>p.value===P),R=f?.value===jn;return e.jsxs("div",{className:`${s.configPanel} ${s.flex1}`,children:[e.jsxs("div",{className:`${s.headerFlex}`,style:{marginBottom:f&&!B||B?"20px":"0"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{id:"category-config-label",className:s.label,style:{display:"none"},children:"Select Category"}),e.jsx(Ds,{value:P,options:[{value:"",label:"Select a category to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...d.map(p=>({value:p.value,label:`${p.label}${p.disabled?" (Legacy)":""}`,icon:p.icon,color:p.color}))],onChange:p=>{W(String(p)),x(!1)},disabled:B,ariaLabelledBy:"category-config-label"})]}),B?e.jsx("button",{type:"button",className:`${s.browseBtn} ${s.cancelBtnRed}`,onClick:()=>x(!1),title:"Cancel creation",children:e.jsx(Bs,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>x(!0),title:"Create new category",children:e.jsx(ms,{size:18})})]}),B&&e.jsxs("div",{className:`${s.configItem} ${s.marginBottom16}`,children:[e.jsx("div",{className:`${s.labelRow} ${s.marginBottom8}`,children:e.jsx("label",{className:s.settingsLabel,children:"New Category Name"})}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("input",{type:"text",className:s.input,placeholder:"Enter category name",value:w,onChange:p=>N(p.target.value),onKeyDown:p=>{p.key==="Enter"&&a()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:a,disabled:!w.trim(),children:"Create"})]})]}),f&&!B&&e.jsxs("div",{className:s.flex1,style:{overflowY:"auto",marginRight:"-8px",paddingRight:"8px"},children:[e.jsx("div",{className:`${s.configDivider} ${s.marginBottom20}`}),e.jsxs("div",{className:`${s.configSection} ${s.marginBottom20}`,children:[e.jsxs("div",{className:s.flexBetween,children:[e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock}`,children:"General"}),!R&&e.jsxs("button",{type:"button",onClick:()=>{confirm(`Retire category "${f.label}"? Existing tasks will be reassigned to ${Ta}.`)&&(T(f.value),W(""))},title:"Retire Category",className:`${s.destructiveBtn} ${s.deleteBtnSmall}`,children:[e.jsx(Xe,{size:14,className:s.trashIcon})," Retire"]})]}),R&&e.jsxs("p",{className:s.settingsHint,style:{marginBottom:"12px"},children:[Ta," is the protected fallback category and cannot be retired."]}),e.jsxs("div",{className:s.gridConfig,children:[e.jsxs("div",{className:s.flexColGap4,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Display Label"}),e.jsx("input",{className:s.input,value:m,onChange:p=>U(p.target.value),onBlur:()=>g?.(m.trim())})]}),e.jsxs("div",{className:s.flexColGap4,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Label"}),e.jsx("input",{className:s.input,value:k,onChange:p=>E(p.target.value),onBlur:()=>c(f),onKeyDown:p=>{p.key==="Enter"&&(c(f),p.target.blur())}})]}),e.jsxs("div",{className:s.flexColGap4Center,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Available for New Tasks"}),e.jsx("input",{type:"checkbox",checked:!f.disabled,onChange:()=>C({...f,disabled:!f.disabled}),className:s.checkboxInput})]})]}),e.jsx("p",{className:s.settingsHint,style:{marginTop:"12px"},children:"Turn this off to keep the category on existing tasks while removing it from new task selection by default."})]}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin}`}),e.jsxs("div",{className:`${s.configSection} ${s.marginBottom20}`,children:[e.jsx("label",{className:s.subLabel,style:{fontSize:"14px",fontWeight:600,display:"block",marginBottom:"8px"},children:"Context Paths"}),e.jsx("p",{className:s.settingsHint,style:{marginBottom:"12px"},children:"Files in these paths will be included as context for tasks in this category."}),L(f).length>0&&e.jsx("div",{className:`${s.pathList} ${s.pathListMargin}`,children:L(f).map((p,F)=>{const J=u[p],re=J?.exists,es=J?.isFile;return e.jsxs("div",{className:`${s.pathChip} ${re===!1?s.pathInvalid:re?s.pathValid:""}`,children:[re===void 0?e.jsx(_e,{size:12,className:s.spinner}):re?es?e.jsx(Sn,{size:12,className:s.pathValidIcon}):e.jsx(Sa,{size:12,className:s.pathValidIcon}):e.jsx(Z,{size:12,className:s.pathInvalidIcon}),e.jsx("span",{className:s.pathText,title:p,children:p}),e.jsx("button",{type:"button",className:s.removePathBtn,onClick:()=>G(f.value,p),title:"Remove path",children:e.jsx(Bs,{size:10})})]},F)})}),e.jsxs("div",{className:`${s.pathInputGroup} ${D.pathInputGroupStretch}`,children:[e.jsx("input",{type:"text",className:s.input,value:h,onChange:p=>_(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),h.trim()&&(M(f.value,h.trim()),_("")))},placeholder:"Add path (e.g. path/to/folder)"}),e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>{h.trim()&&(M(f.value,h.trim()),_(""))},disabled:!h.trim(),title:"Add path",children:e.jsx(ms,{size:18})}),e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>$(f.value),title:"Browse folders",children:e.jsx(Sa,{size:16})})]})]}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin}`}),e.jsxs("div",{className:s.configSection,children:[e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock} ${s.subLabelBlock12}`,children:"Visual Style"}),e.jsxs("div",{className:s.categorySubConfig,children:[e.jsx("div",{className:s.colorPickerGrid,children:Qe.map(p=>{const F=Q(p)||"#000000",J=f.color===p,re=f.icon&&xe[f.icon]?xe[f.icon]:$n;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${J?s.colorSwatchActive:""}`,style:{borderColor:J?F:void 0,"--swatch-color":F,"--swatch-border-color":`${F}80`},onClick:()=>j(f.value,p),title:p,children:e.jsx(re,{size:14,style:{color:F}})},p)})}),e.jsx("div",{className:s.iconGrid,children:Es.map(p=>{const F=xe[p];return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${f.icon===p?s.iconPickerBtnActive:""}`,style:f.icon===p?{borderColor:Q(f.color),color:Q(f.color),background:`${Q(f.color)}15`}:{},onClick:()=>O(f.value,p),title:p,children:e.jsx(F,{size:16})},p)})})]})]})]}),!f&&!B&&e.jsx("div",{className:`${D.emptyStateItalic} ${D.emptyStateBare}`,children:"Select a category above to configure settings"})]})}function Wi(n){const{types:o,onSaveType:d,onRemoveType:u,onUpdateType:g,displayLabel:C,onUpdateDisplayLabel:T}=n,[S,M]=i.useState(""),[G,O]=i.useState(!1),[j,$]=i.useState(""),[P,W]=i.useState(""),[B,x]=i.useState(C||"");i.useEffect(()=>{const m=o.find(U=>U.value===S);m&&W(m.label)},[S,o]),i.useEffect(()=>{x(C||"")},[C]);const w=o.find(m=>m.value===S),N=w?.value===Cn,k=w?.status==="retired",E=()=>{if(!j.trim())return;d(j);const m=j.trim().toLowerCase().replace(/\s+/g,"-");$(""),O(!1),setTimeout(()=>M(m),100)};return e.jsxs("div",{className:`${s.configPanel} ${s.flex1}`,children:[e.jsxs("div",{className:`${s.headerFlex}`,style:{marginBottom:w&&!G||G?"20px":"0"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{id:"type-config-label",className:s.label,style:{display:"none"},children:"Select Type"}),e.jsx(Ds,{value:S,options:[{value:"",label:"Select a type to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...o.map(m=>({value:m.value,label:m.status==="retired"?`${m.label} (Retired)`:m.label,icon:m.icon||"Box",color:m.color||"violet-500"}))],onChange:m=>{M(String(m)),O(!1)},disabled:G,ariaLabelledBy:"type-config-label"})]}),G?e.jsx("button",{type:"button",className:`${s.browseBtn} ${s.cancelBtnRed}`,onClick:()=>O(!1),title:"Cancel creation",children:e.jsx(Bs,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>O(!0),title:"Create new type",children:e.jsx(ms,{size:18})})]}),G&&e.jsxs("div",{className:`${s.configItem} ${s.marginBottom16}`,children:[e.jsx("div",{className:`${s.labelRow} ${s.marginBottom8}`,children:e.jsx("label",{className:s.settingsLabel,children:"New Type Label"})}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("input",{type:"text",className:s.input,placeholder:"Enter type name",value:j,onChange:m=>$(m.target.value),onKeyDown:m=>{m.key==="Enter"&&E()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:E,disabled:!j.trim(),children:"Create"})]})]}),w&&!G&&e.jsxs("div",{className:s.flex1,children:[e.jsx("div",{className:`${s.configDivider} ${s.marginBottom20}`}),e.jsx("div",{className:s.flexBetweenCenter,children:e.jsxs("div",{className:`${s.flexColGap4} ${s.flex1}`,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Display Label"}),e.jsx("input",{className:s.input,value:B,onChange:m=>x(m.target.value),onBlur:()=>T?.(B.trim())}),e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Label"}),e.jsxs("div",{className:s.gridConfig,children:[e.jsx("input",{className:s.input,value:P,onChange:m=>W(m.target.value),onBlur:()=>g(w.value,{label:P}),onKeyDown:m=>{m.key==="Enter"&&m.currentTarget.blur()}}),!N&&e.jsxs("button",{type:"button",onClick:()=>{if(k){g(w.value,{status:"active"});return}confirm(`Retire type "${w.label}"? Existing tasks using it will keep it as a legacy type until reassigned.`)&&u(w.value)},title:k?"Restore Type":"Retire Type",className:`${s.destructiveBtn} ${s.deleteBtnMedium}`,children:[e.jsx(Xe,{size:14,className:s.trashIcon})," ",k?"Restore":"Retire"]})]})]})}),e.jsx("p",{className:`${s.settingsHint} ${s.marginTop12}`,children:N?"Task is the protected fallback type and cannot be retired.":k?"Retired types stay available as legacy values on existing tasks until you reassign them.":"Retiring a type removes it from new task selection while preserving it as a legacy value on tasks that already use it."}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin}`}),e.jsxs("div",{className:s.configSection,children:[e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock} ${s.subLabelBlock12}`,children:"Visual Style"}),e.jsxs("div",{className:s.categorySubConfig,children:[e.jsx("div",{className:s.colorPickerGrid,children:Qe.map(m=>{const U=Q(m)||"#000000",h=w.color===m,_=w.icon&&xe[w.icon]?xe[w.icon]:St;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${h?s.colorSwatchActive:""}`,style:{borderColor:h?U:void 0,"--swatch-color":U,"--swatch-border-color":`${U}80`},onClick:()=>g(w.value,{color:m}),title:m,children:e.jsx(_,{size:14,style:{color:U}})},m)})}),e.jsx("div",{className:s.iconGrid,children:Es.map(m=>{const U=xe[m];return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${w.icon===m?s.iconPickerBtnActive:""}`,style:w.icon===m?{borderColor:Q(w.color),color:Q(w.color),background:`${Q(w.color)}15`}:{},onClick:()=>g(w.value,{icon:m}),title:m,children:e.jsx(U,{size:16})},m)})})]})]})]}),!w&&!G&&e.jsx("div",{className:`${D.emptyStateItalic} ${D.emptyStateBare}`,children:"Select a type above to manage"})]})}function Vi({priorities:n,onUpdatePriorities:o,displayLabel:d,onUpdateDisplayLabel:u}){const[g,C]=i.useState(""),[T,S]=i.useState(null),[M,G]=i.useState(d||"");i.useEffect(()=>{const j=n.find($=>String($.value)===String(g))||null;S(j)},[n,g]),i.useEffect(()=>{G(d||"")},[d]);const O=(j,$)=>{o(n.map(P=>String(P.value)===String(j)?{...P,...$}:P))};return e.jsxs("div",{className:`${s.configPanel} ${s.flex1}`,children:[e.jsxs("div",{className:s.marginBottom20,children:[e.jsx("label",{id:"priority-config-label",className:s.label,style:{display:"none"},children:"Select Priority"}),e.jsx(Ds,{value:g,options:[{value:"",label:"Select a priority level to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...n.map(j=>({value:j.value,label:j.label,icon:j.icon||"Gauge",color:j.color||"blue-500"}))],onChange:j=>C(j),ariaLabelledBy:"priority-config-label"})]}),T?e.jsxs("div",{className:s.flex1,style:{overflowY:"auto",marginRight:"-8px",paddingRight:"8px"},children:[e.jsx("div",{className:`${s.configDivider} ${s.marginBottom20}`}),e.jsxs("div",{className:`${s.configSection} ${s.marginBottom20}`,children:[e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock}`,children:"General"}),e.jsx("p",{className:s.settingsHint,style:{marginBottom:"12px"},children:"Priority uses a fixed ordered scale. You can rename and restyle levels, but not add, remove, or reorder them here."}),e.jsxs("div",{className:s.gridConfig,children:[e.jsxs("div",{className:s.flexColGap4,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Display Label"}),e.jsx("input",{className:s.input,value:M,onChange:j=>G(j.target.value),onBlur:()=>u?.(M.trim())})]}),e.jsxs("div",{className:s.flexColGap4,children:[e.jsx("label",{className:`${s.label} ${s.inputLabel}`,children:"Label"}),e.jsx("input",{className:s.input,value:T.label,onChange:j=>O(T.value,{label:j.target.value})})]})]})]}),e.jsx("div",{className:`${s.configDivider} ${s.configDividerMargin}`}),e.jsxs("div",{className:s.configSection,children:[e.jsx("label",{className:`${s.subLabel} ${s.subLabelBlock} ${s.subLabelBlock12}`,children:"Visual Style"}),e.jsxs("div",{className:s.categorySubConfig,children:[e.jsx("div",{className:s.colorPickerGrid,children:Qe.map(j=>{const $=Q(j)||"#000000",P=T.color===j,W=T.icon&&xe[T.icon]?xe[T.icon]:$a;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${P?s.colorSwatchActive:""}`,style:{borderColor:P?$:void 0,"--swatch-color":$,"--swatch-border-color":`${$}80`},onClick:()=>O(T.value,{color:j}),title:j,children:e.jsx(W,{size:14,style:{color:$}})},j)})}),e.jsx("div",{className:s.iconGrid,children:Es.map(j=>{const $=xe[j]||$a;return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${T.icon===j?s.iconPickerBtnActive:""}`,style:T.icon===j?{borderColor:Q(T.color),color:Q(T.color),background:`${Q(T.color)}15`}:{},onClick:()=>O(T.value,{icon:j}),title:j,children:e.jsx($,{size:16})},j)})})]})]})]}):e.jsx("div",{className:`${D.emptyStateItalic} ${D.emptyStateBare}`,children:"Select a priority above to manage"})]})}function Ki(n){return n.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0}))}function qi(n){return n.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0,options:Ki(Array.isArray(o.options)?o.options:[])}))}const Ji=[{id:"client-delivery",label:"Client Delivery",description:"Taxonomies for client-facing work, approvals, and service commitments.",domainTag:"operations",bestFor:"Agencies, consulting, and service delivery work.",taxonomies:[{id:"approval-stage",label:"Approval Stage",description:"Track where work sits in the client or internal approval pipeline.",widgetType:"select",isSystem:!1,multiSelect:!1,isRequired:!1,formEnabled:!0,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:"draft",label:"Draft",color:"blue-200",icon:"Pencil",status:"active"},{value:"internal-review",label:"Internal Review",color:"blue-500",icon:"Users",status:"active"},{value:"client-review",label:"Client Review",color:"amber-500",icon:"MessageSquare",status:"active"},{value:"approved",label:"Approved",color:"emerald-500",icon:"CheckCircle",status:"active"}]},{id:"service-line",label:"Service Line",description:"Identify which delivery lane owns or contributes to this work.",widgetType:"select",isSystem:!1,multiSelect:!0,isRequired:!1,formEnabled:!0,filterEnabled:!0,sortEnabled:!1,status:"active",options:[{value:"strategy",label:"Strategy",color:"violet-500",icon:"Target",status:"active"},{value:"content",label:"Content",color:"sky-500",icon:"Pencil",status:"active"},{value:"delivery",label:"Delivery",color:"emerald-500",icon:"Briefcase",status:"active"},{value:"reporting",label:"Reporting",color:"amber-500",icon:"Activity",status:"active"}]}]},{id:"content-operations",label:"Content Operations",description:"Reusable taxonomies for channels, publishing readiness, and editorial planning.",domainTag:"content",bestFor:"Editorial calendars, content teams, and publishing operations.",taxonomies:[{id:"content-channel",label:"Content Channel",description:"Show where a piece of work will be published or reused.",widgetType:"select",isSystem:!1,multiSelect:!0,isRequired:!1,formEnabled:!0,filterEnabled:!0,sortEnabled:!1,status:"active",options:[{value:"blog",label:"Blog",color:"blue-500",icon:"FileText",status:"active"},{value:"email",label:"Email",color:"amber-500",icon:"Mail",status:"active"},{value:"social",label:"Social",color:"violet-500",icon:"Flag",status:"active"},{value:"webinar",label:"Webinar",color:"violet-500",icon:"Video",status:"active"}]},{id:"publish-readiness",label:"Publish Readiness",description:"Track whether a content task is ready to move into scheduling or release.",widgetType:"select",isSystem:!1,multiSelect:!1,isRequired:!0,formEnabled:!0,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:"not-started",label:"Not Started",color:"blue-200",icon:"Circle",status:"active"},{value:"in-review",label:"In Review",color:"amber-500",icon:"Search",status:"active"},{value:"ready",label:"Ready",color:"emerald-500",icon:"Rocket",status:"active"}]},{id:"effort-band",label:"Effort Band",description:"A lightweight numeric scale for content effort without using complexity.",widgetType:"level",isSystem:!1,multiSelect:!1,isRequired:!1,formEnabled:!1,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:1,label:"Light",color:"teal-500",icon:"Wind",status:"active"},{value:2,label:"Standard",color:"blue-500",icon:"Minus",status:"active"},{value:3,label:"Heavy",color:"orange-500",icon:"Gauge",status:"active"}]}]},{id:"product-delivery",label:"Product Delivery",description:"Useful planning taxonomies for delivery stages, stakeholders, and delivery risk.",domainTag:"product",bestFor:"Product teams, implementation work, and cross-functional delivery.",taxonomies:[{id:"delivery-stage",label:"Delivery Stage",description:"Track how work moves from intake through active delivery.",widgetType:"select",isSystem:!1,multiSelect:!1,isRequired:!0,formEnabled:!0,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:"backlog",label:"Backlog",color:"blue-200",icon:"Inbox",status:"active"},{value:"scoping",label:"Scoping",color:"sky-500",icon:"Search",status:"active"},{value:"ready",label:"Ready",color:"blue-500",icon:"Check",status:"active"},{value:"in-flight",label:"In Flight",color:"indigo-500",icon:"Play",status:"active"},{value:"blocked",label:"Blocked",color:"amber-500",icon:"Pause",status:"active"},{value:"done",label:"Done",color:"green-500",icon:"CheckCircle",status:"active"}]},{id:"stakeholder",label:"Stakeholder",description:"Show which audience or stakeholder group is most relevant to the work.",widgetType:"select",isSystem:!1,multiSelect:!0,isRequired:!1,formEnabled:!0,filterEnabled:!0,sortEnabled:!1,status:"active",options:[{value:"internal",label:"Internal",color:"blue-500",icon:"Users",status:"active"},{value:"client",label:"Client",color:"amber-500",icon:"Briefcase",status:"active"},{value:"leadership",label:"Leadership",color:"violet-500",icon:"Flag",status:"active"},{value:"partner",label:"Partner",color:"teal-500",icon:"Globe",status:"active"}]},{id:"risk-level",label:"Risk Level",description:"A simple signal for delivery or coordination risk.",widgetType:"level",isSystem:!1,multiSelect:!1,isRequired:!1,formEnabled:!1,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:1,label:"Low",color:"teal-500",icon:"Wind",status:"active"},{value:2,label:"Medium",color:"amber-500",icon:"Gauge",status:"active"},{value:3,label:"High",color:"red-500",icon:"TriangleAlert",status:"active"}]}]},{id:"content-production",label:"Content Production",description:"Production-oriented taxonomies for content stages, channels, and asset effort.",domainTag:"marketing",bestFor:"Marketing teams, campaigns, and multi-channel asset production.",taxonomies:[{id:"content-stage",label:"Content Stage",description:"Track where a content asset sits in the production lifecycle.",widgetType:"select",isSystem:!1,multiSelect:!1,isRequired:!0,formEnabled:!0,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:"outline",label:"Outline",color:"blue-200",icon:"Pencil",status:"active"},{value:"draft",label:"Draft",color:"blue-500",icon:"FileText",status:"active"},{value:"review",label:"Review",color:"amber-500",icon:"Search",status:"active"},{value:"approved",label:"Approved",color:"green-500",icon:"CheckCircle",status:"active"},{value:"published",label:"Published",color:"violet-500",icon:"Rocket",status:"active"}]},{id:"distribution-channel",label:"Distribution Channel",description:"Capture where the asset will be published or promoted.",widgetType:"select",isSystem:!1,multiSelect:!0,isRequired:!1,formEnabled:!0,filterEnabled:!0,sortEnabled:!1,status:"active",options:[{value:"blog",label:"Blog",color:"blue-500",icon:"FileText",status:"active"},{value:"email",label:"Email",color:"amber-500",icon:"Mail",status:"active"},{value:"video",label:"Video",color:"violet-500",icon:"Video",status:"active"},{value:"social",label:"Social",color:"indigo-500",icon:"Flag",status:"active"},{value:"docs",label:"Docs",color:"sky-500",icon:"Book",status:"active"}]},{id:"asset-effort",label:"Asset Effort",description:"Estimate the relative production effort for a content asset.",widgetType:"level",isSystem:!1,multiSelect:!1,isRequired:!1,formEnabled:!1,filterEnabled:!0,sortEnabled:!0,status:"active",options:[{value:1,label:"Quick",color:"teal-500",icon:"Wind",status:"active"},{value:2,label:"Standard",color:"blue-500",icon:"Minus",status:"active"},{value:3,label:"Campaign",color:"orange-500",icon:"Rocket",status:"active"}]}]}];function Yi(){return Ji.map(n=>({...n,taxonomies:qi(n.taxonomies)}))}const Zi="_libraryContainer_94zm2_1",Qi="_introCard_94zm2_7",Xi="_eyebrow_94zm2_17",eo="_introTitle_94zm2_28",so="_introCopy_94zm2_35",to="_prototypeNotice_94zm2_43",ao="_libraryGrid_94zm2_49",no="_packList_94zm2_56",io="_packCard_94zm2_62",oo="_packCardInteractive_94zm2_73",lo="_packCardActive_94zm2_88",ro="_packHeader_94zm2_94",co="_packHeaderText_94zm2_101",po="_packTitleRow_94zm2_108",uo="_packTitle_94zm2_108",mo="_packBadge_94zm2_122",ho="_packDescription_94zm2_137",go="_packBestFor_94zm2_144",xo="_packCounts_94zm2_151",bo="_packTaxonomyPreview_94zm2_157",yo="_packTaxonomyChip_94zm2_163",vo="_packTaxonomyMore_94zm2_175",fo="_packCountChip_94zm2_185",jo="_packActions_94zm2_198",Co="_packActionHint_94zm2_204",ko="_previewPanel_94zm2_212",No="_previewHeader_94zm2_224",To="_previewSummaryRow_94zm2_230",wo="_previewTitle_94zm2_236",So="_previewBestFor_94zm2_243",$o="_previewSubtext_94zm2_250",_o="_previewSection_94zm2_256",Lo="_previewSectionTitle_94zm2_262",Io="_previewList_94zm2_271",Mo="_previewItem_94zm2_277",Po="_previewItemLabel_94zm2_288",Bo="_previewItemMeta_94zm2_298",Ao="_customTaxonomyCard_94zm2_304",Do="_customTaxonomyHeader_94zm2_314",Eo="_customTaxonomyDescription_94zm2_321",Ro="_customTaxonomyBadges_94zm2_328",Go="_customTaxonomyBadge_94zm2_328",zo="_applyPanel_94zm2_347",Oo="_applyTitle_94zm2_357",Fo="_applyCopy_94zm2_364",Ho="_analysisPanel_94zm2_371",Uo="_analysisCopy_94zm2_381",Wo="_analysisWarning_94zm2_388",Vo="_checkboxList_94zm2_395",Ko="_checkboxLabel_94zm2_401",qo="_prototypeResult_94zm2_409",Jo="_prototypeError_94zm2_415",r={libraryContainer:Zi,introCard:Qi,eyebrow:Xi,introTitle:eo,introCopy:so,prototypeNotice:to,libraryGrid:ao,packList:no,packCard:io,packCardInteractive:oo,packCardActive:lo,packHeader:ro,packHeaderText:co,packTitleRow:po,packTitle:uo,packBadge:mo,packDescription:ho,packBestFor:go,packCounts:xo,packTaxonomyPreview:bo,packTaxonomyChip:yo,packTaxonomyMore:vo,packCountChip:fo,packActions:jo,packActionHint:Co,previewPanel:ko,previewHeader:No,previewSummaryRow:To,previewTitle:wo,previewBestFor:So,previewSubtext:$o,previewSection:_o,previewSectionTitle:Lo,previewList:Io,previewItem:Mo,previewItemLabel:Po,previewItemMeta:Bo,customTaxonomyCard:Ao,customTaxonomyHeader:Do,customTaxonomyDescription:Eo,customTaxonomyBadges:Ro,customTaxonomyBadge:Go,applyPanel:zo,applyTitle:Oo,applyCopy:Fo,analysisPanel:Ho,analysisCopy:Uo,analysisWarning:Wo,checkboxList:Vo,checkboxLabel:Ko,prototypeResult:qo,prototypeError:Jo};function Yo(n,o="Layers"){const d=xe[n||o]||xe[o];return e.jsx(d,{size:15})}function Ba(n){return{categories:n.categories.length>0,types:n.types.length>0,priorities:n.priorities.length>0}}function Ps(n){const{title:o,items:d}=n;return e.jsxs("section",{className:r.previewSection,children:[e.jsx("h4",{className:r.previewSectionTitle,children:o}),e.jsx("div",{className:r.previewList,children:d.map(u=>e.jsxs("div",{className:r.previewItem,children:[e.jsxs("span",{className:r.previewItemLabel,children:[e.jsx("span",{style:{color:u.color?`var(--color-${u.color}, var(--text-secondary))`:"var(--text-secondary)"},children:Yo(u.icon)}),e.jsx("span",{children:u.label})]}),u.meta?e.jsx("span",{className:r.previewItemMeta,children:u.meta}):null]},u.key))})]})}function Aa(n){let o=0,d=0,u=0,g=0;return n.taxonomies.forEach(C=>{C.multiSelect&&(o+=1),C.widgetType==="level"&&(d+=1),C.isRequired&&(u+=1),C.formEnabled!==!1&&(g+=1)}),{multiSelectCount:o,numericCount:d,requiredCount:u,formEnabledCount:g}}function Zo(n){const o=[];return o.push(n.widgetType==="level"?"Numeric":"Descriptive"),n.multiSelect&&o.push("Multi-select"),n.isRequired&&o.push("Required"),n.formEnabled!==!1&&o.push("Shows in forms"),n.filterEnabled&&o.push("Filterable"),n.sortEnabled&&o.push("Sortable"),o}function Qo(n){return{...n,aliases:Array.isArray(n.aliases)?[...n.aliases]:void 0,options:Array.isArray(n.options)?n.options.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0})):[]}}function Ha(n,o){n.key!=="Enter"&&n.key!==" "||(n.preventDefault(),o())}function Xo(n){const{onAnalyzeSystemTaxonomyPack:o,onApplySystemTaxonomyPack:d}=n,u=i.useMemo(()=>Ra(),[]),[g,C]=i.useState(u),[T,S]=i.useState(u[0]?.id||""),[M,G]=i.useState(()=>u[0]?Ba(u[0]):{categories:!0,types:!0,priorities:!0}),[O,j]=i.useState(!1),[$,P]=i.useState(null),[W,B]=i.useState(!1),[x,w]=i.useState(!1),N=g.find(h=>h.id===T)||g[0]||null,k=i.useMemo(()=>!N||!o?null:o(N),[o,N]);i.useEffect(()=>{let h=!1;return B(!0),fetch("/api/taskforce/taxonomy-library").then(async _=>{if(!_.ok)return null;const a=await _.json().catch(()=>({})),c=Array.isArray(a?.packs)?a.packs:[];return!h&&c.length>0&&(C(c),S(L=>c.some(f=>f.id===L)?L:c[0].id)),null}).catch(()=>null).finally(()=>{h||B(!1)}),()=>{h=!0}},[]);const E=h=>{const _=g.find(a=>a.id===h);S(h),G(_?Ba(_):{categories:!0,types:!0,priorities:!0}),j(!1),P(null)},m=h=>{G(_=>({..._,[h]:!_[h]}))},U=()=>{if(!N)return;if(Object.entries(M).filter(([,_])=>_).map(([_])=>_).length===0){P({type:"error",message:"Select at least one taxonomy section to apply."});return}if(!d){P({type:"error",message:"System taxonomy pack apply is not available in this surface yet."});return}w(!0),P(null),d({pack:N,sections:M,remapExistingValuesToDefault:O}).then(_=>{if(_?.success){P({type:"success",message:`${N.label} was applied to the selected taxonomy sections.`});return}P({type:"error",message:_?.error||"Failed to apply the selected taxonomy pack."})}).catch(_=>{P({type:"error",message:_ instanceof Error?_.message:"Failed to apply the selected taxonomy pack."})}).finally(()=>{w(!1)})};return N?e.jsxs("div",{className:r.libraryContainer,children:[e.jsxs("section",{className:r.introCard,children:[e.jsxs("span",{className:r.eyebrow,children:[e.jsx($t,{size:14}),"System Taxonomy Library"]}),e.jsx("h3",{className:r.introTitle,children:"Browse starter packs before you replace anything."}),e.jsx("p",{className:r.introCopy,children:"Library packs give you coordinated categories, task types, and priority scales. Apply replaces only the sections you choose."}),W?e.jsx("p",{className:r.prototypeNotice,children:"Loading available packs…"}):null]}),e.jsxs("div",{className:r.libraryGrid,children:[e.jsx("div",{className:r.packList,children:g.map(h=>{const _=h.id===T;return e.jsxs("article",{className:`${r.packCard} ${r.packCardInteractive} ${_?r.packCardActive:""}`,role:"button",tabIndex:0,"aria-pressed":_,onClick:()=>E(h.id),onKeyDown:a=>Ha(a,()=>E(h.id)),children:[e.jsx("div",{className:r.packHeader,children:e.jsxs("div",{className:r.packHeaderText,children:[e.jsx("div",{className:r.packTitleRow,children:e.jsx("h4",{className:r.packTitle,children:h.label})}),e.jsx("p",{className:r.packDescription,children:h.description})]})}),e.jsxs("div",{className:r.packCounts,children:[e.jsxs("span",{className:r.packCountChip,children:[e.jsx(Oa,{size:13}),h.categories.length," categories"]}),e.jsxs("span",{className:r.packCountChip,children:[e.jsx(_n,{size:13}),h.types.length," types"]}),e.jsxs("span",{className:r.packCountChip,children:[e.jsx(ne,{size:13}),h.priorities.length," priority levels"]})]}),e.jsx("div",{className:r.packActions,children:e.jsx("button",{type:"button",className:s.submitBtn,onClick:()=>E(h.id),children:"Apply"})})]},h.id)})}),e.jsxs("aside",{className:r.previewPanel,children:[e.jsxs("div",{className:r.previewHeader,children:[e.jsx("h3",{className:r.previewTitle,children:N.label}),e.jsx("p",{className:r.previewSubtext,children:"Read-only preview. Applying this pack will replace only the sections you choose."})]}),e.jsx(Ps,{title:"Categories",items:N.categories.map(h=>({key:h.value,label:h.label,icon:h.icon,color:h.color}))}),e.jsx(Ps,{title:"Task Types",items:N.types.map(h=>({key:h.value,label:h.label,icon:h.icon,color:h.color,meta:h.status==="retired"?"Retired":void 0}))}),e.jsx(Ps,{title:"Priority Levels",items:N.priorities.map(h=>({key:String(h.value),label:h.label,icon:h.icon,color:h.color,meta:`Level ${h.value}`}))}),e.jsxs("section",{className:r.applyPanel,children:[e.jsx("h4",{className:r.applyTitle,children:"Apply Selected Sections"}),e.jsx("p",{className:r.applyCopy,children:"Applying this pack will replace the selected taxonomy sections in this workspace."}),k?e.jsxs("div",{className:r.analysisPanel,children:[k.unmatchedCategoryValues.length>0?e.jsxs("p",{className:r.analysisCopy,children:[k.unmatchedCategoryValues.length," category value",k.unmatchedCategoryValues.length===1?"":"s"," will be preserved as legacy unless you remap to default."]}):null,k.unmatchedTypeValues.length>0?e.jsxs("p",{className:r.analysisCopy,children:[k.unmatchedTypeValues.length," type value",k.unmatchedTypeValues.length===1?"":"s"," will be preserved as legacy unless you remap to default."]}):null,k.incompatiblePriorityValues.length>0?e.jsxs("p",{className:r.analysisWarning,children:["Existing tasks use priority level",k.incompatiblePriorityValues.length===1?"":"s"," ",k.incompatiblePriorityValues.join(", "),". Priority replacement will be blocked unless you remap unmatched existing values to default."]}):null,k.unmatchedCategoryValues.length===0&&k.unmatchedTypeValues.length===0&&k.incompatiblePriorityValues.length===0?e.jsx("p",{className:r.analysisCopy,children:"This pack lines up with the current workspace values for the selected taxonomy sections."}):null]}):null,e.jsxs("div",{className:r.checkboxList,children:[e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:M.categories,onChange:()=>m("categories")}),e.jsx("span",{children:"Categories"})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:M.types,onChange:()=>m("types")}),e.jsx("span",{children:"Types"})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:M.priorities,onChange:()=>m("priorities")}),e.jsx("span",{children:"Priorities"})]})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:O,onChange:()=>j(h=>!h)}),e.jsx("span",{children:"Remap unmatched existing values to default"})]}),e.jsx("p",{className:r.applyCopy,children:"Leave this off to preserve unmatched category and type values as legacy entries. Priority replacement will be blocked if existing tasks use values outside the selected pack."}),e.jsx("div",{className:r.packActions,children:e.jsx("button",{type:"button",className:s.submitBtn,onClick:U,disabled:x,children:x?"Applying…":"Apply Pack"})}),$?e.jsx("p",{className:`${r.prototypeResult} ${$.type==="error"?r.prototypeError:""}`,children:$.message}):null]})]})]})]}):e.jsx("div",{className:s.emptyState,children:e.jsx("p",{className:"tf-empty-copy",children:"No system taxonomy library packs are available."})})}function el(n){const{taxonomies:o=[],onUpdateCustomTaxonomies:d}=n,u=i.useMemo(()=>Yi(),[]),[g,C]=i.useState(u),[T,S]=i.useState(u[0]?.id||""),[M,G]=i.useState(!1),[O,j]=i.useState(null),[$,P]=i.useState(u[0]?.taxonomies.map(a=>a.id)||[]),[W,B]=i.useState(null),x=g.find(a=>a.id===T)||g[0]||null,w=x?Aa(x):null,N=i.useMemo(()=>x?x.taxonomies.filter(a=>$.includes(a.id)):[],[x,$]),k=i.useMemo(()=>new Set($),[$]),E=i.useMemo(()=>{const a=new Set(o.map(c=>c.id));return N.map(c=>c.id).filter(c=>a.has(c))},[N,o]),m=i.useMemo(()=>{if(!x)return[];const a=new Set(o.map(c=>c.id));return x.taxonomies.filter(c=>k.has(c.id)&&!a.has(c.id))},[x,k,o]);if(i.useEffect(()=>{let a=!1;return G(!0),j(null),fetch("/api/taskforce/custom-taxonomy-library").then(async c=>{if(!c.ok)throw new Error(`Failed to load custom taxonomy packs (${c.status})`);const L=await c.json().catch(()=>({})),f=Array.isArray(L?.packs)?L.packs:[];!a&&f.length>0&&(C(f),S(R=>f.some(p=>p.id===R)?R:f[0].id))}).catch(c=>{a||j(c instanceof Error?c.message:"Failed to load custom taxonomy packs.")}).finally(()=>{a||G(!1)}),()=>{a=!0}},[]),i.useEffect(()=>{P(x?.taxonomies.map(a=>a.id)||[]),B(null)},[T,x]),!x)return e.jsx("div",{className:s.emptyState,children:e.jsx("p",{className:"tf-empty-copy",children:"No custom taxonomy library packs are available."})});const U=a=>{P(c=>c.includes(a)?c.filter(L=>L!==a):[...c,a]),B(null)},h=()=>{P(m.map(a=>a.id)),B(null)},_=()=>{if($.length===0){B({type:"error",message:"Select at least one taxonomy to install."});return}if(E.length>0){B({type:"error",message:`This workspace already has ${E.length} taxonomy ${E.length===1?"id":"ids"} that match your current selection. Deselect conflicting taxonomies before installing this pack.`});return}if(!d){B({type:"error",message:"Custom taxonomy install is not available in this surface yet."});return}d([...o,...m.map(a=>Qo(a))]),B({type:"success",message:`${m.length} custom ${m.length===1?"taxonomy was":"taxonomies were"} added to this workspace.`})};return e.jsxs("div",{className:r.libraryContainer,children:[e.jsxs("section",{className:r.introCard,children:[e.jsxs("span",{className:r.eyebrow,children:[e.jsx(_a,{size:14}),"Custom Taxonomy Library"]}),e.jsx("h3",{className:r.introTitle,children:"Browse reusable custom taxonomy packs."}),e.jsx("p",{className:r.introCopy,children:"These packs install workspace-owned custom taxonomies such as approval stages, channels, and effort bands. Review a pack, choose the taxonomies you want, and install them into this workspace."}),M?e.jsx("p",{className:r.prototypeNotice,children:"Loading available packs…"}):null,O?e.jsx("p",{className:`${r.prototypeResult} ${r.prototypeError}`,children:O}):null]}),e.jsxs("div",{className:r.libraryGrid,children:[e.jsx("div",{className:r.packList,children:g.map(a=>{const c=a.id===T,L=Aa(a),f=a.taxonomies.slice(0,3).map(R=>R.label);return e.jsxs("article",{className:`${r.packCard} ${r.packCardInteractive} ${c?r.packCardActive:""}`,role:"button",tabIndex:0,"aria-pressed":c,onClick:()=>S(a.id),onKeyDown:R=>Ha(R,()=>S(a.id)),children:[e.jsx("div",{className:r.packHeader,children:e.jsxs("div",{className:r.packHeaderText,children:[e.jsxs("div",{className:r.packTitleRow,children:[e.jsx("h4",{className:r.packTitle,children:a.label}),a.domainTag?e.jsx("span",{className:r.packBadge,children:a.domainTag}):null]}),e.jsx("p",{className:r.packDescription,children:a.description}),a.bestFor?e.jsxs("p",{className:r.packBestFor,children:[e.jsx("strong",{children:"Best for:"})," ",a.bestFor]}):null]})}),e.jsxs("div",{className:r.packCounts,children:[e.jsxs("span",{className:r.packCountChip,children:[e.jsx(_a,{size:13}),a.taxonomies.length," taxonomies"]}),L.multiSelectCount>0?e.jsx("span",{className:r.packCountChip,children:"Multi-select"}):null,L.numericCount>0?e.jsx("span",{className:r.packCountChip,children:"Numeric"}):null,L.requiredCount>0?e.jsx("span",{className:r.packCountChip,children:"Required"}):null]}),e.jsxs("div",{className:r.packTaxonomyPreview,children:[f.map(R=>e.jsx("span",{className:r.packTaxonomyChip,children:R},R)),a.taxonomies.length>f.length?e.jsxs("span",{className:r.packTaxonomyMore,children:["+",a.taxonomies.length-f.length," more"]}):null]}),e.jsx("div",{className:r.packActions,children:e.jsx("span",{className:r.packActionHint,children:c?"Previewing":"Click to Preview"})})]},a.id)})}),e.jsxs("aside",{className:r.previewPanel,children:[e.jsxs("div",{className:r.previewHeader,children:[e.jsx("h3",{className:r.previewTitle,children:x.label}),x.bestFor?e.jsxs("p",{className:r.previewBestFor,children:[e.jsx("strong",{children:"Best for:"})," ",x.bestFor]}):null,e.jsx("p",{className:r.previewSubtext,children:"Review each taxonomy before installing it into this workspace. Installed taxonomies become normal workspace-owned custom taxonomies."})]}),e.jsxs("div",{className:r.previewSummaryRow,children:[e.jsxs("span",{className:r.packCountChip,children:[x.taxonomies.length," taxonomies"]}),(w?.formEnabledCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[w.formEnabledCount," show in forms"]}):null,(w?.numericCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[w.numericCount," numeric"]}):null,(w?.requiredCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[w.requiredCount," required"]}):null]}),e.jsxs("section",{className:r.applyPanel,children:[e.jsx("h4",{className:r.applyTitle,children:"Choose Taxonomies to Install"}),e.jsx("p",{className:r.applyCopy,children:"Select only the taxonomies you want to add. This first pass installs new custom taxonomies only and asks you to skip conflicts rather than replace them."}),e.jsx("div",{className:r.checkboxList,children:x.taxonomies.map(a=>e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:$.includes(a.id),onChange:()=>U(a.id)}),e.jsxs("span",{children:[a.label,o.some(c=>c.id===a.id)?" (Already installed)":""]})]},a.id))}),e.jsxs("div",{className:r.analysisPanel,children:[e.jsxs("p",{className:r.analysisCopy,children:[$.length," ",$.length===1?"taxonomy is":"taxonomies are"," currently selected from this pack."]}),m.length>0?e.jsxs("p",{className:r.analysisCopy,children:[m.length," selected ",m.length===1?"taxonomy is":"taxonomies are"," ready to install right now."]}):e.jsx("p",{className:r.analysisCopy,children:"No selected taxonomies are currently installable."}),E.length>0?e.jsxs("p",{className:r.analysisWarning,children:[E.length," selected ",E.length===1?"taxonomy conflicts":"taxonomies conflict"," with existing workspace ids: ",E.join(", "),"."]}):null]}),e.jsxs("div",{className:r.packActions,children:[E.length>0?e.jsx("button",{type:"button",className:s.cancelBtn,onClick:h,children:"Select Installable Only"}):null,e.jsx("button",{type:"button",className:s.submitBtn,onClick:_,disabled:$.length===0||m.length===0,children:"Install Selected Taxonomies"})]}),W?e.jsx("p",{className:`${r.prototypeResult} ${W.type==="error"?r.prototypeError:""}`,children:W.message}):null]}),x.taxonomies.map(a=>e.jsxs("section",{className:r.customTaxonomyCard,children:[e.jsx("div",{className:r.customTaxonomyHeader,children:e.jsxs("div",{children:[e.jsx("h4",{className:r.previewSectionTitle,children:a.label}),a.description?e.jsx("p",{className:r.customTaxonomyDescription,children:a.description}):null]})}),E.includes(a.id)?e.jsx("p",{className:r.analysisWarning,children:"Conflicts with an existing taxonomy id in this workspace."}):null,e.jsx("div",{className:r.customTaxonomyBadges,children:Zo(a).map(c=>e.jsx("span",{className:r.customTaxonomyBadge,children:c},c))}),e.jsx(Ps,{title:a.widgetType==="level"?"Levels":"Options",items:a.options.map(c=>({key:`${a.id}:${c.value}`,label:c.label,icon:c.icon,color:c.color,meta:a.widgetType==="level"?`Level ${c.value}`:String(c.value)}))})]},a.id))]})]})]})}function Da(n){const{mode:o="system",taxonomies:d,onUpdateCustomTaxonomies:u,onAnalyzeSystemTaxonomyPack:g,onApplySystemTaxonomyPack:C}=n;return o==="custom"?e.jsx(el,{taxonomies:d,onUpdateCustomTaxonomies:u}):e.jsx(Xo,{onAnalyzeSystemTaxonomyPack:g,onApplySystemTaxonomyPack:C})}function sl(n){const{taxonomies:o,onUpdateTaxonomies:d,taxonomyDisplayLabels:u,onUpdateTaxonomyDisplayLabels:g,categories:C,pathValidation:T,onUpdateCategory:S,onRemoveCategory:M,onSaveCategory:G,onAddPath:O,onRemovePath:j,onUpdateCategoryIcon:$,onUpdateCategoryColor:P,onBrowseFolders:W,types:B,onSaveType:x,onRemoveType:w,onUpdateType:N,priorities:k,onUpdatePriorities:E,onAnalyzeSystemTaxonomyPack:m,onApplySystemTaxonomyPack:U,manualComplexityEnabled:h,onManualComplexityEnabledChange:_,initialTab:a}=n,[c,L]=i.useState(a||""),[f,R]=i.useState(a?"detail":"list"),[p,F]=i.useState(!1),[J,re]=i.useState(""),es=i.useMemo(()=>Ra().length,[]),ss=i.useMemo(()=>Fi({categories:C,types:B,priorities:k,taxonomies:o,manualComplexityEnabled:h,displayLabels:u}),[C,h,k,o,u,B]),Rs=()=>{if(!J.trim())return;const v=J.toLowerCase().trim().replace(/\s+/g,"-");if(o.some(X=>X.id===v)){alert("A taxonomy with this ID already exists");return}const Y={id:v,label:J.trim(),options:[],widgetType:"select",isSystem:!1,multiSelect:!1,formEnabled:!1,filterEnabled:!0,sortEnabled:!1};d([...o,Y]),re(""),F(!1),L(v),R("detail")},Gs=v=>{d(o.map(Y=>Y.id===v.id?v:Y))},zs=v=>{const Y=o.map(X=>X.id===v?{...X,status:"retired"}:X);d(Y),R("list")},Os=v=>{const Y=o.map(X=>X.id===v?{...X,status:"active"}:X);d(Y)},De=v=>{L(v),R("detail")},hs=(v,Y)=>{const X=o.findIndex(Us=>Us.id===v);if(X<0)return;const ts=X+Y;if(ts<0||ts>=o.length)return;const as=[...o],[Hs]=as.splice(X,1);as.splice(ts,0,Hs),d(as)},gs=ss.find(v=>v.id===c),xs=gs?.taxonomy,Fs=ss.filter(v=>v.kind!=="custom"),Ie=ss.filter(v=>v.kind==="custom");return f==="list"?e.jsxs("div",{className:y.taxonomyDrillDown,children:[e.jsxs("div",{className:y.drillDownList,children:[e.jsx("section",{className:y.librarySection,children:e.jsxs("button",{className:y.libraryLauncher,onClick:()=>De("library"),children:[e.jsxs("div",{className:y.libraryLauncherInfo,children:[e.jsx("span",{className:y.libraryLauncherIcon,children:e.jsx($t,{size:18})}),e.jsxs("div",{className:y.libraryLauncherText,children:[e.jsx("span",{className:y.libraryLauncherLabel,children:"System Taxonomy Library"}),e.jsx("span",{className:y.libraryLauncherSubtext,children:"Browse curated packs for categories, task types, and priority scales."})]})]}),e.jsxs("span",{className:y.libraryLauncherMeta,children:[es," curated packs",e.jsx(Le,{size:16,className:y.chevron})]})]})}),e.jsxs("div",{className:y.drillDownSection,children:[e.jsx("h4",{className:y.drillDownSectionTitle,children:"System Taxonomies"}),Fs.map(v=>e.jsxs("button",{className:`${y.drillDownItem} ${v.id==="complexities"&&!h?y.drillDownItemDimmed:""}`,onClick:()=>De(v.id),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx(Ln,{size:16,className:y.systemIcon}),e.jsxs("div",{className:y.drillDownItemText,children:[e.jsx("span",{className:y.drillDownItemLabel,children:v.label}),e.jsx("span",{className:y.drillDownItemSubtext,children:v.summary})]})]}),e.jsx(Le,{size:16,className:y.chevron})]},v.id))]}),e.jsxs("div",{className:y.drillDownSection,children:[e.jsxs("div",{className:y.drillDownSectionHeader,children:[e.jsx("h4",{className:y.drillDownSectionTitle,children:"Custom Taxonomies"}),e.jsxs("button",{className:D.addTaxonomyBtnSmall,onClick:()=>F(!0),title:"Add Custom Taxonomy",children:[e.jsx(ms,{size:14})," New"]})]}),e.jsxs("button",{className:y.drillDownItem,onClick:()=>De("custom-library"),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx($t,{size:16,className:y.systemIcon}),e.jsxs("div",{className:y.drillDownItemText,children:[e.jsx("span",{className:y.drillDownItemLabel,children:"Custom Taxonomy Library"}),e.jsx("span",{className:y.drillDownItemSubtext,children:"Reusable templates for future custom taxonomy packs"})]})]}),e.jsx(Le,{size:16,className:y.chevron})]}),Ie.length===0?e.jsx("div",{className:s.emptyState,children:e.jsx("p",{className:"tf-empty-copy",children:"No custom taxonomies yet."})}):Ie.map(v=>e.jsxs("div",{className:`${y.drillDownItem} ${v.taxonomy?.status==="retired"?y.drillDownItemDimmed:""}`,children:[e.jsxs("button",{className:y.drillDownItemAction,onClick:()=>De(v.id),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx(In,{size:16}),e.jsxs("div",{className:y.drillDownItemText,children:[e.jsx("span",{className:y.drillDownItemLabel,children:v.taxonomy?.status==="retired"?`${v.label} (Retired)`:v.label}),e.jsx("span",{className:y.drillDownItemSubtext,children:v.summary})]})]}),e.jsx(Le,{size:16,className:y.chevron})]}),e.jsxs("div",{className:y.orderButtons,children:[e.jsx("button",{type:"button",className:s.browseBtn,title:"Move taxonomy up",onClick:Y=>{Y.stopPropagation(),hs(v.id,-1)},disabled:Ie[0]?.id===v.id,children:e.jsx(Ga,{size:16})}),e.jsx("button",{type:"button",className:s.browseBtn,title:"Move taxonomy down",onClick:Y=>{Y.stopPropagation(),hs(v.id,1)},disabled:Ie[Ie.length-1]?.id===v.id,children:e.jsx(za,{size:16})})]})]},v.id))]})]}),p&&e.jsx("div",{className:y.createOverlay,children:e.jsxs("div",{className:y.createDialog,children:[e.jsx("h3",{className:y.createDialogTitle,children:"New Taxonomy"}),e.jsxs("div",{className:y.inputGroup,children:[e.jsx("label",{className:s.label,children:"Name"}),e.jsx("input",{className:s.input,placeholder:"Enter taxonomy name",value:J,onChange:v=>re(v.target.value),autoFocus:!0})]}),e.jsxs("div",{className:y.dialogActions,children:[e.jsx("button",{className:`${s.submitBtn} ${y.createSubmit}`,onClick:Rs,disabled:!J.trim(),children:"Create"}),e.jsx("button",{className:`${s.cancelBtn} ${y.createCancel}`,onClick:()=>{F(!1),re("")},children:"Cancel"})]})]})})]}):e.jsxs("div",{className:y.taxonomyDetailView,children:[e.jsx("div",{className:y.detailHeader,children:e.jsxs("div",{className:y.taxonomyBreadcrumbs,children:[e.jsxs("button",{className:y.breadcrumbPrev,onClick:()=>R("list"),title:"Back to All Taxonomies",children:[e.jsx(Mn,{size:16,className:y.breadcrumbIcon}),"Taxonomies"]}),e.jsx(Le,{size:14,className:y.breadcrumbDivider}),e.jsx("h3",{className:y.breadcrumbActive,children:c==="library"?"System Taxonomy Library":c==="custom-library"?"Custom Taxonomy Library":gs?.label||"Taxonomy"})]})}),e.jsx("div",{className:y.detailContent,children:c==="library"?e.jsx(Da,{mode:"system",onAnalyzeSystemTaxonomyPack:m,onApplySystemTaxonomyPack:U}):c==="custom-library"?e.jsx(Da,{mode:"custom",taxonomies:o,onUpdateCustomTaxonomies:d}):c==="categories"?e.jsx(Ui,{displayLabel:u?.category,onUpdateDisplayLabel:v=>g?.({category:v}),categories:C,pathValidation:T,onUpdateCategory:S,onRemoveCategory:M,onSaveCategory:G,onAddPath:O,onRemovePath:j,onUpdateCategoryIcon:$,onUpdateCategoryColor:P,onBrowseFolders:W}):c==="types"?e.jsx(Wi,{displayLabel:u?.type,onUpdateDisplayLabel:v=>g?.({type:v}),types:B,onSaveType:x,onRemoveType:w,onUpdateType:N}):c==="complexities"?e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h4",{className:s.settingSubtitle,children:"Complexity"}),e.jsx("p",{className:s.settingsHint,children:"Complexity is estimated by AI and system logic by default."}),e.jsx("p",{className:s.settingsHint,children:"Enable this to let users set complexity manually and show the Complexity field in Add/Edit Task. When disabled, the Complexity field is hidden from the task form."}),e.jsxs("label",{className:s.archiveToggle,children:[e.jsx("input",{type:"checkbox",checked:h,onChange:v=>{_(v.target.checked)}}),e.jsx("span",{children:"Manual Complexity"})]})]}):xs?e.jsx(Hi,{taxonomy:xs,onUpdateTaxonomy:Gs,onRemoveTaxonomy:zs,onRestoreTaxonomy:Os}):c==="priorities"?e.jsx(Vi,{displayLabel:u?.priority,onUpdateDisplayLabel:v=>g?.({priority:v}),priorities:k,onUpdatePriorities:E}):e.jsxs("div",{className:s.emptyState,children:[e.jsx("p",{className:"tf-empty-copy",children:"Taxonomy not found."}),e.jsx("button",{className:s.submitBtn,onClick:()=>R("list"),children:"Return to List"})]})})]})}const tl={sun:Rn,wind:En,moon:Dn,sparkles:Fa},Ea=["tasks:read","tasks:write","workspace:read"],Ze={key:"#93c5fd",token:"#c084fc",punctuation:"#cbd5e1",text:"#f8fafc"};function pl(n){const{settingsModel:o,onSectionChange:d,renderMode:u="full"}=n,g=u==="mcp-only",{currentTheme:C,globalTheme:T,themeUseGlobalDefault:S,keyShortcut:M,jsonBackupEnabled:G,globalJsonBackupEnabled:O,globalWeekStartsOn:j,locale:$="en-US",supportedLocales:P=["en-US","es-419","pt-BR"],jsonBackupUseGlobalDefault:W,manualComplexityEnabled:B,checklistDropdownEnabled:x=!0,showTaskCardStatusLabel:w=!1,initialSection:N,onThemeChange:k,onSaveTheme:E,onSaveGlobalTheme:m,onResetProjectToGlobal:U,onKeyShortcutChange:h,onJsonBackupEnabledChange:_,onSaveGlobalJsonBackupEnabled:a,onSaveGlobalWeekStartsOn:c,onSaveLocale:L,onManualComplexityEnabledChange:f,onChecklistDropdownEnabledChange:R,onShowTaskCardStatusLabelChange:p,onSaveSettings:F,onShowFolderBrowserChange:J,onBrowserTargetChange:re,onFetchFolders:es,categories:ss,pathValidation:Rs,taxonomyDisplayLabels:Gs,onUpdateCategory:zs,onRemoveCategory:Os,onSaveCategory:De,onAddPath:hs,onRemovePath:gs,onUpdateCategoryIcon:xs,onUpdateCategoryColor:Fs,types:Ie,onSaveType:v,onRemoveType:Y,onUpdateType:X,taxonomies:ts,onUpdateTaxonomies:as,priorities:Hs,onUpdatePriorities:Us,onAnalyzeSystemTaxonomyPack:Ua,onApplySystemTaxonomyPack:Wa,onUpdateTaxonomyDisplayLabels:Va,projectRoot:be,projectName:Ee,mcpHostRoot:ns,serverHostRoot:is,mcpScriptPath:ye,tenantId:Lt,workspaceId:os,runtimeMode:Re="local",cloudAuthBaseUrl:Ws="",cloudMcpBaseUrl:Vs="",fetchCloudAuthApi:Ge,checkLocalMcpCliHealth:It,getLocalUpdateStatus:Mt,workspaceSwitchingEnabled:Ka=!1,currentWorkspaceRole:qa="member",currentWorkspaceName:ze="",onDeleteWorkspace:Ks,onMcpHostRootChange:Ja,onOpenCloudAuth:qs,isAuthenticated:Pt=!1,setupState:se=null,buildInfo:Bt=null,onSaveSetupMode:al,onSaveWorkspaceProfile:Js,initiativeTemplates:Oe=[],onRefreshInitiativeTemplates:Ys,onCreateInitiativeFromTemplate:Zs}=o,At=Re!=="cloud",[Fe,V]=i.useState(null),[bs,Ya]=i.useState(()=>se?.mode==="operations"?"operations":"core"),[Dt,Et]=i.useState(()=>String(se?.workspace?.name||"").trim()),[Rt,Gt]=i.useState(()=>String(se?.workspace?.description||"")),[ls,zt]=i.useState(""),[Qs,Za]=i.useState(""),[Ot,Ft]=i.useState(!1),[z,ce]=i.useState(()=>g?"mcp":"general"),[Xs,rs]=i.useState(!0),[je,ys]=i.useState(()=>"project");i.useEffect(()=>{Oe.length>0&&!ls&&zt(Oe[0].id)},[Oe,ls]),i.useEffect(()=>{if(!Fe)return;const t=setTimeout(()=>V(null),2500);return()=>clearTimeout(t)},[Fe]),i.useEffect(()=>{Ya(se?.mode==="operations"?"operations":"core")},[se?.mode]),i.useEffect(()=>{Et(String(se?.workspace?.name||"").trim()),Gt(String(se?.workspace?.description||""))},[se?.workspace?.name,se?.workspace?.description]);const Qa=async t=>{k(t);const l=await E(t);V({type:l?"success":"error",message:l?"Project theme saved.":"Failed to save project theme."})},Ht=(t,l,b)=>{const I=tl[t.icon];return e.jsxs("button",{className:`${s.themeBtn} tf-button-tile ${l===t.id?s.activeTheme:""}`,onClick:()=>{b(t.id)},children:[e.jsx(I,{size:20})," ",t.label]},t.id)},et=Re==="cloud"?"cloud":"local",[vs,st]=i.useState(et),[de,tt]=i.useState(!1),[pe,cs]=i.useState(!0),[Xa,Ut]=i.useState(0),[ie,fs]=i.useState({status:"idle"}),[Me,js]=i.useState(!1),[Cs,ks]=i.useState(!1),[we,at]=i.useState({status:"idle"}),[Wt,nt]=i.useState(null),[Vt,Kt]=i.useState(!1),[it,qt]=i.useState(!0),[ot,Ns]=i.useState([]),[en,Jt]=i.useState(!1),[Yt,lt]=i.useState(null),[ds,Ts]=i.useState(null),ws=i.useMemo(()=>`${String(ze||se?.workspace?.name||Ee||os||"Taskforce Workspace").trim()} MCP`,[ze,se?.workspace?.name,Ee,os]),[Zt,rt]=i.useState(ws),[ct,Qt]=i.useState(""),[He,ps]=i.useState(null),[te,Se]=i.useState(null),[Ue,Pe]=i.useState(null),[Xt,dt]=i.useState(null),[ae,pt]=i.useState("general"),[ea,sa]=i.useState(!1),[H,ke]=i.useState(null),[ue,ta]=i.useState([]),[sn,aa]=i.useState(!1),[na,We]=i.useState(null),[ia,oa]=i.useState(null);i.useEffect(()=>{st(et)},[et]),i.useEffect(()=>{rt(t=>t.trim().length>0?t:ws)},[ws]),i.useEffect(()=>{if(!He)return;const t=setTimeout(()=>ps(null),3500);return()=>clearTimeout(t)},[He]),i.useEffect(()=>{if(!te)return;const t=setTimeout(()=>Se(null),3500);return()=>clearTimeout(t)},[te]),i.useEffect(()=>{if(!Ue)return;const t=setTimeout(()=>Pe(null),3500);return()=>clearTimeout(t)},[Ue]);const Ve=i.useMemo(()=>{const t=kn(Vs||Ws||""),l=String(t||Vs||Ws||"").trim().replace(/\/+$/,"");return l?`${l}/mcp`:typeof window>"u"?"/mcp":`${window.location.origin.replace(/\/+$/,"")}/mcp`},[Vs,Ws]),tn=Re!=="cloud",Ss=Re==="cloud"||vs==="cloud",la=Re!=="cloud"&&vs==="local",ra=z==="mcp"&&la,ca=String(ns||is||"").trim(),ut=!!(ca&&ca!==String(be||"").trim());i.useEffect(()=>{if(!ra||!pe){fs({status:"idle"}),js(!1),ks(!1);return}if(ut){fs({status:"host-unverified"}),js(!1);return}let t=!1;return js(!0),It().then(l=>{t||fs({status:"result",result:l})}).catch(()=>{t||fs({status:"result",result:{state:"unusable",code:"GLOBAL_CLI_HEALTH_REQUEST_FAILED",message:"Taskforce could not validate the global CLI. Use Local / npx or retry the check.",executablePath:null,cliVersion:null,appVersion:String(Bt?.version||""),serverName:null,toolCount:null}})}).finally(()=>{t||js(!1)}),()=>{t=!0}},[Bt?.version,It,Xa,ra,ut,pe]),i.useEffect(()=>{if(!Cs)return;let t=!1;return at({status:"loading"}),Mt().then(l=>{t||at({status:"result",result:l.targets.globalCli})}).catch(l=>{t||at({status:"error",message:l instanceof Error?l.message:"Taskforce could not determine the Global CLI installation channel."})}),()=>{t=!0}},[Mt,Cs]);const Ke=Pt,an=i.useMemo(()=>{const t={active:0,expired:1,revoked:2};return[...ot].sort((l,b)=>{const I=(t[l.status]??99)-(t[b.status]??99);return I!==0?I:String(b.createdAt||"").localeCompare(String(l.createdAt||""))})},[ot]),qe=i.useMemo(()=>On(ze||null,Ee||null),[ze,Ee]),Be=Xt?.trim()||"",$s=Be||"<<GENERATE_TOKEN>>",K=i.useMemo(()=>Hn({clientId:ae,endpoint:Ve,tokenValue:$s,serverId:qe}),[Ve,qe,$s,ae]),_s=K.kind==="json"?K.serverConfig??null:null,da=["chatgpt-desktop","claude-chat","grok-chat","gemini-chat","mistral-chat","perplexity-chat"].includes(ae),pa="Resolve your profile with Taskforce.",mt=i.useMemo(()=>{const t=String(be||"").trim();return t?`[projects.${JSON.stringify(t)}]
6
+ trust_level = "trusted"`:""},[be]),ua=i.useMemo(()=>ue.find(t=>t.provider==="chatgpt"&&t.status==="active")||null,[ue]),ma=i.useMemo(()=>ue.find(t=>t.provider==="claude"&&t.status==="active")||null,[ue]),ha=i.useMemo(()=>ue.find(t=>t.provider==="grok"&&t.status==="active")||null,[ue]),ga=i.useMemo(()=>ue.find(t=>t.provider==="gemini"&&t.status==="active")||null,[ue]),xa=i.useMemo(()=>ue.find(t=>t.provider==="mistral"&&t.status==="active")||null,[ue]),ba=i.useMemo(()=>ue.find(t=>t.provider==="perplexity"&&t.status==="active")||null,[ue]),Ls={"chatgpt-desktop":ua,"claude-chat":ma,"grok-chat":ha,"gemini-chat":ga,"mistral-chat":xa,"perplexity-chat":ba}[ae]||null,nn={"chatgpt-desktop":"ChatGPT Desktop","claude-chat":"Claude Chat","grok-chat":"Grok","gemini-chat":"Gemini Spark","mistral-chat":"Mistral Vibe","perplexity-chat":"Perplexity"}[ae]||"This client",on=i.useMemo(()=>{if(K.kind==="text")return K.renderedText||"";let t={[K.rootKey||"mcpServers"]:{[qe]:K.serverConfig}};for(const l of[...K.wrapperKeys||[]].reverse())t={[l]:t};return JSON.stringify(t,null,2)},[K,qe]),ht=(t,l,b="mcpServers",I=[])=>{const A={color:Ze.key},q={color:Ze.token,fontWeight:"bold"},ee={color:Ze.punctuation},me={color:Ze.text},fe=$s,le=[...I,b],Ae=" ".repeat(le.length+1),Is=JSON.stringify(l,null,2).split(`
7
+ `).map((Te,Ce)=>Ce===0?Te:`${Ae}${Te}`).join(`
8
+ `).split(fe);return e.jsxs(e.Fragment,{children:[e.jsx("span",{style:ee,children:"{"}),`
9
+ `,le.map((Te,Ce)=>e.jsxs(Ms.Fragment,{children:[`${" ".repeat(Ce+1)}`,e.jsx("span",{style:A,children:`"${Te}"`}),e.jsx("span",{style:A,children:":"})," ",e.jsx("span",{style:ee,children:"{"}),`
10
+ `]},`mcp-container-open-${Te}-${Ce}`)),Ae,e.jsxs("span",{style:me,children:[`"${t}"`,": ",Is.map((Te,Ce)=>e.jsxs(Ms.Fragment,{children:[Te,Ce<Is.length-1&&e.jsx("span",{style:q,children:fe})]},`config-segment-${Ce}`))]}),`
11
+ `,[...le].reverse().map((Te,Ce)=>e.jsxs(Ms.Fragment,{children:[`${" ".repeat(le.length-Ce)}`,e.jsx("span",{style:ee,children:"}"}),`
12
+ `]},`mcp-container-close-${Te}-${Ce}`)),e.jsx("span",{style:ee,children:"}"})]})},gt=t=>{const l={color:Ze.text},b={color:Ze.token,fontWeight:"bold"},I=$s,A=String(t||"").split(I);return A.map((q,ee)=>e.jsxs(Ms.Fragment,{children:[e.jsx("span",{style:l,children:q}),ee<A.length-1&&e.jsx("span",{style:b,children:I})]},`text-config-${ee}`))},us=async(t,l)=>{try{await navigator.clipboard.writeText(t),Se(null),tt(l),setTimeout(()=>tt(!1),2e3)}catch{tt(!1),Se({type:"error",message:"Could not copy to the clipboard. Select the text and copy it manually."})}},ln=async t=>{try{await navigator.clipboard.writeText(t),Se(null),nt(t),setTimeout(()=>nt(null),2e3)}catch{nt(null),Se({type:"error",message:"Could not copy to the clipboard. Select the text and copy it manually."})}},xt=()=>e.jsxs("div",{className:s.mcpRegistrationHint,children:[e.jsx("span",{children:"Once the MCP is configured, prompt your agent:"}),e.jsx("button",{type:"button",className:s.mcpRegistrationPrompt,onClick:()=>us(pa,"registration"),title:de==="registration"?"Copied":"Copy prompt",children:pa})]}),bt=()=>ae!=="codex"||!mt?null:e.jsxs("div",{className:s.mcpCodexTrustNote,children:[e.jsxs("div",{className:s.mcpCodexTrustHeader,children:[e.jsxs("div",{children:[e.jsx("div",{className:s.mcpCodexTrustTitle,children:"Codex Project Trust"}),e.jsx("div",{className:s.settingDescription,children:"Project-local .codex/config.toml is only loaded after Codex trusts this repository. Add this to ~/.codex/config.toml if you use a repo-local Codex config."})]}),e.jsx("button",{type:"button",className:`${s.copyBtn} ${de==="codex-trust"?s.copyBtnActive:""}`,onClick:()=>us(mt,"codex-trust"),title:de==="codex-trust"?"Copied":"Copy Codex trust snippet","aria-label":"Copy Codex trust snippet",children:de==="codex-trust"?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14})})]}),e.jsx("pre",{className:s.mcpCodexTrustCode,children:e.jsx("code",{children:mt})})]}),rn=()=>e.jsxs("div",{className:`${s.mcpAuthRequiredCard} ${s.marginTop16}`,children:[e.jsx("div",{className:s.mcpAuthRequiredIcon,children:e.jsx(La,{size:20})}),e.jsxs("div",{className:s.mcpAuthRequiredBody,children:[e.jsx("h3",{className:s.settingTitle,children:"Sign in to use Cloud MCP"}),e.jsx("p",{className:s.settingDescription,children:"Cloud MCP connects remote agents through your Taskforce cloud account. Register or sign in to generate cloud MCP tokens, copy client configuration, and connect hosted MCP agents to this workspace."}),qs&&e.jsxs("div",{className:s.mcpAuthRequiredActions,children:[e.jsx("button",{type:"button",className:s.copyBtn,onClick:()=>qs("login"),children:"Sign In"}),e.jsx("button",{type:"button",className:s.copyBtn,onClick:()=>qs("register"),children:"Register"})]})]})]}),ya=()=>{if(!da&&!Be){Se({type:"error",message:"Generate a token before copying the Cloud MCP configuration."});return}Se(null),us(on,"full")},va=ie.status==="result"&&ie.result.state!=="unusable"&&ie.result.executablePath&&!ut?ie.result.executablePath:"taskforce",yt=pe&&ie.status==="result"&&ie.result.state==="unusable",ve=ie.status==="result"&&ie.result.state==="version-mismatch"?ie.result:null,fa=ie.status==="result"&&ie.result.state==="unusable"?ie.result:null,Ne=we.status==="result"?we.result:null,ja=Ne?.channel==="npm-global"?"npm":Ne?.channel==="homebrew"?"Homebrew":Ne?.channel==="development"?"Development checkout":Ne?.channel==="npx-project-local"?"Local / npx":"Unknown",vt=Ne?.manualCommands||[],cn=()=>{let t=ye||"",l=be||"";const b=ns||is;if(b&&be){if(ye&&ye.startsWith(be))t=ye.replace(be,b);else if(ye&&ye.includes("/node_modules/")){const Is=ye.indexOf("/node_modules/");t=b+ye.substring(Is)}l=b}const I=(ye||"").endsWith(".ts"),A=Ee||(be?be.split(/[/\\]/).pop():"project"),q=_t(`taskforce-${A}`,"taskforce-project"),ee=(Lt||"").trim()||"your-tenant-id",me=(os||se?.workspaceId||"").trim(),fe=me&&me!=="default"?me:"your-workspace-id",le=Tn(typeof window>"u"?null:window.location.origin),Ae={TASKFORCE_TENANT_ID:ee,TASKFORCE_WORKSPACE_ID:fe,TASKFORCE_MCP_CONNECTION_ID:zn(fe,ae,l||be||t),...le?{TASKFORCE_APP_BASE_URL:le}:{},TASKFORCE_SHARED_LOCAL_MCP_ENABLED:"true",TASKFORCE_SHARED_LOCAL_MCP_CLIENT_MODE:"proxy",TASKFORCE_MCP_TOOL_PROFILE:"default",...Gn(ae)},Je=pe?{command:va,args:["mcp",l||"."],env:Ae}:{command:I?"npx":"node",args:I?["-y","tsx",t,l]:[t,l],env:Ae};return!pe&&!Je.args[Je.args.length-1]&&(Je.args[Je.args.length-1]=".../path/to/project/root"),{serverId:q,serverConfig:Je}},$e=i.useMemo(()=>cn(),[ye,be,ns,is,Ee,Lt,os,se?.workspaceId,ae,pe,va]),oe=i.useMemo(()=>Un({clientId:ae,serverId:$e.serverId,serverConfig:$e.serverConfig}),[$e,ae]),Ca=oe.kind==="json"?oe.serverConfig??null:null,dn=i.useMemo(()=>{if(oe.kind==="text")return oe.renderedText||"";let t={[oe.rootKey||"mcpServers"]:{[$e.serverId]:oe.serverConfig}};for(const l of[...oe.wrapperKeys||[]].reverse())t={[l]:t};return JSON.stringify(t,null,2)},[oe,$e.serverId]),pn=(t="full")=>{if(!ye&&!pe)return;if(yt){Se({type:"error",message:"The global CLI is not usable. Choose Local / npx or retry the health check."});return}const l=t==="full"?dn:`"${$e.serverId}": ${JSON.stringify($e.serverConfig,null,2)}`;us(l,t)},ka=async()=>{if(Ke){Jt(!0),lt(null);try{const t=await Ge("/api/taskforce/settings/mcp/tokens",{method:"GET",credentials:"include"}),l=await t.json().catch(()=>({}));if(!t.ok){lt(String(l?.error||"Failed to load MCP tokens."));return}Ns(Array.isArray(l?.items)?l.items:[])}catch{lt("Failed to load MCP tokens.")}finally{Jt(!1)}}},ft=async()=>{if(Ke){aa(!0),We(null);try{const t=await Ge("/api/taskforce/settings/mcp/connectors",{method:"GET",credentials:"include"}),l=await t.json().catch(()=>({}));if(!t.ok){We(String(l?.error||"Failed to load MCP connectors."));return}ta(Array.isArray(l?.items)?l.items:[])}catch{We("Failed to load MCP connectors.")}finally{aa(!1)}}},un=async()=>{const t=Zt.trim();if(!t){ps({type:"error",message:"Token name is required."});return}Ts("create"),ps(null),ke(null);try{const l=await Ge("/api/taskforce/settings/mcp/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,scopes:Ea,expiresAt:ct?new Date(`${ct}T00:00:00`).toISOString():null})}),b=await l.json().catch(()=>({}));if(!l.ok){ps({type:"error",message:String(b?.error||"Failed to create token.")});return}dt(String(b?.token||"")),ke(null),rt(ws),Qt(""),Ns(I=>b?.record?[b.record,...I.filter(q=>q.id!==b.record.id)]:I)}catch{ps({type:"error",message:"Failed to create token."})}finally{Ts(null)}},jt=async(t,l)=>{if(!(l==="delete"&&!window.confirm("Delete this token record? This does not affect active tokens."))){Ts(`${l}:${t}`),Pe(null);try{const b=l==="delete"?`/api/taskforce/settings/mcp/tokens/${encodeURIComponent(t)}`:`/api/taskforce/settings/mcp/tokens/${encodeURIComponent(t)}/${l}`,I=await Ge(b,{method:l==="delete"?"DELETE":"POST",credentials:"include"}),A=await I.json().catch(()=>({}));if(!I.ok){Pe({type:"error",message:String(A?.error||`Failed to ${l} token.`)});return}if(l==="regenerate"?(dt(String(A?.token||"")),ke(null),Pe({type:"success",message:"Token regenerated. Copy the new value from the Full Token field."})):Pe(l==="delete"?{type:"success",message:"Token deleted."}:{type:"success",message:"Token revoked."}),l==="delete"){Ns(ee=>ee.filter(me=>me.id!==t));return}const q=A?.record||null;q?.id?Ns(ee=>ee.map(me=>me.id===q.id?q:me)):await ka()}catch{Pe({type:"error",message:`Failed to ${l} token.`})}finally{Ts(null)}}},mn=async()=>{const t=Be;if(!t){ke({type:"error",message:"Generate or paste a full token before testing the MCP connection."});return}sa(!0),ke(null);try{const l=await Ge("/api/taskforce/settings/mcp/test-connection",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,requiredScopes:Ea})}),b=await l.json().catch(()=>({}));if(!l.ok){const A=b?.details&&typeof b.details=="object"?b.details:{},q=Array.isArray(A?.missingScopes)?A.missingScopes.map(Ae=>String(Ae)):[],ee=typeof A?.tokenWorkspaceId=="string"?String(A.tokenWorkspaceId):void 0,me=typeof A?.endpoint=="string"?String(A.endpoint):Ve;let fe=b?.code==="MCP_TOKEN_MISSING_SCOPES"&&q.length>0?`Token is missing required scopes: ${q.join(", ")}.`:String(b?.error||"Failed to test MCP connection."),le;b?.code==="MCP_ENDPOINT_GATEWAY_ERROR"?(fe="The dedicated MCP host is responding with a gateway error.",le="This usually means the cloud MCP service is degraded. Retry shortly, and if it keeps failing treat it as an environment incident rather than a bad token."):b?.code==="MCP_ENDPOINT_TIMEOUT"?(fe="The dedicated MCP host timed out during MCP initialization.",le="This usually points to a degraded or overloaded cloud MCP service."):b?.code==="MCP_ENDPOINT_UNREACHABLE"?(fe="The dedicated MCP host could not be reached.",le="Check the cloud MCP hostname and environment health before rotating credentials."):b?.code==="MCP_ENDPOINT_REJECTED_VALIDATED_TOKEN"&&(fe="The dedicated MCP host rejected a token that validated locally.",le="This suggests the MCP host is stale, routed incorrectly, or out of sync with auth data."),ke({type:"error",message:fe,workspaceName:ee,endpoint:me,errorCode:typeof b?.code=="string"?String(b.code):void 0,followup:le});return}const I=b?.result&&typeof b.result=="object"?b.result:{};ke({type:"success",message:"Connection looks good for this workspace.",scopes:Array.isArray(I?.scopes)?I.scopes.map(A=>String(A)):[],workspaceName:typeof I?.workspaceName=="string"?String(I.workspaceName):"",workspaceId:typeof I?.workspaceId=="string"?String(I.workspaceId):"",endpoint:typeof I?.endpoint=="string"?String(I.endpoint):Ve})}catch{ke({type:"error",message:"Failed to test MCP connection.",endpoint:Ve,followup:"The settings page could not complete the connection probe. Check your network connection and the selected cloud environment."})}finally{sa(!1)}},hn=async t=>{oa(t),We(null);try{const l=await Ge(`/api/taskforce/settings/mcp/connectors/${encodeURIComponent(t)}/disconnect`,{method:"POST",credentials:"include"}),b=await l.json().catch(()=>({}));if(!l.ok){We(String(b?.error||"Failed to disconnect connector."));return}const I=b?.record||null;I?.id?ta(A=>A.map(q=>q.id===I.id?I:q)):await ft()}catch{We("Failed to disconnect connector.")}finally{oa(null)}};i.useEffect(()=>{if(Ke){if(z==="mcp"&&Ss){ka(),ft();return}z==="integrations"&&ft()}},[z,Ss,Ke]),i.useEffect(()=>{z==="initiatives"&&Oe.length===0&&Ys?.()},[z,Oe.length,Ys]),i.useEffect(()=>{N&&(N==="categories"||N==="types"?ce("taxonomy"):N==="documents"?ce("general"):N==="appearance-application"?(rs(!0),ce("appearanceApplication")):N==="appearance-task-cards"?(rs(!0),ce("appearanceTaskCards")):N==="appearance-task-forms"?(rs(!0),ce("appearanceTaskForms")):ce(N==="initiatives"?"initiatives":N==="agents"?"general":N==="mcp"?g?"mcp":"general":N==="integrations"?"integrations":N))},[N,g]),i.useEffect(()=>{(z==="appearanceApplication"||z==="appearanceTaskCards"||z==="appearanceTaskForms")&&rs(!0)},[z]);const gn=t=>{re({type:"category",value:t}),es(""),J(!0)},Na=[{key:"general",label:"General",icon:e.jsx(An,{size:14}),section:"general"},{key:"taxonomy",label:"Taxonomy",icon:e.jsx(Oa,{size:14}),section:"taxonomy"},{key:"integrations",label:"Integrations",icon:e.jsx(La,{size:14}),section:"integrations"}],xn=[{key:"appearanceApplication",label:"Application",section:"appearance-application"},{key:"appearanceTaskCards",label:"Task cards",section:"appearance-task-cards"},{key:"appearanceTaskForms",label:"Task forms",section:"appearance-task-forms"}],Ct=(t,l)=>{ce(t),d?.(l)},bn=()=>e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:`${s.settingTitle} tf-heading-section`,children:"Theme"}),e.jsx("div",{className:s.buttonGrid,children:wa.map(t=>Ht(t,C,Qa))})]}),yn=()=>e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:`${s.settingTitle} tf-heading-section`,children:"Theme Defaults"}),e.jsx("div",{className:s.buttonGrid,children:wa.map(t=>Ht(t,T,async l=>{const b=await m(l);V({type:b?"success":"error",message:b?"Global theme saved.":"Failed to save global theme."})}))})]}),vn=()=>e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:`${s.settingTitle} tf-heading-section`,children:"Task Form"}),e.jsxs("label",{className:s.archiveToggle,children:[e.jsx("input",{type:"checkbox",checked:x,onChange:async t=>{if(!R)return;const l=await R(t.target.checked);V({type:l?"success":"error",message:l?"Checklist dropdown setting saved.":"Failed to save checklist dropdown setting."})},disabled:!R}),e.jsx("span",{children:"Enable checklist dropdown in task form"})]})]});return e.jsx("div",{className:`${s.settingsTab} ${g?s.settingsTabMcpOnly:""}`.trim(),children:e.jsxs("div",{className:`${s.settingsLayout} ${g?s.settingsLayoutMcpOnly:""}`.trim(),children:[!g&&e.jsxs("aside",{className:s.settingsSidebar,children:[e.jsx("div",{className:s.settingsSidebarHeader,children:"Sections"}),e.jsxs("div",{className:`${s.settingsSidebarNav} tf-scrollbar tf-scrollbar--track-transparent tf-scrollbar--compact`,children:[Na.filter(t=>t.key==="general").map(t=>e.jsxs("button",{className:`${s.settingsSidebarBtn} ${z===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>Ct(t.key,t.section),children:[t.icon,e.jsx("span",{children:t.label})]},t.key)),e.jsxs("div",{className:s.settingsSidebarGroup,children:[e.jsxs("button",{className:`${s.settingsSidebarBtn} ${s.settingsSidebarGroupBtn} ${z==="appearanceApplication"||z==="appearanceTaskCards"||z==="appearanceTaskForms"?s.settingsSidebarBtnActive:""}`,onClick:()=>rs(t=>!t),"aria-expanded":Xs,"aria-controls":"settings-appearance-nav",children:[e.jsx(Fa,{size:14}),e.jsx("span",{className:s.settingsSidebarGroupLabel,children:"Appearance"}),e.jsx("span",{className:s.settingsSidebarGroupChevron,children:Xs?e.jsx(Nt,{size:14}):e.jsx(Le,{size:14})})]}),Xs&&e.jsx("div",{id:"settings-appearance-nav",className:s.settingsSidebarSubnav,children:xn.map(t=>e.jsx("button",{className:`${s.settingsSidebarSubBtn} ${z===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>Ct(t.key,t.section),children:e.jsx("span",{children:t.label})},t.key))})]}),Na.filter(t=>t.key!=="general").map(t=>e.jsxs("button",{className:`${s.settingsSidebarBtn} ${z===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>Ct(t.key,t.section),children:[t.icon,e.jsx("span",{children:t.label})]},t.key))]})]}),e.jsxs("div",{className:s.settingsContent,children:[Fe&&e.jsxs("div",{className:`${s.settingsToast} ${Fe.type==="success"?s.settingsToastSuccess:s.settingsToastError}`,children:[Fe.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),e.jsx("span",{children:Fe.message})]}),z==="general"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:`${s.settingsTabs} tf-scrollbar tf-scrollbar--track-transparent tf-scrollbar--compact`,children:[e.jsx("button",{className:`${s.settingsTabBtn} ${je==="project"?s.settingsTabBtnActive:""}`,onClick:()=>ys("project"),children:"Project"}),e.jsx("button",{className:`${s.settingsTabBtn} ${je==="global"?s.settingsTabBtnActive:""}`,onClick:()=>ys("global"),children:"Global"})]}),je==="project"&&e.jsx("div",{className:s.pathInputGroup,style:{justifyContent:"flex-end"},children:e.jsx("button",{onClick:async()=>{if(!window.confirm("Reset project Theme and Backups to global defaults?"))return;const l=await U();V({type:l?"success":"error",message:l?"Project settings reset to global.":"Failed to reset project settings."})},className:s.copyBtn,children:"Reset to Global"})})]}),je==="project"&&e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:s.pathInputGroup,children:[e.jsxs("label",{className:s.label,style:{minWidth:"110px"},children:[bs==="operations"?"Mission":"Project"," name:"]}),e.jsx("input",{className:s.input,type:"text",value:Dt,onChange:t=>Et(t.target.value),placeholder:bs==="operations"?"Mission name":"Project name"})]}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("label",{className:s.label,style:{minWidth:"110px"},children:"Description:"}),e.jsx("textarea",{className:s.textarea,value:Rt,onChange:t=>Gt(t.target.value),placeholder:bs==="operations"?"Mission description (optional)":"Project description (optional)",rows:3})]}),e.jsx("div",{className:s.pathInputGroup,style:{justifyContent:"flex-end"},children:e.jsx("button",{onClick:async()=>{if(!Js)return;const t=await Js({workspaceId:se?.workspaceId,name:Dt,description:Rt});V({type:t.success?"success":"error",message:t.success?`${bs==="operations"?"Mission":"Project"} profile saved.`:t.error||"Failed to save workspace profile."})},className:s.copyBtn,disabled:!Js,children:"Save"})})]}),je==="project"&&e.jsx("div",{className:s.settingGroup,children:At&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:s.settingTitle,children:"Backup"}),e.jsxs("label",{className:s.archiveToggle,children:[e.jsx("input",{type:"checkbox",checked:G,onChange:async t=>{const l=await _(t.target.checked);V({type:l?"success":"error",message:l?"Project backup setting saved.":"Failed to save project backup setting."})}}),e.jsx("span",{children:"Enable automatic JSON backup (`.taskforce/tasks.json`)"})]})]})}),je==="global"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.settingGroup,children:At&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:s.settingTitle,children:"Backup"}),e.jsxs("label",{className:s.archiveToggle,children:[e.jsx("input",{type:"checkbox",checked:O,onChange:async t=>{const l=await a(t.target.checked);V({type:l?"success":"error",message:l?"Global backup default saved.":"Failed to save global backup default."})}}),e.jsx("span",{children:"Enable global JSON backup default"})]})]})}),e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Regional"}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("label",{className:s.label,style:{minWidth:"110px"},children:"Calendar start:"}),e.jsxs("select",{className:s.input,value:j,onChange:async t=>{const l=t.target.value,b=await c(l);V({type:b?"success":"error",message:b?`Week start saved (${l==="sunday"?"Sunday":"Monday"}).`:"Failed to save week start."})},style:{maxWidth:"220px"},children:[e.jsx("option",{value:"sunday",children:"Sunday"}),e.jsx("option",{value:"monday",children:"Monday"})]})]}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("label",{className:s.label,style:{minWidth:"110px"},children:"Language:"}),e.jsx("select",{className:s.input,value:$,onChange:async t=>{const l=t.target.value;if(!L)return;const b=await L(l);V({type:b?"success":"error",message:b?`Language saved (${l}).`:"Failed to save language."})},style:{maxWidth:"220px"},disabled:!L,children:P.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Keyboard Shortcut"}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsxs("div",{className:s.shortcutInputWrapper,children:[e.jsx(Pn,{size:16,className:s.inputIcon}),e.jsx("input",{type:"text",value:M,onChange:t=>h(t.target.value),placeholder:"e.g. Alt+T, Ctrl+Shift+K",className:`${s.input} ${s.shortcutInput}`})]}),e.jsx("button",{onClick:async()=>{const t=await F();V({type:t?"success":"error",message:t?"Global shortcut saved.":"Failed to save global shortcut."})},className:`${s.saveSettingsBtn} ${s.saveSettingsBtnWrapper}`,children:"Save"})]}),e.jsxs("p",{className:s.settingHelper,children:["Supported modifiers: Alt, Option, Ctrl, Shift, Meta (Cmd). Example: ",e.jsx("code",{children:"Alt+T"})," or ",e.jsx("code",{children:"Ctrl+Shift+L"}),"."]})]})]}),je==="project"&&Re==="cloud"&&e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Danger Zone"}),Ka?Pt?qa!=="owner"?e.jsx("p",{className:s.settingHelper,children:"Only workspace owners can delete a workspace."}):e.jsx("div",{className:s.pathInputGroup,children:e.jsxs("button",{className:s.destructiveBtn,onClick:async()=>{if(!Ks)return;const t=String(os||"").trim();if(!t||t==="default"){V({type:"error",message:"A non-default workspace is required for deletion."});return}const l=String(ze||"").trim(),b=window.prompt(`Type "${l}" to permanently delete this workspace.`);if(b===null)return;if(b.trim()!==l){V({type:"error",message:"Workspace name confirmation did not match."});return}const I=await Ks(t);if(!I.success){V({type:"error",message:I.error||"Failed to delete workspace."});return}const A=Array.isArray(I.cleanupWarnings)?I.cleanupWarnings.length:0;V({type:A>0?"error":"success",message:A>0?`Workspace deleted with ${A} cleanup warning(s).`:"Workspace deleted."})},disabled:!Ks,children:[e.jsx(Xe,{size:14,style:{marginRight:8}}),"Delete Workspace"]})}):e.jsx("p",{className:s.settingHelper,children:"Sign in to manage workspace deletion."}):e.jsx("p",{className:s.settingHelper,children:"Workspace deletion is available in cloud runtime only."})]})]}),z==="appearanceApplication"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.settingGroup,children:e.jsxs("div",{className:`${s.settingsTabs} tf-scrollbar tf-scrollbar--track-transparent tf-scrollbar--compact`,children:[e.jsx("button",{className:`${s.settingsTabBtn} ${je==="project"?s.settingsTabBtnActive:""}`,onClick:()=>ys("project"),children:"Project"}),e.jsx("button",{className:`${s.settingsTabBtn} ${je==="global"?s.settingsTabBtnActive:""}`,onClick:()=>ys("global"),children:"Global"})]})}),je==="project"?bn():yn()]}),z==="appearanceTaskCards"&&e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:`${s.settingTitle} tf-heading-section`,children:"Task Cards"}),e.jsxs("label",{className:s.archiveToggle,children:[e.jsx("input",{type:"checkbox",checked:w,onChange:async t=>{if(!p)return;const l=await p(t.target.checked);V({type:l?"success":"error",message:l?"Task card status label setting saved.":"Failed to save task card status label setting."})},disabled:!p}),e.jsx("span",{children:"Show status label"})]})]}),z==="appearanceTaskForms"&&vn(),z==="initiatives"&&e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:s.settingTitleRow,children:[e.jsx("h3",{className:s.settingTitle,children:"Initiative Templates"}),e.jsx("button",{className:s.copyBtn,onClick:()=>{Ys?.()},children:"Refresh"})]}),e.jsx("p",{className:`${s.settingsHint} ${s.marginBottom12}`,children:"Create launch, migration, or incident initiatives from reusable templates."}),e.jsxs("div",{className:s.exportItem,children:[e.jsx("label",{className:s.label,children:"Template"}),e.jsx("select",{className:s.input,value:ls,onChange:t=>{const l=t.target.value;zt(l)},children:Oe.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))})]}),e.jsxs("div",{className:`${s.exportItem} ${s.marginTop12}`,children:[e.jsx("label",{className:s.label,children:"Initiative Title"}),e.jsx("input",{className:s.input,placeholder:"Enter initiative title",value:Qs,onChange:t=>Za(t.target.value)})]}),e.jsxs("button",{className:`${s.secondaryHeaderBtn} ${s.marginTop12}`,disabled:Ot||!ls||!Qs.trim()||!Zs,onClick:async()=>{if(!Zs)return;Ft(!0);const t=await Zs({templateId:ls,title:Qs.trim()});Ft(!1),V({type:t.success?"success":"error",message:t.success?"Initiative created from template.":t.error||"Failed to create initiative."})},children:[Ot?e.jsx(_e,{size:14,className:s.spinner}):e.jsx(Tt,{size:14}),"Create Initiative"]})]}),z==="taxonomy"&&e.jsxs("div",{className:`${s.settingGroup} ${s.flex1} ${s.flexCol}`,children:[e.jsx("h3",{className:s.settingTitle,children:"Taxonomy & Classification"}),e.jsx("p",{className:s.settingsHint,children:"Configure categories, task types, and custom classification systems."}),e.jsx(sl,{taxonomies:ts,onUpdateTaxonomies:as,onApplySystemTaxonomyPack:Wa,taxonomyDisplayLabels:Gs,onUpdateTaxonomyDisplayLabels:Va,categories:ss,pathValidation:Rs,onUpdateCategory:zs,onRemoveCategory:Os,onSaveCategory:De,onAddPath:hs,onRemovePath:gs,onUpdateCategoryIcon:xs,onUpdateCategoryColor:Fs,onBrowseFolders:gn,types:Ie,onSaveType:v,onRemoveType:Y,onUpdateType:X,priorities:Hs,onUpdatePriorities:Us,onAnalyzeSystemTaxonomyPack:Ua,manualComplexityEnabled:B,onManualComplexityEnabledChange:async t=>{const l=await f(t);V({type:l?"success":"error",message:l?"Project complexity setting saved.":"Failed to save project complexity setting."})},initialTab:N==="categories"||N==="types"||N==="priorities"?N:void 0})]}),z==="mcp"&&e.jsxs("div",{className:s.settingsGroup,children:[tn&&e.jsxs("div",{className:s.settingsTabs,children:[e.jsx("button",{className:`${s.settingsTabBtn} ${vs==="local"?s.settingsTabBtnActive:""}`,onClick:()=>st("local"),children:"Local MCP"}),e.jsx("button",{className:`${s.settingsTabBtn} ${vs==="cloud"?s.settingsTabBtnActive:""}`,onClick:()=>st("cloud"),children:"Cloud MCP"})]}),Ss&&!Ke&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Cloud MCP"}),e.jsx("span",{className:s.settingDescription,children:"Cloud MCP connects agents to Taskforce through the hosted MCP endpoint. Use this for remote MCP clients or tools that cannot access your local Taskforce install."})]})}),rn()]}),Ss&&Ke&&e.jsx(e.Fragment,{children:da?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Cloud MCP"}),e.jsx("span",{className:s.settingDescription,children:"Cloud MCP connects agents to Taskforce through the hosted MCP endpoint. Use this for remote MCP clients or tools that cannot access your local Taskforce install."})]})}),e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"OAuth Connector Setup"}),e.jsxs("span",{className:s.settingDescription,children:[nn," uses the Taskforce OAuth connector flow instead of a personal MCP token."]})]}),e.jsx("div",{className:`${Ls?s.successMessage:s.settingHelper} ${s.marginTop12}`,children:Ls?e.jsxs(e.Fragment,{children:[e.jsx(ne,{size:14}),e.jsxs("div",{children:[e.jsx("div",{children:"Connector already authorized for this workspace."}),e.jsxs("div",{className:s.settingHelper,children:["Last used ",Ls.lastUsedAt?new Date(Ls.lastUsedAt).toLocaleString():"not yet"]})]})]}):"No active connector authorization for this workspace yet."}),e.jsx("div",{className:s.settingDescription,style:{marginTop:"12px"},children:"Use the server URL above in your client, then finish the OAuth authorization flow from the Integrations tab."}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%",marginTop:"12px"},children:e.jsx("button",{className:s.copyBtn,onClick:()=>ce("integrations"),children:"Open Integrations"})})]}),e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.codeBlockWrapperCustom} ${s.marginTop12}`,style:{minHeight:"260px"},children:[e.jsxs("div",{className:s.codeHeader,children:[e.jsx("span",{className:s.codeLabel,children:"Cloud MCP Configuration"}),e.jsxs("div",{className:s.codeHeaderActions,children:[e.jsx("select",{className:s.settingInput,value:ae,onChange:t=>pt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:wt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${de==="full"?s.copyBtnActive:""}`,onClick:ya,title:"Copy full configuration file",children:de==="full"?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14})})]})]}),e.jsx("pre",{className:s.settingsCodeBlock,children:e.jsx("code",{children:_s?ht(qe,_s,K.rootKey||"mcpServers",K.wrapperKeys||[]):gt(K.renderedText||"")})})]}),te&&e.jsxs("div",{className:`${te.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[te.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),te.message]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:K.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:K.instructionText}),bt(),xt()]})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Cloud MCP"}),e.jsx("span",{className:s.settingDescription,children:"Cloud MCP connects agents to Taskforce through the hosted MCP endpoint. Use this for remote MCP clients or tools that cannot access your local Taskforce install."})]})}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.codeBlockWrapperCustom} ${s.marginTop16}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("div",{className:s.settingLabelGroup,style:{gap:"2px"},children:e.jsx("span",{className:s.codeLabel,children:"Generate Token"})})}),e.jsx("div",{className:s.mcpTokenCardBody,children:e.jsxs("div",{className:s.mcpTokenFormGrid,children:[e.jsxs("div",{className:s.settingsItem,style:{gap:"6px"},children:[e.jsx("div",{className:s.settingLabelGroup,children:e.jsx("span",{className:s.settingDescription,children:"Token Name"})}),e.jsx("input",{type:"text",className:s.settingInput,placeholder:"Enter a recognizable token name",value:Zt,onChange:t=>rt(t.target.value)})]}),e.jsxs("div",{className:s.settingsItem,style:{gap:"6px"},children:[e.jsx("div",{className:s.settingLabelGroup,children:e.jsx("span",{className:s.settingDescription,children:"Expiry (Optional)"})}),e.jsx("input",{type:"date",className:`${s.settingInput} ${s.taskFormDateInput}`,value:ct,onChange:t=>Qt(t.target.value)})]})]})}),e.jsxs("div",{className:s.mcpTokenOutputWrap,children:[e.jsx("div",{className:s.settingLabelGroup,children:e.jsx("span",{className:s.settingDescription,children:"Full Token"})}),e.jsx("input",{type:"text",className:`${s.settingInput} ${s.mcpTokenValueInput}`,placeholder:"Generate a token to populate the full secret",value:Xt||"",onChange:t=>{dt(t.target.value),ke(null)}})]}),e.jsxs("div",{className:s.mcpTokenActionRow,children:[e.jsxs("button",{className:s.copyBtn,onClick:()=>{mn()},disabled:!Be||ea,title:"Test Token","aria-label":"Test Token",children:[ea?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(Tt,{size:14}),e.jsx("span",{children:"TEST TOKEN"})]}),e.jsxs("button",{className:`${s.copyBtn} ${de==="token"?s.copyBtnActive:""}`,onClick:()=>Be&&us(Be,"token"),disabled:!Be,title:"Copy Token","aria-label":"Copy Token",children:[de==="token"?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14}),e.jsx("span",{children:"COPY TOKEN"})]}),e.jsxs("button",{className:s.copyBtn,onClick:()=>{un()},disabled:ds==="create",title:"Generate Token","aria-label":"Generate Token",children:[ds==="create"?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(Tt,{size:14}),e.jsx("span",{children:"GENERATE TOKEN"})]})]}),He&&e.jsxs("div",{className:`${He.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[He.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),He.message]}),H&&e.jsxs("div",{className:`${H.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[H.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),e.jsxs("div",{children:[e.jsx("div",{children:H.message}),H.type==="success"&&(H.workspaceName||H.workspaceId)&&e.jsxs("div",{className:s.settingHelper,children:["Workspace: ",H.workspaceName||H.workspaceId,H.workspaceId?` (${H.workspaceId})`:""]}),H.type==="success"&&Array.isArray(H.scopes)&&H.scopes.length>0&&e.jsxs("div",{className:s.settingHelper,children:["Granted scopes: ",H.scopes.join(", ")]}),H.endpoint&&e.jsxs("div",{className:s.settingHelper,children:["Endpoint: ",H.endpoint]}),H.type==="error"&&H.errorCode&&e.jsxs("div",{className:s.settingHelper,children:["Error code: ",H.errorCode]}),H.type==="error"&&H.followup&&e.jsx("div",{className:s.settingHelper,children:H.followup})]})]})]}),e.jsxs("div",{className:s.settingGroup,children:[e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.codeBlockWrapperCustom} ${s.marginTop12}`,style:{minHeight:"260px"},children:[e.jsxs("div",{className:s.codeHeader,children:[e.jsx("span",{className:s.codeLabel,children:"Cloud MCP Configuration"}),e.jsxs("div",{className:s.codeHeaderActions,children:[e.jsx("select",{className:s.settingInput,value:ae,onChange:t=>pt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:wt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${de==="full"?s.copyBtnActive:""}`,onClick:ya,title:"Copy full configuration file",children:de==="full"?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14})})]})]}),e.jsx("pre",{className:s.settingsCodeBlock,children:e.jsx("code",{children:_s?ht(qe,_s,K.rootKey||"mcpServers",K.wrapperKeys||[]):gt(K.renderedText||"")})})]}),te&&e.jsxs("div",{className:`${te.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[te.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),te.message]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:K.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:K.instructionText}),bt(),xt()]})]})]}),e.jsxs("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:[e.jsxs("div",{className:s.toggleHeading,onClick:()=>qt(t=>!t),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),qt(l=>!l))},role:"button",tabIndex:0,title:it?"Hide workspace tokens":"Show workspace tokens",children:[e.jsx("label",{className:s.label,children:"Your Tokens"}),it?e.jsx(Nt,{size:14}):e.jsx(Le,{size:14})]}),it&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingDescription} ${s.marginTop12}`,children:"Manage tokens created for this workspace."}),Ue&&e.jsxs("div",{className:`${Ue.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[Ue.type==="success"?e.jsx(ne,{size:14}):e.jsx(Z,{size:14}),Ue.message]}),en?e.jsx("p",{className:s.settingHelper,children:"Loading tokens…"}):Yt?e.jsxs("div",{className:s.errorMessage,children:[e.jsx(Z,{size:14}),Yt]}):ot.length===0?e.jsx("p",{className:s.settingHelper,children:"No MCP tokens yet."}):e.jsx("div",{className:s.settingGroup,children:an.map(t=>e.jsxs("div",{className:`${s.settingsItem} ${s.marginTop12}`,style:{padding:"14px 16px",borderRadius:"12px",border:"1px solid var(--border-primary, rgba(255, 255, 255, 0.1))",background:"rgba(255, 255, 255, 0.03)"},children:[e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsxs("div",{className:s.labelGroupFlex,children:[e.jsx("label",{className:s.settingLabel,children:t.name}),e.jsx("span",{className:`${s.configBadge} ${t.status==="revoked"?s.configBadgeRevoked:t.status==="expired"?s.configBadgeExpired:s.configBadgeActive}`,children:t.status})]}),e.jsx("span",{className:s.settingDescription,style:{fontFamily:'"JetBrains Mono", "Fira Code", monospace'},children:t.tokenPrefix}),e.jsxs("span",{className:s.settingDescription,children:["Scopes: ",t.scopes.join(", ")]}),e.jsxs("span",{className:s.settingDescription,children:["Created ",new Date(t.createdAt).toLocaleDateString(),t.lastUsedAt?` · Last used ${new Date(t.lastUsedAt).toLocaleString()}`:" · Never used"]})]}),e.jsxs("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap",justifyContent:"flex-end"},children:[t.status==="active"&&e.jsx("button",{className:s.copyBtn,onClick:()=>{jt(t.id,"regenerate")},disabled:ds===`regenerate:${t.id}`,children:"Regenerate"}),t.status==="active"&&e.jsx("button",{className:s.copyBtn,onClick:()=>{jt(t.id,"revoke")},disabled:ds===`revoke:${t.id}`,children:"Revoke"}),t.status!=="active"&&e.jsx("button",{className:s.copyBtn,onClick:()=>{jt(t.id,"delete")},disabled:ds===`delete:${t.id}`,children:"Delete"})]})]},t.id))})]})]})]})}),la&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Local MCP"}),e.jsx("span",{className:s.settingDescription,children:"Local MCP connects through your local Taskforce install and does not require a cloud access token. Use this for Codex, Claude Code CLI, Gemini CLI, and similar local MCP clients."})]})}),pe&&ie.status==="host-unverified"&&e.jsxs("div",{className:`${s.mcpHealthCompactAlert} ${s.marginTop12}`,role:"status",children:[e.jsx(Z,{size:17,"aria-hidden":"true"}),e.jsxs("div",{className:s.mcpHealthCompactBody,children:[e.jsx("strong",{children:"Global MCP cannot be checked on this host"}),e.jsxs("span",{children:["This project uses host path mapping. Verify ",e.jsx("code",{children:"taskforce --version"})," in the host environment, or use Local / npx."]})]}),e.jsx("button",{type:"button",className:"tf-button-secondary tf-button-compact",onClick:()=>cs(!1),children:"Use Local / npx"})]}),pe&&ve&&e.jsxs("div",{className:`${s.mcpHealthUpdateRow} ${s.marginTop12}`,role:"status",children:[e.jsx("div",{className:s.mcpHealthUpdateIcon,children:e.jsx(Z,{size:17,"aria-hidden":"true"})}),e.jsxs("div",{className:s.mcpHealthCompactBody,children:[e.jsx("strong",{children:"Global MCP update available"}),e.jsxs("span",{children:[ve.cliVersion||"Unknown version"," installed"," · ",ve.appVersion," expected"]})]}),e.jsxs("button",{type:"button",className:`tf-button-secondary tf-button-compact ${s.mcpHealthStableAction}`,onClick:()=>ks(!0),disabled:Me,"aria-busy":Me,children:[Me&&e.jsx(_e,{className:s.spinner,size:14,"aria-hidden":"true"}),"Review update"]})]}),pe&&fa&&e.jsxs("div",{className:`${s.mcpHealthBlockingAlert} ${s.marginTop12}`,role:"alert",children:[e.jsx(Z,{size:18,"aria-hidden":"true"}),e.jsxs("div",{className:s.mcpHealthCompactBody,children:[e.jsx("strong",{children:"Global MCP is unavailable"}),e.jsx("span",{children:fa.message})]}),e.jsxs("div",{className:s.mcpHealthCompactActions,children:[e.jsx("button",{type:"button",className:"tf-button-secondary tf-button-compact",onClick:()=>cs(!1),children:"Use Local / npx"}),e.jsxs("button",{type:"button",className:`tf-button-secondary tf-button-compact ${s.mcpHealthStableAction}`,onClick:()=>Ut(t=>t+1),disabled:Me,"aria-busy":Me,"aria-label":Me?"Checking Global MCP":"Check again",children:[Me&&e.jsx(_e,{className:s.spinner,size:14,"aria-hidden":"true"}),"Check again"]})]})]}),te?.type==="error"&&!Cs&&e.jsxs("div",{className:`${s.mcpHealthCopyError} ${s.marginTop12}`,role:"alert",children:[e.jsx(Z,{size:14,"aria-hidden":"true"}),te.message]}),e.jsx(Nn,{isOpen:Cs&&!!ve,onClose:()=>ks(!1),title:"Update Global MCP",size:"md",theme:C,children:ve&&e.jsxs("div",{className:s.mcpUpdateDialog,children:[e.jsx("p",{className:s.mcpUpdateDialogIntro,children:"Your Global MCP CLI is usable, but it does not match this Taskforce app. Update it, then restart any running MCP clients."}),e.jsxs("dl",{className:s.mcpUpdateVersionGrid,children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Installed CLI"}),e.jsx("dd",{children:ve.cliVersion||"Unknown"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Expected by app"}),e.jsx("dd",{children:ve.appVersion})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Installation channel"}),e.jsx("dd",{children:we.status==="loading"?"Detecting…":ja})]})]}),we.status==="loading"&&e.jsxs("div",{className:s.mcpUpdateLoading,role:"status","aria-live":"polite",children:[e.jsx(_e,{className:s.spinner,size:15,"aria-hidden":"true"}),"Detecting the package manager…"]}),we.status==="error"&&e.jsxs("div",{className:s.mcpUpdateNotice,role:"status",children:[e.jsx(Z,{size:16,"aria-hidden":"true"}),e.jsxs("span",{children:[we.message," Check again, or update using the package manager you originally used."]})]}),vt.length>0&&we.status!=="loading"&&e.jsxs("div",{className:s.mcpUpdateCommands,children:[e.jsx("span",{className:s.mcpUpdateSectionLabel,children:Ne?.channel==="unknown"||Ne?.channel==="conflicting"||we.status==="error"?"Choose your install method":`Update with ${ja}`}),vt.map(t=>e.jsxs("div",{className:s.mcpHealthCommandRow,children:[e.jsx("code",{className:s.mcpHealthCommand,children:t}),e.jsxs("button",{type:"button",className:"tf-button-secondary tf-button-compact",onClick:()=>{ln(t)},"aria-label":`Copy command: ${t}`,children:[Wt===t?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14}),Wt===t?"Copied":"Copy"]})]},t))]}),Ne&&vt.length===0&&e.jsxs("div",{className:s.mcpUpdateNotice,role:"status",children:[e.jsx(Z,{size:16,"aria-hidden":"true"}),e.jsxs("span",{children:[Ne.guidance," Use Local / npx for this checkout if the versions cannot be aligned."]})]}),te?.type==="error"&&e.jsxs("div",{className:s.mcpHealthCopyError,role:"alert",children:[e.jsx(Z,{size:14,"aria-hidden":"true"}),te.message]}),e.jsx("p",{className:s.mcpUpdateRestartGuidance,children:"After updating, restart Codex, Claude, Gemini, or any other client using this Global MCP configuration."}),e.jsxs("details",{className:s.mcpUpdateDiagnostics,children:[e.jsx("summary",{children:"Technical details"}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Executable"}),e.jsx("dd",{children:ve.executablePath||"Not reported"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"MCP server"}),e.jsx("dd",{children:ve.serverName||"Not reported"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Tools reported"}),e.jsx("dd",{children:ve.toolCount??"Not reported"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Health code"}),e.jsx("dd",{children:ve.code})]})]})]}),e.jsxs("div",{className:s.mcpUpdateDialogActions,children:[e.jsx("button",{type:"button",className:"tf-button-secondary",onClick:()=>cs(!1),children:"Use Local / npx"}),e.jsxs("button",{type:"button",className:"tf-button-primary","data-modal-initial-focus":!0,onClick:()=>{ks(!1),Ut(t=>t+1)},children:[e.jsx(Bn,{size:15}),"Check again"]})]})]})}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.codeBlockWrapperCustom}`,children:[e.jsxs("div",{className:s.codeHeader,children:[e.jsx("span",{className:s.codeLabel,children:"Local MCP Configuration"}),e.jsxs("div",{className:s.codeHeaderActions,children:[e.jsx("select",{className:s.settingInput,value:ae,onChange:t=>pt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:wt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${de==="full"?s.copyBtnActive:""}`,onClick:()=>pn("full"),disabled:yt,title:yt?"Global CLI health check required":"Copy full configuration file",children:de==="full"?e.jsx(ne,{size:14}):e.jsx(Ye,{size:14})})]})]}),e.jsx("pre",{className:s.settingsCodeBlock,children:e.jsx("code",{children:Ca?ht($e.serverId,Ca,oe.rootKey||"mcpServers",oe.wrapperKeys||[]):gt(oe.renderedText||"")})})]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:oe.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:oe.instructionText}),bt(),xt()]})]}),e.jsx("div",{className:`${s.settingGroup} ${s.marginTop12}`,children:e.jsxs("div",{className:s.toggleHeading,onClick:()=>Kt(t=>!t),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),Kt(l=>!l))},role:"button",tabIndex:0,title:"Show advanced MCP install options",children:[e.jsx("label",{className:s.label,children:"Advanced"}),Vt?e.jsx(Nt,{size:14}):e.jsx(Le,{size:14})]})}),Vt&&e.jsxs("div",{className:`${s.settingGroup} ${s.marginTop12}`,children:[e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Advanced Installation Mode"}),e.jsx("span",{className:s.settingDescription,children:"Global mode is recommended. Local / npx is intended for Taskforce development workflows."})]}),e.jsxs("div",{className:s.buttonGrid,children:[e.jsx("button",{className:`${s.themeBtn} ${pe?s.activeTheme:""}`,onClick:()=>cs(!0),children:"Global"}),e.jsx("button",{className:`${s.themeBtn} ${pe?"":s.activeTheme}`,onClick:()=>cs(!1),children:"Local / npx (Dev)"})]}),e.jsxs("div",{className:`${s.settingsItem} ${s.marginTop16}`,children:[e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsxs("div",{className:s.labelGroupFlex,children:[e.jsx("label",{className:s.settingLabel,children:"MCP Path Mapping (Host Root)"}),is&&!ns&&e.jsx("span",{className:s.configBadge,children:"Server Configured"})]}),e.jsx("span",{className:s.settingDescription,children:"If running in Docker, WSL, or Remote Dev, provide the absolute path to this project as seen by your host OS."})]}),e.jsx("div",{className:s.pathInputWrapper,children:e.jsx("input",{type:"text",className:s.settingInput,placeholder:is||"/Users/username/Projects/my-project or C:\\Projects\\my-project",value:ns||"",onChange:t=>Ja?.(t.target.value)})})]})]})]})]}),z==="integrations"&&e.jsxs("div",{className:s.settingsGroup,children:[e.jsx("div",{className:s.settingGroup,children:e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Integrations"}),e.jsx("span",{className:s.settingDescription,children:"Manage OAuth-based app connectors separately from MCP tokens and local client setup."})]})}),e.jsxs("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:[[{key:"chatgpt",label:"ChatGPT Connector",description:"Use the dedicated MCP host in ChatGPT Apps & Connectors. Taskforce handles OAuth and binds each connector authorization to one workspace.",emptyMessage:"No active ChatGPT connector grant for this workspace yet.",connector:ua},{key:"claude",label:"Claude Chat Connector",description:"Use the dedicated MCP host in Claude Settings > Connectors. Taskforce handles OAuth and binds each connector authorization to one workspace.",emptyMessage:"No active Claude Chat connector grant for this workspace yet.",connector:ma},{key:"grok",label:"Grok Connector",description:"Use the custom MCP connector flow at grok.com/connectors. Taskforce handles OAuth and binds each connector authorization to one workspace.",emptyMessage:"No active Grok connector grant for this workspace yet.",connector:ha},{key:"gemini",label:"Gemini Spark Connector",description:"Custom MCP apps are currently limited to eligible Gemini Spark users. Taskforce support will open when Google makes the flow broadly available.",emptyMessage:"No active Gemini Spark connector grant for this workspace yet.",connector:ga,comingSoon:!0},{key:"mistral",label:"Mistral Vibe Connector",description:"Custom MCP connectors are not consistently available in the current Mistral Vibe chat experience. Taskforce support will open when Mistral exposes the flow broadly.",emptyMessage:"No active Mistral Vibe connector grant for this workspace yet.",connector:xa,comingSoon:!0},{key:"perplexity",label:"Perplexity Connector",description:"Custom remote MCP availability varies by Perplexity plan and rollout. Taskforce support will open after its OAuth flow is broadly available and verified.",emptyMessage:"No active Perplexity connector grant for this workspace yet.",connector:ba,comingSoon:!0}].map(t=>{const l=t.connector,b=t.comingSoon===!0;return e.jsxs("div",{className:`${s.settingsItem} ${s.marginTop12}`,style:{padding:"16px",borderRadius:"14px",border:"1px solid var(--border-primary, rgba(255, 255, 255, 0.1))",background:"rgba(255, 255, 255, 0.03)"},children:[e.jsxs("div",{className:s.settingLabelGroup,children:[e.jsxs("div",{className:s.labelGroupFlex,children:[e.jsx("label",{className:s.settingLabel,children:t.label}),e.jsx("span",{className:`${s.configBadge} ${l&&!b?s.configBadgeActive:s.configBadgeRevoked}`,children:b?"coming soon":l?"connected":"not connected"})]}),e.jsx("span",{className:s.settingDescription,children:t.description}),!b&&e.jsx("span",{className:s.settingDescription,style:{fontFamily:'"JetBrains Mono", "Fira Code", monospace'},children:Ve}),b?null:l?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:s.settingDescription,children:["Authorized workspace: ",ze||l.workspaceId]}),e.jsxs("span",{className:s.settingDescription,children:["Granted scopes: ",l.scopes.join(", ")]}),e.jsxs("span",{className:s.settingDescription,children:["Connected ",new Date(l.createdAt).toLocaleString(),l.lastUsedAt?` · Last used ${new Date(l.lastUsedAt).toLocaleString()}`:" · Never used"]})]}):e.jsx("span",{className:s.settingDescription,children:t.emptyMessage})]}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",flexWrap:"wrap"},children:l&&!b&&e.jsxs("button",{className:s.copyBtn,onClick:()=>{hn(l.id)},disabled:ia===l.id,children:[ia===l.id?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(Xe,{size:14}),"Disconnect"]})})]},t.key)}),sn&&e.jsx("p",{className:`${s.settingHelper} ${s.marginTop12}`,children:"Loading connector grants…"}),na&&e.jsxs("div",{className:`${s.errorMessage} ${s.marginTop12}`,children:[e.jsx(Z,{size:14}),na]})]})]})]})]})})}export{pl as TaskSettings};