@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,134 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import yaml from 'js-yaml';
|
|
6
|
+
import { workflowDocs } from '../src/resources/templates/workflow-sources/workflowDocs.mjs';
|
|
7
|
+
|
|
8
|
+
const ROOT = process.cwd();
|
|
9
|
+
const OUT_DIR = path.join(ROOT, 'src/resources/templates/workflows');
|
|
10
|
+
const OVERRIDES_PATH = path.join(ROOT, 'src/resources/templates/workflow-sources/workflowEditorOverrides.json');
|
|
11
|
+
const CHECK_ONLY = process.argv.includes('--check');
|
|
12
|
+
|
|
13
|
+
const dumpYaml = (doc) =>
|
|
14
|
+
yaml.dump(doc, {
|
|
15
|
+
noRefs: true,
|
|
16
|
+
lineWidth: -1,
|
|
17
|
+
quotingType: '"'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const renderDoc = (doc) =>
|
|
21
|
+
dumpYaml({
|
|
22
|
+
version: 2,
|
|
23
|
+
name: doc.name,
|
|
24
|
+
description: doc.description,
|
|
25
|
+
type: 'workflow',
|
|
26
|
+
metadata: doc.metadata,
|
|
27
|
+
dispatch: doc.dispatch,
|
|
28
|
+
compat: doc.compat,
|
|
29
|
+
toolPolicy: doc.toolPolicy,
|
|
30
|
+
...(doc.artifacts ? { artifacts: doc.artifacts } : {}),
|
|
31
|
+
contextPolicy: doc.contextPolicy,
|
|
32
|
+
prompts: doc.prompts,
|
|
33
|
+
content: doc.content
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const toList = (value) =>
|
|
37
|
+
String(value || '')
|
|
38
|
+
.split(/\n|,/)
|
|
39
|
+
.map((v) => v.trim())
|
|
40
|
+
.filter(Boolean);
|
|
41
|
+
|
|
42
|
+
const applyOverride = (doc, override) => {
|
|
43
|
+
if (!override || typeof override !== 'object') return doc;
|
|
44
|
+
|
|
45
|
+
const next = JSON.parse(JSON.stringify(doc));
|
|
46
|
+
|
|
47
|
+
if (typeof override.description === 'string') {
|
|
48
|
+
next.description = override.description;
|
|
49
|
+
}
|
|
50
|
+
if (typeof override.aliasesText === 'string') {
|
|
51
|
+
const aliases = toList(override.aliasesText);
|
|
52
|
+
if (!next.dispatch) next.dispatch = {};
|
|
53
|
+
next.dispatch.aliases = aliases;
|
|
54
|
+
}
|
|
55
|
+
if (typeof override.dispatchDefault === 'string') {
|
|
56
|
+
if (!next.dispatch) next.dispatch = {};
|
|
57
|
+
next.dispatch.default = override.dispatchDefault.trim();
|
|
58
|
+
}
|
|
59
|
+
if (typeof override.criticalToolsText === 'string') {
|
|
60
|
+
const tools = toList(override.criticalToolsText);
|
|
61
|
+
if (!next.compat) next.compat = {};
|
|
62
|
+
next.compat.requiredToolsCritical = tools;
|
|
63
|
+
}
|
|
64
|
+
if (typeof override.optionalToolsText === 'string') {
|
|
65
|
+
const tools = toList(override.optionalToolsText);
|
|
66
|
+
if (!next.compat) next.compat = {};
|
|
67
|
+
next.compat.requiredToolsOptional = tools;
|
|
68
|
+
}
|
|
69
|
+
if (typeof override.contentDefault === 'string') {
|
|
70
|
+
if (!next.content) next.content = {};
|
|
71
|
+
next.content.default = override.contentDefault;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return next;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const overrides = (() => {
|
|
78
|
+
if (!fs.existsSync(OVERRIDES_PATH)) return {};
|
|
79
|
+
try {
|
|
80
|
+
return JSON.parse(fs.readFileSync(OVERRIDES_PATH, 'utf8') || '{}');
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error(`Invalid workflow overrides JSON at ${OVERRIDES_PATH}`);
|
|
83
|
+
throw e;
|
|
84
|
+
}
|
|
85
|
+
})();
|
|
86
|
+
|
|
87
|
+
if (!fs.existsSync(OUT_DIR)) {
|
|
88
|
+
fs.mkdirSync(OUT_DIR, { recursive: true });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const effectiveDocs = workflowDocs.map((doc) => applyOverride(doc, overrides[doc.name]));
|
|
92
|
+
|
|
93
|
+
const expectedNames = new Set(effectiveDocs.map((doc) => `${doc.name}.yaml`));
|
|
94
|
+
const actualNames = fs.readdirSync(OUT_DIR).filter((file) => file.endsWith('.yaml'));
|
|
95
|
+
|
|
96
|
+
const diffs = [];
|
|
97
|
+
|
|
98
|
+
for (const doc of effectiveDocs) {
|
|
99
|
+
const outPath = path.join(OUT_DIR, `${doc.name}.yaml`);
|
|
100
|
+
const rendered = renderDoc(doc);
|
|
101
|
+
|
|
102
|
+
if (CHECK_ONLY) {
|
|
103
|
+
if (!fs.existsSync(outPath)) {
|
|
104
|
+
diffs.push(`missing: ${doc.name}.yaml`);
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const existing = fs.readFileSync(outPath, 'utf8');
|
|
109
|
+
if (existing !== rendered) {
|
|
110
|
+
diffs.push(`outdated: ${doc.name}.yaml`);
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
fs.writeFileSync(outPath, rendered, 'utf8');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
for (const filename of actualNames) {
|
|
118
|
+
if (!expectedNames.has(filename)) {
|
|
119
|
+
diffs.push(`unexpected: ${filename}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (CHECK_ONLY) {
|
|
124
|
+
if (diffs.length > 0) {
|
|
125
|
+
console.error('Workflow template drift detected:');
|
|
126
|
+
for (const diff of diffs) console.error(`- ${diff}`);
|
|
127
|
+
console.error('Run `npm run gen:workflows` to regenerate templates.');
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
console.log(`Workflow templates are up to date (${effectiveDocs.length} files).`);
|
|
132
|
+
} else {
|
|
133
|
+
console.log(`Generated ${effectiveDocs.length} workflow templates in ${OUT_DIR}`);
|
|
134
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
const projectRoot = process.argv[2] ? path.resolve(process.argv[2]) : process.cwd();
|
|
6
|
+
const distServerPath = path.join(projectRoot, "dist/mcp/server.js");
|
|
7
|
+
const childUsesContentLength = (() => {
|
|
8
|
+
try {
|
|
9
|
+
const source = fs.readFileSync(distServerPath, "utf8");
|
|
10
|
+
return source.includes("ContentLengthStdioServerTransport");
|
|
11
|
+
} catch {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
})();
|
|
15
|
+
|
|
16
|
+
const child = spawn("node", ["dist/mcp/server.js", projectRoot], {
|
|
17
|
+
cwd: projectRoot,
|
|
18
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
child.stderr.on("data", (chunk) => {
|
|
22
|
+
process.stderr.write(chunk);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
child.on("exit", (code, signal) => {
|
|
26
|
+
if (signal) {
|
|
27
|
+
process.stderr.write(`[mcp-adapter] child exited via signal ${signal}\n`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
process.exit(code ?? 0);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
child.on("error", (error) => {
|
|
35
|
+
process.stderr.write(`[mcp-adapter] child process error: ${error.message}\n`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
let inboundBuffer = Buffer.alloc(0);
|
|
40
|
+
let clientFraming = null;
|
|
41
|
+
|
|
42
|
+
const writeContentLengthFrame = (stream, line) => {
|
|
43
|
+
const header = `Content-Length: ${Buffer.byteLength(line, "utf8")}\r\n\r\n`;
|
|
44
|
+
stream.write(header + line);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const forwardToChild = (json) => {
|
|
48
|
+
if (childUsesContentLength) {
|
|
49
|
+
writeContentLengthFrame(child.stdin, json);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
child.stdin.write(json + "\n");
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const tryParseInbound = () => {
|
|
56
|
+
while (inboundBuffer.length > 0) {
|
|
57
|
+
const contentLengthPrefix = "Content-Length:";
|
|
58
|
+
const head = inboundBuffer.toString("utf8", 0, Math.min(inboundBuffer.length, contentLengthPrefix.length));
|
|
59
|
+
const maybeContentLength = contentLengthPrefix.startsWith(head);
|
|
60
|
+
const startsWithContentLength = inboundBuffer.length >= contentLengthPrefix.length && inboundBuffer.toString("utf8", 0, contentLengthPrefix.length) === contentLengthPrefix;
|
|
61
|
+
|
|
62
|
+
if (maybeContentLength && !startsWithContentLength) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (startsWithContentLength) {
|
|
67
|
+
clientFraming = clientFraming ?? "content-length";
|
|
68
|
+
const headerEnd = inboundBuffer.indexOf("\r\n\r\n");
|
|
69
|
+
if (headerEnd === -1) return;
|
|
70
|
+
|
|
71
|
+
const headerText = inboundBuffer.toString("utf8", 0, headerEnd);
|
|
72
|
+
const match = headerText.match(/(?:^|\r\n)Content-Length:\s*(\d+)\s*(?:\r\n|$)/i);
|
|
73
|
+
if (!match) {
|
|
74
|
+
inboundBuffer = Buffer.alloc(0);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const bodyLength = Number(match[1]);
|
|
79
|
+
const bodyStart = headerEnd + 4;
|
|
80
|
+
const bodyEnd = bodyStart + bodyLength;
|
|
81
|
+
if (inboundBuffer.length < bodyEnd) return;
|
|
82
|
+
|
|
83
|
+
const body = inboundBuffer.toString("utf8", bodyStart, bodyEnd);
|
|
84
|
+
inboundBuffer = inboundBuffer.subarray(bodyEnd);
|
|
85
|
+
forwardToChild(body);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const newlineIndex = inboundBuffer.indexOf("\n");
|
|
90
|
+
if (newlineIndex === -1) return;
|
|
91
|
+
|
|
92
|
+
const line = inboundBuffer.toString("utf8", 0, newlineIndex).replace(/\r$/, "").trim();
|
|
93
|
+
inboundBuffer = inboundBuffer.subarray(newlineIndex + 1);
|
|
94
|
+
if (line) {
|
|
95
|
+
clientFraming = clientFraming ?? "newline";
|
|
96
|
+
forwardToChild(line);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
process.stdin.on("data", (chunk) => {
|
|
102
|
+
inboundBuffer = inboundBuffer.length ? Buffer.concat([inboundBuffer, chunk]) : chunk;
|
|
103
|
+
tryParseInbound();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
process.stdin.on("end", () => {
|
|
107
|
+
child.stdin.end();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
let childOutBuffer = "";
|
|
111
|
+
let childOutBinaryBuffer = Buffer.alloc(0);
|
|
112
|
+
|
|
113
|
+
child.stdout.on("data", (chunk) => {
|
|
114
|
+
if (childUsesContentLength) {
|
|
115
|
+
childOutBinaryBuffer = childOutBinaryBuffer.length ? Buffer.concat([childOutBinaryBuffer, chunk]) : chunk;
|
|
116
|
+
|
|
117
|
+
while (true) {
|
|
118
|
+
const headerEnd = childOutBinaryBuffer.indexOf("\r\n\r\n");
|
|
119
|
+
if (headerEnd === -1) break;
|
|
120
|
+
|
|
121
|
+
const headerText = childOutBinaryBuffer.toString("utf8", 0, headerEnd);
|
|
122
|
+
const match = headerText.match(/(?:^|\r\n)Content-Length:\s*(\d+)\s*(?:\r\n|$)/i);
|
|
123
|
+
if (!match) {
|
|
124
|
+
childOutBinaryBuffer = Buffer.alloc(0);
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const bodyLength = Number(match[1]);
|
|
129
|
+
const bodyStart = headerEnd + 4;
|
|
130
|
+
const bodyEnd = bodyStart + bodyLength;
|
|
131
|
+
if (childOutBinaryBuffer.length < bodyEnd) break;
|
|
132
|
+
|
|
133
|
+
const body = childOutBinaryBuffer.toString("utf8", bodyStart, bodyEnd);
|
|
134
|
+
childOutBinaryBuffer = childOutBinaryBuffer.subarray(bodyEnd);
|
|
135
|
+
|
|
136
|
+
if (clientFraming === "newline") {
|
|
137
|
+
process.stdout.write(body + "\n");
|
|
138
|
+
} else {
|
|
139
|
+
writeContentLengthFrame(process.stdout, body);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
childOutBuffer += chunk.toString("utf8");
|
|
146
|
+
while (true) {
|
|
147
|
+
const newlineIndex = childOutBuffer.indexOf("\n");
|
|
148
|
+
if (newlineIndex === -1) break;
|
|
149
|
+
|
|
150
|
+
const line = childOutBuffer.slice(0, newlineIndex).replace(/\r$/, "").trim();
|
|
151
|
+
childOutBuffer = childOutBuffer.slice(newlineIndex + 1);
|
|
152
|
+
if (!line) continue;
|
|
153
|
+
|
|
154
|
+
if (clientFraming === "newline") {
|
|
155
|
+
process.stdout.write(line + "\n");
|
|
156
|
+
} else {
|
|
157
|
+
writeContentLengthFrame(process.stdout, line);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'fs';
|
|
2
|
+
import { join, dirname } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
// 1. Get our own version reliably
|
|
9
|
+
let version = '';
|
|
10
|
+
try {
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
|
|
12
|
+
version = pkg.version;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
version = process.env.npm_package_version || '';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const versionStr = version ? ` v${version}` : '';
|
|
18
|
+
console.log(`\n\x1b[35m[Taskforce]${versionStr} installed successfully!\x1b[0m`);
|
|
19
|
+
|
|
20
|
+
// 2. Try to find the project root to check for correct dependency type
|
|
21
|
+
let projectRoot = process.env.INIT_CWD;
|
|
22
|
+
|
|
23
|
+
// If INIT_CWD is not set or doesn't have a package.json, try traversing up
|
|
24
|
+
if (!projectRoot || !existsSync(join(projectRoot, 'package.json'))) {
|
|
25
|
+
let current = __dirname;
|
|
26
|
+
// Traverse up to find project root (looking for a package.json that isn't ours)
|
|
27
|
+
for (let i = 0; i < 6; i++) {
|
|
28
|
+
const pkgPath = join(current, 'package.json');
|
|
29
|
+
if (existsSync(pkgPath)) {
|
|
30
|
+
try {
|
|
31
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
32
|
+
if (pkg.name !== '@taskforcehq/taskforce' && pkg.name !== 'taskforce') {
|
|
33
|
+
projectRoot = current;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
} catch (e) { /* ignore parse error */ }
|
|
37
|
+
}
|
|
38
|
+
const parent = dirname(current);
|
|
39
|
+
if (parent === current) break;
|
|
40
|
+
current = parent;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (projectRoot) {
|
|
45
|
+
try {
|
|
46
|
+
const projectPkg = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf-8'));
|
|
47
|
+
if (projectPkg.dependencies && projectPkg.dependencies.taskforce) {
|
|
48
|
+
console.log('\x1b[33m\n⚠️ [Taskforce] Warning: Installed as a regular dependency.\x1b[0m');
|
|
49
|
+
console.log('\x1b[33m Taskforce should be installed globally.\x1b[0m');
|
|
50
|
+
console.log(' Run: \x1b[36mnpm install -g @taskforcehq/taskforce\x1b[0m to fix this.\n');
|
|
51
|
+
}
|
|
52
|
+
} catch (err) {
|
|
53
|
+
// Ignore errors checking project package.json
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
console.log(`Run \x1b[36mnpx @taskforcehq/taskforce open\x1b[0m to manage your tasks.\n`);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
// Silent fail to avoid breaking install
|
|
60
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
export function parseVersionTriplet(version) {
|
|
5
|
+
const raw = String(version || '').trim();
|
|
6
|
+
const match = raw.match(/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/);
|
|
7
|
+
if (!match) return null;
|
|
8
|
+
return {
|
|
9
|
+
major: Number(match[1]),
|
|
10
|
+
minor: Number(match[2]),
|
|
11
|
+
patch: Number(match[3])
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function parseReleaseTag(tag) {
|
|
16
|
+
const raw = String(tag || '').trim();
|
|
17
|
+
const match = raw.match(/^v(\d+)\.(\d+)\.(\d+)$/);
|
|
18
|
+
if (!match) return null;
|
|
19
|
+
return {
|
|
20
|
+
major: Number(match[1]),
|
|
21
|
+
minor: Number(match[2]),
|
|
22
|
+
patch: Number(match[3])
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function readVersionConfig(projectRoot) {
|
|
27
|
+
const configPath = path.resolve(projectRoot, 'version.config.json');
|
|
28
|
+
const raw = fs.readFileSync(configPath, 'utf8');
|
|
29
|
+
const parsed = JSON.parse(raw);
|
|
30
|
+
const major = Number(parsed?.major);
|
|
31
|
+
const minor = Number(parsed?.minor);
|
|
32
|
+
if (!Number.isInteger(major) || major < 0) {
|
|
33
|
+
throw new Error(`version.config.json major must be a non-negative integer (got: ${parsed?.major})`);
|
|
34
|
+
}
|
|
35
|
+
if (!Number.isInteger(minor) || minor < 0) {
|
|
36
|
+
throw new Error(`version.config.json minor must be a non-negative integer (got: ${parsed?.minor})`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
major,
|
|
40
|
+
minor,
|
|
41
|
+
path: configPath
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function readPackageVersion(projectRoot) {
|
|
46
|
+
const packagePath = path.resolve(projectRoot, 'package.json');
|
|
47
|
+
const raw = fs.readFileSync(packagePath, 'utf8');
|
|
48
|
+
const parsed = JSON.parse(raw);
|
|
49
|
+
return String(parsed?.version || '').trim();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function computeNextPatch({
|
|
53
|
+
major,
|
|
54
|
+
minor,
|
|
55
|
+
releaseTags,
|
|
56
|
+
currentPackageVersion
|
|
57
|
+
}) {
|
|
58
|
+
const patches = (releaseTags || [])
|
|
59
|
+
.map(parseReleaseTag)
|
|
60
|
+
.filter(tag => tag && tag.major === major && tag.minor === minor)
|
|
61
|
+
.map(tag => tag.patch);
|
|
62
|
+
|
|
63
|
+
if (patches.length > 0) {
|
|
64
|
+
return Math.max(...patches) + 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const packageParsed = parseVersionTriplet(currentPackageVersion);
|
|
68
|
+
if (packageParsed && packageParsed.major === major && packageParsed.minor === minor) {
|
|
69
|
+
return packageParsed.patch + 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function computeNextVersion({
|
|
76
|
+
major,
|
|
77
|
+
minor,
|
|
78
|
+
releaseTags,
|
|
79
|
+
currentPackageVersion
|
|
80
|
+
}) {
|
|
81
|
+
const nextPatch = computeNextPatch({
|
|
82
|
+
major,
|
|
83
|
+
minor,
|
|
84
|
+
releaseTags,
|
|
85
|
+
currentPackageVersion
|
|
86
|
+
});
|
|
87
|
+
return `${major}.${minor}.${nextPatch}`;
|
|
88
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'child_process';
|
|
4
|
+
import * as fs from 'fs';
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
import {
|
|
7
|
+
computeNextVersion,
|
|
8
|
+
readPackageVersion,
|
|
9
|
+
readVersionConfig
|
|
10
|
+
} from './release-version-lib.mjs';
|
|
11
|
+
|
|
12
|
+
function hasArg(name) {
|
|
13
|
+
return process.argv.includes(name);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function readReleaseTags(projectRoot) {
|
|
17
|
+
const output = execFileSync('git', ['tag', '--list', 'v*'], {
|
|
18
|
+
cwd: projectRoot,
|
|
19
|
+
encoding: 'utf8'
|
|
20
|
+
});
|
|
21
|
+
return output
|
|
22
|
+
.split('\n')
|
|
23
|
+
.map(line => line.trim())
|
|
24
|
+
.filter(Boolean);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function writeGithubOutput(key, value) {
|
|
28
|
+
const outputPath = String(process.env.GITHUB_OUTPUT || '').trim();
|
|
29
|
+
if (!outputPath) return;
|
|
30
|
+
fs.appendFileSync(outputPath, `${key}=${value}\n`, 'utf8');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function main() {
|
|
34
|
+
const projectRoot = process.cwd();
|
|
35
|
+
const dryRun = hasArg('--dry-run');
|
|
36
|
+
const json = hasArg('--json');
|
|
37
|
+
|
|
38
|
+
const { major, minor, path: configPath } = readVersionConfig(projectRoot);
|
|
39
|
+
const currentPackageVersion = readPackageVersion(projectRoot);
|
|
40
|
+
const releaseTags = readReleaseTags(projectRoot);
|
|
41
|
+
const nextVersion = computeNextVersion({
|
|
42
|
+
major,
|
|
43
|
+
minor,
|
|
44
|
+
releaseTags,
|
|
45
|
+
currentPackageVersion
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
writeGithubOutput('version', nextVersion);
|
|
49
|
+
|
|
50
|
+
if (json) {
|
|
51
|
+
console.log(JSON.stringify({
|
|
52
|
+
configPath: path.relative(projectRoot, configPath),
|
|
53
|
+
currentPackageVersion,
|
|
54
|
+
nextVersion,
|
|
55
|
+
dryRun
|
|
56
|
+
}));
|
|
57
|
+
} else {
|
|
58
|
+
console.log(`Next release version: ${nextVersion}`);
|
|
59
|
+
if (dryRun) {
|
|
60
|
+
console.log('Dry run enabled. package.json was not modified.');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (dryRun) return;
|
|
65
|
+
|
|
66
|
+
execFileSync('npm', ['version', '--no-git-tag-version', nextVersion], {
|
|
67
|
+
cwd: projectRoot,
|
|
68
|
+
stdio: 'inherit'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
main();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
target="${1:-}"
|
|
5
|
+
if [ -z "$target" ]; then
|
|
6
|
+
echo "Usage: sh scripts/run-dev-proxy.sh <staging|performance>" >&2
|
|
7
|
+
exit 1
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
case "$target" in
|
|
11
|
+
staging)
|
|
12
|
+
base_url="https://staging-app.taskforcehq.ai"
|
|
13
|
+
;;
|
|
14
|
+
performance)
|
|
15
|
+
base_url="https://performance-app.taskforcehq.ai"
|
|
16
|
+
;;
|
|
17
|
+
*)
|
|
18
|
+
echo "Invalid target: $target (expected staging or performance)" >&2
|
|
19
|
+
exit 1
|
|
20
|
+
;;
|
|
21
|
+
esac
|
|
22
|
+
|
|
23
|
+
env_file=""
|
|
24
|
+
for candidate in ".env.${target}" ".env.e2e" ".env.local"; do
|
|
25
|
+
if [ -f "$candidate" ]; then
|
|
26
|
+
env_file="$candidate"
|
|
27
|
+
break
|
|
28
|
+
fi
|
|
29
|
+
done
|
|
30
|
+
|
|
31
|
+
if [ -n "$env_file" ]; then
|
|
32
|
+
set -a
|
|
33
|
+
# shellcheck disable=SC1090
|
|
34
|
+
. "$env_file"
|
|
35
|
+
set +a
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
client_id="${TASKFORCE_CF_ACCESS_CLIENT_ID:-${CF_ACCESS_CLIENT_ID:-}}"
|
|
39
|
+
client_secret="${TASKFORCE_CF_ACCESS_CLIENT_SECRET:-${CF_ACCESS_CLIENT_SECRET:-}}"
|
|
40
|
+
if [ -z "${client_id}" ] || [ -z "${client_secret}" ]; then
|
|
41
|
+
echo "Missing Cloudflare Access service token variables." >&2
|
|
42
|
+
echo "Set TASKFORCE_CF_ACCESS_CLIENT_ID/TASKFORCE_CF_ACCESS_CLIENT_SECRET" >&2
|
|
43
|
+
echo "or CF_ACCESS_CLIENT_ID/CF_ACCESS_CLIENT_SECRET in .env.${target}, .env.e2e, or .env.local." >&2
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
VITE_TASKFORCE_BASE_URL="$base_url" \
|
|
48
|
+
TASKFORCE_CLOUD_PROXY_BASE_URL="$base_url" \
|
|
49
|
+
npm run dev:runtime
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
if [ -f .env.e2e ]; then
|
|
5
|
+
set -a
|
|
6
|
+
. ./.env.e2e
|
|
7
|
+
set +a
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
# Mirror soak defaults so realtime e2e runs are plug-compatible with existing env setup.
|
|
11
|
+
export SYNC_SOAK_LOCAL_BASE_URL="${SYNC_SOAK_LOCAL_BASE_URL:-http://localhost:5174}"
|
|
12
|
+
export SYNC_SOAK_CLOUD_BASE_URL="${SYNC_SOAK_CLOUD_BASE_URL:-https://performance-app.taskforcehq.ai}"
|
|
13
|
+
export SYNC_SOAK_WORKSPACE_ID="${SYNC_SOAK_WORKSPACE_ID:-test-smoke}"
|
|
14
|
+
|
|
15
|
+
node --import tsx scripts/check-env.ts --target=soak --strict=true
|
|
16
|
+
npx playwright test -c playwright.e2e.config.ts "$@"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
if [ -f .env.e2e ]; then
|
|
5
|
+
set -a
|
|
6
|
+
. ./.env.e2e
|
|
7
|
+
set +a
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
# Provide safe defaults for non-secret settings; allow caller/.env.e2e overrides.
|
|
11
|
+
export SYNC_SOAK_LOCAL_BASE_URL="${SYNC_SOAK_LOCAL_BASE_URL:-http://localhost:5174}"
|
|
12
|
+
export SYNC_SOAK_CLOUD_BASE_URL="${SYNC_SOAK_CLOUD_BASE_URL:-https://performance-app.taskforcehq.ai}"
|
|
13
|
+
export SYNC_SOAK_WORKSPACE_ID="${SYNC_SOAK_WORKSPACE_ID:-test-smoke}"
|
|
14
|
+
|
|
15
|
+
node --import tsx scripts/check-env.ts --target=soak --strict=true
|
|
16
|
+
|
|
17
|
+
# Shared credentials are required and must come from env/.env.e2e.
|
|
18
|
+
if [ -z "${SYNC_SOAK_ACCOUNTS_JSON:-}" ] && { [ -z "${SYNC_SOAK_EMAIL:-}" ] || [ -z "${SYNC_SOAK_PASSWORD:-}" ]; }; then
|
|
19
|
+
echo "Missing credentials. Set SYNC_SOAK_ACCOUNTS_JSON or SYNC_SOAK_EMAIL+SYNC_SOAK_PASSWORD in env/.env.e2e." >&2
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
npx playwright test -c playwright.smoke.config.ts "$@"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
if [ -f .env.e2e ]; then
|
|
5
|
+
set -a
|
|
6
|
+
. ./.env.e2e
|
|
7
|
+
set +a
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
# Provide safe defaults for non-secret settings; allow caller/.env.e2e overrides.
|
|
11
|
+
# Soak runs target the dedicated performance cloud by default.
|
|
12
|
+
export SYNC_SOAK_LOCAL_BASE_URL="${SYNC_SOAK_LOCAL_BASE_URL:-http://localhost:5174}"
|
|
13
|
+
export SYNC_SOAK_CLOUD_BASE_URL="${SYNC_SOAK_CLOUD_BASE_URL:-https://performance-app.taskforcehq.ai}"
|
|
14
|
+
export SYNC_SOAK_WORKSPACE_ID="${SYNC_SOAK_WORKSPACE_ID:-test-smoke}"
|
|
15
|
+
|
|
16
|
+
node --import tsx scripts/check-env.ts --target=soak --strict=true
|
|
17
|
+
|
|
18
|
+
# Shared credentials are required and must come from env/.env.e2e.
|
|
19
|
+
if [ -z "${SYNC_SOAK_ACCOUNTS_JSON:-}" ] && { [ -z "${SYNC_SOAK_EMAIL:-}" ] || [ -z "${SYNC_SOAK_PASSWORD:-}" ]; }; then
|
|
20
|
+
echo "Missing credentials. Set SYNC_SOAK_ACCOUNTS_JSON or SYNC_SOAK_EMAIL+SYNC_SOAK_PASSWORD in env/.env.e2e." >&2
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
if [ "${SOAK_BUILD_UI:-true}" = "true" ]; then
|
|
25
|
+
echo "[Soak] Rebuilding full dist bundle before soak run (SOAK_BUILD_UI=true)"
|
|
26
|
+
npm run -s build
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
npx playwright test -c playwright.smoke.config.ts "$@"
|