@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,127 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { createDatabaseAdapter } from '../storage/createDatabaseAdapter.js';
|
|
6
|
-
import { ensureDocumentReviewSessionsSchema, ensureTaskAssetsSchema, ensureWorkspaceAssetsSchema } from '../migrations/taskSchemaMigrations.js';
|
|
7
|
-
import { DocumentReviewCommentStore } from './DocumentReviewCommentStore.js';
|
|
8
|
-
import { DocumentReviewSessionStore } from './DocumentReviewSessionStore.js';
|
|
9
|
-
function makeStore() {
|
|
10
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'taskforce-document-reviews-'));
|
|
11
|
-
const dbPath = path.join(root, 'taskforce.db');
|
|
12
|
-
const db = createDatabaseAdapter({ sqliteDbPath: dbPath });
|
|
13
|
-
ensureTaskAssetsSchema(db);
|
|
14
|
-
ensureWorkspaceAssetsSchema(db);
|
|
15
|
-
ensureDocumentReviewSessionsSchema(db);
|
|
16
|
-
const store = new DocumentReviewSessionStore(db, 'default');
|
|
17
|
-
const commentStore = new DocumentReviewCommentStore(db, 'default');
|
|
18
|
-
return {
|
|
19
|
-
root,
|
|
20
|
-
db,
|
|
21
|
-
store,
|
|
22
|
-
commentStore,
|
|
23
|
-
cleanup() {
|
|
24
|
-
db.close();
|
|
25
|
-
fs.rmSync(root, { recursive: true, force: true });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
describe('DocumentReviewSessionStore', () => {
|
|
30
|
-
const cleanups = [];
|
|
31
|
-
afterEach(() => {
|
|
32
|
-
while (cleanups.length > 0) {
|
|
33
|
-
cleanups.pop()?.();
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
it('creates and reads sessions without embedding comments', () => {
|
|
37
|
-
const ctx = makeStore();
|
|
38
|
-
cleanups.push(() => ctx.cleanup());
|
|
39
|
-
const created = ctx.store.create({
|
|
40
|
-
id: 'review-1',
|
|
41
|
-
workspaceId: 'workspace-1',
|
|
42
|
-
assetId: 'asset-doc-1',
|
|
43
|
-
documentId: 'doc-1',
|
|
44
|
-
documentVersion: 2,
|
|
45
|
-
title: 'Implementation review',
|
|
46
|
-
});
|
|
47
|
-
expect(created).toMatchObject({
|
|
48
|
-
id: 'review-1',
|
|
49
|
-
workspaceId: 'workspace-1',
|
|
50
|
-
assetId: 'asset-doc-1',
|
|
51
|
-
documentId: 'doc-1',
|
|
52
|
-
documentVersion: 2,
|
|
53
|
-
title: 'Implementation review',
|
|
54
|
-
status: 'open',
|
|
55
|
-
});
|
|
56
|
-
expect(created.comments).toEqual([]);
|
|
57
|
-
});
|
|
58
|
-
it('backfills embedded comment blobs into document_review_comments rows', () => {
|
|
59
|
-
const ctx = makeStore();
|
|
60
|
-
cleanups.push(() => ctx.cleanup());
|
|
61
|
-
ctx.db.prepare(`
|
|
62
|
-
INSERT INTO document_review_sessions (
|
|
63
|
-
id,
|
|
64
|
-
tenant_id,
|
|
65
|
-
workspace_id,
|
|
66
|
-
asset_id,
|
|
67
|
-
document_id,
|
|
68
|
-
document_version,
|
|
69
|
-
title,
|
|
70
|
-
status,
|
|
71
|
-
comments_json,
|
|
72
|
-
created_by_actor_id,
|
|
73
|
-
updated_by_actor_id,
|
|
74
|
-
created_at,
|
|
75
|
-
updated_at,
|
|
76
|
-
deleted_at
|
|
77
|
-
) VALUES (?, 'default', 'workspace-1', 'asset-doc-1', 'doc-1', 2, 'Implementation review', 'open', ?, 'user-1', 'user-1', '2026-03-25T09:00:00.000Z', '2026-03-25T10:00:00.000Z', NULL)
|
|
78
|
-
`).run('review-legacy', JSON.stringify([
|
|
79
|
-
{
|
|
80
|
-
id: 'comment-1',
|
|
81
|
-
order: 1,
|
|
82
|
-
body: 'Needs a concrete rollout section.',
|
|
83
|
-
anchor: { kind: 'line-range', startLine: 12, endLine: 18 },
|
|
84
|
-
authorActorId: 'user-1',
|
|
85
|
-
createdAt: '2026-03-25T09:00:00.000Z',
|
|
86
|
-
updatedAt: '2026-03-25T09:00:00.000Z',
|
|
87
|
-
deletedAt: null,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'comment-2',
|
|
91
|
-
order: 2,
|
|
92
|
-
body: 'Resolve the open question.',
|
|
93
|
-
anchor: { kind: 'quote', quote: 'Open Questions', prefix: '## ', suffix: '\\n' },
|
|
94
|
-
authorActorId: 'user-2',
|
|
95
|
-
createdAt: '2026-03-25T10:00:00.000Z',
|
|
96
|
-
updatedAt: '2026-03-25T10:00:00.000Z',
|
|
97
|
-
deletedAt: null,
|
|
98
|
-
},
|
|
99
|
-
]));
|
|
100
|
-
ensureDocumentReviewSessionsSchema(ctx.db);
|
|
101
|
-
const comments = ctx.commentStore.listForSession('review-legacy', 'workspace-1');
|
|
102
|
-
expect(comments.map((comment) => comment.id)).toEqual(['comment-1', 'comment-2']);
|
|
103
|
-
expect(comments[0]).toMatchObject({
|
|
104
|
-
body: 'Needs a concrete rollout section.',
|
|
105
|
-
anchor: { kind: 'line-range', startLine: 12, endLine: 18 },
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
it('lists active sessions and keeps soft-deleted rows hidden by default', () => {
|
|
109
|
-
const ctx = makeStore();
|
|
110
|
-
cleanups.push(() => ctx.cleanup());
|
|
111
|
-
ctx.store.create({
|
|
112
|
-
id: 'review-a',
|
|
113
|
-
workspaceId: 'workspace-1',
|
|
114
|
-
assetId: 'asset-doc-1',
|
|
115
|
-
});
|
|
116
|
-
ctx.store.create({
|
|
117
|
-
id: 'review-b',
|
|
118
|
-
workspaceId: 'workspace-1',
|
|
119
|
-
assetId: 'asset-doc-1',
|
|
120
|
-
});
|
|
121
|
-
expect(ctx.store.softDelete('review-b', 'workspace-1')).toBe(true);
|
|
122
|
-
const active = ctx.store.listForAsset('asset-doc-1', 'workspace-1');
|
|
123
|
-
expect(active.map((session) => session.id)).toEqual(['review-a']);
|
|
124
|
-
const all = ctx.store.listForAsset('asset-doc-1', 'workspace-1', { includeDeleted: true });
|
|
125
|
-
expect(all.map((session) => session.id).sort()).toEqual(['review-a', 'review-b']);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { deriveAuthGuardPolicy, shouldSkipDataVersionPolling, shouldSkipDataVersionTick } from './authGuardPolicy';
|
|
3
|
-
describe('authGuardPolicy', () => {
|
|
4
|
-
it('does not defer or block protected APIs in local runtime', () => {
|
|
5
|
-
const policy = deriveAuthGuardPolicy({
|
|
6
|
-
shouldGateProtectedApiCalls: true,
|
|
7
|
-
runtimeMode: 'local',
|
|
8
|
-
authSessionResolved: false,
|
|
9
|
-
authRequiredForApi: true,
|
|
10
|
-
isAuthenticated: false
|
|
11
|
-
});
|
|
12
|
-
expect(policy.shouldDeferProtectedApiCalls).toBe(false);
|
|
13
|
-
expect(policy.shouldBlockProtectedApiCalls).toBe(false);
|
|
14
|
-
expect(policy.canCallProtectedApi).toBe(true);
|
|
15
|
-
});
|
|
16
|
-
it('defers protected APIs in cloud runtime before auth session resolves', () => {
|
|
17
|
-
const policy = deriveAuthGuardPolicy({
|
|
18
|
-
shouldGateProtectedApiCalls: true,
|
|
19
|
-
runtimeMode: 'cloud',
|
|
20
|
-
authSessionResolved: false,
|
|
21
|
-
authRequiredForApi: false,
|
|
22
|
-
isAuthenticated: false
|
|
23
|
-
});
|
|
24
|
-
expect(policy.shouldDeferProtectedApiCalls).toBe(true);
|
|
25
|
-
expect(policy.shouldBlockProtectedApiCalls).toBe(false);
|
|
26
|
-
expect(policy.canCallProtectedApi).toBe(false);
|
|
27
|
-
});
|
|
28
|
-
it('blocks protected APIs in cloud runtime when auth is required but user is not authenticated', () => {
|
|
29
|
-
const policy = deriveAuthGuardPolicy({
|
|
30
|
-
shouldGateProtectedApiCalls: true,
|
|
31
|
-
runtimeMode: 'cloud',
|
|
32
|
-
authSessionResolved: true,
|
|
33
|
-
authRequiredForApi: true,
|
|
34
|
-
isAuthenticated: false
|
|
35
|
-
});
|
|
36
|
-
expect(policy.shouldDeferProtectedApiCalls).toBe(false);
|
|
37
|
-
expect(policy.shouldBlockProtectedApiCalls).toBe(true);
|
|
38
|
-
expect(policy.canCallProtectedApi).toBe(false);
|
|
39
|
-
});
|
|
40
|
-
it('keeps data-version polling active only when preconditions are met', () => {
|
|
41
|
-
expect(shouldSkipDataVersionPolling({
|
|
42
|
-
isOpen: true,
|
|
43
|
-
authBlocked: false,
|
|
44
|
-
authRequiredForApi: false,
|
|
45
|
-
isAuthenticated: false,
|
|
46
|
-
canCallProtectedApi: true
|
|
47
|
-
})).toBe(false);
|
|
48
|
-
expect(shouldSkipDataVersionPolling({
|
|
49
|
-
isOpen: false,
|
|
50
|
-
authBlocked: false,
|
|
51
|
-
authRequiredForApi: false,
|
|
52
|
-
isAuthenticated: false,
|
|
53
|
-
canCallProtectedApi: true
|
|
54
|
-
})).toBe(true);
|
|
55
|
-
});
|
|
56
|
-
it('skips data-version tick checks until auth gate conditions are satisfied', () => {
|
|
57
|
-
expect(shouldSkipDataVersionTick({
|
|
58
|
-
shouldGateProtectedApiCalls: true,
|
|
59
|
-
authSessionResolved: false,
|
|
60
|
-
authRequiredForApi: false,
|
|
61
|
-
isAuthenticated: false
|
|
62
|
-
})).toBe(true);
|
|
63
|
-
expect(shouldSkipDataVersionTick({
|
|
64
|
-
shouldGateProtectedApiCalls: true,
|
|
65
|
-
authSessionResolved: true,
|
|
66
|
-
authRequiredForApi: true,
|
|
67
|
-
isAuthenticated: false
|
|
68
|
-
})).toBe(true);
|
|
69
|
-
expect(shouldSkipDataVersionTick({
|
|
70
|
-
shouldGateProtectedApiCalls: true,
|
|
71
|
-
authSessionResolved: true,
|
|
72
|
-
authRequiredForApi: true,
|
|
73
|
-
isAuthenticated: true
|
|
74
|
-
})).toBe(false);
|
|
75
|
-
});
|
|
76
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { AUTH_SESSION_REQUEST_TIMEOUT_MS, BOOTSTRAP_REQUEST_TIMEOUT_MS, CLOUD_BOOTSTRAP_REQUEST_TIMEOUT_MS, resolveBootstrapRequestTimeoutMs } from './bootstrapTimeouts';
|
|
3
|
-
describe('bootstrap timeout budgets', () => {
|
|
4
|
-
it('keeps local bootstrap checks short', () => {
|
|
5
|
-
expect(resolveBootstrapRequestTimeoutMs('local')).toBe(BOOTSTRAP_REQUEST_TIMEOUT_MS);
|
|
6
|
-
});
|
|
7
|
-
it('gives cloud bootstrap checks enough room for edge delays', () => {
|
|
8
|
-
expect(resolveBootstrapRequestTimeoutMs('cloud')).toBe(CLOUD_BOOTSTRAP_REQUEST_TIMEOUT_MS);
|
|
9
|
-
expect(CLOUD_BOOTSTRAP_REQUEST_TIMEOUT_MS).toBeGreaterThan(BOOTSTRAP_REQUEST_TIMEOUT_MS);
|
|
10
|
-
expect(AUTH_SESSION_REQUEST_TIMEOUT_MS).toBeGreaterThan(BOOTSTRAP_REQUEST_TIMEOUT_MS);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { createWorkspaceSyncLeaseHeldDecision, resolvePullSyncReadiness, resolvePushSyncReadiness, resolveRetrySyncReadiness, } from './controlPlane';
|
|
3
|
-
const makeBaseArgs = () => ({
|
|
4
|
-
cloudAuthConfigured: true,
|
|
5
|
-
runtimeMode: 'local',
|
|
6
|
-
workspaceCloudSyncEnabled: true,
|
|
7
|
-
currentWorkspaceId: 'workspace-123',
|
|
8
|
-
isAuthenticated: true
|
|
9
|
-
});
|
|
10
|
-
describe('sync control plane', () => {
|
|
11
|
-
it('blocks push during repair and retains the pending signature', () => {
|
|
12
|
-
expect(resolvePushSyncReadiness({
|
|
13
|
-
...makeBaseArgs(),
|
|
14
|
-
workspaceSyncPhase: 'active',
|
|
15
|
-
repairModeActive: true,
|
|
16
|
-
repairModeBypass: false,
|
|
17
|
-
pushInFlight: false,
|
|
18
|
-
pullInFlight: false
|
|
19
|
-
})).toEqual({
|
|
20
|
-
allowed: false,
|
|
21
|
-
reason: 'repair-active',
|
|
22
|
-
retainPendingSignature: true
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
it('allows repair push to bypass the repair-active gate', () => {
|
|
26
|
-
expect(resolvePushSyncReadiness({
|
|
27
|
-
...makeBaseArgs(),
|
|
28
|
-
workspaceSyncPhase: 'active',
|
|
29
|
-
repairModeActive: true,
|
|
30
|
-
repairModeBypass: true,
|
|
31
|
-
pushInFlight: false,
|
|
32
|
-
pullInFlight: false
|
|
33
|
-
})).toEqual({ allowed: true });
|
|
34
|
-
});
|
|
35
|
-
it('blocks push during attach-cloud and retains the pending signature', () => {
|
|
36
|
-
expect(resolvePushSyncReadiness({
|
|
37
|
-
...makeBaseArgs(),
|
|
38
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
39
|
-
repairModeActive: false,
|
|
40
|
-
repairModeBypass: false,
|
|
41
|
-
pushInFlight: false,
|
|
42
|
-
pullInFlight: false
|
|
43
|
-
})).toEqual({
|
|
44
|
-
allowed: false,
|
|
45
|
-
reason: 'attach-cloud',
|
|
46
|
-
retainPendingSignature: true
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
it('blocks pull during provision-local', () => {
|
|
50
|
-
expect(resolvePullSyncReadiness({
|
|
51
|
-
...makeBaseArgs(),
|
|
52
|
-
workspaceSyncPhase: 'provision-local',
|
|
53
|
-
repairModeActive: false,
|
|
54
|
-
repairModeBypass: false,
|
|
55
|
-
retryPending: false,
|
|
56
|
-
pushInFlight: false,
|
|
57
|
-
pullInFlight: false
|
|
58
|
-
})).toEqual({
|
|
59
|
-
allowed: false,
|
|
60
|
-
reason: 'provision-local',
|
|
61
|
-
retainPendingSignature: false
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
it('blocks pull when a retry is already pending', () => {
|
|
65
|
-
expect(resolvePullSyncReadiness({
|
|
66
|
-
...makeBaseArgs(),
|
|
67
|
-
workspaceSyncPhase: 'active',
|
|
68
|
-
repairModeActive: false,
|
|
69
|
-
repairModeBypass: false,
|
|
70
|
-
retryPending: true,
|
|
71
|
-
pushInFlight: false,
|
|
72
|
-
pullInFlight: false
|
|
73
|
-
})).toEqual({
|
|
74
|
-
allowed: false,
|
|
75
|
-
reason: 'retry-pending',
|
|
76
|
-
retainPendingSignature: false
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
it('surfaces auth-required for retry readiness before the session is refreshed', () => {
|
|
80
|
-
expect(resolveRetrySyncReadiness({
|
|
81
|
-
...makeBaseArgs(),
|
|
82
|
-
isAuthenticated: false
|
|
83
|
-
})).toEqual({
|
|
84
|
-
allowed: false,
|
|
85
|
-
reason: 'auth-required',
|
|
86
|
-
retainPendingSignature: false
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
it('rejects invalid workspace ids for transfer operations', () => {
|
|
90
|
-
expect(resolvePushSyncReadiness({
|
|
91
|
-
...makeBaseArgs(),
|
|
92
|
-
currentWorkspaceId: 'default',
|
|
93
|
-
workspaceSyncPhase: 'active',
|
|
94
|
-
repairModeActive: false,
|
|
95
|
-
repairModeBypass: false,
|
|
96
|
-
pushInFlight: false,
|
|
97
|
-
pullInFlight: false
|
|
98
|
-
})).toEqual({
|
|
99
|
-
allowed: false,
|
|
100
|
-
reason: 'invalid-workspace',
|
|
101
|
-
retainPendingSignature: false
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
it('marks lease contention as retaining the pending signature only for push', () => {
|
|
105
|
-
expect(createWorkspaceSyncLeaseHeldDecision('push')).toEqual({
|
|
106
|
-
allowed: false,
|
|
107
|
-
reason: 'lease-held',
|
|
108
|
-
retainPendingSignature: true
|
|
109
|
-
});
|
|
110
|
-
expect(createWorkspaceSyncLeaseHeldDecision('pull')).toEqual({
|
|
111
|
-
allowed: false,
|
|
112
|
-
reason: 'lease-held',
|
|
113
|
-
retainPendingSignature: false
|
|
114
|
-
});
|
|
115
|
-
expect(createWorkspaceSyncLeaseHeldDecision('repair')).toEqual({
|
|
116
|
-
allowed: false,
|
|
117
|
-
reason: 'lease-held',
|
|
118
|
-
retainPendingSignature: false
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { resolveWorkspaceAutomaticPullPolicy, resolveWorkspaceSyncPresentation, shouldRunWorkspaceStartupRepair, shouldScheduleWorkspaceReactivePush, shouldStartWorkspacePeriodicFullReconcile, shouldStartWorkspacePushWatchdog, } from './lifecyclePolicy';
|
|
3
|
-
const makeLifecycleBaseArgs = () => ({
|
|
4
|
-
cloudAuthConfigured: true,
|
|
5
|
-
runtimeMode: 'local',
|
|
6
|
-
workspaceCloudSyncEnabled: true,
|
|
7
|
-
authSessionResolved: true
|
|
8
|
-
});
|
|
9
|
-
describe('sync lifecycle policy', () => {
|
|
10
|
-
it('reports bootstrap phases as syncing with phase-specific guidance', () => {
|
|
11
|
-
expect(resolveWorkspaceSyncPresentation({
|
|
12
|
-
enabled: true,
|
|
13
|
-
phase: 'attach-cloud',
|
|
14
|
-
busy: false,
|
|
15
|
-
retryAt: null,
|
|
16
|
-
lastErrorMessage: null
|
|
17
|
-
})).toEqual({
|
|
18
|
-
status: 'syncing',
|
|
19
|
-
summary: 'Waiting for the first cloud pull into this device.',
|
|
20
|
-
recommendedAction: 'Keep this window open for the first cloud pull. If it does not move, press Repair.'
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
it('reports retry state as attention even when sync is otherwise idle', () => {
|
|
24
|
-
expect(resolveWorkspaceSyncPresentation({
|
|
25
|
-
enabled: true,
|
|
26
|
-
phase: 'active',
|
|
27
|
-
busy: false,
|
|
28
|
-
retryAt: '2026-04-18T16:00:00.000Z',
|
|
29
|
-
lastErrorMessage: null
|
|
30
|
-
})).toEqual({
|
|
31
|
-
status: 'attention',
|
|
32
|
-
summary: 'Sync hit a temporary problem and will retry automatically.',
|
|
33
|
-
recommendedAction: 'Wait for the automatic retry, or press Sync to retry now.'
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
it('allows reactive push only after bootstrap and reference snapshots are ready', () => {
|
|
37
|
-
expect(shouldScheduleWorkspaceReactivePush({
|
|
38
|
-
...makeLifecycleBaseArgs(),
|
|
39
|
-
workspaceSyncPhase: 'active',
|
|
40
|
-
workspaceSyncReferenceSnapshotsReady: true
|
|
41
|
-
})).toBe(true);
|
|
42
|
-
expect(shouldScheduleWorkspaceReactivePush({
|
|
43
|
-
...makeLifecycleBaseArgs(),
|
|
44
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
45
|
-
workspaceSyncReferenceSnapshotsReady: true
|
|
46
|
-
})).toBe(false);
|
|
47
|
-
expect(shouldScheduleWorkspaceReactivePush({
|
|
48
|
-
...makeLifecycleBaseArgs(),
|
|
49
|
-
workspaceSyncPhase: 'active',
|
|
50
|
-
workspaceSyncReferenceSnapshotsReady: false
|
|
51
|
-
})).toBe(false);
|
|
52
|
-
});
|
|
53
|
-
it('starts the push watchdog only for active sync', () => {
|
|
54
|
-
expect(shouldStartWorkspacePushWatchdog({
|
|
55
|
-
...makeLifecycleBaseArgs(),
|
|
56
|
-
workspaceSyncPhase: 'active',
|
|
57
|
-
workspaceSyncReferenceSnapshotsReady: true
|
|
58
|
-
})).toBe(true);
|
|
59
|
-
expect(shouldStartWorkspacePushWatchdog({
|
|
60
|
-
...makeLifecycleBaseArgs(),
|
|
61
|
-
workspaceSyncPhase: 'error',
|
|
62
|
-
workspaceSyncReferenceSnapshotsReady: true
|
|
63
|
-
})).toBe(false);
|
|
64
|
-
});
|
|
65
|
-
it('starts automatic pull for attach-cloud and kickstarts first active pull when no pull has succeeded yet', () => {
|
|
66
|
-
expect(resolveWorkspaceAutomaticPullPolicy({
|
|
67
|
-
...makeLifecycleBaseArgs(),
|
|
68
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
69
|
-
lastPullAt: null,
|
|
70
|
-
retryPending: false
|
|
71
|
-
})).toEqual({
|
|
72
|
-
shouldStart: true,
|
|
73
|
-
shouldKickOffImmediately: true
|
|
74
|
-
});
|
|
75
|
-
expect(resolveWorkspaceAutomaticPullPolicy({
|
|
76
|
-
...makeLifecycleBaseArgs(),
|
|
77
|
-
workspaceSyncPhase: 'active',
|
|
78
|
-
lastPullAt: null,
|
|
79
|
-
retryPending: false
|
|
80
|
-
})).toEqual({
|
|
81
|
-
shouldStart: true,
|
|
82
|
-
shouldKickOffImmediately: true
|
|
83
|
-
});
|
|
84
|
-
expect(resolveWorkspaceAutomaticPullPolicy({
|
|
85
|
-
...makeLifecycleBaseArgs(),
|
|
86
|
-
workspaceSyncPhase: 'active',
|
|
87
|
-
lastPullAt: '2026-04-18T15:00:00.000Z',
|
|
88
|
-
retryPending: true
|
|
89
|
-
})).toEqual({
|
|
90
|
-
shouldStart: false,
|
|
91
|
-
shouldKickOffImmediately: false
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
it('runs periodic full reconcile and startup repair only in authenticated active sync', () => {
|
|
95
|
-
expect(shouldStartWorkspacePeriodicFullReconcile({
|
|
96
|
-
...makeLifecycleBaseArgs(),
|
|
97
|
-
workspaceSyncPhase: 'active',
|
|
98
|
-
isAuthenticated: true
|
|
99
|
-
})).toBe(true);
|
|
100
|
-
expect(shouldStartWorkspacePeriodicFullReconcile({
|
|
101
|
-
...makeLifecycleBaseArgs(),
|
|
102
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
103
|
-
isAuthenticated: true
|
|
104
|
-
})).toBe(false);
|
|
105
|
-
expect(shouldRunWorkspaceStartupRepair({
|
|
106
|
-
...makeLifecycleBaseArgs(),
|
|
107
|
-
workspaceSyncPhase: 'active',
|
|
108
|
-
isAuthenticated: true,
|
|
109
|
-
alreadyRan: false
|
|
110
|
-
})).toBe(true);
|
|
111
|
-
expect(shouldRunWorkspaceStartupRepair({
|
|
112
|
-
...makeLifecycleBaseArgs(),
|
|
113
|
-
workspaceSyncPhase: 'error',
|
|
114
|
-
isAuthenticated: true,
|
|
115
|
-
alreadyRan: false
|
|
116
|
-
})).toBe(true);
|
|
117
|
-
expect(shouldRunWorkspaceStartupRepair({
|
|
118
|
-
...makeLifecycleBaseArgs(),
|
|
119
|
-
workspaceSyncPhase: 'active',
|
|
120
|
-
isAuthenticated: true,
|
|
121
|
-
alreadyRan: true
|
|
122
|
-
})).toBe(false);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it } from 'vitest';
|
|
2
|
-
import { readPersistedSyncWatermarks, savePersistedSyncWatermarks, WORKSPACE_SYNC_WATERMARKS_KEY_PREFIX, } from './orchestratorShared';
|
|
3
|
-
describe('orchestratorShared sync watermarks', () => {
|
|
4
|
-
const workspaceId = 'workspace-local-active';
|
|
5
|
-
beforeEach(() => {
|
|
6
|
-
localStorage.clear();
|
|
7
|
-
});
|
|
8
|
-
it('keeps persisted sync watermarks available across long idle periods', () => {
|
|
9
|
-
const key = `${WORKSPACE_SYNC_WATERMARKS_KEY_PREFIX}.${workspaceId}`;
|
|
10
|
-
localStorage.setItem(key, JSON.stringify({
|
|
11
|
-
v: 9,
|
|
12
|
-
savedAt: '2026-04-14T10:00:00.000Z',
|
|
13
|
-
taskIds: ['task-1'],
|
|
14
|
-
taskWatermarks: [['task-1', '2026-04-14T09:00:00.000Z']],
|
|
15
|
-
initiativeWatermarks: [['initiative-1', '2026-04-14T09:00:00.000Z']],
|
|
16
|
-
workstreamWatermarks: [],
|
|
17
|
-
aiProfileWatermarks: [['ai-profile-1', '2026-04-14T09:15:00.000Z']],
|
|
18
|
-
documentWatermarks: [],
|
|
19
|
-
assetWatermarks: [],
|
|
20
|
-
documentReviewSessionWatermarks: [],
|
|
21
|
-
documentReviewCommentWatermarks: [],
|
|
22
|
-
annotatedAttachmentSessionWatermarks: [],
|
|
23
|
-
taskEventWatermarks: [['event-1', '2026-04-14T09:30:00.000Z']],
|
|
24
|
-
taxonomyStateFingerprint: ''
|
|
25
|
-
}));
|
|
26
|
-
const persisted = readPersistedSyncWatermarks(workspaceId, '');
|
|
27
|
-
expect(persisted).not.toBeNull();
|
|
28
|
-
expect(Array.from(persisted?.taskIds || [])).toEqual(['task-1']);
|
|
29
|
-
expect(persisted?.taskWatermarks.get('task-1')).toBe('2026-04-14T09:00:00.000Z');
|
|
30
|
-
expect(persisted?.initiativeWatermarks.get('initiative-1')).toBe('2026-04-14T09:00:00.000Z');
|
|
31
|
-
expect(persisted?.aiProfileWatermarks.get('ai-profile-1')).toBe('2026-04-14T09:15:00.000Z');
|
|
32
|
-
expect(persisted?.taskEventWatermarks.get('event-1')).toBe('2026-04-14T09:30:00.000Z');
|
|
33
|
-
});
|
|
34
|
-
it('persists task and ai-profile change keys alongside legacy watermarks', () => {
|
|
35
|
-
savePersistedSyncWatermarks(workspaceId, {
|
|
36
|
-
taskIds: new Set(['task-1']),
|
|
37
|
-
taskWatermarks: new Map([['task-1', '2026-04-14T09:00:00.000Z']]),
|
|
38
|
-
taskChangeKeys: new Map([['task-1', 'task-change-key-1']]),
|
|
39
|
-
initiativeWatermarks: new Map(),
|
|
40
|
-
workstreamWatermarks: new Map(),
|
|
41
|
-
aiProfileWatermarks: new Map([['ai-profile-1', '2026-04-14T09:15:00.000Z']]),
|
|
42
|
-
aiProfileChangeKeys: new Map([['ai-profile-1', 'ai-change-key-1']]),
|
|
43
|
-
documentWatermarks: new Map(),
|
|
44
|
-
assetWatermarks: new Map(),
|
|
45
|
-
documentReviewSessionWatermarks: new Map(),
|
|
46
|
-
documentReviewCommentWatermarks: new Map(),
|
|
47
|
-
annotatedAttachmentSessionWatermarks: new Map(),
|
|
48
|
-
taskEventWatermarks: new Map(),
|
|
49
|
-
taxonomyStateFingerprint: 'fingerprint-a'
|
|
50
|
-
});
|
|
51
|
-
const persisted = readPersistedSyncWatermarks(workspaceId, 'fingerprint-a');
|
|
52
|
-
expect(persisted?.taskChangeKeys?.get('task-1')).toBe('task-change-key-1');
|
|
53
|
-
expect(persisted?.aiProfileChangeKeys?.get('ai-profile-1')).toBe('ai-change-key-1');
|
|
54
|
-
});
|
|
55
|
-
it('still clears task watermarks when the taxonomy fingerprint changes', () => {
|
|
56
|
-
savePersistedSyncWatermarks(workspaceId, {
|
|
57
|
-
taskIds: new Set(['task-1']),
|
|
58
|
-
taskWatermarks: new Map([['task-1', '2026-04-14T09:00:00.000Z']]),
|
|
59
|
-
initiativeWatermarks: new Map([['initiative-1', '2026-04-14T09:00:00.000Z']]),
|
|
60
|
-
workstreamWatermarks: new Map(),
|
|
61
|
-
aiProfileWatermarks: new Map([['ai-profile-1', '2026-04-14T09:15:00.000Z']]),
|
|
62
|
-
documentWatermarks: new Map(),
|
|
63
|
-
assetWatermarks: new Map(),
|
|
64
|
-
documentReviewSessionWatermarks: new Map(),
|
|
65
|
-
documentReviewCommentWatermarks: new Map(),
|
|
66
|
-
annotatedAttachmentSessionWatermarks: new Map(),
|
|
67
|
-
taskEventWatermarks: new Map([['event-1', '2026-04-14T09:30:00.000Z']]),
|
|
68
|
-
taxonomyStateFingerprint: 'fingerprint-a'
|
|
69
|
-
});
|
|
70
|
-
const persisted = readPersistedSyncWatermarks(workspaceId, 'fingerprint-b');
|
|
71
|
-
expect(persisted).not.toBeNull();
|
|
72
|
-
expect(Array.from(persisted?.taskIds || [])).toEqual(['task-1']);
|
|
73
|
-
expect(persisted?.taskWatermarks.size).toBe(0);
|
|
74
|
-
expect(persisted?.initiativeWatermarks.get('initiative-1')).toBe('2026-04-14T09:00:00.000Z');
|
|
75
|
-
expect(persisted?.aiProfileWatermarks.get('ai-profile-1')).toBe('2026-04-14T09:15:00.000Z');
|
|
76
|
-
expect(persisted?.taskEventWatermarks.get('event-1')).toBe('2026-04-14T09:30:00.000Z');
|
|
77
|
-
});
|
|
78
|
-
it('falls back to task watermark keys when older persisted snapshots do not have taskIds', () => {
|
|
79
|
-
const key = `${WORKSPACE_SYNC_WATERMARKS_KEY_PREFIX}.${workspaceId}`;
|
|
80
|
-
localStorage.setItem(key, JSON.stringify({
|
|
81
|
-
v: 9,
|
|
82
|
-
savedAt: '2026-04-14T10:00:00.000Z',
|
|
83
|
-
taskWatermarks: [['task-legacy-1', '2026-04-14T09:00:00.000Z']],
|
|
84
|
-
initiativeWatermarks: [],
|
|
85
|
-
workstreamWatermarks: [],
|
|
86
|
-
aiProfileWatermarks: [],
|
|
87
|
-
documentWatermarks: [],
|
|
88
|
-
assetWatermarks: [],
|
|
89
|
-
documentReviewSessionWatermarks: [],
|
|
90
|
-
documentReviewCommentWatermarks: [],
|
|
91
|
-
annotatedAttachmentSessionWatermarks: [],
|
|
92
|
-
taskEventWatermarks: [],
|
|
93
|
-
taxonomyStateFingerprint: ''
|
|
94
|
-
}));
|
|
95
|
-
const persisted = readPersistedSyncWatermarks(workspaceId, '');
|
|
96
|
-
expect(Array.from(persisted?.taskIds || [])).toEqual(['task-legacy-1']);
|
|
97
|
-
});
|
|
98
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { resolveWorkspacePullRequestPlan, resolveWorkspacePullSuccessPlan, } from './pullLifecycle';
|
|
3
|
-
describe('pull lifecycle', () => {
|
|
4
|
-
it('treats attach-cloud pulls as bootstrap pulls with a null cursor', () => {
|
|
5
|
-
expect(resolveWorkspacePullRequestPlan({
|
|
6
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
7
|
-
forceCursorNull: false,
|
|
8
|
-
currentCursor: 'cursor-1'
|
|
9
|
-
})).toEqual({
|
|
10
|
-
bootstrap: true,
|
|
11
|
-
cursor: null,
|
|
12
|
-
successEventType: 'bootstrap'
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
it('keeps the saved cursor for normal incremental pulls', () => {
|
|
16
|
-
expect(resolveWorkspacePullRequestPlan({
|
|
17
|
-
workspaceSyncPhase: 'active',
|
|
18
|
-
forceCursorNull: false,
|
|
19
|
-
currentCursor: 'cursor-1'
|
|
20
|
-
})).toEqual({
|
|
21
|
-
bootstrap: false,
|
|
22
|
-
cursor: 'cursor-1',
|
|
23
|
-
successEventType: 'pull'
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
it('marks attach-cloud success for reference refresh and baseline seeding without a follow-up push', () => {
|
|
27
|
-
expect(resolveWorkspacePullSuccessPlan({
|
|
28
|
-
workspaceSyncPhase: 'attach-cloud',
|
|
29
|
-
forceCursorNull: false,
|
|
30
|
-
startupFullReconcileRan: false,
|
|
31
|
-
pendingSignature: 'sig-pending',
|
|
32
|
-
fallbackSignature: 'sig-fallback',
|
|
33
|
-
lastPushedSignature: ''
|
|
34
|
-
})).toEqual({
|
|
35
|
-
successEventType: 'bootstrap',
|
|
36
|
-
shouldCaptureAttachBootstrapBaseline: true,
|
|
37
|
-
shouldClearPendingSignature: true,
|
|
38
|
-
shouldRefreshReferenceSnapshots: true,
|
|
39
|
-
shouldSeedWorkspaceSnapshotPushBaseline: true,
|
|
40
|
-
shouldScheduleStartupFullReconcile: false,
|
|
41
|
-
deferredPushSignature: null
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
it('schedules a one-time startup full reconcile and deferred push after the first normal pull', () => {
|
|
45
|
-
expect(resolveWorkspacePullSuccessPlan({
|
|
46
|
-
workspaceSyncPhase: 'active',
|
|
47
|
-
forceCursorNull: false,
|
|
48
|
-
startupFullReconcileRan: false,
|
|
49
|
-
pendingSignature: 'sig-pending',
|
|
50
|
-
fallbackSignature: 'sig-fallback',
|
|
51
|
-
lastPushedSignature: 'sig-old'
|
|
52
|
-
})).toEqual({
|
|
53
|
-
successEventType: 'pull',
|
|
54
|
-
shouldCaptureAttachBootstrapBaseline: false,
|
|
55
|
-
shouldClearPendingSignature: true,
|
|
56
|
-
shouldRefreshReferenceSnapshots: false,
|
|
57
|
-
shouldSeedWorkspaceSnapshotPushBaseline: false,
|
|
58
|
-
shouldScheduleStartupFullReconcile: true,
|
|
59
|
-
deferredPushSignature: 'sig-pending'
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
it('does not schedule a second startup full reconcile or redundant deferred push', () => {
|
|
63
|
-
expect(resolveWorkspacePullSuccessPlan({
|
|
64
|
-
workspaceSyncPhase: 'active',
|
|
65
|
-
forceCursorNull: true,
|
|
66
|
-
startupFullReconcileRan: true,
|
|
67
|
-
pendingSignature: '',
|
|
68
|
-
fallbackSignature: 'sig-current',
|
|
69
|
-
lastPushedSignature: 'sig-current'
|
|
70
|
-
})).toEqual({
|
|
71
|
-
successEventType: 'pull',
|
|
72
|
-
shouldCaptureAttachBootstrapBaseline: false,
|
|
73
|
-
shouldClearPendingSignature: false,
|
|
74
|
-
shouldRefreshReferenceSnapshots: false,
|
|
75
|
-
shouldSeedWorkspaceSnapshotPushBaseline: false,
|
|
76
|
-
shouldScheduleStartupFullReconcile: false,
|
|
77
|
-
deferredPushSignature: null
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|