@taskforcehq/taskforce 0.3.170 → 0.3.301
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/README.md +71 -21
- package/dist/Taskforce.module.css +3394 -5981
- package/dist/TaskforceCore.CategoryFallback.test.js +5 -2
- package/dist/TaskforceCore.filter-persistence.test.js +402 -0
- package/dist/TaskforceCore.js +388 -71
- package/dist/TaskforceCore.routing.test.js +311 -0
- package/dist/TaskforceCore.test.js +3344 -615
- package/dist/TaskforceWidget.js +3 -2
- package/dist/__tests__/localizationCatalogs.test.js +48 -31
- package/dist/__tests__/workflowSimulation.test.js +2 -2
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.d.ts +60 -0
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +324 -0
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.test.js +278 -0
- package/dist/annotatedAttachments/payload.d.ts +2 -0
- package/dist/annotatedAttachments/payload.js +54 -0
- package/dist/annotatedAttachments/payload.test.js +67 -0
- package/dist/annotatedAttachments/service.d.ts +49 -0
- package/dist/annotatedAttachments/service.js +121 -0
- package/dist/annotatedAttachments/types.d.ts +86 -0
- package/dist/cli.js +74 -25
- package/dist/compat/deploymentCompat.d.ts +12 -0
- package/dist/compat/deploymentCompat.js +43 -0
- package/dist/compat/workspaceSyncCompat.d.ts +6 -0
- package/dist/compat/workspaceSyncCompat.js +79 -0
- package/dist/compat/workspaceSyncCompat.test.js +87 -0
- package/dist/components/features/AgentsModule.d.ts +5 -0
- package/dist/components/features/AgentsModule.js +131 -0
- package/dist/components/features/AgentsModule.test.js +102 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.d.ts +24 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +1942 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.js +2831 -0
- package/dist/components/features/DocumentGenerateModal.js +8 -16
- package/dist/components/features/DocumentIndex.d.ts +3 -4
- package/dist/components/features/DocumentIndex.js +22 -10
- package/dist/components/features/DocumentViewer.d.ts +6 -2
- package/dist/components/features/DocumentViewer.js +1000 -18
- package/dist/components/features/DocumentWorkspace.d.ts +40 -2
- package/dist/components/features/DocumentWorkspace.js +96 -16
- package/dist/components/features/DocumentWorkspace.test.js +1202 -0
- package/dist/components/features/InitiativesModule.d.ts +22 -0
- package/dist/components/features/InitiativesModule.js +33 -0
- package/dist/components/features/TaskSettings.d.ts +41 -32
- package/dist/components/features/TaskSettings.js +798 -313
- package/dist/components/features/TaskSettings.test.js +1221 -47
- package/dist/components/features/WorkflowsModule.d.ts +27 -0
- package/dist/components/features/WorkflowsModule.js +21 -0
- package/dist/components/features/documentWorkspaceFilters.d.ts +10 -0
- package/dist/components/features/documentWorkspaceFilters.js +11 -0
- package/dist/components/features/settings/CategoryManager.d.ts +2 -0
- package/dist/components/features/settings/CategoryManager.js +15 -8
- package/dist/components/features/settings/PriorityManager.d.ts +18 -0
- package/dist/components/features/settings/PriorityManager.js +51 -0
- package/dist/components/features/settings/TaxonomyEditor.d.ts +2 -1
- package/dist/components/features/settings/TaxonomyEditor.js +41 -18
- package/dist/components/features/settings/TaxonomyLibraryManager.d.ts +26 -0
- package/dist/components/features/settings/TaxonomyLibraryManager.js +301 -0
- package/dist/components/features/settings/TaxonomyLibraryManager.test.js +141 -0
- package/dist/components/features/settings/TaxonomyManager.d.ts +35 -12
- package/dist/components/features/settings/TaxonomyManager.js +59 -27
- package/dist/components/features/settings/TypeManager.d.ts +11 -0
- package/dist/components/features/settings/TypeManager.js +48 -11
- package/dist/components/features/settings/{WorkflowEditorPrototype.d.ts → WorkflowEditor.d.ts} +2 -2
- package/dist/components/features/settings/{WorkflowEditorPrototype.js → WorkflowEditor.js} +3 -3
- package/dist/components/task/TaskActionHeader.d.ts +12 -2
- package/dist/components/task/TaskActionHeader.js +64 -8
- package/dist/components/task/TaskActionHeader.test.js +73 -0
- package/dist/components/task/TaskCard.d.ts +14 -16
- package/dist/components/task/TaskCard.js +144 -174
- package/dist/components/task/TaskCard.test.js +416 -64
- package/dist/components/task/TaskContextUpload.d.ts +6 -5
- package/dist/components/task/TaskContextUpload.js +199 -64
- package/dist/components/task/TaskContextUpload.test.js +331 -14
- package/dist/components/task/TaskForm.d.ts +23 -29
- package/dist/components/task/TaskForm.js +348 -169
- package/dist/components/task/TaskForm.test.js +419 -23
- package/dist/components/task/TaskKanban.d.ts +20 -21
- package/dist/components/task/TaskKanban.js +176 -316
- package/dist/components/task/TaskKanban.planning-drop.test.js +93 -0
- package/dist/components/task/TaskList.d.ts +22 -11
- package/dist/components/task/TaskList.js +98 -12
- package/dist/components/task/TaskList.test.js +206 -7
- package/dist/components/task/TaskReferenceBadge.d.ts +12 -0
- package/dist/components/task/TaskReferenceBadge.js +5 -0
- package/dist/components/task/TaskStatusActions.d.ts +12 -0
- package/dist/components/task/TaskStatusActions.js +18 -0
- package/dist/components/task/TaskStatusActions.test.js +45 -0
- package/dist/components/ui/ImageReferenceBadge.d.ts +12 -0
- package/dist/components/ui/ImageReferenceBadge.js +5 -0
- package/dist/components/ui/LevelSelector.d.ts +2 -1
- package/dist/components/ui/LevelSelector.js +2 -2
- package/dist/components/ui/Markdown.d.ts +1 -2
- package/dist/components/ui/Markdown.js +2 -13
- package/dist/components/ui/Modal.d.ts +3 -2
- package/dist/components/ui/Modal.js +4 -3
- package/dist/components/ui/MultiSelectFilter.d.ts +3 -1
- package/dist/components/ui/MultiSelectFilter.js +2 -2
- package/dist/components/ui/ReferenceBadgeButton.d.ts +13 -0
- package/dist/components/ui/ReferenceBadgeButton.js +6 -0
- package/dist/components/ui/TaxonomyDropdown.d.ts +7 -1
- package/dist/components/ui/TaxonomyDropdown.js +58 -23
- package/dist/components/ui/TopNoticeLayer.d.ts +7 -0
- package/dist/components/ui/TopNoticeLayer.js +14 -0
- package/dist/components/ui/TopNoticeLayer.test.js +25 -0
- package/dist/components/views/AppShellHeader.d.ts +13 -0
- package/dist/components/views/AppShellHeader.js +19 -0
- package/dist/components/views/AppShellHeader.test.js +21 -0
- package/dist/components/views/PlanComparisonPage.d.ts +73 -0
- package/dist/components/views/PlanComparisonPage.js +196 -0
- package/dist/components/views/PlanComparisonPage.test.js +251 -0
- package/dist/components/views/PlansPage.d.ts +14 -0
- package/dist/components/views/PlansPage.js +355 -0
- package/dist/components/views/StandaloneLayout.d.ts +2 -2
- package/dist/components/views/StandaloneLayout.js +2227 -1188
- package/dist/components/views/WidgetView.d.ts +2 -2
- package/dist/components/views/WidgetView.js +149 -43
- package/dist/components/views/chrome/WorkspaceChromeSections.d.ts +57 -0
- package/dist/components/views/chrome/WorkspaceChromeSections.js +38 -0
- package/dist/components/views/chrome/WorkspaceChromeSections.test.js +54 -0
- package/dist/components/views/chrome/workspaceChrome.d.ts +31 -0
- package/dist/components/views/chrome/workspaceChrome.js +108 -0
- package/dist/components/views/chrome/workspaceChrome.test.js +52 -0
- package/dist/components/views/panels/DocumentFilterToolbar.d.ts +10 -0
- package/dist/components/views/panels/DocumentFilterToolbar.js +7 -0
- package/dist/components/views/panels/DocumentFilterToolbar.test.js +19 -0
- package/dist/components/views/panels/FilterToolbar.d.ts +68 -0
- package/dist/components/views/panels/FilterToolbar.js +21 -0
- package/dist/components/views/panels/FilterToolbar.test.d.ts +1 -0
- package/dist/components/views/panels/FilterToolbar.test.js +45 -0
- package/dist/components/views/panels/FilterToolbarControls.d.ts +47 -0
- package/dist/components/views/panels/FilterToolbarControls.js +61 -0
- package/dist/components/views/panels/PlanningDrawer.d.ts +115 -0
- package/dist/components/views/panels/PlanningDrawer.js +220 -0
- package/dist/components/views/panels/ScheduleSidebar.d.ts +52 -0
- package/dist/components/views/panels/ScheduleSidebar.js +127 -0
- package/dist/components/views/panels/scheduleUtils.d.ts +14 -0
- package/dist/components/views/panels/scheduleUtils.js +79 -0
- package/dist/components/views/teamManagementAccess.d.ts +6 -0
- package/dist/components/views/teamManagementAccess.js +18 -0
- package/dist/components/views/teamManagementAccess.test.d.ts +1 -0
- package/dist/components/views/teamManagementAccess.test.js +44 -0
- package/dist/config/clientDeployment.d.ts +2 -0
- package/dist/config/clientDeployment.js +13 -0
- package/dist/config/cloudEnvironment.d.ts +15 -0
- package/dist/config/cloudEnvironment.js +60 -0
- package/dist/config/deployment.d.ts +20 -0
- package/dist/config/deployment.js +67 -0
- package/dist/config/deployment.test.d.ts +1 -0
- package/dist/config/deployment.test.js +88 -0
- package/dist/config/envSchema.js +36 -8
- package/dist/config/envSchema.test.js +28 -0
- package/dist/core/AiProfileService.d.ts +66 -0
- package/dist/core/AiProfileService.js +320 -0
- package/dist/core/AiProfileService.test.d.ts +1 -0
- package/dist/core/AiProfileService.test.js +164 -0
- package/dist/core/AiProfiles.test.d.ts +1 -0
- package/dist/core/AiProfiles.test.js +449 -0
- package/dist/core/AttachmentLinkService.d.ts +15 -0
- package/dist/core/AttachmentLinkService.js +157 -0
- package/dist/core/AuthTokenService.d.ts +44 -0
- package/dist/core/AuthTokenService.js +207 -0
- package/dist/core/CreatedBy.test.js +134 -6
- package/dist/core/DeletedTaskLifecycleService.d.ts +33 -0
- package/dist/core/DeletedTaskLifecycleService.js +158 -0
- package/dist/core/DeletedTaskTrash.test.d.ts +1 -0
- package/dist/core/DeletedTaskTrash.test.js +104 -0
- package/dist/core/EntitlementsPolicy.test.js +78 -5
- package/dist/core/GlobalSettingsService.d.ts +16 -0
- package/dist/core/GlobalSettingsService.js +370 -0
- package/dist/core/JsonBackupRuntime.test.d.ts +1 -0
- package/dist/core/JsonBackupRuntime.test.js +155 -0
- package/dist/core/McpTokenService.d.ts +118 -0
- package/dist/core/McpTokenService.js +921 -0
- package/dist/core/PlanEntitlementService.d.ts +201 -0
- package/dist/core/PlanEntitlementService.js +1442 -0
- package/dist/core/PlanVersionPolicy.test.d.ts +1 -0
- package/dist/core/PlanVersionPolicy.test.js +178 -0
- package/dist/core/PlanningEntities.test.d.ts +1 -0
- package/dist/core/PlanningEntities.test.js +95 -0
- package/dist/core/ScheduleFields.test.js +15 -19
- package/dist/core/SignupMonetizationSettings.test.d.ts +1 -0
- package/dist/core/SignupMonetizationSettings.test.js +159 -0
- package/dist/core/Stats.test.d.ts +1 -0
- package/dist/core/Stats.test.js +36 -0
- package/dist/core/SyncReconciliationService.d.ts +93 -0
- package/dist/core/SyncReconciliationService.js +406 -0
- package/dist/core/SystemAdmin.test.js +578 -13
- package/dist/core/TaskActivityService.d.ts +21 -0
- package/dist/core/TaskActivityService.js +130 -0
- package/dist/core/TaskAttachmentsCanonical.test.d.ts +1 -0
- package/dist/core/TaskAttachmentsCanonical.test.js +306 -0
- package/dist/core/TaskAuditTimeline.test.d.ts +1 -0
- package/dist/core/TaskAuditTimeline.test.js +132 -0
- package/dist/core/TaskTaxonomyValidation.test.js +338 -15
- package/dist/core/Taskforce.d.ts +930 -183
- package/dist/core/Taskforce.ids.test.js +252 -0
- package/dist/core/Taskforce.js +3848 -2532
- package/dist/core/Taskforce.mcpAuth.test.d.ts +1 -0
- package/dist/core/Taskforce.mcpAuth.test.js +343 -0
- package/dist/core/Taskforce.realtimeMutation.test.js +57 -2
- package/dist/core/TaxonomySettingsService.d.ts +18 -0
- package/dist/core/TaxonomySettingsService.js +162 -0
- package/dist/core/WorkspaceDelete.test.js +32 -13
- package/dist/core/WorkspaceLifecycleService.d.ts +11 -0
- package/dist/core/WorkspaceLifecycleService.js +88 -0
- package/dist/core/WorkspacePermissions.test.js +95 -0
- package/dist/core/WorkspacePlanMode.test.js +114 -1
- package/dist/core/WorkspacePreferenceService.d.ts +41 -0
- package/dist/core/WorkspacePreferenceService.js +246 -0
- package/dist/core/WorkspaceSyncSettings.test.d.ts +1 -0
- package/dist/core/WorkspaceSyncSettings.test.js +65 -0
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.d.ts +1 -0
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.js +212 -0
- package/dist/core/shared.d.ts +36 -0
- package/dist/core/shared.js +128 -0
- package/dist/core/types.d.ts +614 -0
- package/dist/core/types.js +27 -0
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +56 -0
- package/dist/documentReviews/DocumentReviewCommentStore.js +230 -0
- package/dist/documentReviews/DocumentReviewSessionStore.d.ts +52 -0
- package/dist/documentReviews/DocumentReviewSessionStore.js +193 -0
- package/dist/documentReviews/DocumentReviewSessionStore.test.d.ts +1 -0
- package/dist/documentReviews/DocumentReviewSessionStore.test.js +127 -0
- package/dist/documentReviews/service.d.ts +68 -0
- package/dist/documentReviews/service.js +210 -0
- package/dist/documentReviews/types.d.ts +58 -0
- package/dist/documentReviews/types.js +1 -0
- package/dist/hooks/auth/useAuthGuardPolicy.d.ts +2 -0
- package/dist/hooks/auth/useAuthGuardPolicy.js +1 -0
- package/dist/hooks/tasks/useCurrentTaskRelations.d.ts +15 -0
- package/dist/hooks/tasks/useCurrentTaskRelations.js +37 -0
- package/dist/hooks/tasks/useTaskActions.d.ts +3 -0
- package/dist/hooks/tasks/useTaskActions.js +2 -0
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +65 -0
- package/dist/hooks/tasks/useTaskEditorNavigation.js +235 -0
- package/dist/hooks/tasks/useTaskFilters.d.ts +2 -0
- package/dist/hooks/tasks/useTaskFilters.js +2 -0
- package/dist/hooks/tasks/useTaskFormActions.d.ts +58 -0
- package/dist/hooks/tasks/useTaskFormActions.js +365 -0
- package/dist/hooks/tasks/useTaskRelationships.d.ts +16 -0
- package/dist/hooks/tasks/useTaskRelationships.js +64 -0
- package/dist/hooks/ui/useResourceExport.d.ts +19 -0
- package/dist/hooks/ui/useResourceExport.js +84 -0
- package/dist/hooks/ui/useSettingsModel.d.ts +203 -0
- package/dist/hooks/ui/useSettingsModel.js +125 -0
- package/dist/hooks/ui/useSettingsPersistence.d.ts +36 -0
- package/dist/hooks/ui/useSettingsPersistence.js +254 -0
- package/dist/hooks/ui/useSettingsTaxonomyManagement.d.ts +119 -0
- package/dist/hooks/ui/useSettingsTaxonomyManagement.js +536 -0
- package/dist/hooks/ui/useUiNotice.d.ts +1 -0
- package/dist/hooks/ui/useUiNotice.js +1 -0
- package/dist/hooks/ui/useWorkflowTemplates.d.ts +37 -0
- package/dist/hooks/ui/useWorkflowTemplates.js +111 -0
- package/dist/hooks/ui/useZenMode.d.ts +5 -0
- package/dist/hooks/ui/useZenMode.js +32 -0
- package/dist/hooks/useFilterSort.d.ts +60 -0
- package/dist/hooks/useFilterSort.js +362 -0
- package/dist/hooks/useFilterSort.test.d.ts +1 -0
- package/dist/hooks/useFilterSort.test.js +333 -0
- package/dist/hooks/useRealtimeSync.d.ts +1 -0
- package/dist/hooks/useRealtimeSync.js +24 -9
- package/dist/hooks/useRealtimeSync.test.js +28 -1
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.d.ts +1 -0
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +34 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +65 -103
- package/dist/hooks/useSyncOrchestrator.js +1538 -670
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +700 -174
- package/dist/hooks/useTaskData.d.ts +35 -0
- package/dist/hooks/useTaskData.js +243 -0
- package/dist/hooks/useTaskData.test.d.ts +1 -0
- package/dist/hooks/useTaskData.test.js +180 -0
- package/dist/hooks/useTaskMutations.d.ts +46 -0
- package/dist/hooks/useTaskMutations.js +472 -0
- package/dist/hooks/useTaskMutations.test.d.ts +1 -0
- package/dist/hooks/useTaskMutations.test.js +80 -0
- package/dist/hooks/useTaskforce.contract.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.contract.test.js +7 -0
- package/dist/hooks/useTaskforce.d.ts +260 -295
- package/dist/hooks/useTaskforce.js +1954 -2623
- package/dist/hooks/useTaskforce.priority-filters.test.js +6 -11
- package/dist/hooks/useTaskforce.sync-behavior.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.sync-behavior.test.js +1120 -0
- package/dist/hooks/useUiNotice.d.ts +16 -0
- package/dist/hooks/useUiNotice.js +49 -0
- package/dist/hooks/useWorkspaceSyncController.d.ts +23 -46
- package/dist/hooks/useWorkspaceSyncController.js +280 -461
- package/dist/hooks/useWorkspaceSyncController.test.js +106 -199
- package/dist/hooks/workspace/useTaskforceApiRouting.d.ts +8 -0
- package/dist/hooks/workspace/useTaskforceApiRouting.js +91 -0
- package/dist/hooks/workspace/useTaskforceApiRouting.test.d.ts +1 -0
- package/dist/hooks/workspace/useTaskforceApiRouting.test.js +60 -0
- package/dist/hooks/workspace/useWorkspaceSyncController.d.ts +1 -0
- package/dist/hooks/workspace/useWorkspaceSyncController.js +1 -0
- package/dist/hooks/workspace/workspaceLocalState.d.ts +30 -0
- package/dist/hooks/workspace/workspaceLocalState.js +101 -0
- package/dist/localization/locales/en-US.d.ts +1 -8
- package/dist/localization/locales/en-US.js +4 -11
- package/dist/localization/locales/es-419.js +2 -9
- package/dist/localization/locales/pt-BR.js +2 -9
- package/dist/localization/localizationCatalogs.test.d.ts +1 -0
- package/dist/localization/localizationCatalogs.test.js +37 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +9 -15
- package/dist/mcp/clientIntegrations.d.ts +33 -0
- package/dist/mcp/clientIntegrations.js +199 -0
- package/dist/mcp/clientIntegrations.test.d.ts +1 -0
- package/dist/mcp/clientIntegrations.test.js +110 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/optionResolution.test.js +6 -2
- package/dist/mcp/runtime.d.ts +120 -0
- package/dist/mcp/runtime.js +5668 -0
- package/dist/mcp/runtime.test.d.ts +1 -0
- package/dist/mcp/runtime.test.js +3299 -0
- package/dist/mcp/server.js +2 -1793
- package/dist/mcp/structuredCommentValidation.test.d.ts +1 -0
- package/dist/{__tests__ → mcp}/structuredCommentValidation.test.js +1 -1
- package/dist/mcp/structuredDocValidation.js +1 -2
- package/dist/mcp/structuredDocValidation.test.d.ts +1 -0
- package/dist/{__tests__ → mcp}/structuredDocValidation.test.js +9 -4
- package/dist/mcp/toolRegistry.d.ts +570 -0
- package/dist/mcp/toolRegistry.js +90 -0
- package/dist/mcp/toolRegistry.test.d.ts +1 -0
- package/dist/mcp/toolRegistry.test.js +30 -0
- package/dist/migrations/billingSchemaParity.test.js +111 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +5 -0
- package/dist/migrations/taskSchemaMigrations.js +681 -39
- package/dist/migrations/taskSchemaMigrations.test.d.ts +1 -0
- package/dist/migrations/taskSchemaMigrations.test.js +210 -0
- package/dist/plugins/vite.js +13 -7
- package/dist/public/apple-touch-icon.png +0 -0
- package/dist/public/archive/phoenix/apple-touch-icon.png +0 -0
- package/dist/public/archive/phoenix/favicon.ico +0 -0
- package/dist/public/archive/phoenix/site.webmanifest +1 -0
- package/dist/public/favicon-96x96.png +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/favicon.svg +17 -0
- package/dist/public/site.webmanifest +21 -1
- package/dist/public/web-app-manifest-192x192.png +0 -0
- package/dist/public/web-app-manifest-512x512.png +0 -0
- package/dist/releaseVersion.test.d.ts +1 -0
- package/dist/{__tests__/releaseVersion.test.js → releaseVersion.test.js} +1 -1
- package/dist/resources/templates/WORKFLOW_V2_POLICY.md +1 -1
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +62 -52
- package/dist/resources/templates/workflows/collaborate.yaml +11 -5
- package/dist/resources/templates/workflows/do.yaml +8 -2
- package/dist/resources/templates/workflows/evaluate.yaml +13 -7
- package/dist/resources/templates/workflows/execute.yaml +40 -23
- package/dist/resources/templates/workflows/plan.yaml +15 -8
- package/dist/resources/templates/workflows/review.yaml +14 -8
- package/dist/runtime/appGateDefinitions.d.ts +32 -0
- package/dist/runtime/appGateDefinitions.js +32 -0
- package/dist/runtime/appGates.d.ts +29 -0
- package/dist/runtime/appGates.js +53 -0
- package/dist/runtime/appGates.test.d.ts +1 -0
- package/dist/runtime/appGates.test.js +42 -0
- package/dist/runtime/migrationFlags.d.ts +1 -0
- package/dist/runtime/migrationFlags.js +1 -0
- package/dist/server/annotatedAttachmentsRoutes.test.d.ts +1 -0
- package/dist/server/annotatedAttachmentsRoutes.test.js +473 -0
- package/dist/server/auth.js +14 -2
- package/dist/server/auth.test.js +21 -1
- package/dist/server/cors.js +11 -5
- package/dist/server/cors.test.js +6 -0
- package/dist/server/documentReviewRoutes.test.d.ts +1 -0
- package/dist/server/documentReviewRoutes.test.js +157 -0
- package/dist/server/index.cookieProxy.test.js +46 -1
- package/dist/server/index.d.ts +20 -0
- package/dist/server/index.js +168 -41
- package/dist/server/index.rateLimit.test.js +6 -0
- package/dist/server/index.test.js +133 -2
- package/dist/server/mockStripe.d.ts +72 -0
- package/dist/server/mockStripe.js +357 -0
- package/dist/server/realtimeSyncWs.js +4 -0
- package/dist/server/routes/admin.d.ts +114 -0
- package/dist/server/routes/admin.js +2226 -0
- package/dist/server/routes/annotatedAttachments.d.ts +24 -0
- package/dist/server/routes/annotatedAttachments.js +235 -0
- package/dist/server/routes/auth.d.ts +61 -0
- package/dist/server/routes/auth.js +1296 -0
- package/dist/server/{routes.billing.d.ts → routes/billing.d.ts} +3 -2
- package/dist/server/routes/billing.js +2001 -0
- package/dist/server/routes/billing.test.d.ts +1 -0
- package/dist/server/routes/billing.test.js +1631 -0
- package/dist/server/routes/documentReviews.d.ts +11 -0
- package/dist/server/routes/documentReviews.js +191 -0
- package/dist/server/routes/documents.d.ts +118 -0
- package/dist/server/routes/documents.js +1113 -0
- package/dist/server/routes/resources.d.ts +25 -0
- package/dist/server/routes/resources.js +225 -0
- package/dist/server/routes/shared.d.ts +35 -0
- package/dist/server/routes/shared.js +305 -0
- package/dist/server/routes/shared.test.d.ts +1 -0
- package/dist/server/routes/shared.test.js +32 -0
- package/dist/server/{routes.sync.d.ts → routes/sync.d.ts} +5 -5
- package/dist/server/routes/sync.integration.test.d.ts +1 -0
- package/dist/server/routes/sync.integration.test.js +2003 -0
- package/dist/server/routes/sync.js +3143 -0
- package/dist/server/routes/tasks.d.ts +72 -0
- package/dist/server/routes/tasks.js +1252 -0
- package/dist/server/routes/workspaces.d.ts +32 -0
- package/dist/server/routes/workspaces.js +307 -0
- package/dist/server/routes.d.ts +8 -9
- package/dist/server/routes.js +968 -4092
- package/dist/server/routes.test.js +9043 -2415
- package/dist/server/runtimeMode.d.ts +1 -1
- package/dist/server/runtimeMode.js +3 -18
- package/dist/server/runtimeMode.test.js +3 -3
- package/dist/server/securityHeaders.d.ts +1 -1
- package/dist/server/securityHeaders.js +65 -6
- package/dist/server/securityHeaders.test.js +40 -2
- package/dist/services/templateEngine.test.d.ts +1 -0
- package/dist/{__tests__ → services}/templateEngine.test.js +1 -1
- package/dist/services/templates.test.d.ts +1 -0
- package/dist/{__tests__ → services}/templates.test.js +1 -1
- package/dist/services/workflowDocumentFixtures.test.d.ts +1 -0
- package/dist/{__tests__ → services}/workflowDocumentFixtures.test.js +4 -4
- package/dist/services/workflowExportMatrix.test.d.ts +1 -0
- package/dist/{__tests__ → services}/workflowExportMatrix.test.js +1 -1
- package/dist/services/workflowExportSnapshots.test.d.ts +1 -0
- package/dist/services/workflowGeneration.test.d.ts +1 -0
- package/dist/services/workflowSimulation.test.d.ts +1 -0
- package/dist/services/workflowSimulation.test.js +113 -0
- package/dist/services/workflowV2Policy.test.d.ts +1 -0
- package/dist/{__tests__ → services}/workflowV2Policy.test.js +2 -2
- package/dist/shared/aiProfileSurfaceType.d.ts +9 -0
- package/dist/shared/aiProfileSurfaceType.js +49 -0
- package/dist/shared/customTaxonomyLibrary.d.ts +11 -0
- package/dist/shared/customTaxonomyLibrary.js +276 -0
- package/dist/shared/customTaxonomyLibrary.test.d.ts +1 -0
- package/dist/shared/customTaxonomyLibrary.test.js +20 -0
- package/dist/shared/taxonomyCatalog.d.ts +19 -0
- package/dist/shared/taxonomyCatalog.js +36 -0
- package/dist/shared/taxonomyDefaults.d.ts +29 -0
- package/dist/shared/taxonomyDefaults.js +26 -0
- package/dist/shared/taxonomyLibrary.d.ts +15 -0
- package/dist/shared/taxonomyLibrary.js +98 -0
- package/dist/shared/taxonomyLibrary.test.d.ts +1 -0
- package/dist/shared/taxonomyLibrary.test.js +26 -0
- package/dist/shared/taxonomyState.d.ts +36 -0
- package/dist/shared/taxonomyState.js +73 -0
- package/dist/shared/taxonomyState.test.d.ts +1 -0
- package/dist/shared/taxonomyState.test.js +71 -0
- package/dist/shared/workflowDefaults.d.ts +9 -0
- package/dist/shared/workflowDefaults.js +11 -0
- package/dist/storage/documentIntegrity.d.ts +2 -0
- package/dist/storage/documentIntegrity.js +34 -17
- package/dist/storage/documentPurge.d.ts +2 -1
- package/dist/storage/documentPurge.js +35 -8
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/objectStorage.d.ts +1 -1
- package/dist/storage/objectStorageClient.d.ts +6 -4
- package/dist/storage/objectStorageClient.js +77 -29
- package/dist/storage/objectStorageClient.test.d.ts +1 -0
- package/dist/storage/objectStorageClient.test.js +57 -0
- package/dist/storage/objectStorageConfig.js +3 -1
- package/dist/storage/objectStorageConfig.test.d.ts +1 -0
- package/dist/storage/objectStorageConfig.test.js +38 -0
- package/dist/storage/postgresAdapter.d.ts +5 -0
- package/dist/storage/postgresAdapter.js +2 -2
- package/dist/storage/postgresAdapter.test.d.ts +1 -0
- package/dist/storage/postgresAdapter.test.js +29 -0
- package/dist/storage/taskAssetStore.d.ts +7 -4
- package/dist/storage/taskAssetStore.js +65 -60
- package/dist/storage/workspaceAssetStore.d.ts +122 -0
- package/dist/storage/workspaceAssetStore.js +496 -0
- package/dist/storage/workspaceAssetStore.test.d.ts +1 -0
- package/dist/storage/workspaceAssetStore.test.js +501 -0
- package/dist/sync/cloudSyncApi.d.ts +33 -2
- package/dist/sync/cloudSyncApi.js +37 -15
- package/dist/sync/cloudSyncApi.test.js +60 -3
- package/dist/sync/index.d.ts +2 -0
- package/dist/sync/index.js +3 -0
- package/dist/sync/syncService.d.ts +25 -0
- package/dist/sync/syncService.js +184 -16
- package/dist/sync/syncService.test.js +289 -25
- package/dist/sync/workspaceRepair.d.ts +114 -0
- package/dist/sync/workspaceRepair.js +566 -0
- package/dist/sync/workspaceSyncModel.d.ts +230 -2
- package/dist/sync/workspaceSyncModel.js +456 -17
- package/dist/sync/workspaceSyncModel.test.js +642 -0
- package/dist/sync/workspaceSyncState.d.ts +12 -0
- package/dist/sync/workspaceSyncState.js +12 -0
- package/dist/sync/workspaceSyncSurface.d.ts +33 -0
- package/dist/sync/workspaceSyncSurface.js +74 -0
- package/dist/types.d.ts +143 -18
- package/dist/types.js +9 -24
- package/dist/ui/assets/AgentsModule-Bdq3T1Ts.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BaS2VwIr.css +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-jKUVo-PJ.js +3 -0
- package/dist/ui/assets/DocumentWorkspace-C_8T8oz-.css +1 -0
- package/dist/ui/assets/DocumentWorkspace-DuQa-uIC.js +250 -0
- package/dist/ui/assets/InitiativesModule-C8Pi2VTk.js +1 -0
- package/dist/ui/assets/PlansPage-B6BDECSi.js +1 -0
- package/dist/ui/assets/PlansPage-BlVC_lRq.css +1 -0
- package/dist/ui/assets/TaskSettings-BwB9NtmJ.css +1 -0
- package/dist/ui/assets/TaskSettings-DUJgRTPU.js +8 -0
- package/dist/ui/assets/WorkflowsModule-b6TLuHwJ.js +5 -0
- package/dist/ui/assets/index-BiiF1cLQ.css +1 -0
- package/dist/ui/assets/index-xBWLPOEb.js +6 -0
- package/dist/ui/assets/vendor-dnd-DRzYolkg.js +5 -0
- package/dist/ui/assets/{vendor-icons-ZFG3SGwo.js → vendor-icons-QZyhEwgT.js} +1 -1
- package/dist/ui/assets/{vendor-markdown-CKYkQHfj.js → vendor-markdown-BUxTU7dS.js} +1 -1
- package/dist/ui/assets/vendor-react-CKJs5o3c.js +61 -0
- package/dist/ui/assets/vendor-router-BbWMxlnO.js +3 -0
- package/dist/ui/branding/logos/logo.png +0 -0
- package/dist/ui/branding/logos/logo_dark.svg +27 -0
- package/dist/ui/branding/logos/logo_favicon.svg +35 -0
- package/dist/ui/branding/logos/logo_light.svg +27 -0
- package/dist/ui/favicon/apple-touch-icon.png +0 -0
- package/dist/ui/favicon/archive/phoenix/apple-touch-icon.png +0 -0
- package/dist/ui/favicon/archive/phoenix/favicon.ico +0 -0
- package/dist/ui/favicon/archive/phoenix/site.webmanifest +1 -0
- package/dist/ui/favicon/favicon-96x96.png +0 -0
- package/dist/ui/favicon/favicon.ico +0 -0
- package/dist/ui/favicon/favicon.svg +17 -0
- package/dist/ui/favicon/site.webmanifest +21 -1
- package/dist/ui/favicon/web-app-manifest-192x192.png +0 -0
- package/dist/ui/favicon/web-app-manifest-512x512.png +0 -0
- package/dist/ui/index.html +10 -7
- package/dist/ui/product/screen_01.png +0 -0
- package/dist/ui/product/screen_02.png +0 -0
- package/dist/ui/product/screen_03.png +0 -0
- package/dist/utils/annotatedAttachments.d.ts +20 -0
- package/dist/utils/annotatedAttachments.js +74 -0
- package/dist/utils/annotatedAttachments.test.d.ts +1 -0
- package/dist/utils/annotatedAttachments.test.js +108 -0
- package/dist/utils/assignees.d.ts +26 -0
- package/dist/utils/assignees.js +132 -0
- package/dist/utils/canonicalAssetKind.d.ts +16 -0
- package/dist/utils/canonicalAssetKind.js +39 -0
- package/dist/utils/canonicalAssetKind.test.d.ts +1 -0
- package/dist/utils/canonicalAssetKind.test.js +24 -0
- package/dist/utils/coalescedRefresh.d.ts +5 -0
- package/dist/utils/coalescedRefresh.js +16 -0
- package/dist/utils/coalescedRefresh.test.d.ts +1 -0
- package/dist/utils/coalescedRefresh.test.js +30 -0
- package/dist/utils/constants.d.ts +16 -3
- package/dist/utils/constants.icons.test.js +2 -1
- package/dist/utils/constants.js +70 -13
- package/dist/utils/contextAssetEvents.d.ts +7 -0
- package/dist/utils/contextAssetEvents.js +6 -0
- package/dist/utils/contextFiles.d.ts +14 -3
- package/dist/utils/contextFiles.js +40 -8
- package/dist/utils/documentManagerApi.d.ts +6 -0
- package/dist/utils/documentManagerApi.js +19 -0
- package/dist/utils/documentNames.d.ts +24 -0
- package/dist/utils/documentNames.js +91 -0
- package/dist/utils/documentReferences.d.ts +9 -0
- package/dist/utils/documentReferences.js +11 -0
- package/dist/utils/entityReferences.d.ts +9 -0
- package/dist/utils/entityReferences.js +32 -0
- package/dist/utils/imageReferences.d.ts +9 -0
- package/dist/utils/imageReferences.js +11 -0
- package/dist/utils/planParser.d.ts +2 -2
- package/dist/utils/planParser.js +11 -11
- package/dist/utils/planParser.test.d.ts +1 -0
- package/dist/{__tests__ → utils}/planParser.test.js +22 -22
- package/dist/utils/planningReferences.d.ts +17 -0
- package/dist/utils/planningReferences.js +30 -0
- package/dist/utils/planningReferences.test.d.ts +1 -0
- package/dist/utils/planningReferences.test.js +17 -0
- package/dist/utils/taskActivity.d.ts +9 -0
- package/dist/utils/taskActivity.js +147 -0
- package/dist/utils/taskActivity.test.d.ts +1 -0
- package/dist/utils/taskActivity.test.js +34 -0
- package/dist/utils/taskDraftDefaults.d.ts +21 -0
- package/dist/utils/taskDraftDefaults.js +40 -0
- package/dist/utils/taskDraftDefaults.test.d.ts +1 -0
- package/dist/utils/taskDraftDefaults.test.js +34 -0
- package/dist/utils/taskNormalization.d.ts +25 -0
- package/dist/utils/taskNormalization.js +161 -0
- package/dist/utils/taskNormalization.test.d.ts +1 -0
- package/dist/utils/taskNormalization.test.js +158 -0
- package/dist/utils/taskReferences.d.ts +5 -0
- package/dist/utils/taskReferences.js +11 -0
- package/dist/utils/taskforceApiClient.d.ts +2 -0
- package/dist/utils/taskforceApiClient.js +101 -3
- package/dist/utils/taskforceApiClient.test.d.ts +1 -0
- package/dist/utils/taskforceApiClient.test.js +44 -0
- package/dist/utils/taxonomyFilterOptions.d.ts +2 -0
- package/dist/utils/taxonomyFilterOptions.js +17 -0
- package/dist/utils/taxonomyFormDefaults.d.ts +3 -0
- package/dist/utils/taxonomyFormDefaults.js +28 -0
- package/dist/utils/taxonomyFormDefaults.test.d.ts +1 -0
- package/dist/utils/taxonomyFormDefaults.test.js +63 -0
- package/dist/utils/taxonomyLifecycle.d.ts +3 -0
- package/dist/utils/taxonomyLifecycle.js +17 -0
- package/dist/utils/taxonomySorting.d.ts +7 -0
- package/dist/utils/taxonomySorting.js +74 -0
- package/dist/utils/theme.d.ts +15 -0
- package/dist/utils/theme.js +23 -0
- package/dist/utils/uiNotice.d.ts +7 -0
- package/dist/utils/uiNotice.js +6 -0
- package/dist/utils/uiNotice.test.d.ts +1 -0
- package/dist/utils/uiNotice.test.js +18 -0
- package/dist/utils/workspaceIdentity.d.ts +14 -0
- package/dist/utils/workspaceIdentity.js +21 -0
- package/dist/utils/workspaceIdentity.test.js +30 -1
- package/dist/utils/workspaceSyncPresentation.d.ts +20 -0
- package/dist/utils/workspaceSyncPresentation.js +21 -0
- package/dist/utils/workspaceSyncPresentation.test.d.ts +1 -0
- package/dist/utils/workspaceSyncPresentation.test.js +36 -0
- package/package.json +30 -23
- package/scripts/bootstrap-playwright-auth.mjs +155 -0
- package/scripts/check-compat-boundaries.mjs +41 -0
- package/scripts/check-env.ts +9 -2
- package/scripts/debug-login.mjs +32 -0
- package/scripts/deploy-prod.sh +41 -0
- package/scripts/deploy-staging.sh +23 -0
- package/scripts/migrate-planning-model.ts +233 -0
- package/scripts/migrate-task-data-assets.mjs +408 -0
- package/scripts/playwright-auth.sh +11 -0
- package/scripts/run-dev-proxy.sh +2 -0
- package/scripts/update-homebrew-formula.sh +2 -2
- package/scripts/with-esbuild.sh +11 -0
- package/src/resources/templates/WORKFLOW_V2_POLICY.md +1 -1
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +62 -52
- package/src/resources/templates/workflows/collaborate.yaml +11 -5
- package/src/resources/templates/workflows/do.yaml +8 -2
- package/src/resources/templates/workflows/evaluate.yaml +13 -7
- package/src/resources/templates/workflows/execute.yaml +40 -23
- package/src/resources/templates/workflows/plan.yaml +15 -8
- package/src/resources/templates/workflows/review.yaml +14 -8
- package/dist/TaskforceScreenshot.d.ts +0 -11
- package/dist/TaskforceScreenshot.js +0 -113
- package/dist/compat/priorityCompat.d.ts +0 -2
- package/dist/compat/priorityCompat.js +0 -24
- package/dist/components/features/settings/TaxonomyManager 2.d.ts +0 -52
- package/dist/components/features/settings/TaxonomyManager 2.js +0 -75
- package/dist/components/task/TaskKanban 2.d.ts +0 -76
- package/dist/components/task/TaskKanban 2.js +0 -1004
- package/dist/components/task/TaskScreenshotSection.d.ts +0 -15
- package/dist/components/task/TaskScreenshotSection.js +0 -22
- package/dist/components/views/StandaloneLayout 2.d.ts +0 -8
- package/dist/components/views/StandaloneLayout 2.js +0 -1660
- package/dist/core/InitiativeTemplates.test.js +0 -50
- package/dist/core/ParentLifecycle.test.js +0 -98
- package/dist/migrations/clientMigrations.d.ts +0 -9
- package/dist/migrations/clientMigrations.js +0 -74
- package/dist/migrations/flags.d.ts +0 -6
- package/dist/migrations/flags.js +0 -8
- package/dist/migrations/taskMigrations.d.ts +0 -71
- package/dist/migrations/taskMigrations.js +0 -236
- package/dist/migrations/taskMigrations.test.js +0 -34
- package/dist/server/routes.billing.js +0 -991
- package/dist/server/routes.billing.test.js +0 -387
- package/dist/server/routes.sync.integration.test.js +0 -470
- package/dist/server/routes.sync.js +0 -1141
- package/dist/soak/syncSoakHarness.d.ts +0 -6
- package/dist/soak/syncSoakHarness.js +0 -10
- package/dist/ui/assets/index-0W5vyCpn.css +0 -1
- package/dist/ui/assets/index-MCZuNNfn.js +0 -23
- package/dist/ui/assets/logo_white_01-0Vx-iIIv.png +0 -0
- package/dist/ui/assets/vendor-dnd-BI1K77C1.js +0 -5
- package/dist/ui/assets/vendor-react-DdIDsh7f.js +0 -9
- package/dist/ui/assets/vendor-router-BtiNU7Dl.js +0 -3
- package/dist/utils/taskHierarchy.d.ts +0 -4
- package/dist/utils/taskHierarchy.js +0 -69
- package/dist/utils/taskHierarchy.test.js +0 -38
- package/dist/utils/taskParenting.d.ts +0 -3
- package/dist/utils/taskParenting.js +0 -24
- package/dist/utils/taskParenting.test.js +0 -21
- package/dist/utils/taskRelations.d.ts +0 -6
- package/dist/utils/taskRelations.js +0 -24
- package/dist/utils/taskRelations.test.js +0 -34
- package/scripts/check-compat-boundaries.js +0 -48
- /package/dist/{__tests__/planParser.test.d.ts → TaskforceCore.filter-persistence.test.d.ts} +0 -0
- /package/dist/{__tests__/releaseVersion.test.d.ts → TaskforceCore.routing.test.d.ts} +0 -0
- /package/dist/{__tests__/structuredCommentValidation.test.d.ts → annotatedAttachments/AnnotatedAttachmentSessionStore.test.d.ts} +0 -0
- /package/dist/{__tests__/structuredDocValidation.test.d.ts → annotatedAttachments/payload.test.d.ts} +0 -0
- /package/dist/{__tests__/templateEngine.test.d.ts → annotatedAttachments/types.js} +0 -0
- /package/dist/{__tests__/templates.test.d.ts → compat/workspaceSyncCompat.test.d.ts} +0 -0
- /package/dist/{__tests__/workflowDocumentFixtures.test.d.ts → components/features/AgentsModule.test.d.ts} +0 -0
- /package/dist/{__tests__/workflowExportMatrix.test.d.ts → components/features/AnnotatedAttachmentWorkspace.test.d.ts} +0 -0
- /package/dist/{__tests__/workflowExportSnapshots.test.d.ts → components/features/DocumentWorkspace.test.d.ts} +0 -0
- /package/dist/{__tests__/workflowGeneration.test.d.ts → components/features/settings/TaxonomyLibraryManager.test.d.ts} +0 -0
- /package/dist/{__tests__/workflowV2Policy.test.d.ts → components/task/TaskActionHeader.test.d.ts} +0 -0
- /package/dist/{core/InitiativeTemplates.test.d.ts → components/task/TaskKanban.planning-drop.test.d.ts} +0 -0
- /package/dist/{core/ParentLifecycle.test.d.ts → components/task/TaskStatusActions.test.d.ts} +0 -0
- /package/dist/{migrations/taskMigrations.test.d.ts → components/ui/TopNoticeLayer.test.d.ts} +0 -0
- /package/dist/{server/routes.billing.test.d.ts → components/views/AppShellHeader.test.d.ts} +0 -0
- /package/dist/{server/routes.sync.integration.test.d.ts → components/views/PlanComparisonPage.test.d.ts} +0 -0
- /package/dist/{utils/taskHierarchy.test.d.ts → components/views/chrome/WorkspaceChromeSections.test.d.ts} +0 -0
- /package/dist/{utils/taskParenting.test.d.ts → components/views/chrome/workspaceChrome.test.d.ts} +0 -0
- /package/dist/{utils/taskRelations.test.d.ts → components/views/panels/DocumentFilterToolbar.test.d.ts} +0 -0
- /package/dist/public/{android-chrome-192x192.png → archive/phoenix/android-chrome-192x192.png} +0 -0
- /package/dist/public/{android-chrome-512x512.png → archive/phoenix/android-chrome-512x512.png} +0 -0
- /package/dist/public/{favicon-16x16.png → archive/phoenix/favicon-16x16.png} +0 -0
- /package/dist/public/{favicon-32x32.png → archive/phoenix/favicon-32x32.png} +0 -0
- /package/dist/public/{favicon.png → archive/phoenix/favicon.png} +0 -0
- /package/dist/{__tests__ → services}/workflowExportSnapshots.test.js +0 -0
- /package/dist/{__tests__ → services}/workflowGeneration.test.js +0 -0
- /package/dist/ui/favicon/{android-chrome-192x192.png → archive/phoenix/android-chrome-192x192.png} +0 -0
- /package/dist/ui/favicon/{android-chrome-512x512.png → archive/phoenix/android-chrome-512x512.png} +0 -0
- /package/dist/ui/favicon/{favicon-16x16.png → archive/phoenix/favicon-16x16.png} +0 -0
- /package/dist/ui/favicon/{favicon-32x32.png → archive/phoenix/favicon-32x32.png} +0 -0
- /package/dist/ui/favicon/{favicon.png → archive/phoenix/favicon.png} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { isReservedWorkspaceId, normalizeWorkspaceStorageScope, normalizeWorkspaceStorageScopeLegacy } from '../../utils/workspaceIdentity';
|
|
2
|
+
const WORKSPACE_CONTEXT_KEY_PREFIX = 'taskforce.workspaceContext.v2';
|
|
3
|
+
const APP_UI_STATE_STORAGE_KEY_PREFIX = 'taskforce.uiState.app.v1';
|
|
4
|
+
const BOOTSTRAP_DEBUG_LOG_KEY = 'taskforce.bootstrapDebug.v1';
|
|
5
|
+
export function generateClientUuid() {
|
|
6
|
+
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
|
7
|
+
return crypto.randomUUID();
|
|
8
|
+
}
|
|
9
|
+
return `${Date.now().toString(16)}-${Math.random().toString(16).slice(2, 14)}`;
|
|
10
|
+
}
|
|
11
|
+
function isBootstrapDebugLoggingEnabled() {
|
|
12
|
+
if (typeof window === 'undefined')
|
|
13
|
+
return false;
|
|
14
|
+
try {
|
|
15
|
+
const raw = String(window.localStorage.getItem(BOOTSTRAP_DEBUG_LOG_KEY) || '').trim().toLowerCase();
|
|
16
|
+
return raw === '1' || raw === 'true' || raw === 'on' || raw === 'yes';
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function logBootstrapDebug(event, details) {
|
|
23
|
+
if (!isBootstrapDebugLoggingEnabled())
|
|
24
|
+
return;
|
|
25
|
+
const payload = details && typeof details === 'object' ? details : {};
|
|
26
|
+
console.info('[Taskforce Bootstrap]', event, payload);
|
|
27
|
+
}
|
|
28
|
+
function buildWorkspaceContextStorageKey(scopeRaw) {
|
|
29
|
+
const scope = normalizeWorkspaceStorageScope(scopeRaw);
|
|
30
|
+
return `${WORKSPACE_CONTEXT_KEY_PREFIX}.${scope}`;
|
|
31
|
+
}
|
|
32
|
+
function buildLegacyWorkspaceContextStorageKey(scopeRaw) {
|
|
33
|
+
const scope = normalizeWorkspaceStorageScopeLegacy(scopeRaw);
|
|
34
|
+
return `${WORKSPACE_CONTEXT_KEY_PREFIX}.${scope}`;
|
|
35
|
+
}
|
|
36
|
+
export function readPersistedWorkspaceId(scopeRaw) {
|
|
37
|
+
if (typeof window === 'undefined')
|
|
38
|
+
return '';
|
|
39
|
+
try {
|
|
40
|
+
const scopedKey = buildWorkspaceContextStorageKey(scopeRaw);
|
|
41
|
+
const scopedValue = String(window.localStorage.getItem(scopedKey) || '').trim();
|
|
42
|
+
if (scopedValue && scopedValue.length <= 120 && !/\s/.test(scopedValue))
|
|
43
|
+
return scopedValue;
|
|
44
|
+
const legacyScopedKey = buildLegacyWorkspaceContextStorageKey(scopeRaw);
|
|
45
|
+
const legacyScopedValue = String(window.localStorage.getItem(legacyScopedKey) || '').trim();
|
|
46
|
+
if (legacyScopedValue && legacyScopedValue.length <= 120 && !/\s/.test(legacyScopedValue)) {
|
|
47
|
+
window.localStorage.setItem(scopedKey, legacyScopedValue);
|
|
48
|
+
return legacyScopedValue;
|
|
49
|
+
}
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return '';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function writePersistedWorkspaceId(workspaceId, scopeRaw) {
|
|
57
|
+
if (typeof window === 'undefined')
|
|
58
|
+
return;
|
|
59
|
+
const next = String(workspaceId || '').trim();
|
|
60
|
+
try {
|
|
61
|
+
if (!next || isReservedWorkspaceId(next))
|
|
62
|
+
return;
|
|
63
|
+
const storageKey = buildWorkspaceContextStorageKey(scopeRaw);
|
|
64
|
+
const existing = String(window.localStorage.getItem(storageKey) || '').trim();
|
|
65
|
+
if (!next && existing && existing.toLowerCase() !== 'default') {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
window.localStorage.setItem(storageKey, next);
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// best-effort only
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function buildAppUiStateStorageKey(scopeRaw) {
|
|
75
|
+
const scope = normalizeWorkspaceStorageScopeLegacy(scopeRaw);
|
|
76
|
+
return `${APP_UI_STATE_STORAGE_KEY_PREFIX}.${scope}`;
|
|
77
|
+
}
|
|
78
|
+
export function readPersistedAppUiState(scopeRaw) {
|
|
79
|
+
if (typeof window === 'undefined')
|
|
80
|
+
return null;
|
|
81
|
+
try {
|
|
82
|
+
const raw = window.localStorage.getItem(buildAppUiStateStorageKey(scopeRaw));
|
|
83
|
+
if (!raw)
|
|
84
|
+
return null;
|
|
85
|
+
const parsed = JSON.parse(raw);
|
|
86
|
+
return parsed && typeof parsed === 'object' ? parsed : null;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export function writePersistedAppUiState(state, scopeRaw) {
|
|
93
|
+
if (typeof window === 'undefined')
|
|
94
|
+
return;
|
|
95
|
+
try {
|
|
96
|
+
window.localStorage.setItem(buildAppUiStateStorageKey(scopeRaw), JSON.stringify(state));
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// best-effort only
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -16,10 +16,7 @@ export interface MessageCatalog {
|
|
|
16
16
|
dueBeforeScheduled: string;
|
|
17
17
|
overdue: string;
|
|
18
18
|
};
|
|
19
|
-
schedule: {
|
|
20
|
-
completedOnlyPastSchedule: string;
|
|
21
|
-
noUnscheduledLeafTasks: string;
|
|
22
|
-
};
|
|
19
|
+
schedule: {};
|
|
23
20
|
taskList: {
|
|
24
21
|
searchPlaceholder: string;
|
|
25
22
|
clearSearchTitle: string;
|
|
@@ -49,10 +46,6 @@ export interface MessageCatalog {
|
|
|
49
46
|
addTaskToCategoryTitle: string;
|
|
50
47
|
};
|
|
51
48
|
actionHeader: {
|
|
52
|
-
blockedByActiveChildren: string;
|
|
53
|
-
confirmCascadeComplete: string;
|
|
54
|
-
confirmCascadeCancel: string;
|
|
55
|
-
confirmCascadeArchive: string;
|
|
56
49
|
saveChangesTitle: string;
|
|
57
50
|
update: string;
|
|
58
51
|
copyTaskIdTitle: string;
|
|
@@ -16,10 +16,7 @@ export const enUS = {
|
|
|
16
16
|
dueBeforeScheduled: 'Due date is before scheduled date.',
|
|
17
17
|
overdue: 'This task is overdue.'
|
|
18
18
|
},
|
|
19
|
-
schedule: {
|
|
20
|
-
completedOnlyPastSchedule: 'Only completed work can be scheduled in the past.',
|
|
21
|
-
noUnscheduledLeafTasks: 'No unscheduled leaf tasks found under "{parentTitle}".'
|
|
22
|
-
},
|
|
19
|
+
schedule: {},
|
|
23
20
|
taskList: {
|
|
24
21
|
searchPlaceholder: 'Search tasks...',
|
|
25
22
|
clearSearchTitle: 'Clear search',
|
|
@@ -43,16 +40,12 @@ export const enUS = {
|
|
|
43
40
|
linksParents: 'Parents',
|
|
44
41
|
linksLinked: 'Linked',
|
|
45
42
|
linksUnlinked: 'Unlinked',
|
|
46
|
-
includeArchive: '
|
|
43
|
+
includeArchive: 'Archived',
|
|
47
44
|
noMatchingTasks: 'No matching tasks',
|
|
48
45
|
noActiveTasks: 'No active tasks',
|
|
49
46
|
addTaskToCategoryTitle: 'Add task to {category}'
|
|
50
47
|
},
|
|
51
48
|
actionHeader: {
|
|
52
|
-
blockedByActiveChildren: 'Complete or cancel all direct child tasks first',
|
|
53
|
-
confirmCascadeComplete: 'This parent task has {count} active child task(s). Also mark all child tasks as complete?',
|
|
54
|
-
confirmCascadeCancel: 'This parent task has {count} active child task(s). Also mark all child tasks as cancelled?',
|
|
55
|
-
confirmCascadeArchive: 'This parent task has {count} child task(s). Also archive all child tasks?',
|
|
56
49
|
saveChangesTitle: 'Save Changes',
|
|
57
50
|
update: 'Update',
|
|
58
51
|
copyTaskIdTitle: 'Click to copy Task ID',
|
|
@@ -86,7 +79,7 @@ export const enUS = {
|
|
|
86
79
|
groupType: 'Type',
|
|
87
80
|
groupPriority: 'Priority',
|
|
88
81
|
groupComplexity: 'Complexity',
|
|
89
|
-
groupApproach: '
|
|
82
|
+
groupApproach: 'Workflow',
|
|
90
83
|
groupAssignee: 'Assignee',
|
|
91
84
|
groupStatus: 'Status',
|
|
92
85
|
groupHierarchy: 'Hierarchy',
|
|
@@ -115,7 +108,7 @@ export const enUS = {
|
|
|
115
108
|
linksLinked: 'Linked',
|
|
116
109
|
linksUnlinked: 'Unlinked',
|
|
117
110
|
includeArchiveTitle: 'Include archived tasks',
|
|
118
|
-
includeArchive: '
|
|
111
|
+
includeArchive: 'Archived',
|
|
119
112
|
clearFilters: 'Clear Filters',
|
|
120
113
|
noTasksMatchFilters: 'No tasks match current filters.',
|
|
121
114
|
showingWithLinksHint: 'Showing: {parentFilterLabel}. Switch Links to All or clear filters.',
|
|
@@ -16,10 +16,7 @@ export const es419 = {
|
|
|
16
16
|
dueBeforeScheduled: 'La fecha de vencimiento es anterior a la fecha programada.',
|
|
17
17
|
overdue: 'Esta tarea esta vencida.'
|
|
18
18
|
},
|
|
19
|
-
schedule: {
|
|
20
|
-
completedOnlyPastSchedule: 'Solo el trabajo completado se puede programar en el pasado.',
|
|
21
|
-
noUnscheduledLeafTasks: 'No se encontraron tareas hoja sin programar en "{parentTitle}".'
|
|
22
|
-
},
|
|
19
|
+
schedule: {},
|
|
23
20
|
taskList: {
|
|
24
21
|
searchPlaceholder: 'Buscar tareas...',
|
|
25
22
|
clearSearchTitle: 'Limpiar busqueda',
|
|
@@ -49,10 +46,6 @@ export const es419 = {
|
|
|
49
46
|
addTaskToCategoryTitle: 'Agregar tarea a {category}'
|
|
50
47
|
},
|
|
51
48
|
actionHeader: {
|
|
52
|
-
blockedByActiveChildren: 'Primero completa o cancela todas las tareas hijas directas',
|
|
53
|
-
confirmCascadeComplete: 'Esta tarea padre tiene {count} tarea(s) hija(s) activa(s). Tambien quieres marcar todas las tareas hijas como completadas?',
|
|
54
|
-
confirmCascadeCancel: 'Esta tarea padre tiene {count} tarea(s) hija(s) activa(s). Tambien quieres marcar todas las tareas hijas como canceladas?',
|
|
55
|
-
confirmCascadeArchive: 'Esta tarea padre tiene {count} tarea(s) hija(s). Tambien quieres archivar todas las tareas hijas?',
|
|
56
49
|
saveChangesTitle: 'Guardar cambios',
|
|
57
50
|
update: 'Actualizar',
|
|
58
51
|
copyTaskIdTitle: 'Haz clic para copiar el ID de la tarea',
|
|
@@ -86,7 +79,7 @@ export const es419 = {
|
|
|
86
79
|
groupType: 'Tipo',
|
|
87
80
|
groupPriority: 'Prioridad',
|
|
88
81
|
groupComplexity: 'Complejidad',
|
|
89
|
-
groupApproach: '
|
|
82
|
+
groupApproach: 'Flujo de trabajo',
|
|
90
83
|
groupAssignee: 'Asignado a',
|
|
91
84
|
groupStatus: 'Estado',
|
|
92
85
|
groupHierarchy: 'Jerarquia',
|
|
@@ -16,10 +16,7 @@ export const ptBR = {
|
|
|
16
16
|
dueBeforeScheduled: 'A data de vencimento e anterior a data agendada.',
|
|
17
17
|
overdue: 'Esta tarefa esta atrasada.'
|
|
18
18
|
},
|
|
19
|
-
schedule: {
|
|
20
|
-
completedOnlyPastSchedule: 'Somente trabalho concluido pode ser agendado no passado.',
|
|
21
|
-
noUnscheduledLeafTasks: 'Nenhuma tarefa folha nao agendada foi encontrada em "{parentTitle}".'
|
|
22
|
-
},
|
|
19
|
+
schedule: {},
|
|
23
20
|
taskList: {
|
|
24
21
|
searchPlaceholder: 'Buscar tarefas...',
|
|
25
22
|
clearSearchTitle: 'Limpar busca',
|
|
@@ -49,10 +46,6 @@ export const ptBR = {
|
|
|
49
46
|
addTaskToCategoryTitle: 'Adicionar tarefa a {category}'
|
|
50
47
|
},
|
|
51
48
|
actionHeader: {
|
|
52
|
-
blockedByActiveChildren: 'Conclua ou cancele todas as tarefas filhas diretas primeiro',
|
|
53
|
-
confirmCascadeComplete: 'Esta tarefa pai tem {count} tarefa(s) filha(s) ativa(s). Tambem deseja marcar todas as tarefas filhas como concluidas?',
|
|
54
|
-
confirmCascadeCancel: 'Esta tarefa pai tem {count} tarefa(s) filha(s) ativa(s). Tambem deseja marcar todas as tarefas filhas como canceladas?',
|
|
55
|
-
confirmCascadeArchive: 'Esta tarefa pai tem {count} tarefa(s) filha(s). Tambem deseja arquivar todas as tarefas filhas?',
|
|
56
49
|
saveChangesTitle: 'Salvar alteracoes',
|
|
57
50
|
update: 'Atualizar',
|
|
58
51
|
copyTaskIdTitle: 'Clique para copiar o ID da tarefa',
|
|
@@ -86,7 +79,7 @@ export const ptBR = {
|
|
|
86
79
|
groupType: 'Tipo',
|
|
87
80
|
groupPriority: 'Prioridade',
|
|
88
81
|
groupComplexity: 'Complexidade',
|
|
89
|
-
groupApproach: '
|
|
82
|
+
groupApproach: 'Fluxo de trabalho',
|
|
90
83
|
groupAssignee: 'Atribuido para',
|
|
91
84
|
groupStatus: 'Status',
|
|
92
85
|
groupHierarchy: 'Hierarquia',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { enUS } from './locales/en-US';
|
|
3
|
+
import { es419 } from './locales/es-419';
|
|
4
|
+
import { ptBR } from './locales/pt-BR';
|
|
5
|
+
function collectLeafKeys(input, prefix = '') {
|
|
6
|
+
if (!input || typeof input !== 'object')
|
|
7
|
+
return [];
|
|
8
|
+
return Object.entries(input).flatMap(([key, value]) => {
|
|
9
|
+
const nextPrefix = prefix ? `${prefix}.${key}` : key;
|
|
10
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
11
|
+
return collectLeafKeys(value, nextPrefix);
|
|
12
|
+
}
|
|
13
|
+
return [nextPrefix];
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
describe('Localization catalogs', () => {
|
|
17
|
+
it('keeps identical key coverage across locales', () => {
|
|
18
|
+
const enKeys = collectLeafKeys(enUS).sort();
|
|
19
|
+
const esKeys = collectLeafKeys(es419).sort();
|
|
20
|
+
const ptKeys = collectLeafKeys(ptBR).sort();
|
|
21
|
+
expect(esKeys).toEqual(enKeys);
|
|
22
|
+
expect(ptKeys).toEqual(enKeys);
|
|
23
|
+
});
|
|
24
|
+
it('avoids blank translations in non-default locales', () => {
|
|
25
|
+
const values = [es419, ptBR];
|
|
26
|
+
for (const catalog of values) {
|
|
27
|
+
for (const key of collectLeafKeys(catalog)) {
|
|
28
|
+
const segments = key.split('.');
|
|
29
|
+
let cursor = catalog;
|
|
30
|
+
for (const segment of segments)
|
|
31
|
+
cursor = cursor?.[segment];
|
|
32
|
+
expect(typeof cursor).toBe('string');
|
|
33
|
+
expect(String(cursor).trim().length).toBeGreaterThan(0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -3,31 +3,25 @@ import React from 'react';
|
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
|
4
4
|
import { BrowserRouter } from 'react-router-dom';
|
|
5
5
|
import './index.css';
|
|
6
|
+
import './styles/ui-primitives.css';
|
|
6
7
|
import { Taskforce } from './Taskforce';
|
|
7
8
|
import { TaskforceCore } from './TaskforceCore';
|
|
9
|
+
import { resolveClientDeploymentConfig } from './config/clientDeployment';
|
|
8
10
|
const isStandalone = import.meta.env.VITE_STANDALONE === 'true';
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
? import.meta.env.VITE_TASKFORCE_API_BASE_URL.trim()
|
|
14
|
-
: '';
|
|
15
|
-
const cloudAuthBaseUrl = typeof import.meta.env.VITE_TASKFORCE_CLOUD_AUTH_BASE_URL === 'string'
|
|
16
|
-
? import.meta.env.VITE_TASKFORCE_CLOUD_AUTH_BASE_URL.trim()
|
|
17
|
-
: '';
|
|
18
|
-
const resolvedApiBaseUrl = apiBaseUrl.length > 0 ? apiBaseUrl : (baseUrl.length > 0 ? baseUrl : undefined);
|
|
19
|
-
const resolvedCloudAuthBaseUrl = cloudAuthBaseUrl.length > 0 ? cloudAuthBaseUrl : resolvedApiBaseUrl;
|
|
11
|
+
const deployment = resolveClientDeploymentConfig(import.meta.env);
|
|
12
|
+
const resolvedApiBaseUrl = deployment.apiBaseUrl || undefined;
|
|
13
|
+
const resolvedCloudAuthBaseUrl = deployment.cloudAuthBaseUrl || resolvedApiBaseUrl;
|
|
14
|
+
const resolvedCloudMcpBaseUrl = deployment.cloudMcpBaseUrl || resolvedCloudAuthBaseUrl;
|
|
20
15
|
if (isStandalone) {
|
|
21
16
|
document.title = 'Taskforce';
|
|
22
17
|
}
|
|
23
18
|
ReactDOM.createRoot(document.getElementById('root')).render(_jsx(React.StrictMode, { children: _jsx(BrowserRouter, { children: isStandalone ? (_jsx(TaskforceCore, { mode: "standalone", config: {
|
|
24
19
|
categories: ['Feature', 'Bug', 'Research'],
|
|
25
|
-
theme: 'midnight'
|
|
26
|
-
apiBaseUrl: resolvedApiBaseUrl,
|
|
27
|
-
cloudAuthBaseUrl: resolvedCloudAuthBaseUrl
|
|
20
|
+
theme: 'midnight'
|
|
28
21
|
} })) : (_jsx(Taskforce, { config: {
|
|
29
22
|
categories: ['Feature', 'Bug', 'Research'],
|
|
30
23
|
theme: 'midnight',
|
|
31
24
|
apiBaseUrl: resolvedApiBaseUrl,
|
|
32
|
-
cloudAuthBaseUrl: resolvedCloudAuthBaseUrl
|
|
25
|
+
cloudAuthBaseUrl: resolvedCloudAuthBaseUrl,
|
|
26
|
+
cloudMcpBaseUrl: resolvedCloudMcpBaseUrl
|
|
33
27
|
} })) }) }));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type McpClientId = 'cursor' | 'cline' | 'vscode' | 'windsurf' | 'antigravity' | 'openclaw' | 'codex' | 'claude-code' | 'gemini-cli' | 'claude-desktop' | 'chatgpt-desktop';
|
|
2
|
+
export interface McpClientOption {
|
|
3
|
+
id: McpClientId;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface BuildCloudMcpClientConfigInput {
|
|
8
|
+
clientId: McpClientId;
|
|
9
|
+
endpoint: string;
|
|
10
|
+
tokenValue: string;
|
|
11
|
+
serverId: string;
|
|
12
|
+
aiProfileName?: string | null;
|
|
13
|
+
aiProfileToken?: string | null;
|
|
14
|
+
aiProfileDescription?: string | null;
|
|
15
|
+
aiProfileRole?: string | null;
|
|
16
|
+
aiProfileProvider?: string | null;
|
|
17
|
+
aiProfileModel?: string | null;
|
|
18
|
+
aiProfileSurfaceType?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface CloudMcpClientIntegration {
|
|
21
|
+
clientId: McpClientId;
|
|
22
|
+
kind: 'json' | 'text';
|
|
23
|
+
instructionLabel: string;
|
|
24
|
+
instructionText: string;
|
|
25
|
+
rootKey?: 'mcpServers' | 'servers';
|
|
26
|
+
wrapperKeys?: string[];
|
|
27
|
+
serverConfig?: unknown;
|
|
28
|
+
renderedText?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const MCP_CLIENT_OPTIONS: McpClientOption[];
|
|
31
|
+
export declare function sanitizeMcpId(value: string, fallback: string): string;
|
|
32
|
+
export declare function buildCloudMcpServerId(workspaceName?: string | null, projectName?: string | null): string;
|
|
33
|
+
export declare function buildCloudMcpClientIntegration(input: BuildCloudMcpClientConfigInput): CloudMcpClientIntegration;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export const MCP_CLIENT_OPTIONS = [
|
|
2
|
+
{ id: 'cursor', label: 'Cursor' },
|
|
3
|
+
{ id: 'cline', label: 'Cline' },
|
|
4
|
+
{ id: 'vscode', label: 'VS Code / Copilot' },
|
|
5
|
+
{ id: 'windsurf', label: 'Windsurf' },
|
|
6
|
+
{ id: 'antigravity', label: 'Antigravity' },
|
|
7
|
+
{ id: 'openclaw', label: 'OpenClaw' },
|
|
8
|
+
{ id: 'codex', label: 'Codex' },
|
|
9
|
+
{ id: 'claude-code', label: 'Claude Code CLI' },
|
|
10
|
+
{ id: 'gemini-cli', label: 'Gemini CLI' },
|
|
11
|
+
];
|
|
12
|
+
export function sanitizeMcpId(value, fallback) {
|
|
13
|
+
const normalized = String(value || '')
|
|
14
|
+
.toLowerCase()
|
|
15
|
+
.replace(/[^a-zA-Z0-9_-]+/g, '-')
|
|
16
|
+
.replace(/-+/g, '-')
|
|
17
|
+
.replace(/^[-_]+|[-_]+$/g, '');
|
|
18
|
+
return normalized || fallback.toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
export function buildCloudMcpServerId(workspaceName, projectName) {
|
|
21
|
+
const readableSource = sanitizeMcpId(workspaceName || projectName || 'workspace', 'workspace');
|
|
22
|
+
const readableName = readableSource.slice(0, 25) || 'workspace';
|
|
23
|
+
return sanitizeMcpId(`taskforce-${readableName}`, 'taskforce-workspace');
|
|
24
|
+
}
|
|
25
|
+
function buildConnectorDetails(clientId, endpoint) {
|
|
26
|
+
if (clientId === 'claude-desktop') {
|
|
27
|
+
return endpoint;
|
|
28
|
+
}
|
|
29
|
+
return endpoint;
|
|
30
|
+
}
|
|
31
|
+
function buildCloudMcpHeaders(input) {
|
|
32
|
+
const headers = {
|
|
33
|
+
Authorization: `Bearer ${input.tokenValue}`
|
|
34
|
+
};
|
|
35
|
+
const aiProfileName = String(input.aiProfileName || '').trim();
|
|
36
|
+
const aiProfileToken = String(input.aiProfileToken || '').trim();
|
|
37
|
+
const aiProfileDescription = String(input.aiProfileDescription || '').trim();
|
|
38
|
+
const aiProfileRole = String(input.aiProfileRole || '').trim();
|
|
39
|
+
const aiProfileProvider = String(input.aiProfileProvider || '').trim();
|
|
40
|
+
const aiProfileModel = String(input.aiProfileModel || '').trim();
|
|
41
|
+
const aiProfileSurfaceType = String(input.aiProfileSurfaceType || '').trim();
|
|
42
|
+
if (aiProfileName) {
|
|
43
|
+
headers['X-Taskforce-AI-Name'] = aiProfileName;
|
|
44
|
+
}
|
|
45
|
+
if (aiProfileToken) {
|
|
46
|
+
headers['X-Taskforce-AI-Profile-Token'] = aiProfileToken;
|
|
47
|
+
}
|
|
48
|
+
if (aiProfileDescription) {
|
|
49
|
+
headers['X-Taskforce-AI-Description'] = aiProfileDescription;
|
|
50
|
+
}
|
|
51
|
+
if (aiProfileRole) {
|
|
52
|
+
headers['X-Taskforce-AI-Role'] = aiProfileRole;
|
|
53
|
+
}
|
|
54
|
+
if (aiProfileProvider) {
|
|
55
|
+
headers['X-Taskforce-AI-Provider'] = aiProfileProvider;
|
|
56
|
+
}
|
|
57
|
+
if (aiProfileModel) {
|
|
58
|
+
headers['X-Taskforce-AI-Model'] = aiProfileModel;
|
|
59
|
+
}
|
|
60
|
+
if (aiProfileSurfaceType) {
|
|
61
|
+
headers['X-Taskforce-AI-Surface-Type'] = aiProfileSurfaceType;
|
|
62
|
+
}
|
|
63
|
+
return headers;
|
|
64
|
+
}
|
|
65
|
+
export function buildCloudMcpClientIntegration(input) {
|
|
66
|
+
const { clientId, endpoint, tokenValue, serverId } = input;
|
|
67
|
+
const headers = buildCloudMcpHeaders(input);
|
|
68
|
+
const authHeader = headers.Authorization;
|
|
69
|
+
const extraHeaderFlags = Object.entries(headers)
|
|
70
|
+
.filter(([key]) => key !== 'Authorization')
|
|
71
|
+
.map(([key, value]) => ` --header "${key}: ${value}"`)
|
|
72
|
+
.join('');
|
|
73
|
+
switch (clientId) {
|
|
74
|
+
case 'cursor':
|
|
75
|
+
return {
|
|
76
|
+
clientId,
|
|
77
|
+
kind: 'json',
|
|
78
|
+
rootKey: 'mcpServers',
|
|
79
|
+
serverConfig: {
|
|
80
|
+
url: endpoint,
|
|
81
|
+
headers
|
|
82
|
+
},
|
|
83
|
+
instructionLabel: 'Cursor Configuration Instructions',
|
|
84
|
+
instructionText: 'Open Cursor settings, find MCP servers, and paste this config. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
85
|
+
};
|
|
86
|
+
case 'cline':
|
|
87
|
+
return {
|
|
88
|
+
clientId,
|
|
89
|
+
kind: 'json',
|
|
90
|
+
rootKey: 'mcpServers',
|
|
91
|
+
serverConfig: {
|
|
92
|
+
url: endpoint,
|
|
93
|
+
type: 'streamableHttp',
|
|
94
|
+
headers
|
|
95
|
+
},
|
|
96
|
+
instructionLabel: 'Cline Configuration Instructions',
|
|
97
|
+
instructionText: 'Open Cline MCP Servers, add a remote server, or paste this into the Cline MCP config with Streamable HTTP selected. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
98
|
+
};
|
|
99
|
+
case 'vscode':
|
|
100
|
+
return {
|
|
101
|
+
clientId,
|
|
102
|
+
kind: 'json',
|
|
103
|
+
rootKey: 'servers',
|
|
104
|
+
serverConfig: {
|
|
105
|
+
type: 'http',
|
|
106
|
+
url: endpoint,
|
|
107
|
+
headers
|
|
108
|
+
},
|
|
109
|
+
instructionLabel: 'VS Code Configuration Instructions',
|
|
110
|
+
instructionText: 'Open .vscode/mcp.json or MCP: Open User Configuration and add this server under the servers object. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
111
|
+
};
|
|
112
|
+
case 'windsurf':
|
|
113
|
+
return {
|
|
114
|
+
clientId,
|
|
115
|
+
kind: 'json',
|
|
116
|
+
rootKey: 'mcpServers',
|
|
117
|
+
serverConfig: {
|
|
118
|
+
serverUrl: endpoint,
|
|
119
|
+
headers
|
|
120
|
+
},
|
|
121
|
+
instructionLabel: 'Windsurf Configuration Instructions',
|
|
122
|
+
instructionText: 'Open Windsurf MCP settings, add a server, and paste this config. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
123
|
+
};
|
|
124
|
+
case 'antigravity':
|
|
125
|
+
return {
|
|
126
|
+
clientId,
|
|
127
|
+
kind: 'json',
|
|
128
|
+
rootKey: 'mcpServers',
|
|
129
|
+
serverConfig: {
|
|
130
|
+
serverUrl: endpoint,
|
|
131
|
+
headers
|
|
132
|
+
},
|
|
133
|
+
instructionLabel: 'Antigravity Configuration Instructions',
|
|
134
|
+
instructionText: 'Open Antigravity MCP settings, view the raw config, and paste this Antigravity-specific configuration. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
135
|
+
};
|
|
136
|
+
case 'openclaw':
|
|
137
|
+
return {
|
|
138
|
+
clientId,
|
|
139
|
+
kind: 'json',
|
|
140
|
+
rootKey: 'servers',
|
|
141
|
+
wrapperKeys: ['mcp'],
|
|
142
|
+
serverConfig: {
|
|
143
|
+
transport: 'streamable-http',
|
|
144
|
+
url: endpoint,
|
|
145
|
+
headers
|
|
146
|
+
},
|
|
147
|
+
instructionLabel: 'OpenClaw Configuration Instructions',
|
|
148
|
+
instructionText: 'Open ~/.openclaw/openclaw.json and add this server under mcp.servers. For automated AI workers, include X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token in the headers to let Taskforce bind the same AI profile automatically.'
|
|
149
|
+
};
|
|
150
|
+
case 'codex':
|
|
151
|
+
return {
|
|
152
|
+
clientId,
|
|
153
|
+
kind: 'text',
|
|
154
|
+
renderedText: [
|
|
155
|
+
`[mcp_servers.${serverId}]`,
|
|
156
|
+
`url = "${endpoint}"`,
|
|
157
|
+
`http_headers = { ${Object.entries(headers).map(([key, value]) => `${key} = "${value}"`).join(', ')} }`
|
|
158
|
+
].join('\n'),
|
|
159
|
+
instructionLabel: 'Codex Configuration Instructions',
|
|
160
|
+
instructionText: 'Open ~/.codex/config.toml and add this Codex MCP entry. For automated AI workers, set X-Taskforce-AI-Name and later X-Taskforce-AI-Profile-Token here so Taskforce binds the same AI profile automatically.'
|
|
161
|
+
};
|
|
162
|
+
case 'claude-code':
|
|
163
|
+
return {
|
|
164
|
+
clientId,
|
|
165
|
+
kind: 'text',
|
|
166
|
+
renderedText: `claude mcp add --transport http ${serverId} ${endpoint} --header "Authorization: Bearer ${tokenValue}"${extraHeaderFlags}`,
|
|
167
|
+
instructionLabel: 'Claude Code Configuration Instructions',
|
|
168
|
+
instructionText: 'Run this Claude Code command in your terminal to add the remote Taskforce MCP server. For automated AI workers, keep the X-Taskforce-AI-Name header and later add X-Taskforce-AI-Profile-Token so Taskforce binds the same AI profile automatically.'
|
|
169
|
+
};
|
|
170
|
+
case 'gemini-cli':
|
|
171
|
+
return {
|
|
172
|
+
clientId,
|
|
173
|
+
kind: 'text',
|
|
174
|
+
renderedText: `gemini mcp add ${serverId} ${endpoint} --transport http --header "Authorization: Bearer ${tokenValue}"${extraHeaderFlags}`,
|
|
175
|
+
instructionLabel: 'Gemini CLI Configuration Instructions',
|
|
176
|
+
instructionText: '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. For automated AI workers, keep the X-Taskforce-AI-Name header and later add X-Taskforce-AI-Profile-Token so Taskforce binds the same AI profile automatically.'
|
|
177
|
+
};
|
|
178
|
+
case 'claude-desktop':
|
|
179
|
+
return {
|
|
180
|
+
clientId,
|
|
181
|
+
kind: 'text',
|
|
182
|
+
renderedText: buildConnectorDetails(clientId, endpoint),
|
|
183
|
+
instructionLabel: 'Claude Desktop Configuration Instructions',
|
|
184
|
+
instructionText: 'Open Claude Desktop Settings > Connectors, paste this MCP server URL, and complete the Taskforce OAuth flow to authorize one workspace.'
|
|
185
|
+
};
|
|
186
|
+
case 'chatgpt-desktop':
|
|
187
|
+
return {
|
|
188
|
+
clientId,
|
|
189
|
+
kind: 'text',
|
|
190
|
+
renderedText: endpoint,
|
|
191
|
+
instructionLabel: 'ChatGPT Desktop Configuration Instructions',
|
|
192
|
+
instructionText: 'Open ChatGPT Apps & Connectors / developer mode, paste this MCP server URL, and complete the Taskforce OAuth authorize flow when ChatGPT opens it.'
|
|
193
|
+
};
|
|
194
|
+
default: {
|
|
195
|
+
const exhaustiveCheck = clientId;
|
|
196
|
+
throw new Error(`Unsupported MCP client: ${exhaustiveCheck}`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|