@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,509 +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-planning-entities-'));
|
|
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 planning entity persistence', () => {
|
|
20
|
-
it('persists initiatives, workstreams, and task workstream links', () => {
|
|
21
|
-
const core = createCore();
|
|
22
|
-
const initiative = core.createInitiative({
|
|
23
|
-
title: 'Launch initiative',
|
|
24
|
-
comments: [{ id: 'comment-1', author: 'user', text: 'Kickoff note', timestamp: '2026-01-01T00:00:00.000Z' }],
|
|
25
|
-
attachments: [{
|
|
26
|
-
path: '/tmp/launch-brief.md',
|
|
27
|
-
fsPath: 'workspaces/workspace-1/assets/documents/asset-launch-brief.md',
|
|
28
|
-
caption: 'Launch brief',
|
|
29
|
-
displayName: 'Launch Brief',
|
|
30
|
-
originalFilename: 'launch-brief.md',
|
|
31
|
-
assetId: 'asset-launch-brief',
|
|
32
|
-
referenceNumber: 12,
|
|
33
|
-
referenceLabel: 'D-12',
|
|
34
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
35
|
-
}],
|
|
36
|
-
});
|
|
37
|
-
const workstream = core.createWorkstream({
|
|
38
|
-
title: 'Billing workstream',
|
|
39
|
-
initiativeId: initiative.id,
|
|
40
|
-
comments: [{ id: 'comment-2', author: 'user', text: 'Billing note', timestamp: '2026-01-01T00:00:00.000Z' }],
|
|
41
|
-
attachments: [{
|
|
42
|
-
path: '/tmp/billing-brief.md',
|
|
43
|
-
fsPath: 'workspaces/workspace-1/assets/documents/asset-billing-brief.md',
|
|
44
|
-
caption: 'Billing brief',
|
|
45
|
-
displayName: 'Billing Brief',
|
|
46
|
-
originalFilename: 'billing-brief.md',
|
|
47
|
-
assetId: 'asset-billing-brief',
|
|
48
|
-
referenceNumber: 13,
|
|
49
|
-
referenceLabel: 'D-13',
|
|
50
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
51
|
-
}],
|
|
52
|
-
});
|
|
53
|
-
const task = core.createTask({
|
|
54
|
-
title: 'Adjust billing copy',
|
|
55
|
-
workstreamId: workstream.id,
|
|
56
|
-
checklistItems: [
|
|
57
|
-
{ id: 'check-1', taskId: 'pending', title: 'Update docs', isCompleted: false, order: 0, createdAt: '2026-01-01T00:00:00.000Z' },
|
|
58
|
-
{ id: 'check-2', taskId: 'pending', title: 'Review copy', isCompleted: true, order: 1, createdAt: '2026-01-01T00:00:00.000Z' },
|
|
59
|
-
],
|
|
60
|
-
});
|
|
61
|
-
const persistedInitiative = core.getInitiative(initiative.id);
|
|
62
|
-
const persistedWorkstream = core.getWorkstream(workstream.id);
|
|
63
|
-
const persistedTask = core.getTask(task.id);
|
|
64
|
-
expect(persistedInitiative?.referenceLabel).toBe('IN-1');
|
|
65
|
-
expect(persistedInitiative?.comments?.[0]?.text).toBe('Kickoff note');
|
|
66
|
-
expect(persistedInitiative?.attachments?.[0]).toMatchObject({
|
|
67
|
-
path: '/tmp/launch-brief.md',
|
|
68
|
-
fsPath: 'workspaces/workspace-1/assets/documents/asset-launch-brief.md',
|
|
69
|
-
caption: 'Launch brief',
|
|
70
|
-
displayName: 'Launch Brief',
|
|
71
|
-
originalFilename: 'launch-brief.md',
|
|
72
|
-
assetId: 'asset-launch-brief',
|
|
73
|
-
referenceNumber: 12,
|
|
74
|
-
referenceLabel: 'D-12',
|
|
75
|
-
});
|
|
76
|
-
expect(persistedWorkstream?.referenceLabel).toBe('WS-1');
|
|
77
|
-
expect(persistedWorkstream?.initiativeId).toBe(initiative.id);
|
|
78
|
-
expect(persistedWorkstream?.comments?.[0]?.text).toBe('Billing note');
|
|
79
|
-
expect(persistedWorkstream?.attachments?.[0]).toMatchObject({
|
|
80
|
-
path: '/tmp/billing-brief.md',
|
|
81
|
-
fsPath: 'workspaces/workspace-1/assets/documents/asset-billing-brief.md',
|
|
82
|
-
caption: 'Billing brief',
|
|
83
|
-
displayName: 'Billing Brief',
|
|
84
|
-
originalFilename: 'billing-brief.md',
|
|
85
|
-
assetId: 'asset-billing-brief',
|
|
86
|
-
referenceNumber: 13,
|
|
87
|
-
referenceLabel: 'D-13',
|
|
88
|
-
});
|
|
89
|
-
expect(persistedTask?.workstreamId).toBe(workstream.id);
|
|
90
|
-
expect(persistedTask?.checklistItems?.map((item) => item.title)).toEqual([
|
|
91
|
-
'Update docs',
|
|
92
|
-
'Review copy',
|
|
93
|
-
]);
|
|
94
|
-
expect(persistedTask?.checklistItems?.map((item) => item.isCompleted)).toEqual([false, true]);
|
|
95
|
-
core.close();
|
|
96
|
-
});
|
|
97
|
-
it('updates workstream initiative links and replaces structured checklist items', () => {
|
|
98
|
-
const core = createCore();
|
|
99
|
-
const initiativeA = core.createInitiative({ title: 'Initiative A' });
|
|
100
|
-
const initiativeB = core.createInitiative({ title: 'Initiative B' });
|
|
101
|
-
const workstream = core.createWorkstream({
|
|
102
|
-
title: 'Ops workstream',
|
|
103
|
-
initiativeId: initiativeA.id,
|
|
104
|
-
});
|
|
105
|
-
const task = core.createTask({
|
|
106
|
-
title: 'Prepare rollout checklist',
|
|
107
|
-
workstreamId: workstream.id,
|
|
108
|
-
});
|
|
109
|
-
const movedWorkstream = core.updateWorkstream(workstream.id, {
|
|
110
|
-
initiativeId: initiativeB.id,
|
|
111
|
-
comments: [{ id: 'comment-3', author: 'user', text: 'Moved note', timestamp: '2026-01-02T00:00:00.000Z' }],
|
|
112
|
-
attachments: [{ path: '/tmp/moved-note.md', caption: 'Moved note', timestamp: '2026-01-02T00:00:00.000Z' }],
|
|
113
|
-
});
|
|
114
|
-
const updatedTask = core.updateTask(task.id, {
|
|
115
|
-
checklistItems: [
|
|
116
|
-
{ id: 'check-3', taskId: task.id, title: 'Prepare docs', isCompleted: false, order: 0, createdAt: '2026-01-01T00:00:00.000Z' },
|
|
117
|
-
{ id: 'check-4', taskId: task.id, title: 'Ship changes', isCompleted: false, order: 1, createdAt: '2026-01-01T00:00:00.000Z' },
|
|
118
|
-
],
|
|
119
|
-
});
|
|
120
|
-
expect(movedWorkstream.initiativeId).toBe(initiativeB.id);
|
|
121
|
-
expect(movedWorkstream.comments?.[0]?.text).toBe('Moved note');
|
|
122
|
-
expect(movedWorkstream.attachments?.[0]).toMatchObject({ path: '/tmp/moved-note.md' });
|
|
123
|
-
expect(updatedTask?.checklistItems?.map((item) => item.title)).toEqual([
|
|
124
|
-
'Prepare docs',
|
|
125
|
-
'Ship changes',
|
|
126
|
-
]);
|
|
127
|
-
const clearedWorkstream = core.updateWorkstream(workstream.id, { initiativeId: null });
|
|
128
|
-
const clearedTask = core.updateTask(task.id, { workstreamId: null });
|
|
129
|
-
expect(clearedWorkstream.initiativeId).toBeNull();
|
|
130
|
-
expect(clearedTask?.workstreamId).toBeNull();
|
|
131
|
-
core.close();
|
|
132
|
-
});
|
|
133
|
-
it('syncs canonical attachment links for initiatives and workstreams like task attachments do', () => {
|
|
134
|
-
const core = createCore();
|
|
135
|
-
const workspaceId = 'default';
|
|
136
|
-
const assetStore = core.getWorkspaceAssetStore();
|
|
137
|
-
assetStore.upsertAsset({
|
|
138
|
-
assetId: 'asset-initiative-doc',
|
|
139
|
-
workspaceId,
|
|
140
|
-
kind: 'document',
|
|
141
|
-
logicalName: 'Initiative context',
|
|
142
|
-
originalFilename: 'initiative-context.md',
|
|
143
|
-
mimeType: 'text/markdown',
|
|
144
|
-
storageProvider: 'local',
|
|
145
|
-
storageKey: 'workspaces/default/assets/documents/initiative-context.md',
|
|
146
|
-
contentSha256: 'sha-init',
|
|
147
|
-
sizeBytes: 120,
|
|
148
|
-
documentId: 'doc-initiative-context',
|
|
149
|
-
version: 1,
|
|
150
|
-
isLatest: 1,
|
|
151
|
-
});
|
|
152
|
-
assetStore.upsertAsset({
|
|
153
|
-
assetId: 'asset-workstream-doc',
|
|
154
|
-
workspaceId,
|
|
155
|
-
kind: 'document',
|
|
156
|
-
logicalName: 'Workstream context',
|
|
157
|
-
originalFilename: 'workstream-context.md',
|
|
158
|
-
mimeType: 'text/markdown',
|
|
159
|
-
storageProvider: 'local',
|
|
160
|
-
storageKey: 'workspaces/default/assets/documents/workstream-context.md',
|
|
161
|
-
contentSha256: 'sha-workstream',
|
|
162
|
-
sizeBytes: 140,
|
|
163
|
-
documentId: 'doc-workstream-context',
|
|
164
|
-
version: 1,
|
|
165
|
-
isLatest: 1,
|
|
166
|
-
});
|
|
167
|
-
const initiative = core.createInitiative({
|
|
168
|
-
title: 'Platform',
|
|
169
|
-
attachments: [{
|
|
170
|
-
path: '/api/taskforce/documents/asset-initiative-doc/content',
|
|
171
|
-
fsPath: 'workspaces/default/assets/documents/initiative-context.md',
|
|
172
|
-
caption: 'Initiative context',
|
|
173
|
-
assetId: 'asset-initiative-doc',
|
|
174
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
175
|
-
}],
|
|
176
|
-
}, workspaceId);
|
|
177
|
-
const workstream = core.createWorkstream({
|
|
178
|
-
title: 'Sync',
|
|
179
|
-
initiativeId: initiative.id,
|
|
180
|
-
attachments: [{
|
|
181
|
-
path: '/api/taskforce/documents/asset-workstream-doc/content',
|
|
182
|
-
fsPath: 'workspaces/default/assets/documents/workstream-context.md',
|
|
183
|
-
caption: 'Workstream context',
|
|
184
|
-
assetId: 'asset-workstream-doc',
|
|
185
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
186
|
-
}],
|
|
187
|
-
}, workspaceId);
|
|
188
|
-
expect(assetStore.listLinksForTarget('initiative', initiative.id, workspaceId)).toEqual([
|
|
189
|
-
expect.objectContaining({
|
|
190
|
-
assetId: 'asset-initiative-doc',
|
|
191
|
-
targetType: 'initiative',
|
|
192
|
-
targetId: initiative.id,
|
|
193
|
-
role: 'attachment',
|
|
194
|
-
})
|
|
195
|
-
]);
|
|
196
|
-
expect(assetStore.listLinksForTarget('workstream', workstream.id, workspaceId)).toEqual([
|
|
197
|
-
expect.objectContaining({
|
|
198
|
-
assetId: 'asset-workstream-doc',
|
|
199
|
-
targetType: 'workstream',
|
|
200
|
-
targetId: workstream.id,
|
|
201
|
-
role: 'attachment',
|
|
202
|
-
})
|
|
203
|
-
]);
|
|
204
|
-
core.updateInitiative(initiative.id, { attachments: [] }, workspaceId);
|
|
205
|
-
core.updateWorkstream(workstream.id, { attachments: [] }, workspaceId);
|
|
206
|
-
expect(assetStore.listLinksForTarget('initiative', initiative.id, workspaceId)).toEqual([]);
|
|
207
|
-
expect(assetStore.listLinksForTarget('initiative', initiative.id, workspaceId, { includeDeleted: true })).toEqual([
|
|
208
|
-
expect.objectContaining({
|
|
209
|
-
assetId: 'asset-initiative-doc',
|
|
210
|
-
deletedAt: expect.any(String),
|
|
211
|
-
})
|
|
212
|
-
]);
|
|
213
|
-
expect(assetStore.listLinksForTarget('workstream', workstream.id, workspaceId)).toEqual([]);
|
|
214
|
-
expect(assetStore.listLinksForTarget('workstream', workstream.id, workspaceId, { includeDeleted: true })).toEqual([
|
|
215
|
-
expect.objectContaining({
|
|
216
|
-
assetId: 'asset-workstream-doc',
|
|
217
|
-
deletedAt: expect.any(String),
|
|
218
|
-
})
|
|
219
|
-
]);
|
|
220
|
-
core.close();
|
|
221
|
-
});
|
|
222
|
-
it('syncs sparse canonical document attachment links by asset id for planning entities', () => {
|
|
223
|
-
const core = createCore();
|
|
224
|
-
const workspaceId = 'default';
|
|
225
|
-
const assetStore = core.getWorkspaceAssetStore();
|
|
226
|
-
assetStore.upsertAsset({
|
|
227
|
-
assetId: 'asset-sparse-initiative-doc',
|
|
228
|
-
workspaceId,
|
|
229
|
-
kind: 'document',
|
|
230
|
-
logicalName: 'Sparse initiative context',
|
|
231
|
-
originalFilename: 'sparse-initiative.md',
|
|
232
|
-
mimeType: 'text/markdown',
|
|
233
|
-
storageProvider: 'local',
|
|
234
|
-
storageKey: 'workspaces/default/assets/documents/sparse-initiative.md',
|
|
235
|
-
contentSha256: 'sha-sparse-initiative',
|
|
236
|
-
sizeBytes: 120,
|
|
237
|
-
documentId: 'doc-sparse-initiative',
|
|
238
|
-
version: 1,
|
|
239
|
-
isLatest: 1,
|
|
240
|
-
});
|
|
241
|
-
assetStore.upsertAsset({
|
|
242
|
-
assetId: 'asset-sparse-workstream-doc',
|
|
243
|
-
workspaceId,
|
|
244
|
-
kind: 'document',
|
|
245
|
-
logicalName: 'Sparse workstream context',
|
|
246
|
-
originalFilename: 'sparse-workstream.md',
|
|
247
|
-
mimeType: 'text/markdown',
|
|
248
|
-
storageProvider: 'local',
|
|
249
|
-
storageKey: 'workspaces/default/assets/documents/sparse-workstream.md',
|
|
250
|
-
contentSha256: 'sha-sparse-workstream',
|
|
251
|
-
sizeBytes: 140,
|
|
252
|
-
documentId: 'doc-sparse-workstream',
|
|
253
|
-
version: 1,
|
|
254
|
-
isLatest: 1,
|
|
255
|
-
});
|
|
256
|
-
const initiative = core.createInitiative({
|
|
257
|
-
title: 'Platform',
|
|
258
|
-
attachments: [{
|
|
259
|
-
path: '/api/taskforce/documents/asset-sparse-initiative-doc/content',
|
|
260
|
-
assetId: 'asset-sparse-initiative-doc',
|
|
261
|
-
caption: 'Sparse initiative context',
|
|
262
|
-
referenceLabel: 'D-101',
|
|
263
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
264
|
-
}],
|
|
265
|
-
}, workspaceId);
|
|
266
|
-
const workstream = core.createWorkstream({
|
|
267
|
-
title: 'Sync',
|
|
268
|
-
initiativeId: initiative.id,
|
|
269
|
-
attachments: [{
|
|
270
|
-
path: '/api/taskforce/documents/asset-sparse-workstream-doc/content',
|
|
271
|
-
assetId: 'asset-sparse-workstream-doc',
|
|
272
|
-
caption: 'Sparse workstream context',
|
|
273
|
-
referenceLabel: 'D-102',
|
|
274
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
275
|
-
}],
|
|
276
|
-
}, workspaceId);
|
|
277
|
-
expect(assetStore.listLinksForTarget('initiative', initiative.id, workspaceId)).toEqual([
|
|
278
|
-
expect.objectContaining({
|
|
279
|
-
assetId: 'asset-sparse-initiative-doc',
|
|
280
|
-
targetType: 'initiative',
|
|
281
|
-
targetId: initiative.id,
|
|
282
|
-
role: 'attachment',
|
|
283
|
-
})
|
|
284
|
-
]);
|
|
285
|
-
expect(assetStore.listLinksForTarget('workstream', workstream.id, workspaceId)).toEqual([
|
|
286
|
-
expect.objectContaining({
|
|
287
|
-
assetId: 'asset-sparse-workstream-doc',
|
|
288
|
-
targetType: 'workstream',
|
|
289
|
-
targetId: workstream.id,
|
|
290
|
-
role: 'attachment',
|
|
291
|
-
})
|
|
292
|
-
]);
|
|
293
|
-
core.close();
|
|
294
|
-
});
|
|
295
|
-
it('preserves planning attachments when sync upserts omit attachment fields', () => {
|
|
296
|
-
const core = createCore();
|
|
297
|
-
const workspaceId = 'default';
|
|
298
|
-
const assetStore = core.getWorkspaceAssetStore();
|
|
299
|
-
assetStore.upsertAsset({
|
|
300
|
-
assetId: 'asset-preserved-initiative-doc',
|
|
301
|
-
workspaceId,
|
|
302
|
-
kind: 'document',
|
|
303
|
-
logicalName: 'Preserved initiative context',
|
|
304
|
-
originalFilename: 'preserved-initiative.md',
|
|
305
|
-
mimeType: 'text/markdown',
|
|
306
|
-
storageProvider: 'local',
|
|
307
|
-
storageKey: 'workspaces/default/assets/documents/preserved-initiative.md',
|
|
308
|
-
contentSha256: 'sha-preserved-initiative',
|
|
309
|
-
sizeBytes: 120,
|
|
310
|
-
documentId: 'doc-preserved-initiative',
|
|
311
|
-
version: 1,
|
|
312
|
-
isLatest: 1,
|
|
313
|
-
});
|
|
314
|
-
assetStore.upsertAsset({
|
|
315
|
-
assetId: 'asset-preserved-workstream-doc',
|
|
316
|
-
workspaceId,
|
|
317
|
-
kind: 'document',
|
|
318
|
-
logicalName: 'Preserved workstream context',
|
|
319
|
-
originalFilename: 'preserved-workstream.md',
|
|
320
|
-
mimeType: 'text/markdown',
|
|
321
|
-
storageProvider: 'local',
|
|
322
|
-
storageKey: 'workspaces/default/assets/documents/preserved-workstream.md',
|
|
323
|
-
contentSha256: 'sha-preserved-workstream',
|
|
324
|
-
sizeBytes: 140,
|
|
325
|
-
documentId: 'doc-preserved-workstream',
|
|
326
|
-
version: 1,
|
|
327
|
-
isLatest: 1,
|
|
328
|
-
});
|
|
329
|
-
const initiative = core.createInitiative({
|
|
330
|
-
title: 'Platform',
|
|
331
|
-
attachments: [{
|
|
332
|
-
path: '/api/taskforce/documents/asset-preserved-initiative-doc/content',
|
|
333
|
-
assetId: 'asset-preserved-initiative-doc',
|
|
334
|
-
caption: 'Preserved initiative context',
|
|
335
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
336
|
-
}],
|
|
337
|
-
}, workspaceId);
|
|
338
|
-
const workstream = core.createWorkstream({
|
|
339
|
-
title: 'Sync',
|
|
340
|
-
initiativeId: initiative.id,
|
|
341
|
-
attachments: [{
|
|
342
|
-
path: '/api/taskforce/documents/asset-preserved-workstream-doc/content',
|
|
343
|
-
assetId: 'asset-preserved-workstream-doc',
|
|
344
|
-
caption: 'Preserved workstream context',
|
|
345
|
-
timestamp: '2026-01-01T00:00:00.000Z',
|
|
346
|
-
}],
|
|
347
|
-
}, workspaceId);
|
|
348
|
-
core.upsertInitiativeForSync({
|
|
349
|
-
id: initiative.id,
|
|
350
|
-
referenceNumber: initiative.referenceNumber,
|
|
351
|
-
title: 'Platform updated elsewhere',
|
|
352
|
-
description: initiative.description,
|
|
353
|
-
ownerId: initiative.ownerId,
|
|
354
|
-
createdAt: initiative.createdAt,
|
|
355
|
-
updatedAt: '2026-01-01T00:05:00.000Z',
|
|
356
|
-
order: initiative.order,
|
|
357
|
-
isArchived: false,
|
|
358
|
-
}, workspaceId);
|
|
359
|
-
core.upsertWorkstreamForSync({
|
|
360
|
-
id: workstream.id,
|
|
361
|
-
referenceNumber: workstream.referenceNumber,
|
|
362
|
-
initiativeId: initiative.id,
|
|
363
|
-
title: 'Sync updated elsewhere',
|
|
364
|
-
description: workstream.description,
|
|
365
|
-
ownerId: workstream.ownerId,
|
|
366
|
-
createdAt: workstream.createdAt,
|
|
367
|
-
updatedAt: '2026-01-01T00:05:00.000Z',
|
|
368
|
-
order: workstream.order,
|
|
369
|
-
isArchived: false,
|
|
370
|
-
}, workspaceId);
|
|
371
|
-
expect(core.getInitiative(initiative.id, workspaceId)?.attachments).toEqual([
|
|
372
|
-
expect.objectContaining({
|
|
373
|
-
assetId: 'asset-preserved-initiative-doc',
|
|
374
|
-
caption: 'Preserved initiative context',
|
|
375
|
-
})
|
|
376
|
-
]);
|
|
377
|
-
expect(core.getWorkstream(workstream.id, workspaceId)?.attachments).toEqual([
|
|
378
|
-
expect.objectContaining({
|
|
379
|
-
assetId: 'asset-preserved-workstream-doc',
|
|
380
|
-
caption: 'Preserved workstream context',
|
|
381
|
-
})
|
|
382
|
-
]);
|
|
383
|
-
expect(assetStore.listLinksForTarget('initiative', initiative.id, workspaceId)).toEqual([
|
|
384
|
-
expect.objectContaining({
|
|
385
|
-
assetId: 'asset-preserved-initiative-doc',
|
|
386
|
-
deletedAt: null,
|
|
387
|
-
})
|
|
388
|
-
]);
|
|
389
|
-
expect(assetStore.listLinksForTarget('workstream', workstream.id, workspaceId)).toEqual([
|
|
390
|
-
expect.objectContaining({
|
|
391
|
-
assetId: 'asset-preserved-workstream-doc',
|
|
392
|
-
deletedAt: null,
|
|
393
|
-
})
|
|
394
|
-
]);
|
|
395
|
-
core.close();
|
|
396
|
-
});
|
|
397
|
-
it('rejects stale planning sync upserts so older empty snapshots cannot clear newer attachments', () => {
|
|
398
|
-
const core = createCore();
|
|
399
|
-
const workspaceId = 'default';
|
|
400
|
-
const initiative = core.createInitiative({
|
|
401
|
-
title: 'Cloud initiative',
|
|
402
|
-
updatedAt: '2026-01-01T00:10:00.000Z',
|
|
403
|
-
attachments: [{
|
|
404
|
-
path: '/api/taskforce/documents/asset-newer-initiative-doc/content',
|
|
405
|
-
assetId: 'asset-newer-initiative-doc',
|
|
406
|
-
caption: 'Newer initiative doc',
|
|
407
|
-
timestamp: '2026-01-01T00:10:00.000Z',
|
|
408
|
-
}],
|
|
409
|
-
}, workspaceId);
|
|
410
|
-
const workstream = core.createWorkstream({
|
|
411
|
-
title: 'Cloud workstream',
|
|
412
|
-
initiativeId: initiative.id,
|
|
413
|
-
updatedAt: '2026-01-01T00:10:00.000Z',
|
|
414
|
-
attachments: [{
|
|
415
|
-
path: '/api/taskforce/documents/asset-newer-workstream-doc/content',
|
|
416
|
-
assetId: 'asset-newer-workstream-doc',
|
|
417
|
-
caption: 'Newer workstream doc',
|
|
418
|
-
timestamp: '2026-01-01T00:10:00.000Z',
|
|
419
|
-
}],
|
|
420
|
-
}, workspaceId);
|
|
421
|
-
core.upsertInitiativeForSync({
|
|
422
|
-
...initiative,
|
|
423
|
-
title: 'Stale initiative snapshot',
|
|
424
|
-
updatedAt: '2026-01-01T00:05:00.000Z',
|
|
425
|
-
attachments: [],
|
|
426
|
-
}, workspaceId);
|
|
427
|
-
core.upsertWorkstreamForSync({
|
|
428
|
-
...workstream,
|
|
429
|
-
title: 'Stale workstream snapshot',
|
|
430
|
-
updatedAt: '2026-01-01T00:05:00.000Z',
|
|
431
|
-
attachments: [],
|
|
432
|
-
}, workspaceId);
|
|
433
|
-
expect(core.getInitiative(initiative.id, workspaceId)).toEqual(expect.objectContaining({
|
|
434
|
-
title: 'Cloud initiative',
|
|
435
|
-
updatedAt: '2026-01-01T00:10:00.000Z',
|
|
436
|
-
attachments: [
|
|
437
|
-
expect.objectContaining({
|
|
438
|
-
assetId: 'asset-newer-initiative-doc',
|
|
439
|
-
caption: 'Newer initiative doc',
|
|
440
|
-
})
|
|
441
|
-
],
|
|
442
|
-
}));
|
|
443
|
-
expect(core.getWorkstream(workstream.id, workspaceId)).toEqual(expect.objectContaining({
|
|
444
|
-
title: 'Cloud workstream',
|
|
445
|
-
updatedAt: '2026-01-01T00:10:00.000Z',
|
|
446
|
-
attachments: [
|
|
447
|
-
expect.objectContaining({
|
|
448
|
-
assetId: 'asset-newer-workstream-doc',
|
|
449
|
-
caption: 'Newer workstream doc',
|
|
450
|
-
})
|
|
451
|
-
],
|
|
452
|
-
}));
|
|
453
|
-
core.close();
|
|
454
|
-
});
|
|
455
|
-
it('builds lightweight planning bootstrap summaries without hydrating full task details', () => {
|
|
456
|
-
const core = createCore();
|
|
457
|
-
const initiative = core.createInitiative({ title: 'Launch initiative' });
|
|
458
|
-
const deliveryWorkstream = core.createWorkstream({
|
|
459
|
-
title: 'Delivery',
|
|
460
|
-
initiativeId: initiative.id,
|
|
461
|
-
});
|
|
462
|
-
const billingWorkstream = core.createWorkstream({
|
|
463
|
-
title: 'Billing',
|
|
464
|
-
initiativeId: initiative.id,
|
|
465
|
-
});
|
|
466
|
-
core.createTask({
|
|
467
|
-
title: 'Ship onboarding copy',
|
|
468
|
-
workstreamId: deliveryWorkstream.id,
|
|
469
|
-
status: 'task',
|
|
470
|
-
});
|
|
471
|
-
core.createTask({
|
|
472
|
-
title: 'Review launch checklist',
|
|
473
|
-
workstreamId: deliveryWorkstream.id,
|
|
474
|
-
status: 'done',
|
|
475
|
-
});
|
|
476
|
-
core.createTask({
|
|
477
|
-
title: 'Update billing note',
|
|
478
|
-
workstreamId: billingWorkstream.id,
|
|
479
|
-
status: 'cancelled',
|
|
480
|
-
});
|
|
481
|
-
core.createTask({
|
|
482
|
-
title: 'Unlinked task',
|
|
483
|
-
status: 'task',
|
|
484
|
-
});
|
|
485
|
-
const bootstrap = core.listPlanningBootstrap();
|
|
486
|
-
const deliverySummary = bootstrap.workstreamTaskSummaries.find((entry) => entry.workstreamId === deliveryWorkstream.id);
|
|
487
|
-
const billingSummary = bootstrap.workstreamTaskSummaries.find((entry) => entry.workstreamId === billingWorkstream.id);
|
|
488
|
-
expect(bootstrap.initiatives.map((entry) => entry.id)).toEqual([initiative.id]);
|
|
489
|
-
expect(bootstrap.workstreams.map((entry) => entry.id)).toEqual([deliveryWorkstream.id, billingWorkstream.id]);
|
|
490
|
-
expect(bootstrap.initiatives.every((entry) => entry.activity === undefined && entry.entityEvents === undefined)).toBe(true);
|
|
491
|
-
expect(bootstrap.workstreams.every((entry) => entry.activity === undefined && entry.entityEvents === undefined)).toBe(true);
|
|
492
|
-
expect(deliverySummary).toMatchObject({
|
|
493
|
-
workstreamId: deliveryWorkstream.id,
|
|
494
|
-
taskCount: 2,
|
|
495
|
-
completedTaskCount: 1,
|
|
496
|
-
});
|
|
497
|
-
expect(deliverySummary?.tasks).toEqual(expect.arrayContaining([
|
|
498
|
-
expect.objectContaining({ title: 'Ship onboarding copy', status: 'task' }),
|
|
499
|
-
expect.objectContaining({ title: 'Review launch checklist', status: 'done' }),
|
|
500
|
-
]));
|
|
501
|
-
expect(billingSummary).toMatchObject({
|
|
502
|
-
workstreamId: billingWorkstream.id,
|
|
503
|
-
taskCount: 1,
|
|
504
|
-
completedTaskCount: 1,
|
|
505
|
-
});
|
|
506
|
-
expect(bootstrap.workstreamTaskSummaries.some((entry) => entry.tasks.some((task) => task.title === 'Unlinked task'))).toBe(false);
|
|
507
|
-
core.close();
|
|
508
|
-
});
|
|
509
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|