@taskforcehq/taskforce 0.3.311 → 0.3.313
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 +40 -2
- package/dist/TaskforceCore.js +1 -1
- package/dist/components/features/InitiativesModule.js +1 -1
- package/dist/components/features/TaskSettings.js +1 -1
- package/dist/components/views/StandaloneLayout.js +3 -6
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +1 -2
- package/dist/components/views/standalone/modals/AccountHubModal.js +2 -3
- package/dist/components/views/standalone/modals/HelpModal.js +15 -2
- package/dist/hooks/useFilterSort.js +1 -1
- package/dist/hooks/useTaskforce.js +2 -2
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +5 -2
- package/dist/ui/assets/{AgentsModule-D8u9P5dZ.js → AgentsModule-BULqIo8e.js} +1 -1
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-CsUauFA2.js → AnnotatedAttachmentWorkspace-DHr4rHK9.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-DbQvDHFz.js → ContextAttachmentManager-DoMe2OpY.js} +1 -1
- package/dist/ui/assets/{DocumentWorkspace-BmTkN1A8.js → DocumentWorkspace-DumBWhvb.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BXHTM-Nh.js → EntityActivityTimeline-sHk8Nzbq.js} +1 -1
- package/dist/ui/assets/{InitiativesModule-D33RyXx0.js → InitiativesModule-3X9UNzHh.js} +1 -1
- package/dist/ui/assets/{PlansPage-D0RXlT9_.js → PlansPage-C3A3EYaV.js} +1 -1
- package/dist/ui/assets/{TaskContextUpload-Vsg67lpR.js → TaskContextUpload-C8G7pWkX.js} +1 -1
- package/dist/ui/assets/{TaskSettings-DshLw7_d.js → TaskSettings-DM1o9Wla.js} +2 -2
- package/dist/ui/assets/{WorkflowsModule-CLM-1BnF.js → WorkflowsModule-CW0crzvD.js} +1 -1
- package/dist/ui/assets/documentReferences-BZB3nMRb.js +1 -0
- package/dist/ui/assets/index-BWFQ9mGn.js +5 -0
- package/dist/ui/assets/{index-DOR9PRqt.css → index-DcK_8tuE.css} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +12 -4
- package/scripts/postinstall.js +4 -3
- package/dist/TaskforceCore.CategoryFallback.test.d.ts +0 -1
- package/dist/TaskforceCore.CategoryFallback.test.js +0 -101
- package/dist/TaskforceCore.filter-persistence.test.d.ts +0 -1
- package/dist/TaskforceCore.filter-persistence.test.js +0 -402
- package/dist/TaskforceCore.routing.test.d.ts +0 -1
- package/dist/TaskforceCore.routing.test.js +0 -311
- package/dist/TaskforceCore.test.d.ts +0 -1
- package/dist/TaskforceCore.test.js +0 -7910
- package/dist/TaskforceWidget.test.d.ts +0 -1
- package/dist/TaskforceWidget.test.js +0 -92
- package/dist/UnsavedChangesRelaxed.test.d.ts +0 -1
- package/dist/UnsavedChangesRelaxed.test.js +0 -16
- package/dist/__tests__/localizationCatalogs.test.d.ts +0 -1
- package/dist/__tests__/localizationCatalogs.test.js +0 -54
- package/dist/__tests__/workflowSimulation.test.d.ts +0 -1
- package/dist/__tests__/workflowSimulation.test.js +0 -113
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.test.d.ts +0 -1
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.test.js +0 -278
- package/dist/annotatedAttachments/payload.test.d.ts +0 -1
- package/dist/annotatedAttachments/payload.test.js +0 -67
- package/dist/compat/workspaceSyncCompat.test.d.ts +0 -1
- package/dist/compat/workspaceSyncCompat.test.js +0 -124
- package/dist/components/features/AgentsModule.test.d.ts +0 -1
- package/dist/components/features/AgentsModule.test.js +0 -601
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.d.ts +0 -1
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.js +0 -2883
- package/dist/components/features/DocumentWorkspace.test.d.ts +0 -1
- package/dist/components/features/DocumentWorkspace.test.js +0 -1439
- package/dist/components/features/TaskSettings.test.d.ts +0 -1
- package/dist/components/features/TaskSettings.test.js +0 -1674
- package/dist/components/features/settings/TaxonomyLibraryManager.test.d.ts +0 -1
- package/dist/components/features/settings/TaxonomyLibraryManager.test.js +0 -141
- package/dist/components/task/TaskActionHeader.test.d.ts +0 -1
- package/dist/components/task/TaskActionHeader.test.js +0 -91
- package/dist/components/task/TaskCard.test.d.ts +0 -1
- package/dist/components/task/TaskCard.test.js +0 -513
- package/dist/components/task/TaskContextUpload.test.d.ts +0 -1
- package/dist/components/task/TaskContextUpload.test.js +0 -506
- package/dist/components/task/TaskForm.test.d.ts +0 -1
- package/dist/components/task/TaskForm.test.js +0 -946
- package/dist/components/task/TaskKanban.empty-column-drop.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.empty-column-drop.test.js +0 -66
- package/dist/components/task/TaskKanban.planning-drop.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.planning-drop.test.js +0 -93
- package/dist/components/task/TaskKanban.test.d.ts +0 -1
- package/dist/components/task/TaskKanban.test.js +0 -99
- package/dist/components/task/TaskList.test.d.ts +0 -1
- package/dist/components/task/TaskList.test.js +0 -473
- package/dist/components/task/TaskStatusActions.test.d.ts +0 -1
- package/dist/components/task/TaskStatusActions.test.js +0 -54
- package/dist/components/task/taskKanbanDropRules.test.d.ts +0 -1
- package/dist/components/task/taskKanbanDropRules.test.js +0 -114
- package/dist/components/ui/LevelSelector.test.d.ts +0 -1
- package/dist/components/ui/LevelSelector.test.js +0 -55
- package/dist/components/ui/Markdown.test.d.ts +0 -1
- package/dist/components/ui/Markdown.test.js +0 -38
- package/dist/components/ui/MultiSelectFilter.test.d.ts +0 -1
- package/dist/components/ui/MultiSelectFilter.test.js +0 -74
- package/dist/components/ui/TaxonomyDropdown.test.d.ts +0 -1
- package/dist/components/ui/TaxonomyDropdown.test.js +0 -130
- package/dist/components/ui/TopNoticeLayer.test.d.ts +0 -1
- package/dist/components/ui/TopNoticeLayer.test.js +0 -25
- package/dist/components/views/AppShellHeader.test.d.ts +0 -1
- package/dist/components/views/AppShellHeader.test.js +0 -42
- package/dist/components/views/PlanComparisonPage.test.d.ts +0 -1
- package/dist/components/views/PlanComparisonPage.test.js +0 -758
- package/dist/components/views/PlansPage.test.d.ts +0 -1
- package/dist/components/views/PlansPage.test.js +0 -710
- package/dist/components/views/chrome/WorkspaceChromeSections.test.d.ts +0 -1
- package/dist/components/views/chrome/WorkspaceChromeSections.test.js +0 -54
- package/dist/components/views/chrome/workspaceChrome.test.d.ts +0 -1
- package/dist/components/views/chrome/workspaceChrome.test.js +0 -52
- package/dist/components/views/panels/DocumentFilterToolbar.test.d.ts +0 -1
- package/dist/components/views/panels/DocumentFilterToolbar.test.js +0 -19
- package/dist/components/views/panels/FilterToolbar.test.d.ts +0 -1
- package/dist/components/views/panels/FilterToolbar.test.js +0 -47
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +0 -1
- package/dist/components/views/panels/PlanningDrawer.test.js +0 -529
- package/dist/components/views/planningScope.test.d.ts +0 -1
- package/dist/components/views/planningScope.test.js +0 -60
- package/dist/components/views/standalone/modals/AccountHubModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +0 -72
- package/dist/components/views/standalone/modals/HelpModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/HelpModal.test.js +0 -23
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.d.ts +0 -1
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.js +0 -24
- package/dist/components/views/teamManagementAccess.test.d.ts +0 -1
- package/dist/components/views/teamManagementAccess.test.js +0 -44
- package/dist/config/deployment.test.d.ts +0 -1
- package/dist/config/deployment.test.js +0 -90
- package/dist/config/envSchema.test.d.ts +0 -1
- package/dist/config/envSchema.test.js +0 -125
- package/dist/core/AiProfileService.test.d.ts +0 -1
- package/dist/core/AiProfileService.test.js +0 -184
- package/dist/core/AiProfiles.test.d.ts +0 -1
- package/dist/core/AiProfiles.test.js +0 -1873
- package/dist/core/AuthTokenService.test.d.ts +0 -1
- package/dist/core/AuthTokenService.test.js +0 -78
- package/dist/core/BulkUpdateFieldsPreview.test.d.ts +0 -1
- package/dist/core/BulkUpdateFieldsPreview.test.js +0 -62
- package/dist/core/CompletedAt.test.d.ts +0 -1
- package/dist/core/CompletedAt.test.js +0 -44
- package/dist/core/CreatedBy.test.d.ts +0 -1
- package/dist/core/CreatedBy.test.js +0 -188
- package/dist/core/DeletedTaskTrash.test.d.ts +0 -1
- package/dist/core/DeletedTaskTrash.test.js +0 -104
- package/dist/core/EntitlementsPolicy.test.d.ts +0 -1
- package/dist/core/EntitlementsPolicy.test.js +0 -280
- package/dist/core/GlobalSettingsService.test.d.ts +0 -1
- package/dist/core/GlobalSettingsService.test.js +0 -45
- package/dist/core/JsonBackupRuntime.test.d.ts +0 -1
- package/dist/core/JsonBackupRuntime.test.js +0 -155
- package/dist/core/PlanFeatureCatalog.test.d.ts +0 -1
- package/dist/core/PlanFeatureCatalog.test.js +0 -139
- package/dist/core/PlanVersionPolicy.test.d.ts +0 -1
- package/dist/core/PlanVersionPolicy.test.js +0 -236
- package/dist/core/PlanningEntities.test.d.ts +0 -1
- package/dist/core/PlanningEntities.test.js +0 -509
- package/dist/core/ScheduleFields.test.d.ts +0 -1
- package/dist/core/ScheduleFields.test.js +0 -193
- package/dist/core/SetupState.test.d.ts +0 -1
- package/dist/core/SetupState.test.js +0 -113
- package/dist/core/SignupMonetizationSettings.test.d.ts +0 -1
- package/dist/core/SignupMonetizationSettings.test.js +0 -515
- package/dist/core/Stats.test.d.ts +0 -1
- package/dist/core/Stats.test.js +0 -36
- package/dist/core/SystemAdmin.test.d.ts +0 -1
- package/dist/core/SystemAdmin.test.js +0 -1106
- package/dist/core/TaskActivitySync.test.d.ts +0 -1
- package/dist/core/TaskActivitySync.test.js +0 -90
- package/dist/core/TaskAttachmentsCanonical.test.d.ts +0 -1
- package/dist/core/TaskAttachmentsCanonical.test.js +0 -356
- package/dist/core/TaskAuditTimeline.test.d.ts +0 -1
- package/dist/core/TaskAuditTimeline.test.js +0 -319
- package/dist/core/TaskTaxonomyValidation.test.d.ts +0 -1
- package/dist/core/TaskTaxonomyValidation.test.js +0 -440
- package/dist/core/Taskforce.ids.test.d.ts +0 -1
- package/dist/core/Taskforce.ids.test.js +0 -611
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +0 -1
- package/dist/core/Taskforce.listTasksSlim.test.js +0 -91
- package/dist/core/Taskforce.mcpAuth.test.d.ts +0 -1
- package/dist/core/Taskforce.mcpAuth.test.js +0 -450
- package/dist/core/Taskforce.realtimeMutation.test.d.ts +0 -1
- package/dist/core/Taskforce.realtimeMutation.test.js +0 -131
- package/dist/core/UserProfileAvatarDrafts.test.d.ts +0 -1
- package/dist/core/UserProfileAvatarDrafts.test.js +0 -138
- package/dist/core/WorkspaceDelete.test.d.ts +0 -1
- package/dist/core/WorkspaceDelete.test.js +0 -159
- package/dist/core/WorkspacePermissions.test.d.ts +0 -1
- package/dist/core/WorkspacePermissions.test.js +0 -270
- package/dist/core/WorkspacePlanMode.test.d.ts +0 -1
- package/dist/core/WorkspacePlanMode.test.js +0 -383
- package/dist/core/WorkspaceSyncSettings.test.d.ts +0 -1
- package/dist/core/WorkspaceSyncSettings.test.js +0 -65
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.d.ts +0 -1
- package/dist/core/__tests__/TaskAttachmentsCanonical.test.js +0 -212
- package/dist/documentReviews/DocumentReviewSessionStore.test.d.ts +0 -1
- package/dist/documentReviews/DocumentReviewSessionStore.test.js +0 -127
- package/dist/hooks/authGuardPolicy.test.d.ts +0 -1
- package/dist/hooks/authGuardPolicy.test.js +0 -76
- package/dist/hooks/bootstrapTimeouts.test.d.ts +0 -1
- package/dist/hooks/bootstrapTimeouts.test.js +0 -12
- package/dist/hooks/sync/controlPlane.test.d.ts +0 -1
- package/dist/hooks/sync/controlPlane.test.js +0 -121
- package/dist/hooks/sync/lifecyclePolicy.test.d.ts +0 -1
- package/dist/hooks/sync/lifecyclePolicy.test.js +0 -124
- package/dist/hooks/sync/orchestratorShared.test.d.ts +0 -1
- package/dist/hooks/sync/orchestratorShared.test.js +0 -98
- package/dist/hooks/sync/pullLifecycle.test.d.ts +0 -1
- package/dist/hooks/sync/pullLifecycle.test.js +0 -80
- package/dist/hooks/sync/recovery.test.d.ts +0 -1
- package/dist/hooks/sync/recovery.test.js +0 -292
- package/dist/hooks/sync/transfers.test.d.ts +0 -1
- package/dist/hooks/sync/transfers.test.js +0 -928
- package/dist/hooks/sync/useRecentSyncEvents.test.d.ts +0 -1
- package/dist/hooks/sync/useRecentSyncEvents.test.js +0 -124
- package/dist/hooks/sync/useSyncStatusActions.test.d.ts +0 -1
- package/dist/hooks/sync/useSyncStatusActions.test.js +0 -133
- package/dist/hooks/sync/useSyncStatusControls.test.d.ts +0 -1
- package/dist/hooks/sync/useSyncStatusControls.test.js +0 -88
- package/dist/hooks/useFilterSort.test.d.ts +0 -1
- package/dist/hooks/useFilterSort.test.js +0 -419
- package/dist/hooks/useRealtimeSync.test.d.ts +0 -1
- package/dist/hooks/useRealtimeSync.test.js +0 -311
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +0 -54
- package/dist/hooks/useSyncOrchestrator.context-assets.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.context-assets.test.js +0 -228
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.d.ts +0 -1
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +0 -2027
- package/dist/hooks/useTaskData.test.d.ts +0 -1
- package/dist/hooks/useTaskData.test.js +0 -291
- package/dist/hooks/useTaskMutations.test.d.ts +0 -1
- package/dist/hooks/useTaskMutations.test.js +0 -256
- package/dist/hooks/useTaskforce.contract.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.contract.test.js +0 -7
- package/dist/hooks/useTaskforce.priority-filters.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.priority-filters.test.js +0 -28
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.runtime-routing.test.js +0 -246
- package/dist/hooks/useTaskforce.sync-behavior.test.d.ts +0 -1
- package/dist/hooks/useTaskforce.sync-behavior.test.js +0 -3644
- package/dist/hooks/useWorkspaceSyncController.test.d.ts +0 -1
- package/dist/hooks/useWorkspaceSyncController.test.js +0 -192
- package/dist/hooks/workspace/useTaskforceApiRouting.test.d.ts +0 -1
- package/dist/hooks/workspace/useTaskforceApiRouting.test.js +0 -77
- package/dist/hooks/workspace/workspaceLocalState.test.d.ts +0 -1
- package/dist/hooks/workspace/workspaceLocalState.test.js +0 -59
- package/dist/localization/localizationCatalogs.test.d.ts +0 -1
- package/dist/localization/localizationCatalogs.test.js +0 -37
- package/dist/mcp/aiProfileBootstrap.test.d.ts +0 -1
- package/dist/mcp/aiProfileBootstrap.test.js +0 -68
- package/dist/mcp/canonicalAssetHelpers.test.d.ts +0 -1
- package/dist/mcp/canonicalAssetHelpers.test.js +0 -67
- package/dist/mcp/clientIntegrations.test.d.ts +0 -1
- package/dist/mcp/clientIntegrations.test.js +0 -219
- package/dist/mcp/optionResolution.test.d.ts +0 -1
- package/dist/mcp/optionResolution.test.js +0 -43
- package/dist/mcp/runtime.test.d.ts +0 -1
- package/dist/mcp/runtime.test.js +0 -5211
- package/dist/mcp/structuredCommentValidation.test.d.ts +0 -1
- package/dist/mcp/structuredCommentValidation.test.js +0 -31
- package/dist/mcp/structuredDocValidation.test.d.ts +0 -1
- package/dist/mcp/structuredDocValidation.test.js +0 -35
- package/dist/mcp/toolRegistry.test.d.ts +0 -1
- package/dist/mcp/toolRegistry.test.js +0 -34
- package/dist/migrations/billingSchemaParity.test.d.ts +0 -1
- package/dist/migrations/billingSchemaParity.test.js +0 -160
- package/dist/migrations/taskSchemaMigrations.test.d.ts +0 -1
- package/dist/migrations/taskSchemaMigrations.test.js +0 -225
- package/dist/qaOpen.test.d.ts +0 -1
- package/dist/qaOpen.test.js +0 -56
- package/dist/releaseVersion.test.d.ts +0 -1
- package/dist/releaseVersion.test.js +0 -32
- package/dist/runtime/appGates.test.d.ts +0 -1
- package/dist/runtime/appGates.test.js +0 -42
- package/dist/server/aiProfileAvatarAssets.test.d.ts +0 -1
- package/dist/server/aiProfileAvatarAssets.test.js +0 -213
- package/dist/server/annotatedAttachmentsRoutes.test.d.ts +0 -1
- package/dist/server/annotatedAttachmentsRoutes.test.js +0 -532
- package/dist/server/auth.test.d.ts +0 -1
- package/dist/server/auth.test.js +0 -131
- package/dist/server/buildInfo.test.d.ts +0 -1
- package/dist/server/buildInfo.test.js +0 -29
- package/dist/server/cors.test.d.ts +0 -1
- package/dist/server/cors.test.js +0 -77
- package/dist/server/documentReviewRoutes.test.d.ts +0 -1
- package/dist/server/documentReviewRoutes.test.js +0 -190
- package/dist/server/email.test.d.ts +0 -1
- package/dist/server/email.test.js +0 -113
- package/dist/server/index.cookieProxy.test.d.ts +0 -1
- package/dist/server/index.cookieProxy.test.js +0 -67
- package/dist/server/index.rateLimit.test.d.ts +0 -1
- package/dist/server/index.rateLimit.test.js +0 -22
- package/dist/server/index.test.d.ts +0 -1
- package/dist/server/index.test.js +0 -283
- package/dist/server/rateLimit.test.d.ts +0 -1
- package/dist/server/rateLimit.test.js +0 -107
- package/dist/server/realtimeSync.auth.test.d.ts +0 -1
- package/dist/server/realtimeSync.auth.test.js +0 -62
- package/dist/server/realtimeSync.replay.test.d.ts +0 -1
- package/dist/server/realtimeSync.replay.test.js +0 -192
- package/dist/server/realtimeSync.workspaceIsolation.test.d.ts +0 -1
- package/dist/server/realtimeSync.workspaceIsolation.test.js +0 -101
- package/dist/server/routes/billing.test.d.ts +0 -1
- package/dist/server/routes/billing.test.js +0 -3515
- package/dist/server/routes/shared.test.d.ts +0 -1
- package/dist/server/routes/shared.test.js +0 -32
- package/dist/server/routes/sync.integration.test.d.ts +0 -1
- package/dist/server/routes/sync.integration.test.js +0 -2932
- package/dist/server/routes/syncAuxRoutes.test.d.ts +0 -1
- package/dist/server/routes/syncAuxRoutes.test.js +0 -158
- package/dist/server/routes/syncRouteGuards.test.d.ts +0 -1
- package/dist/server/routes/syncRouteGuards.test.js +0 -94
- package/dist/server/routes.test.d.ts +0 -1
- package/dist/server/routes.test.js +0 -15612
- package/dist/server/runtimeMode.test.d.ts +0 -1
- package/dist/server/runtimeMode.test.js +0 -26
- package/dist/server/securityHeaders.test.d.ts +0 -1
- package/dist/server/securityHeaders.test.js +0 -70
- package/dist/services/templateEngine.test.d.ts +0 -1
- package/dist/services/templateEngine.test.js +0 -150
- package/dist/services/templates.test.d.ts +0 -1
- package/dist/services/templates.test.js +0 -45
- package/dist/services/workflowDocumentFixtures.test.d.ts +0 -1
- package/dist/services/workflowDocumentFixtures.test.js +0 -78
- package/dist/services/workflowExportMatrix.test.d.ts +0 -1
- package/dist/services/workflowExportMatrix.test.js +0 -113
- package/dist/services/workflowExportSnapshots.test.d.ts +0 -1
- package/dist/services/workflowExportSnapshots.test.js +0 -30
- package/dist/services/workflowGeneration.test.d.ts +0 -1
- package/dist/services/workflowGeneration.test.js +0 -12
- package/dist/services/workflowSimulation.test.d.ts +0 -1
- package/dist/services/workflowSimulation.test.js +0 -113
- package/dist/services/workflowV2Policy.test.d.ts +0 -1
- package/dist/services/workflowV2Policy.test.js +0 -80
- package/dist/shared/customTaxonomyLibrary.test.d.ts +0 -1
- package/dist/shared/customTaxonomyLibrary.test.js +0 -20
- package/dist/shared/passwordPolicy.test.d.ts +0 -1
- package/dist/shared/passwordPolicy.test.js +0 -34
- package/dist/shared/runtimeContract.test.d.ts +0 -1
- package/dist/shared/runtimeContract.test.js +0 -23
- package/dist/shared/taxonomyLibrary.test.d.ts +0 -1
- package/dist/shared/taxonomyLibrary.test.js +0 -26
- package/dist/shared/taxonomyState.test.d.ts +0 -1
- package/dist/shared/taxonomyState.test.js +0 -71
- package/dist/soak/preflight.cli.d.ts +0 -1
- package/dist/soak/preflight.cli.js +0 -28
- package/dist/soak/preflight.d.ts +0 -26
- package/dist/soak/preflight.js +0 -113
- package/dist/soak/preflight.test.d.ts +0 -1
- package/dist/soak/preflight.test.js +0 -39
- package/dist/storage/objectStorageClient.test.d.ts +0 -1
- package/dist/storage/objectStorageClient.test.js +0 -82
- package/dist/storage/objectStorageConfig.test.d.ts +0 -1
- package/dist/storage/objectStorageConfig.test.js +0 -50
- package/dist/storage/postgresAdapter.test.d.ts +0 -1
- package/dist/storage/postgresAdapter.test.js +0 -29
- package/dist/storage/workspaceAssetStore.test.d.ts +0 -1
- package/dist/storage/workspaceAssetStore.test.js +0 -588
- package/dist/sync/cloudSyncApi.test.d.ts +0 -1
- package/dist/sync/cloudSyncApi.test.js +0 -111
- package/dist/sync/collaborationSyncPayload.test.d.ts +0 -1
- package/dist/sync/collaborationSyncPayload.test.js +0 -125
- package/dist/sync/contentSyncPayload.test.d.ts +0 -1
- package/dist/sync/contentSyncPayload.test.js +0 -143
- package/dist/sync/encryptionService.test.d.ts +0 -1
- package/dist/sync/encryptionService.test.js +0 -52
- package/dist/sync/planningSyncPayload.test.d.ts +0 -1
- package/dist/sync/planningSyncPayload.test.js +0 -92
- package/dist/sync/realtimeFeature.test.d.ts +0 -1
- package/dist/sync/realtimeFeature.test.js +0 -30
- package/dist/sync/realtimeReconcile.test.d.ts +0 -1
- package/dist/sync/realtimeReconcile.test.js +0 -43
- package/dist/sync/syncApplyHandlers.test.d.ts +0 -1
- package/dist/sync/syncApplyHandlers.test.js +0 -626
- package/dist/sync/syncService.test.d.ts +0 -1
- package/dist/sync/syncService.test.js +0 -903
- package/dist/sync/taskSyncPayload.test.d.ts +0 -1
- package/dist/sync/taskSyncPayload.test.js +0 -54
- package/dist/sync/workspacePullFeed.test.d.ts +0 -1
- package/dist/sync/workspacePullFeed.test.js +0 -438
- package/dist/sync/workspaceSyncModel.test.d.ts +0 -1
- package/dist/sync/workspaceSyncModel.test.js +0 -1442
- package/dist/test/setup.d.ts +0 -1
- package/dist/test/setup.js +0 -15
- package/dist/ui/assets/documentReferences-BPWp6ce0.js +0 -1
- package/dist/ui/assets/index-zvbo2Jse.js +0 -5
- package/dist/utils/accountProfileSummaryCache.test.d.ts +0 -1
- package/dist/utils/accountProfileSummaryCache.test.js +0 -63
- package/dist/utils/annotatedAttachments.test.d.ts +0 -1
- package/dist/utils/annotatedAttachments.test.js +0 -108
- package/dist/utils/assignees.test.d.ts +0 -1
- package/dist/utils/assignees.test.js +0 -25
- package/dist/utils/avatarUpload.test.d.ts +0 -1
- package/dist/utils/avatarUpload.test.js +0 -40
- package/dist/utils/canonicalAssetKind.test.d.ts +0 -1
- package/dist/utils/canonicalAssetKind.test.js +0 -24
- package/dist/utils/coalescedRefresh.test.d.ts +0 -1
- package/dist/utils/coalescedRefresh.test.js +0 -30
- package/dist/utils/constants.icons.test.d.ts +0 -1
- package/dist/utils/constants.icons.test.js +0 -41
- package/dist/utils/planParser.test.d.ts +0 -1
- package/dist/utils/planParser.test.js +0 -183
- package/dist/utils/planningReferences.test.d.ts +0 -1
- package/dist/utils/planningReferences.test.js +0 -17
- package/dist/utils/supportContact.test.d.ts +0 -1
- package/dist/utils/supportContact.test.js +0 -19
- package/dist/utils/syncEventDetails.test.d.ts +0 -1
- package/dist/utils/syncEventDetails.test.js +0 -23
- package/dist/utils/syncEventPresentation.test.d.ts +0 -1
- package/dist/utils/syncEventPresentation.test.js +0 -64
- package/dist/utils/syncStatusPresentation.test.d.ts +0 -1
- package/dist/utils/syncStatusPresentation.test.js +0 -164
- package/dist/utils/taskActivity.test.d.ts +0 -1
- package/dist/utils/taskActivity.test.js +0 -218
- package/dist/utils/taskDraftDefaults.test.d.ts +0 -1
- package/dist/utils/taskDraftDefaults.test.js +0 -34
- package/dist/utils/taskDragZones.test.d.ts +0 -1
- package/dist/utils/taskDragZones.test.js +0 -14
- package/dist/utils/taskNormalization.test.d.ts +0 -1
- package/dist/utils/taskNormalization.test.js +0 -158
- package/dist/utils/taskSearch.test.d.ts +0 -1
- package/dist/utils/taskSearch.test.js +0 -69
- package/dist/utils/taskUtils.test.d.ts +0 -1
- package/dist/utils/taskUtils.test.js +0 -19
- package/dist/utils/taskforceApiClient.test.d.ts +0 -1
- package/dist/utils/taskforceApiClient.test.js +0 -44
- package/dist/utils/taxonomyFormDefaults.test.d.ts +0 -1
- package/dist/utils/taxonomyFormDefaults.test.js +0 -63
- package/dist/utils/uiNotice.test.d.ts +0 -1
- package/dist/utils/uiNotice.test.js +0 -18
- package/dist/utils/workspaceIdentity.test.d.ts +0 -1
- package/dist/utils/workspaceIdentity.test.js +0 -61
- package/dist/utils/workspaceLifecycle.test.d.ts +0 -1
- package/dist/utils/workspaceLifecycle.test.js +0 -64
- package/dist/utils/workspaceSyncPresentation.test.d.ts +0 -1
- package/dist/utils/workspaceSyncPresentation.test.js +0 -71
- package/scripts/bootstrap-playwright-auth.mjs +0 -155
- package/scripts/check-cloud-mcp.mjs +0 -83
- package/scripts/check-compat-boundaries.mjs +0 -41
- package/scripts/check-env.ts +0 -31
- package/scripts/check-localization-strings.mjs +0 -49
- package/scripts/check-runtime-boundaries.mjs +0 -44
- package/scripts/debug-global.mjs +0 -34
- package/scripts/debug-login.mjs +0 -32
- package/scripts/debug-server.mjs +0 -36
- package/scripts/deploy-prod.sh +0 -41
- package/scripts/deploy-staging.sh +0 -23
- package/scripts/export-sqlite-to-postgres.mjs +0 -123
- package/scripts/generate-env-example.ts +0 -8
- package/scripts/mcp-stdio-adapter.mjs +0 -160
- package/scripts/migrate-task-data-assets.mjs +0 -408
- package/scripts/playwright-auth.sh +0 -19
- package/scripts/qa-open-lib.mjs +0 -175
- package/scripts/qa-open-lib.mjs.d.ts +0 -49
- package/scripts/qa-open.mjs +0 -352
- package/scripts/release-version-lib.mjs +0 -88
- package/scripts/release-version.mjs +0 -72
- package/scripts/run-billing-performance-smoke.sh +0 -24
- package/scripts/run-dev-proxy.sh +0 -51
- package/scripts/run-e2e-realtime.sh +0 -30
- package/scripts/run-smoke.sh +0 -35
- package/scripts/run-soak.sh +0 -41
- package/scripts/test-global.js +0 -143
- package/scripts/update-homebrew-formula.sh +0 -108
- package/scripts/with-esbuild.sh +0 -11
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { assertCloudDatabaseProvider, resolveRuntimeModeFromEnv } from './runtimeMode';
|
|
3
|
-
describe('server/runtimeMode', () => {
|
|
4
|
-
it('defaults to local when unset and sqlite fallback', () => {
|
|
5
|
-
expect(resolveRuntimeModeFromEnv({}, 'sqlite')).toBe('local');
|
|
6
|
-
});
|
|
7
|
-
it('does not infer cloud runtime from postgres provider', () => {
|
|
8
|
-
expect(resolveRuntimeModeFromEnv({ TASKFORCE_DB_PROVIDER: 'postgres' }, 'postgres')).toBe('local');
|
|
9
|
-
});
|
|
10
|
-
it('honors explicit TASKFORCE_RUNTIME_MODE override', () => {
|
|
11
|
-
expect(resolveRuntimeModeFromEnv({ TASKFORCE_RUNTIME_MODE: 'local', TASKFORCE_DB_PROVIDER: 'postgres' })).toBe('local');
|
|
12
|
-
expect(resolveRuntimeModeFromEnv({ TASKFORCE_RUNTIME_MODE: 'cloud', TASKFORCE_DB_PROVIDER: 'sqlite' })).toBe('cloud');
|
|
13
|
-
});
|
|
14
|
-
it('keeps explicit local override even when postgres is configured', () => {
|
|
15
|
-
expect(resolveRuntimeModeFromEnv({ TASKFORCE_RUNTIME_MODE: 'local', TASKFORCE_DB_PROVIDER: 'postgres' }, 'postgres')).toBe('local');
|
|
16
|
-
});
|
|
17
|
-
it('rejects sqlite provider in cloud runtime by default', () => {
|
|
18
|
-
expect(() => assertCloudDatabaseProvider('cloud', 'sqlite', {})).toThrow(/Cloud runtime requires Postgres/i);
|
|
19
|
-
});
|
|
20
|
-
it('allows sqlite provider in cloud runtime only with explicit override', () => {
|
|
21
|
-
expect(() => assertCloudDatabaseProvider('cloud', 'sqlite', { TASKFORCE_ALLOW_SQLITE_IN_CLOUD: 'true' })).not.toThrow();
|
|
22
|
-
});
|
|
23
|
-
it('allows postgres provider in cloud runtime', () => {
|
|
24
|
-
expect(() => assertCloudDatabaseProvider('cloud', 'postgres', {})).not.toThrow();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { applySecurityHeaders } from './securityHeaders';
|
|
3
|
-
function mockRes() {
|
|
4
|
-
const store = {};
|
|
5
|
-
return {
|
|
6
|
-
setHeader: (name, value) => {
|
|
7
|
-
store[name] = value;
|
|
8
|
-
return undefined;
|
|
9
|
-
},
|
|
10
|
-
getHeader: (name) => store[name]
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
describe('server security headers', () => {
|
|
14
|
-
it('applies baseline security headers in local mode', () => {
|
|
15
|
-
const res = mockRes();
|
|
16
|
-
applySecurityHeaders(res, 'local', {});
|
|
17
|
-
expect(res.getHeader('X-Content-Type-Options')).toBe('nosniff');
|
|
18
|
-
expect(res.getHeader('Content-Security-Policy')).toContain("connect-src 'self' https://api.stripe.com");
|
|
19
|
-
expect(res.getHeader('Content-Security-Policy')).toContain('https://cloudflareinsights.com');
|
|
20
|
-
expect(res.getHeader('Content-Security-Policy')).toContain("frame-src 'self' https://js.stripe.com https://hooks.stripe.com");
|
|
21
|
-
expect(res.getHeader('Content-Security-Policy')).toContain("script-src 'self' https://js.stripe.com https://static.cloudflareinsights.com");
|
|
22
|
-
expect(res.getHeader('Content-Security-Policy')).toContain("style-src 'self' 'unsafe-inline' https://fonts.googleapis.com");
|
|
23
|
-
expect(res.getHeader('Content-Security-Policy')).toContain("font-src 'self' data: https://fonts.gstatic.com");
|
|
24
|
-
expect(res.getHeader('X-Frame-Options')).toBe('DENY');
|
|
25
|
-
expect(res.getHeader('Referrer-Policy')).toBe('strict-origin-when-cross-origin');
|
|
26
|
-
expect(res.getHeader('Permissions-Policy')).toBe('camera=(), microphone=(), geolocation=(), payment=()');
|
|
27
|
-
expect(res.getHeader('Cross-Origin-Opener-Policy')).toBe('same-origin');
|
|
28
|
-
expect(res.getHeader('Cross-Origin-Resource-Policy')).toBe('same-origin');
|
|
29
|
-
expect(res.getHeader('Strict-Transport-Security')).toBeUndefined();
|
|
30
|
-
});
|
|
31
|
-
it('includes configured cloud auth/proxy/ws origins in connect-src', () => {
|
|
32
|
-
const res = mockRes();
|
|
33
|
-
applySecurityHeaders(res, 'local', {
|
|
34
|
-
TASKFORCE_CLOUD_ENVIRONMENT: 'performance',
|
|
35
|
-
VITE_TASKFORCE_CLOUD_AUTH_BASE_URL: 'https://performance-app.taskforcehq.ai',
|
|
36
|
-
TASKFORCE_CLOUD_PROXY_BASE_URL: 'https://staging-app.taskforcehq.ai',
|
|
37
|
-
VITE_TASKFORCE_WS_BASE_URL: 'wss://performance-app.taskforcehq.ai'
|
|
38
|
-
});
|
|
39
|
-
const csp = String(res.getHeader('Content-Security-Policy') || '');
|
|
40
|
-
expect(csp).toContain('https://performance-app.taskforcehq.ai');
|
|
41
|
-
expect(csp).toContain('https://staging-app.taskforcehq.ai');
|
|
42
|
-
expect(csp).toContain('wss://performance-app.taskforcehq.ai');
|
|
43
|
-
});
|
|
44
|
-
it('includes the canonical cloud environment origin when only TASKFORCE_CLOUD_ENVIRONMENT is set', () => {
|
|
45
|
-
const res = mockRes();
|
|
46
|
-
applySecurityHeaders(res, 'local', {
|
|
47
|
-
TASKFORCE_CLOUD_ENVIRONMENT: 'staging'
|
|
48
|
-
});
|
|
49
|
-
const csp = String(res.getHeader('Content-Security-Policy') || '');
|
|
50
|
-
expect(csp).toContain('https://staging-app.taskforcehq.ai');
|
|
51
|
-
});
|
|
52
|
-
it('includes the R2 endpoint origin in connect-src and img-src when object storage provider is r2', () => {
|
|
53
|
-
const res = mockRes();
|
|
54
|
-
applySecurityHeaders(res, 'cloud', {
|
|
55
|
-
TASKFORCE_OBJECT_STORAGE_PROVIDER: 'r2',
|
|
56
|
-
R2_ACCOUNT_ID: '49f2543c00ad6d664cc214b0b85c46a3',
|
|
57
|
-
R2_BUCKET: 'taskforce-perf-assets',
|
|
58
|
-
R2_ACCESS_KEY_ID: 'test-access-key',
|
|
59
|
-
R2_SECRET_ACCESS_KEY: 'test-secret'
|
|
60
|
-
});
|
|
61
|
-
const csp = String(res.getHeader('Content-Security-Policy') || '');
|
|
62
|
-
expect(csp).toContain('https://49f2543c00ad6d664cc214b0b85c46a3.r2.cloudflarestorage.com');
|
|
63
|
-
expect(csp).toContain("img-src 'self' data: blob: https://49f2543c00ad6d664cc214b0b85c46a3.r2.cloudflarestorage.com");
|
|
64
|
-
});
|
|
65
|
-
it('adds HSTS in cloud mode', () => {
|
|
66
|
-
const res = mockRes();
|
|
67
|
-
applySecurityHeaders(res, 'cloud', {});
|
|
68
|
-
expect(res.getHeader('Strict-Transport-Security')).toBe('max-age=31536000; includeSubDomains');
|
|
69
|
-
});
|
|
70
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
import { TemplateEngine } from './templateEngine';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
// Explicitly mock fs
|
|
5
|
-
vi.mock('fs', () => ({
|
|
6
|
-
default: {
|
|
7
|
-
existsSync: vi.fn(),
|
|
8
|
-
readFileSync: vi.fn()
|
|
9
|
-
},
|
|
10
|
-
existsSync: vi.fn(),
|
|
11
|
-
readFileSync: vi.fn()
|
|
12
|
-
}));
|
|
13
|
-
// Mock formatTransformers
|
|
14
|
-
vi.mock('../services/formatTransformers', () => ({
|
|
15
|
-
formatTransformers: {
|
|
16
|
-
toToml: (content, metadata) => `prompt = """${content}"""\ndescription = "${metadata.description}"`,
|
|
17
|
-
toMarkdown: (content) => content
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
describe('TemplateEngine', () => {
|
|
21
|
-
let engine;
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
vi.resetAllMocks();
|
|
24
|
-
// Inject a mock base directory
|
|
25
|
-
engine = new TemplateEngine('/templates');
|
|
26
|
-
});
|
|
27
|
-
it('should load and process a template with default content', () => {
|
|
28
|
-
const mockTemplate = `
|
|
29
|
-
name: test-workflow
|
|
30
|
-
description: Test Description
|
|
31
|
-
type: workflow
|
|
32
|
-
content:
|
|
33
|
-
default: |
|
|
34
|
-
# Test Workflow
|
|
35
|
-
Step 1
|
|
36
|
-
`;
|
|
37
|
-
const mockEnv = `
|
|
38
|
-
id: test-env
|
|
39
|
-
name: Test Env
|
|
40
|
-
workflows:
|
|
41
|
-
directory: .test/workflows
|
|
42
|
-
format: markdown
|
|
43
|
-
filenamePattern: "{name}.md"
|
|
44
|
-
mcp:
|
|
45
|
-
prefix: "mcp_"
|
|
46
|
-
`;
|
|
47
|
-
vi.mocked(fs.existsSync).mockReturnValue(true);
|
|
48
|
-
vi.mocked(fs.readFileSync).mockImplementation((filePath) => {
|
|
49
|
-
const p = filePath.toString();
|
|
50
|
-
// path.join might use platform specific separators, normalize for check
|
|
51
|
-
if (p.includes('test-workflow.yaml'))
|
|
52
|
-
return mockTemplate;
|
|
53
|
-
if (p.includes('test-env.yaml'))
|
|
54
|
-
return mockEnv;
|
|
55
|
-
return '';
|
|
56
|
-
});
|
|
57
|
-
const result = engine.processTemplate('test-workflow', 'test-env');
|
|
58
|
-
expect(result.filename).toBe('test-workflow.md');
|
|
59
|
-
expect(result.content).toContain('# Test Workflow');
|
|
60
|
-
});
|
|
61
|
-
it('should substitute variables', () => {
|
|
62
|
-
const mockTemplate = `
|
|
63
|
-
name: vars-workflow
|
|
64
|
-
description: Desc
|
|
65
|
-
type: workflow
|
|
66
|
-
content:
|
|
67
|
-
default: "Run {{MCP_PREFIX}}command with {{CUSTOM_VAR}}"
|
|
68
|
-
`;
|
|
69
|
-
const mockEnv = `
|
|
70
|
-
id: env-1
|
|
71
|
-
name: Env 1
|
|
72
|
-
workflows:
|
|
73
|
-
directory: .dir
|
|
74
|
-
format: markdown
|
|
75
|
-
filenamePattern: "{name}.md"
|
|
76
|
-
mcp:
|
|
77
|
-
prefix: "my_prefix_"
|
|
78
|
-
`;
|
|
79
|
-
vi.mocked(fs.existsSync).mockReturnValue(true);
|
|
80
|
-
vi.mocked(fs.readFileSync).mockImplementation((filePath) => {
|
|
81
|
-
const p = filePath.toString();
|
|
82
|
-
if (p.includes('vars-workflow.yaml'))
|
|
83
|
-
return mockTemplate;
|
|
84
|
-
if (p.includes('env-1.yaml'))
|
|
85
|
-
return mockEnv;
|
|
86
|
-
return '';
|
|
87
|
-
});
|
|
88
|
-
const result = engine.processTemplate('vars-workflow', 'env-1', { CUSTOM_VAR: 'custom_value' });
|
|
89
|
-
expect(result.content).toBe('Run my_prefix_command with custom_value');
|
|
90
|
-
});
|
|
91
|
-
it('should use environment-specific content if available', () => {
|
|
92
|
-
const mockTemplate = `
|
|
93
|
-
name: multi-env
|
|
94
|
-
description: Desc
|
|
95
|
-
type: workflow
|
|
96
|
-
content:
|
|
97
|
-
default: "Default Content"
|
|
98
|
-
special-env: "Special Content"
|
|
99
|
-
`;
|
|
100
|
-
const mockEnv = `
|
|
101
|
-
id: special-env
|
|
102
|
-
name: Special Env
|
|
103
|
-
workflows:
|
|
104
|
-
directory: .dir
|
|
105
|
-
format: markdown
|
|
106
|
-
filenamePattern: "{name}.md"
|
|
107
|
-
`;
|
|
108
|
-
vi.mocked(fs.existsSync).mockReturnValue(true);
|
|
109
|
-
vi.mocked(fs.readFileSync).mockImplementation((filePath) => {
|
|
110
|
-
const p = filePath.toString();
|
|
111
|
-
if (p.includes('multi-env.yaml'))
|
|
112
|
-
return mockTemplate;
|
|
113
|
-
if (p.includes('special-env.yaml'))
|
|
114
|
-
return mockEnv;
|
|
115
|
-
return '';
|
|
116
|
-
});
|
|
117
|
-
const result = engine.processTemplate('multi-env', 'special-env');
|
|
118
|
-
expect(result.content).toBe('Special Content');
|
|
119
|
-
});
|
|
120
|
-
it('should apply TOML transformation', () => {
|
|
121
|
-
const mockTemplate = `
|
|
122
|
-
name: toml-test
|
|
123
|
-
description: My Description
|
|
124
|
-
type: workflow
|
|
125
|
-
content:
|
|
126
|
-
default: "Simple Content"
|
|
127
|
-
`;
|
|
128
|
-
const mockEnv = `
|
|
129
|
-
id: gemini
|
|
130
|
-
name: Gemini
|
|
131
|
-
workflows:
|
|
132
|
-
directory: .gemini
|
|
133
|
-
format: toml
|
|
134
|
-
filenamePattern: "{name}.toml"
|
|
135
|
-
`;
|
|
136
|
-
vi.mocked(fs.existsSync).mockReturnValue(true);
|
|
137
|
-
vi.mocked(fs.readFileSync).mockImplementation((filePath) => {
|
|
138
|
-
const p = filePath.toString();
|
|
139
|
-
if (p.includes('toml-test.yaml'))
|
|
140
|
-
return mockTemplate;
|
|
141
|
-
if (p.includes('gemini.yaml'))
|
|
142
|
-
return mockEnv;
|
|
143
|
-
return '';
|
|
144
|
-
});
|
|
145
|
-
const result = engine.processTemplate('toml-test', 'gemini');
|
|
146
|
-
expect(result.filename).toBe('toml-test.toml');
|
|
147
|
-
expect(result.content).toContain('prompt = """Simple Content"""');
|
|
148
|
-
expect(result.content).toContain('description = "My Description"');
|
|
149
|
-
});
|
|
150
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { TemplateEngine } from './templateEngine';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
// Compute the real path to templates
|
|
7
|
-
// src/__tests__/templates.test.ts -> src/resources/templates
|
|
8
|
-
const realTemplatesDir = path.resolve(__dirname, '../resources/templates');
|
|
9
|
-
describe('Workflow Templates Integration', () => {
|
|
10
|
-
const engine = new TemplateEngine(realTemplatesDir);
|
|
11
|
-
// Workflows that use MCP tools
|
|
12
|
-
const mcpWorkflows = ['do', 'execute', 'plan', 'evaluate', 'collaborate', 'review'];
|
|
13
|
-
mcpWorkflows.forEach(name => {
|
|
14
|
-
it(`should successfully load and process '${name}' template`, () => {
|
|
15
|
-
// 1. Load raw template
|
|
16
|
-
const template = engine.loadTemplate(name);
|
|
17
|
-
expect(template.name).toBe(name);
|
|
18
|
-
expect(template.content.default).toBeDefined();
|
|
19
|
-
expect(template.content.default.length).toBeGreaterThan(10);
|
|
20
|
-
// 2. Process for Antigravity (Markdown)
|
|
21
|
-
// Note: Environment config dictates MCP_PREFIX, so we expect the one from antigravity.yaml
|
|
22
|
-
const mdResult = engine.processTemplate(name, 'antigravity');
|
|
23
|
-
expect(mdResult.filename).toBe(`${name}.md`);
|
|
24
|
-
expect(mdResult.content).toContain('mcp_taskforce-taskforce_'); // default prefix
|
|
25
|
-
// 3. Process for Gemini (TOML)
|
|
26
|
-
const tomlResult = engine.processTemplate(name, 'gemini');
|
|
27
|
-
expect(tomlResult.filename).toBe(`${name}.toml`);
|
|
28
|
-
expect(tomlResult.content).toContain('prompt = """');
|
|
29
|
-
expect(tomlResult.content).toContain('description = "');
|
|
30
|
-
expect(tomlResult.content).toContain('mcp_taskforce-taskforce_');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
// Release workflow template was removed; build identity is now metadata-driven.
|
|
34
|
-
it('codex environment routes do workflow into AGENTS.md via inject override', () => {
|
|
35
|
-
const result = engine.processTemplate('do', 'codex');
|
|
36
|
-
expect(result.filename).toBe('AGENTS.md');
|
|
37
|
-
expect(result.strategy).toBe('inject');
|
|
38
|
-
expect(result.content).toContain('mcp_taskforce-taskforce_');
|
|
39
|
-
});
|
|
40
|
-
it('sanitizes invalid projectName characters in MCP prefix variables', () => {
|
|
41
|
-
const result = engine.processTemplate('do', 'codex', { projectName: '@taskforcehq/taskforce' });
|
|
42
|
-
expect(result.content).toContain('mcp_taskforce-taskforcehq-taskforce_');
|
|
43
|
-
expect(result.content).not.toContain('mcp_taskforce-@taskforcehq/taskforce_');
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { validateStructuredDocForAttach } from '../mcp/structuredDocValidation';
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const fixturesDir = path.resolve(__dirname, 'fixtures/workflow-docs');
|
|
8
|
-
function assertOrderedAndNonEmpty(content, headings) {
|
|
9
|
-
let cursor = 0;
|
|
10
|
-
for (let i = 0; i < headings.length; i++) {
|
|
11
|
-
const heading = headings[i];
|
|
12
|
-
const start = content.indexOf(heading, cursor);
|
|
13
|
-
expect(start, `Missing heading: ${heading}`).toBeGreaterThanOrEqual(0);
|
|
14
|
-
const nextHeading = headings[i + 1];
|
|
15
|
-
const end = nextHeading ? content.indexOf(nextHeading, start + heading.length) : content.length;
|
|
16
|
-
const body = content.slice(start + heading.length, end >= 0 ? end : content.length).trim();
|
|
17
|
-
if (heading.startsWith('### ')) {
|
|
18
|
-
expect(body.length, `Section body is empty for: ${heading}`).toBeGreaterThan(0);
|
|
19
|
-
}
|
|
20
|
-
cursor = start + heading.length;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
describe('Workflow document fixtures', () => {
|
|
24
|
-
it('sample implementation plan is complete and valid for attach', () => {
|
|
25
|
-
const relativePath = '.taskforce/docs/implementation_plans/implementation-plan.md';
|
|
26
|
-
const content = fs.readFileSync(path.join(fixturesDir, 'sample-implementation-plan.md'), 'utf8');
|
|
27
|
-
expect(validateStructuredDocForAttach(relativePath, content)).toEqual({ ok: true });
|
|
28
|
-
assertOrderedAndNonEmpty(content, [
|
|
29
|
-
'## Implementation Plan',
|
|
30
|
-
'### Goal',
|
|
31
|
-
'### Change Plan',
|
|
32
|
-
'### Risk Analysis',
|
|
33
|
-
'### Verification Checklist'
|
|
34
|
-
]);
|
|
35
|
-
});
|
|
36
|
-
it('sample evaluation is complete and valid for attach', () => {
|
|
37
|
-
const relativePath = '.taskforce/docs/evaluations/evaluation.md';
|
|
38
|
-
const content = fs.readFileSync(path.join(fixturesDir, 'sample-evaluation.md'), 'utf8');
|
|
39
|
-
expect(validateStructuredDocForAttach(relativePath, content)).toEqual({ ok: true });
|
|
40
|
-
assertOrderedAndNonEmpty(content, [
|
|
41
|
-
'## Evaluation Summary',
|
|
42
|
-
'### Recommendation (Proceed | Pivot | Kill)',
|
|
43
|
-
'### Value Score (1-5)',
|
|
44
|
-
'### Risk Score (1-5)',
|
|
45
|
-
'### Alternatives Considered',
|
|
46
|
-
'### Key Tradeoffs',
|
|
47
|
-
'### Next Step'
|
|
48
|
-
]);
|
|
49
|
-
});
|
|
50
|
-
it('sample review is complete and valid for attach', () => {
|
|
51
|
-
const relativePath = '.taskforce/docs/reviews/review.md';
|
|
52
|
-
const content = fs.readFileSync(path.join(fixturesDir, 'sample-review.md'), 'utf8');
|
|
53
|
-
expect(validateStructuredDocForAttach(relativePath, content)).toEqual({ ok: true });
|
|
54
|
-
assertOrderedAndNonEmpty(content, [
|
|
55
|
-
'## Review Verdict',
|
|
56
|
-
'### Verdict (PASS | WARN | FAIL)',
|
|
57
|
-
'### Findings',
|
|
58
|
-
'### Regression Risks',
|
|
59
|
-
'### Required Fixes',
|
|
60
|
-
'### Recommended Next Status'
|
|
61
|
-
]);
|
|
62
|
-
});
|
|
63
|
-
it('sample collaboration blueprint is complete and valid for attach', () => {
|
|
64
|
-
const relativePath = '.taskforce/docs/collaborations/collaboration-blueprint.md';
|
|
65
|
-
const content = fs.readFileSync(path.join(fixturesDir, 'sample-collaboration-blueprint.md'), 'utf8');
|
|
66
|
-
expect(validateStructuredDocForAttach(relativePath, content)).toEqual({ ok: true });
|
|
67
|
-
assertOrderedAndNonEmpty(content, [
|
|
68
|
-
'## Collaboration Blueprint',
|
|
69
|
-
'### Problem Statement',
|
|
70
|
-
'### Constraints',
|
|
71
|
-
'### Proposed Architecture',
|
|
72
|
-
'### Must-Haves',
|
|
73
|
-
'### Non-Goals',
|
|
74
|
-
'### Risks & Open Questions',
|
|
75
|
-
'### Recommended Next Step'
|
|
76
|
-
]);
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { TemplateEngine } from './templateEngine';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const templatesDir = path.resolve(__dirname, '../resources/templates');
|
|
8
|
-
const engine = new TemplateEngine(templatesDir);
|
|
9
|
-
const workflowNames = ['do', 'execute', 'plan', 'evaluate', 'collaborate', 'review'];
|
|
10
|
-
const contractHeadings = {
|
|
11
|
-
plan: [
|
|
12
|
-
'## Implementation Plan',
|
|
13
|
-
'### Goal',
|
|
14
|
-
'### Change Plan',
|
|
15
|
-
'### Risk Analysis',
|
|
16
|
-
'### Verification Checklist'
|
|
17
|
-
],
|
|
18
|
-
collaborate: [
|
|
19
|
-
'## Collaboration Blueprint',
|
|
20
|
-
'### Problem Statement',
|
|
21
|
-
'### Constraints',
|
|
22
|
-
'### Proposed Architecture',
|
|
23
|
-
'### Must-Haves',
|
|
24
|
-
'### Non-Goals',
|
|
25
|
-
'### Risks & Open Questions',
|
|
26
|
-
'### Recommended Next Step'
|
|
27
|
-
],
|
|
28
|
-
evaluate: [
|
|
29
|
-
'## Evaluation Summary',
|
|
30
|
-
'### Recommendation (Proceed | Pivot | Kill)',
|
|
31
|
-
'### Value Score (1-5)',
|
|
32
|
-
'### Risk Score (1-5)',
|
|
33
|
-
'### Alternatives Considered',
|
|
34
|
-
'### Key Tradeoffs',
|
|
35
|
-
'### Next Step'
|
|
36
|
-
],
|
|
37
|
-
review: [
|
|
38
|
-
'## Review Verdict',
|
|
39
|
-
'### Verdict (PASS | WARN | FAIL)',
|
|
40
|
-
'### Findings',
|
|
41
|
-
'### Regression Risks',
|
|
42
|
-
'### Required Fixes',
|
|
43
|
-
'### Recommended Next Status'
|
|
44
|
-
]
|
|
45
|
-
};
|
|
46
|
-
const summaryCommentHeadings = {
|
|
47
|
-
plan: [
|
|
48
|
-
'## Plan Summary',
|
|
49
|
-
'### Goal',
|
|
50
|
-
'### Scope',
|
|
51
|
-
'### Next Action'
|
|
52
|
-
],
|
|
53
|
-
collaborate: [
|
|
54
|
-
'## Collaboration Summary',
|
|
55
|
-
'### Architecture Direction',
|
|
56
|
-
'### Key Constraints',
|
|
57
|
-
'### Next Step'
|
|
58
|
-
],
|
|
59
|
-
evaluate: [
|
|
60
|
-
'## Evaluation Summary',
|
|
61
|
-
'### Recommendation (Proceed | Pivot | Kill)',
|
|
62
|
-
'### Value Score (1-5)',
|
|
63
|
-
'### Risk Score (1-5)',
|
|
64
|
-
'### Next Step'
|
|
65
|
-
],
|
|
66
|
-
review: [
|
|
67
|
-
'## Review Summary',
|
|
68
|
-
'### Verdict (PASS | WARN | FAIL)',
|
|
69
|
-
'### Findings',
|
|
70
|
-
'### Next Status'
|
|
71
|
-
]
|
|
72
|
-
};
|
|
73
|
-
describe('Workflow export matrix', () => {
|
|
74
|
-
const envDir = path.resolve(templatesDir, 'environments');
|
|
75
|
-
const envIds = fs.readdirSync(envDir).filter((f) => f.endsWith('.yaml')).map((f) => f.replace('.yaml', ''));
|
|
76
|
-
it('exports every workflow for every environment with correct format and MCP substitution', () => {
|
|
77
|
-
for (const envId of envIds) {
|
|
78
|
-
const env = engine.loadEnvironment(envId);
|
|
79
|
-
const expectedPrefix = env.mcp?.prefix?.replace('{projectName}', 'taskforce');
|
|
80
|
-
const expectedExt = env.workflows.format === 'toml' ? '.toml' : env.workflows.format === 'mdc' ? '.mdc' : '.md';
|
|
81
|
-
for (const workflowName of workflowNames) {
|
|
82
|
-
const result = engine.processTemplate(workflowName, envId);
|
|
83
|
-
expect(result.filename.endsWith(expectedExt), `${envId}/${workflowName} extension mismatch`).toBe(true);
|
|
84
|
-
expect(result.content.includes('{{MCP_PREFIX}}'), `${envId}/${workflowName} has unresolved MCP variable`).toBe(false);
|
|
85
|
-
if (expectedPrefix) {
|
|
86
|
-
expect(result.content.includes(expectedPrefix), `${envId}/${workflowName} missing MCP prefix`).toBe(true);
|
|
87
|
-
}
|
|
88
|
-
if (env.workflows.format === 'toml') {
|
|
89
|
-
expect(result.content.includes('prompt = """'), `${envId}/${workflowName} expected TOML prompt block`).toBe(true);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
expect(result.content.startsWith('---\n'), `${envId}/${workflowName} expected frontmatter`).toBe(true);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
it('keeps structured comment output contracts in master templates', () => {
|
|
98
|
-
for (const [workflowName, headings] of Object.entries(contractHeadings)) {
|
|
99
|
-
const template = engine.loadTemplate(workflowName);
|
|
100
|
-
for (const heading of headings) {
|
|
101
|
-
expect(template.content.default.includes(heading), `${workflowName} missing heading: ${heading}`).toBe(true);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
it('keeps structured summary comment contracts in master templates', () => {
|
|
106
|
-
for (const [workflowName, headings] of Object.entries(summaryCommentHeadings)) {
|
|
107
|
-
const template = engine.loadTemplate(workflowName);
|
|
108
|
-
for (const heading of headings) {
|
|
109
|
-
expect(template.content.default.includes(heading), `${workflowName} missing summary heading: ${heading}`).toBe(true);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { TemplateEngine } from '../services/templateEngine';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const templatesDir = path.resolve(__dirname, '../resources/templates');
|
|
8
|
-
const engine = new TemplateEngine(templatesDir);
|
|
9
|
-
const workflowNames = ['do', 'execute', 'plan', 'evaluate', 'collaborate', 'review'];
|
|
10
|
-
describe('Workflow export snapshots', () => {
|
|
11
|
-
const envDir = path.resolve(templatesDir, 'environments');
|
|
12
|
-
const envIds = fs.readdirSync(envDir)
|
|
13
|
-
.filter((f) => f.endsWith('.yaml'))
|
|
14
|
-
.map((f) => f.replace('.yaml', ''))
|
|
15
|
-
.sort();
|
|
16
|
-
for (const envId of envIds) {
|
|
17
|
-
for (const workflowName of workflowNames) {
|
|
18
|
-
it(`${envId}/${workflowName} export snapshot`, () => {
|
|
19
|
-
const result = engine.processTemplate(workflowName, envId);
|
|
20
|
-
expect(result.content).not.toContain('shared docs under `docs/`');
|
|
21
|
-
expect(result.content).not.toContain('store it under `docs/`');
|
|
22
|
-
expect({
|
|
23
|
-
filename: result.filename,
|
|
24
|
-
strategy: result.strategy,
|
|
25
|
-
content: result.content
|
|
26
|
-
}).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { execFileSync } from 'child_process';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
describe('Workflow template generation', () => {
|
|
5
|
-
it('generated workflow YAML files are up to date', () => {
|
|
6
|
-
const scriptPath = path.resolve(process.cwd(), 'scripts/generate-workflow-templates.mjs');
|
|
7
|
-
expect(() => execFileSync('node', [scriptPath, '--check'], {
|
|
8
|
-
cwd: process.cwd(),
|
|
9
|
-
stdio: 'pipe'
|
|
10
|
-
})).not.toThrow();
|
|
11
|
-
});
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|