@taskforcehq/taskforce 0.3.168
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 +241 -0
- package/dist/Taskforce.d.ts +3 -0
- package/dist/Taskforce.js +3 -0
- package/dist/Taskforce.module.css +7587 -0
- package/dist/TaskforceCore.CategoryFallback.test.d.ts +1 -0
- package/dist/TaskforceCore.CategoryFallback.test.js +98 -0
- package/dist/TaskforceCore.d.ts +12 -0
- package/dist/TaskforceCore.js +729 -0
- package/dist/TaskforceCore.test.d.ts +1 -0
- package/dist/TaskforceCore.test.js +2132 -0
- package/dist/TaskforceScreenshot.d.ts +11 -0
- package/dist/TaskforceScreenshot.js +113 -0
- package/dist/TaskforceWidget.d.ts +6 -0
- package/dist/TaskforceWidget.js +101 -0
- package/dist/TaskforceWidget.test.d.ts +1 -0
- package/dist/TaskforceWidget.test.js +92 -0
- package/dist/UnsavedChangesRelaxed.test.d.ts +1 -0
- package/dist/UnsavedChangesRelaxed.test.js +16 -0
- package/dist/__tests__/localizationCatalogs.test.d.ts +1 -0
- package/dist/__tests__/localizationCatalogs.test.js +37 -0
- package/dist/__tests__/planParser.test.d.ts +1 -0
- package/dist/__tests__/planParser.test.js +183 -0
- package/dist/__tests__/releaseVersion.test.d.ts +1 -0
- package/dist/__tests__/releaseVersion.test.js +32 -0
- package/dist/__tests__/structuredCommentValidation.test.d.ts +1 -0
- package/dist/__tests__/structuredCommentValidation.test.js +31 -0
- package/dist/__tests__/structuredDocValidation.test.d.ts +1 -0
- package/dist/__tests__/structuredDocValidation.test.js +30 -0
- package/dist/__tests__/templateEngine.test.d.ts +1 -0
- package/dist/__tests__/templateEngine.test.js +150 -0
- package/dist/__tests__/templates.test.d.ts +1 -0
- package/dist/__tests__/templates.test.js +45 -0
- package/dist/__tests__/workflowDocumentFixtures.test.d.ts +1 -0
- package/dist/__tests__/workflowDocumentFixtures.test.js +78 -0
- package/dist/__tests__/workflowExportMatrix.test.d.ts +1 -0
- package/dist/__tests__/workflowExportMatrix.test.js +113 -0
- package/dist/__tests__/workflowExportSnapshots.test.d.ts +1 -0
- package/dist/__tests__/workflowExportSnapshots.test.js +28 -0
- package/dist/__tests__/workflowGeneration.test.d.ts +1 -0
- package/dist/__tests__/workflowGeneration.test.js +12 -0
- package/dist/__tests__/workflowSimulation.test.d.ts +1 -0
- package/dist/__tests__/workflowSimulation.test.js +113 -0
- package/dist/__tests__/workflowV2Policy.test.d.ts +1 -0
- package/dist/__tests__/workflowV2Policy.test.js +80 -0
- package/dist/api.d.ts +30 -0
- package/dist/api.js +85 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +217 -0
- package/dist/compat/priorityCompat.d.ts +2 -0
- package/dist/compat/priorityCompat.js +24 -0
- package/dist/components/features/DocumentGenerateModal.d.ts +9 -0
- package/dist/components/features/DocumentGenerateModal.js +114 -0
- package/dist/components/features/DocumentIndex.d.ts +19 -0
- package/dist/components/features/DocumentIndex.js +51 -0
- package/dist/components/features/DocumentViewer.d.ts +9 -0
- package/dist/components/features/DocumentViewer.js +253 -0
- package/dist/components/features/DocumentWorkspace.d.ts +21 -0
- package/dist/components/features/DocumentWorkspace.js +88 -0
- package/dist/components/features/TaskSettings.d.ts +209 -0
- package/dist/components/features/TaskSettings.js +500 -0
- package/dist/components/features/TaskSettings.test.d.ts +1 -0
- package/dist/components/features/TaskSettings.test.js +308 -0
- package/dist/components/features/settings/CategoryManager.d.ts +19 -0
- package/dist/components/features/settings/CategoryManager.js +113 -0
- package/dist/components/features/settings/TaxonomyEditor.d.ts +8 -0
- package/dist/components/features/settings/TaxonomyEditor.js +98 -0
- package/dist/components/features/settings/TaxonomyManager 2.d.ts +52 -0
- package/dist/components/features/settings/TaxonomyManager 2.js +75 -0
- package/dist/components/features/settings/TaxonomyManager.d.ts +54 -0
- package/dist/components/features/settings/TaxonomyManager.js +77 -0
- package/dist/components/features/settings/TypeManager.d.ts +10 -0
- package/dist/components/features/settings/TypeManager.js +50 -0
- package/dist/components/features/settings/WorkflowEditorPrototype.d.ts +15 -0
- package/dist/components/features/settings/WorkflowEditorPrototype.js +245 -0
- package/dist/components/task/TaskActionHeader.d.ts +20 -0
- package/dist/components/task/TaskActionHeader.js +13 -0
- package/dist/components/task/TaskCard.d.ts +47 -0
- package/dist/components/task/TaskCard.js +326 -0
- package/dist/components/task/TaskCard.test.d.ts +1 -0
- package/dist/components/task/TaskCard.test.js +95 -0
- package/dist/components/task/TaskContextUpload.d.ts +12 -0
- package/dist/components/task/TaskContextUpload.js +393 -0
- package/dist/components/task/TaskContextUpload.test.d.ts +1 -0
- package/dist/components/task/TaskContextUpload.test.js +189 -0
- package/dist/components/task/TaskForm.d.ts +105 -0
- package/dist/components/task/TaskForm.js +241 -0
- package/dist/components/task/TaskForm.test.d.ts +1 -0
- package/dist/components/task/TaskForm.test.js +288 -0
- package/dist/components/task/TaskKanban 2.d.ts +76 -0
- package/dist/components/task/TaskKanban 2.js +1004 -0
- package/dist/components/task/TaskKanban.d.ts +76 -0
- package/dist/components/task/TaskKanban.empty-column-drop.test.d.ts +1 -0
- package/dist/components/task/TaskKanban.empty-column-drop.test.js +66 -0
- package/dist/components/task/TaskKanban.js +1026 -0
- package/dist/components/task/TaskKanban.test.d.ts +1 -0
- package/dist/components/task/TaskKanban.test.js +46 -0
- package/dist/components/task/TaskList.d.ts +74 -0
- package/dist/components/task/TaskList.js +38 -0
- package/dist/components/task/TaskList.test.d.ts +1 -0
- package/dist/components/task/TaskList.test.js +270 -0
- package/dist/components/task/TaskScreenshotSection.d.ts +15 -0
- package/dist/components/task/TaskScreenshotSection.js +22 -0
- package/dist/components/ui/LevelSelector.d.ts +13 -0
- package/dist/components/ui/LevelSelector.js +25 -0
- package/dist/components/ui/LevelSelector.test.d.ts +1 -0
- package/dist/components/ui/LevelSelector.test.js +55 -0
- package/dist/components/ui/Markdown.d.ts +6 -0
- package/dist/components/ui/Markdown.js +94 -0
- package/dist/components/ui/Markdown.test.d.ts +1 -0
- package/dist/components/ui/Markdown.test.js +38 -0
- package/dist/components/ui/Modal.d.ts +16 -0
- package/dist/components/ui/Modal.js +49 -0
- package/dist/components/ui/MultiSelectFilter.d.ts +10 -0
- package/dist/components/ui/MultiSelectFilter.js +71 -0
- package/dist/components/ui/MultiSelectFilter.test.d.ts +1 -0
- package/dist/components/ui/MultiSelectFilter.test.js +74 -0
- package/dist/components/ui/TaxonomyDropdown.d.ts +17 -0
- package/dist/components/ui/TaxonomyDropdown.js +145 -0
- package/dist/components/ui/TaxonomyDropdown.test.d.ts +1 -0
- package/dist/components/ui/TaxonomyDropdown.test.js +130 -0
- package/dist/components/views/StandaloneLayout 2.d.ts +8 -0
- package/dist/components/views/StandaloneLayout 2.js +1660 -0
- package/dist/components/views/StandaloneLayout.d.ts +8 -0
- package/dist/components/views/StandaloneLayout.js +2117 -0
- package/dist/components/views/WidgetView.d.ts +8 -0
- package/dist/components/views/WidgetView.js +221 -0
- package/dist/config/envSchema.d.ts +28 -0
- package/dist/config/envSchema.js +374 -0
- package/dist/config/envSchema.test.d.ts +1 -0
- package/dist/config/envSchema.test.js +97 -0
- package/dist/config/surfaceBase.d.ts +2 -0
- package/dist/config/surfaceBase.js +8 -0
- package/dist/core/BulkUpdateFieldsPreview.test.d.ts +1 -0
- package/dist/core/BulkUpdateFieldsPreview.test.js +62 -0
- package/dist/core/CompletedAt.test.d.ts +1 -0
- package/dist/core/CompletedAt.test.js +44 -0
- package/dist/core/CreatedBy.test.d.ts +1 -0
- package/dist/core/CreatedBy.test.js +60 -0
- package/dist/core/EntitlementsPolicy.test.d.ts +1 -0
- package/dist/core/EntitlementsPolicy.test.js +145 -0
- package/dist/core/InitiativeTemplates.test.d.ts +1 -0
- package/dist/core/InitiativeTemplates.test.js +50 -0
- package/dist/core/ParentLifecycle.test.d.ts +1 -0
- package/dist/core/ParentLifecycle.test.js +98 -0
- package/dist/core/ScheduleFields.test.d.ts +1 -0
- package/dist/core/ScheduleFields.test.js +197 -0
- package/dist/core/SetupState.test.d.ts +1 -0
- package/dist/core/SetupState.test.js +113 -0
- package/dist/core/SystemAdmin.test.d.ts +1 -0
- package/dist/core/SystemAdmin.test.js +295 -0
- package/dist/core/TaskTaxonomyValidation.test.d.ts +1 -0
- package/dist/core/TaskTaxonomyValidation.test.js +64 -0
- package/dist/core/Taskforce.d.ts +1063 -0
- package/dist/core/Taskforce.ids.test.d.ts +1 -0
- package/dist/core/Taskforce.ids.test.js +168 -0
- package/dist/core/Taskforce.js +5981 -0
- package/dist/core/Taskforce.realtimeMutation.test.d.ts +1 -0
- package/dist/core/Taskforce.realtimeMutation.test.js +76 -0
- package/dist/core/WorkspaceDelete.test.d.ts +1 -0
- package/dist/core/WorkspaceDelete.test.js +140 -0
- package/dist/core/WorkspacePermissions.test.d.ts +1 -0
- package/dist/core/WorkspacePermissions.test.js +151 -0
- package/dist/core/WorkspacePlanMode.test.d.ts +1 -0
- package/dist/core/WorkspacePlanMode.test.js +104 -0
- package/dist/hooks/authGuardPolicy.d.ts +26 -0
- package/dist/hooks/authGuardPolicy.js +32 -0
- package/dist/hooks/authGuardPolicy.test.d.ts +1 -0
- package/dist/hooks/authGuardPolicy.test.js +76 -0
- package/dist/hooks/useDraggable.d.ts +12 -0
- package/dist/hooks/useDraggable.js +65 -0
- package/dist/hooks/useRealtimeSync.d.ts +24 -0
- package/dist/hooks/useRealtimeSync.js +275 -0
- package/dist/hooks/useRealtimeSync.test.d.ts +1 -0
- package/dist/hooks/useRealtimeSync.test.js +284 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +164 -0
- package/dist/hooks/useSyncOrchestrator.js +1427 -0
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.d.ts +1 -0
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +367 -0
- package/dist/hooks/useTaskforce.d.ts +727 -0
- package/dist/hooks/useTaskforce.js +4396 -0
- package/dist/hooks/useTaskforce.priority-filters.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.priority-filters.test.js +33 -0
- package/dist/hooks/useWorkspaceSyncController.d.ts +80 -0
- package/dist/hooks/useWorkspaceSyncController.js +598 -0
- package/dist/hooks/useWorkspaceSyncController.test.d.ts +1 -0
- package/dist/hooks/useWorkspaceSyncController.test.js +236 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +11 -0
- package/dist/localization/index.d.ts +8 -0
- package/dist/localization/index.js +81 -0
- package/dist/localization/locales/en-US.d.ts +151 -0
- package/dist/localization/locales/en-US.js +150 -0
- package/dist/localization/locales/es-419.d.ts +2 -0
- package/dist/localization/locales/es-419.js +150 -0
- package/dist/localization/locales/pt-BR.d.ts +2 -0
- package/dist/localization/locales/pt-BR.js +150 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +33 -0
- package/dist/mcp/optionResolution.d.ts +14 -0
- package/dist/mcp/optionResolution.js +126 -0
- package/dist/mcp/optionResolution.test.d.ts +1 -0
- package/dist/mcp/optionResolution.test.js +39 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +1793 -0
- package/dist/mcp/structuredCommentValidation.d.ts +6 -0
- package/dist/mcp/structuredCommentValidation.js +56 -0
- package/dist/mcp/structuredDocValidation.d.ts +6 -0
- package/dist/mcp/structuredDocValidation.js +75 -0
- package/dist/migrations/billingSchemaParity.test.d.ts +1 -0
- package/dist/migrations/billingSchemaParity.test.js +46 -0
- package/dist/migrations/clientMigrations.d.ts +9 -0
- package/dist/migrations/clientMigrations.js +74 -0
- package/dist/migrations/flags.d.ts +6 -0
- package/dist/migrations/flags.js +8 -0
- package/dist/migrations/taskMigrations.d.ts +71 -0
- package/dist/migrations/taskMigrations.js +236 -0
- package/dist/migrations/taskMigrations.test.d.ts +1 -0
- package/dist/migrations/taskMigrations.test.js +34 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +11 -0
- package/dist/migrations/taskSchemaMigrations.js +453 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.js +10 -0
- package/dist/plugins/vite.d.ts +19 -0
- package/dist/plugins/vite.js +271 -0
- package/dist/public/android-chrome-192x192.png +0 -0
- package/dist/public/android-chrome-512x512.png +0 -0
- package/dist/public/apple-touch-icon.png +0 -0
- package/dist/public/favicon-16x16.png +0 -0
- package/dist/public/favicon-32x32.png +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/favicon.png +0 -0
- package/dist/public/site.webmanifest +1 -0
- package/dist/public/taskforce.png +0 -0
- package/dist/resources/templates/WORKFLOW_V2_POLICY.md +55 -0
- package/dist/resources/templates/environments/aider.yaml +14 -0
- package/dist/resources/templates/environments/antigravity.yaml +10 -0
- package/dist/resources/templates/environments/claude.yaml +10 -0
- package/dist/resources/templates/environments/cline.yaml +10 -0
- package/dist/resources/templates/environments/codex.yaml +13 -0
- package/dist/resources/templates/environments/copilot.yaml +10 -0
- package/dist/resources/templates/environments/cursor.yaml +9 -0
- package/dist/resources/templates/environments/gemini.yaml +9 -0
- package/dist/resources/templates/environments/windsurf.yaml +10 -0
- package/dist/resources/templates/workflow-sources/README.md +9 -0
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +520 -0
- package/dist/resources/templates/workflow-sources/workflowEditorOverrides.json +1 -0
- package/dist/resources/templates/workflows/collaborate.yaml +104 -0
- package/dist/resources/templates/workflows/do.yaml +82 -0
- package/dist/resources/templates/workflows/evaluate.yaml +111 -0
- package/dist/resources/templates/workflows/execute.yaml +142 -0
- package/dist/resources/templates/workflows/plan.yaml +112 -0
- package/dist/resources/templates/workflows/review.yaml +109 -0
- package/dist/runtime/capabilities.d.ts +8 -0
- package/dist/runtime/capabilities.js +16 -0
- package/dist/security/virusScan.d.ts +16 -0
- package/dist/security/virusScan.js +83 -0
- package/dist/server/auth.d.ts +51 -0
- package/dist/server/auth.js +266 -0
- package/dist/server/auth.test.d.ts +1 -0
- package/dist/server/auth.test.js +111 -0
- package/dist/server/buildInfo.d.ts +7 -0
- package/dist/server/buildInfo.js +100 -0
- package/dist/server/buildInfo.test.d.ts +1 -0
- package/dist/server/buildInfo.test.js +29 -0
- package/dist/server/cors.d.ts +7 -0
- package/dist/server/cors.js +76 -0
- package/dist/server/cors.test.d.ts +1 -0
- package/dist/server/cors.test.js +71 -0
- package/dist/server/email.d.ts +28 -0
- package/dist/server/email.js +138 -0
- package/dist/server/email.test.d.ts +1 -0
- package/dist/server/email.test.js +113 -0
- package/dist/server/index.cookieProxy.test.d.ts +1 -0
- package/dist/server/index.cookieProxy.test.js +19 -0
- package/dist/server/index.d.ts +17 -0
- package/dist/server/index.js +757 -0
- package/dist/server/index.rateLimit.test.d.ts +1 -0
- package/dist/server/index.rateLimit.test.js +13 -0
- package/dist/server/index.test.d.ts +1 -0
- package/dist/server/index.test.js +19 -0
- package/dist/server/rateLimit.d.ts +29 -0
- package/dist/server/rateLimit.js +99 -0
- package/dist/server/rateLimit.test.d.ts +1 -0
- package/dist/server/rateLimit.test.js +107 -0
- package/dist/server/realtimeSync.auth.test.d.ts +1 -0
- package/dist/server/realtimeSync.auth.test.js +62 -0
- package/dist/server/realtimeSync.replay.test.d.ts +1 -0
- package/dist/server/realtimeSync.replay.test.js +192 -0
- package/dist/server/realtimeSync.workspaceIsolation.test.d.ts +1 -0
- package/dist/server/realtimeSync.workspaceIsolation.test.js +101 -0
- package/dist/server/realtimeSyncWs.d.ts +30 -0
- package/dist/server/realtimeSyncWs.js +257 -0
- package/dist/server/routes.billing.d.ts +15 -0
- package/dist/server/routes.billing.js +991 -0
- package/dist/server/routes.billing.test.d.ts +1 -0
- package/dist/server/routes.billing.test.js +387 -0
- package/dist/server/routes.d.ts +72 -0
- package/dist/server/routes.js +4820 -0
- package/dist/server/routes.sync.d.ts +17 -0
- package/dist/server/routes.sync.integration.test.d.ts +1 -0
- package/dist/server/routes.sync.integration.test.js +470 -0
- package/dist/server/routes.sync.js +1141 -0
- package/dist/server/routes.test.d.ts +1 -0
- package/dist/server/routes.test.js +4945 -0
- package/dist/server/runtimeMode.d.ts +4 -0
- package/dist/server/runtimeMode.js +25 -0
- package/dist/server/runtimeMode.test.d.ts +1 -0
- package/dist/server/runtimeMode.test.js +26 -0
- package/dist/server/securityHeaders.d.ts +3 -0
- package/dist/server/securityHeaders.js +25 -0
- package/dist/server/securityHeaders.test.d.ts +1 -0
- package/dist/server/securityHeaders.test.js +32 -0
- package/dist/server/smtpTransport.d.ts +21 -0
- package/dist/server/smtpTransport.js +11 -0
- package/dist/server/start.d.ts +1 -0
- package/dist/server/start.js +17 -0
- package/dist/services/formatTransformers.d.ts +29 -0
- package/dist/services/formatTransformers.js +56 -0
- package/dist/services/templateEngine.d.ts +46 -0
- package/dist/services/templateEngine.js +148 -0
- package/dist/shared/runtimeContract.d.ts +12 -0
- package/dist/shared/runtimeContract.js +23 -0
- package/dist/shared/runtimeContract.test.d.ts +1 -0
- package/dist/shared/runtimeContract.test.js +23 -0
- package/dist/soak/preflight.cli.d.ts +1 -0
- package/dist/soak/preflight.cli.js +28 -0
- package/dist/soak/preflight.d.ts +26 -0
- package/dist/soak/preflight.js +113 -0
- package/dist/soak/preflight.test.d.ts +1 -0
- package/dist/soak/preflight.test.js +39 -0
- package/dist/soak/syncSoakHarness.d.ts +6 -0
- package/dist/soak/syncSoakHarness.js +10 -0
- package/dist/storage/createDatabaseAdapter.d.ts +2 -0
- package/dist/storage/createDatabaseAdapter.js +9 -0
- package/dist/storage/databaseAdapter.d.ts +22 -0
- package/dist/storage/databaseAdapter.js +1 -0
- package/dist/storage/documentIntegrity.d.ts +28 -0
- package/dist/storage/documentIntegrity.js +103 -0
- package/dist/storage/documentPurge.d.ts +14 -0
- package/dist/storage/documentPurge.js +46 -0
- package/dist/storage/documentRegistry.d.ts +39 -0
- package/dist/storage/documentRegistry.js +115 -0
- package/dist/storage/integritySchedule.d.ts +17 -0
- package/dist/storage/integritySchedule.js +62 -0
- package/dist/storage/objectStorage.d.ts +20 -0
- package/dist/storage/objectStorage.js +15 -0
- package/dist/storage/objectStorageClient.d.ts +18 -0
- package/dist/storage/objectStorageClient.js +301 -0
- package/dist/storage/objectStorageConfig.d.ts +2 -0
- package/dist/storage/objectStorageConfig.js +45 -0
- package/dist/storage/postgresAdapter.d.ts +20 -0
- package/dist/storage/postgresAdapter.js +204 -0
- package/dist/storage/postgresWorker.d.ts +1 -0
- package/dist/storage/postgresWorker.js +110 -0
- package/dist/storage/providerConfig.d.ts +6 -0
- package/dist/storage/providerConfig.js +11 -0
- package/dist/storage/sqliteAdapter.d.ts +14 -0
- package/dist/storage/sqliteAdapter.js +28 -0
- package/dist/storage/taskAssetStore.d.ts +56 -0
- package/dist/storage/taskAssetStore.js +297 -0
- package/dist/sync/cloudSyncApi.d.ts +47 -0
- package/dist/sync/cloudSyncApi.js +138 -0
- package/dist/sync/cloudSyncApi.test.d.ts +1 -0
- package/dist/sync/cloudSyncApi.test.js +54 -0
- package/dist/sync/encryptionService.d.ts +11 -0
- package/dist/sync/encryptionService.js +61 -0
- package/dist/sync/encryptionService.test.d.ts +1 -0
- package/dist/sync/encryptionService.test.js +52 -0
- package/dist/sync/realtimeFeature.d.ts +6 -0
- package/dist/sync/realtimeFeature.js +20 -0
- package/dist/sync/realtimeFeature.test.d.ts +1 -0
- package/dist/sync/realtimeFeature.test.js +30 -0
- package/dist/sync/realtimeReconcile.d.ts +30 -0
- package/dist/sync/realtimeReconcile.js +90 -0
- package/dist/sync/realtimeReconcile.test.d.ts +1 -0
- package/dist/sync/realtimeReconcile.test.js +43 -0
- package/dist/sync/syncService.d.ts +96 -0
- package/dist/sync/syncService.js +423 -0
- package/dist/sync/syncService.test.d.ts +1 -0
- package/dist/sync/syncService.test.js +484 -0
- package/dist/sync/workspaceSyncModel.d.ts +61 -0
- package/dist/sync/workspaceSyncModel.js +136 -0
- package/dist/sync/workspaceSyncModel.test.d.ts +1 -0
- package/dist/sync/workspaceSyncModel.test.js +73 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/setup.js +15 -0
- package/dist/types.d.ts +157 -0
- package/dist/types.js +41 -0
- package/dist/ui/assets/RussoOne-Regular-C3BxZIj7.ttf +0 -0
- package/dist/ui/assets/index-0W5vyCpn.css +1 -0
- package/dist/ui/assets/index-MCZuNNfn.js +23 -0
- package/dist/ui/assets/logo_white_01-0Vx-iIIv.png +0 -0
- package/dist/ui/assets/taskforce-BxLPokNB.png +0 -0
- package/dist/ui/assets/vendor-dnd-BI1K77C1.js +5 -0
- package/dist/ui/assets/vendor-icons-ZFG3SGwo.js +1 -0
- package/dist/ui/assets/vendor-markdown-CKYkQHfj.js +29 -0
- package/dist/ui/assets/vendor-react-DdIDsh7f.js +9 -0
- package/dist/ui/assets/vendor-router-BtiNU7Dl.js +3 -0
- 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/dist/ui/favicon/android-chrome-192x192.png +0 -0
- package/dist/ui/favicon/android-chrome-512x512.png +0 -0
- package/dist/ui/favicon/apple-touch-icon.png +0 -0
- package/dist/ui/favicon/favicon-16x16.png +0 -0
- package/dist/ui/favicon/favicon-32x32.png +0 -0
- package/dist/ui/favicon/favicon.ico +0 -0
- package/dist/ui/favicon/favicon.png +0 -0
- package/dist/ui/favicon/site.webmanifest +1 -0
- package/dist/ui/fonts/RussoOne-Regular.ttf +0 -0
- package/dist/ui/images/taskforce.png +0 -0
- package/dist/ui/index.html +19 -0
- package/dist/utils/checklistMarkdown.d.ts +9 -0
- package/dist/utils/checklistMarkdown.js +46 -0
- package/dist/utils/constants.d.ts +21 -0
- package/dist/utils/constants.icons.test.d.ts +1 -0
- package/dist/utils/constants.icons.test.js +40 -0
- package/dist/utils/constants.js +100 -0
- package/dist/utils/contextFiles.d.ts +8 -0
- package/dist/utils/contextFiles.js +54 -0
- package/dist/utils/formatting.d.ts +5 -0
- package/dist/utils/formatting.js +30 -0
- package/dist/utils/planParser.d.ts +22 -0
- package/dist/utils/planParser.js +151 -0
- package/dist/utils/taskDragZones.d.ts +8 -0
- package/dist/utils/taskDragZones.js +14 -0
- package/dist/utils/taskDragZones.test.d.ts +1 -0
- package/dist/utils/taskDragZones.test.js +14 -0
- package/dist/utils/taskHierarchy.d.ts +4 -0
- package/dist/utils/taskHierarchy.js +69 -0
- package/dist/utils/taskHierarchy.test.d.ts +1 -0
- package/dist/utils/taskHierarchy.test.js +38 -0
- package/dist/utils/taskParenting.d.ts +3 -0
- package/dist/utils/taskParenting.js +24 -0
- package/dist/utils/taskParenting.test.d.ts +1 -0
- package/dist/utils/taskParenting.test.js +21 -0
- package/dist/utils/taskRelations.d.ts +6 -0
- package/dist/utils/taskRelations.js +24 -0
- package/dist/utils/taskRelations.test.d.ts +1 -0
- package/dist/utils/taskRelations.test.js +34 -0
- package/dist/utils/taskUtils.d.ts +2 -0
- package/dist/utils/taskUtils.js +20 -0
- package/dist/utils/taskforceApiClient.d.ts +7 -0
- package/dist/utils/taskforceApiClient.js +42 -0
- package/dist/utils/workspaceIdentity.d.ts +8 -0
- package/dist/utils/workspaceIdentity.js +47 -0
- package/dist/utils/workspaceIdentity.test.d.ts +1 -0
- package/dist/utils/workspaceIdentity.test.js +32 -0
- package/dist/utils/workspaceLifecycle.d.ts +26 -0
- package/dist/utils/workspaceLifecycle.js +69 -0
- package/dist/utils/workspaceLifecycle.test.d.ts +1 -0
- package/dist/utils/workspaceLifecycle.test.js +64 -0
- package/package.json +133 -0
- package/scripts/check-compat-boundaries.js +48 -0
- package/scripts/check-env.ts +24 -0
- package/scripts/check-localization-strings.mjs +49 -0
- package/scripts/check-runtime-boundaries.mjs +44 -0
- package/scripts/debug-global.mjs +34 -0
- package/scripts/debug-server.mjs +36 -0
- package/scripts/export-sqlite-to-postgres.mjs +125 -0
- package/scripts/generate-env-example.ts +8 -0
- package/scripts/generate-workflow-templates.mjs +134 -0
- package/scripts/mcp-stdio-adapter.mjs +160 -0
- package/scripts/postinstall.js +60 -0
- package/scripts/release-version-lib.mjs +88 -0
- package/scripts/release-version.mjs +72 -0
- package/scripts/run-dev-proxy.sh +49 -0
- package/scripts/run-e2e-realtime.sh +16 -0
- package/scripts/run-smoke.sh +23 -0
- package/scripts/run-soak.sh +29 -0
- package/scripts/test-global.js +143 -0
- package/scripts/update-homebrew-formula.sh +38 -0
- package/src/resources/templates/WORKFLOW_V2_POLICY.md +55 -0
- package/src/resources/templates/environments/aider.yaml +14 -0
- package/src/resources/templates/environments/antigravity.yaml +10 -0
- package/src/resources/templates/environments/claude.yaml +10 -0
- package/src/resources/templates/environments/cline.yaml +10 -0
- package/src/resources/templates/environments/codex.yaml +13 -0
- package/src/resources/templates/environments/copilot.yaml +10 -0
- package/src/resources/templates/environments/cursor.yaml +9 -0
- package/src/resources/templates/environments/gemini.yaml +9 -0
- package/src/resources/templates/environments/windsurf.yaml +10 -0
- package/src/resources/templates/workflow-sources/README.md +9 -0
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +520 -0
- package/src/resources/templates/workflow-sources/workflowEditorOverrides.json +1 -0
- package/src/resources/templates/workflows/collaborate.yaml +104 -0
- package/src/resources/templates/workflows/do.yaml +82 -0
- package/src/resources/templates/workflows/evaluate.yaml +111 -0
- package/src/resources/templates/workflows/execute.yaml +142 -0
- package/src/resources/templates/workflows/plan.yaml +112 -0
- package/src/resources/templates/workflows/review.yaml +109 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
3
|
+
import Markdown from 'react-markdown';
|
|
4
|
+
import remarkGfm from 'remark-gfm';
|
|
5
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
6
|
+
import { Printer, Link, Download, Clock, HardDrive, Tag, Pencil, X, Save, Eye, SplitSquareHorizontal, CheckCircle, AlertCircle, Zap } from 'lucide-react';
|
|
7
|
+
import styles from '../../Taskforce.module.css';
|
|
8
|
+
import { DocumentGenerateModal } from './DocumentGenerateModal';
|
|
9
|
+
import { fetchTaskforceApi, resolveTaskforceApiUrl } from '../../utils/taskforceApiClient';
|
|
10
|
+
const DOC_TYPE_LABELS = {
|
|
11
|
+
'implementation-plan': 'Implementation Plan',
|
|
12
|
+
'review': 'Review',
|
|
13
|
+
'walkthrough': 'Walkthrough',
|
|
14
|
+
'planning': 'Planning',
|
|
15
|
+
'other': 'Document',
|
|
16
|
+
};
|
|
17
|
+
function formatBytes(bytes) {
|
|
18
|
+
if (bytes < 1024)
|
|
19
|
+
return `${bytes} B`;
|
|
20
|
+
if (bytes < 1024 * 1024)
|
|
21
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
22
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
23
|
+
}
|
|
24
|
+
function formatDate(iso) {
|
|
25
|
+
if (!iso)
|
|
26
|
+
return '—';
|
|
27
|
+
return new Date(iso).toLocaleString();
|
|
28
|
+
}
|
|
29
|
+
function toggleNthTaskCheckbox(markdown, targetIndex, nextChecked) {
|
|
30
|
+
if (targetIndex < 0)
|
|
31
|
+
return markdown;
|
|
32
|
+
const lines = markdown.split('\n');
|
|
33
|
+
let seen = -1;
|
|
34
|
+
const taskLinePattern = /^(\s*(?:[-*+]|\d+\.)\s+)\[( |x|X)\](.*)$/;
|
|
35
|
+
const replacementMark = nextChecked ? 'x' : ' ';
|
|
36
|
+
const updated = lines.map((line) => {
|
|
37
|
+
const match = line.match(taskLinePattern);
|
|
38
|
+
if (!match)
|
|
39
|
+
return line;
|
|
40
|
+
seen += 1;
|
|
41
|
+
if (seen !== targetIndex)
|
|
42
|
+
return line;
|
|
43
|
+
return `${match[1]}[${replacementMark}]${match[3]}`;
|
|
44
|
+
});
|
|
45
|
+
return updated.join('\n');
|
|
46
|
+
}
|
|
47
|
+
export function DocumentViewer({ doc, taskTitle, apiBaseUrl = '', onSaved }) {
|
|
48
|
+
const [content, setContent] = useState(null);
|
|
49
|
+
const [loadingContent, setLoadingContent] = useState(false);
|
|
50
|
+
const [loadError, setLoadError] = useState(null);
|
|
51
|
+
const [copied, setCopied] = useState(false);
|
|
52
|
+
// Edit mode state
|
|
53
|
+
const [editMode, setEditMode] = useState(false);
|
|
54
|
+
const [draft, setDraft] = useState('');
|
|
55
|
+
const [layout, setLayout] = useState('split');
|
|
56
|
+
const [saveStatus, setSaveStatus] = useState({ type: 'idle' });
|
|
57
|
+
const [showGenModal, setShowGenModal] = useState(false);
|
|
58
|
+
const [monochromeMode, setMonochromeMode] = useState(false);
|
|
59
|
+
const isDirty = editMode && draft !== (content ?? '');
|
|
60
|
+
const textareaRef = useRef(null);
|
|
61
|
+
const fetchContent = useCallback(async () => {
|
|
62
|
+
setLoadingContent(true);
|
|
63
|
+
setLoadError(null);
|
|
64
|
+
setContent(null);
|
|
65
|
+
try {
|
|
66
|
+
const path = `/api/taskforce/context-link?path=${encodeURIComponent(doc.fsPath)}`;
|
|
67
|
+
const res = await fetchTaskforceApi(path, { credentials: 'include' }, apiBaseUrl);
|
|
68
|
+
if (!res.ok)
|
|
69
|
+
throw new Error(`Failed to load document (${res.status})`);
|
|
70
|
+
const text = await res.text();
|
|
71
|
+
setContent(text);
|
|
72
|
+
setDraft(text);
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
setLoadError(e?.message || 'Failed to load document');
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
setLoadingContent(false);
|
|
79
|
+
}
|
|
80
|
+
}, [doc.fsPath, apiBaseUrl]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
fetchContent();
|
|
83
|
+
// Reset edit mode when doc changes
|
|
84
|
+
setEditMode(false);
|
|
85
|
+
setSaveStatus({ type: 'idle' });
|
|
86
|
+
}, [fetchContent]);
|
|
87
|
+
// Ctrl+S / Cmd+S to save while editing
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (!editMode)
|
|
90
|
+
return;
|
|
91
|
+
const handler = (e) => {
|
|
92
|
+
if ((e.metaKey || e.ctrlKey) && e.key === 's') {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
handleSave();
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
window.addEventListener('keydown', handler);
|
|
98
|
+
return () => window.removeEventListener('keydown', handler);
|
|
99
|
+
}, [editMode, draft]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
100
|
+
const handleEnterEdit = () => {
|
|
101
|
+
setDraft(content ?? '');
|
|
102
|
+
setSaveStatus({ type: 'idle' });
|
|
103
|
+
setEditMode(true);
|
|
104
|
+
// Focus textarea on next frame
|
|
105
|
+
setTimeout(() => textareaRef.current?.focus(), 50);
|
|
106
|
+
};
|
|
107
|
+
const handleCancelEdit = () => {
|
|
108
|
+
if (isDirty) {
|
|
109
|
+
if (!window.confirm('Discard unsaved changes?'))
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
setEditMode(false);
|
|
113
|
+
setDraft(content ?? '');
|
|
114
|
+
setSaveStatus({ type: 'idle' });
|
|
115
|
+
};
|
|
116
|
+
const handleSave = useCallback(async () => {
|
|
117
|
+
if (saveStatus.type === 'saving')
|
|
118
|
+
return;
|
|
119
|
+
setSaveStatus({ type: 'saving' });
|
|
120
|
+
try {
|
|
121
|
+
const res = await fetchTaskforceApi('/api/taskforce/documents/save', {
|
|
122
|
+
method: 'POST',
|
|
123
|
+
credentials: 'include',
|
|
124
|
+
headers: { 'Content-Type': 'application/json' },
|
|
125
|
+
body: JSON.stringify({ fsPath: doc.fsPath, content: draft }),
|
|
126
|
+
}, apiBaseUrl);
|
|
127
|
+
const data = await res.json().catch(() => ({}));
|
|
128
|
+
if (!res.ok)
|
|
129
|
+
throw new Error(data.error || `Save failed (${res.status})`);
|
|
130
|
+
const updatedAt = data.updatedAt || new Date().toISOString();
|
|
131
|
+
setContent(draft);
|
|
132
|
+
setSaveStatus({ type: 'saved', savedAt: updatedAt });
|
|
133
|
+
onSaved?.(updatedAt);
|
|
134
|
+
// Return to view mode
|
|
135
|
+
setEditMode(false);
|
|
136
|
+
}
|
|
137
|
+
catch (e) {
|
|
138
|
+
setSaveStatus({ type: 'error', message: e?.message || 'Save failed' });
|
|
139
|
+
}
|
|
140
|
+
}, [apiBaseUrl, doc.fsPath, draft, saveStatus.type, onSaved]);
|
|
141
|
+
const handlePrint = () => window.print();
|
|
142
|
+
const handleCopyLink = async () => {
|
|
143
|
+
const path = `/api/taskforce/context-link?path=${encodeURIComponent(doc.fsPath)}`;
|
|
144
|
+
const url = new URL(resolveTaskforceApiUrl(path, apiBaseUrl), window.location.origin).toString();
|
|
145
|
+
try {
|
|
146
|
+
await navigator.clipboard.writeText(url);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
const el = document.createElement('textarea');
|
|
150
|
+
el.value = url;
|
|
151
|
+
document.body.appendChild(el);
|
|
152
|
+
el.select();
|
|
153
|
+
document.execCommand('copy');
|
|
154
|
+
document.body.removeChild(el);
|
|
155
|
+
}
|
|
156
|
+
setCopied(true);
|
|
157
|
+
setTimeout(() => setCopied(false), 2000);
|
|
158
|
+
};
|
|
159
|
+
const handleDownload = () => {
|
|
160
|
+
const blob = new Blob([editMode ? draft : (content ?? '')], { type: 'text/markdown' });
|
|
161
|
+
const a = document.createElement('a');
|
|
162
|
+
a.href = URL.createObjectURL(blob);
|
|
163
|
+
a.download = doc.title + '.md';
|
|
164
|
+
a.click();
|
|
165
|
+
URL.revokeObjectURL(a.href);
|
|
166
|
+
};
|
|
167
|
+
const persistContent = useCallback(async (nextContent) => {
|
|
168
|
+
setSaveStatus({ type: 'saving' });
|
|
169
|
+
try {
|
|
170
|
+
const res = await fetchTaskforceApi('/api/taskforce/documents/save', {
|
|
171
|
+
method: 'POST',
|
|
172
|
+
credentials: 'include',
|
|
173
|
+
headers: { 'Content-Type': 'application/json' },
|
|
174
|
+
body: JSON.stringify({ fsPath: doc.fsPath, content: nextContent }),
|
|
175
|
+
}, apiBaseUrl);
|
|
176
|
+
const data = await res.json().catch(() => ({}));
|
|
177
|
+
if (!res.ok)
|
|
178
|
+
throw new Error(data.error || `Save failed (${res.status})`);
|
|
179
|
+
const updatedAt = data.updatedAt || new Date().toISOString();
|
|
180
|
+
setContent(nextContent);
|
|
181
|
+
setDraft(nextContent);
|
|
182
|
+
setSaveStatus({ type: 'saved', savedAt: updatedAt });
|
|
183
|
+
onSaved?.(updatedAt);
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
setSaveStatus({ type: 'error', message: e?.message || 'Save failed' });
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
}, [apiBaseUrl, doc.fsPath, onSaved]);
|
|
191
|
+
const handleToggleTaskCheckbox = useCallback((checkboxIndex, nextChecked) => {
|
|
192
|
+
const currentSource = editMode ? draft : (content ?? '');
|
|
193
|
+
const nextSource = toggleNthTaskCheckbox(currentSource, checkboxIndex, nextChecked);
|
|
194
|
+
if (nextSource === currentSource)
|
|
195
|
+
return;
|
|
196
|
+
if (editMode) {
|
|
197
|
+
setDraft(nextSource);
|
|
198
|
+
setSaveStatus(prev => prev.type === 'saving' ? prev : { type: 'idle' });
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
void persistContent(nextSource);
|
|
202
|
+
}, [content, draft, editMode, persistContent]);
|
|
203
|
+
const previewContent = editMode ? draft : (content ?? '');
|
|
204
|
+
let checkboxRenderIndex = -1;
|
|
205
|
+
const nodeHasCheckboxInput = (node) => {
|
|
206
|
+
if (!node || !Array.isArray(node.children))
|
|
207
|
+
return false;
|
|
208
|
+
return node.children.some((child) => {
|
|
209
|
+
if (!child)
|
|
210
|
+
return false;
|
|
211
|
+
if (child.type === 'element' &&
|
|
212
|
+
child.tagName === 'input' &&
|
|
213
|
+
child.properties?.type === 'checkbox') {
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
216
|
+
return nodeHasCheckboxInput(child);
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
const nodeHasTaskItems = (node) => {
|
|
220
|
+
if (!node || !Array.isArray(node.children))
|
|
221
|
+
return false;
|
|
222
|
+
return node.children.some((child) => {
|
|
223
|
+
if (typeof child?.checked === 'boolean')
|
|
224
|
+
return true;
|
|
225
|
+
return nodeHasCheckboxInput(child);
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
const markdownComponents = {
|
|
229
|
+
input({ type, checked, ...props }) {
|
|
230
|
+
if (type !== 'checkbox')
|
|
231
|
+
return _jsx("input", { type: type, checked: checked, ...props });
|
|
232
|
+
checkboxRenderIndex += 1;
|
|
233
|
+
const index = checkboxRenderIndex;
|
|
234
|
+
return (_jsx("input", { ...props, type: "checkbox", checked: Boolean(checked), disabled: false, onClick: (event) => event.stopPropagation(), onChange: (event) => handleToggleTaskCheckbox(index, event.currentTarget.checked) }));
|
|
235
|
+
},
|
|
236
|
+
ul({ children, node, ...props }) {
|
|
237
|
+
const taskList = nodeHasTaskItems(node);
|
|
238
|
+
return (_jsx("ul", { ...props, style: taskList ? { paddingLeft: '1.25em' } : undefined, "data-task-list": taskList ? 'true' : undefined, children: children }));
|
|
239
|
+
},
|
|
240
|
+
ol({ children, node, ...props }) {
|
|
241
|
+
const taskList = nodeHasTaskItems(node);
|
|
242
|
+
return (_jsx("ol", { ...props, style: taskList ? { paddingLeft: '1.25em' } : undefined, "data-task-list": taskList ? 'true' : undefined, children: children }));
|
|
243
|
+
},
|
|
244
|
+
li({ children, node, ...props }) {
|
|
245
|
+
const taskItem = typeof node?.checked === 'boolean' || nodeHasCheckboxInput(node);
|
|
246
|
+
return (_jsx("li", { ...props, style: taskItem ? { listStyleType: 'none', listStyle: 'none', marginLeft: 0 } : undefined, "data-task-item": taskItem ? 'true' : undefined, children: children }));
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
return (_jsxs("div", { className: `${styles.docViewer} ${editMode ? styles.docViewerEditMode : ''} ${monochromeMode ? styles.docViewerMonochrome : ''}`, children: [_jsxs("div", { className: styles.docMeta, children: [_jsxs("div", { className: styles.docMetaLeft, children: [_jsxs("span", { className: `${styles.docTypeBadge} ${styles[`docTypeBadge_${doc.docType.replace('-', '_')}`]}`, children: [_jsx(Tag, { size: 10 }), DOC_TYPE_LABELS[doc.docType]] }), taskTitle && (_jsx("span", { className: styles.docMetaTaskName, title: `From task: ${taskTitle}`, children: taskTitle })), doc.updatedAt && (_jsxs("span", { className: styles.docMetaDate, title: formatDate(doc.updatedAt), children: [_jsx(Clock, { size: 11 }), formatDate(doc.updatedAt)] })), _jsxs("span", { className: styles.docMetaSize, children: [_jsx(HardDrive, { size: 11 }), formatBytes(doc.sizeBytes)] }), saveStatus.type === 'saved' && (_jsxs("span", { className: styles.docSaveStatus, "data-status": "saved", children: [_jsx(CheckCircle, { size: 11 }), "Saved"] })), saveStatus.type === 'error' && (_jsxs("span", { className: styles.docSaveStatus, "data-status": "error", title: saveStatus.message, children: [_jsx(AlertCircle, { size: 11 }), saveStatus.message || 'Save failed'] })), isDirty && saveStatus.type !== 'saving' && (_jsx("span", { className: styles.docUnsaved, children: "Unsaved changes" }))] }), _jsx("div", { className: styles.docActions, children: editMode ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.docLayoutToggle, children: [_jsx("button", { className: `${styles.docLayoutBtn} ${layout === 'editor' ? styles.docLayoutBtnActive : ''}`, onClick: () => setLayout('editor'), title: "Editor only", children: _jsx(Pencil, { size: 12 }) }), _jsx("button", { className: `${styles.docLayoutBtn} ${layout === 'split' ? styles.docLayoutBtnActive : ''}`, onClick: () => setLayout('split'), title: "Split view", children: _jsx(SplitSquareHorizontal, { size: 12 }) }), _jsx("button", { className: `${styles.docLayoutBtn} ${layout === 'preview' ? styles.docLayoutBtnActive : ''}`, onClick: () => setLayout('preview'), title: "Preview only", children: _jsx(Eye, { size: 12 }) })] }), _jsxs("button", { className: styles.docActionBtn, onClick: handleCancelEdit, title: "Discard changes", children: [_jsx(X, { size: 13 }), "Cancel"] }), _jsxs("button", { className: `${styles.docActionBtn} ${styles.docSaveBtn}`, onClick: handleSave, disabled: saveStatus.type === 'saving' || !isDirty, title: "Save (Ctrl+S)", children: [_jsx(Save, { size: 13 }), saveStatus.type === 'saving' ? 'Saving…' : 'Save'] })] })) : (_jsxs(_Fragment, { children: [_jsxs("button", { className: `${styles.docActionBtn} ${styles.docEditBtn}`, onClick: handleEnterEdit, title: "Edit document", children: [_jsx(Pencil, { size: 13 }), "Edit"] }), _jsxs("button", { className: styles.docActionBtn, onClick: handleCopyLink, title: "Copy link", children: [_jsx(Link, { size: 13 }), copied ? 'Copied!' : 'Copy link'] }), _jsxs("button", { className: styles.docActionBtn, onClick: handleDownload, title: "Download .md", children: [_jsx(Download, { size: 13 }), "Download"] }), _jsxs("button", { className: styles.docActionBtn, onClick: handlePrint, title: "Print", children: [_jsx(Printer, { size: 13 }), "Print"] }), _jsxs("button", { className: styles.docActionBtn, onClick: () => setMonochromeMode((prev) => !prev), title: "Toggle black and white style", children: [_jsx(Eye, { size: 13 }), monochromeMode ? 'Color' : 'B/W'] }), doc.docType === 'implementation-plan' && !editMode && (_jsxs("button", { className: `${styles.docActionBtn} ${styles.docGenerateBtn}`, onClick: () => setShowGenModal(true), title: "Generate tasks from this plan", children: [_jsx(Zap, { size: 13 }), "Generate Tasks"] }))] })) })] }), !editMode && (_jsx("div", { className: styles.docViewerTitleRow, children: _jsx("h1", { className: styles.docViewerTitle, children: doc.title }) })), loadingContent && (_jsx("div", { className: styles.docViewerState, children: "Loading\u2026" })), !loadingContent && loadError && (_jsx("div", { className: styles.docViewerStateError, children: loadError })), !loadingContent && !loadError && (editMode ? (_jsxs("div", { className: `${styles.docEditorArea} ${styles[`docEditorLayout_${layout}`]}`, children: [(layout === 'editor' || layout === 'split') && (_jsxs("div", { className: styles.docEditorPane, children: [_jsx("div", { className: styles.docEditorPaneLabel, children: "Markdown" }), _jsx("textarea", { ref: textareaRef, className: styles.docEditorTextarea, value: draft, onChange: e => {
|
|
250
|
+
setDraft(e.target.value);
|
|
251
|
+
setSaveStatus(prev => prev.type === 'saving' ? prev : { type: 'idle' });
|
|
252
|
+
}, spellCheck: true, placeholder: "Write markdown here\u2026" })] })), (layout === 'preview' || layout === 'split') && (_jsxs("div", { className: styles.docPreviewPane, children: [_jsx("div", { className: styles.docEditorPaneLabel, children: "Preview" }), _jsx("div", { className: styles.docMarkdown, children: _jsx(Markdown, { remarkPlugins: [remarkGfm], rehypePlugins: [rehypeSanitize], components: markdownComponents, children: previewContent }) })] }))] })) : (_jsx("div", { className: styles.docViewerContent, children: _jsx("div", { className: styles.docMarkdown, children: _jsx(Markdown, { remarkPlugins: [remarkGfm], rehypePlugins: [rehypeSanitize], components: markdownComponents, children: previewContent }) }) }))), showGenModal && content !== null && (_jsx(DocumentGenerateModal, { content: content, docTitle: doc.title, apiBaseUrl: apiBaseUrl, onClose: () => setShowGenModal(false), onGenerated: (_count) => setShowGenModal(false) }))] }));
|
|
253
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DocMeta {
|
|
2
|
+
id: string;
|
|
3
|
+
fsPath: string;
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
taskId: string | null;
|
|
6
|
+
title: string;
|
|
7
|
+
docType: 'implementation-plan' | 'review' | 'walkthrough' | 'planning' | 'other';
|
|
8
|
+
sizeBytes: number;
|
|
9
|
+
updatedAt: string | null;
|
|
10
|
+
}
|
|
11
|
+
interface Props {
|
|
12
|
+
tasks: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
}>;
|
|
16
|
+
apiBaseUrl?: string;
|
|
17
|
+
requestedDocPath?: string | null;
|
|
18
|
+
onRequestedDocHandled?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function DocumentWorkspace({ tasks, apiBaseUrl, requestedDocPath, onRequestedDocHandled }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import styles from '../../Taskforce.module.css';
|
|
4
|
+
import { DocumentIndex } from './DocumentIndex';
|
|
5
|
+
import { DocumentViewer } from './DocumentViewer';
|
|
6
|
+
import { fetchTaskforceApi } from '../../utils/taskforceApiClient';
|
|
7
|
+
function normalizeDocPath(value) {
|
|
8
|
+
let decoded = value;
|
|
9
|
+
try {
|
|
10
|
+
decoded = decodeURIComponent(value);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
decoded = value;
|
|
14
|
+
}
|
|
15
|
+
const normalized = decoded
|
|
16
|
+
.trim()
|
|
17
|
+
.replace(/\\/g, '/')
|
|
18
|
+
.replace(/^\/+/, '')
|
|
19
|
+
.replace(/^\.\//, '')
|
|
20
|
+
.replace(/^\.taskforce\//, '');
|
|
21
|
+
return normalized;
|
|
22
|
+
}
|
|
23
|
+
function docPathMatches(candidate, requested) {
|
|
24
|
+
if (candidate === requested)
|
|
25
|
+
return true;
|
|
26
|
+
if (candidate.endsWith(`/${requested}`))
|
|
27
|
+
return true;
|
|
28
|
+
if (requested.endsWith(`/${candidate}`))
|
|
29
|
+
return true;
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function DocumentWorkspace({ tasks, apiBaseUrl = '', requestedDocPath = null, onRequestedDocHandled }) {
|
|
33
|
+
const [documents, setDocuments] = useState([]);
|
|
34
|
+
const [loading, setLoading] = useState(true);
|
|
35
|
+
const [error, setError] = useState(null);
|
|
36
|
+
const [selectedDoc, setSelectedDoc] = useState(null);
|
|
37
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
38
|
+
const [typeFilter, setTypeFilter] = useState('all');
|
|
39
|
+
const fetchDocuments = useCallback(async () => {
|
|
40
|
+
setLoading(true);
|
|
41
|
+
setError(null);
|
|
42
|
+
try {
|
|
43
|
+
const res = await fetchTaskforceApi('/api/taskforce/documents', {
|
|
44
|
+
credentials: 'include',
|
|
45
|
+
}, apiBaseUrl);
|
|
46
|
+
if (!res.ok)
|
|
47
|
+
throw new Error(`Failed to load documents (${res.status})`);
|
|
48
|
+
const data = await res.json();
|
|
49
|
+
setDocuments(data.documents || []);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
setError(e?.message || 'Failed to load documents');
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
setLoading(false);
|
|
56
|
+
}
|
|
57
|
+
}, [apiBaseUrl]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
fetchDocuments();
|
|
60
|
+
}, [fetchDocuments]);
|
|
61
|
+
// Auto-select first doc when list loads
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!selectedDoc && documents.length > 0) {
|
|
64
|
+
setSelectedDoc(documents[0]);
|
|
65
|
+
}
|
|
66
|
+
}, [documents, selectedDoc]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (!requestedDocPath || documents.length === 0)
|
|
69
|
+
return;
|
|
70
|
+
const requested = normalizeDocPath(requestedDocPath);
|
|
71
|
+
const matched = documents.find((doc) => {
|
|
72
|
+
const candidate = normalizeDocPath(doc.fsPath);
|
|
73
|
+
return docPathMatches(candidate, requested);
|
|
74
|
+
});
|
|
75
|
+
if (matched) {
|
|
76
|
+
setSelectedDoc(matched);
|
|
77
|
+
onRequestedDocHandled?.();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}, [requestedDocPath, documents, onRequestedDocHandled]);
|
|
81
|
+
const filteredDocs = documents.filter(doc => {
|
|
82
|
+
const matchesSearch = !searchQuery || doc.title.toLowerCase().includes(searchQuery.toLowerCase());
|
|
83
|
+
const matchesType = typeFilter === 'all' || doc.docType === typeFilter;
|
|
84
|
+
return matchesSearch && matchesType;
|
|
85
|
+
});
|
|
86
|
+
const taskById = new Map(tasks.map(t => [t.id, t]));
|
|
87
|
+
return (_jsxs("div", { className: styles.docWorkspace, children: [_jsx("div", { className: styles.docIndexPanel, children: _jsx(DocumentIndex, { documents: filteredDocs, selectedDocId: selectedDoc?.id ?? null, loading: loading, error: error, searchQuery: searchQuery, typeFilter: typeFilter, onSearchChange: setSearchQuery, onTypeFilterChange: setTypeFilter, onSelect: setSelectedDoc, onRefresh: fetchDocuments, taskById: taskById }) }), _jsx("div", { className: styles.docViewerPanel, children: selectedDoc ? (_jsx(DocumentViewer, { doc: selectedDoc, taskTitle: selectedDoc.taskId ? (taskById.get(selectedDoc.taskId)?.title ?? null) : null, apiBaseUrl: apiBaseUrl, onSaved: (_updatedAt) => fetchDocuments() })) : !loading && (_jsx("div", { className: styles.docViewerEmpty, children: _jsx("p", { children: documents.length === 0 ? 'No documents found.' : 'Select a document to view it.' }) })) })] }));
|
|
88
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import type { TaskforceTheme, CategoryConfig } from '../../types';
|
|
2
|
+
import type { TaxonomyDefinition, Environment } from '../../types';
|
|
3
|
+
interface BuildMetadata {
|
|
4
|
+
version: string;
|
|
5
|
+
gitSha: string | null;
|
|
6
|
+
buildTime: string | null;
|
|
7
|
+
deployId: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface TaskSettingsModel {
|
|
10
|
+
currentTheme: TaskforceTheme;
|
|
11
|
+
globalTheme: TaskforceTheme;
|
|
12
|
+
themeUseGlobalDefault: boolean;
|
|
13
|
+
keyShortcut: string;
|
|
14
|
+
jsonBackupEnabled: boolean;
|
|
15
|
+
globalJsonBackupEnabled: boolean;
|
|
16
|
+
globalWeekStartsOn: 'sunday' | 'monday';
|
|
17
|
+
locale?: string;
|
|
18
|
+
supportedLocales?: string[];
|
|
19
|
+
jsonBackupUseGlobalDefault: boolean;
|
|
20
|
+
manualComplexityEnabled: boolean;
|
|
21
|
+
checklistDropdownEnabled?: boolean;
|
|
22
|
+
assigneeFilterEnabled?: boolean;
|
|
23
|
+
exportWorkflowsPath: string;
|
|
24
|
+
exportSpecialistsPath: string;
|
|
25
|
+
exportingResource: 'workflows' | 'specialists' | null;
|
|
26
|
+
exportResult: {
|
|
27
|
+
type: 'success' | 'error';
|
|
28
|
+
message: string;
|
|
29
|
+
} | null;
|
|
30
|
+
initialSection?: 'categories' | 'types' | 'general' | 'documents' | 'commands' | 'workflow-editor' | 'agents' | 'taxonomy' | 'mcp' | 'resources' | 'approaches' | 'priorities' | 'initiatives' | null;
|
|
31
|
+
exportEnvironment: string;
|
|
32
|
+
setupState?: {
|
|
33
|
+
mode: 'core' | 'operations';
|
|
34
|
+
workspaceId: string;
|
|
35
|
+
workspace?: {
|
|
36
|
+
id: string;
|
|
37
|
+
slug?: string | null;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string | null;
|
|
40
|
+
} | null;
|
|
41
|
+
} | null;
|
|
42
|
+
buildInfo?: BuildMetadata | null;
|
|
43
|
+
onThemeChange: (theme: TaskforceTheme) => void;
|
|
44
|
+
onSaveTheme: (theme: TaskforceTheme) => Promise<boolean>;
|
|
45
|
+
onSaveGlobalTheme: (theme: TaskforceTheme) => Promise<boolean>;
|
|
46
|
+
onResetProjectToGlobal: () => Promise<boolean>;
|
|
47
|
+
onKeyShortcutChange: (value: string) => void;
|
|
48
|
+
onJsonBackupEnabledChange: (value: boolean) => Promise<boolean>;
|
|
49
|
+
onSaveGlobalJsonBackupEnabled: (value: boolean) => Promise<boolean>;
|
|
50
|
+
onSaveGlobalWeekStartsOn: (value: 'sunday' | 'monday') => Promise<boolean>;
|
|
51
|
+
onSaveLocale?: (value: string) => Promise<boolean>;
|
|
52
|
+
onManualComplexityEnabledChange: (value: boolean) => Promise<boolean>;
|
|
53
|
+
onChecklistDropdownEnabledChange?: (value: boolean) => Promise<boolean>;
|
|
54
|
+
onAssigneeFilterEnabledChange?: (value: boolean) => Promise<boolean>;
|
|
55
|
+
onSaveSettings: () => Promise<boolean>;
|
|
56
|
+
onSaveSetupMode?: (mode: 'core' | 'operations') => Promise<boolean>;
|
|
57
|
+
onSaveWorkspaceProfile?: (input: {
|
|
58
|
+
workspaceId?: string;
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
}) => Promise<{
|
|
62
|
+
success: boolean;
|
|
63
|
+
error?: string;
|
|
64
|
+
code?: string;
|
|
65
|
+
}>;
|
|
66
|
+
onExportWorkflowsPathChange: (value: string) => void;
|
|
67
|
+
onExportSpecialistsPathChange: (value: string) => void;
|
|
68
|
+
onExportEnvironmentChange: (value: string) => void;
|
|
69
|
+
onExportResources: (type: 'workflows' | 'specialists', path: string) => void;
|
|
70
|
+
availableWorkflows?: string[];
|
|
71
|
+
availableEnvironments?: Environment[];
|
|
72
|
+
onRefreshWorkflows?: (force?: boolean) => void;
|
|
73
|
+
onExportWorkflows?: (environment: string, workflows: string[]) => void;
|
|
74
|
+
onFetchWorkflowTemplate?: (name: string) => Promise<any | null>;
|
|
75
|
+
onFetchWorkflowOverrideNames?: () => Promise<string[]>;
|
|
76
|
+
onSaveWorkflowTemplateDraft?: (name: string, draft: any) => Promise<{
|
|
77
|
+
success: boolean;
|
|
78
|
+
error?: string;
|
|
79
|
+
}>;
|
|
80
|
+
onResetWorkflowTemplateDraft?: (name: string) => Promise<{
|
|
81
|
+
success: boolean;
|
|
82
|
+
error?: string;
|
|
83
|
+
}>;
|
|
84
|
+
initiativeTemplates?: Array<{
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
checklistBlocks: {
|
|
89
|
+
definitionOfDone: string[];
|
|
90
|
+
rollbackPlan: string[];
|
|
91
|
+
};
|
|
92
|
+
milestones: Array<{
|
|
93
|
+
title: string;
|
|
94
|
+
description: string;
|
|
95
|
+
priority?: number;
|
|
96
|
+
approach?: string;
|
|
97
|
+
category?: string;
|
|
98
|
+
}>;
|
|
99
|
+
defaultSpecialists?: string[];
|
|
100
|
+
}>;
|
|
101
|
+
onRefreshInitiativeTemplates?: () => Promise<any>;
|
|
102
|
+
onCreateInitiativeFromTemplate?: (payload: {
|
|
103
|
+
templateId: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description?: string;
|
|
106
|
+
category?: string;
|
|
107
|
+
type?: string;
|
|
108
|
+
priority?: number;
|
|
109
|
+
approach?: string;
|
|
110
|
+
parentTaskId?: string | null;
|
|
111
|
+
specialists?: string[];
|
|
112
|
+
}) => Promise<{
|
|
113
|
+
success: boolean;
|
|
114
|
+
error?: string;
|
|
115
|
+
result?: any;
|
|
116
|
+
}>;
|
|
117
|
+
onCloneChecklistBlocksToChildren?: (payload: {
|
|
118
|
+
parentTaskId: string;
|
|
119
|
+
checklistBlocks: {
|
|
120
|
+
definitionOfDone: string[];
|
|
121
|
+
rollbackPlan: string[];
|
|
122
|
+
};
|
|
123
|
+
}) => Promise<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
error?: string;
|
|
126
|
+
updated?: number;
|
|
127
|
+
}>;
|
|
128
|
+
onShowFolderBrowserChange: (show: boolean) => void;
|
|
129
|
+
onBrowserTargetChange: (target: 'storage' | {
|
|
130
|
+
type: 'category';
|
|
131
|
+
value: string;
|
|
132
|
+
} | {
|
|
133
|
+
type: 'context-link';
|
|
134
|
+
} | null) => void;
|
|
135
|
+
onFetchFolders: (path: string) => void;
|
|
136
|
+
categories: CategoryConfig[];
|
|
137
|
+
pathValidation: Record<string, {
|
|
138
|
+
exists: boolean;
|
|
139
|
+
isDirectory: boolean;
|
|
140
|
+
isFile: boolean;
|
|
141
|
+
}>;
|
|
142
|
+
onUpdateCategory: (category: CategoryConfig, oldLabel?: string) => void;
|
|
143
|
+
onRemoveCategory: (value: string) => void;
|
|
144
|
+
onSaveCategory: (newCategory: string) => void;
|
|
145
|
+
onAddPath: (catValue: string, path: string) => void;
|
|
146
|
+
onRemovePath: (catValue: string, path: string) => void;
|
|
147
|
+
onUpdateCategoryIcon: (catValue: string, iconName: string) => void;
|
|
148
|
+
onUpdateCategoryColor: (catValue: string, color: string) => void;
|
|
149
|
+
types: {
|
|
150
|
+
value: string;
|
|
151
|
+
label: string;
|
|
152
|
+
}[];
|
|
153
|
+
onSaveType: (label: string) => void;
|
|
154
|
+
onRemoveType: (value: string) => void;
|
|
155
|
+
onSectionChange?: (section: any) => void;
|
|
156
|
+
taxonomies: TaxonomyDefinition[];
|
|
157
|
+
onUpdateTaxonomies: (taxonomies: TaxonomyDefinition[]) => void;
|
|
158
|
+
priorities: Array<{
|
|
159
|
+
value: number;
|
|
160
|
+
label: string;
|
|
161
|
+
color?: string;
|
|
162
|
+
icon?: string;
|
|
163
|
+
}>;
|
|
164
|
+
onUpdatePriorities: (priorities: Array<{
|
|
165
|
+
value: number;
|
|
166
|
+
label: string;
|
|
167
|
+
color?: string;
|
|
168
|
+
icon?: string;
|
|
169
|
+
}>) => void;
|
|
170
|
+
approaches: Array<{
|
|
171
|
+
value: string;
|
|
172
|
+
label: string;
|
|
173
|
+
color?: string;
|
|
174
|
+
icon?: string;
|
|
175
|
+
}>;
|
|
176
|
+
onUpdateApproaches: (approaches: Array<{
|
|
177
|
+
value: string;
|
|
178
|
+
label: string;
|
|
179
|
+
color?: string;
|
|
180
|
+
icon?: string;
|
|
181
|
+
}>) => void;
|
|
182
|
+
projectRoot?: string;
|
|
183
|
+
projectName?: string;
|
|
184
|
+
mcpHostRoot?: string;
|
|
185
|
+
serverHostRoot?: string;
|
|
186
|
+
mcpScriptPath?: string;
|
|
187
|
+
tenantId?: string;
|
|
188
|
+
workspaceId?: string;
|
|
189
|
+
runtimeMode?: 'local' | 'cloud';
|
|
190
|
+
workspaceSwitchingEnabled?: boolean;
|
|
191
|
+
currentWorkspaceRole?: 'owner' | 'admin' | 'member' | 'read-only';
|
|
192
|
+
currentWorkspaceName?: string;
|
|
193
|
+
onDeleteWorkspace?: (workspaceId: string) => Promise<{
|
|
194
|
+
success: boolean;
|
|
195
|
+
error?: string;
|
|
196
|
+
code?: string;
|
|
197
|
+
nextWorkspaceId?: string;
|
|
198
|
+
workspaceSetupRequired?: boolean;
|
|
199
|
+
cleanupWarnings?: string[];
|
|
200
|
+
}>;
|
|
201
|
+
onMcpHostRootChange?: (value: string) => void;
|
|
202
|
+
isAuthenticated?: boolean;
|
|
203
|
+
}
|
|
204
|
+
interface TaskSettingsProps {
|
|
205
|
+
settingsModel: TaskSettingsModel;
|
|
206
|
+
onSectionChange?: (section: any) => void;
|
|
207
|
+
}
|
|
208
|
+
export declare function TaskSettings(props: TaskSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
209
|
+
export {};
|