@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,78 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import * as os from 'os';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
function makeCore() {
|
|
7
|
-
const projectRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-auth-token-test-'));
|
|
8
|
-
const core = new TaskforceCore({
|
|
9
|
-
projectRoot,
|
|
10
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
11
|
-
});
|
|
12
|
-
core.updateGlobalSettings({
|
|
13
|
-
billing: {
|
|
14
|
-
onboardingPolicy: {
|
|
15
|
-
mode: 'require_plan_selection',
|
|
16
|
-
planId: null
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
core.upsertPlanCatalog({ planId: 'starter', displayName: 'Starter', status: 'active' });
|
|
21
|
-
return {
|
|
22
|
-
core,
|
|
23
|
-
cleanup: () => {
|
|
24
|
-
core.close();
|
|
25
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
describe('Auth token lifecycle', () => {
|
|
30
|
-
it('keeps previously issued verification tokens valid until they are used or expire', () => {
|
|
31
|
-
const { core, cleanup } = makeCore();
|
|
32
|
-
try {
|
|
33
|
-
core.registerPasswordUser({
|
|
34
|
-
email: 'verify@example.com',
|
|
35
|
-
password: 'ValidPassphrase123!',
|
|
36
|
-
displayName: 'Verify User',
|
|
37
|
-
betaAccess: true
|
|
38
|
-
});
|
|
39
|
-
const first = String(core.requestEmailVerification({ email: 'verify@example.com' }).token || '');
|
|
40
|
-
const second = String(core.requestEmailVerification({ email: 'verify@example.com' }).token || '');
|
|
41
|
-
expect(first).toMatch(/^[a-f0-9]{48}$/);
|
|
42
|
-
expect(second).toMatch(/^[a-f0-9]{48}$/);
|
|
43
|
-
expect(first).not.toBe(second);
|
|
44
|
-
expect(core.inspectOneTimeAuthToken(first, 'email_verification').state).toBe('valid');
|
|
45
|
-
expect(core.inspectOneTimeAuthToken(second, 'email_verification').state).toBe('valid');
|
|
46
|
-
expect(core.verifyEmailWithToken(first)).toBe(true);
|
|
47
|
-
expect(core.inspectOneTimeAuthToken(first, 'email_verification').state).toBe('used');
|
|
48
|
-
expect(core.inspectOneTimeAuthToken(second, 'email_verification').state).toBe('valid');
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
51
|
-
cleanup();
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
it('keeps previously issued password reset tokens valid until they are used or expire', () => {
|
|
55
|
-
const { core, cleanup } = makeCore();
|
|
56
|
-
try {
|
|
57
|
-
core.registerPasswordUser({
|
|
58
|
-
email: 'reset@example.com',
|
|
59
|
-
password: 'ValidPassphrase123!',
|
|
60
|
-
displayName: 'Reset User',
|
|
61
|
-
betaAccess: true
|
|
62
|
-
});
|
|
63
|
-
const first = String(core.requestPasswordReset({ email: 'reset@example.com' }).token || '');
|
|
64
|
-
const second = String(core.requestPasswordReset({ email: 'reset@example.com' }).token || '');
|
|
65
|
-
expect(first).toMatch(/^[a-f0-9]{48}$/);
|
|
66
|
-
expect(second).toMatch(/^[a-f0-9]{48}$/);
|
|
67
|
-
expect(first).not.toBe(second);
|
|
68
|
-
expect(core.inspectOneTimeAuthToken(first, 'password_reset').state).toBe('valid');
|
|
69
|
-
expect(core.inspectOneTimeAuthToken(second, 'password_reset').state).toBe('valid');
|
|
70
|
-
expect(core.resetPasswordWithToken({ token: first, password: 'UpdatedPass456!' })).toBe(true);
|
|
71
|
-
expect(core.inspectOneTimeAuthToken(first, 'password_reset').state).toBe('used');
|
|
72
|
-
expect(core.inspectOneTimeAuthToken(second, 'password_reset').state).toBe('valid');
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
cleanup();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import * as os from 'os';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
function makeTempProjectRoot() {
|
|
7
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-bulk-preview-'));
|
|
8
|
-
fs.mkdirSync(root, { recursive: true });
|
|
9
|
-
return root;
|
|
10
|
-
}
|
|
11
|
-
describe('TaskforceCore bulk update preflight', () => {
|
|
12
|
-
it('builds deterministic apply set and skips invalid/noop updates', () => {
|
|
13
|
-
const projectRoot = makeTempProjectRoot();
|
|
14
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
15
|
-
const task = core.createTask({ title: 'A', priority: 2 });
|
|
16
|
-
const preview = core.bulkUpdateFieldsPreview([
|
|
17
|
-
{ title: 'missing id' },
|
|
18
|
-
{ id: 'task-missing', title: 'x' },
|
|
19
|
-
{ id: task.id, priority: 2 }, // no-op
|
|
20
|
-
{ id: task.id, priority: 3 } // apply
|
|
21
|
-
]);
|
|
22
|
-
expect(preview.total).toBe(4);
|
|
23
|
-
expect(preview.toApply).toHaveLength(1);
|
|
24
|
-
expect(preview.toApply[0].id).toBe(task.id);
|
|
25
|
-
expect(preview.toApply[0].changedFields).toEqual(['priority']);
|
|
26
|
-
expect(preview.skipped.map(s => s.code)).toEqual(expect.arrayContaining(['TASK_ID_REQUIRED', 'TASK_NOT_FOUND', 'DUPLICATE_SUPERSEDED']));
|
|
27
|
-
core.close();
|
|
28
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
29
|
-
});
|
|
30
|
-
it('applies only changed fields and returns skip counters', () => {
|
|
31
|
-
const projectRoot = makeTempProjectRoot();
|
|
32
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
33
|
-
const task = core.createTask({ title: 'A', priority: 2 });
|
|
34
|
-
const result = core.bulkUpdateFields([
|
|
35
|
-
{ id: task.id, priority: 2 }, // no-op
|
|
36
|
-
{ id: task.id, priority: 3 }, // superseded
|
|
37
|
-
{ id: task.id, priority: 4 } // effective
|
|
38
|
-
]);
|
|
39
|
-
const refreshed = core.getTask(task.id);
|
|
40
|
-
expect(refreshed?.priority).toBe(4);
|
|
41
|
-
expect(result.updated).toBe(1);
|
|
42
|
-
expect(result.skippedNoop).toBe(2);
|
|
43
|
-
expect(result.deduped).toBe(2);
|
|
44
|
-
core.close();
|
|
45
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
46
|
-
});
|
|
47
|
-
it('includes priority distribution before and after', () => {
|
|
48
|
-
const projectRoot = makeTempProjectRoot();
|
|
49
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
50
|
-
const a = core.createTask({ title: 'A', priority: 1 });
|
|
51
|
-
core.createTask({ title: 'B', priority: 2 });
|
|
52
|
-
const preview = core.bulkUpdateFieldsPreview([
|
|
53
|
-
{ id: a.id, priority: 4 }
|
|
54
|
-
]);
|
|
55
|
-
expect(preview.priorityBefore?.[1]).toBe(1);
|
|
56
|
-
expect(preview.priorityBefore?.[4] || 0).toBe(0);
|
|
57
|
-
expect(preview.priorityAfter?.[1] || 0).toBe(0);
|
|
58
|
-
expect(preview.priorityAfter?.[4]).toBe(1);
|
|
59
|
-
core.close();
|
|
60
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
const roots = [];
|
|
7
|
-
function createCore() {
|
|
8
|
-
const projectRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-completed-at-'));
|
|
9
|
-
roots.push(projectRoot);
|
|
10
|
-
return new TaskforceCore({ projectRoot });
|
|
11
|
-
}
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
while (roots.length > 0) {
|
|
14
|
-
const root = roots.pop();
|
|
15
|
-
if (root)
|
|
16
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
describe('TaskforceCore completedAt behavior', () => {
|
|
20
|
-
it('sets completedAt when status transitions to done', () => {
|
|
21
|
-
const core = createCore();
|
|
22
|
-
const task = core.createTask({ title: 'A', status: 'task' });
|
|
23
|
-
const updated = core.updateTask(task.id, { status: 'done' });
|
|
24
|
-
expect(updated?.completedAt).toBeTruthy();
|
|
25
|
-
core.close();
|
|
26
|
-
});
|
|
27
|
-
it('preserves completedAt when archiving a previously completed task', () => {
|
|
28
|
-
const core = createCore();
|
|
29
|
-
const task = core.createTask({ title: 'B', status: 'task' });
|
|
30
|
-
const completed = core.updateTask(task.id, { status: 'cancelled' });
|
|
31
|
-
expect(completed?.completedAt).toBeTruthy();
|
|
32
|
-
const completedAt = completed?.completedAt;
|
|
33
|
-
const archived = core.archiveTask(task.id, true, 'No longer needed');
|
|
34
|
-
expect(archived?.completedAt).toBe(completedAt);
|
|
35
|
-
core.close();
|
|
36
|
-
});
|
|
37
|
-
it('sets completedAt when archiving an active task', () => {
|
|
38
|
-
const core = createCore();
|
|
39
|
-
const task = core.createTask({ title: 'C', status: 'in-progress' });
|
|
40
|
-
const archived = core.archiveTask(task.id, false);
|
|
41
|
-
expect(archived?.completedAt).toBeTruthy();
|
|
42
|
-
core.close();
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import os from 'os';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { afterEach, describe, it, expect } from 'vitest';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
function createProjectRoot(prefix = 'taskforce-created-by-') {
|
|
7
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
|
8
|
-
fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify({ name: 'created-by-test' }), 'utf-8');
|
|
9
|
-
return root;
|
|
10
|
-
}
|
|
11
|
-
const createdRoots = [];
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
while (createdRoots.length > 0) {
|
|
14
|
-
const root = createdRoots.pop();
|
|
15
|
-
if (root && fs.existsSync(root)) {
|
|
16
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
describe('TaskforceCore - createdBy Field', () => {
|
|
21
|
-
it('does not persist new generic AI createdBy values on creation', () => {
|
|
22
|
-
const projectRoot = createProjectRoot();
|
|
23
|
-
createdRoots.push(projectRoot);
|
|
24
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
25
|
-
const task = core.createTask({
|
|
26
|
-
title: 'AI Task',
|
|
27
|
-
createdBy: 'AI Agent'
|
|
28
|
-
});
|
|
29
|
-
expect(task.createdBy).toBeUndefined();
|
|
30
|
-
});
|
|
31
|
-
it('preserves legacy generic AI createdBy values when hydrating stored tasks', () => {
|
|
32
|
-
const projectRoot = createProjectRoot();
|
|
33
|
-
createdRoots.push(projectRoot);
|
|
34
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
35
|
-
const task = core.createTask({ title: 'Legacy AI task' });
|
|
36
|
-
core.db.prepare(`
|
|
37
|
-
UPDATE tasks
|
|
38
|
-
SET created_by = ?
|
|
39
|
-
WHERE tenant_id = ? AND workspace_id = ? AND id = ?
|
|
40
|
-
`).run('agent', 'default', 'default', task.id);
|
|
41
|
-
const hydrated = core.getTask(task.id);
|
|
42
|
-
expect(hydrated?.createdBy).toBe('agent');
|
|
43
|
-
expect(hydrated?.createdByActor).toEqual(expect.objectContaining({
|
|
44
|
-
id: 'agent',
|
|
45
|
-
kind: 'ai',
|
|
46
|
-
isNamed: false
|
|
47
|
-
}));
|
|
48
|
-
});
|
|
49
|
-
it('defaults createdBy to undefined if not provided', () => {
|
|
50
|
-
const projectRoot = createProjectRoot();
|
|
51
|
-
createdRoots.push(projectRoot);
|
|
52
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
53
|
-
const task = core.createTask({ title: 'User Task' });
|
|
54
|
-
expect(task.createdBy).toBeUndefined();
|
|
55
|
-
});
|
|
56
|
-
it('treats legacy [User] title hints as unassigned when assignee is missing', () => {
|
|
57
|
-
const projectRoot = createProjectRoot();
|
|
58
|
-
createdRoots.push(projectRoot);
|
|
59
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
60
|
-
const task = core.createTask({
|
|
61
|
-
title: '[User] Configure backups',
|
|
62
|
-
createdBy: 'AI Agent'
|
|
63
|
-
});
|
|
64
|
-
expect(task.assignee).toBe('unassigned');
|
|
65
|
-
});
|
|
66
|
-
it('keeps legacy owner hints unassigned for compatibility', () => {
|
|
67
|
-
const projectRoot = createProjectRoot();
|
|
68
|
-
createdRoots.push(projectRoot);
|
|
69
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
70
|
-
const task = core.createTask({
|
|
71
|
-
title: 'Configure alerts',
|
|
72
|
-
description: 'Owner: User',
|
|
73
|
-
assignee: 'unassigned',
|
|
74
|
-
createdBy: 'AI Agent'
|
|
75
|
-
});
|
|
76
|
-
expect(task.assignee).toBe('unassigned');
|
|
77
|
-
});
|
|
78
|
-
it('defaults AI-authored tasks to unassigned when no explicit assignee is provided', () => {
|
|
79
|
-
const projectRoot = createProjectRoot();
|
|
80
|
-
createdRoots.push(projectRoot);
|
|
81
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
82
|
-
const task = core.createTask({
|
|
83
|
-
title: 'AI-created task',
|
|
84
|
-
createdBy: 'AI Agent'
|
|
85
|
-
});
|
|
86
|
-
expect(task.assignee).toBe('unassigned');
|
|
87
|
-
});
|
|
88
|
-
it('repairs unknown member assignees to unassigned', () => {
|
|
89
|
-
const projectRoot = createProjectRoot();
|
|
90
|
-
createdRoots.push(projectRoot);
|
|
91
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
92
|
-
const task = core.createTask({
|
|
93
|
-
title: 'Assign to workspace member',
|
|
94
|
-
assignee: 'member-123',
|
|
95
|
-
createdBy: 'AI Agent'
|
|
96
|
-
});
|
|
97
|
-
expect(task.assignee).toBe('unassigned');
|
|
98
|
-
});
|
|
99
|
-
it('normalizes legacy agent assignees to unassigned on create', () => {
|
|
100
|
-
const projectRoot = createProjectRoot();
|
|
101
|
-
createdRoots.push(projectRoot);
|
|
102
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
103
|
-
const task = core.createTask({
|
|
104
|
-
title: 'Legacy AI-owned task',
|
|
105
|
-
assignee: 'agent',
|
|
106
|
-
createdBy: 'AI Agent'
|
|
107
|
-
});
|
|
108
|
-
expect(task.assignee).toBe('unassigned');
|
|
109
|
-
});
|
|
110
|
-
it('preserves registered AI profile assignees', () => {
|
|
111
|
-
const projectRoot = createProjectRoot();
|
|
112
|
-
createdRoots.push(projectRoot);
|
|
113
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
114
|
-
core.createWorkspace({ workspaceId: 'workspace-1', name: 'Workspace 1' });
|
|
115
|
-
const { profile } = core.resolveAiProfile({
|
|
116
|
-
workspaceId: 'workspace-1',
|
|
117
|
-
name: 'Codex'
|
|
118
|
-
});
|
|
119
|
-
const task = core.createTask({
|
|
120
|
-
title: 'Assign to Codex',
|
|
121
|
-
assignee: profile.id
|
|
122
|
-
}, { workspaceId: 'workspace-1' });
|
|
123
|
-
expect(task.assignee).toBe(profile.id);
|
|
124
|
-
});
|
|
125
|
-
it('self-repairs stored assignees that no longer exist back to unassigned', () => {
|
|
126
|
-
const projectRoot = createProjectRoot();
|
|
127
|
-
createdRoots.push(projectRoot);
|
|
128
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
129
|
-
core.createWorkspace({ workspaceId: 'workspace-1', name: 'Workspace 1' });
|
|
130
|
-
const { profile } = core.resolveAiProfile({
|
|
131
|
-
workspaceId: 'workspace-1',
|
|
132
|
-
name: 'Codex'
|
|
133
|
-
});
|
|
134
|
-
const task = core.createTask({
|
|
135
|
-
title: 'Task with stale assignee',
|
|
136
|
-
assignee: profile.id
|
|
137
|
-
}, { workspaceId: 'workspace-1' });
|
|
138
|
-
core.db.prepare(`
|
|
139
|
-
UPDATE tasks
|
|
140
|
-
SET assignee = ?
|
|
141
|
-
WHERE tenant_id = ? AND workspace_id = ? AND id = ?
|
|
142
|
-
`).run('ghost-assignee', 'default', 'workspace-1', task.id);
|
|
143
|
-
const repaired = core.getTask(task.id, 'workspace-1');
|
|
144
|
-
expect(repaired?.assignee).toBe('unassigned');
|
|
145
|
-
const persisted = core.db.prepare(`
|
|
146
|
-
SELECT assignee
|
|
147
|
-
FROM tasks
|
|
148
|
-
WHERE tenant_id = ? AND workspace_id = ? AND id = ?
|
|
149
|
-
`).get('default', 'workspace-1', task.id);
|
|
150
|
-
expect(persisted?.assignee).toBe('unassigned');
|
|
151
|
-
});
|
|
152
|
-
it('normalizes escaped newlines for AI-authored task descriptions on create', () => {
|
|
153
|
-
const projectRoot = createProjectRoot();
|
|
154
|
-
createdRoots.push(projectRoot);
|
|
155
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
156
|
-
const task = core.createTask({
|
|
157
|
-
title: 'AI task with escaped description',
|
|
158
|
-
description: 'Phase 1\\n\\nPhase 2',
|
|
159
|
-
createdBy: 'AI Agent'
|
|
160
|
-
});
|
|
161
|
-
expect(task.description).toBe('Phase 1\n\nPhase 2');
|
|
162
|
-
});
|
|
163
|
-
it('preserves literal escaped newlines for manual task descriptions on create', () => {
|
|
164
|
-
const projectRoot = createProjectRoot();
|
|
165
|
-
createdRoots.push(projectRoot);
|
|
166
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
167
|
-
const task = core.createTask({
|
|
168
|
-
title: 'Manual task with literal backslashes',
|
|
169
|
-
description: 'Keep literal \\n\\n text'
|
|
170
|
-
});
|
|
171
|
-
expect(task.description).toBe('Keep literal \\n\\n text');
|
|
172
|
-
});
|
|
173
|
-
it('normalizes escaped newlines when updating an AI-authored task description', () => {
|
|
174
|
-
const projectRoot = createProjectRoot();
|
|
175
|
-
createdRoots.push(projectRoot);
|
|
176
|
-
const core = new TaskforceCore({ projectRoot, storagePath: '.taskforce' });
|
|
177
|
-
const task = core.createTask({
|
|
178
|
-
title: 'AI task to update',
|
|
179
|
-
createdBy: 'AI Agent'
|
|
180
|
-
});
|
|
181
|
-
const updated = core.updateTask(task.id, {
|
|
182
|
-
description: 'Line 1\\r\\n\\r\\nLine 2',
|
|
183
|
-
createdBy: 'AI Agent'
|
|
184
|
-
});
|
|
185
|
-
expect(updated?.description).toBe('Line 1\n\nLine 2');
|
|
186
|
-
expect(updated?.createdBy).toBeUndefined();
|
|
187
|
-
});
|
|
188
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { TaskforceCore } from './Taskforce';
|
|
6
|
-
function makeCore() {
|
|
7
|
-
const projectRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-deleted-'));
|
|
8
|
-
const core = new TaskforceCore({
|
|
9
|
-
projectRoot,
|
|
10
|
-
storagePath: path.join(projectRoot, '.taskforce')
|
|
11
|
-
});
|
|
12
|
-
return {
|
|
13
|
-
core,
|
|
14
|
-
cleanup: () => {
|
|
15
|
-
core.close();
|
|
16
|
-
fs.rmSync(projectRoot, { recursive: true, force: true });
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
describe('TaskforceCore deleted task lifecycle', () => {
|
|
21
|
-
it('moves deleted tasks into deleted-task history with actor, source, and snapshot data', () => {
|
|
22
|
-
const { core, cleanup } = makeCore();
|
|
23
|
-
try {
|
|
24
|
-
const task = core.createTask({
|
|
25
|
-
title: 'Trash me',
|
|
26
|
-
description: 'Forensics matter',
|
|
27
|
-
createdBy: 'user'
|
|
28
|
-
}, { workspaceId: 'workspace-a', actorRef: 'user' });
|
|
29
|
-
const deleted = core.softDeleteTask(task.id, 'workspace-a', { actorRef: 'user', source: 'ui' });
|
|
30
|
-
expect(deleted).toEqual(expect.objectContaining({
|
|
31
|
-
taskId: task.id,
|
|
32
|
-
source: 'ui',
|
|
33
|
-
actor: 'user',
|
|
34
|
-
actorType: 'human',
|
|
35
|
-
taskSnapshot: expect.objectContaining({
|
|
36
|
-
id: task.id,
|
|
37
|
-
title: 'Trash me',
|
|
38
|
-
description: 'Forensics matter'
|
|
39
|
-
})
|
|
40
|
-
}));
|
|
41
|
-
expect(core.getTask(task.id, 'workspace-a')).toBeNull();
|
|
42
|
-
expect(core.listDeletedTasks('workspace-a').deleted).toHaveLength(1);
|
|
43
|
-
}
|
|
44
|
-
finally {
|
|
45
|
-
cleanup();
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
it('restores a deleted task back into active tasks and removes it from deleted-task history', () => {
|
|
49
|
-
const { core, cleanup } = makeCore();
|
|
50
|
-
try {
|
|
51
|
-
const task = core.createTask({
|
|
52
|
-
title: 'Bring me back',
|
|
53
|
-
comments: [{ id: 'comment-1', author: 'user', text: 'Keep this note', timestamp: '2026-03-22T10:00:00.000Z' }],
|
|
54
|
-
createdBy: 'user'
|
|
55
|
-
}, { workspaceId: 'workspace-a', actorRef: 'user' });
|
|
56
|
-
const deleted = core.softDeleteTask(task.id, 'workspace-a', { actorRef: 'user', source: 'ui' });
|
|
57
|
-
const restored = core.restoreDeletedTask(deleted.id, 'workspace-a', { actorRef: 'user' });
|
|
58
|
-
expect(restored).toEqual(expect.objectContaining({
|
|
59
|
-
id: task.id,
|
|
60
|
-
title: 'Bring me back',
|
|
61
|
-
comments: expect.arrayContaining([
|
|
62
|
-
expect.objectContaining({ text: 'Keep this note' })
|
|
63
|
-
])
|
|
64
|
-
}));
|
|
65
|
-
expect(core.listDeletedTasks('workspace-a').deleted).toHaveLength(0);
|
|
66
|
-
expect(core.getTask(task.id, 'workspace-a')).not.toBeNull();
|
|
67
|
-
expect(core.listTaskEvents(task.id, 'workspace-a').map((event) => event.action)).toContain('task-restored');
|
|
68
|
-
}
|
|
69
|
-
finally {
|
|
70
|
-
cleanup();
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
it('purges deleted task records older than the retention window', () => {
|
|
74
|
-
const { core, cleanup } = makeCore();
|
|
75
|
-
try {
|
|
76
|
-
const staleTask = core.createTask({
|
|
77
|
-
title: 'Old deleted task',
|
|
78
|
-
createdBy: 'user'
|
|
79
|
-
}, { workspaceId: 'workspace-a', actorRef: 'user' });
|
|
80
|
-
const freshTask = core.createTask({
|
|
81
|
-
title: 'Fresh deleted task',
|
|
82
|
-
createdBy: 'user'
|
|
83
|
-
}, { workspaceId: 'workspace-a', actorRef: 'user' });
|
|
84
|
-
const staleDeleted = core.softDeleteTask(staleTask.id, 'workspace-a', { actorRef: 'user', source: 'ui' });
|
|
85
|
-
const freshDeleted = core.softDeleteTask(freshTask.id, 'workspace-a', { actorRef: 'user', source: 'ui' });
|
|
86
|
-
const staleDeletedAt = new Date(Date.now() - (91 * 24 * 60 * 60 * 1000)).toISOString();
|
|
87
|
-
core.db.prepare(`
|
|
88
|
-
UPDATE deleted_tasks
|
|
89
|
-
SET deleted_at = ?
|
|
90
|
-
WHERE tenant_id = ? AND workspace_id = ? AND task_id = ?
|
|
91
|
-
`).run(staleDeletedAt, core.getTenantId(), 'workspace-a', staleTask.id);
|
|
92
|
-
const listed = core.listDeletedTasks('workspace-a').deleted;
|
|
93
|
-
expect(listed).toHaveLength(1);
|
|
94
|
-
expect(listed[0]?.taskId).toBe(freshTask.id);
|
|
95
|
-
expect(core.getDeletedTask(staleDeleted.id, 'workspace-a')).toBeNull();
|
|
96
|
-
expect(core.getDeletedTask(freshDeleted.id, 'workspace-a')).toEqual(expect.objectContaining({
|
|
97
|
-
taskId: freshTask.id
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
finally {
|
|
101
|
-
cleanup();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|