@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.
- package/LICENSE.md +68 -0
- package/README.md +19 -0
- package/dist/Taskforce.module.css +2191 -540
- package/dist/TaskforceCore.d.ts +1 -0
- package/dist/TaskforceCore.js +65 -22
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.d.ts +1 -0
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +3 -2
- package/dist/annotatedAttachments/commandService.d.ts +68 -0
- package/dist/annotatedAttachments/commandService.js +348 -0
- package/dist/annotatedAttachments/service.d.ts +2 -0
- package/dist/annotatedAttachments/service.js +13 -12
- package/dist/cli.js +158 -9
- package/dist/cliOpenPort.d.ts +1 -0
- package/dist/cliOpenPort.js +4 -0
- package/dist/compat/taskforceAgentDefinitionCompat.d.ts +12 -0
- package/dist/compat/taskforceAgentDefinitionCompat.js +25 -0
- package/dist/compat/workspaceSyncCompat.js +6 -2
- package/dist/compat/workspaceSyncV3CombinedCoverageCompat.d.ts +6 -0
- package/dist/compat/workspaceSyncV3CombinedCoverageCompat.js +22 -0
- package/dist/compat/workspaceSyncV3OperationCompat.d.ts +7 -0
- package/dist/compat/workspaceSyncV3OperationCompat.js +30 -0
- package/dist/components/activity/EntityActivityTimeline.d.ts +10 -2
- package/dist/components/activity/EntityActivityTimeline.js +73 -35
- package/dist/components/context/AttachmentPreviewHost.d.ts +6 -0
- package/dist/components/context/AttachmentPreviewHost.js +222 -0
- package/dist/components/context/ContextAttachmentManager.d.ts +4 -0
- package/dist/components/context/ContextAttachmentManager.js +418 -208
- package/dist/components/features/AiProfilesModule.d.ts +24 -0
- package/dist/components/features/AiProfilesModule.js +744 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.d.ts +4 -1
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +351 -79
- package/dist/components/features/DocumentGenerateModal.js +23 -5
- package/dist/components/features/DocumentIndex.d.ts +19 -1
- package/dist/components/features/DocumentIndex.js +104 -15
- package/dist/components/features/DocumentViewer.d.ts +9 -1
- package/dist/components/features/DocumentViewer.js +721 -100
- package/dist/components/features/DocumentWorkspace.d.ts +37 -2
- package/dist/components/features/DocumentWorkspace.js +21 -6
- package/dist/components/features/TaskSettings.d.ts +6 -27
- package/dist/components/features/TaskSettings.js +257 -151
- package/dist/components/features/TaskforceAgentsModule.d.ts +36 -0
- package/dist/components/features/TaskforceAgentsModule.js +1782 -0
- package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.d.ts +94 -0
- package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.js +70 -0
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +65 -0
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.js +115 -0
- package/dist/components/features/agentRoles/RoleManagerPanel.d.ts +4 -0
- package/dist/components/features/agentRoles/RoleManagerPanel.js +382 -0
- package/dist/components/features/agentSkills/SkillManagerPanel.d.ts +5 -0
- package/dist/components/features/agentSkills/SkillManagerPanel.js +355 -0
- package/dist/components/features/documentWorkspaceModel.d.ts +16 -4
- package/dist/components/features/documentWorkspaceModel.js +30 -5
- package/dist/components/features/planning/PlanningArchiveConfirmation.d.ts +9 -0
- package/dist/components/features/planning/PlanningArchiveConfirmation.js +19 -0
- package/dist/components/features/planning/PlanningCardIdentity.d.ts +12 -0
- package/dist/components/features/planning/PlanningCardIdentity.js +44 -0
- package/dist/components/features/planning/PlanningEntityDetails.d.ts +36 -0
- package/dist/components/features/planning/PlanningEntityDetails.js +131 -0
- package/dist/components/features/planning/PlanningEntitySummary.d.ts +44 -0
- package/dist/components/features/planning/PlanningEntitySummary.js +97 -0
- package/dist/components/features/planning/PlanningLinkPicker.d.ts +9 -0
- package/dist/components/features/planning/PlanningLinkPicker.js +26 -0
- package/dist/components/features/planning/PlanningModule.d.ts +6 -0
- package/dist/components/features/planning/PlanningModule.js +571 -0
- package/dist/components/features/planning/PlanningOwnerDropdown.d.ts +27 -0
- package/dist/components/features/planning/PlanningOwnerDropdown.js +80 -0
- package/dist/components/features/planning/PlanningTaskArrangeControl.d.ts +5 -0
- package/dist/components/features/planning/PlanningTaskArrangeControl.js +11 -0
- package/dist/components/features/planning/PlanningTaskCard.d.ts +20 -0
- package/dist/components/features/planning/PlanningTaskCard.js +26 -0
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +10 -0
- package/dist/components/features/planning/PlanningTaskOrderList.js +52 -0
- package/dist/components/features/planning/PlanningUnlinkConfirmation.d.ts +15 -0
- package/dist/components/features/planning/PlanningUnlinkConfirmation.js +7 -0
- package/dist/components/features/planning/planningCreateIntent.d.ts +10 -0
- package/dist/components/features/planning/planningCreateIntent.js +16 -0
- package/dist/components/features/planning/planningNavigator.d.ts +33 -0
- package/dist/components/features/planning/planningNavigator.js +96 -0
- package/dist/components/features/planning/planningTaskArrangement.d.ts +18 -0
- package/dist/components/features/planning/planningTaskArrangement.js +106 -0
- package/dist/components/features/planning/planningWorkspaceModel.d.ts +121 -0
- package/dist/components/features/planning/planningWorkspaceModel.js +5 -0
- package/dist/components/features/settings/CategoryManager.js +2 -2
- package/dist/components/features/settings/TaxonomyEditor.js +1 -1
- package/dist/components/features/settings/TaxonomyManager.js +1 -1
- package/dist/components/features/settings/TypeManager.js +1 -1
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.d.ts +10 -0
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +175 -0
- package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.d.ts +27 -0
- package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.js +24 -0
- package/dist/components/features/taskforceAgentEditorModel.d.ts +109 -0
- package/dist/components/features/taskforceAgentEditorModel.js +145 -0
- package/dist/components/features/useDocumentWorkspaceController.d.ts +20 -1
- package/dist/components/features/useDocumentWorkspaceController.js +106 -21
- package/dist/components/features/workflowManager/WorkflowManagerModule.d.ts +11 -0
- package/dist/components/features/workflowManager/WorkflowManagerModule.js +313 -0
- package/dist/components/features/workflowManager/WorkflowPublishDialog.d.ts +11 -0
- package/dist/components/features/workflowManager/WorkflowPublishDialog.js +8 -0
- package/dist/components/features/workflowManager/types.d.ts +74 -0
- package/dist/components/features/workflowManager/types.js +1 -0
- package/dist/components/features/workflowManager/useWorkflowManager.d.ts +30 -0
- package/dist/components/features/workflowManager/useWorkflowManager.js +213 -0
- package/dist/components/features/workflowManager/workflowManagerApi.d.ts +52 -0
- package/dist/components/features/workflowManager/workflowManagerApi.js +142 -0
- package/dist/components/task/TaskActionHeader.d.ts +6 -3
- package/dist/components/task/TaskActionHeader.js +46 -53
- package/dist/components/task/TaskCard.d.ts +10 -2
- package/dist/components/task/TaskCard.js +103 -54
- package/dist/components/task/TaskContextUpload.d.ts +1 -0
- package/dist/components/task/TaskContextUpload.js +3 -2
- package/dist/components/task/TaskForm.d.ts +12 -17
- package/dist/components/task/TaskForm.js +544 -199
- package/dist/components/task/TaskImageReviews.d.ts +8 -0
- package/dist/components/task/TaskImageReviews.js +47 -0
- package/dist/components/task/TaskKanban.d.ts +11 -12
- package/dist/components/task/TaskKanban.js +70 -18
- package/dist/components/task/TaskList.d.ts +9 -8
- package/dist/components/task/TaskList.js +46 -32
- package/dist/components/task/TaskReferenceBadge.d.ts +2 -1
- package/dist/components/task/TaskReferenceBadge.js +3 -2
- package/dist/components/task/TaskStatusActions.d.ts +3 -1
- package/dist/components/task/TaskStatusActions.js +17 -6
- package/dist/components/task/TaskWorkflowAssignmentField.d.ts +18 -0
- package/dist/components/task/TaskWorkflowAssignmentField.js +362 -0
- package/dist/components/task/TaskWorkstreamPicker.d.ts +8 -0
- package/dist/components/task/TaskWorkstreamPicker.js +24 -0
- package/dist/components/task/TrashRestoreControls.d.ts +18 -0
- package/dist/components/task/TrashRestoreControls.js +71 -0
- package/dist/components/ui/AiIdentityRosterCard.d.ts +20 -0
- package/dist/components/ui/AiIdentityRosterCard.js +5 -0
- package/dist/components/ui/AssetTraySortControl.d.ts +10 -0
- package/dist/components/ui/AssetTraySortControl.js +38 -0
- package/dist/components/ui/AssigneeIdentity.d.ts +12 -0
- package/dist/components/ui/AssigneeIdentity.js +41 -0
- package/dist/components/ui/DiscardChangesDialog.d.ts +10 -0
- package/dist/components/ui/DiscardChangesDialog.js +7 -0
- package/dist/components/ui/DisclosureSectionHeader.d.ts +4 -1
- package/dist/components/ui/DisclosureSectionHeader.js +2 -2
- package/dist/components/ui/EditableAvatarButton.d.ts +6 -1
- package/dist/components/ui/EditableAvatarButton.js +6 -5
- package/dist/components/ui/HierarchyActionBadge.d.ts +2 -1
- package/dist/components/ui/HierarchyActionBadge.js +2 -2
- package/dist/components/ui/Markdown.d.ts +13 -3
- package/dist/components/ui/Markdown.fixture.d.ts +1 -0
- package/dist/components/ui/Markdown.fixture.js +23 -0
- package/dist/components/ui/Markdown.js +158 -68
- package/dist/components/ui/Modal.d.ts +3 -1
- package/dist/components/ui/Modal.js +85 -19
- package/dist/components/ui/MultiSelectFilter.d.ts +9 -2
- package/dist/components/ui/MultiSelectFilter.js +26 -5
- package/dist/components/ui/ReferenceBadgeButton.js +2 -3
- package/dist/components/ui/TaxonomyDropdown.d.ts +10 -1
- package/dist/components/ui/TaxonomyDropdown.js +149 -58
- package/dist/components/ui/TopNoticeLayer.d.ts +2 -1
- package/dist/components/ui/TopNoticeLayer.js +5 -2
- package/dist/components/ui/useFallbackImageUrl.d.ts +4 -0
- package/dist/components/ui/useFallbackImageUrl.js +20 -0
- package/dist/components/views/AppShellHeader.js +2 -2
- package/dist/components/views/StandaloneLayout.d.ts +1 -0
- package/dist/components/views/StandaloneLayout.js +1684 -620
- package/dist/components/views/WidgetView.d.ts +1 -0
- package/dist/components/views/WidgetView.js +95 -30
- package/dist/components/views/chrome/WorkspaceChromeSections.d.ts +4 -2
- package/dist/components/views/chrome/WorkspaceChromeSections.js +3 -6
- package/dist/components/views/chrome/workspaceChrome.d.ts +5 -8
- package/dist/components/views/chrome/workspaceChrome.js +62 -27
- package/dist/components/views/panels/FilterToolbar.d.ts +4 -3
- package/dist/components/views/panels/FilterToolbar.js +8 -5
- package/dist/components/views/panels/FilterToolbarControls.d.ts +11 -2
- package/dist/components/views/panels/FilterToolbarControls.js +35 -20
- package/dist/components/views/panels/PlanningDrawer.d.ts +62 -51
- package/dist/components/views/panels/PlanningDrawer.js +993 -314
- package/dist/components/views/planningScope.d.ts +4 -0
- package/dist/components/views/planningScope.js +12 -1
- package/dist/components/views/standalone/modals/AccountSettingsModal.d.ts +62 -0
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +197 -0
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +7 -2
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +56 -9
- package/dist/components/views/standalone/modals/HelpModal.d.ts +1 -2
- package/dist/components/views/standalone/modals/HelpModal.js +3 -4
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +8 -9
- package/dist/components/views/standalone/modals/SyncStatusModal.js +85 -25
- package/dist/components/views/standalone/modals/TeamManagementModal.js +1 -1
- package/dist/config/applicationBaseUrl.d.ts +2 -0
- package/dist/config/applicationBaseUrl.js +23 -0
- package/dist/config/envSchema.d.ts +1 -1
- package/dist/config/envSchema.js +166 -5
- package/dist/core/AdminAuditRetentionService.d.ts +43 -0
- package/dist/core/AdminAuditRetentionService.js +126 -0
- package/dist/core/AiProfileService.d.ts +34 -0
- package/dist/core/AiProfileService.js +516 -252
- package/dist/core/AttachmentLinkService.d.ts +10 -2
- package/dist/core/AttachmentLinkService.js +44 -12
- package/dist/core/AuthIdentityService.d.ts +6 -0
- package/dist/core/AuthIdentityService.js +38 -0
- package/dist/core/AuthTokenService.d.ts +1 -0
- package/dist/core/AuthTokenService.js +13 -0
- package/dist/core/DeletedTaskLifecycleService.d.ts +4 -2
- package/dist/core/DeletedTaskLifecycleService.js +124 -38
- package/dist/core/GlobalSettingsService.d.ts +3 -1
- package/dist/core/GlobalSettingsService.js +30 -4
- package/dist/core/InitiativeDurableMutationService.d.ts +89 -0
- package/dist/core/InitiativeDurableMutationService.js +187 -0
- package/dist/core/McpTokenService.d.ts +1 -0
- package/dist/core/McpTokenService.js +39 -13
- package/dist/core/PlanningCommandPreparationService.d.ts +60 -0
- package/dist/core/PlanningCommandPreparationService.js +149 -0
- package/dist/core/ScheduleCommandService.d.ts +76 -0
- package/dist/core/ScheduleCommandService.js +165 -0
- package/dist/core/SyncReconciliationService.d.ts +29 -6
- package/dist/core/SyncReconciliationService.js +256 -84
- package/dist/core/TaskActivityService.d.ts +22 -2
- package/dist/core/TaskActivityService.js +177 -29
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +31 -0
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +231 -0
- package/dist/core/TaskChecklistCommandService.d.ts +50 -0
- package/dist/core/TaskChecklistCommandService.js +111 -0
- package/dist/core/TaskDurableCreateMutationService.d.ts +38 -0
- package/dist/core/TaskDurableCreateMutationService.js +85 -0
- package/dist/core/TaskDurableDeleteMutationService.d.ts +47 -0
- package/dist/core/TaskDurableDeleteMutationService.js +54 -0
- package/dist/core/TaskDurableLifecycleMutationService.d.ts +38 -0
- package/dist/core/TaskDurableLifecycleMutationService.js +42 -0
- package/dist/core/TaskDurableRelationshipMutationService.d.ts +58 -0
- package/dist/core/TaskDurableRelationshipMutationService.js +66 -0
- package/dist/core/TaskDurableRestoreMutationService.d.ts +31 -0
- package/dist/core/TaskDurableRestoreMutationService.js +33 -0
- package/dist/core/TaskDurableStatusMutationService.d.ts +74 -0
- package/dist/core/TaskDurableStatusMutationService.js +247 -0
- package/dist/core/TaskDurableSyncMutationService.d.ts +34 -0
- package/dist/core/TaskDurableSyncMutationService.js +70 -0
- package/dist/core/TaskDurableWorkflowMutationService.d.ts +48 -0
- package/dist/core/TaskDurableWorkflowMutationService.js +59 -0
- package/dist/core/TaskLifecycleCommandService.d.ts +101 -0
- package/dist/core/TaskLifecycleCommandService.js +161 -0
- package/dist/core/TaskRootCommandPreparationService.d.ts +35 -0
- package/dist/core/TaskRootCommandPreparationService.js +103 -0
- package/dist/core/Taskforce.d.ts +479 -59
- package/dist/core/Taskforce.js +3671 -841
- package/dist/core/WorkflowAssignmentService.d.ts +40 -0
- package/dist/core/WorkflowAssignmentService.js +158 -0
- package/dist/core/WorkflowExecutionService.d.ts +69 -0
- package/dist/core/WorkflowExecutionService.js +342 -0
- package/dist/core/WorkflowTaskActivationService.d.ts +32 -0
- package/dist/core/WorkflowTaskActivationService.js +63 -0
- package/dist/core/WorkflowTemplateService.d.ts +64 -0
- package/dist/core/WorkflowTemplateService.js +223 -0
- package/dist/core/WorkspaceLifecycleService.d.ts +1 -0
- package/dist/core/WorkspaceLifecycleService.js +18 -0
- package/dist/core/WorkstreamDurableMutationService.d.ts +90 -0
- package/dist/core/WorkstreamDurableMutationService.js +184 -0
- package/dist/core/planningReferencePolicy.d.ts +14 -0
- package/dist/core/planningReferencePolicy.js +53 -0
- package/dist/core/taskReferencePolicy.js +24 -3
- package/dist/core/types.d.ts +10 -10
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +22 -2
- package/dist/documentReviews/DocumentReviewCommentStore.js +92 -8
- package/dist/documentReviews/commandService.d.ts +51 -0
- package/dist/documentReviews/commandService.js +63 -0
- package/dist/documentReviews/service.d.ts +20 -1
- package/dist/documentReviews/service.js +234 -24
- package/dist/documentReviews/types.d.ts +18 -1
- package/dist/hooks/sync/bootstrap.d.ts +3 -7
- package/dist/hooks/sync/bootstrap.js +6 -14
- package/dist/hooks/sync/browserSyncAuthority.d.ts +21 -0
- package/dist/hooks/sync/browserSyncAuthority.js +70 -0
- package/dist/hooks/sync/browserSyncRemoteServices.d.ts +29 -0
- package/dist/hooks/sync/browserSyncRemoteServices.js +58 -0
- package/dist/hooks/sync/controlPlane.d.ts +1 -37
- package/dist/hooks/sync/controlPlane.js +1 -78
- package/dist/hooks/sync/lifecyclePolicy.d.ts +1 -45
- package/dist/hooks/sync/lifecyclePolicy.js +1 -93
- package/dist/hooks/sync/orchestratorShared.d.ts +9 -3
- package/dist/hooks/sync/orchestratorShared.js +70 -96
- package/dist/hooks/sync/pullLifecycle.d.ts +1 -31
- package/dist/hooks/sync/pullLifecycle.js +1 -24
- package/dist/hooks/sync/realtime.d.ts +4 -1
- package/dist/hooks/sync/realtime.js +103 -3
- package/dist/hooks/sync/recovery.d.ts +1 -84
- package/dist/hooks/sync/recovery.js +1 -245
- package/dist/hooks/sync/transfers.d.ts +8 -129
- package/dist/hooks/sync/transfers.js +19 -581
- package/dist/hooks/sync/useDataVersionRefresh.d.ts +6 -1
- package/dist/hooks/sync/useDataVersionRefresh.js +127 -12
- package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +14 -0
- package/dist/hooks/sync/useDurableLocalOutboxDrain.js +208 -0
- package/dist/hooks/sync/useDurableTaskCreateMutation.d.ts +15 -0
- package/dist/hooks/sync/useDurableTaskCreateMutation.js +152 -0
- package/dist/hooks/sync/useDurableTaskDeleteMutation.d.ts +11 -0
- package/dist/hooks/sync/useDurableTaskDeleteMutation.js +21 -0
- package/dist/hooks/sync/useDurableTaskLifecycleMutation.d.ts +12 -0
- package/dist/hooks/sync/useDurableTaskLifecycleMutation.js +22 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +14 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.js +24 -0
- package/dist/hooks/sync/useDurableTaskRestoreMutation.d.ts +12 -0
- package/dist/hooks/sync/useDurableTaskRestoreMutation.js +24 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +18 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.js +23 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.d.ts +23 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +414 -0
- package/dist/hooks/sync/useSyncStatusActions.d.ts +2 -1
- package/dist/hooks/sync/useSyncStatusActions.js +8 -3
- package/dist/hooks/tasks/taskHttpMutation.d.ts +25 -0
- package/dist/hooks/tasks/taskHttpMutation.js +134 -0
- package/dist/hooks/tasks/useCurrentTaskRelations.d.ts +6 -1
- package/dist/hooks/tasks/useCurrentTaskRelations.js +32 -6
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +4 -3
- package/dist/hooks/tasks/useTaskEditorNavigation.js +9 -13
- package/dist/hooks/tasks/useTaskFormActions.d.ts +17 -2
- package/dist/hooks/tasks/useTaskFormActions.js +309 -55
- package/dist/hooks/tasks/useTaskReferenceContract.d.ts +5 -0
- package/dist/hooks/tasks/useTaskReferenceContract.js +17 -0
- package/dist/hooks/tasks/useTaskRelationships.d.ts +1 -3
- package/dist/hooks/tasks/useTaskRelationships.js +5 -25
- package/dist/hooks/tasks/useTrashSelection.d.ts +12 -0
- package/dist/hooks/tasks/useTrashSelection.js +49 -0
- package/dist/hooks/ui/useInitiativeTemplates.d.ts +24 -0
- package/dist/hooks/ui/useInitiativeTemplates.js +22 -0
- package/dist/hooks/ui/useSettingsModel.d.ts +5 -29
- package/dist/hooks/ui/useSettingsModel.js +31 -15
- package/dist/hooks/ui/useSettingsPersistence.d.ts +0 -1
- package/dist/hooks/ui/useSettingsPersistence.js +4 -8
- package/dist/hooks/ui/useSettingsTaxonomyManagement.js +31 -0
- package/dist/hooks/useFilterSort.d.ts +2 -2
- package/dist/hooks/useFilterSort.js +19 -15
- package/dist/hooks/useRealtimeSync.d.ts +10 -0
- package/dist/hooks/useRealtimeSync.js +57 -4
- package/dist/hooks/useSyncOrchestrator.d.ts +32 -1
- package/dist/hooks/useSyncOrchestrator.js +963 -287
- package/dist/hooks/useTaskData.d.ts +11 -2
- package/dist/hooks/useTaskData.js +59 -26
- package/dist/hooks/useTaskMutations.d.ts +42 -5
- package/dist/hooks/useTaskMutations.js +750 -125
- package/dist/hooks/useTaskforce.d.ts +114 -118
- package/dist/hooks/useTaskforce.js +1106 -396
- package/dist/hooks/useUiNotice.d.ts +5 -1
- package/dist/hooks/useUiNotice.js +13 -2
- package/dist/hooks/useWorkspaceSyncController.d.ts +9 -0
- package/dist/hooks/useWorkspaceSyncController.js +159 -17
- package/dist/hooks/workspace/usePersistedAppUiState.d.ts +74 -0
- package/dist/hooks/workspace/usePersistedAppUiState.js +325 -0
- package/dist/hooks/workspace/usePersistedLayoutUiState.d.ts +76 -0
- package/dist/hooks/workspace/usePersistedLayoutUiState.js +479 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +2 -7
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +42 -31
- package/dist/hooks/workspace/workspaceLocalState.d.ts +42 -6
- package/dist/hooks/workspace/workspaceLocalState.js +213 -5
- package/dist/hooks/workstreams/workstreamHttpMutation.d.ts +23 -0
- package/dist/hooks/workstreams/workstreamHttpMutation.js +134 -0
- package/dist/localization/locales/en-US.d.ts +3 -3
- package/dist/localization/locales/en-US.js +3 -3
- package/dist/localization/locales/es-419.js +3 -3
- package/dist/localization/locales/pt-BR.js +3 -3
- package/dist/mcp/adminWorkspaceRegistrar.js +2 -40
- package/dist/mcp/aiProfileBootstrap.d.ts +3 -0
- package/dist/mcp/aiProfileBootstrap.js +4 -0
- package/dist/mcp/canonicalAssetHelpers.d.ts +16 -4
- package/dist/mcp/canonicalAssetHelpers.js +104 -35
- package/dist/mcp/clientIntegrations.d.ts +4 -2
- package/dist/mcp/clientIntegrations.js +104 -53
- package/dist/mcp/clientRegistry.d.ts +30 -0
- package/dist/mcp/clientRegistry.js +134 -0
- package/dist/mcp/collaborationRegistrar.js +21 -7
- package/dist/mcp/documentAssetRegistrar.js +227 -107
- package/dist/mcp/documentContentCommand.d.ts +94 -0
- package/dist/mcp/documentContentCommand.js +226 -0
- package/dist/mcp/documentHelpers.d.ts +14 -59
- package/dist/mcp/documentHelpers.js +52 -61
- package/dist/mcp/durableTaskMutationRouter.d.ts +65 -0
- package/dist/mcp/durableTaskMutationRouter.js +217 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.d.ts +38 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.js +168 -0
- package/dist/mcp/durableTaskRootMutationRouter.d.ts +64 -0
- package/dist/mcp/durableTaskRootMutationRouter.js +226 -0
- package/dist/mcp/gitWorktreeRoots.d.ts +2 -0
- package/dist/mcp/gitWorktreeRoots.js +19 -0
- package/dist/mcp/legacyServer.d.ts +1 -0
- package/dist/mcp/legacyServer.js +42 -0
- package/dist/mcp/localCliHealth.d.ts +56 -0
- package/dist/mcp/localCliHealth.js +170 -0
- package/dist/mcp/localServiceProxy.d.ts +23 -0
- package/dist/mcp/localServiceProxy.js +255 -0
- package/dist/mcp/mcpInputValidator.d.ts +17 -0
- package/dist/mcp/mcpInputValidator.js +58 -0
- package/dist/mcp/planningAttachmentCommandAdapter.d.ts +127 -0
- package/dist/mcp/planningAttachmentCommandAdapter.js +188 -0
- package/dist/mcp/programScaffoldCommandAdapter.d.ts +6 -0
- package/dist/mcp/programScaffoldCommandAdapter.js +39 -0
- package/dist/mcp/proxyServer.d.ts +1 -0
- package/dist/mcp/proxyServer.js +2 -0
- package/dist/mcp/runtime.d.ts +86 -1
- package/dist/mcp/runtime.js +4562 -2270
- package/dist/mcp/server.js +29 -2
- package/dist/mcp/sharedLocalServiceGateD.d.ts +115 -0
- package/dist/mcp/sharedLocalServiceGateD.js +344 -0
- package/dist/mcp/stdioLifecycle.d.ts +22 -0
- package/dist/mcp/stdioLifecycle.js +54 -0
- package/dist/mcp/taskAttachmentCommandAdapter.d.ts +190 -0
- package/dist/mcp/taskAttachmentCommandAdapter.js +464 -0
- package/dist/mcp/taskAttachmentHelpers.d.ts +8 -6
- package/dist/mcp/taskAttachmentHelpers.js +74 -2
- package/dist/mcp/taskAttachmentTypes.d.ts +26 -5
- package/dist/mcp/taskPlanCommand.d.ts +64 -0
- package/dist/mcp/taskPlanCommand.js +98 -0
- package/dist/mcp/taskPlanningRegistrar.js +253 -101
- package/dist/mcp/toolCallCompatibility.d.ts +6 -0
- package/dist/mcp/toolCallCompatibility.js +16 -0
- package/dist/mcp/toolCatalog.d.ts +3 -1
- package/dist/mcp/toolProfiles.d.ts +18 -0
- package/dist/mcp/toolProfiles.js +79 -0
- package/dist/mcp/toolRegistry.d.ts +102 -609
- package/dist/mcp/toolRegistry.js +108 -88
- package/dist/mcp/workflowExecutionRegistrar.d.ts +2 -0
- package/dist/mcp/workflowExecutionRegistrar.js +51 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +35 -0
- package/dist/migrations/taskSchemaMigrations.js +1797 -4
- package/dist/migrations/taskUpdatedAtSyncDriftMigration.d.ts +20 -0
- package/dist/migrations/taskUpdatedAtSyncDriftMigration.js +153 -0
- package/dist/migrations/taskforceAgentDefinitionMigration.d.ts +26 -0
- package/dist/migrations/taskforceAgentDefinitionMigration.js +116 -0
- package/dist/plugins/vite.js +48 -17
- package/dist/public/Taskforce_Van.webp +0 -0
- package/dist/runtime/appGateDefinitions.d.ts +16 -10
- package/dist/runtime/appGateDefinitions.js +16 -10
- package/dist/runtime/appGates.d.ts +5 -4
- package/dist/runtime/appGates.js +4 -3
- package/dist/server/aiProfileAvatarAssets.d.ts +11 -8
- package/dist/server/aiProfileAvatarAssets.js +159 -70
- package/dist/server/auth.js +15 -1
- package/dist/server/cors.d.ts +2 -1
- package/dist/server/cors.js +45 -8
- package/dist/server/email.d.ts +3 -1
- package/dist/server/email.js +46 -8
- package/dist/server/index.d.ts +24 -1
- package/dist/server/index.js +342 -46
- package/dist/server/localDataOwnerPermit.d.ts +18 -0
- package/dist/server/localDataOwnerPermit.js +58 -0
- package/dist/server/localDatabaseIdentity.d.ts +14 -0
- package/dist/server/localDatabaseIdentity.js +69 -0
- package/dist/server/localRealtimeFileInvalidation.d.ts +1 -0
- package/dist/server/localRealtimeFileInvalidation.js +7 -0
- package/dist/server/localServiceLease.d.ts +62 -0
- package/dist/server/localServiceLease.js +477 -0
- package/dist/server/localServiceOwnershipBootstrap.d.ts +19 -0
- package/dist/server/localServiceOwnershipBootstrap.js +84 -0
- package/dist/server/localServiceSessions.d.ts +87 -0
- package/dist/server/localServiceSessions.js +309 -0
- package/dist/server/localServiceWindowsAcl.d.ts +8 -0
- package/dist/server/localServiceWindowsAcl.js +60 -0
- package/dist/server/localSyncProcessLockBootstrap.d.ts +3 -0
- package/dist/server/localSyncProcessLockBootstrap.js +16 -0
- package/dist/server/localWorkspaceSyncServerComposition.d.ts +59 -0
- package/dist/server/localWorkspaceSyncServerComposition.js +91 -0
- package/dist/server/localWorkspaceSyncServerRuntime.d.ts +119 -0
- package/dist/server/localWorkspaceSyncServerRuntime.js +1163 -0
- package/dist/server/rateLimit.d.ts +1 -0
- package/dist/server/rateLimit.js +16 -0
- package/dist/server/routes/admin.d.ts +2 -4
- package/dist/server/routes/admin.js +199 -337
- package/dist/server/routes/agentRoles.d.ts +13 -0
- package/dist/server/routes/agentRoles.js +273 -0
- package/dist/server/routes/agentSkills.d.ts +16 -0
- package/dist/server/routes/agentSkills.js +291 -0
- package/dist/server/routes/agents.d.ts +49 -0
- package/dist/server/routes/agents.js +1455 -0
- package/dist/server/routes/annotatedAttachments.js +46 -9
- package/dist/server/routes/assetAccess.d.ts +36 -0
- package/dist/server/routes/assetAccess.js +93 -0
- package/dist/server/routes/auth.d.ts +4 -3
- package/dist/server/routes/auth.js +236 -21
- package/dist/server/routes/authSupport.d.ts +3 -1
- package/dist/server/routes/authSupport.js +22 -8
- package/dist/server/routes/documentReviews.d.ts +2 -0
- package/dist/server/routes/documentReviews.js +155 -15
- package/dist/server/routes/documents.d.ts +1 -0
- package/dist/server/routes/documents.js +335 -141
- package/dist/server/routes/durableTaskHttpRouters.d.ts +165 -0
- package/dist/server/routes/durableTaskHttpRouters.js +89 -0
- package/dist/server/routes/localMcpHealth.d.ts +11 -0
- package/dist/server/routes/localMcpHealth.js +29 -0
- package/dist/server/routes/localService.d.ts +13 -0
- package/dist/server/routes/localService.js +444 -0
- package/dist/server/routes/localUpdate.d.ts +11 -0
- package/dist/server/routes/localUpdate.js +154 -0
- package/dist/server/routes/primitives.d.ts +27 -0
- package/dist/server/routes/primitives.js +18 -0
- package/dist/server/routes/resources.d.ts +1 -10
- package/dist/server/routes/resources.js +1 -153
- package/dist/server/routes/shared.d.ts +31 -2
- package/dist/server/routes/shared.js +394 -0
- package/dist/server/routes/sync.d.ts +2 -0
- package/dist/server/routes/sync.js +184 -272
- package/dist/server/routes/syncAuxRoutes.d.ts +3 -1
- package/dist/server/routes/syncAuxRoutes.js +9 -4
- package/dist/server/routes/syncCoordinatorLocalRoutes.d.ts +6 -0
- package/dist/server/routes/syncCoordinatorLocalRoutes.js +867 -0
- package/dist/server/routes/syncPullApplyRoutes.d.ts +29 -1
- package/dist/server/routes/syncPullApplyRoutes.js +520 -17
- package/dist/server/routes/syncPushRoutes.d.ts +33 -4
- package/dist/server/routes/syncPushRoutes.js +251 -62
- package/dist/server/routes/syncRouteTypes.d.ts +1 -1
- package/dist/server/routes/syncSnapshotRoutes.d.ts +15 -7
- package/dist/server/routes/syncSnapshotRoutes.js +95 -17
- package/dist/server/routes/syncV3DiagnosticsRoutes.d.ts +14 -0
- package/dist/server/routes/syncV3DiagnosticsRoutes.js +72 -0
- package/dist/server/routes/syncV3FeedRoutes.d.ts +20 -0
- package/dist/server/routes/syncV3FeedRoutes.js +462 -0
- package/dist/server/routes/syncV3LocalCaptureRoutes.d.ts +37 -0
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +897 -0
- package/dist/server/routes/syncV3LocalDispatchRoutes.d.ts +17 -0
- package/dist/server/routes/syncV3LocalDispatchRoutes.js +280 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +17 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +493 -0
- package/dist/server/routes/syncV3LocalOwnershipRoutes.d.ts +10 -0
- package/dist/server/routes/syncV3LocalOwnershipRoutes.js +51 -0
- package/dist/server/routes/syncV3LocalRecoveryRoutes.d.ts +12 -0
- package/dist/server/routes/syncV3LocalRecoveryRoutes.js +78 -0
- package/dist/server/routes/syncV3OperationRoutes.d.ts +35 -0
- package/dist/server/routes/syncV3OperationRoutes.js +1136 -0
- package/dist/server/routes/tasks.d.ts +0 -2
- package/dist/server/routes/tasks.js +932 -195
- package/dist/server/routes/workflows.d.ts +26 -0
- package/dist/server/routes/workflows.js +500 -0
- package/dist/server/routes.d.ts +1 -6
- package/dist/server/routes.js +148 -339
- package/dist/server/smtpTransport.d.ts +11 -3
- package/dist/server/smtpTransport.js +9 -2
- package/dist/server/start.js +42 -10
- package/dist/service/localServiceCli.d.ts +33 -0
- package/dist/service/localServiceCli.js +365 -0
- package/dist/service/localServiceClientLifecycle.d.ts +25 -0
- package/dist/service/localServiceClientLifecycle.js +128 -0
- package/dist/service/localServiceOpen.d.ts +17 -0
- package/dist/service/localServiceOpen.js +27 -0
- package/dist/services/agentRoleResolver.d.ts +4 -0
- package/dist/services/agentRoleResolver.js +7 -0
- package/dist/services/aiProfileAvatarGenerationService.d.ts +41 -0
- package/dist/services/aiProfileAvatarGenerationService.js +158 -0
- package/dist/services/avatarImageProvider.d.ts +33 -0
- package/dist/services/avatarImageProvider.js +140 -0
- package/dist/services/bedrockAnthropicMessagesModelGateway.d.ts +24 -0
- package/dist/services/bedrockAnthropicMessagesModelGateway.js +95 -0
- package/dist/services/bedrockMantleModelGateway.d.ts +43 -0
- package/dist/services/bedrockMantleModelGateway.js +81 -0
- package/dist/services/bedrockModelGateway.d.ts +26 -0
- package/dist/services/bedrockModelGateway.js +94 -0
- package/dist/services/modelGateway.d.ts +82 -0
- package/dist/services/modelGateway.js +61 -0
- package/dist/services/taskforceAgentAvatarImageProvider.d.ts +8 -0
- package/dist/services/taskforceAgentAvatarImageProvider.js +24 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +77 -0
- package/dist/services/taskforceAgentMcpBridge.js +527 -0
- package/dist/shared/agentRoleDefinition.d.ts +34 -0
- package/dist/shared/agentRoleDefinition.js +207 -0
- package/dist/shared/aiProfileAvatarEligibility.d.ts +10 -0
- package/dist/shared/aiProfileAvatarEligibility.js +27 -0
- package/dist/shared/aiProfileColors.d.ts +7 -0
- package/dist/shared/aiProfileColors.js +33 -0
- package/dist/shared/colorPalette.d.ts +3 -0
- package/dist/shared/colorPalette.js +20 -0
- package/dist/shared/commentProvenance.d.ts +4 -0
- package/dist/shared/commentProvenance.js +6 -0
- package/dist/shared/deletedTaskRetention.d.ts +2 -0
- package/dist/shared/deletedTaskRetention.js +7 -0
- package/dist/shared/passwordPolicy.d.ts +2 -1
- package/dist/shared/passwordPolicy.js +9 -0
- package/dist/shared/taskDeepLinks.d.ts +28 -0
- package/dist/shared/taskDeepLinks.js +48 -0
- package/dist/shared/taskRestoreDestination.d.ts +2 -0
- package/dist/shared/taskRestoreDestination.js +5 -0
- package/dist/shared/taskforceAgentDefinition.d.ts +88 -0
- package/dist/shared/taskforceAgentDefinition.js +434 -0
- package/dist/shared/taskforceAgentExecutionSnapshot.d.ts +50 -0
- package/dist/shared/taskforceAgentExecutionSnapshot.js +68 -0
- package/dist/shared/taskforceAgentModels.d.ts +56 -0
- package/dist/shared/taskforceAgentModels.js +314 -0
- package/dist/shared/taskforceAgentRunContext.d.ts +23 -0
- package/dist/shared/taskforceAgentRunContext.js +21 -0
- package/dist/shared/taskforceAgentRuntimeResolution.d.ts +31 -0
- package/dist/shared/taskforceAgentRuntimeResolution.js +72 -0
- package/dist/shared/taskforceAgentSkill.d.ts +33 -0
- package/dist/shared/taskforceAgentSkill.js +149 -0
- package/dist/shared/taxonomyLibrary.js +1 -1
- package/dist/storage/agentRoleStore.d.ts +91 -0
- package/dist/storage/agentRoleStore.js +385 -0
- package/dist/storage/databaseAdapter.d.ts +1 -0
- package/dist/storage/databaseAdapter.js +7 -1
- package/dist/storage/documentIntegrity.d.ts +12 -3
- package/dist/storage/documentIntegrity.js +105 -27
- package/dist/storage/objectStorageClient.d.ts +10 -4
- package/dist/storage/objectStorageClient.js +73 -43
- package/dist/storage/postgresAdapter.d.ts +2 -1
- package/dist/storage/postgresAdapter.js +38 -6
- package/dist/storage/postgresWorker.js +65 -1
- package/dist/storage/sqliteAdapter.d.ts +1 -1
- package/dist/storage/sqliteAdapter.js +7 -1
- package/dist/storage/sqliteWalHealth.d.ts +71 -0
- package/dist/storage/sqliteWalHealth.js +176 -0
- package/dist/storage/taskDataPath.d.ts +1 -0
- package/dist/storage/taskDataPath.js +20 -0
- package/dist/storage/taskforceAgentConversationStore.d.ts +66 -0
- package/dist/storage/taskforceAgentConversationStore.js +264 -0
- package/dist/storage/taskforceAgentSkillStore.d.ts +93 -0
- package/dist/storage/taskforceAgentSkillStore.js +355 -0
- package/dist/storage/taskforceAgentStore.d.ts +105 -0
- package/dist/storage/taskforceAgentStore.js +549 -0
- package/dist/storage/workflowStore.d.ts +223 -0
- package/dist/storage/workflowStore.js +1032 -0
- package/dist/storage/workspaceAssetStore.d.ts +70 -0
- package/dist/storage/workspaceAssetStore.js +418 -25
- package/dist/sync/aiProfileAvatarSyncPaths.d.ts +14 -0
- package/dist/sync/aiProfileAvatarSyncPaths.js +56 -0
- package/dist/sync/cloudSyncApi.d.ts +329 -0
- package/dist/sync/cloudSyncApi.js +596 -4
- package/dist/sync/collaborationSyncPayload.d.ts +5 -1
- package/dist/sync/collaborationSyncPayload.js +213 -1
- package/dist/sync/collaborationSyncState.d.ts +23 -3
- package/dist/sync/collaborationSyncState.js +92 -3
- package/dist/sync/contentSyncPayload.d.ts +9 -0
- package/dist/sync/contentSyncPayload.js +29 -0
- package/dist/sync/contentSyncState.d.ts +79 -4
- package/dist/sync/contentSyncState.js +1113 -313
- package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.d.ts +39 -0
- package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.js +234 -0
- package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.d.ts +7 -0
- package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.js +10 -0
- package/dist/sync/coordinator/localSyncCommittedApplyPolicy.d.ts +7 -0
- package/dist/sync/coordinator/localSyncCommittedApplyPolicy.js +41 -0
- package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.d.ts +178 -0
- package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.js +131 -0
- package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.d.ts +25 -0
- package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.js +200 -0
- package/dist/sync/coordinator/localSyncCoordinatorHost.d.ts +84 -0
- package/dist/sync/coordinator/localSyncCoordinatorHost.js +435 -0
- package/dist/sync/coordinator/localSyncCoordinatorRouteServices.d.ts +33 -0
- package/dist/sync/coordinator/localSyncCoordinatorRouteServices.js +1 -0
- package/dist/sync/coordinator/localSyncCoordinatorStore.d.ts +122 -0
- package/dist/sync/coordinator/localSyncCoordinatorStore.js +1039 -0
- package/dist/sync/coordinator/localSyncCoordinatorTypes.d.ts +82 -0
- package/dist/sync/coordinator/localSyncCoordinatorTypes.js +9 -0
- package/dist/sync/coordinator/localSyncDispatchTracker.d.ts +15 -0
- package/dist/sync/coordinator/localSyncDispatchTracker.js +68 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +200 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +1388 -0
- package/dist/sync/coordinator/localSyncExecutionPermitTypes.d.ts +52 -0
- package/dist/sync/coordinator/localSyncExecutionPermitTypes.js +8 -0
- package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.d.ts +33 -0
- package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.js +83 -0
- package/dist/sync/coordinator/localSyncPermitTransactionHooks.d.ts +9 -0
- package/dist/sync/coordinator/localSyncPermitTransactionHooks.js +27 -0
- package/dist/sync/coordinator/localSyncProcessLock.d.ts +12 -0
- package/dist/sync/coordinator/localSyncProcessLock.js +212 -0
- package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.d.ts +17 -0
- package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.js +82 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.d.ts +134 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +981 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +189 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +961 -0
- package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.d.ts +19 -0
- package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.js +83 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +117 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +323 -0
- package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.d.ts +11 -0
- package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.js +51 -0
- package/dist/sync/coordinator/workspaceSyncTransportGateway.d.ts +139 -0
- package/dist/sync/coordinator/workspaceSyncTransportGateway.js +738 -0
- package/dist/sync/engine/localWorkspaceContentManifestService.d.ts +21 -0
- package/dist/sync/engine/localWorkspaceContentManifestService.js +44 -0
- package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.d.ts +36 -0
- package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.js +203 -0
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +21 -0
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.js +13 -0
- package/dist/sync/engine/workspaceSyncContentPullObligationStore.d.ts +65 -0
- package/dist/sync/engine/workspaceSyncContentPullObligationStore.js +160 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +216 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.js +1068 -0
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.d.ts +28 -0
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +543 -0
- package/dist/sync/engine/workspaceSyncEngineContracts.d.ts +78 -0
- package/dist/sync/engine/workspaceSyncEngineContracts.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineControlPlane.d.ts +37 -0
- package/dist/sync/engine/workspaceSyncEngineControlPlane.js +79 -0
- package/dist/sync/engine/workspaceSyncEngineIdentity.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncEngineIdentity.js +4 -0
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.d.ts +68 -0
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +180 -0
- package/dist/sync/engine/workspaceSyncEngineLocalApply.d.ts +72 -0
- package/dist/sync/engine/workspaceSyncEngineLocalApply.js +132 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +70 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +25 -0
- package/dist/sync/engine/workspaceSyncEngineParity.d.ts +8 -0
- package/dist/sync/engine/workspaceSyncEngineParity.js +7 -0
- package/dist/sync/engine/workspaceSyncEnginePullPolicy.d.ts +32 -0
- package/dist/sync/engine/workspaceSyncEnginePullPolicy.js +27 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +20 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +87 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.d.ts +56 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.js +288 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +104 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +21 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +61 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.js +59 -0
- package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.d.ts +28 -0
- package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.js +86 -0
- package/dist/sync/engine/workspaceSyncEngineServerLocalServices.d.ts +73 -0
- package/dist/sync/engine/workspaceSyncEngineServerLocalServices.js +452 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.d.ts +23 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +451 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +125 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +1124 -0
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.d.ts +63 -0
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +276 -0
- package/dist/sync/engine/workspaceSyncEngineTransferCompletion.d.ts +20 -0
- package/dist/sync/engine/workspaceSyncEngineTransferCompletion.js +37 -0
- package/dist/sync/engine/workspaceSyncEngineTransferTypes.d.ts +7 -0
- package/dist/sync/engine/workspaceSyncEngineTransferTypes.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +240 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +1184 -0
- package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.d.ts +39 -0
- package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.js +39 -0
- package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.d.ts +25 -0
- package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.js +83 -0
- package/dist/sync/engine/workspaceSyncImmutableContentProvider.d.ts +71 -0
- package/dist/sync/engine/workspaceSyncImmutableContentProvider.js +209 -0
- package/dist/sync/engine/workspaceSyncImmutableContentStager.d.ts +32 -0
- package/dist/sync/engine/workspaceSyncImmutableContentStager.js +202 -0
- package/dist/sync/engine/workspaceSyncPublishedContentResolver.d.ts +43 -0
- package/dist/sync/engine/workspaceSyncPublishedContentResolver.js +142 -0
- package/dist/sync/engine/workspaceSyncServerContentRuntime.d.ts +26 -0
- package/dist/sync/engine/workspaceSyncServerContentRuntime.js +41 -0
- package/dist/sync/engine/workspaceSyncServerDataServices.d.ts +44 -0
- package/dist/sync/engine/workspaceSyncServerDataServices.js +143 -0
- package/dist/sync/engine/workspaceSyncTransferEvidence.d.ts +39 -0
- package/dist/sync/engine/workspaceSyncTransferEvidence.js +45 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +44 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +990 -0
- package/dist/sync/engine/workspaceSyncV2PreparedContent.d.ts +82 -0
- package/dist/sync/engine/workspaceSyncV2PreparedContent.js +219 -0
- package/dist/sync/planningCanonicalFields.d.ts +41 -0
- package/dist/sync/planningCanonicalFields.js +211 -0
- package/dist/sync/planningSyncPayload.d.ts +5 -1
- package/dist/sync/planningSyncPayload.js +88 -4
- package/dist/sync/syncApplyHandlers.d.ts +98 -8
- package/dist/sync/syncApplyHandlers.js +816 -78
- package/dist/sync/syncResourceAdapters.d.ts +10 -0
- package/dist/sync/syncResourceAdapters.js +21 -1
- package/dist/sync/syncService.d.ts +57 -1
- package/dist/sync/syncService.js +1085 -138
- package/dist/sync/taskNestedContent.d.ts +2 -0
- package/dist/sync/taskNestedContent.js +8 -0
- package/dist/sync/taskSyncChangeKey.js +0 -1
- package/dist/sync/taskSyncPayload.d.ts +0 -1
- package/dist/sync/taskSyncPayload.js +14 -3
- package/dist/sync/v3/canonicalWorkspaceSyncJson.d.ts +2 -0
- package/dist/sync/v3/canonicalWorkspaceSyncJson.js +26 -0
- package/dist/sync/v3/combinedFeedCapability.d.ts +21 -0
- package/dist/sync/v3/combinedFeedCapability.js +80 -0
- package/dist/sync/v3/combinedFeedPrerequisites.d.ts +18 -0
- package/dist/sync/v3/combinedFeedPrerequisites.js +184 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.d.ts +61 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.js +287 -0
- package/dist/sync/v3/durableOperationReplay.d.ts +36 -0
- package/dist/sync/v3/durableOperationReplay.js +103 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +49 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +198 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +47 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +182 -0
- package/dist/sync/v3/durableTaskCommentMutationRouter.d.ts +47 -0
- package/dist/sync/v3/durableTaskCommentMutationRouter.js +191 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +60 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +320 -0
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +40 -0
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +518 -0
- package/dist/sync/v3/durableTaxonomyMutationRouter.d.ts +63 -0
- package/dist/sync/v3/durableTaxonomyMutationRouter.js +289 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +77 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +361 -0
- package/dist/sync/v3/durableWorkstreamMutationRouter.d.ts +61 -0
- package/dist/sync/v3/durableWorkstreamMutationRouter.js +287 -0
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.d.ts +42 -0
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +122 -0
- package/dist/sync/v3/entityEventLegacyAdoptionContract.d.ts +6 -0
- package/dist/sync/v3/entityEventLegacyAdoptionContract.js +6 -0
- package/dist/sync/v3/entityEventLegacyAdoptionService.d.ts +62 -0
- package/dist/sync/v3/entityEventLegacyAdoptionService.js +180 -0
- package/dist/sync/v3/initiativeActivityAuthoritativeRevision.d.ts +11 -0
- package/dist/sync/v3/initiativeActivityAuthoritativeRevision.js +23 -0
- package/dist/sync/v3/initiativeActivityIdentity.d.ts +8 -0
- package/dist/sync/v3/initiativeActivityIdentity.js +14 -0
- package/dist/sync/v3/initiativeCoexistence.d.ts +26 -0
- package/dist/sync/v3/initiativeCoexistence.js +148 -0
- package/dist/sync/v3/initiativeFeedActivationCapability.d.ts +6 -0
- package/dist/sync/v3/initiativeFeedActivationCapability.js +16 -0
- package/dist/sync/v3/initiativeMutationPayload.d.ts +26 -0
- package/dist/sync/v3/initiativeMutationPayload.js +144 -0
- package/dist/sync/v3/initiativeMutationService.d.ts +62 -0
- package/dist/sync/v3/initiativeMutationService.js +206 -0
- package/dist/sync/v3/localEntityEventLegacyAdoption.d.ts +31 -0
- package/dist/sync/v3/localEntityEventLegacyAdoption.js +607 -0
- package/dist/sync/v3/localInitiativeOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localInitiativeOutboxHandler.js +88 -0
- package/dist/sync/v3/localInitiativeOutboxService.d.ts +50 -0
- package/dist/sync/v3/localInitiativeOutboxService.js +495 -0
- package/dist/sync/v3/localOperationIdentityStore.d.ts +81 -0
- package/dist/sync/v3/localOperationIdentityStore.js +388 -0
- package/dist/sync/v3/localOutboxDispatchCapability.d.ts +7 -0
- package/dist/sync/v3/localOutboxDispatchCapability.js +13 -0
- package/dist/sync/v3/localOutboxDispatchRuntime.d.ts +16 -0
- package/dist/sync/v3/localOutboxDispatchRuntime.js +269 -0
- package/dist/sync/v3/localOutboxDispatcher.d.ts +53 -0
- package/dist/sync/v3/localOutboxDispatcher.js +362 -0
- package/dist/sync/v3/localOutboxDrainClient.d.ts +50 -0
- package/dist/sync/v3/localOutboxDrainClient.js +250 -0
- package/dist/sync/v3/localOutboxOperationHandler.d.ts +31 -0
- package/dist/sync/v3/localOutboxOperationHandler.js +10 -0
- package/dist/sync/v3/localOutboxRecoveryClient.d.ts +14 -0
- package/dist/sync/v3/localOutboxRecoveryClient.js +45 -0
- package/dist/sync/v3/localOutboxRecoveryPreparationService.d.ts +12 -0
- package/dist/sync/v3/localOutboxRecoveryPreparationService.js +151 -0
- package/dist/sync/v3/localSyncIdentityStore.d.ts +9 -0
- package/dist/sync/v3/localSyncIdentityStore.js +43 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.js +70 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +45 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +291 -0
- package/dist/sync/v3/localTaskChecklistOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskChecklistOutboxHandler.js +54 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +47 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.js +221 -0
- package/dist/sync/v3/localTaskCommentOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskCommentOutboxHandler.js +94 -0
- package/dist/sync/v3/localTaskCommentOutboxService.d.ts +75 -0
- package/dist/sync/v3/localTaskCommentOutboxService.js +391 -0
- package/dist/sync/v3/localTaskCreateClient.d.ts +27 -0
- package/dist/sync/v3/localTaskCreateClient.js +209 -0
- package/dist/sync/v3/localTaskCreateOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskCreateOutboxHandler.js +147 -0
- package/dist/sync/v3/localTaskCreateOutboxService.d.ts +77 -0
- package/dist/sync/v3/localTaskCreateOutboxService.js +397 -0
- package/dist/sync/v3/localTaskDeleteClient.d.ts +10 -0
- package/dist/sync/v3/localTaskDeleteClient.js +23 -0
- package/dist/sync/v3/localTaskDeleteOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskDeleteOutboxHandler.js +54 -0
- package/dist/sync/v3/localTaskDeleteOutboxService.d.ts +38 -0
- package/dist/sync/v3/localTaskDeleteOutboxService.js +235 -0
- package/dist/sync/v3/localTaskLegacyRootAdoption.d.ts +28 -0
- package/dist/sync/v3/localTaskLegacyRootAdoption.js +219 -0
- package/dist/sync/v3/localTaskLifecycleClient.d.ts +49 -0
- package/dist/sync/v3/localTaskLifecycleClient.js +57 -0
- package/dist/sync/v3/localTaskLifecycleOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskLifecycleOutboxHandler.js +94 -0
- package/dist/sync/v3/localTaskLifecycleOutboxService.d.ts +60 -0
- package/dist/sync/v3/localTaskLifecycleOutboxService.js +304 -0
- package/dist/sync/v3/localTaskMetadataClient.d.ts +13 -0
- package/dist/sync/v3/localTaskMetadataClient.js +30 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.js +70 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +48 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.js +229 -0
- package/dist/sync/v3/localTaskOperationClient.d.ts +72 -0
- package/dist/sync/v3/localTaskOperationClient.js +195 -0
- package/dist/sync/v3/localTaskRelationshipOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskRelationshipOutboxHandler.js +114 -0
- package/dist/sync/v3/localTaskRelationshipOutboxService.d.ts +45 -0
- package/dist/sync/v3/localTaskRelationshipOutboxService.js +192 -0
- package/dist/sync/v3/localTaskRestoreClient.d.ts +13 -0
- package/dist/sync/v3/localTaskRestoreClient.js +32 -0
- package/dist/sync/v3/localTaskRestoreOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskRestoreOutboxHandler.js +41 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.d.ts +56 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.js +323 -0
- package/dist/sync/v3/localTaskStatusClient.d.ts +17 -0
- package/dist/sync/v3/localTaskStatusClient.js +35 -0
- package/dist/sync/v3/localTaskStatusOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskStatusOutboxHandler.js +75 -0
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +53 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +422 -0
- package/dist/sync/v3/localTaxonomyCompositeOutboxService.d.ts +34 -0
- package/dist/sync/v3/localTaxonomyCompositeOutboxService.js +290 -0
- package/dist/sync/v3/localTaxonomyOutboxHandler.d.ts +9 -0
- package/dist/sync/v3/localTaxonomyOutboxHandler.js +106 -0
- package/dist/sync/v3/localTaxonomyOutboxService.d.ts +30 -0
- package/dist/sync/v3/localTaxonomyOutboxService.js +181 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.js +113 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxService.d.ts +37 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxService.js +330 -0
- package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.d.ts +63 -0
- package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.js +264 -0
- package/dist/sync/v3/localWorkstreamOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localWorkstreamOutboxHandler.js +102 -0
- package/dist/sync/v3/localWorkstreamOutboxService.d.ts +52 -0
- package/dist/sync/v3/localWorkstreamOutboxService.js +579 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.js +57 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.d.ts +30 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.js +128 -0
- package/dist/sync/v3/planningActivation.d.ts +13 -0
- package/dist/sync/v3/planningActivation.js +33 -0
- package/dist/sync/v3/planningAttachmentActivityValidation.d.ts +9 -0
- package/dist/sync/v3/planningAttachmentActivityValidation.js +87 -0
- package/dist/sync/v3/programScaffoldService.d.ts +143 -0
- package/dist/sync/v3/programScaffoldService.js +478 -0
- package/dist/sync/v3/syncDurabilityStore.d.ts +773 -0
- package/dist/sync/v3/syncDurabilityStore.js +4635 -0
- package/dist/sync/v3/taskActivityAuthoritativeRevision.d.ts +16 -0
- package/dist/sync/v3/taskActivityAuthoritativeRevision.js +67 -0
- package/dist/sync/v3/taskActivityJournal.d.ts +20 -0
- package/dist/sync/v3/taskActivityJournal.js +195 -0
- package/dist/sync/v3/taskAttachmentLinksActivityIdentity.d.ts +6 -0
- package/dist/sync/v3/taskAttachmentLinksActivityIdentity.js +14 -0
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +111 -0
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +202 -0
- package/dist/sync/v3/taskChecklistActivityIdentity.d.ts +6 -0
- package/dist/sync/v3/taskChecklistActivityIdentity.js +14 -0
- package/dist/sync/v3/taskChecklistMutationService.d.ts +92 -0
- package/dist/sync/v3/taskChecklistMutationService.js +156 -0
- package/dist/sync/v3/taskCommentActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskCommentActivityIdentity.js +15 -0
- package/dist/sync/v3/taskCommentMutationService.d.ts +150 -0
- package/dist/sync/v3/taskCommentMutationService.js +392 -0
- package/dist/sync/v3/taskCommentReconcileProvenance.d.ts +58 -0
- package/dist/sync/v3/taskCommentReconcileProvenance.js +170 -0
- package/dist/sync/v3/taskCreateActivation.d.ts +19 -0
- package/dist/sync/v3/taskCreateActivation.js +84 -0
- package/dist/sync/v3/taskCreateActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskCreateActivityIdentity.js +18 -0
- package/dist/sync/v3/taskCreateMutationService.d.ts +103 -0
- package/dist/sync/v3/taskCreateMutationService.js +283 -0
- package/dist/sync/v3/taskDeleteActivation.d.ts +7 -0
- package/dist/sync/v3/taskDeleteActivation.js +14 -0
- package/dist/sync/v3/taskDeleteMutationService.d.ts +35 -0
- package/dist/sync/v3/taskDeleteMutationService.js +133 -0
- package/dist/sync/v3/taskLegacyRootAdoptionService.d.ts +78 -0
- package/dist/sync/v3/taskLegacyRootAdoptionService.js +175 -0
- package/dist/sync/v3/taskLifecycleActivityIdentity.d.ts +9 -0
- package/dist/sync/v3/taskLifecycleActivityIdentity.js +18 -0
- package/dist/sync/v3/taskLifecycleMutationPayload.d.ts +5 -0
- package/dist/sync/v3/taskLifecycleMutationPayload.js +28 -0
- package/dist/sync/v3/taskLifecycleMutationService.d.ts +66 -0
- package/dist/sync/v3/taskLifecycleMutationService.js +92 -0
- package/dist/sync/v3/taskMetadataActivation.d.ts +12 -0
- package/dist/sync/v3/taskMetadataActivation.js +38 -0
- package/dist/sync/v3/taskMetadataActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskMetadataActivityIdentity.js +18 -0
- package/dist/sync/v3/taskMetadataCoexistence.d.ts +37 -0
- package/dist/sync/v3/taskMetadataCoexistence.js +134 -0
- package/dist/sync/v3/taskMetadataMutationService.d.ts +71 -0
- package/dist/sync/v3/taskMetadataMutationService.js +199 -0
- package/dist/sync/v3/taskRelationshipLegacyAdoptionService.d.ts +48 -0
- package/dist/sync/v3/taskRelationshipLegacyAdoptionService.js +164 -0
- package/dist/sync/v3/taskRelationshipMutationService.d.ts +50 -0
- package/dist/sync/v3/taskRelationshipMutationService.js +148 -0
- package/dist/sync/v3/taskRestoreMutationService.d.ts +90 -0
- package/dist/sync/v3/taskRestoreMutationService.js +179 -0
- package/dist/sync/v3/taskStatusActivation.d.ts +7 -0
- package/dist/sync/v3/taskStatusActivation.js +15 -0
- package/dist/sync/v3/taskStatusMutationService.d.ts +76 -0
- package/dist/sync/v3/taskStatusMutationService.js +308 -0
- package/dist/sync/v3/taskWorkflowMutationPayload.d.ts +4 -0
- package/dist/sync/v3/taskWorkflowMutationPayload.js +22 -0
- package/dist/sync/v3/taskWorkflowMutationService.d.ts +64 -0
- package/dist/sync/v3/taskWorkflowMutationService.js +102 -0
- package/dist/sync/v3/taxonomyCoexistence.d.ts +10 -0
- package/dist/sync/v3/taxonomyCoexistence.js +19 -0
- package/dist/sync/v3/taxonomyCompositeMutationService.d.ts +110 -0
- package/dist/sync/v3/taxonomyCompositeMutationService.js +304 -0
- package/dist/sync/v3/taxonomyMutationService.d.ts +57 -0
- package/dist/sync/v3/taxonomyMutationService.js +106 -0
- package/dist/sync/v3/taxonomyStateMutation.d.ts +22 -0
- package/dist/sync/v3/taxonomyStateMutation.js +49 -0
- package/dist/sync/v3/taxonomySyncPayload.d.ts +9 -0
- package/dist/sync/v3/taxonomySyncPayload.js +199 -0
- package/dist/sync/v3/workflowAssignmentSync.d.ts +22 -0
- package/dist/sync/v3/workflowAssignmentSync.js +213 -0
- package/dist/sync/v3/workflowRuntimeMutationService.d.ts +89 -0
- package/dist/sync/v3/workflowRuntimeMutationService.js +359 -0
- package/dist/sync/v3/workflowRuntimeOperationIdentity.d.ts +13 -0
- package/dist/sync/v3/workflowRuntimeOperationIdentity.js +35 -0
- package/dist/sync/v3/workflowRuntimeSync.d.ts +141 -0
- package/dist/sync/v3/workflowRuntimeSync.js +485 -0
- package/dist/sync/v3/workspaceSyncJournalReader.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncJournalReader.js +45 -0
- package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.d.ts +28 -0
- package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.js +81 -0
- package/dist/sync/v3/workspaceSyncPayloadFingerprint.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncPayloadFingerprint.js +5 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +161 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +83 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +161 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +90 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.d.ts +65 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +356 -0
- package/dist/sync/v3/workspaceSyncV3CombinedCoverage.d.ts +51 -0
- package/dist/sync/v3/workspaceSyncV3CombinedCoverage.js +171 -0
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +535 -0
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.d.ts +50 -0
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +1149 -0
- package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.d.ts +96 -0
- package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.js +672 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +42 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +598 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +65 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +505 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +78 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +511 -0
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +45 -0
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +125 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.d.ts +13 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +34 -0
- package/dist/sync/v3/workspaceSyncV3CursorEncoding.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CursorEncoding.js +6 -0
- package/dist/sync/v3/workspaceSyncV3DomainAdmission.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncV3DomainAdmission.js +118 -0
- package/dist/sync/v3/workspaceSyncV3Feed.d.ts +95 -0
- package/dist/sync/v3/workspaceSyncV3Feed.js +243 -0
- package/dist/sync/v3/workspaceSyncV3FeedApply.d.ts +13 -0
- package/dist/sync/v3/workspaceSyncV3FeedApply.js +67 -0
- package/dist/sync/v3/workspaceSyncV3FeedClientContract.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3FeedClientContract.js +46 -0
- package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.js +58 -0
- package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.d.ts +31 -0
- package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.js +228 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +32 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.js +21 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.d.ts +36 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.js +163 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeRepair.d.ts +33 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeRepair.js +118 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +45 -0
- package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.d.ts +27 -0
- package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.js +83 -0
- package/dist/sync/v3/workspaceSyncV3NestedCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3NestedCoverage.js +40 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +83 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +325 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +59 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +302 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +47 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +329 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +19 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +41 -0
- package/dist/sync/v3/workspaceSyncV3NestedWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3NestedWireContract.js +16 -0
- package/dist/sync/v3/workspaceSyncV3OperationProjection.d.ts +8 -0
- package/dist/sync/v3/workspaceSyncV3OperationProjection.js +52 -0
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +229 -0
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.js +1 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +165 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +414 -0
- package/dist/sync/v3/workspaceSyncV3OriginActor.d.ts +36 -0
- package/dist/sync/v3/workspaceSyncV3OriginActor.js +61 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertion.d.ts +46 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertion.js +121 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.js +1 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.js +34 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.js +10 -0
- package/dist/sync/v3/workspaceSyncV3ProjectionState.d.ts +105 -0
- package/dist/sync/v3/workspaceSyncV3ProjectionState.js +467 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.d.ts +56 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +250 -0
- package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.d.ts +30 -0
- package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.js +142 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.d.ts +40 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.js +246 -0
- package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.d.ts +39 -0
- package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.js +185 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.js +36 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.d.ts +17 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.js +143 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.js +195 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.js +12 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.d.ts +4 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.js +98 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.js +72 -0
- package/dist/sync/v3/workstreamActivityAuthoritativeRevision.d.ts +11 -0
- package/dist/sync/v3/workstreamActivityAuthoritativeRevision.js +23 -0
- package/dist/sync/v3/workstreamActivityIdentity.d.ts +8 -0
- package/dist/sync/v3/workstreamActivityIdentity.js +14 -0
- package/dist/sync/v3/workstreamCoexistence.d.ts +19 -0
- package/dist/sync/v3/workstreamCoexistence.js +64 -0
- package/dist/sync/v3/workstreamMutationPayload.d.ts +27 -0
- package/dist/sync/v3/workstreamMutationPayload.js +147 -0
- package/dist/sync/v3/workstreamMutationService.d.ts +72 -0
- package/dist/sync/v3/workstreamMutationService.js +256 -0
- package/dist/sync/v3/workstreamTaskOrderMutationService.d.ts +55 -0
- package/dist/sync/v3/workstreamTaskOrderMutationService.js +110 -0
- package/dist/sync/v3/workstreamTaskOrderSync.d.ts +14 -0
- package/dist/sync/v3/workstreamTaskOrderSync.js +25 -0
- package/dist/sync/workspaceContentManifest.d.ts +86 -0
- package/dist/sync/workspaceContentManifest.js +123 -0
- package/dist/sync/workspacePullFeed.d.ts +186 -2
- package/dist/sync/workspacePullFeed.js +513 -136
- package/dist/sync/workspacePushPreparedPlan.d.ts +21 -0
- package/dist/sync/workspacePushPreparedPlan.js +1 -0
- package/dist/sync/workspaceRepair.d.ts +17 -25
- package/dist/sync/workspaceRepair.js +348 -25
- package/dist/sync/workspaceSyncContentDecryption.d.ts +6 -0
- package/dist/sync/workspaceSyncContentDecryption.js +11 -0
- package/dist/sync/workspaceSyncModel.d.ts +216 -5
- package/dist/sync/workspaceSyncModel.js +371 -35
- package/dist/sync/workspaceSyncSnapshotProjection.d.ts +11 -0
- package/dist/sync/workspaceSyncSnapshotProjection.js +101 -0
- package/dist/sync/workspaceSyncState.d.ts +13 -0
- package/dist/sync/workspaceSyncState.js +36 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +106 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.js +193 -0
- package/dist/types.d.ts +23 -15
- package/dist/types.js +2 -4
- package/dist/ui/ai-profile-clients/amazon-nova.svg +1 -0
- package/dist/ui/ai-profile-clients/antigravity.png +0 -0
- package/dist/ui/ai-profile-clients/chatgpt.svg +10 -0
- package/dist/ui/ai-profile-clients/claude-chat.svg +1 -0
- package/dist/ui/ai-profile-clients/claude-code.svg +15 -0
- package/dist/ui/ai-profile-clients/cline-app-icon-light.png +0 -0
- package/dist/ui/ai-profile-clients/cline.svg +16 -0
- package/dist/ui/ai-profile-clients/codex.svg +1 -0
- package/dist/ui/ai-profile-clients/copilot.png +0 -0
- package/dist/ui/ai-profile-clients/cursor.svg +1 -0
- package/dist/ui/ai-profile-clients/deepseek.svg +1 -0
- package/dist/ui/ai-profile-clients/gemini-cli-icon.png +0 -0
- package/dist/ui/ai-profile-clients/gemini.svg +10 -0
- package/dist/ui/ai-profile-clients/grok.svg +31 -0
- package/dist/ui/ai-profile-clients/kiro.svg +11 -0
- package/dist/ui/ai-profile-clients/llama.svg +1 -0
- package/dist/ui/ai-profile-clients/mistral.svg +1 -0
- package/dist/ui/ai-profile-clients/ms_copilot.jpeg +0 -0
- package/dist/ui/ai-profile-clients/openclaw.png +0 -0
- package/dist/ui/ai-profile-clients/perplexity.svg +1 -0
- package/dist/ui/ai-profile-clients/vscode.svg +41 -0
- package/dist/ui/ai-profile-clients/windsurf.svg +11 -0
- package/dist/ui/assets/AiIdentityRosterCard-DB1BLO_j.js +1 -0
- package/dist/ui/assets/AiProfilesModule-DPxQeF9N.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DHNYaNg6.js +3 -0
- package/dist/ui/assets/AssetTraySortControl-B9k5caQW.css +1 -0
- package/dist/ui/assets/AssetTraySortControl-DphbyHVc.js +1 -0
- package/dist/ui/assets/ContextAttachmentManager-CMxSzHqc.js +3 -0
- package/dist/ui/assets/DocumentWorkspace-BC7sy5TG.js +261 -0
- package/dist/ui/assets/DocumentWorkspace-BIBGBfd7.css +1 -0
- package/dist/ui/assets/EntityActivityTimeline-BfJbZRdl.css +1 -0
- package/dist/ui/assets/EntityActivityTimeline-pJ2ZjZ-k.js +1 -0
- package/dist/ui/assets/PlanningModule-CeTqXMMz.css +1 -0
- package/dist/ui/assets/PlanningModule-t5GbvVR9.js +1 -0
- package/dist/ui/assets/PlansPage-BVH_NfgT.js +1 -0
- package/dist/ui/assets/PlansPage-C2nkK2Bp.css +1 -0
- package/dist/ui/assets/TaskContextUpload-Ds4LnDzV.css +1 -0
- package/dist/ui/assets/TaskContextUpload-bl4fOOUz.js +1 -0
- package/dist/ui/assets/TaskSettings-xVsxSa0g.js +12 -0
- package/dist/ui/assets/TaskforceAgentsModule-CkAxW19K.js +21 -0
- package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +1 -0
- package/dist/ui/assets/WorkflowManagerModule-BKqIGVnF.js +1 -0
- package/dist/ui/assets/WorkflowManagerModule-DF10XENz.css +1 -0
- package/dist/ui/assets/antigravity-DRKQga2U.png +0 -0
- package/dist/ui/assets/cursor-BM_3k4Y4.svg +1 -0
- package/dist/ui/assets/gemini-cli-icon-dBAVjCcn.png +0 -0
- package/dist/ui/assets/grok-BuodbWaG.svg +31 -0
- package/dist/ui/assets/index-BzJlVnNS.css +1 -0
- package/dist/ui/assets/index-Cx7vZJHL.js +7 -0
- package/dist/ui/assets/{vendor-dnd-DRzYolkg.js → vendor-dnd-CJ-AjP-Y.js} +1 -1
- package/dist/ui/assets/{vendor-icons-CLnehDTw.js → vendor-icons-B8ZNsH1g.js} +1 -1
- package/dist/ui/assets/{vendor-markdown-BUxTU7dS.js → vendor-markdown-_lhNCyq-.js} +9 -9
- package/dist/ui/assets/vendor-router-AqJMU8Lz.js +3 -0
- package/dist/ui/assets/vscode-C_7wk1WI.svg +41 -0
- package/dist/ui/branding/logos/logo_dark_bg.png +0 -0
- package/dist/ui/branding/logos/logo_favicon_dark.png +0 -0
- package/dist/ui/branding/logos/logo_favicon_dark.svg +56 -0
- package/dist/ui/branding/logos/logo_favicon_light.png +0 -0
- package/dist/ui/branding/logos/logo_light_bg.png +0 -0
- package/dist/ui/images/Taskforce_Van.webp +0 -0
- package/dist/ui/index.html +6 -6
- package/dist/update/uiUpdateService.d.ts +43 -0
- package/dist/update/uiUpdateService.js +149 -0
- package/dist/update/updateCli.d.ts +15 -0
- package/dist/update/updateCli.js +76 -0
- package/dist/update/updateExecutor.d.ts +40 -0
- package/dist/update/updateExecutor.js +474 -0
- package/dist/update/updateStatus.d.ts +83 -0
- package/dist/update/updateStatus.js +703 -0
- package/dist/utils/aiProfileAvatarPaths.d.ts +14 -0
- package/dist/utils/aiProfileAvatarPaths.js +52 -0
- package/dist/utils/aiProfileDefaultLogo.d.ts +7 -0
- package/dist/utils/aiProfileDefaultLogo.js +84 -0
- package/dist/utils/aiProfileEvents.d.ts +9 -1
- package/dist/utils/annotatedAttachments.d.ts +8 -0
- package/dist/utils/annotatedAttachments.js +17 -1
- package/dist/utils/assetTraySorting.d.ts +25 -0
- package/dist/utils/assetTraySorting.js +83 -0
- package/dist/utils/assignees.d.ts +5 -0
- package/dist/utils/assignees.js +14 -9
- package/dist/utils/authLogin.d.ts +10 -0
- package/dist/utils/authLogin.js +8 -0
- package/dist/utils/authSessionEvents.d.ts +2 -0
- package/dist/utils/authSessionEvents.js +6 -0
- package/dist/utils/avatarUpload.js +5 -5
- package/dist/utils/canonicalReferenceAttachments.d.ts +12 -0
- package/dist/utils/canonicalReferenceAttachments.js +42 -0
- package/dist/utils/cloudAssetDisplay.d.ts +2 -0
- package/dist/utils/cloudAssetDisplay.js +8 -0
- package/dist/utils/constants.d.ts +4 -11
- package/dist/utils/constants.js +5 -64
- package/dist/utils/contextAttachmentPreview.d.ts +11 -0
- package/dist/utils/contextAttachmentPreview.js +8 -0
- package/dist/utils/contextAttachmentUpload.d.ts +8 -0
- package/dist/utils/contextAttachmentUpload.js +144 -0
- package/dist/utils/documentNames.js +6 -4
- package/dist/utils/entityReferences.d.ts +14 -0
- package/dist/utils/entityReferences.js +21 -0
- package/dist/utils/httpSetCookie.d.ts +3 -0
- package/dist/utils/httpSetCookie.js +22 -0
- package/dist/utils/imageNoteStoragePaths.d.ts +3 -0
- package/dist/utils/imageNoteStoragePaths.js +19 -0
- package/dist/utils/imageReferences.d.ts +6 -0
- package/dist/utils/imageReferences.js +1 -0
- package/dist/utils/planningArchiveOrchestrator.d.ts +23 -0
- package/dist/utils/planningArchiveOrchestrator.js +37 -0
- package/dist/utils/planningArchivePresentation.d.ts +20 -0
- package/dist/utils/planningArchivePresentation.js +23 -0
- package/dist/utils/planningArchiveReadiness.d.ts +26 -0
- package/dist/utils/planningArchiveReadiness.js +30 -0
- package/dist/utils/planningFavorites.d.ts +7 -0
- package/dist/utils/planningFavorites.js +34 -0
- package/dist/utils/syncEventPresentation.js +53 -0
- package/dist/utils/syncStatusPresentation.d.ts +25 -0
- package/dist/utils/syncStatusPresentation.js +86 -5
- package/dist/utils/taskActivity.d.ts +9 -2
- package/dist/utils/taskActivity.js +61 -0
- package/dist/utils/taskDraftDefaults.d.ts +0 -8
- package/dist/utils/taskDraftDefaults.js +0 -4
- package/dist/utils/taskEvents.d.ts +11 -0
- package/dist/utils/taskEvents.js +6 -0
- package/dist/utils/taskHeaderQuickFilter.d.ts +14 -0
- package/dist/utils/taskHeaderQuickFilter.js +32 -0
- package/dist/utils/taskInvalidation.d.ts +23 -0
- package/dist/utils/taskInvalidation.js +67 -0
- package/dist/utils/taskNormalization.d.ts +2 -1
- package/dist/utils/taskNormalization.js +44 -18
- package/dist/utils/taskReferences.d.ts +16 -0
- package/dist/utils/taskReferences.js +63 -0
- package/dist/utils/taskforceAgentEvents.d.ts +8 -0
- package/dist/utils/taskforceAgentEvents.js +6 -0
- package/dist/utils/taskforceAgentSkillEvents.d.ts +7 -0
- package/dist/utils/taskforceAgentSkillEvents.js +8 -0
- package/dist/utils/theme.js +1 -1
- package/dist/utils/uiNotice.d.ts +3 -0
- package/dist/utils/uiNotice.js +1 -1
- package/dist/utils/workspaceResourceEvents.d.ts +7 -0
- package/dist/utils/workspaceResourceEvents.js +6 -0
- package/dist/utils/workspaceSyncPresentation.d.ts +24 -0
- package/dist/utils/workspaceSyncPresentation.js +243 -6
- package/package.json +69 -21
- package/dist/components/features/AgentsModule.d.ts +0 -18
- package/dist/components/features/AgentsModule.js +0 -479
- package/dist/components/features/InitiativesModule.d.ts +0 -22
- package/dist/components/features/InitiativesModule.js +0 -33
- package/dist/components/features/WorkflowsModule.d.ts +0 -27
- package/dist/components/features/WorkflowsModule.js +0 -21
- package/dist/components/features/settings/WorkflowEditor.d.ts +0 -15
- package/dist/components/features/settings/WorkflowEditor.js +0 -245
- package/dist/components/views/panels/DocumentFilterToolbar.d.ts +0 -10
- package/dist/components/views/panels/DocumentFilterToolbar.js +0 -7
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +0 -61
- package/dist/components/views/standalone/modals/AccountHubModal.js +0 -108
- package/dist/components/views/standalone/modals/EditProfileModal.d.ts +0 -19
- package/dist/components/views/standalone/modals/EditProfileModal.js +0 -11
- package/dist/hooks/ui/useResourceExport.d.ts +0 -21
- package/dist/hooks/ui/useResourceExport.js +0 -87
- package/dist/hooks/ui/useWorkflowTemplates.d.ts +0 -37
- package/dist/hooks/ui/useWorkflowTemplates.js +0 -116
- package/dist/mcp/clientProfileDefaults.d.ts +0 -12
- package/dist/mcp/clientProfileDefaults.js +0 -37
- package/dist/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
- package/dist/resources/templates/environments/aider.yaml +0 -14
- package/dist/resources/templates/environments/antigravity.yaml +0 -10
- package/dist/resources/templates/environments/claude.yaml +0 -10
- package/dist/resources/templates/environments/cline.yaml +0 -10
- package/dist/resources/templates/environments/codex.yaml +0 -13
- package/dist/resources/templates/environments/copilot.yaml +0 -10
- package/dist/resources/templates/environments/cursor.yaml +0 -9
- package/dist/resources/templates/environments/gemini.yaml +0 -9
- package/dist/resources/templates/environments/windsurf.yaml +0 -10
- package/dist/resources/templates/workflow-sources/README.md +0 -9
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
- package/dist/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
- package/dist/resources/templates/workflows/collaborate.yaml +0 -110
- package/dist/resources/templates/workflows/do.yaml +0 -88
- package/dist/resources/templates/workflows/evaluate.yaml +0 -117
- package/dist/resources/templates/workflows/execute.yaml +0 -159
- package/dist/resources/templates/workflows/plan.yaml +0 -119
- package/dist/resources/templates/workflows/review.yaml +0 -115
- package/dist/services/formatTransformers.d.ts +0 -29
- package/dist/services/formatTransformers.js +0 -56
- package/dist/services/templateEngine.d.ts +0 -46
- package/dist/services/templateEngine.js +0 -148
- package/dist/shared/workflowDefaults.d.ts +0 -9
- package/dist/shared/workflowDefaults.js +0 -11
- package/dist/ui/agent-logos/Gemini CLI.jpeg +0 -0
- package/dist/ui/agent-logos/antigravity.jpeg +0 -0
- package/dist/ui/agent-logos/chatgpt.png +0 -0
- package/dist/ui/agent-logos/claude-code.jpeg +0 -0
- package/dist/ui/agent-logos/codex.jpeg +0 -0
- package/dist/ui/agent-logos/cursor.png +0 -0
- package/dist/ui/agent-logos/openclaw.jpeg +0 -0
- package/dist/ui/agent-logos/windsurf.png +0 -0
- package/dist/ui/assets/AgentsModule-DvkbUHi0.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BVKew-mH.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-jhOhxqHT.js +0 -3
- package/dist/ui/assets/ContextAttachmentManager-BAmEyLHL.js +0 -3
- package/dist/ui/assets/DocumentWorkspace-D4rJKXzd.css +0 -1
- package/dist/ui/assets/DocumentWorkspace-X-CpD5OO.js +0 -252
- package/dist/ui/assets/EntityActivityTimeline-DD33onAC.js +0 -1
- package/dist/ui/assets/EntityActivityTimeline-DyqvvhuF.css +0 -1
- package/dist/ui/assets/InitiativesModule-5nDXtIjf.js +0 -1
- package/dist/ui/assets/PlansPage-B8nDR1hQ.js +0 -1
- package/dist/ui/assets/PlansPage-DeAzWYTb.css +0 -1
- package/dist/ui/assets/TaskContextUpload-DrGrXJHm.js +0 -1
- package/dist/ui/assets/TaskSettings-BXVvZZwH.js +0 -9
- package/dist/ui/assets/WorkflowsModule-DWCGhEWT.js +0 -5
- package/dist/ui/assets/documentReferences-Crup321p.js +0 -1
- package/dist/ui/assets/index-B9k24Aym.js +0 -5
- package/dist/ui/assets/index-DNeR5dYW.css +0 -1
- package/dist/ui/assets/vendor-router-BbWMxlnO.js +0 -3
- package/dist/ui/branding/logos/logo_black_01.png +0 -0
- package/dist/ui/branding/logos/logo_black_02.png +0 -0
- package/dist/ui/branding/logos/logo_white_01.png +0 -0
- package/dist/ui/branding/logos/logo_white_02.png +0 -0
- package/scripts/generate-workflow-templates.mjs +0 -134
- package/src/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
- package/src/resources/templates/environments/aider.yaml +0 -14
- package/src/resources/templates/environments/antigravity.yaml +0 -10
- package/src/resources/templates/environments/claude.yaml +0 -10
- package/src/resources/templates/environments/cline.yaml +0 -10
- package/src/resources/templates/environments/codex.yaml +0 -13
- package/src/resources/templates/environments/copilot.yaml +0 -10
- package/src/resources/templates/environments/cursor.yaml +0 -9
- package/src/resources/templates/environments/gemini.yaml +0 -9
- package/src/resources/templates/environments/windsurf.yaml +0 -10
- package/src/resources/templates/workflow-sources/README.md +0 -9
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
- package/src/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
- package/src/resources/templates/workflows/collaborate.yaml +0 -110
- package/src/resources/templates/workflows/do.yaml +0 -88
- package/src/resources/templates/workflows/evaluate.yaml +0 -117
- package/src/resources/templates/workflows/execute.yaml +0 -159
- package/src/resources/templates/workflows/plan.yaml +0 -119
- package/src/resources/templates/workflows/review.yaml +0 -115
- /package/dist/ui/branding/logos/{logo_dark.svg → logo_dark_no_bg.svg} +0 -0
- /package/dist/ui/branding/logos/{logo_favicon.svg → logo_favicon_light.svg} +0 -0
- /package/dist/ui/branding/logos/{logo_light.svg → logo_light_no_bg.svg} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,R as Ke}from"./vendor-react-CKJs5o3c.js";import{p as gn,t as s,T as Ls,P as Ve,A as Ps,I as de,r as X,D as xn,a as ra,b as yn,l as ja,c as bn,d as ca}from"./index-B9k24Aym.js";import{T as qe,P as as,X as Is,g as ka,f as Ca,I as ht,a6 as _s,n as vn,h as _e,q as Na,a7 as da,m as ce,d as fn,a8 as pa,a9 as ua,aa as yt,L as Ta,ab as jn,b as ae,j as Te,ac as kn,ad as Cn,p as Nn,ae as bt,a as gt,af as Tn,Z as ws,B as ma,c as Ss,o as wn,a0 as ha,ag as Sn,ah as $n,ai as wa,aj as In,ak as _n,al as Ln,am as Pn}from"./vendor-icons-CLnehDTw.js";import"./vendor-markdown-BUxTU7dS.js";import"./vendor-dnd-DRzYolkg.js";import"./vendor-router-BbWMxlnO.js";const An={aiProfileToken:"X-Taskforce-AI-Profile-Token",aiProfileName:"X-Taskforce-AI-Name",aiProfileIcon:"X-Taskforce-AI-Icon",aiProfileColor:"X-Taskforce-AI-Color",aiProfileDescription:"X-Taskforce-AI-Description",aiProfileRole:"X-Taskforce-AI-Role",aiProfileProvider:"X-Taskforce-AI-Provider",aiProfileModel:"X-Taskforce-AI-Model",aiProfileSurfaceType:"X-Taskforce-AI-Surface-Type"};function Ne(a){return String(a||"").trim()||null}function Bn(a){return a==null?null:gn(a)}function Mn(a){return{aiProfileToken:Ne(a.aiProfileToken),aiProfileName:Ne(a.aiProfileName),aiProfileIcon:Ne(a.aiProfileIcon),aiProfileColor:Ne(a.aiProfileColor),aiProfileDescription:Ne(a.aiProfileDescription),aiProfileRole:Ne(a.aiProfileRole),aiProfileProvider:Ne(a.aiProfileProvider),aiProfileModel:Ne(a.aiProfileModel),aiProfileSurfaceType:Bn(a.aiProfileSurfaceType)}}function Dn(a){const o=Mn(a),h={};for(const[g,b]of Object.entries(An)){const N=o[g];N&&(h[b]=N)}return h}const ga={general:{name:"Taskforce MCP Agent",icon:"Bot",role:"AI collaborator",provider:"MCP client",model:"Local MCP",surfaceType:"agent"},cursor:{name:"Cursor",icon:"Bot",role:"IDE coding assistant",provider:"Cursor",model:"Cursor",surfaceType:"ide"},cline:{name:"Cline",icon:"Bot",role:"IDE coding assistant",provider:"Cline",model:"Cline",surfaceType:"ide"},vscode:{name:"VS Code Copilot",icon:"Bot",role:"IDE coding assistant",provider:"Microsoft",model:"Copilot",surfaceType:"ide"},windsurf:{name:"Windsurf",icon:"Bot",role:"IDE coding assistant",provider:"Windsurf",model:"Windsurf",surfaceType:"ide"},antigravity:{name:"Antigravity",icon:"Bot",role:"Coding agent",provider:"Google",model:"Antigravity",surfaceType:"coding_tool"},openclaw:{name:"OpenClaw",icon:"Bot",role:"AI agent",provider:"OpenClaw",model:"OpenClaw",surfaceType:"agent"},codex:{name:"Codex",icon:"Bot",role:"Coding agent",provider:"OpenAI",model:"Codex",surfaceType:"cli"},"claude-code":{name:"Claude Code",icon:"Bot",role:"Coding agent",provider:"Anthropic",model:"Claude Code",surfaceType:"cli"},"gemini-cli":{name:"Gemini CLI",icon:"Bot",role:"Coding agent",provider:"Google",model:"Gemini CLI",surfaceType:"cli"},"claude-desktop":{name:"Claude Desktop",icon:"Bot",role:"Desktop AI collaborator",provider:"Anthropic",model:"Claude Desktop",surfaceType:"chat_app"},"chatgpt-desktop":{name:"ChatGPT Desktop",icon:"Bot",role:"Desktop AI collaborator",provider:"OpenAI",model:"ChatGPT Desktop",surfaceType:"chat_app"}};function En(a){const o=ga[a]||ga.general;return{TASKFORCE_AI_NAME:o.name,TASKFORCE_AI_ICON:o.icon,TASKFORCE_AI_ROLE:o.role,TASKFORCE_AI_PROVIDER:o.provider,TASKFORCE_AI_MODEL:o.model,TASKFORCE_AI_SURFACE_TYPE:o.surfaceType}}const xt=[{id:"general",label:"General"},{id:"antigravity",label:"Antigravity"},{id:"claude-code",label:"Claude Code CLI"},{id:"cline",label:"Cline"},{id:"codex",label:"Codex"},{id:"cursor",label:"Cursor"},{id:"gemini-cli",label:"Gemini CLI"},{id:"openclaw",label:"OpenClaw"},{id:"vscode",label:"VS Code / Copilot"},{id:"windsurf",label:"Windsurf"}];function vt(a,o){return String(a||"").toLowerCase().replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/-+/g,"-").replace(/^[-_]+|[-_]+$/g,"")||o.toLowerCase()}function Rn(a,o){const g=vt(a||o||"workspace","workspace").slice(0,25)||"workspace";return vt(`taskforce-${g}`,"taskforce-workspace")}function zn(a,o){return o}function Gn(a){return{Authorization:`Bearer ${a.tokenValue}`,...Dn(a)}}function On(a){return`${a} Keep the generated AI bootstrap headers intact so Taskforce can bind and restore the same AI profile automatically.`}function xe(a,o){return On(`${a} Use the generated config exactly as shown.`)}function ye(a){return`${a} Use the generated config exactly as shown. No token is required for local stdio MCP.`}function ft(a){return JSON.stringify(a)}function Fn(a){return`[${a.map(o=>ft(o)).join(", ")}]`}function Hn(a){return!a||Object.keys(a).length===0?[]:[`env = { ${Object.entries(a).map(([o,h])=>`${o} = ${ft(h)}`).join(", ")} }`]}function xa(a){return/^[A-Za-z0-9_./:@%+=,-]+$/.test(a)?a:`'${a.replace(/'/g,`'"'"'`)}'`}function Wn(a){const{clientId:o,endpoint:h,tokenValue:g,serverId:b}=a,N=Gn(a);N.Authorization;const w=Object.entries(N).filter(([$])=>$!=="Authorization").map(([$,A])=>` --header "${$}: ${A}"`).join("");switch(o){case"general":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:h,headers:N},instructionLabel:"General MCP Configuration Instructions",instructionText:xe("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:h,headers:N},instructionLabel:"Cursor Configuration Instructions",instructionText:xe("Open Cursor settings, find MCP servers, and paste this config.")};case"cline":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{url:h,type:"streamableHttp",headers:N},instructionLabel:"Cline Configuration Instructions",instructionText:xe("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:h,headers:N},instructionLabel:"VS Code Configuration Instructions",instructionText:xe("Open .vscode/mcp.json or MCP: Open User Configuration and add this server under the servers object.")};case"windsurf":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{serverUrl:h,headers:N},instructionLabel:"Windsurf Configuration Instructions",instructionText:xe("Open Windsurf MCP settings, add a server, and paste this config.")};case"antigravity":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:{serverUrl:h,headers:N},instructionLabel:"Antigravity Configuration Instructions",instructionText:xe("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:h,headers:N},instructionLabel:"OpenClaw Configuration Instructions",instructionText:xe("Open ~/.openclaw/openclaw.json and add this server under mcp.servers.")};case"codex":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${b}]`,`url = "${h}"`,`http_headers = { ${Object.entries(N).map(([$,A])=>`${$} = "${A}"`).join(", ")} }`].join(`
|
|
2
|
-
`),instructionLabel:"Codex Configuration Instructions",instructionText:xe("Open ~/.codex/config.toml and add this Codex MCP entry.")};case"claude-code":return{clientId:o,kind:"text",renderedText:`claude mcp add --transport http ${b} ${h} --header "Authorization: Bearer ${g}"${w}`,instructionLabel:"Claude Code Configuration Instructions",instructionText:xe("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 ${b} ${h} --transport http --header "Authorization: Bearer ${g}"${w}`,instructionLabel:"Gemini CLI Configuration Instructions",instructionText:xe("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-desktop":return{clientId:o,kind:"text",renderedText:zn(o,h),instructionLabel:"Claude Desktop Configuration Instructions",instructionText:"Open Claude Desktop Settings > Connectors, paste this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace."};case"chatgpt-desktop":return{clientId:o,kind:"text",renderedText:h,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 $=o;throw new Error(`Unsupported MCP client: ${$}`)}}}function Un(a){const{clientId:o,serverId:h,serverConfig:g}=a,b={command:g.command,args:g.args,...g.env&&Object.keys(g.env).length>0?{env:g.env}:{}},N=Object.entries(g.env||{}).map(([$,A])=>` --env ${xa(`${$}=${A}`)}`).join(""),w=[g.command,...g.args].map($=>xa($)).join(" ");switch(o){case"general":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:b,instructionLabel:"General MCP Configuration Instructions",instructionText:ye("Add this server to your MCP client using its standard local stdio configuration format.")};case"cursor":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:b,instructionLabel:"Cursor Configuration Instructions",instructionText:ye("Open Cursor settings, find MCP servers, and paste this local stdio config.")};case"cline":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:b,instructionLabel:"Cline Configuration Instructions",instructionText:ye("Open Cline MCP Servers and paste this local stdio server config.")};case"vscode":return{clientId:o,kind:"json",rootKey:"servers",serverConfig:{type:"stdio",...b},instructionLabel:"VS Code Configuration Instructions",instructionText:ye("Open .vscode/mcp.json or MCP: Open User Configuration and add this server under the servers object.")};case"windsurf":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:b,instructionLabel:"Windsurf Configuration Instructions",instructionText:ye("Open Windsurf MCP settings and paste this local stdio config.")};case"antigravity":return{clientId:o,kind:"json",rootKey:"mcpServers",serverConfig:b,instructionLabel:"Antigravity Configuration Instructions",instructionText:ye("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",...b},instructionLabel:"OpenClaw Configuration Instructions",instructionText:ye("Open ~/.openclaw/openclaw.json and add this local stdio server under mcp.servers.")};case"codex":return{clientId:o,kind:"text",renderedText:[`[mcp_servers.${h}]`,`command = ${ft(g.command)}`,`args = ${Fn(g.args)}`,...Hn(g.env)].join(`
|
|
3
|
-
`),instructionLabel:"Codex Configuration Instructions",instructionText:ye("Open ~/.codex/config.toml and add this local MCP entry.")};case"claude-code":return{clientId:o,kind:"text",renderedText:`claude mcp add ${h}${N} -- ${w}`,instructionLabel:"Claude Code Configuration Instructions",instructionText:ye("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:b,instructionLabel:"Gemini CLI Configuration Instructions",instructionText:ye("Open ~/.gemini/settings.json and add this local MCP server under mcpServers.")};case"claude-desktop":case"chatgpt-desktop":throw new Error(`Unsupported local MCP client: ${o}`);default:{const $=o;throw new Error(`Unsupported local MCP client: ${$}`)}}}const Kn="_categoryManagerContainer_1ibti_1",Vn="_pathInputGroupStretch_1ibti_9",qn="_emptyStateItalic_1ibti_13",Jn="_emptyStateBox_1ibti_28",Yn="_emptyStateBare_1ibti_44",Xn="_emptyStateIcon_1ibti_49",Zn="_taxonomyGrid_1ibti_55",Qn="_checkboxRow_1ibti_61",ei="_checkboxLabel_1ibti_67",si="_checkboxSmall_1ibti_75",ti="_flexGap8_1ibti_80",ai="_optionOrderButtons_1ibti_85",ni="_addTaxonomyBtnSmall_1ibti_92",R={categoryManagerContainer:Kn,pathInputGroupStretch:Vn,emptyStateItalic:qn,emptyStateBox:Jn,emptyStateBare:Yn,emptyStateIcon:Xn,taxonomyGrid:Zn,checkboxRow:Qn,checkboxLabel:ei,checkboxSmall:si,flexGap8:ti,optionOrderButtons:ai,addTaxonomyBtnSmall:ni},ii="_taxonomyDrillDown_1oekr_1",oi="_drillDownList_1oekr_7",li="_librarySection_1oekr_13",ri="_libraryLauncher_1oekr_18",ci="_libraryLauncherInfo_1oekr_40",di="_libraryLauncherIcon_1oekr_47",pi="_libraryLauncherText_1oekr_60",ui="_libraryLauncherLabel_1oekr_67",mi="_libraryLauncherSubtext_1oekr_73",hi="_libraryLauncherMeta_1oekr_79",gi="_drillDownSection_1oekr_89",xi="_drillDownSectionHeader_1oekr_95",yi="_drillDownSectionTitle_1oekr_102",bi="_drillDownItem_1oekr_111",vi="_drillDownItemAction_1oekr_126",fi="_drillDownItemDimmed_1oekr_145",ji="_drillDownItemInfo_1oekr_153",ki="_drillDownItemText_1oekr_159",Ci="_drillDownItemLabel_1oekr_165",Ni="_drillDownItemSubtext_1oekr_170",Ti="_systemIcon_1oekr_175",wi="_chevron_1oekr_179",Si="_orderButtons_1oekr_184",$i="_createOverlay_1oekr_195",Ii="_createDialog_1oekr_209",_i="_createDialogTitle_1oekr_218",Li="_inputGroup_1oekr_224",Pi="_dialogActions_1oekr_228",Ai="_createSubmit_1oekr_234",Bi="_createCancel_1oekr_238",Mi="_taxonomyDetailView_1oekr_242",Di="_detailHeader_1oekr_249",Ei="_taxonomyBreadcrumbs_1oekr_257",Ri="_breadcrumbPrev_1oekr_263",zi="_breadcrumbIcon_1oekr_284",Gi="_breadcrumbDivider_1oekr_288",Oi="_breadcrumbActive_1oekr_293",Fi="_detailContent_1oekr_301",y={taxonomyDrillDown:ii,drillDownList:oi,librarySection:li,libraryLauncher:ri,libraryLauncherInfo:ci,libraryLauncherIcon:di,libraryLauncherText:pi,libraryLauncherLabel:ui,libraryLauncherSubtext:mi,libraryLauncherMeta:hi,drillDownSection:gi,drillDownSectionHeader:xi,drillDownSectionTitle:yi,drillDownItem:bi,drillDownItemAction:vi,drillDownItemDimmed:fi,drillDownItemInfo:ji,drillDownItemText:ki,drillDownItemLabel:Ci,drillDownItemSubtext:Ni,systemIcon:Ti,chevron:wi,orderButtons:Si,createOverlay:$i,createDialog:Ii,createDialogTitle:_i,inputGroup:Li,dialogActions:Pi,createSubmit:Ai,createCancel:Bi,taxonomyDetailView:Mi,detailHeader:Di,taxonomyBreadcrumbs:Ei,breadcrumbPrev:Ri,breadcrumbIcon:zi,breadcrumbDivider:Gi,breadcrumbActive:Oi,detailContent:Fi};function Hi(a){const o=[{id:"categories",label:a.displayLabels?.category||"Categories",kind:"system",summary:`${a.categories.length} configured`},{id:"types",label:a.displayLabels?.type||"Task Types",kind:"system",summary:`${a.types.length} active`},{id:"priorities",label:a.displayLabels?.priority||"Priority Levels",kind:"system",summary:`${a.priorities.length} levels`},{id:"complexities",label:"Complexity",kind:"attribute",summary:a.manualComplexityEnabled?"Enabled":"Disabled (default)"}],h=a.taxonomies.map(g=>({id:g.id,label:g.label,kind:"custom",summary:`${g.options.length} options${g.status==="retired"?" · Retired":""}`,taxonomy:g}));return[...o,...h]}function Wi({taxonomy:a,onUpdateTaxonomy:o,onRemoveTaxonomy:h,onRestoreTaxonomy:g}){const[b,N]=l.useState(""),[w,$]=l.useState(!1),[A,z]=l.useState(""),[O,j]=l.useState(a.label),[I,P]=l.useState((a.aliases||[]).join(", ")),[U,B]=l.useState(""),[x,S]=l.useState(null),E=n=>{const d=n.split(",").map(L=>L.trim()).filter(Boolean);return d.length>0?Array.from(new Set(d)):void 0};l.useEffect(()=>{j(a.label),P((a.aliases||[]).join(", "));const n=a.options.find(d=>String(d.value)===String(b));S(n||null),B((n?.aliases||[]).join(", "))},[a,b]);const C=n=>{o({...a,...n})},M=()=>{if(!A.trim())return;const n=A.toLowerCase().trim().replace(/\s+/g,"-");if(a.options.some(L=>L.value===n)){alert("Option value already exists");return}const d={value:n,label:A.trim(),color:Ve[a.options.length%Ve.length],status:"active"};C({options:[...a.options,d]}),z(""),$(!1),N(n)},c=(n,d)=>{C({options:a.options.map(L=>String(L.value)===String(n)?{...L,...d}:L)})},W=n=>{c(n,{status:"retired"})},m=n=>{c(n,{status:"active"})},_=(n,d)=>{const L=a.options.findIndex(F=>String(F.value)===String(n));if(L<0)return;const f=L+d;if(f<0||f>=a.options.length)return;const G=[...a.options],[u]=G.splice(L,1);G.splice(f,0,u),C({options:G})};return e.jsxs("div",{className:R.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"})}),!a.isSystem&&(a.status==="retired"?e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:()=>g?.(a.id),children:"Restore Taxonomy"}):h&&e.jsxs("button",{type:"button",className:`${s.destructiveBtn} ${s.deleteBtnSmall}`,onClick:()=>{confirm(`Retire taxonomy "${a.label}"? Existing task data will be preserved as legacy values.`)&&h(a.id)},children:[e.jsx(qe,{size:14,className:s.trashIcon})," Retire Taxonomy"]}))]}),a.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:R.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:n=>j(n.target.value),onBlur:()=>C({label:O}),disabled:a.isSystem,placeholder:"e.g. Sprint, Phase..."})]}),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:a.description||"",onChange:n=>C({description:n.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:I,onChange:n=>P(n.target.value),onBlur:()=>C({aliases:E(I)}),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:a.widgetType,onChange:n=>{const d=n.target.value;C({widgetType:d,multiSelect:d==="level"?!1:a.multiSelect})},children:[e.jsx("option",{value:"select",children:"Dropdown (Select Box)"}),e.jsx("option",{value:"level",children:"Level Selector (Segmented)"})]})]})]}),e.jsxs("div",{className:R.checkboxRow,children:[e.jsxs("label",{className:R.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:a.isRequired,onChange:n=>C({isRequired:n.target.checked}),className:R.checkboxSmall}),"Mark as Required"]}),e.jsxs("label",{className:`${R.checkboxLabel} ${a.widgetType==="level"?s.opacity50:""}`,children:[e.jsx("input",{type:"checkbox",checked:a.multiSelect,onChange:n=>C({multiSelect:n.target.checked}),disabled:a.widgetType==="level",className:R.checkboxSmall}),"Allow Multi-select"]})]}),e.jsxs("div",{className:R.checkboxRow,children:[e.jsxs("label",{className:R.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:a.formEnabled!==!1,onChange:n=>C({formEnabled:n.target.checked}),className:R.checkboxSmall}),"Show in Task Form"]}),e.jsxs("label",{className:R.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:a.filterEnabled!==!1,onChange:n=>C({filterEnabled:n.target.checked}),className:R.checkboxSmall}),"Show in Filters"]}),e.jsxs("label",{className:R.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:a.sortEnabled===!0,onChange:n=>C({sortEnabled:n.target.checked}),className:R.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&&!w||w?"16px":"0"},children:[e.jsx("div",{style:{flex:1},children:e.jsx(Ls,{value:b,options:[{value:"",label:"Select an option to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...a.options.map(n=>({value:n.value,label:n.status==="retired"?`${n.label} (Retired)`:n.label,icon:n.icon,color:n.color}))],onChange:n=>{N(n),$(!1)},disabled:w})}),w?e.jsx("button",{type:"button",onClick:()=>$(!1),title:"Cancel",className:`${s.browseBtn} ${s.cancelBtnRed}`,children:e.jsx(Is,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>$(!0),title:"Add Option",children:e.jsx(as,{size:18})})]}),w&&e.jsx("div",{className:`${s.configItem} ${s.marginBottom16}`,children:e.jsxs("div",{className:R.flexGap8,children:[e.jsx("input",{type:"text",className:s.input,placeholder:"New option label...",value:A,onChange:n=>z(n.target.value),onKeyDown:n=>{n.key==="Enter"&&M()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:M,disabled:!A.trim(),children:"Add Option"})]})}),x&&!w&&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:n=>c(x.value,{label:n.target.value}),placeholder:"Option Label"}),x.status==="retired"?e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:()=>m(x.value),title:"Restore Option",children:"Restore"}):e.jsxs("button",{type:"button",className:`${s.destructiveBtn} ${s.deleteBtnMedium}`,onClick:()=>W(x.value),title:"Retire Option",children:[e.jsx(qe,{size:14,className:s.trashIcon})," Retire"]})]})]}),e.jsxs("div",{className:R.optionOrderButtons,children:[e.jsx("button",{type:"button",className:s.browseBtn,title:"Move option up",onClick:()=>_(x.value,-1),disabled:a.options[0]?.value===x.value,children:e.jsx(ka,{size:16})}),e.jsx("button",{type:"button",className:s.browseBtn,title:"Move option down",onClick:()=>_(x.value,1),disabled:a.options[a.options.length-1]?.value===x.value,children:e.jsx(Ca,{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:U,onChange:n=>B(n.target.value),onBlur:()=>c(x.value,{aliases:E(U)}),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:Ve.map(n=>{const d=X(n)||"#000000",L=x.color===n,f=x.icon&&ht[x.icon]?ht[x.icon]:_s;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${L?s.colorSwatchActive:""}`,style:{borderColor:L?d:void 0,"--swatch-color":d,"--swatch-border-color":`${d}80`},onClick:()=>c(x.value,{color:n}),title:n,children:e.jsx(f,{size:14,style:{color:d}})},n)})}),e.jsx("div",{className:s.iconGrid,children:Ps.map(n=>{const d=ht[n]||de[n]||_s;return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${x.icon===n?s.iconPickerBtnActive:""}`,style:x.icon===n?{borderColor:X(x.color),color:X(x.color),background:`${X(x.color)}15`}:{},onClick:()=>c(x.value,{icon:n}),title:n,children:e.jsx(d,{size:16})},n)})})]})]})]}),!x&&!w&&e.jsxs("div",{className:`${R.emptyStateBox} ${R.emptyStateBare}`,children:[e.jsx(vn,{size:24,className:R.emptyStateIcon}),"Select an option above to configure its appearance"]})]})]})}function Ui(a){const{displayLabel:o,categories:h,pathValidation:g,onUpdateDisplayLabel:b,onUpdateCategory:N,onRemoveCategory:w,onSaveCategory:$,onAddPath:A,onRemovePath:z,onUpdateCategoryIcon:O,onUpdateCategoryColor:j,onBrowseFolders:I}=a,[P,U]=l.useState(""),[B,x]=l.useState(!1),[S,E]=l.useState(""),[C,M]=l.useState(""),[c,W]=l.useState(o||""),[m,_]=l.useState("");l.useEffect(()=>{W(o||"")},[o]),l.useEffect(()=>{const u=h.find(F=>F.value===P);u&&M(u.label)},[P,h]);const n=()=>{if(!S.trim())return;$(S);const u=S.trim().toLowerCase().replace(/\s+/g,"-");E(""),x(!1),setTimeout(()=>U(u),100)},d=u=>{C&&C!==u.label&&N({...u,label:C},u.label)},L=u=>{const F=[];if(u.path&&F.push(u.path),u.paths&&u.paths.length>0)for(const K of u.paths)F.includes(K)||F.push(K);return F},f=h.find(u=>u.value===P),G=f?.value===xn;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(Ls,{value:P,options:[{value:"",label:"Select a category to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...h.map(u=>({value:u.value,label:`${u.label}${u.disabled?" (Legacy)":""}`,icon:u.icon,color:u.color}))],onChange:u=>{U(String(u)),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(Is,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>x(!0),title:"Create new category",children:e.jsx(as,{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:"e.g. Backend, Frontend, API...",value:S,onChange:u=>E(u.target.value),onKeyDown:u=>{u.key==="Enter"&&n()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:n,disabled:!S.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"}),!G&&e.jsxs("button",{type:"button",onClick:()=>{confirm(`Retire category "${f.label}"? Existing tasks will be reassigned to ${ra}.`)&&(w(f.value),U(""))},title:"Retire Category",className:`${s.destructiveBtn} ${s.deleteBtnSmall}`,children:[e.jsx(qe,{size:14,className:s.trashIcon})," Retire"]})]}),G&&e.jsxs("p",{className:s.settingsHint,style:{marginBottom:"12px"},children:[ra," 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:c,onChange:u=>W(u.target.value),onBlur:()=>b?.(c.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:C,onChange:u=>M(u.target.value),onBlur:()=>d(f),onKeyDown:u=>{u.key==="Enter"&&(d(f),u.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:()=>N({...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((u,F)=>{const K=g[u],ee=K?.exists,Je=K?.isFile;return e.jsxs("div",{className:`${s.pathChip} ${ee===!1?s.pathInvalid:ee?s.pathValid:""}`,children:[ee===void 0?e.jsx(_e,{size:12,className:s.spinner}):ee?Je?e.jsx(Na,{size:12,className:s.pathValidIcon}):e.jsx(da,{size:12,className:s.pathValidIcon}):e.jsx(ce,{size:12,className:s.pathInvalidIcon}),e.jsx("span",{className:s.pathText,title:u,children:u}),e.jsx("button",{type:"button",className:s.removePathBtn,onClick:()=>z(f.value,u),title:"Remove path",children:e.jsx(Is,{size:10})})]},F)})}),e.jsxs("div",{className:`${s.pathInputGroup} ${R.pathInputGroupStretch}`,children:[e.jsx("input",{type:"text",className:s.input,value:m,onChange:u=>_(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),m.trim()&&(A(f.value,m.trim()),_("")))},placeholder:"Add path (e.g. frontend/src/...)"}),e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>{m.trim()&&(A(f.value,m.trim()),_(""))},disabled:!m.trim(),title:"Add path",children:e.jsx(as,{size:18})}),e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>I(f.value),title:"Browse folders",children:e.jsx(da,{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:Ve.map(u=>{const F=X(u)||"#000000",K=f.color===u,ee=f.icon&&de[f.icon]?de[f.icon]:fn;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${K?s.colorSwatchActive:""}`,style:{borderColor:K?F:void 0,"--swatch-color":F,"--swatch-border-color":`${F}80`},onClick:()=>j(f.value,u),title:u,children:e.jsx(ee,{size:14,style:{color:F}})},u)})}),e.jsx("div",{className:s.iconGrid,children:Ps.map(u=>{const F=de[u];return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${f.icon===u?s.iconPickerBtnActive:""}`,style:f.icon===u?{borderColor:X(f.color),color:X(f.color),background:`${X(f.color)}15`}:{},onClick:()=>O(f.value,u),title:u,children:e.jsx(F,{size:16})},u)})})]})]})]}),!f&&!B&&e.jsx("div",{className:`${R.emptyStateItalic} ${R.emptyStateBare}`,children:"Select a category above to configure settings"})]})}function Ki(a){const{types:o,onSaveType:h,onRemoveType:g,onUpdateType:b,displayLabel:N,onUpdateDisplayLabel:w}=a,[$,A]=l.useState(""),[z,O]=l.useState(!1),[j,I]=l.useState(""),[P,U]=l.useState(""),[B,x]=l.useState(N||"");l.useEffect(()=>{const c=o.find(W=>W.value===$);c&&U(c.label)},[$,o]),l.useEffect(()=>{x(N||"")},[N]);const S=o.find(c=>c.value===$),E=S?.value===yn,C=S?.status==="retired",M=()=>{if(!j.trim())return;h(j);const c=j.trim().toLowerCase().replace(/\s+/g,"-");I(""),O(!1),setTimeout(()=>A(c),100)};return e.jsxs("div",{className:`${s.configPanel} ${s.flex1}`,children:[e.jsxs("div",{className:`${s.headerFlex}`,style:{marginBottom:S&&!z||z?"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(Ls,{value:$,options:[{value:"",label:"Select a type to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...o.map(c=>({value:c.value,label:c.status==="retired"?`${c.label} (Retired)`:c.label,icon:c.icon||"Box",color:c.color||"violet-500"}))],onChange:c=>{A(String(c)),O(!1)},disabled:z,ariaLabelledBy:"type-config-label"})]}),z?e.jsx("button",{type:"button",className:`${s.browseBtn} ${s.cancelBtnRed}`,onClick:()=>O(!1),title:"Cancel creation",children:e.jsx(Is,{size:18})}):e.jsx("button",{type:"button",className:s.browseBtn,onClick:()=>O(!0),title:"Create new type",children:e.jsx(as,{size:18})})]}),z&&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:"e.g. Bug, Feature, Chore...",value:j,onChange:c=>I(c.target.value),onKeyDown:c=>{c.key==="Enter"&&M()},autoFocus:!0}),e.jsx("button",{type:"button",className:s.saveSettingsBtn,onClick:M,disabled:!j.trim(),children:"Create"})]})]}),S&&!z&&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:c=>x(c.target.value),onBlur:()=>w?.(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:c=>U(c.target.value),onBlur:()=>b(S.value,{label:P}),onKeyDown:c=>{c.key==="Enter"&&c.currentTarget.blur()}}),!E&&e.jsxs("button",{type:"button",onClick:()=>{if(C){b(S.value,{status:"active"});return}confirm(`Retire type "${S.label}"? Existing tasks using it will keep it as a legacy type until reassigned.`)&&g(S.value)},title:C?"Restore Type":"Retire Type",className:`${s.destructiveBtn} ${s.deleteBtnMedium}`,children:[e.jsx(qe,{size:14,className:s.trashIcon})," ",C?"Restore":"Retire"]})]})]})}),e.jsx("p",{className:`${s.settingsHint} ${s.marginTop12}`,children:E?"Task is the protected fallback type and cannot be retired.":C?"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:Ve.map(c=>{const W=X(c)||"#000000",m=S.color===c,_=S.icon&&de[S.icon]?de[S.icon]:_s;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${m?s.colorSwatchActive:""}`,style:{borderColor:m?W:void 0,"--swatch-color":W,"--swatch-border-color":`${W}80`},onClick:()=>b(S.value,{color:c}),title:c,children:e.jsx(_,{size:14,style:{color:W}})},c)})}),e.jsx("div",{className:s.iconGrid,children:Ps.map(c=>{const W=de[c];return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${S.icon===c?s.iconPickerBtnActive:""}`,style:S.icon===c?{borderColor:X(S.color),color:X(S.color),background:`${X(S.color)}15`}:{},onClick:()=>b(S.value,{icon:c}),title:c,children:e.jsx(W,{size:16})},c)})})]})]})]}),!S&&!z&&e.jsx("div",{className:`${R.emptyStateItalic} ${R.emptyStateBare}`,children:"Select a type above to manage"})]})}function Vi({priorities:a,onUpdatePriorities:o,displayLabel:h,onUpdateDisplayLabel:g}){const[b,N]=l.useState(""),[w,$]=l.useState(null),[A,z]=l.useState(h||"");l.useEffect(()=>{const j=a.find(I=>String(I.value)===String(b))||null;$(j)},[a,b]),l.useEffect(()=>{z(h||"")},[h]);const O=(j,I)=>{o(a.map(P=>String(P.value)===String(j)?{...P,...I}: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(Ls,{value:b,options:[{value:"",label:"Select a priority level to configure...",icon:"HelpCircle",color:"var(--text-secondary)"},...a.map(j=>({value:j.value,label:j.label,icon:j.icon||"Gauge",color:j.color||"blue-500"}))],onChange:j=>N(j),ariaLabelledBy:"priority-config-label"})]}),w?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:A,onChange:j=>z(j.target.value),onBlur:()=>g?.(A.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:w.label,onChange:j=>O(w.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:Ve.map(j=>{const I=X(j)||"#000000",P=w.color===j,U=w.icon&&de[w.icon]?de[w.icon]:pa;return e.jsx("button",{type:"button",className:`${s.colorSwatch} ${P?s.colorSwatchActive:""}`,style:{borderColor:P?I:void 0,"--swatch-color":I,"--swatch-border-color":`${I}80`},onClick:()=>O(w.value,{color:j}),title:j,children:e.jsx(U,{size:14,style:{color:I}})},j)})}),e.jsx("div",{className:s.iconGrid,children:Ps.map(j=>{const I=de[j]||pa;return e.jsx("button",{type:"button",className:`${s.iconPickerBtn} ${w.icon===j?s.iconPickerBtnActive:""}`,style:w.icon===j?{borderColor:X(w.color),color:X(w.color),background:`${X(w.color)}15`}:{},onClick:()=>O(w.value,{icon:j}),title:j,children:e.jsx(I,{size:16})},j)})})]})]})]}):e.jsx("div",{className:`${R.emptyStateItalic} ${R.emptyStateBare}`,children:"Select a priority above to manage"})]})}function qi(a){return a.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0}))}function Ji(a){return a.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0,options:qi(Array.isArray(o.options)?o.options:[])}))}const Yi=[{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 Xi(){return Yi.map(a=>({...a,taxonomies:Ji(a.taxonomies)}))}const Zi="_libraryContainer_94zm2_1",Qi="_introCard_94zm2_7",eo="_eyebrow_94zm2_17",so="_introTitle_94zm2_28",to="_introCopy_94zm2_35",ao="_prototypeNotice_94zm2_43",no="_libraryGrid_94zm2_49",io="_packList_94zm2_56",oo="_packCard_94zm2_62",lo="_packCardInteractive_94zm2_73",ro="_packCardActive_94zm2_88",co="_packHeader_94zm2_94",po="_packHeaderText_94zm2_101",uo="_packTitleRow_94zm2_108",mo="_packTitle_94zm2_108",ho="_packBadge_94zm2_122",go="_packDescription_94zm2_137",xo="_packBestFor_94zm2_144",yo="_packCounts_94zm2_151",bo="_packTaxonomyPreview_94zm2_157",vo="_packTaxonomyChip_94zm2_163",fo="_packTaxonomyMore_94zm2_175",jo="_packCountChip_94zm2_185",ko="_packActions_94zm2_198",Co="_packActionHint_94zm2_204",No="_previewPanel_94zm2_212",To="_previewHeader_94zm2_224",wo="_previewSummaryRow_94zm2_230",So="_previewTitle_94zm2_236",$o="_previewBestFor_94zm2_243",Io="_previewSubtext_94zm2_250",_o="_previewSection_94zm2_256",Lo="_previewSectionTitle_94zm2_262",Po="_previewList_94zm2_271",Ao="_previewItem_94zm2_277",Bo="_previewItemLabel_94zm2_288",Mo="_previewItemMeta_94zm2_298",Do="_customTaxonomyCard_94zm2_304",Eo="_customTaxonomyHeader_94zm2_314",Ro="_customTaxonomyDescription_94zm2_321",zo="_customTaxonomyBadges_94zm2_328",Go="_customTaxonomyBadge_94zm2_328",Oo="_applyPanel_94zm2_347",Fo="_applyTitle_94zm2_357",Ho="_applyCopy_94zm2_364",Wo="_analysisPanel_94zm2_371",Uo="_analysisCopy_94zm2_381",Ko="_analysisWarning_94zm2_388",Vo="_checkboxList_94zm2_395",qo="_checkboxLabel_94zm2_401",Jo="_prototypeResult_94zm2_409",Yo="_prototypeError_94zm2_415",r={libraryContainer:Zi,introCard:Qi,eyebrow:eo,introTitle:so,introCopy:to,prototypeNotice:ao,libraryGrid:no,packList:io,packCard:oo,packCardInteractive:lo,packCardActive:ro,packHeader:co,packHeaderText:po,packTitleRow:uo,packTitle:mo,packBadge:ho,packDescription:go,packBestFor:xo,packCounts:yo,packTaxonomyPreview:bo,packTaxonomyChip:vo,packTaxonomyMore:fo,packCountChip:jo,packActions:ko,packActionHint:Co,previewPanel:No,previewHeader:To,previewSummaryRow:wo,previewTitle:So,previewBestFor:$o,previewSubtext:Io,previewSection:_o,previewSectionTitle:Lo,previewList:Po,previewItem:Ao,previewItemLabel:Bo,previewItemMeta:Mo,customTaxonomyCard:Do,customTaxonomyHeader:Eo,customTaxonomyDescription:Ro,customTaxonomyBadges:zo,customTaxonomyBadge:Go,applyPanel:Oo,applyTitle:Fo,applyCopy:Ho,analysisPanel:Wo,analysisCopy:Uo,analysisWarning:Ko,checkboxList:Vo,checkboxLabel:qo,prototypeResult:Jo,prototypeError:Yo};function Xo(a,o="Layers"){const h=de[a||o]||de[o];return e.jsx(h,{size:15})}function ya(a){return{categories:a.categories.length>0,types:a.types.length>0,priorities:a.priorities.length>0}}function $s(a){const{title:o,items:h}=a;return e.jsxs("section",{className:r.previewSection,children:[e.jsx("h4",{className:r.previewSectionTitle,children:o}),e.jsx("div",{className:r.previewList,children:h.map(g=>e.jsxs("div",{className:r.previewItem,children:[e.jsxs("span",{className:r.previewItemLabel,children:[e.jsx("span",{style:{color:g.color?`var(--color-${g.color}, var(--text-secondary))`:"var(--text-secondary)"},children:Xo(g.icon)}),e.jsx("span",{children:g.label})]}),g.meta?e.jsx("span",{className:r.previewItemMeta,children:g.meta}):null]},g.key))})]})}function ba(a){let o=0,h=0,g=0,b=0;return a.taxonomies.forEach(N=>{N.multiSelect&&(o+=1),N.widgetType==="level"&&(h+=1),N.isRequired&&(g+=1),N.formEnabled!==!1&&(b+=1)}),{multiSelectCount:o,numericCount:h,requiredCount:g,formEnabledCount:b}}function Zo(a){const o=[];return o.push(a.widgetType==="level"?"Numeric":"Descriptive"),a.multiSelect&&o.push("Multi-select"),a.isRequired&&o.push("Required"),a.formEnabled!==!1&&o.push("Shows in forms"),a.filterEnabled&&o.push("Filterable"),a.sortEnabled&&o.push("Sortable"),o}function Qo(a){return{...a,aliases:Array.isArray(a.aliases)?[...a.aliases]:void 0,options:Array.isArray(a.options)?a.options.map(o=>({...o,aliases:Array.isArray(o.aliases)?[...o.aliases]:void 0})):[]}}function Sa(a,o){a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),o())}function el(a){const{onAnalyzeSystemTaxonomyPack:o,onApplySystemTaxonomyPack:h}=a,g=l.useMemo(()=>ja(),[]),[b,N]=l.useState(g),[w,$]=l.useState(g[0]?.id||""),[A,z]=l.useState(()=>g[0]?ya(g[0]):{categories:!0,types:!0,priorities:!0}),[O,j]=l.useState(!1),[I,P]=l.useState(null),[U,B]=l.useState(!1),[x,S]=l.useState(!1),E=b.find(m=>m.id===w)||b[0]||null,C=l.useMemo(()=>!E||!o?null:o(E),[o,E]);l.useEffect(()=>{let m=!1;return B(!0),fetch("/api/taskforce/taxonomy-library").then(async _=>{if(!_.ok)return null;const n=await _.json().catch(()=>({})),d=Array.isArray(n?.packs)?n.packs:[];return!m&&d.length>0&&(N(d),$(L=>d.some(f=>f.id===L)?L:d[0].id)),null}).catch(()=>null).finally(()=>{m||B(!1)}),()=>{m=!0}},[]);const M=m=>{const _=b.find(n=>n.id===m);$(m),z(_?ya(_):{categories:!0,types:!0,priorities:!0}),j(!1),P(null)},c=m=>{z(_=>({..._,[m]:!_[m]}))},W=()=>{if(!E)return;if(Object.entries(A).filter(([,_])=>_).map(([_])=>_).length===0){P({type:"error",message:"Select at least one taxonomy section to apply."});return}if(!h){P({type:"error",message:"System taxonomy pack apply is not available in this surface yet."});return}S(!0),P(null),h({pack:E,sections:A,remapExistingValuesToDefault:O}).then(_=>{if(_?.success){P({type:"success",message:`${E.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(()=>{S(!1)})};return E?e.jsxs("div",{className:r.libraryContainer,children:[e.jsxs("section",{className:r.introCard,children:[e.jsxs("span",{className:r.eyebrow,children:[e.jsx(yt,{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."}),U?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:b.map(m=>{const _=m.id===w;return e.jsxs("article",{className:`${r.packCard} ${r.packCardInteractive} ${_?r.packCardActive:""}`,role:"button",tabIndex:0,"aria-pressed":_,onClick:()=>M(m.id),onKeyDown:n=>Sa(n,()=>M(m.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:m.label})}),e.jsx("p",{className:r.packDescription,children:m.description})]})}),e.jsxs("div",{className:r.packCounts,children:[e.jsxs("span",{className:r.packCountChip,children:[e.jsx(Ta,{size:13}),m.categories.length," categories"]}),e.jsxs("span",{className:r.packCountChip,children:[e.jsx(jn,{size:13}),m.types.length," types"]}),e.jsxs("span",{className:r.packCountChip,children:[e.jsx(ae,{size:13}),m.priorities.length," priority levels"]})]}),e.jsx("div",{className:r.packActions,children:e.jsx("button",{type:"button",className:s.submitBtn,onClick:()=>M(m.id),children:"Apply"})})]},m.id)})}),e.jsxs("aside",{className:r.previewPanel,children:[e.jsxs("div",{className:r.previewHeader,children:[e.jsx("h3",{className:r.previewTitle,children:E.label}),e.jsx("p",{className:r.previewSubtext,children:"Read-only preview. Applying this pack will replace only the sections you choose."})]}),e.jsx($s,{title:"Categories",items:E.categories.map(m=>({key:m.value,label:m.label,icon:m.icon,color:m.color}))}),e.jsx($s,{title:"Task Types",items:E.types.map(m=>({key:m.value,label:m.label,icon:m.icon,color:m.color,meta:m.status==="retired"?"Retired":void 0}))}),e.jsx($s,{title:"Priority Levels",items:E.priorities.map(m=>({key:String(m.value),label:m.label,icon:m.icon,color:m.color,meta:`Level ${m.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."}),C?e.jsxs("div",{className:r.analysisPanel,children:[C.unmatchedCategoryValues.length>0?e.jsxs("p",{className:r.analysisCopy,children:[C.unmatchedCategoryValues.length," category value",C.unmatchedCategoryValues.length===1?"":"s"," will be preserved as legacy unless you remap to default."]}):null,C.unmatchedTypeValues.length>0?e.jsxs("p",{className:r.analysisCopy,children:[C.unmatchedTypeValues.length," type value",C.unmatchedTypeValues.length===1?"":"s"," will be preserved as legacy unless you remap to default."]}):null,C.incompatiblePriorityValues.length>0?e.jsxs("p",{className:r.analysisWarning,children:["Existing tasks use priority level",C.incompatiblePriorityValues.length===1?"":"s"," ",C.incompatiblePriorityValues.join(", "),". Priority replacement will be blocked unless you remap unmatched existing values to default."]}):null,C.unmatchedCategoryValues.length===0&&C.unmatchedTypeValues.length===0&&C.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:A.categories,onChange:()=>c("categories")}),e.jsx("span",{children:"Categories"})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:A.types,onChange:()=>c("types")}),e.jsx("span",{children:"Types"})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:A.priorities,onChange:()=>c("priorities")}),e.jsx("span",{children:"Priorities"})]})]}),e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:O,onChange:()=>j(m=>!m)}),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:W,disabled:x,children:x?"Applying…":"Apply Pack"})}),I?e.jsx("p",{className:`${r.prototypeResult} ${I.type==="error"?r.prototypeError:""}`,children:I.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 sl(a){const{taxonomies:o=[],onUpdateCustomTaxonomies:h}=a,g=l.useMemo(()=>Xi(),[]),[b,N]=l.useState(g),[w,$]=l.useState(g[0]?.id||""),[A,z]=l.useState(!1),[O,j]=l.useState(null),[I,P]=l.useState(g[0]?.taxonomies.map(n=>n.id)||[]),[U,B]=l.useState(null),x=b.find(n=>n.id===w)||b[0]||null,S=x?ba(x):null,E=l.useMemo(()=>x?x.taxonomies.filter(n=>I.includes(n.id)):[],[x,I]),C=l.useMemo(()=>new Set(I),[I]),M=l.useMemo(()=>{const n=new Set(o.map(d=>d.id));return E.map(d=>d.id).filter(d=>n.has(d))},[E,o]),c=l.useMemo(()=>{if(!x)return[];const n=new Set(o.map(d=>d.id));return x.taxonomies.filter(d=>C.has(d.id)&&!n.has(d.id))},[x,C,o]);if(l.useEffect(()=>{let n=!1;return z(!0),j(null),fetch("/api/taskforce/custom-taxonomy-library").then(async d=>{if(!d.ok)throw new Error(`Failed to load custom taxonomy packs (${d.status})`);const L=await d.json().catch(()=>({})),f=Array.isArray(L?.packs)?L.packs:[];!n&&f.length>0&&(N(f),$(G=>f.some(u=>u.id===G)?G:f[0].id))}).catch(d=>{n||j(d instanceof Error?d.message:"Failed to load custom taxonomy packs.")}).finally(()=>{n||z(!1)}),()=>{n=!0}},[]),l.useEffect(()=>{P(x?.taxonomies.map(n=>n.id)||[]),B(null)},[w,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 W=n=>{P(d=>d.includes(n)?d.filter(L=>L!==n):[...d,n]),B(null)},m=()=>{P(c.map(n=>n.id)),B(null)},_=()=>{if(I.length===0){B({type:"error",message:"Select at least one taxonomy to install."});return}if(M.length>0){B({type:"error",message:`This workspace already has ${M.length} taxonomy ${M.length===1?"id":"ids"} that match your current selection. Deselect conflicting taxonomies before installing this pack.`});return}if(!h){B({type:"error",message:"Custom taxonomy install is not available in this surface yet."});return}h([...o,...c.map(n=>Qo(n))]),B({type:"success",message:`${c.length} custom ${c.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(ua,{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."}),A?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:b.map(n=>{const d=n.id===w,L=ba(n),f=n.taxonomies.slice(0,3).map(G=>G.label);return e.jsxs("article",{className:`${r.packCard} ${r.packCardInteractive} ${d?r.packCardActive:""}`,role:"button",tabIndex:0,"aria-pressed":d,onClick:()=>$(n.id),onKeyDown:G=>Sa(G,()=>$(n.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:n.label}),n.domainTag?e.jsx("span",{className:r.packBadge,children:n.domainTag}):null]}),e.jsx("p",{className:r.packDescription,children:n.description}),n.bestFor?e.jsxs("p",{className:r.packBestFor,children:[e.jsx("strong",{children:"Best for:"})," ",n.bestFor]}):null]})}),e.jsxs("div",{className:r.packCounts,children:[e.jsxs("span",{className:r.packCountChip,children:[e.jsx(ua,{size:13}),n.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(G=>e.jsx("span",{className:r.packTaxonomyChip,children:G},G)),n.taxonomies.length>f.length?e.jsxs("span",{className:r.packTaxonomyMore,children:["+",n.taxonomies.length-f.length," more"]}):null]}),e.jsx("div",{className:r.packActions,children:e.jsx("span",{className:r.packActionHint,children:d?"Previewing":"Click to Preview"})})]},n.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"]}),(S?.formEnabledCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[S.formEnabledCount," show in forms"]}):null,(S?.numericCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[S.numericCount," numeric"]}):null,(S?.requiredCount||0)>0?e.jsxs("span",{className:r.packCountChip,children:[S.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(n=>e.jsxs("label",{className:r.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:I.includes(n.id),onChange:()=>W(n.id)}),e.jsxs("span",{children:[n.label,o.some(d=>d.id===n.id)?" (Already installed)":""]})]},n.id))}),e.jsxs("div",{className:r.analysisPanel,children:[e.jsxs("p",{className:r.analysisCopy,children:[I.length," ",I.length===1?"taxonomy is":"taxonomies are"," currently selected from this pack."]}),c.length>0?e.jsxs("p",{className:r.analysisCopy,children:[c.length," selected ",c.length===1?"taxonomy is":"taxonomies are"," ready to install right now."]}):e.jsx("p",{className:r.analysisCopy,children:"No selected taxonomies are currently installable."}),M.length>0?e.jsxs("p",{className:r.analysisWarning,children:[M.length," selected ",M.length===1?"taxonomy conflicts":"taxonomies conflict"," with existing workspace ids: ",M.join(", "),"."]}):null]}),e.jsxs("div",{className:r.packActions,children:[M.length>0?e.jsx("button",{type:"button",className:s.cancelBtn,onClick:m,children:"Select Installable Only"}):null,e.jsx("button",{type:"button",className:s.submitBtn,onClick:_,disabled:I.length===0||c.length===0,children:"Install Selected Taxonomies"})]}),U?e.jsx("p",{className:`${r.prototypeResult} ${U.type==="error"?r.prototypeError:""}`,children:U.message}):null]}),x.taxonomies.map(n=>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:n.label}),n.description?e.jsx("p",{className:r.customTaxonomyDescription,children:n.description}):null]})}),M.includes(n.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(n).map(d=>e.jsx("span",{className:r.customTaxonomyBadge,children:d},d))}),e.jsx($s,{title:n.widgetType==="level"?"Levels":"Options",items:n.options.map(d=>({key:`${n.id}:${d.value}`,label:d.label,icon:d.icon,color:d.color,meta:n.widgetType==="level"?`Level ${d.value}`:String(d.value)}))})]},n.id))]})]})]})}function va(a){const{mode:o="system",taxonomies:h,onUpdateCustomTaxonomies:g,onAnalyzeSystemTaxonomyPack:b,onApplySystemTaxonomyPack:N}=a;return o==="custom"?e.jsx(sl,{taxonomies:h,onUpdateCustomTaxonomies:g}):e.jsx(el,{onAnalyzeSystemTaxonomyPack:b,onApplySystemTaxonomyPack:N})}function tl(a){const{taxonomies:o,onUpdateTaxonomies:h,taxonomyDisplayLabels:g,onUpdateTaxonomyDisplayLabels:b,categories:N,pathValidation:w,onUpdateCategory:$,onRemoveCategory:A,onSaveCategory:z,onAddPath:O,onRemovePath:j,onUpdateCategoryIcon:I,onUpdateCategoryColor:P,onBrowseFolders:U,types:B,onSaveType:x,onRemoveType:S,onUpdateType:E,priorities:C,onUpdatePriorities:M,onAnalyzeSystemTaxonomyPack:c,onApplySystemTaxonomyPack:W,manualComplexityEnabled:m,onManualComplexityEnabledChange:_,initialTab:n}=a,[d,L]=l.useState(n||""),[f,G]=l.useState(n?"detail":"list"),[u,F]=l.useState(!1),[K,ee]=l.useState(""),Je=l.useMemo(()=>ja().length,[]),ns=l.useMemo(()=>Hi({categories:N,types:B,priorities:C,taxonomies:o,manualComplexityEnabled:m,displayLabels:g}),[N,m,C,o,g,B]),As=()=>{if(!K.trim())return;const v=K.toLowerCase().trim().replace(/\s+/g,"-");if(o.some(Z=>Z.id===v)){alert("A taxonomy with this ID already exists");return}const Y={id:v,label:K.trim(),options:[],widgetType:"select",isSystem:!1,multiSelect:!1,formEnabled:!1,filterEnabled:!0,sortEnabled:!1};h([...o,Y]),ee(""),F(!1),L(v),G("detail")},Bs=v=>{h(o.map(Y=>Y.id===v.id?v:Y))},Ms=v=>{const Y=o.map(Z=>Z.id===v?{...Z,status:"retired"}:Z);h(Y),G("list")},Ds=v=>{const Y=o.map(Z=>Z.id===v?{...Z,status:"active"}:Z);h(Y)},Le=v=>{L(v),G("detail")},is=(v,Y)=>{const Z=o.findIndex(zs=>zs.id===v);if(Z<0)return;const Ye=Z+Y;if(Ye<0||Ye>=o.length)return;const Xe=[...o],[Rs]=Xe.splice(Z,1);Xe.splice(Ye,0,Rs),h(Xe)},os=ns.find(v=>v.id===d),ls=os?.taxonomy,Es=ns.filter(v=>v.kind!=="custom"),we=ns.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:()=>Le("library"),children:[e.jsxs("div",{className:y.libraryLauncherInfo,children:[e.jsx("span",{className:y.libraryLauncherIcon,children:e.jsx(yt,{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:[Je," curated packs",e.jsx(Te,{size:16,className:y.chevron})]})]})}),e.jsxs("div",{className:y.drillDownSection,children:[e.jsx("h4",{className:y.drillDownSectionTitle,children:"System Taxonomies"}),Es.map(v=>e.jsxs("button",{className:`${y.drillDownItem} ${v.id==="complexities"&&!m?y.drillDownItemDimmed:""}`,onClick:()=>Le(v.id),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx(kn,{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(Te,{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:R.addTaxonomyBtnSmall,onClick:()=>F(!0),title:"Add Custom Taxonomy",children:[e.jsx(as,{size:14})," New"]})]}),e.jsxs("button",{className:y.drillDownItem,onClick:()=>Le("custom-library"),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx(yt,{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(Te,{size:16,className:y.chevron})]}),we.length===0?e.jsx("div",{className:s.emptyState,children:e.jsx("p",{className:"tf-empty-copy",children:"No custom taxonomies yet."})}):we.map(v=>e.jsxs("div",{className:`${y.drillDownItem} ${v.taxonomy?.status==="retired"?y.drillDownItemDimmed:""}`,children:[e.jsxs("button",{className:y.drillDownItemAction,onClick:()=>Le(v.id),children:[e.jsxs("div",{className:y.drillDownItemInfo,children:[e.jsx(Cn,{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(Te,{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(),is(v.id,-1)},disabled:we[0]?.id===v.id,children:e.jsx(ka,{size:16})}),e.jsx("button",{type:"button",className:s.browseBtn,title:"Move taxonomy down",onClick:Y=>{Y.stopPropagation(),is(v.id,1)},disabled:we[we.length-1]?.id===v.id,children:e.jsx(Ca,{size:16})})]})]},v.id))]})]}),u&&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:"e.g. Sprint, Phase",value:K,onChange:v=>ee(v.target.value),autoFocus:!0})]}),e.jsxs("div",{className:y.dialogActions,children:[e.jsx("button",{className:`${s.submitBtn} ${y.createSubmit}`,onClick:As,disabled:!K.trim(),children:"Create"}),e.jsx("button",{className:`${s.cancelBtn} ${y.createCancel}`,onClick:()=>{F(!1),ee("")},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:()=>G("list"),title:"Back to All Taxonomies",children:[e.jsx(Nn,{size:16,className:y.breadcrumbIcon}),"Taxonomies"]}),e.jsx(Te,{size:14,className:y.breadcrumbDivider}),e.jsx("h3",{className:y.breadcrumbActive,children:d==="library"?"System Taxonomy Library":d==="custom-library"?"Custom Taxonomy Library":os?.label||"Taxonomy"})]})}),e.jsx("div",{className:y.detailContent,children:d==="library"?e.jsx(va,{mode:"system",onAnalyzeSystemTaxonomyPack:c,onApplySystemTaxonomyPack:W}):d==="custom-library"?e.jsx(va,{mode:"custom",taxonomies:o,onUpdateCustomTaxonomies:h}):d==="categories"?e.jsx(Ui,{displayLabel:g?.category,onUpdateDisplayLabel:v=>b?.({category:v}),categories:N,pathValidation:w,onUpdateCategory:$,onRemoveCategory:A,onSaveCategory:z,onAddPath:O,onRemovePath:j,onUpdateCategoryIcon:I,onUpdateCategoryColor:P,onBrowseFolders:U}):d==="types"?e.jsx(Ki,{displayLabel:g?.type,onUpdateDisplayLabel:v=>b?.({type:v}),types:B,onSaveType:x,onRemoveType:S,onUpdateType:E}):d==="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:m,onChange:v=>{_(v.target.checked)}}),e.jsx("span",{children:"Manual Complexity"})]})]}):ls?e.jsx(Wi,{taxonomy:ls,onUpdateTaxonomy:Bs,onRemoveTaxonomy:Ms,onRestoreTaxonomy:Ds}):d==="priorities"?e.jsx(Vi,{displayLabel:g?.priority,onUpdateDisplayLabel:v=>b?.({priority:v}),priorities:C,onUpdatePriorities:M}):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:()=>G("list"),children:"Return to List"})]})})]})}const al={sun:Pn,wind:wa,moon:Ln,sparkles:bt},fa=["tasks:read","tasks:write","workspace:read"];function ml(a){const{settingsModel:o,onSectionChange:h,renderMode:g="full"}=a,b=g==="mcp-only",{currentTheme:N,globalTheme:w,themeUseGlobalDefault:$,keyShortcut:A,jsonBackupEnabled:z,globalJsonBackupEnabled:O,globalWeekStartsOn:j,locale:I="en-US",supportedLocales:P=["en-US","es-419","pt-BR"],jsonBackupUseGlobalDefault:U,manualComplexityEnabled:B,checklistDropdownEnabled:x=!0,showTaskCardStatusLabel:S=!0,exportWorkflowsPath:E,exportingResource:C,exportResult:M,initialSection:c,onThemeChange:W,onSaveTheme:m,onSaveGlobalTheme:_,onResetProjectToGlobal:n,onKeyShortcutChange:d,onJsonBackupEnabledChange:L,onSaveGlobalJsonBackupEnabled:f,onSaveGlobalWeekStartsOn:G,onSaveLocale:u,onManualComplexityEnabledChange:F,onChecklistDropdownEnabledChange:K,onShowTaskCardStatusLabelChange:ee,onSaveSettings:Je,onExportWorkflowsPathChange:ns,onShowFolderBrowserChange:As,onBrowserTargetChange:Bs,onFetchFolders:Ms,categories:Ds,pathValidation:Le,taxonomyDisplayLabels:is,onUpdateCategory:os,onRemoveCategory:ls,onSaveCategory:Es,onAddPath:we,onRemovePath:v,onUpdateCategoryIcon:Y,onUpdateCategoryColor:Z,types:Ye,onSaveType:Xe,onRemoveType:Rs,onUpdateType:zs,taxonomies:$a,onUpdateTaxonomies:Ia,priorities:_a,onUpdatePriorities:La,onAnalyzeSystemTaxonomyPack:Pa,onApplySystemTaxonomyPack:Aa,onUpdateTaxonomyDisplayLabels:Ba,projectRoot:Se,projectName:Pe,mcpHostRoot:rs,serverHostRoot:cs,mcpScriptPath:pe,tenantId:jt,workspaceId:le,runtimeMode:Ae="local",cloudAuthBaseUrl:Gs="",cloudMcpBaseUrl:Os="",fetchCloudAuthApi:Be,workspaceSwitchingEnabled:Ma=!1,currentWorkspaceRole:Da="member",currentWorkspaceName:Me="",onDeleteWorkspace:Fs,onMcpHostRootChange:Ea,onOpenCloudAuth:Hs,isAuthenticated:kt=!1,exportEnvironment:Ct,setupState:se=null,buildInfo:nl=null,onExportEnvironmentChange:Ra,onSaveSetupMode:il,onSaveWorkspaceProfile:Ws,availableWorkflows:De=[],onExportWorkflows:za,initiativeTemplates:Ee=[],onRefreshInitiativeTemplates:Us,onCreateInitiativeFromTemplate:Ks,onRefreshWorkflows:Ga}=o,Nt=Ae!=="cloud",[Ze,ds]=l.useState([]);l.useEffect(()=>{De.length>0&&Ze.length===0&&ds(De)},[De]);const Oa=t=>{ds(i=>i.includes(t)?i.filter(p=>p!==t):[...i,t])},Fa=()=>ds(De),Ha=()=>ds([]),[Re,V]=l.useState(null),[ps,Wa]=l.useState(()=>se?.mode==="operations"?"operations":"core"),[Tt,wt]=l.useState(()=>String(se?.workspace?.name||"").trim()),[St,$t]=l.useState(()=>String(se?.workspace?.description||"")),[Qe,It]=l.useState(""),[Vs,Ua]=l.useState(""),[_t,Lt]=l.useState(!1),[D,ne]=l.useState(()=>b?"mcp":"general"),[qs,es]=l.useState(!0),[ue,us]=l.useState(()=>"project"),[Js,Pt]=l.useState([]),[Ys,At]=l.useState(!1),[ke,Xs]=l.useState(null),[ms,hs]=l.useState(null),gs=Ke.useCallback(async()=>{if(le){At(!0);try{const t=typeof window<"u"?new URL(`/api/taskforce/workspace/assignee-options?workspaceId=${encodeURIComponent(le)}`,window.location.origin).toString():`/api/taskforce/workspace/assignee-options?workspaceId=${encodeURIComponent(le)}`,i=await fetch(t,{credentials:"include"});if(!i.ok)return;const p=await i.json().catch(()=>({})),T=Array.isArray(p?.assignees)?p.assignees.filter(k=>k.kind==="agent").map(k=>({id:String(k.value||""),name:String(k.label||""),username:String(k.username||k.value||""),icon:String(k.icon||"Bot"),color:String(k.color||"#6B7280"),kind:"agent",description:typeof k.description=="string"?k.description:null,role:typeof k.role=="string"?k.role:null,provider:typeof k.provider=="string"?k.provider:null,model:typeof k.model=="string"?k.model:null,surfaceType:typeof k.surfaceType=="string"?k.surfaceType:null})):[];Pt(T)}catch{Pt([])}finally{At(!1)}}},[le]),Ka=Ke.useCallback(async(t,i)=>{if(le){hs(null);try{const p=await fetch("/api/taskforce/workspace/ai-profiles/merge",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:le,keepId:t,mergeId:i})}),T=await p.json().catch(()=>({}));p.ok?(hs({type:"success",message:"Profiles merged successfully."}),Xs(null),await gs()):hs({type:"error",message:T?.error||"Merge failed."})}catch{hs({type:"error",message:"Network error during merge."})}}},[le,gs]);l.useEffect(()=>{(D==="agents"||D==="mcp")&&gs()},[D,gs]),l.useEffect(()=>{Ee.length>0&&!Qe&&It(Ee[0].id)},[Ee,Qe]),l.useEffect(()=>{if(!Re)return;const t=setTimeout(()=>V(null),2500);return()=>clearTimeout(t)},[Re]),l.useEffect(()=>{Wa(se?.mode==="operations"?"operations":"core")},[se?.mode]),l.useEffect(()=>{wt(String(se?.workspace?.name||"").trim()),$t(String(se?.workspace?.description||""))},[se?.workspace?.name,se?.workspace?.description]);const Va=async t=>{W(t);const i=await m(t);V({type:i?"success":"error",message:i?"Project theme saved.":"Failed to save project theme."})},Bt=(t,i,p)=>{const T=al[t.icon];return e.jsxs("button",{className:`${s.themeBtn} tf-button-tile ${i===t.id?s.activeTheme:""}`,onClick:()=>{p(t.id)},children:[e.jsx(T,{size:20})," ",t.label]},t.id)},Zs=Ae==="cloud"?"cloud":"local",[xs,Qs]=l.useState(Zs),[be,Mt]=l.useState(!1),[ze,Dt]=l.useState(!0),[Et,Rt]=l.useState(!1),[et,zt]=l.useState(!0),[st,ys]=l.useState([]),[qa,Gt]=l.useState(!1),[Ot,tt]=l.useState(null),[ss,bs]=l.useState(null),vs=l.useMemo(()=>`${String(Me||se?.workspace?.name||Pe||le||"Taskforce Workspace").trim()} MCP`,[Me,se?.workspace?.name,Pe,le]),[Ft,at]=l.useState(vs),[nt,Ht]=l.useState(""),[Ge,ts]=l.useState(null),[me,it]=l.useState(null),[Oe,$e]=l.useState(null),[Wt,ot]=l.useState(null),[te,lt]=l.useState("general"),[Ut,Kt]=l.useState(!1),[H,ve]=l.useState(null),[fs,Vt]=l.useState([]),[Ja,qt]=l.useState(!1),[Jt,Fe]=l.useState(null),[Yt,Xt]=l.useState(null);l.useEffect(()=>{Qs(Zs)},[Zs]),l.useEffect(()=>{at(t=>t.trim().length>0?t:vs)},[vs]),l.useEffect(()=>{if(!Ge)return;const t=setTimeout(()=>ts(null),3500);return()=>clearTimeout(t)},[Ge]),l.useEffect(()=>{if(!me)return;const t=setTimeout(()=>it(null),3500);return()=>clearTimeout(t)},[me]),l.useEffect(()=>{if(!Oe)return;const t=setTimeout(()=>$e(null),3500);return()=>clearTimeout(t)},[Oe]);const He=l.useMemo(()=>{const t=bn(Os||Gs||""),i=String(t||Os||Gs||"").trim().replace(/\/+$/,"");return i?`${i}/mcp`:typeof window>"u"?"/mcp":`${window.location.origin.replace(/\/+$/,"")}/mcp`},[Os,Gs]),Ya=Ae!=="cloud",js=Ae==="cloud"||xs==="cloud",Xa=Ae!=="cloud"&&xs==="local",We=kt,Za=l.useMemo(()=>{const t={active:0,expired:1,revoked:2};return[...st].sort((i,p)=>{const T=(t[i.status]??99)-(t[p.status]??99);return T!==0?T:String(p.createdAt||"").localeCompare(String(i.createdAt||""))})},[st]),Ue=l.useMemo(()=>Rn(Me||null,Pe||null),[Me,Pe]),Ie=Wt?.trim()||"",ks=Ie||"<<GENERATE_TOKEN>>",q=l.useMemo(()=>Wn({clientId:te,endpoint:He,tokenValue:ks,serverId:Ue}),[He,Ue,ks,te]),Cs=q.kind==="json"?q.serverConfig??null:null,Zt=te==="chatgpt-desktop"||te==="claude-desktop",Qt="Resolve your profile with Taskforce.",ea=l.useMemo(()=>fs.find(t=>t.provider==="chatgpt"&&t.status==="active")||null,[fs]),sa=l.useMemo(()=>fs.find(t=>t.provider==="claude"&&t.status==="active")||null,[fs]),Ns=te==="chatgpt-desktop"?ea:te==="claude-desktop"?sa:null,Qa=l.useMemo(()=>{if(q.kind==="text")return q.renderedText||"";let t={[q.rootKey||"mcpServers"]:{[Ue]:q.serverConfig}};for(const i of[...q.wrapperKeys||[]].reverse())t={[i]:t};return JSON.stringify(t,null,2)},[q,Ue]),rt=(t,i,p="mcpServers",T=[])=>{const k={color:"var(--text-helper)"},J={color:"var(--brand-primary-strong)",fontWeight:"bold"},Q={color:"var(--text-secondary)"},re={color:"var(--text-primary, #fff)"},fe=ks,oe=[...T,p],he=" ".repeat(oe.length+1),la=JSON.stringify(i,null,2).split(`
|
|
4
|
-
`).map((je,ge)=>ge===0?je:`${he}${je}`).join(`
|
|
5
|
-
`).split(fe);return e.jsxs(e.Fragment,{children:[e.jsx("span",{style:Q,children:"{"}),`
|
|
6
|
-
`,oe.map((je,ge)=>e.jsxs(Ke.Fragment,{children:[`${" ".repeat(ge+1)}`,e.jsx("span",{style:k,children:`"${je}"`}),e.jsx("span",{style:k,children:":"})," ",e.jsx("span",{style:Q,children:"{"}),`
|
|
7
|
-
`]},`mcp-container-open-${je}-${ge}`)),he,e.jsxs("span",{style:re,children:[`"${t}"`,": ",la.map((je,ge)=>e.jsxs(Ke.Fragment,{children:[je,ge<la.length-1&&e.jsx("span",{style:J,children:fe})]},`config-segment-${ge}`))]}),`
|
|
8
|
-
`,[...oe].reverse().map((je,ge)=>e.jsxs(Ke.Fragment,{children:[`${" ".repeat(oe.length-ge)}`,e.jsx("span",{style:Q,children:"}"}),`
|
|
9
|
-
`]},`mcp-container-close-${je}-${ge}`)),e.jsx("span",{style:Q,children:"}"})]})},ct=t=>{const i={color:"var(--text-primary, #fff)"},p={color:"var(--brand-primary-strong)",fontWeight:"bold"},T=ks,k=String(t||"").split(T);return k.map((J,Q)=>e.jsxs(Ke.Fragment,{children:[e.jsx("span",{style:i,children:J}),Q<k.length-1&&e.jsx("span",{style:p,children:T})]},`text-config-${Q}`))},Ts=(t,i)=>{navigator.clipboard.writeText(t),Mt(i),setTimeout(()=>Mt(!1),2e3)},dt=()=>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:()=>Ts(Qt,"registration"),title:be==="registration"?"Copied":"Copy prompt",children:Qt})]}),en=()=>e.jsxs("div",{className:`${s.mcpAuthRequiredCard} ${s.marginTop16}`,children:[e.jsx("div",{className:s.mcpAuthRequiredIcon,children:e.jsx(ha,{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."}),Hs&&e.jsxs("div",{className:s.mcpAuthRequiredActions,children:[e.jsx("button",{type:"button",className:s.copyBtn,onClick:()=>Hs("login"),children:"Sign In"}),e.jsx("button",{type:"button",className:s.copyBtn,onClick:()=>Hs("register"),children:"Register"})]})]})]}),ta=()=>{if(!Zt&&!Ie){it({type:"error",message:"Generate a token before copying the Cloud MCP configuration."});return}it(null),Ts(Qa,"full")},sn=()=>{let t=pe||"",i=Se||"";const p=rs||cs;if(p&&Se){if(pe&&pe.startsWith(Se))t=pe.replace(Se,p);else if(pe&&pe.includes("/node_modules/")){const oa=pe.indexOf("/node_modules/");t=p+pe.substring(oa)}i=p}const T=(pe||"").endsWith(".ts"),k=Pe||(Se?Se.split(/[/\\]/).pop():"project"),J=vt(`taskforce-${k}`,"taskforce-project"),Q=(jt||"").trim()||"your-tenant-id",re=(le||se?.workspaceId||"").trim(),oe={TASKFORCE_TENANT_ID:Q,TASKFORCE_WORKSPACE_ID:re&&re!=="default"?re:"your-workspace-id",...En(te)},he=ze?{command:"taskforce",args:["mcp",i||"."],env:oe}:{command:T?"npx":"node",args:T?["-y","tsx",t,i]:[t,i],env:oe};return!ze&&!he.args[he.args.length-1]&&(he.args[he.args.length-1]=".../path/to/project/root"),{serverId:J,serverConfig:he}},Ce=l.useMemo(()=>sn(),[pe,Se,rs,cs,Pe,jt,le,se?.workspaceId,te,ze]),ie=l.useMemo(()=>Un({clientId:te,serverId:Ce.serverId,serverConfig:Ce.serverConfig}),[Ce,te]),aa=ie.kind==="json"?ie.serverConfig??null:null,tn=l.useMemo(()=>{if(ie.kind==="text")return ie.renderedText||"";let t={[ie.rootKey||"mcpServers"]:{[Ce.serverId]:ie.serverConfig}};for(const i of[...ie.wrapperKeys||[]].reverse())t={[i]:t};return JSON.stringify(t,null,2)},[ie,Ce.serverId]),an=(t="full")=>{if(!pe&&!ze)return;const i=t==="full"?tn:`"${Ce.serverId}": ${JSON.stringify(Ce.serverConfig,null,2)}`;Ts(i,t)},na=async()=>{if(We){Gt(!0),tt(null);try{const t=await Be("/api/taskforce/settings/mcp/tokens",{method:"GET",credentials:"include"}),i=await t.json().catch(()=>({}));if(!t.ok){tt(String(i?.error||"Failed to load MCP tokens."));return}ys(Array.isArray(i?.items)?i.items:[])}catch{tt("Failed to load MCP tokens.")}finally{Gt(!1)}}},pt=async()=>{if(We){qt(!0),Fe(null);try{const t=await Be("/api/taskforce/settings/mcp/connectors",{method:"GET",credentials:"include"}),i=await t.json().catch(()=>({}));if(!t.ok){Fe(String(i?.error||"Failed to load MCP connectors."));return}Vt(Array.isArray(i?.items)?i.items:[])}catch{Fe("Failed to load MCP connectors.")}finally{qt(!1)}}},nn=async()=>{const t=Ft.trim();if(!t){ts({type:"error",message:"Token name is required."});return}bs("create"),ts(null),ve(null);try{const i=await Be("/api/taskforce/settings/mcp/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,scopes:fa,expiresAt:nt?new Date(`${nt}T00:00:00`).toISOString():null})}),p=await i.json().catch(()=>({}));if(!i.ok){ts({type:"error",message:String(p?.error||"Failed to create token.")});return}ot(String(p?.token||"")),ve(null),at(vs),Ht(""),ys(T=>p?.record?[p.record,...T.filter(J=>J.id!==p.record.id)]:T)}catch{ts({type:"error",message:"Failed to create token."})}finally{bs(null)}},ut=async(t,i)=>{if(!(i==="delete"&&!window.confirm("Delete this token record? This does not affect active tokens."))){bs(`${i}:${t}`),$e(null);try{const p=i==="delete"?`/api/taskforce/settings/mcp/tokens/${encodeURIComponent(t)}`:`/api/taskforce/settings/mcp/tokens/${encodeURIComponent(t)}/${i}`,T=await Be(p,{method:i==="delete"?"DELETE":"POST",credentials:"include"}),k=await T.json().catch(()=>({}));if(!T.ok){$e({type:"error",message:String(k?.error||`Failed to ${i} token.`)});return}if(i==="regenerate"?(ot(String(k?.token||"")),ve(null),$e({type:"success",message:"Token regenerated. Copy the new value from the Full Token field."})):$e(i==="delete"?{type:"success",message:"Token deleted."}:{type:"success",message:"Token revoked."}),i==="delete"){ys(Q=>Q.filter(re=>re.id!==t));return}const J=k?.record||null;J?.id?ys(Q=>Q.map(re=>re.id===J.id?J:re)):await na()}catch{$e({type:"error",message:`Failed to ${i} token.`})}finally{bs(null)}}},on=async()=>{const t=Ie;if(!t){ve({type:"error",message:"Generate or paste a full token before testing the MCP connection."});return}Kt(!0),ve(null);try{const i=await Be("/api/taskforce/settings/mcp/test-connection",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,requiredScopes:fa})}),p=await i.json().catch(()=>({}));if(!i.ok){const k=p?.details&&typeof p.details=="object"?p.details:{},J=Array.isArray(k?.missingScopes)?k.missingScopes.map(he=>String(he)):[],Q=typeof k?.tokenWorkspaceId=="string"?String(k.tokenWorkspaceId):void 0,re=typeof k?.endpoint=="string"?String(k.endpoint):He;let fe=p?.code==="MCP_TOKEN_MISSING_SCOPES"&&J.length>0?`Token is missing required scopes: ${J.join(", ")}.`:String(p?.error||"Failed to test MCP connection."),oe;p?.code==="MCP_ENDPOINT_GATEWAY_ERROR"?(fe="The dedicated MCP host is responding with a gateway error.",oe="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."):p?.code==="MCP_ENDPOINT_TIMEOUT"?(fe="The dedicated MCP host timed out during MCP initialization.",oe="This usually points to a degraded or overloaded cloud MCP service."):p?.code==="MCP_ENDPOINT_UNREACHABLE"?(fe="The dedicated MCP host could not be reached.",oe="Check the cloud MCP hostname and environment health before rotating credentials."):p?.code==="MCP_ENDPOINT_REJECTED_VALIDATED_TOKEN"&&(fe="The dedicated MCP host rejected a token that validated locally.",oe="This suggests the MCP host is stale, routed incorrectly, or out of sync with auth data."),ve({type:"error",message:fe,workspaceName:Q,endpoint:re,errorCode:typeof p?.code=="string"?String(p.code):void 0,followup:oe});return}const T=p?.result&&typeof p.result=="object"?p.result:{};ve({type:"success",message:"Connection looks good for this workspace.",scopes:Array.isArray(T?.scopes)?T.scopes.map(k=>String(k)):[],workspaceName:typeof T?.workspaceName=="string"?String(T.workspaceName):"",workspaceId:typeof T?.workspaceId=="string"?String(T.workspaceId):"",endpoint:typeof T?.endpoint=="string"?String(T.endpoint):He})}catch{ve({type:"error",message:"Failed to test MCP connection.",endpoint:He,followup:"The settings page could not complete the connection probe. Check your network connection and the selected cloud environment."})}finally{Kt(!1)}},ln=async t=>{Xt(t),Fe(null);try{const i=await Be(`/api/taskforce/settings/mcp/connectors/${encodeURIComponent(t)}/disconnect`,{method:"POST",credentials:"include"}),p=await i.json().catch(()=>({}));if(!i.ok){Fe(String(p?.error||"Failed to disconnect connector."));return}const T=p?.record||null;T?.id?Vt(k=>k.map(J=>J.id===T.id?T:J)):await pt()}catch{Fe("Failed to disconnect connector.")}finally{Xt(null)}};l.useEffect(()=>{if(We){if(D==="mcp"&&js){na(),pt();return}D==="integrations"&&pt()}},[D,js,We]),l.useEffect(()=>{D==="initiatives"&&Ee.length===0&&Us?.()},[D,Ee.length,Us]);const rn=o.availableEnvironments||[],cn=t=>{switch(t){case"Bot":return e.jsx(ma,{size:16});case"Terminal":return e.jsx(_n,{size:16});case"Sparkles":return e.jsx(bt,{size:16});case"Command":return e.jsx(In,{size:16});case"Wind":return e.jsx(wa,{size:16});case"Github":return e.jsx($n,{size:16});case"Zap":return e.jsx(ws,{size:16});case"Box":return e.jsx(_s,{size:16});default:return e.jsx(Sn,{size:16})}};l.useEffect(()=>{c&&(c==="categories"||c==="types"?ne("taxonomy"):c==="documents"?ne("general"):c==="appearance-application"?(es(!0),ne("appearanceApplication")):c==="appearance-task-cards"?(es(!0),ne("appearanceTaskCards")):c==="appearance-task-forms"?(es(!0),ne("appearanceTaskForms")):ne(c==="resources"||c==="commands"?"commands":c==="initiatives"?"initiatives":c==="agents"?"agents":c==="mcp"?b?"mcp":"general":c==="integrations"?"integrations":c))},[c,b]),l.useEffect(()=>{(D==="appearanceApplication"||D==="appearanceTaskCards"||D==="appearanceTaskForms")&&es(!0)},[D]);const dn=t=>{Bs({type:"category",value:t}),Ms(""),As(!0)},ia=[{key:"general",label:"General",icon:e.jsx(wn,{size:14}),section:"general"},{key:"taxonomy",label:"Taxonomy",icon:e.jsx(Ta,{size:14}),section:"taxonomy"},{key:"integrations",label:"Integrations",icon:e.jsx(ha,{size:14}),section:"integrations"}],pn=[{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"}],mt=(t,i)=>{ne(t),h?.(i)},un=()=>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:ca.map(t=>Bt(t,N,Va))})]}),mn=()=>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:ca.map(t=>Bt(t,w,async i=>{const p=await _(i);V({type:p?"success":"error",message:p?"Global theme saved.":"Failed to save global theme."})}))})]}),hn=()=>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(!K)return;const i=await K(t.target.checked);V({type:i?"success":"error",message:i?"Checklist dropdown setting saved.":"Failed to save checklist dropdown setting."})},disabled:!K}),e.jsx("span",{children:"Enable checklist dropdown in task form"})]})]});return e.jsx("div",{className:`${s.settingsTab} ${b?s.settingsTabMcpOnly:""}`.trim(),children:e.jsxs("div",{className:`${s.settingsLayout} ${b?s.settingsLayoutMcpOnly:""}`.trim(),children:[!b&&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:[ia.filter(t=>t.key==="general").map(t=>e.jsxs("button",{className:`${s.settingsSidebarBtn} ${D===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>mt(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} ${D==="appearanceApplication"||D==="appearanceTaskCards"||D==="appearanceTaskForms"?s.settingsSidebarBtnActive:""}`,onClick:()=>es(t=>!t),"aria-expanded":qs,"aria-controls":"settings-appearance-nav",children:[e.jsx(bt,{size:14}),e.jsx("span",{className:s.settingsSidebarGroupLabel,children:"Appearance"}),e.jsx("span",{className:s.settingsSidebarGroupChevron,children:qs?e.jsx(gt,{size:14}):e.jsx(Te,{size:14})})]}),qs&&e.jsx("div",{id:"settings-appearance-nav",className:s.settingsSidebarSubnav,children:pn.map(t=>e.jsx("button",{className:`${s.settingsSidebarSubBtn} ${D===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>mt(t.key,t.section),children:e.jsx("span",{children:t.label})},t.key))})]}),ia.filter(t=>t.key!=="general").map(t=>e.jsxs("button",{className:`${s.settingsSidebarBtn} ${D===t.key?s.settingsSidebarBtnActive:""}`,onClick:()=>mt(t.key,t.section),children:[t.icon,e.jsx("span",{children:t.label})]},t.key))]})]}),e.jsxs("div",{className:s.settingsContent,children:[Re&&e.jsxs("div",{className:`${s.settingsToast} ${Re.type==="success"?s.settingsToastSuccess:s.settingsToastError}`,children:[Re.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),e.jsx("span",{children:Re.message})]}),D==="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} ${ue==="project"?s.settingsTabBtnActive:""}`,onClick:()=>us("project"),children:"Project"}),e.jsx("button",{className:`${s.settingsTabBtn} ${ue==="global"?s.settingsTabBtnActive:""}`,onClick:()=>us("global"),children:"Global"})]}),ue==="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 i=await n();V({type:i?"success":"error",message:i?"Project settings reset to global.":"Failed to reset project settings."})},className:s.copyBtn,children:"Reset to Global"})})]}),ue==="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:[ps==="operations"?"Mission":"Project"," name:"]}),e.jsx("input",{className:s.input,type:"text",value:Tt,onChange:t=>wt(t.target.value),placeholder:ps==="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:St,onChange:t=>$t(t.target.value),placeholder:ps==="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(!Ws)return;const t=await Ws({workspaceId:se?.workspaceId,name:Tt,description:St});V({type:t.success?"success":"error",message:t.success?`${ps==="operations"?"Mission":"Project"} profile saved.`:t.error||"Failed to save workspace profile."})},className:s.copyBtn,disabled:!Ws,children:"Save"})})]}),ue==="project"&&e.jsx("div",{className:s.settingGroup,children:Nt&&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:z,onChange:async t=>{const i=await L(t.target.checked);V({type:i?"success":"error",message:i?"Project backup setting saved.":"Failed to save project backup setting."})}}),e.jsx("span",{children:"Enable automatic JSON backup (`.taskforce/tasks.json`)"})]})]})}),ue==="global"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.settingGroup,children:Nt&&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 i=await f(t.target.checked);V({type:i?"success":"error",message:i?"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 i=t.target.value,p=await G(i);V({type:p?"success":"error",message:p?`Week start saved (${i==="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:I,onChange:async t=>{const i=t.target.value;if(!u)return;const p=await u(i);V({type:p?"success":"error",message:p?`Language saved (${i}).`:"Failed to save language."})},style:{maxWidth:"220px"},disabled:!u,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(Tn,{size:16,className:s.inputIcon}),e.jsx("input",{type:"text",value:A,onChange:t=>d(t.target.value),placeholder:"e.g. Alt+T, Ctrl+Shift+K",className:`${s.input} ${s.shortcutInput}`})]}),e.jsx("button",{onClick:async()=>{const t=await Je();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"}),"."]})]})]}),ue==="project"&&Ae==="cloud"&&e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Danger Zone"}),Ma?kt?Da!=="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(!Fs)return;const t=String(le||"").trim();if(!t||t==="default"){V({type:"error",message:"A non-default workspace is required for deletion."});return}const i=String(Me||"").trim(),p=window.prompt(`Type "${i}" to permanently delete this workspace.`);if(p===null)return;if(p.trim()!==i){V({type:"error",message:"Workspace name confirmation did not match."});return}const T=await Fs(t);if(!T.success){V({type:"error",message:T.error||"Failed to delete workspace."});return}const k=Array.isArray(T.cleanupWarnings)?T.cleanupWarnings.length:0;V({type:k>0?"error":"success",message:k>0?`Workspace deleted with ${k} cleanup warning(s).`:"Workspace deleted."})},disabled:!Fs,children:[e.jsx(qe,{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."})]})]}),D==="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} ${ue==="project"?s.settingsTabBtnActive:""}`,onClick:()=>us("project"),children:"Project"}),e.jsx("button",{className:`${s.settingsTabBtn} ${ue==="global"?s.settingsTabBtnActive:""}`,onClick:()=>us("global"),children:"Global"})]})}),ue==="project"?un():mn()]}),D==="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:S,onChange:async t=>{if(!ee)return;const i=await ee(t.target.checked);V({type:i?"success":"error",message:i?"Task card status label setting saved.":"Failed to save task card status label setting."})},disabled:!ee}),e.jsx("span",{children:"Show status label"})]})]}),D==="appearanceTaskForms"&&hn(),D==="commands"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:s.settingGroup,children:[e.jsx("div",{className:s.settingTitleRow,children:e.jsx("h3",{className:s.settingTitle,children:"Command Workflows"})}),e.jsx("p",{className:`${s.settingsHint} ${s.marginBottom12}`,children:"Export standard workflows to your project to verify and commit them."}),e.jsxs("div",{className:`${s.exportRow} ${s.exportRowGrid}`,children:[e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h4",{className:`${s.settingSubtitle} ${s.settingSubtitleCustom}`,children:"Target Environment"}),e.jsx("div",{className:s.buttonGrid,children:rn.map(t=>e.jsxs("button",{onClick:()=>Ra(t.id),className:`${s.themeBtn} ${Ct===t.id?s.activeTheme:""} ${s.capitalize}`,children:[cn(t.icon),t.name]},t.id))})]}),e.jsxs("div",{className:s.exportItem,children:[e.jsxs("div",{className:s.labelGroupFlex,children:[e.jsx("label",{className:s.label,children:"Workflows"}),e.jsxs("span",{className:s.settingDescription,children:["Destination: ",e.jsx("code",{className:s.code,children:E})]})]}),e.jsxs("div",{className:s.workflowList,children:[e.jsxs("div",{className:s.workflowActions,children:[e.jsx("button",{onClick:Fa,className:s.textBtn,children:"All"}),e.jsx("button",{onClick:Ha,className:s.textBtn,children:"None"})]}),e.jsx("div",{className:s.workflowGrid,children:De.length===0?e.jsxs("div",{className:s.emptyState,children:["No workflow templates found.",e.jsx("button",{onClick:()=>Ga?.(!0),className:s.secondaryBtn,style:{marginTop:"8px"},children:"Retry Fetch"})]}):De.map(t=>e.jsxs("label",{className:s.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:Ze.includes(t),onChange:()=>Oa(t)}),t]},t))})]}),e.jsxs("button",{className:`${s.secondaryHeaderBtn} ${s.marginTop12}`,onClick:()=>za?.(Ct,Ze),disabled:C==="workflows"||Ze.length===0,children:[C==="workflows"?e.jsx(_e,{size:14,className:s.spinner}):e.jsx(Na,{size:14}),"Export Selected (",Ze.length,")"]})]})]}),M&&e.jsxs("div",{className:`${M.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[M.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),M.message]})]})}),D==="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:()=>{Us?.()},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:Qe,onChange:t=>{const i=t.target.value;It(i)},children:Ee.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:"e.g. Taskforce Public Beta Launch",value:Vs,onChange:t=>Ua(t.target.value)})]}),e.jsxs("button",{className:`${s.secondaryHeaderBtn} ${s.marginTop12}`,disabled:_t||!Qe||!Vs.trim()||!Ks,onClick:async()=>{if(!Ks)return;Lt(!0);const t=await Ks({templateId:Qe,title:Vs.trim()});Lt(!1),V({type:t.success?"success":"error",message:t.success?"Initiative created from template.":t.error||"Failed to create initiative."})},children:[_t?e.jsx(_e,{size:14,className:s.spinner}):e.jsx(ws,{size:14}),"Create Initiative"]})]}),D==="agents"&&e.jsx("div",{className:s.settingGroup,children:e.jsxs("div",{children:[e.jsx("h4",{className:s.settingSubTitle,children:"Registered AI Profiles"}),e.jsx("p",{className:`${s.settingsHint} ${s.marginBottom12}`,children:"AI agents register profiles when connecting via MCP. Merge duplicates created when a token was lost."}),Ys&&e.jsxs("div",{className:s.settingsHint,children:[e.jsx(_e,{size:13,className:s.spinner})," Loading profiles…"]}),!Ys&&Js.length===0&&e.jsx("div",{className:s.settingsHint,children:"No AI profiles registered yet."}),!Ys&&Js.length>0&&(()=>{const t=new Map;for(const i of Js){const p=i.name.toLowerCase();t.has(p)||t.set(p,[]),t.get(p).push(i)}return e.jsx("div",{className:s.aiProfilesList,children:Array.from(t.entries()).map(([,i])=>e.jsxs("div",{className:`${s.aiProfileGroup} ${i.length>1?s.aiProfileGroupDuplicate:""}`,children:[e.jsxs("div",{className:s.aiProfileGroupHeader,children:[e.jsx(ma,{size:13,style:{color:i[0].color}}),e.jsx("span",{className:s.aiProfileName,children:i[0].name}),i.length>1&&e.jsxs("span",{className:s.aiProfileDuplicateBadge,children:[e.jsx(ce,{size:11})," ",i.length," duplicates"]})]}),e.jsxs("div",{className:s.settingsHint,style:{marginTop:6},children:["@",i[0].username,i[0].role?` · ${i[0].role}`:""]}),i[0].description&&e.jsx("div",{className:s.settingsHint,style:{marginTop:4},children:i[0].description}),(i[0].provider||i[0].model)&&e.jsx("div",{className:s.settingsHint,style:{marginTop:4},children:[i[0].provider,i[0].model].filter(Boolean).join(" · ")}),i.length>1&&e.jsxs("div",{className:s.aiProfileMergeSection,children:[i.map(p=>e.jsxs("div",{className:s.aiProfileMergeRow,children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsx("span",{className:s.aiProfileIdChip,children:p.id}),e.jsxs("span",{className:s.settingsHint,children:["@",p.username]})]}),ke?.keepId!==p.id&&e.jsx("button",{className:s.secondaryHeaderBtn,title:"Keep this profile, merge others into it",onClick:()=>{const T=i.find(k=>k.id!==p.id)?.id;T&&Xs({keepId:p.id,mergeId:T})},children:"Keep this"}),ke?.keepId===p.id&&e.jsx("span",{className:s.aiProfileKeepBadge,children:"✓ keeping"})]},p.id)),ke&&i.some(p=>p.id===ke.keepId)&&e.jsxs("div",{className:s.aiProfileMergeActions,children:[e.jsxs("button",{className:s.dangerBtn,onClick:()=>Ka(ke.keepId,ke.mergeId),children:["Merge (keep ",ke.keepId.slice(-6),", delete ",ke.mergeId.slice(-6),")"]}),e.jsx("button",{className:s.secondaryHeaderBtn,onClick:()=>Xs(null),children:"Cancel"})]})]})]},i[0].id))})})(),ms&&e.jsxs("div",{className:`${ms.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[ms.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),ms.message]})]})}),D==="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(tl,{taxonomies:$a,onUpdateTaxonomies:Ia,onApplySystemTaxonomyPack:Aa,taxonomyDisplayLabels:is,onUpdateTaxonomyDisplayLabels:Ba,categories:Ds,pathValidation:Le,onUpdateCategory:os,onRemoveCategory:ls,onSaveCategory:Es,onAddPath:we,onRemovePath:v,onUpdateCategoryIcon:Y,onUpdateCategoryColor:Z,onBrowseFolders:dn,types:Ye,onSaveType:Xe,onRemoveType:Rs,onUpdateType:zs,priorities:_a,onUpdatePriorities:La,onAnalyzeSystemTaxonomyPack:Pa,manualComplexityEnabled:B,onManualComplexityEnabledChange:async t=>{const i=await F(t);V({type:i?"success":"error",message:i?"Project complexity setting saved.":"Failed to save project complexity setting."})},initialTab:c==="categories"||c==="types"||c==="priorities"?c:void 0})]}),D==="mcp"&&e.jsxs("div",{className:s.settingsGroup,children:[Ya&&e.jsxs("div",{className:s.settingsTabs,children:[e.jsx("button",{className:`${s.settingsTabBtn} ${xs==="local"?s.settingsTabBtnActive:""}`,onClick:()=>Qs("local"),children:"Local MCP"}),e.jsx("button",{className:`${s.settingsTabBtn} ${xs==="cloud"?s.settingsTabBtnActive:""}`,onClick:()=>Qs("cloud"),children:"Cloud MCP"})]}),js&&!We&&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."})]})}),en()]}),js&&We&&e.jsx(e.Fragment,{children:Zt?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.jsx("span",{className:s.settingDescription,children:te==="chatgpt-desktop"?"ChatGPT Desktop uses the Taskforce OAuth connector flow instead of a personal MCP token.":"Claude Desktop uses the Taskforce OAuth connector flow instead of a personal MCP token."})]}),e.jsx("div",{className:`${Ns?s.successMessage:s.settingHelper} ${s.marginTop12}`,children:Ns?e.jsxs(e.Fragment,{children:[e.jsx(ae,{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 ",Ns.lastUsedAt?new Date(Ns.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:()=>ne("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:te,onChange:t=>lt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:xt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${be==="full"?s.copyBtnActive:""}`,onClick:ta,title:"Copy full configuration file",children:be==="full"?e.jsx(ae,{size:14}):e.jsx(Ss,{size:14})})]})]}),e.jsx("pre",{className:s.codeBlock,children:e.jsx("code",{children:Cs?rt(Ue,Cs,q.rootKey||"mcpServers",q.wrapperKeys||[]):ct(q.renderedText||"")})})]}),me&&e.jsxs("div",{className:`${me.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[me.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),me.message]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:q.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:q.instructionText}),dt()]})]})]})]}):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:"Cursor on MacBook",value:Ft,onChange:t=>at(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:nt,onChange:t=>Ht(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:Wt||"",onChange:t=>{ot(t.target.value),ve(null)}})]}),e.jsxs("div",{className:s.mcpTokenActionRow,children:[e.jsxs("button",{className:s.copyBtn,onClick:()=>{on()},disabled:!Ie||Ut,title:"Test Token","aria-label":"Test Token",children:[Ut?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(ws,{size:14}),e.jsx("span",{children:"TEST TOKEN"})]}),e.jsxs("button",{className:`${s.copyBtn} ${be==="token"?s.copyBtnActive:""}`,onClick:()=>Ie&&Ts(Ie,"token"),disabled:!Ie,title:"Copy Token","aria-label":"Copy Token",children:[be==="token"?e.jsx(ae,{size:14}):e.jsx(Ss,{size:14}),e.jsx("span",{children:"COPY TOKEN"})]}),e.jsxs("button",{className:s.copyBtn,onClick:()=>{nn()},disabled:ss==="create",title:"Generate Token","aria-label":"Generate Token",children:[ss==="create"?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(ws,{size:14}),e.jsx("span",{children:"GENERATE TOKEN"})]})]}),Ge&&e.jsxs("div",{className:`${Ge.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[Ge.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),Ge.message]}),H&&e.jsxs("div",{className:`${H.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[H.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{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:te,onChange:t=>lt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:xt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${be==="full"?s.copyBtnActive:""}`,onClick:ta,title:"Copy full configuration file",children:be==="full"?e.jsx(ae,{size:14}):e.jsx(Ss,{size:14})})]})]}),e.jsx("pre",{className:s.codeBlock,children:e.jsx("code",{children:Cs?rt(Ue,Cs,q.rootKey||"mcpServers",q.wrapperKeys||[]):ct(q.renderedText||"")})})]}),me&&e.jsxs("div",{className:`${me.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[me.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),me.message]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:q.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:q.instructionText}),dt()]})]})]}),e.jsxs("div",{className:`${s.settingGroup} ${s.marginTop16}`,children:[e.jsxs("div",{className:s.toggleHeading,onClick:()=>zt(t=>!t),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),zt(i=>!i))},role:"button",tabIndex:0,title:et?"Hide workspace tokens":"Show workspace tokens",children:[e.jsx("label",{className:s.label,children:"Your Tokens"}),et?e.jsx(gt,{size:14}):e.jsx(Te,{size:14})]}),et&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${s.settingDescription} ${s.marginTop12}`,children:"Manage tokens created for this workspace."}),Oe&&e.jsxs("div",{className:`${Oe.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[Oe.type==="success"?e.jsx(ae,{size:14}):e.jsx(ce,{size:14}),Oe.message]}),qa?e.jsx("p",{className:s.settingHelper,children:"Loading tokens…"}):Ot?e.jsxs("div",{className:s.errorMessage,children:[e.jsx(ce,{size:14}),Ot]}):st.length===0?e.jsx("p",{className:s.settingHelper,children:"No MCP tokens yet."}):e.jsx("div",{className:s.settingGroup,children:Za.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:()=>{ut(t.id,"regenerate")},disabled:ss===`regenerate:${t.id}`,children:"Regenerate"}),t.status==="active"&&e.jsx("button",{className:s.copyBtn,onClick:()=>{ut(t.id,"revoke")},disabled:ss===`revoke:${t.id}`,children:"Revoke"}),t.status!=="active"&&e.jsx("button",{className:s.copyBtn,onClick:()=>{ut(t.id,"delete")},disabled:ss===`delete:${t.id}`,children:"Delete"})]})]},t.id))})]})]})]})}),Xa&&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."})]})}),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:te,onChange:t=>lt(t.target.value),"aria-label":"MCP client",style:{width:"auto",minWidth:"170px",padding:"6px 12px",fontSize:"12px",borderRadius:"8px"},children:xt.map(t=>e.jsx("option",{value:t.id,disabled:t.disabled,children:t.label},t.id))}),e.jsx("button",{className:`${s.copyBtn} ${be==="full"?s.copyBtnActive:""}`,onClick:()=>an("full"),title:"Copy full configuration file",children:be==="full"?e.jsx(ae,{size:14}):e.jsx(Ss,{size:14})})]})]}),e.jsx("pre",{className:s.codeBlock,children:e.jsx("code",{children:aa?rt(Ce.serverId,aa,ie.rootKey||"mcpServers",ie.wrapperKeys||[]):ct(ie.renderedText||"")})})]}),e.jsxs("div",{className:`${s.codeBlockWrapper} ${s.marginTop12}`,children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:ie.instructionLabel})}),e.jsxs("div",{style:{padding:"16px 20px"},children:[e.jsx("div",{className:s.settingDescription,children:ie.instructionText}),dt()]})]}),e.jsx("div",{className:`${s.settingGroup} ${s.marginTop12}`,children:e.jsxs("div",{className:s.toggleHeading,onClick:()=>Rt(t=>!t),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),Rt(i=>!i))},role:"button",tabIndex:0,title:"Show advanced MCP install options",children:[e.jsx("label",{className:s.label,children:"Advanced"}),Et?e.jsx(gt,{size:14}):e.jsx(Te,{size:14})]})}),Et&&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} ${ze?s.activeTheme:""}`,onClick:()=>Dt(!0),children:"Global"}),e.jsx("button",{className:`${s.themeBtn} ${ze?"":s.activeTheme}`,onClick:()=>Dt(!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)"}),cs&&!rs&&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:cs||"/Users/username/Projects/my-project or C:\\Projects\\my-project",value:rs||"",onChange:t=>Ea?.(t.target.value)})})]})]})]})]}),D==="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:ea},{key:"claude",label:"Claude Desktop Connector",description:"Use the dedicated MCP host in Claude Desktop Settings > Connectors. Taskforce handles OAuth and binds each connector authorization to one workspace.",emptyMessage:"No active Claude Desktop connector grant for this workspace yet.",connector:sa}].map(t=>{const i=t.connector;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} ${i?s.configBadgeActive:s.configBadgeRevoked}`,children:i?"connected":"not connected"})]}),e.jsx("span",{className:s.settingDescription,children:t.description}),e.jsx("span",{className:s.settingDescription,style:{fontFamily:'"JetBrains Mono", "Fira Code", monospace'},children:He}),i?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:s.settingDescription,children:["Authorized workspace: ",Me||i.workspaceId]}),e.jsxs("span",{className:s.settingDescription,children:["Granted scopes: ",i.scopes.join(", ")]}),e.jsxs("span",{className:s.settingDescription,children:["Connected ",new Date(i.createdAt).toLocaleString(),i.lastUsedAt?` · Last used ${new Date(i.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:i&&e.jsxs("button",{className:s.copyBtn,onClick:()=>{ln(i.id)},disabled:Yt===i.id,children:[Yt===i.id?e.jsx(_e,{size:14,className:s.spinIcon}):e.jsx(qe,{size:14}),"Disconnect"]})})]},t.key)}),Ja&&e.jsx("p",{className:`${s.settingHelper} ${s.marginTop12}`,children:"Loading connector grants…"}),Jt&&e.jsxs("div",{className:`${s.errorMessage} ${s.marginTop12}`,children:[e.jsx(ce,{size:14}),Jt]})]})]})]})]})})}export{ml as TaskSettings};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e}from"./vendor-react-CKJs5o3c.js";import{t as s}from"./index-B9k24Aym.js";import{h as R,R as ae,c as le,q as ie,b as ne,m as oe}from"./vendor-icons-CLnehDTw.js";import"./vendor-markdown-BUxTU7dS.js";import"./vendor-dnd-DRzYolkg.js";import"./vendor-router-BbWMxlnO.js";const re={do:["aliasesText","dispatchDefault","criticalToolsText","contentDefault"],execute:["aliasesText","dispatchDefault","criticalToolsText","contentDefault"]},V=["do","evaluate","collaborate","plan","review","execute"];function w(o){return{description:o.description||"",aliasesText:(o.dispatch?.aliases||[]).join(", "),dispatchDefault:o.dispatch?.default||"",criticalToolsText:(o.compat?.requiredToolsCritical||[]).join(`
|
|
2
|
-
`),optionalToolsText:(o.compat?.requiredToolsOptional||[]).join(`
|
|
3
|
-
`),contentDefault:o.content?.default||""}}function g(o){return o.split(/\n|,/).map(f=>f.trim()).filter(Boolean)}function ce(o){return Array.from(new Set(o.map(f=>f.trim()).filter(Boolean)))}function de(o){const{availableWorkflows:f,onFetchWorkflowTemplate:j,onFetchWorkflowOverrideNames:T,onSaveWorkflowTemplateDraft:b,onResetWorkflowTemplateDraft:v}=o,[c,D]=i.useState(""),[A,k]=i.useState(!1),[C,y]=i.useState(null),[d,m]=i.useState(null),[a,h]=i.useState(null),[r,u]=i.useState(null),[S,W]=i.useState(!1),[P,E]=i.useState(!1),[X,L]=i.useState([]),[H,_]=i.useState(""),[O,K]=i.useState(""),[F,U]=i.useState(""),B=i.useMemo(()=>{const t=V.filter(n=>f.includes(n)),l=f.filter(n=>!V.includes(n)).sort((n,x)=>n.localeCompare(x));return[...t,...l]},[f]);i.useEffect(()=>{!c&&B.length>0&&D(B[0])},[B,c]),i.useEffect(()=>{let t=!1;return(async()=>{if(!T)return;const n=await T();t||L(n)})(),()=>{t=!0}},[T,f]),i.useEffect(()=>{let t=!1;return(async()=>{if(!c||!j)return;k(!0),y(null);const n=await j(c);if(t)return;if(!n){m(null),h(null),y("Unable to load workflow template. Reload Taskforce, and if needed restart the dev/server process."),k(!1);return}const x=n;m(x),h(w(x)),k(!1)})(),()=>{t=!0}},[c,j]);const $=i.useMemo(()=>{if(!a)return[];const t=[];return a.description.trim()||t.push("Description is required."),a.dispatchDefault.trim()||t.push("Dispatch default is required."),g(a.criticalToolsText).length===0&&t.push("At least one critical tool is required."),a.contentDefault.trim()||t.push("Default content cannot be empty."),t},[a]),I=i.useMemo(()=>re[c]||[],[c]),p=t=>I.includes(t),M=i.useMemo(()=>{if(!d||!a)return[];const t=w(d),l=[];return t.description!==a.description&&l.push("description"),t.aliasesText!==a.aliasesText&&l.push("aliases"),t.dispatchDefault!==a.dispatchDefault&&l.push("dispatch.default"),t.criticalToolsText!==a.criticalToolsText&&l.push("compat.requiredToolsCritical"),t.optionalToolsText!==a.optionalToolsText&&l.push("compat.requiredToolsOptional"),t.contentDefault!==a.contentDefault&&l.push("content.default"),l},[d,a]),G=i.useMemo(()=>!d||!a?"":[`# ${d.name} Preview`,"",`Description: ${a.description}`,`Aliases: ${a.aliasesText||"(none)"}`,`Dispatch default: ${a.dispatchDefault||"(none)"}`,"","## Critical Tools",...g(a.criticalToolsText).map(t=>`- ${t}`),"","## Optional Tools",...g(a.optionalToolsText).map(t=>`- ${t}`),"","## Prompt Content Preview",a.contentDefault].join(`
|
|
4
|
-
`),[d,a]),N=i.useMemo(()=>d?w(d):null,[d]),Y=i.useMemo(()=>{if(!N||!a)return[];const t=[],l=(n,x,Q)=>{x!==Q&&t.push({field:n,before:x,after:Q})};return l("description",N.description,a.description),l("aliases",N.aliasesText,a.aliasesText),l("dispatch.default",N.dispatchDefault,a.dispatchDefault),l("compat.requiredToolsCritical",N.criticalToolsText,a.criticalToolsText),l("compat.requiredToolsOptional",N.optionalToolsText,a.optionalToolsText),l("content.default",N.contentDefault,a.contentDefault),t},[N,a]),Z=()=>{d&&h(w(d))},ee=async()=>{G&&await navigator.clipboard.writeText(G)},se=async()=>{if(!c||!a||$.length>0||!b)return;W(!0),u(null);const t=await b(c,a);if(!t.success){u({type:"error",message:t.error||"Failed to save workflow draft."}),W(!1);return}const l=j?await j(c):null;if(l&&(m(l),h(w(l))),u({type:"success",message:"Workflow draft saved and templates regenerated."}),T){const n=await T();L(n)}W(!1)},te=async()=>{if(!c||!v)return;E(!0),u(null);const t=await v(c);if(!t.success){u({type:"error",message:t.error||"Failed to reset workflow override."}),E(!1);return}const l=j?await j(c):null;if(l&&(m(l),h(w(l))),u({type:"success",message:"Workflow override reset and templates regenerated."}),T){const n=await T();L(n)}E(!1)},J=(t,l)=>{if(!a)return;const n=ce(l).join(`
|
|
5
|
-
`);h({...a,[t]:n})},q=(t,l)=>{const n=g(a?.[t]||"");J(t,n.filter(x=>x!==l))},z=(t,l,n)=>{if(!a||!l.trim())return;const x=g(a[t]||"");J(t,[...x,l]),n()};return e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h3",{className:s.settingTitle,children:"Workflow Editor"}),e.jsx("p",{className:s.settingsHint,children:"Inspect workflow structure, edit a draft, validate, preview, and save via the override layer. Critical fields are locked for `do` and `execute`."}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("label",{className:s.label,htmlFor:"workflow-editor-select",children:"Workflow"}),e.jsx("select",{id:"workflow-editor-select",className:s.input,value:c,onChange:t=>D(t.target.value),children:B.map(t=>e.jsx("option",{value:t,children:X.includes(t)?`${t} (override)`:t},t))})]}),A&&e.jsxs("div",{className:s.settingsHint,children:[e.jsx(R,{size:14,className:s.spinner})," Loading template..."]}),C&&e.jsx("div",{className:s.errorMessage,children:C}),a&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${s.exportRow} ${s.exportRowGrid}`,style:{marginTop:12},children:[e.jsxs("div",{className:s.exportItem,children:[e.jsx("label",{className:s.label,children:"Description"}),e.jsx("input",{className:s.input,value:a.description,onChange:t=>h({...a,description:t.target.value}),disabled:p("description")}),e.jsx("label",{className:s.label,children:"Aliases (comma-separated)"}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("input",{className:s.input,value:H,onChange:t=>_(t.target.value),placeholder:"Add alias (e.g. /execute)",disabled:p("aliasesText")}),e.jsx("button",{className:s.secondaryHeaderBtn,onClick:()=>z("aliasesText",H,()=>_("")),disabled:p("aliasesText")||!H.trim(),children:"Add"})]}),e.jsx("div",{className:s.workflowActions,children:g(a.aliasesText).map(t=>e.jsxs("button",{className:s.textBtn,onClick:()=>q("aliasesText",t),disabled:p("aliasesText"),children:[t," ×"]},t))}),e.jsx("label",{className:s.label,children:"Dispatch Default"}),e.jsx("input",{className:s.input,value:a.dispatchDefault,onChange:t=>h({...a,dispatchDefault:t.target.value}),disabled:p("dispatchDefault")})]}),e.jsxs("div",{className:s.exportItem,children:[e.jsx("label",{className:s.label,children:"Critical Tools (one per line)"}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("input",{className:s.input,value:O,onChange:t=>K(t.target.value),placeholder:"Add critical tool id",disabled:p("criticalToolsText")}),e.jsx("button",{className:s.secondaryHeaderBtn,onClick:()=>z("criticalToolsText",O,()=>K("")),disabled:p("criticalToolsText")||!O.trim(),children:"Add"})]}),e.jsx("div",{className:s.workflowActions,children:g(a.criticalToolsText).map(t=>e.jsxs("button",{className:s.textBtn,onClick:()=>q("criticalToolsText",t),disabled:p("criticalToolsText"),children:[t," ×"]},t))}),e.jsx("label",{className:s.label,children:"Optional Tools (one per line)"}),e.jsxs("div",{className:s.pathInputGroup,children:[e.jsx("input",{className:s.input,value:F,onChange:t=>U(t.target.value),placeholder:"Add optional tool id",disabled:p("optionalToolsText")}),e.jsx("button",{className:s.secondaryHeaderBtn,onClick:()=>z("optionalToolsText",F,()=>U("")),disabled:p("optionalToolsText")||!F.trim(),children:"Add"})]}),e.jsx("div",{className:s.workflowActions,children:g(a.optionalToolsText).map(t=>e.jsxs("button",{className:s.textBtn,onClick:()=>q("optionalToolsText",t),disabled:p("optionalToolsText"),children:[t," ×"]},t))})]})]}),e.jsx("label",{className:s.label,children:"Default Prompt Content"}),e.jsx("textarea",{className:s.input,rows:12,value:a.contentDefault,onChange:t=>h({...a,contentDefault:t.target.value}),disabled:p("contentDefault")}),e.jsxs("div",{className:s.pathInputGroup,style:{marginTop:12},children:[e.jsxs("button",{className:s.secondaryHeaderBtn,onClick:Z,children:[e.jsx(ae,{size:14}),"Reset Draft"]}),e.jsxs("button",{className:s.secondaryHeaderBtn,onClick:ee,children:[e.jsx(le,{size:14}),"Copy Preview"]}),e.jsxs("button",{className:s.secondaryHeaderBtn,onClick:se,disabled:S||$.length>0||M.length===0,children:[S?e.jsx(R,{size:14,className:s.spinner}):null,"Save Draft"]}),e.jsxs("button",{className:s.secondaryHeaderBtn,onClick:te,disabled:P,children:[P?e.jsx(R,{size:14,className:s.spinner}):null,"Rollback Override"]})]}),M.length>0&&e.jsxs("div",{className:s.settingsHint,children:["Changed fields: ",M.join(", ")]}),I.length>0&&e.jsxs("div",{className:s.settingsHint,children:["Locked fields for `",c,"`: ",I.join(", ")]}),$.length===0?e.jsx("div",{className:s.successMessage,children:"Draft validation: ready for review."}):e.jsx("div",{className:s.errorMessage,children:$.map(t=>e.jsx("div",{children:t},t))}),r&&e.jsx("div",{className:r.type==="success"?s.successMessage:s.errorMessage,children:r.message}),Y.length>0&&e.jsxs("div",{className:s.codeBlockWrapper,style:{marginTop:12},children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:"Field Diff (Before / After)"})}),Y.map(t=>e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("div",{className:s.settingsHint,children:e.jsx("strong",{children:t.field})}),e.jsxs("div",{className:`${s.exportRow} ${s.exportRowGrid}`,children:[e.jsxs("div",{className:s.exportItem,children:[e.jsx("div",{className:s.settingsHint,children:"Before"}),e.jsx("pre",{className:s.codeBlock,children:t.before||"(empty)"})]}),e.jsxs("div",{className:s.exportItem,children:[e.jsx("div",{className:s.settingsHint,children:"After"}),e.jsx("pre",{className:s.codeBlock,children:t.after||"(empty)"})]})]})]},t.field))]}),e.jsxs("div",{className:s.codeBlockWrapper,style:{marginTop:12},children:[e.jsx("div",{className:s.codeHeader,children:e.jsx("span",{className:s.codeLabel,children:"Workflow Preview"})}),e.jsx("pre",{className:s.codeBlock,children:G})]})]})]})}function je({availableWorkflows:o,availableEnvironments:f,exportEnvironment:j,exportWorkflowsPath:T,exportingResource:b,exportResult:v,onExportEnvironmentChange:c,onExportWorkflows:D,onRefreshWorkflows:A,onFetchWorkflowTemplate:k,onFetchWorkflowOverrideNames:C,onSaveWorkflowTemplateDraft:y,onResetWorkflowTemplateDraft:d}){const[m,a]=i.useState([]);i.useEffect(()=>{if(o.length>0&&m.length===0){a(o);return}a(r=>r.filter(u=>o.includes(u)))},[o,m.length]);const h=r=>{a(u=>u.includes(r)?u.filter(S=>S!==r):[...u,r])};return e.jsx("div",{className:`${s.standalonePage} ${s.standaloneContent}`,style:{overflow:"auto"},children:e.jsxs("div",{className:s.settingsContent,style:{maxWidth:1080,margin:"0 auto",width:"100%"},children:[e.jsxs("div",{className:s.settingGroup,children:[e.jsx("div",{className:s.settingTitleRow,children:e.jsx("h2",{className:s.settingTitle,children:"Workflows"})}),e.jsx("p",{className:`${s.settingsHint} ${s.marginBottom12}`,children:"Export standard workflows to your project and edit workflow templates in one place."}),e.jsxs("div",{className:`${s.exportRow} ${s.exportRowGrid}`,children:[e.jsxs("div",{className:s.settingGroup,children:[e.jsx("h4",{className:`${s.settingSubtitle} ${s.settingSubtitleCustom}`,children:"Target Environment"}),e.jsx("div",{className:s.buttonGrid,children:f.map(r=>e.jsx("button",{onClick:()=>c(r.id),className:`${s.themeBtn} ${j===r.id?s.activeTheme:""} ${s.capitalize}`,children:r.name},r.id))})]}),e.jsxs("div",{className:s.exportItem,children:[e.jsxs("div",{className:s.labelGroupFlex,children:[e.jsx("label",{className:s.label,children:"Workflow Export"}),e.jsxs("span",{className:s.settingDescription,children:["Destination: ",e.jsx("code",{className:s.code,children:T})]})]}),e.jsxs("div",{className:s.workflowList,children:[e.jsxs("div",{className:s.workflowActions,children:[e.jsx("button",{onClick:()=>a(o),className:s.textBtn,children:"All"}),e.jsx("button",{onClick:()=>a([]),className:s.textBtn,children:"None"})]}),e.jsx("div",{className:s.workflowGrid,children:o.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("p",{className:"tf-empty-copy",children:"No workflow templates found."}),e.jsx("button",{onClick:()=>A?.(!0),className:s.secondaryBtn,style:{marginTop:"8px"},children:"Retry Fetch"})]}):o.map(r=>e.jsxs("label",{className:s.checkboxLabel,children:[e.jsx("input",{type:"checkbox",checked:m.includes(r),onChange:()=>h(r)}),r]},r))})]}),e.jsxs("button",{className:`${s.secondaryHeaderBtn} ${s.marginTop12}`,onClick:()=>D(j,m),disabled:b==="workflows"||m.length===0,children:[b==="workflows"?e.jsx(R,{size:14,className:s.spinner}):e.jsx(ie,{size:14}),"Export Selected (",m.length,")"]})]})]}),v&&e.jsxs("div",{className:`${v.type==="success"?s.successMessage:s.errorMessage} ${s.marginTop12}`,children:[v.type==="success"?e.jsx(ne,{size:14}):e.jsx(oe,{size:14}),v.message]})]}),e.jsx(de,{availableWorkflows:o,onFetchWorkflowTemplate:k,onFetchWorkflowOverrideNames:C,onSaveWorkflowTemplateDraft:y,onResetWorkflowTemplateDraft:d})]})})}export{je as WorkflowsModule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as t}from"./index-B9k24Aym.js";const n="D-";function E(e){return t(n,e)}export{E as g};
|