@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,1063 @@
|
|
|
1
|
+
import type { DatabaseAdapter, DatabaseProvider } from '../storage/databaseAdapter.js';
|
|
2
|
+
/**
|
|
3
|
+
* Taskforce Core Logic
|
|
4
|
+
*
|
|
5
|
+
* Handles all data persistence and business logic for managing tasks.
|
|
6
|
+
* Uses a storage adapter layer for database access.
|
|
7
|
+
*/
|
|
8
|
+
export interface Comment {
|
|
9
|
+
id: string;
|
|
10
|
+
author: string;
|
|
11
|
+
text: string;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
}
|
|
14
|
+
export type TaskStatus = 'task' | 'on-hold' | 'in-progress' | 'review' | 'done' | 'cancelled';
|
|
15
|
+
export type TaskAssignee = 'unassigned' | 'agent' | 'user';
|
|
16
|
+
export interface TaskItem {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description: string | null;
|
|
20
|
+
category: string;
|
|
21
|
+
type: string;
|
|
22
|
+
priority: number;
|
|
23
|
+
complexity: number;
|
|
24
|
+
status: TaskStatus;
|
|
25
|
+
approach?: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt?: string;
|
|
28
|
+
completedAt?: string | null;
|
|
29
|
+
/** @deprecated */
|
|
30
|
+
inProgress?: boolean;
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
readyForReview?: boolean;
|
|
33
|
+
comments?: Comment[];
|
|
34
|
+
attachments?: Array<string | {
|
|
35
|
+
path: string;
|
|
36
|
+
fsPath?: string;
|
|
37
|
+
caption?: string;
|
|
38
|
+
timestamp?: string;
|
|
39
|
+
}>;
|
|
40
|
+
/** @deprecated Legacy input compatibility only. Use attachments. */
|
|
41
|
+
screenshots?: Array<string | {
|
|
42
|
+
path: string;
|
|
43
|
+
fsPath?: string;
|
|
44
|
+
caption?: string;
|
|
45
|
+
timestamp?: string;
|
|
46
|
+
}>;
|
|
47
|
+
specialists?: string[];
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
completed?: boolean;
|
|
50
|
+
/** @deprecated */
|
|
51
|
+
cancelled?: boolean;
|
|
52
|
+
taxonomies?: Record<string, string | string[]>;
|
|
53
|
+
createdBy?: string;
|
|
54
|
+
assignee?: TaskAssignee;
|
|
55
|
+
canceledReason?: string;
|
|
56
|
+
isArchived?: boolean;
|
|
57
|
+
scheduledDate?: string | null;
|
|
58
|
+
dueDate?: string | null;
|
|
59
|
+
scheduledWeekKey?: string | null;
|
|
60
|
+
orderInDay?: number | null;
|
|
61
|
+
parentTaskId?: string | null;
|
|
62
|
+
childDisplayOrder?: number | null;
|
|
63
|
+
}
|
|
64
|
+
export interface TaskWarning {
|
|
65
|
+
code: string;
|
|
66
|
+
severity: 'warning';
|
|
67
|
+
title: string;
|
|
68
|
+
message: string;
|
|
69
|
+
requiresConfirmation: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface ScheduleBoardColumns {
|
|
72
|
+
backlog: TaskItem[];
|
|
73
|
+
expired: TaskItem[];
|
|
74
|
+
mon: TaskItem[];
|
|
75
|
+
tue: TaskItem[];
|
|
76
|
+
wed: TaskItem[];
|
|
77
|
+
thu: TaskItem[];
|
|
78
|
+
fri: TaskItem[];
|
|
79
|
+
sat?: TaskItem[];
|
|
80
|
+
sun?: TaskItem[];
|
|
81
|
+
}
|
|
82
|
+
export interface ScheduleBoardResult {
|
|
83
|
+
week: string;
|
|
84
|
+
columns: ScheduleBoardColumns;
|
|
85
|
+
meta: {
|
|
86
|
+
showWeekends: boolean;
|
|
87
|
+
capacityWarnings: Array<{
|
|
88
|
+
date: string;
|
|
89
|
+
level: 'soft';
|
|
90
|
+
}>;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export type RealtimeMutationEntityType = 'task' | 'taxonomy' | 'document-metadata';
|
|
94
|
+
export interface RealtimeMutationEvent {
|
|
95
|
+
eventId: string;
|
|
96
|
+
workspaceId: string;
|
|
97
|
+
cursor: string;
|
|
98
|
+
serverEpoch: string;
|
|
99
|
+
seq: number;
|
|
100
|
+
entityType: RealtimeMutationEntityType;
|
|
101
|
+
changeType: string;
|
|
102
|
+
entityIds: string[];
|
|
103
|
+
dataVersion: number;
|
|
104
|
+
serverTs: string;
|
|
105
|
+
}
|
|
106
|
+
export declare class TaskforceRuleError extends Error {
|
|
107
|
+
statusCode: number;
|
|
108
|
+
code: string;
|
|
109
|
+
details?: unknown;
|
|
110
|
+
constructor(message: string, statusCode?: number, code?: string, details?: unknown);
|
|
111
|
+
}
|
|
112
|
+
export interface CategoryConfig {
|
|
113
|
+
value: string;
|
|
114
|
+
label: string;
|
|
115
|
+
path?: string;
|
|
116
|
+
paths?: string[];
|
|
117
|
+
specialistFile?: string;
|
|
118
|
+
icon?: string;
|
|
119
|
+
color?: string;
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface TaskforceConfig {
|
|
123
|
+
projectRoot: string;
|
|
124
|
+
storagePath?: string;
|
|
125
|
+
tenantId?: string;
|
|
126
|
+
database?: {
|
|
127
|
+
provider?: DatabaseProvider;
|
|
128
|
+
connectionString?: string;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export interface TaskFile {
|
|
132
|
+
tasks: TaskItem[];
|
|
133
|
+
config?: {
|
|
134
|
+
categories?: Array<string | CategoryConfig>;
|
|
135
|
+
types?: Array<{
|
|
136
|
+
value: string;
|
|
137
|
+
label: string;
|
|
138
|
+
}>;
|
|
139
|
+
priorities?: Array<{
|
|
140
|
+
value: number;
|
|
141
|
+
label: string;
|
|
142
|
+
color?: string;
|
|
143
|
+
icon?: string;
|
|
144
|
+
}>;
|
|
145
|
+
complexities?: Array<{
|
|
146
|
+
value: number;
|
|
147
|
+
label: string;
|
|
148
|
+
color?: string;
|
|
149
|
+
icon?: string;
|
|
150
|
+
}>;
|
|
151
|
+
approaches?: Array<{
|
|
152
|
+
value: string;
|
|
153
|
+
label: string;
|
|
154
|
+
color?: string;
|
|
155
|
+
icon?: string;
|
|
156
|
+
}>;
|
|
157
|
+
theme?: 'dark' | 'light' | 'midnight';
|
|
158
|
+
shortcut?: string;
|
|
159
|
+
jsonBackupEnabled?: boolean;
|
|
160
|
+
taxonomies?: any[];
|
|
161
|
+
assigneeFilterEnabled?: boolean;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export interface ArchiveFile {
|
|
165
|
+
archived: TaskItem[];
|
|
166
|
+
}
|
|
167
|
+
export interface BulkCreateTaskError {
|
|
168
|
+
index: number;
|
|
169
|
+
message: string;
|
|
170
|
+
statusCode?: number;
|
|
171
|
+
code?: string;
|
|
172
|
+
details?: unknown;
|
|
173
|
+
}
|
|
174
|
+
export interface BulkCreateTaskResult {
|
|
175
|
+
created: TaskItem[];
|
|
176
|
+
errors: BulkCreateTaskError[];
|
|
177
|
+
total: number;
|
|
178
|
+
atomic: boolean;
|
|
179
|
+
validateOnly: boolean;
|
|
180
|
+
}
|
|
181
|
+
export interface BulkUpdateFieldsPreviewItem {
|
|
182
|
+
id: string;
|
|
183
|
+
index: number;
|
|
184
|
+
fields: Record<string, any>;
|
|
185
|
+
changedFields: string[];
|
|
186
|
+
}
|
|
187
|
+
export interface BulkUpdateFieldsPreviewSkipped {
|
|
188
|
+
index: number;
|
|
189
|
+
id?: string;
|
|
190
|
+
message: string;
|
|
191
|
+
statusCode: number;
|
|
192
|
+
code: string;
|
|
193
|
+
}
|
|
194
|
+
export interface BulkUpdateFieldsPreview {
|
|
195
|
+
total: number;
|
|
196
|
+
deduped: number;
|
|
197
|
+
toApply: BulkUpdateFieldsPreviewItem[];
|
|
198
|
+
skipped: BulkUpdateFieldsPreviewSkipped[];
|
|
199
|
+
byField: Record<string, number>;
|
|
200
|
+
priorityBefore?: Record<number, number>;
|
|
201
|
+
priorityAfter?: Record<number, number>;
|
|
202
|
+
}
|
|
203
|
+
export interface InitiativeTemplateMilestone {
|
|
204
|
+
title: string;
|
|
205
|
+
description: string;
|
|
206
|
+
priority?: number;
|
|
207
|
+
approach?: string;
|
|
208
|
+
category?: string;
|
|
209
|
+
}
|
|
210
|
+
export interface InitiativeTemplate {
|
|
211
|
+
id: string;
|
|
212
|
+
name: string;
|
|
213
|
+
description: string;
|
|
214
|
+
checklistBlocks: {
|
|
215
|
+
definitionOfDone: string[];
|
|
216
|
+
rollbackPlan: string[];
|
|
217
|
+
};
|
|
218
|
+
milestones: InitiativeTemplateMilestone[];
|
|
219
|
+
defaultSpecialists?: string[];
|
|
220
|
+
}
|
|
221
|
+
interface GlobalTaskforceSettings {
|
|
222
|
+
theme?: 'dark' | 'light' | 'midnight';
|
|
223
|
+
shortcut?: string;
|
|
224
|
+
jsonBackupEnabled?: boolean;
|
|
225
|
+
realtimeSyncEnabled?: boolean;
|
|
226
|
+
schedulePreferences?: {
|
|
227
|
+
showWeekends?: boolean;
|
|
228
|
+
isCalendarSidebarOpen?: boolean;
|
|
229
|
+
weekStartsOn?: 'sunday' | 'monday';
|
|
230
|
+
dailyCapacity?: {
|
|
231
|
+
monday?: number;
|
|
232
|
+
tuesday?: number;
|
|
233
|
+
wednesday?: number;
|
|
234
|
+
thursday?: number;
|
|
235
|
+
friday?: number;
|
|
236
|
+
saturday?: number;
|
|
237
|
+
sunday?: number;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
email?: {
|
|
241
|
+
provider?: 'console' | 'resend' | 'google-workspace';
|
|
242
|
+
from?: string;
|
|
243
|
+
replyTo?: string;
|
|
244
|
+
providerApiKey?: string;
|
|
245
|
+
};
|
|
246
|
+
auth?: {
|
|
247
|
+
allowSelfRegistration?: boolean;
|
|
248
|
+
requireVerifiedEmail?: boolean;
|
|
249
|
+
defaultNewUserBetaAccess?: boolean;
|
|
250
|
+
authRateLimitEnabled?: boolean;
|
|
251
|
+
authRateLimitMaxRequests?: number;
|
|
252
|
+
authRateLimitWindowMs?: number;
|
|
253
|
+
};
|
|
254
|
+
setup?: {
|
|
255
|
+
mode?: 'core' | 'operations';
|
|
256
|
+
forceSetup?: boolean;
|
|
257
|
+
forceGlobalSetup?: boolean;
|
|
258
|
+
forceWorkspaceSetup?: boolean;
|
|
259
|
+
};
|
|
260
|
+
objectStorage?: {
|
|
261
|
+
keyPrefix?: string;
|
|
262
|
+
signedUploadTtlSeconds?: number;
|
|
263
|
+
signedDownloadTtlSeconds?: number;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
interface UserGlobalSyncSettings {
|
|
267
|
+
theme?: 'dark' | 'light' | 'midnight';
|
|
268
|
+
operatingMode?: 'core' | 'operations';
|
|
269
|
+
localization?: {
|
|
270
|
+
locale?: string;
|
|
271
|
+
weekStartsOn?: 'sunday' | 'monday';
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
type AccessRole = 'owner' | 'admin' | 'member' | 'read-only';
|
|
275
|
+
export type SystemRole = 'system_admin' | 'user';
|
|
276
|
+
type PermissionMode = 'read-only' | 'read-write';
|
|
277
|
+
interface UserAccessRecord {
|
|
278
|
+
userId: string;
|
|
279
|
+
workspaceId: string;
|
|
280
|
+
role: AccessRole;
|
|
281
|
+
permissionMode: PermissionMode;
|
|
282
|
+
disabled: boolean;
|
|
283
|
+
betaAccess: boolean;
|
|
284
|
+
}
|
|
285
|
+
interface UserIdentityRecord {
|
|
286
|
+
userId: string;
|
|
287
|
+
email: string;
|
|
288
|
+
systemRole?: SystemRole;
|
|
289
|
+
betaAccess?: boolean;
|
|
290
|
+
}
|
|
291
|
+
interface WorkspaceUserRecord {
|
|
292
|
+
userId: string;
|
|
293
|
+
email: string;
|
|
294
|
+
displayName?: string | null;
|
|
295
|
+
role: AccessRole;
|
|
296
|
+
permissionMode: PermissionMode;
|
|
297
|
+
betaAccess: boolean;
|
|
298
|
+
status: string;
|
|
299
|
+
disabled: boolean;
|
|
300
|
+
createdAt?: string | null;
|
|
301
|
+
updatedAt?: string | null;
|
|
302
|
+
emailVerifiedAt?: string | null;
|
|
303
|
+
}
|
|
304
|
+
interface SystemUserRecord {
|
|
305
|
+
userId: string;
|
|
306
|
+
email: string;
|
|
307
|
+
displayName?: string | null;
|
|
308
|
+
systemRole: SystemRole;
|
|
309
|
+
betaAccess: boolean;
|
|
310
|
+
disabled: boolean;
|
|
311
|
+
createdAt?: string | null;
|
|
312
|
+
updatedAt?: string | null;
|
|
313
|
+
emailVerifiedAt?: string | null;
|
|
314
|
+
}
|
|
315
|
+
export type SetupState = 'present' | 'missing' | 'unreadable';
|
|
316
|
+
export type RuntimeMode = 'local' | 'cloud';
|
|
317
|
+
export type WorkspaceMode = 'core' | 'operations';
|
|
318
|
+
export interface WorkspaceProfileRecord {
|
|
319
|
+
id: string;
|
|
320
|
+
slug?: string | null;
|
|
321
|
+
name: string;
|
|
322
|
+
description?: string | null;
|
|
323
|
+
}
|
|
324
|
+
export interface UserWorkspaceRecord {
|
|
325
|
+
id: string;
|
|
326
|
+
slug?: string | null;
|
|
327
|
+
name: string;
|
|
328
|
+
description?: string | null;
|
|
329
|
+
role: AccessRole;
|
|
330
|
+
status: string;
|
|
331
|
+
betaAccess: boolean;
|
|
332
|
+
}
|
|
333
|
+
export interface WorkspaceDeletedAssetRecord {
|
|
334
|
+
path: string;
|
|
335
|
+
provider: 'local' | 'r2';
|
|
336
|
+
workspaceId: string;
|
|
337
|
+
}
|
|
338
|
+
export interface WorkspaceDeleteSummary {
|
|
339
|
+
deletedWorkspaceId: string;
|
|
340
|
+
deletedTaskIds: string[];
|
|
341
|
+
deletedDocumentPaths: string[];
|
|
342
|
+
deletedAssets: WorkspaceDeletedAssetRecord[];
|
|
343
|
+
counts: Record<string, number>;
|
|
344
|
+
}
|
|
345
|
+
export interface SetupStateSnapshot {
|
|
346
|
+
globalSetupState: SetupState;
|
|
347
|
+
workspaceSetupState: SetupState;
|
|
348
|
+
runtimeMode: RuntimeMode;
|
|
349
|
+
workspaceId: string;
|
|
350
|
+
mode: WorkspaceMode;
|
|
351
|
+
forceSetup: boolean;
|
|
352
|
+
forceGlobalSetup: boolean;
|
|
353
|
+
forceWorkspaceSetup: boolean;
|
|
354
|
+
workspace?: WorkspaceProfileRecord | null;
|
|
355
|
+
suggestedWorkspaceName?: string;
|
|
356
|
+
}
|
|
357
|
+
interface WorkspaceProfileUpdateInput {
|
|
358
|
+
name: string;
|
|
359
|
+
description?: string | null;
|
|
360
|
+
slug?: string | null;
|
|
361
|
+
}
|
|
362
|
+
interface CreateTaskOptions {
|
|
363
|
+
persistBackup?: boolean;
|
|
364
|
+
workspaceId?: string;
|
|
365
|
+
allowClientProvidedId?: boolean;
|
|
366
|
+
}
|
|
367
|
+
interface AdminAuditLogRecord {
|
|
368
|
+
id: string;
|
|
369
|
+
ts: string;
|
|
370
|
+
action: string;
|
|
371
|
+
actorUserId: string;
|
|
372
|
+
actorRole: string;
|
|
373
|
+
workspaceId: string;
|
|
374
|
+
details: Record<string, unknown>;
|
|
375
|
+
}
|
|
376
|
+
export type EntitlementState = 'active' | 'trialing' | 'grace' | 'suspended' | 'canceled';
|
|
377
|
+
export type PlanFeatureAccess = 'enabled' | 'disabled' | 'limited';
|
|
378
|
+
export interface PlanFeatureSnapshot {
|
|
379
|
+
featureKey: string;
|
|
380
|
+
access: PlanFeatureAccess;
|
|
381
|
+
config: Record<string, unknown>;
|
|
382
|
+
}
|
|
383
|
+
export interface PlanVersionSnapshot {
|
|
384
|
+
planVersionId: string;
|
|
385
|
+
planId: string;
|
|
386
|
+
versionNumber: number;
|
|
387
|
+
isDefault: boolean;
|
|
388
|
+
seatLimit: number | null;
|
|
389
|
+
metadata: Record<string, unknown>;
|
|
390
|
+
features: Record<string, PlanFeatureSnapshot>;
|
|
391
|
+
}
|
|
392
|
+
export interface PlanCatalogSnapshot {
|
|
393
|
+
planId: string;
|
|
394
|
+
displayName: string;
|
|
395
|
+
status: 'active' | 'archived';
|
|
396
|
+
createdAt: string;
|
|
397
|
+
updatedAt: string;
|
|
398
|
+
}
|
|
399
|
+
export interface AccountEntitlementSnapshot {
|
|
400
|
+
accountId: string;
|
|
401
|
+
planVersionId: string;
|
|
402
|
+
planId: string;
|
|
403
|
+
state: EntitlementState;
|
|
404
|
+
effectiveAt: string | null;
|
|
405
|
+
effectiveUntil: string | null;
|
|
406
|
+
version: PlanVersionSnapshot;
|
|
407
|
+
}
|
|
408
|
+
export interface SeatUsageSnapshot {
|
|
409
|
+
used: number;
|
|
410
|
+
limit: number | null;
|
|
411
|
+
remaining: number | null;
|
|
412
|
+
}
|
|
413
|
+
export interface FeatureEvaluationResult {
|
|
414
|
+
allowed: boolean;
|
|
415
|
+
reasonCode: string;
|
|
416
|
+
state: EntitlementState;
|
|
417
|
+
seatUsage?: SeatUsageSnapshot;
|
|
418
|
+
feature?: PlanFeatureSnapshot;
|
|
419
|
+
}
|
|
420
|
+
interface PasswordAuthResult {
|
|
421
|
+
ok: boolean;
|
|
422
|
+
access?: {
|
|
423
|
+
userId: string;
|
|
424
|
+
workspaceId: string;
|
|
425
|
+
role: AccessRole;
|
|
426
|
+
};
|
|
427
|
+
code?: 'INVALID_CREDENTIALS' | 'EMAIL_NOT_VERIFIED';
|
|
428
|
+
}
|
|
429
|
+
export declare class TaskforceCore {
|
|
430
|
+
private static readonly DEFAULT_CATEGORY_VALUE;
|
|
431
|
+
private static readonly DEFAULT_APPROACH_VALUE;
|
|
432
|
+
private projectRoot;
|
|
433
|
+
private basePath;
|
|
434
|
+
private dbPath;
|
|
435
|
+
private configFile;
|
|
436
|
+
private globalSettingsDbPath;
|
|
437
|
+
private screenshotsDir;
|
|
438
|
+
private contextFilesDir;
|
|
439
|
+
private taskDataDir;
|
|
440
|
+
private tenantId;
|
|
441
|
+
private db;
|
|
442
|
+
private globalSettingsDb;
|
|
443
|
+
private realtimeMutationListeners;
|
|
444
|
+
private readonly realtimeServerEpoch;
|
|
445
|
+
private realtimeMutationSeq;
|
|
446
|
+
private emitRealtimeMutation;
|
|
447
|
+
onRealtimeMutation(listener: (event: RealtimeMutationEvent) => void): () => void;
|
|
448
|
+
private normalizePriorityValue;
|
|
449
|
+
private normalizePriorityDefinitions;
|
|
450
|
+
private migratePriorityScaleIfNeeded;
|
|
451
|
+
private migrateOnHoldPriorityToStatusIfNeeded;
|
|
452
|
+
private healPriorityConfigIfNeeded;
|
|
453
|
+
private estimateComplexity;
|
|
454
|
+
private isAiCreated;
|
|
455
|
+
private normalizeCommentAuthor;
|
|
456
|
+
private normalizeTaxonomyToken;
|
|
457
|
+
private normalizeStatusValue;
|
|
458
|
+
private sanitizeAssignee;
|
|
459
|
+
private inferAssigneeFromOwnerHints;
|
|
460
|
+
private resolveTaxonomyValue;
|
|
461
|
+
private enforceCreateTaskTaxonomy;
|
|
462
|
+
private sanitizeParentTaskId;
|
|
463
|
+
private sanitizeChildDisplayOrder;
|
|
464
|
+
private sanitizeDateOnly;
|
|
465
|
+
private sanitizeOrderInDay;
|
|
466
|
+
private formatDateOnlyUtc;
|
|
467
|
+
private parseDateOnlyUtc;
|
|
468
|
+
private dateOnlyToIsoWeekKey;
|
|
469
|
+
private parseIsoWeekKeyToDates;
|
|
470
|
+
private todayDateOnlyLocal;
|
|
471
|
+
private normalizeWorkspaceId;
|
|
472
|
+
private buildSchedulingWarnings;
|
|
473
|
+
private nextChildDisplayOrder;
|
|
474
|
+
private taskExists;
|
|
475
|
+
private valueEqualsForBulkUpdate;
|
|
476
|
+
private hasNonTerminalDirectChildren;
|
|
477
|
+
private hasDirectChildren;
|
|
478
|
+
private getTaskHierarchyRows;
|
|
479
|
+
private buildTaskHierarchyIndex;
|
|
480
|
+
private getDescendantIds;
|
|
481
|
+
private hasOpenDescendants;
|
|
482
|
+
private recomputeTaskAndAncestorCompletionFromDescendants;
|
|
483
|
+
private createsParentCycle;
|
|
484
|
+
private assertParentLinkAllowed;
|
|
485
|
+
constructor(config: TaskforceConfig);
|
|
486
|
+
close(): void;
|
|
487
|
+
getDatabaseAdapter(): DatabaseAdapter;
|
|
488
|
+
getTenantId(): string;
|
|
489
|
+
private parseJsonObject;
|
|
490
|
+
private normalizeEntitlementState;
|
|
491
|
+
private normalizeFeatureAccess;
|
|
492
|
+
private isEntitlementStateAllowed;
|
|
493
|
+
private ensureDefaultPlanCatalog;
|
|
494
|
+
private resolvePlanVersionIdForTier;
|
|
495
|
+
private resolveEntitlementStateForBillingValue;
|
|
496
|
+
private ensureAccountEntitlementRecord;
|
|
497
|
+
private backfillAccountEntitlements;
|
|
498
|
+
createUserBillingRecord(userId: string): void;
|
|
499
|
+
getUserEntitlement(userId: string): {
|
|
500
|
+
entitlementState: string;
|
|
501
|
+
tier: string;
|
|
502
|
+
};
|
|
503
|
+
getEffectivePlanVersion(accountId: string): PlanVersionSnapshot;
|
|
504
|
+
getAccountEntitlement(accountId: string): AccountEntitlementSnapshot;
|
|
505
|
+
countWorkspaceSeatUsage(workspaceId: string, options?: {
|
|
506
|
+
includeInvited?: boolean;
|
|
507
|
+
}): SeatUsageSnapshot;
|
|
508
|
+
assertSeatAvailable(workspaceId: string): void;
|
|
509
|
+
evaluateFeatureAccess(input: {
|
|
510
|
+
userId: string;
|
|
511
|
+
workspaceId: string;
|
|
512
|
+
featureKey: string;
|
|
513
|
+
action?: string;
|
|
514
|
+
context?: Record<string, unknown>;
|
|
515
|
+
}): FeatureEvaluationResult;
|
|
516
|
+
getUserAccountPlanMode(userId: string): 'personal' | 'team';
|
|
517
|
+
setUserAccountPlanMode(userId: string, mode: 'personal' | 'team'): 'personal' | 'team';
|
|
518
|
+
private ensureDirectories;
|
|
519
|
+
private migrateLegacyGlobalSettingsDbIfNeeded;
|
|
520
|
+
private initializeSchema;
|
|
521
|
+
private performMigrationIfNeeded;
|
|
522
|
+
private migrateSystemRoleBackfillIfNeeded;
|
|
523
|
+
private migrateUserBetaAccessBackfillIfNeeded;
|
|
524
|
+
private getWorkspaceOwnerUserId;
|
|
525
|
+
getWorkspacePlanMode(workspaceId: string): 'personal' | 'team';
|
|
526
|
+
setWorkspacePlanMode(workspaceId: string, mode: 'personal' | 'team', source?: string): 'personal' | 'team';
|
|
527
|
+
private readConfig;
|
|
528
|
+
private writeConfig;
|
|
529
|
+
private getGlobalSettingsStore;
|
|
530
|
+
private ensureGlobalSettingsTable;
|
|
531
|
+
private ensureStructuredSettingsTables;
|
|
532
|
+
private readSettingsPayloadRow;
|
|
533
|
+
private splitGlobalSettingsPayload;
|
|
534
|
+
private writeSettingsPayloadRow;
|
|
535
|
+
private hasPersistedGlobalSettings;
|
|
536
|
+
private readGlobalConfig;
|
|
537
|
+
private writeGlobalConfig;
|
|
538
|
+
getGlobalSettings(): GlobalTaskforceSettings;
|
|
539
|
+
hasProjectThemeOverride(): boolean;
|
|
540
|
+
getEffectiveTheme(): 'dark' | 'light' | 'midnight';
|
|
541
|
+
hasProjectJsonBackupOverride(): boolean;
|
|
542
|
+
updateGlobalSettings(settings: GlobalTaskforceSettings): void;
|
|
543
|
+
private sanitizeUserGlobalSyncSettings;
|
|
544
|
+
getUserGlobalSyncSettings(userId: string): {
|
|
545
|
+
settings: UserGlobalSyncSettings;
|
|
546
|
+
updatedAt: string | null;
|
|
547
|
+
};
|
|
548
|
+
upsertUserGlobalSyncSettings(userId: string, settings: unknown, updatedAt?: string | null): {
|
|
549
|
+
settings: UserGlobalSyncSettings;
|
|
550
|
+
updatedAt: string;
|
|
551
|
+
applied: boolean;
|
|
552
|
+
};
|
|
553
|
+
getJsonBackupEnabled(): boolean;
|
|
554
|
+
private rowToTask;
|
|
555
|
+
private generateId;
|
|
556
|
+
private generateEntityId;
|
|
557
|
+
private detectDefaultLocalWorkspaceName;
|
|
558
|
+
private normalizeWorkspaceMode;
|
|
559
|
+
private humanizeWorkspaceIdentifier;
|
|
560
|
+
private backfillWorkspaceProfilesForCompatibility;
|
|
561
|
+
private isPlaceholderWorkspaceName;
|
|
562
|
+
private normalizeWorkspaceSlug;
|
|
563
|
+
private createWorkspaceRecord;
|
|
564
|
+
createWorkspace(input: {
|
|
565
|
+
workspaceId?: string | null;
|
|
566
|
+
name: string;
|
|
567
|
+
description?: string | null;
|
|
568
|
+
slug?: string | null;
|
|
569
|
+
}): WorkspaceProfileRecord;
|
|
570
|
+
getWorkspaceProfile(workspaceId: string): WorkspaceProfileRecord | null;
|
|
571
|
+
listUserWorkspaces(userId: string): UserWorkspaceRecord[];
|
|
572
|
+
createWorkspaceForUser(input: {
|
|
573
|
+
userId: string;
|
|
574
|
+
name: string;
|
|
575
|
+
description?: string | null;
|
|
576
|
+
role?: AccessRole;
|
|
577
|
+
preferredWorkspaceId?: string;
|
|
578
|
+
}): UserWorkspaceRecord;
|
|
579
|
+
deleteWorkspace(input: {
|
|
580
|
+
workspaceId: string;
|
|
581
|
+
}): WorkspaceDeleteSummary;
|
|
582
|
+
updateWorkspaceProfile(workspaceId: string, input: WorkspaceProfileUpdateInput): WorkspaceProfileRecord;
|
|
583
|
+
getSetupState(workspaceId: string, runtimeMode?: RuntimeMode): SetupStateSnapshot;
|
|
584
|
+
getPaths(): {
|
|
585
|
+
projectRoot: string;
|
|
586
|
+
projectName: string;
|
|
587
|
+
tenantId: string;
|
|
588
|
+
basePath: string;
|
|
589
|
+
taskDataDir: string;
|
|
590
|
+
screenshotsDir: string;
|
|
591
|
+
contextFilesDir: string;
|
|
592
|
+
mcpScript: string;
|
|
593
|
+
};
|
|
594
|
+
workspaceExists(workspaceId: string): boolean;
|
|
595
|
+
resolvePreferredWorkspaceId(options?: {
|
|
596
|
+
allowDefault?: boolean;
|
|
597
|
+
}): string | null;
|
|
598
|
+
resolvePreferredUserWorkspaceId(userId: string, options?: {
|
|
599
|
+
preferredWorkspaceId?: string | null;
|
|
600
|
+
persistedWorkspaceId?: string | null;
|
|
601
|
+
}): string | null;
|
|
602
|
+
listTasks(workspaceId?: string): TaskFile;
|
|
603
|
+
getDataVersion(): number;
|
|
604
|
+
getDatabaseProvider(): DatabaseProvider;
|
|
605
|
+
isDatabaseHealthy(): boolean;
|
|
606
|
+
listArchive(workspaceId?: string): ArchiveFile;
|
|
607
|
+
getStats(workspaceId?: string): {
|
|
608
|
+
active: {
|
|
609
|
+
total: number;
|
|
610
|
+
byStatus: Record<string, number>;
|
|
611
|
+
byPriority: Record<number, number>;
|
|
612
|
+
};
|
|
613
|
+
archived: {
|
|
614
|
+
total: number;
|
|
615
|
+
doneCount: number;
|
|
616
|
+
cancelledCount: number;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
private normalizeAccessRole;
|
|
620
|
+
private normalizeSystemRole;
|
|
621
|
+
private normalizePermissionMode;
|
|
622
|
+
ensureBootstrapUserAccess(input: {
|
|
623
|
+
userId: string;
|
|
624
|
+
workspaceId: string;
|
|
625
|
+
role: AccessRole;
|
|
626
|
+
email?: string;
|
|
627
|
+
displayName?: string;
|
|
628
|
+
}): UserAccessRecord;
|
|
629
|
+
resolveUserAccess(userId: string, workspaceId: string, fallbackRole?: AccessRole): UserAccessRecord | null;
|
|
630
|
+
resolveUserIdentity(userId: string): UserIdentityRecord | null;
|
|
631
|
+
getSystemRole(userId: string): SystemRole;
|
|
632
|
+
getUserBetaAccess(userId: string): boolean;
|
|
633
|
+
countSystemAdmins(): number;
|
|
634
|
+
hasAnySystemAdmin(): boolean;
|
|
635
|
+
listSystemUsers(): SystemUserRecord[];
|
|
636
|
+
setSystemRole(userId: string, role: SystemRole): boolean;
|
|
637
|
+
setUserDisabledGlobal(userId: string, disabled: boolean): boolean;
|
|
638
|
+
setUserBetaAccessGlobal(userId: string, enabled: boolean): boolean;
|
|
639
|
+
listWorkspaceUsers(workspaceId: string): WorkspaceUserRecord[];
|
|
640
|
+
addAdminAuditLog(input: {
|
|
641
|
+
action: string;
|
|
642
|
+
actorUserId: string;
|
|
643
|
+
actorRole: string;
|
|
644
|
+
workspaceId: string;
|
|
645
|
+
details?: Record<string, unknown>;
|
|
646
|
+
}): void;
|
|
647
|
+
listAdminAuditLogs(workspaceId: string, limit?: number, offset?: number): AdminAuditLogRecord[];
|
|
648
|
+
countAdminAuditLogs(workspaceId: string): number;
|
|
649
|
+
private isValidEntitlementTransition;
|
|
650
|
+
addEntitlementAuditLog(input: {
|
|
651
|
+
actorUserId: string;
|
|
652
|
+
actorRole: string;
|
|
653
|
+
accountId: string;
|
|
654
|
+
action: string;
|
|
655
|
+
reason?: string;
|
|
656
|
+
before?: unknown;
|
|
657
|
+
after?: unknown;
|
|
658
|
+
requestId?: string;
|
|
659
|
+
}): void;
|
|
660
|
+
upsertPlanCatalog(input: {
|
|
661
|
+
planId: string;
|
|
662
|
+
displayName: string;
|
|
663
|
+
status?: 'active' | 'archived';
|
|
664
|
+
}): {
|
|
665
|
+
planId: string;
|
|
666
|
+
displayName: string;
|
|
667
|
+
status: 'active' | 'archived';
|
|
668
|
+
};
|
|
669
|
+
listPlanCatalog(): PlanCatalogSnapshot[];
|
|
670
|
+
listPlanVersions(planId: string): PlanVersionSnapshot[];
|
|
671
|
+
getPlanVersionFeatures(planId: string, versionId: string): PlanVersionSnapshot;
|
|
672
|
+
searchAccountsByEmail(query: string, limit?: number): Array<{
|
|
673
|
+
accountId: string;
|
|
674
|
+
email: string;
|
|
675
|
+
displayName: string | null;
|
|
676
|
+
disabled: boolean;
|
|
677
|
+
}>;
|
|
678
|
+
createPlanVersion(input: {
|
|
679
|
+
planId: string;
|
|
680
|
+
versionNumber: number;
|
|
681
|
+
isDefault?: boolean;
|
|
682
|
+
seatLimit?: number | null;
|
|
683
|
+
metadata?: Record<string, unknown>;
|
|
684
|
+
}): PlanVersionSnapshot;
|
|
685
|
+
private getPlanVersionSnapshot;
|
|
686
|
+
updatePlanVersionFeatures(input: {
|
|
687
|
+
planVersionId: string;
|
|
688
|
+
features: Array<{
|
|
689
|
+
featureKey: string;
|
|
690
|
+
access: PlanFeatureAccess;
|
|
691
|
+
config?: Record<string, unknown>;
|
|
692
|
+
}>;
|
|
693
|
+
}): PlanVersionSnapshot;
|
|
694
|
+
updateAccountEntitlement(input: {
|
|
695
|
+
accountId: string;
|
|
696
|
+
planVersionId?: string;
|
|
697
|
+
entitlementState?: EntitlementState;
|
|
698
|
+
effectiveAt?: string | null;
|
|
699
|
+
effectiveUntil?: string | null;
|
|
700
|
+
actorUserId: string;
|
|
701
|
+
actorRole: string;
|
|
702
|
+
reason?: string;
|
|
703
|
+
requestId?: string;
|
|
704
|
+
}): AccountEntitlementSnapshot;
|
|
705
|
+
listEntitlementAuditLog(accountId: string, limit?: number, offset?: number): Array<{
|
|
706
|
+
id: string;
|
|
707
|
+
accountId: string;
|
|
708
|
+
action: string;
|
|
709
|
+
actorUserId: string;
|
|
710
|
+
actorRole: string;
|
|
711
|
+
reason: string | null;
|
|
712
|
+
before: Record<string, unknown>;
|
|
713
|
+
after: Record<string, unknown>;
|
|
714
|
+
createdAt: string;
|
|
715
|
+
}>;
|
|
716
|
+
getAccountEntitlementsPayload(input: {
|
|
717
|
+
userId: string;
|
|
718
|
+
workspaceId: string;
|
|
719
|
+
}): {
|
|
720
|
+
accountId: string;
|
|
721
|
+
workspaceId: string;
|
|
722
|
+
planId: string;
|
|
723
|
+
planVersionId: string;
|
|
724
|
+
state: EntitlementState;
|
|
725
|
+
effectiveAt: string | null;
|
|
726
|
+
effectiveUntil: string | null;
|
|
727
|
+
seatUsage: SeatUsageSnapshot;
|
|
728
|
+
features: Record<string, {
|
|
729
|
+
allowed: boolean;
|
|
730
|
+
access: PlanFeatureAccess;
|
|
731
|
+
config: Record<string, unknown>;
|
|
732
|
+
}>;
|
|
733
|
+
};
|
|
734
|
+
inviteWorkspaceUser(input: {
|
|
735
|
+
workspaceId: string;
|
|
736
|
+
email: string;
|
|
737
|
+
displayName?: string;
|
|
738
|
+
role?: AccessRole;
|
|
739
|
+
betaAccess?: boolean;
|
|
740
|
+
}): WorkspaceUserRecord;
|
|
741
|
+
setWorkspaceUserDisabled(userId: string, workspaceId: string, disabled: boolean): boolean;
|
|
742
|
+
setWorkspaceUserBetaAccess(userId: string, workspaceId: string, enabled: boolean): boolean;
|
|
743
|
+
hasWorkspaceAdmin(workspaceId: string): boolean;
|
|
744
|
+
countWorkspaceOwners(workspaceId: string): number;
|
|
745
|
+
setWorkspaceUserPermissionMode(userId: string, workspaceId: string, mode: PermissionMode): boolean;
|
|
746
|
+
removeWorkspaceUser(userId: string, workspaceId: string): boolean;
|
|
747
|
+
transferWorkspaceOwnership(input: {
|
|
748
|
+
workspaceId: string;
|
|
749
|
+
fromUserId: string;
|
|
750
|
+
toUserId: string;
|
|
751
|
+
}): boolean;
|
|
752
|
+
ensurePasswordUser(input: {
|
|
753
|
+
email: string;
|
|
754
|
+
password: string;
|
|
755
|
+
workspaceId: string;
|
|
756
|
+
role?: AccessRole;
|
|
757
|
+
displayName?: string;
|
|
758
|
+
emailVerified?: boolean;
|
|
759
|
+
betaAccess?: boolean;
|
|
760
|
+
}): {
|
|
761
|
+
userId: string;
|
|
762
|
+
workspaceId: string;
|
|
763
|
+
role: AccessRole;
|
|
764
|
+
};
|
|
765
|
+
registerPasswordUser(input: {
|
|
766
|
+
email: string;
|
|
767
|
+
password: string;
|
|
768
|
+
workspaceId?: string;
|
|
769
|
+
role?: AccessRole;
|
|
770
|
+
displayName?: string;
|
|
771
|
+
betaAccess?: boolean;
|
|
772
|
+
}): {
|
|
773
|
+
userId: string;
|
|
774
|
+
workspaceId: string | null;
|
|
775
|
+
role: AccessRole;
|
|
776
|
+
};
|
|
777
|
+
private createOneTimeAuthToken;
|
|
778
|
+
private consumeOneTimeAuthToken;
|
|
779
|
+
private inspectOneTimeAuthToken;
|
|
780
|
+
isEmailVerified(email: string): boolean;
|
|
781
|
+
markEmailVerified(email: string): boolean;
|
|
782
|
+
requestEmailVerification(input: {
|
|
783
|
+
email: string;
|
|
784
|
+
ttlSeconds?: number;
|
|
785
|
+
}): {
|
|
786
|
+
token?: string;
|
|
787
|
+
};
|
|
788
|
+
verifyEmailWithToken(token: string): boolean;
|
|
789
|
+
requestPasswordReset(input: {
|
|
790
|
+
email: string;
|
|
791
|
+
ttlSeconds?: number;
|
|
792
|
+
}): {
|
|
793
|
+
token?: string;
|
|
794
|
+
};
|
|
795
|
+
requestInviteAcceptance(input: {
|
|
796
|
+
userId: string;
|
|
797
|
+
workspaceId: string;
|
|
798
|
+
ttlSeconds?: number;
|
|
799
|
+
}): {
|
|
800
|
+
token?: string;
|
|
801
|
+
};
|
|
802
|
+
revokeInviteAcceptanceForUser(userId: string): {
|
|
803
|
+
revoked: number;
|
|
804
|
+
};
|
|
805
|
+
inspectInviteAcceptance(token: string): {
|
|
806
|
+
state: 'valid' | 'expired' | 'used' | 'missing' | 'revoked';
|
|
807
|
+
email?: string;
|
|
808
|
+
userId?: string;
|
|
809
|
+
workspaceId?: string;
|
|
810
|
+
};
|
|
811
|
+
acceptInviteWithToken(input: {
|
|
812
|
+
token: string;
|
|
813
|
+
password: string;
|
|
814
|
+
}): {
|
|
815
|
+
userId: string;
|
|
816
|
+
email: string;
|
|
817
|
+
workspaceId: string;
|
|
818
|
+
role: AccessRole;
|
|
819
|
+
};
|
|
820
|
+
resetPasswordWithToken(input: {
|
|
821
|
+
token: string;
|
|
822
|
+
password: string;
|
|
823
|
+
}): boolean;
|
|
824
|
+
authenticatePasswordUserDetailed(input: {
|
|
825
|
+
email: string;
|
|
826
|
+
password: string;
|
|
827
|
+
workspaceId: string;
|
|
828
|
+
fallbackRole?: AccessRole;
|
|
829
|
+
requireVerifiedEmail?: boolean;
|
|
830
|
+
}): PasswordAuthResult;
|
|
831
|
+
authenticatePasswordUser(input: {
|
|
832
|
+
email: string;
|
|
833
|
+
password: string;
|
|
834
|
+
workspaceId: string;
|
|
835
|
+
fallbackRole?: AccessRole;
|
|
836
|
+
}): {
|
|
837
|
+
userId: string;
|
|
838
|
+
workspaceId: string;
|
|
839
|
+
role: AccessRole;
|
|
840
|
+
} | null;
|
|
841
|
+
updateWorkspaceUserRole(userId: string, workspaceId: string, role: AccessRole): boolean;
|
|
842
|
+
getTask(id: string, workspaceId?: string): TaskItem | null;
|
|
843
|
+
getScheduleBoard(weekKey: string, showWeekends?: boolean, workspaceId?: string): ScheduleBoardResult;
|
|
844
|
+
updateTaskSchedule(id: string, input: {
|
|
845
|
+
scheduledDate: string | null;
|
|
846
|
+
orderInDay?: number | null;
|
|
847
|
+
}, workspaceId?: string): {
|
|
848
|
+
task: TaskItem;
|
|
849
|
+
warnings: TaskWarning[];
|
|
850
|
+
} | null;
|
|
851
|
+
reorderScheduledTasks(moves: Array<{
|
|
852
|
+
id: string;
|
|
853
|
+
scheduledDate: string | null;
|
|
854
|
+
orderInDay?: number | null;
|
|
855
|
+
}>, workspaceId?: string): {
|
|
856
|
+
tasks: TaskItem[];
|
|
857
|
+
warnings: TaskWarning[];
|
|
858
|
+
};
|
|
859
|
+
createTask(input: Partial<TaskItem>, options?: CreateTaskOptions): TaskItem;
|
|
860
|
+
bulkCreateTasks(tasks: Array<Partial<TaskItem>>, options?: {
|
|
861
|
+
atomic?: boolean;
|
|
862
|
+
validateOnly?: boolean;
|
|
863
|
+
workspaceId?: string;
|
|
864
|
+
allowClientProvidedId?: boolean;
|
|
865
|
+
}): BulkCreateTaskResult;
|
|
866
|
+
updateTask(id: string, updates: Partial<TaskItem>, workspaceId?: string, options?: {
|
|
867
|
+
persistBackup?: boolean;
|
|
868
|
+
}): TaskItem | null;
|
|
869
|
+
addComment(id: string, text: string, author: string, workspaceId?: string): TaskItem | null;
|
|
870
|
+
deleteTask(id: string, workspaceId?: string, options?: {
|
|
871
|
+
persistBackup?: boolean;
|
|
872
|
+
}): boolean;
|
|
873
|
+
deleteTaskForSync(id: string, workspaceId?: string, options?: {
|
|
874
|
+
persistBackup?: boolean;
|
|
875
|
+
}): boolean;
|
|
876
|
+
listWorkspaceSyncDeletes(workspaceId?: string): Array<{
|
|
877
|
+
taskId: string;
|
|
878
|
+
deletedAt: string;
|
|
879
|
+
}>;
|
|
880
|
+
listTasksForSync(workspaceId: string | undefined, cursor: {
|
|
881
|
+
watermark: string;
|
|
882
|
+
id: string;
|
|
883
|
+
} | null, limit: number): Array<{
|
|
884
|
+
task: any;
|
|
885
|
+
archived: boolean;
|
|
886
|
+
}>;
|
|
887
|
+
listWorkspaceSyncDeletesSince(workspaceId: string | undefined, cursor: {
|
|
888
|
+
watermark: string;
|
|
889
|
+
id: string;
|
|
890
|
+
} | null, limit: number): Array<{
|
|
891
|
+
taskId: string;
|
|
892
|
+
deletedAt: string;
|
|
893
|
+
}>;
|
|
894
|
+
archiveTask(id: string, isCancellation?: boolean, reason?: string, workspaceId?: string, options?: {
|
|
895
|
+
persistBackup?: boolean;
|
|
896
|
+
}): TaskItem | null;
|
|
897
|
+
unarchiveTask(id: string, workspaceId?: string, options?: {
|
|
898
|
+
persistBackup?: boolean;
|
|
899
|
+
}): TaskItem | null;
|
|
900
|
+
cancelParentWithOpenDescendants(id: string, input: {
|
|
901
|
+
reason?: string;
|
|
902
|
+
mode: 'cascade' | 'unlink';
|
|
903
|
+
}, workspaceId?: string, options?: {
|
|
904
|
+
persistBackup?: boolean;
|
|
905
|
+
}): TaskItem | null;
|
|
906
|
+
bulkArchive(ids: string[], isCancellation?: boolean, workspaceId?: string): number;
|
|
907
|
+
applyWorkspaceSyncSnapshot(input: {
|
|
908
|
+
tasks?: Array<Partial<TaskItem>>;
|
|
909
|
+
archived?: Array<Partial<TaskItem>>;
|
|
910
|
+
}, workspaceId?: string): {
|
|
911
|
+
total: number;
|
|
912
|
+
created: number;
|
|
913
|
+
updated: number;
|
|
914
|
+
archived: number;
|
|
915
|
+
unarchived: number;
|
|
916
|
+
skipped: number;
|
|
917
|
+
};
|
|
918
|
+
updateConfig(newConfig: any): void;
|
|
919
|
+
getUiState(workspaceId: string, userId: string, stateKey?: string): Record<string, unknown> | null;
|
|
920
|
+
updateUiState(workspaceId: string, userId: string, input: {
|
|
921
|
+
stateKey?: string;
|
|
922
|
+
patch: Record<string, unknown>;
|
|
923
|
+
}): Record<string, unknown>;
|
|
924
|
+
readPushIdempotency(workspaceId: string, idempotencyKey: string): string | null;
|
|
925
|
+
writePushIdempotency(workspaceId: string, idempotencyKey: string, payload: string): void;
|
|
926
|
+
recordSyncEvent(workspaceId: string, event: {
|
|
927
|
+
eventType: 'apply' | 'push' | 'pull' | 'handshake' | 'bootstrap';
|
|
928
|
+
status: 'success' | 'error';
|
|
929
|
+
statusCode?: number;
|
|
930
|
+
errorMessage?: string;
|
|
931
|
+
changeCount?: number;
|
|
932
|
+
requestMs?: number;
|
|
933
|
+
}): void;
|
|
934
|
+
listSyncEvents(workspaceId: string, limit?: number): Array<{
|
|
935
|
+
id: number;
|
|
936
|
+
eventType: string;
|
|
937
|
+
status: string;
|
|
938
|
+
statusCode: number | null;
|
|
939
|
+
errorMessage: string | null;
|
|
940
|
+
changeCount: number | null;
|
|
941
|
+
requestMs: number | null;
|
|
942
|
+
occurredAt: string;
|
|
943
|
+
}>;
|
|
944
|
+
/**
|
|
945
|
+
* Returns the persisted updatedAt watermark and content hash for a document path.
|
|
946
|
+
* Returns null if no record exists yet.
|
|
947
|
+
*/
|
|
948
|
+
getDocumentWatermark(workspaceId: string, docPath: string): {
|
|
949
|
+
updatedAt: string;
|
|
950
|
+
contentHash: string;
|
|
951
|
+
} | null;
|
|
952
|
+
hasDocumentPathInOtherWorkspaces(workspaceId: string, docPath: string): boolean;
|
|
953
|
+
hasTaskAssetPathInOtherWorkspaces(workspaceId: string, pathValue: string): boolean;
|
|
954
|
+
/**
|
|
955
|
+
* Upserts the watermark for a document path. If the content hash matches the existing
|
|
956
|
+
* record the updatedAt is NOT advanced — only a new or changed hash triggers an update.
|
|
957
|
+
*/
|
|
958
|
+
upsertDocumentWatermark(workspaceId: string, docPath: string, contentHash: string, updatedAt: string): void;
|
|
959
|
+
deleteDocumentWatermark(workspaceId: string, docPath: string): void;
|
|
960
|
+
getCategories(): CategoryConfig[];
|
|
961
|
+
updateCategories(categories: Array<string | CategoryConfig>): void;
|
|
962
|
+
searchTasks(query: string, scope?: 'all' | 'active' | 'archive', workspaceId?: string): TaskItem[];
|
|
963
|
+
getTypes(): Array<{
|
|
964
|
+
value: string;
|
|
965
|
+
label: string;
|
|
966
|
+
}>;
|
|
967
|
+
updateTypes(types: Array<{
|
|
968
|
+
value: string;
|
|
969
|
+
label: string;
|
|
970
|
+
}>): void;
|
|
971
|
+
getTaxonomies(): any[];
|
|
972
|
+
getTaxonomiesSyncSnapshot(): {
|
|
973
|
+
taxonomies: any[];
|
|
974
|
+
updatedAt: string;
|
|
975
|
+
};
|
|
976
|
+
updateTaxonomies(taxonomies: any[]): void;
|
|
977
|
+
getPriorities(): Array<{
|
|
978
|
+
value: number;
|
|
979
|
+
label: string;
|
|
980
|
+
color?: string;
|
|
981
|
+
icon?: string;
|
|
982
|
+
}>;
|
|
983
|
+
updatePriorities(priorities: Array<{
|
|
984
|
+
value: number;
|
|
985
|
+
label: string;
|
|
986
|
+
color?: string;
|
|
987
|
+
icon?: string;
|
|
988
|
+
}>): void;
|
|
989
|
+
getApproaches(): Array<{
|
|
990
|
+
value: string;
|
|
991
|
+
label: string;
|
|
992
|
+
color?: string;
|
|
993
|
+
icon?: string;
|
|
994
|
+
}>;
|
|
995
|
+
updateApproaches(approaches: Array<{
|
|
996
|
+
value: string;
|
|
997
|
+
label: string;
|
|
998
|
+
color?: string;
|
|
999
|
+
icon?: string;
|
|
1000
|
+
}>): void;
|
|
1001
|
+
private renderChecklistBlocks;
|
|
1002
|
+
private listDirectChildren;
|
|
1003
|
+
getInitiativeTemplates(): InitiativeTemplate[];
|
|
1004
|
+
createInitiativeFromTemplate(input: {
|
|
1005
|
+
templateId: string;
|
|
1006
|
+
title: string;
|
|
1007
|
+
description?: string;
|
|
1008
|
+
category?: string;
|
|
1009
|
+
type?: string;
|
|
1010
|
+
priority?: number;
|
|
1011
|
+
approach?: string;
|
|
1012
|
+
parentTaskId?: string | null;
|
|
1013
|
+
specialists?: string[];
|
|
1014
|
+
createdBy?: string;
|
|
1015
|
+
}, workspaceId?: string): {
|
|
1016
|
+
initiative: TaskItem;
|
|
1017
|
+
milestones: TaskItem[];
|
|
1018
|
+
templateId: string;
|
|
1019
|
+
};
|
|
1020
|
+
cloneChecklistBlocksToChildren(input: {
|
|
1021
|
+
parentTaskId: string;
|
|
1022
|
+
checklistBlocks: {
|
|
1023
|
+
definitionOfDone: string[];
|
|
1024
|
+
rollbackPlan: string[];
|
|
1025
|
+
};
|
|
1026
|
+
}, workspaceId?: string): {
|
|
1027
|
+
updated: number;
|
|
1028
|
+
children: TaskItem[];
|
|
1029
|
+
};
|
|
1030
|
+
bulkUpdateType(fromType: string, toType: string, workspaceId?: string): number;
|
|
1031
|
+
bulkUpdateFieldsPreview(updates: Array<{
|
|
1032
|
+
id: string;
|
|
1033
|
+
[key: string]: any;
|
|
1034
|
+
}>, workspaceId?: string): BulkUpdateFieldsPreview;
|
|
1035
|
+
bulkUpdateFields(updates: Array<{
|
|
1036
|
+
id: string;
|
|
1037
|
+
[key: string]: any;
|
|
1038
|
+
}>, workspaceId?: string): {
|
|
1039
|
+
updated: number;
|
|
1040
|
+
total: number;
|
|
1041
|
+
deduped: number;
|
|
1042
|
+
skippedNoop: number;
|
|
1043
|
+
invalid: number;
|
|
1044
|
+
notFound: number;
|
|
1045
|
+
changes: Array<{
|
|
1046
|
+
id: string;
|
|
1047
|
+
fields: string[];
|
|
1048
|
+
}>;
|
|
1049
|
+
};
|
|
1050
|
+
exportResources(type: string, destinationRelativePath: string, variables?: Record<string, string>, environment?: string): number;
|
|
1051
|
+
exportWorkflows(environment: string, workflowNames?: string[], variables?: any): number;
|
|
1052
|
+
listSpecialists(): any[];
|
|
1053
|
+
listWorkflowTemplates(): any[];
|
|
1054
|
+
getWorkflowTemplate(name: string): any;
|
|
1055
|
+
listWorkflowOverrideNames(): string[];
|
|
1056
|
+
listEnvironments(): any[];
|
|
1057
|
+
/**
|
|
1058
|
+
* Persists a stable JSON backup of all tasks and archives if specified by environment.
|
|
1059
|
+
* This allows for Git versioning of the database content.
|
|
1060
|
+
*/
|
|
1061
|
+
private persistBackup;
|
|
1062
|
+
}
|
|
1063
|
+
export {};
|