@taskforcehq/taskforce 0.3.327 → 0.3.329
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/dist/Taskforce.module.css +257 -87
- package/dist/TaskforceCore.js +237 -230
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +1 -1
- package/dist/cli.js +34 -0
- package/dist/cliCloudTargetGuard.d.ts +5 -0
- package/dist/cliCloudTargetGuard.js +11 -0
- package/dist/components/activity/EntityActivityTimeline.js +15 -5
- package/dist/components/context/AttachmentPreviewHost.js +1 -1
- package/dist/components/context/ContextAttachmentManager.d.ts +3 -0
- package/dist/components/context/ContextAttachmentManager.js +116 -20
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +24 -8
- package/dist/components/features/TaskSettings.d.ts +12 -1
- package/dist/components/features/TaskSettings.js +147 -40
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +1 -1
- package/dist/components/features/planning/PlanningEntitySummary.d.ts +3 -1
- package/dist/components/features/planning/PlanningEntitySummary.js +3 -2
- package/dist/components/features/planning/PlanningLinkPicker.d.ts +3 -1
- package/dist/components/features/planning/PlanningLinkPicker.js +5 -3
- package/dist/components/features/planning/PlanningModule.js +28 -14
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +1 -1
- package/dist/components/features/planning/PlanningTaskOrderList.js +17 -6
- package/dist/components/features/planning/PlanningVisualIdentity.d.ts +14 -0
- package/dist/components/features/planning/PlanningVisualIdentity.js +106 -0
- package/dist/components/features/planning/planningTaskArrangement.d.ts +1 -0
- package/dist/components/features/planning/planningTaskArrangement.js +5 -5
- package/dist/components/features/planning/planningWorkspaceModel.d.ts +11 -0
- package/dist/components/features/taskforceAgentEditorModel.js +3 -1
- package/dist/components/task/TaskActionHeader.d.ts +2 -1
- package/dist/components/task/TaskActionHeader.js +2 -2
- package/dist/components/task/TaskCard.d.ts +5 -0
- package/dist/components/task/TaskCard.js +101 -13
- package/dist/components/task/TaskContextUpload.d.ts +3 -0
- package/dist/components/task/TaskContextUpload.js +2 -2
- package/dist/components/task/TaskForm.d.ts +4 -0
- package/dist/components/task/TaskForm.js +32 -7
- package/dist/components/task/TaskImageReviews.js +28 -19
- package/dist/components/task/TaskKanban.d.ts +6 -1
- package/dist/components/task/TaskKanban.js +152 -6
- package/dist/components/task/TaskList.d.ts +5 -0
- package/dist/components/task/TaskList.js +3 -3
- package/dist/components/task/TaskStatusActions.js +11 -2
- package/dist/components/task/TaskWorkstreamPicker.js +2 -1
- package/dist/components/ui/DocumentTypeIcon.d.ts +7 -0
- package/dist/components/ui/DocumentTypeIcon.js +8 -0
- package/dist/components/ui/PasswordInput.d.ts +6 -0
- package/dist/components/ui/PasswordInput.js +11 -0
- package/dist/components/ui/TaxonomyDropdown.d.ts +9 -1
- package/dist/components/ui/TaxonomyDropdown.js +30 -3
- package/dist/components/ui/TopNoticeLayer.js +1 -1
- package/dist/components/views/AppShellHeader.js +32 -11
- package/dist/components/views/PlanComparisonPage.js +12 -0
- package/dist/components/views/StandaloneLayout.js +68 -39
- package/dist/components/views/WidgetView.js +10 -7
- package/dist/components/views/panels/PlanningDrawer.d.ts +7 -1
- package/dist/components/views/panels/PlanningDrawer.js +51 -54
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +26 -17
- package/dist/config/envSchema.js +13 -0
- package/dist/config/localServiceCloudTarget.d.ts +10 -0
- package/dist/config/localServiceCloudTarget.js +76 -0
- package/dist/config/localServiceRuntimeContract.d.ts +13 -0
- package/dist/config/localServiceRuntimeContract.js +135 -0
- package/dist/core/AiProfileService.d.ts +1 -0
- package/dist/core/AiProfileService.js +48 -9
- package/dist/core/AttachmentLinkService.js +7 -4
- package/dist/core/DeletedTaskLifecycleService.d.ts +5 -0
- package/dist/core/DeletedTaskLifecycleService.js +55 -3
- package/dist/core/McpTokenService.d.ts +4 -0
- package/dist/core/McpTokenService.js +52 -0
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +8 -2
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +51 -18
- package/dist/core/Taskforce.d.ts +124 -2
- package/dist/core/Taskforce.js +1175 -87
- package/dist/core/types.d.ts +8 -1
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +11 -0
- package/dist/documentReviews/DocumentReviewCommentStore.js +35 -2
- package/dist/documentReviews/service.d.ts +4 -0
- package/dist/documentReviews/service.js +141 -46
- package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +1 -1
- package/dist/hooks/sync/useDurableTaskCreateMutation.js +1 -1
- package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +1 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.js +1 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +1 -0
- package/dist/hooks/tasks/taskHttpMutation.js +1 -0
- package/dist/hooks/tasks/useCloudTaskSearch.d.ts +12 -0
- package/dist/hooks/tasks/useCloudTaskSearch.js +71 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.d.ts +16 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.js +197 -0
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +16 -3
- package/dist/hooks/tasks/useTaskEditorNavigation.js +72 -13
- package/dist/hooks/tasks/useTaskFormActions.d.ts +9 -0
- package/dist/hooks/tasks/useTaskFormActions.js +96 -17
- package/dist/hooks/ui/useSettingsModel.d.ts +24 -2
- package/dist/hooks/ui/useSettingsModel.js +13 -2
- package/dist/hooks/ui/useSettingsPersistence.d.ts +12 -1
- package/dist/hooks/ui/useSettingsPersistence.js +74 -47
- package/dist/hooks/useFilterSort.d.ts +7 -3
- package/dist/hooks/useFilterSort.js +15 -5
- package/dist/hooks/useTaskData.d.ts +10 -1
- package/dist/hooks/useTaskData.js +216 -7
- package/dist/hooks/useTaskMutations.d.ts +10 -2
- package/dist/hooks/useTaskMutations.js +223 -43
- package/dist/hooks/useTaskforce.d.ts +94 -57
- package/dist/hooks/useTaskforce.js +428 -16
- package/dist/hooks/useUiNotice.d.ts +4 -0
- package/dist/hooks/useUiNotice.js +4 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +3 -3
- package/dist/mcp/canonicalAssetHelpers.d.ts +13 -0
- package/dist/mcp/canonicalAssetHelpers.js +39 -5
- package/dist/mcp/collaborationRegistrar.js +15 -13
- package/dist/mcp/documentAssetRegistrar.js +60 -44
- package/dist/mcp/documentHelpers.d.ts +1 -0
- package/dist/mcp/documentHelpers.js +7 -3
- package/dist/mcp/localServiceProxy.js +4 -1
- package/dist/mcp/runtime.d.ts +16 -0
- package/dist/mcp/runtime.js +735 -210
- package/dist/mcp/taskAttachmentCommandAdapter.d.ts +2 -0
- package/dist/mcp/taskAttachmentCommandAdapter.js +14 -8
- package/dist/mcp/taskPlanningRegistrar.js +78 -67
- package/dist/mcp/toolCallCompatibility.js +38 -1
- package/dist/mcp/toolCatalog.d.ts +1 -0
- package/dist/mcp/toolRegistry.js +2 -2
- package/dist/migrations/taskSchemaMigrations.js +47 -0
- package/dist/runtime/appGateDefinitions.d.ts +30 -6
- package/dist/runtime/appGateDefinitions.js +6 -6
- package/dist/runtime/appGates.d.ts +12 -13
- package/dist/runtime/appGates.js +29 -13
- package/dist/runtime/nodeAppGates.d.ts +8 -0
- package/dist/runtime/nodeAppGates.js +27 -0
- package/dist/server/appAccess.d.ts +12 -0
- package/dist/server/appAccess.js +21 -0
- package/dist/server/authorizedWorkspaceAccess.d.ts +12 -0
- package/dist/server/authorizedWorkspaceAccess.js +40 -0
- package/dist/server/cloudCollectionRead.d.ts +25 -0
- package/dist/server/cloudCollectionRead.js +120 -0
- package/dist/server/cloudCollectionReadPool.d.ts +52 -0
- package/dist/server/cloudCollectionReadPool.js +140 -0
- package/dist/server/cloudCollectionReadWorker.d.ts +1 -0
- package/dist/server/cloudCollectionReadWorker.js +36 -0
- package/dist/server/index.d.ts +6 -11
- package/dist/server/index.js +67 -42
- package/dist/server/localServiceLease.d.ts +6 -0
- package/dist/server/localServiceLease.js +17 -1
- package/dist/server/localWorkspaceSyncServerRuntime.js +10 -3
- package/dist/server/rateLimit.d.ts +1 -0
- package/dist/server/rateLimit.js +4 -0
- package/dist/server/realtimeSyncWs.js +36 -12
- package/dist/server/routes/admin.js +1 -0
- package/dist/server/routes/agentRoles.js +3 -2
- package/dist/server/routes/agentSkills.js +3 -2
- package/dist/server/routes/agents.js +118 -16
- package/dist/server/routes/annotatedAttachments.js +3 -2
- package/dist/server/routes/auth.js +3 -1
- package/dist/server/routes/documents.d.ts +5 -2
- package/dist/server/routes/documents.js +160 -13
- package/dist/server/routes/durableTaskHttpRouters.d.ts +11 -2
- package/dist/server/routes/durableTaskHttpRouters.js +2 -2
- package/dist/server/routes/localService.js +4 -0
- package/dist/server/routes/primitives.d.ts +4 -0
- package/dist/server/routes/shared.d.ts +24 -0
- package/dist/server/routes/shared.js +114 -18
- package/dist/server/routes/sync.js +22 -0
- package/dist/server/routes/syncAuxRoutes.js +5 -2
- package/dist/server/routes/syncPullApplyRoutes.js +23 -4
- package/dist/server/routes/syncV3FeedRoutes.js +22 -18
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +48 -4
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +1 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +26 -0
- package/dist/server/routes/syncV3OperationRoutes.js +27 -2
- package/dist/server/routes/tasks.js +299 -97
- package/dist/server/routes/workspaces.js +43 -1
- package/dist/server/routes.js +35 -7
- package/dist/server/workspaceDeletionAdmission.d.ts +23 -0
- package/dist/server/workspaceDeletionAdmission.js +50 -0
- package/dist/service/localServiceCli.js +52 -25
- package/dist/service/localServiceClientLifecycle.js +93 -6
- package/dist/services/codexAppServerModelGateway.d.ts +112 -0
- package/dist/services/codexAppServerModelGateway.js +438 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +7 -1
- package/dist/services/taskforceAgentMcpBridge.js +23 -3
- package/dist/shared/planningIdentity.d.ts +20 -0
- package/dist/shared/planningIdentity.js +79 -0
- package/dist/shared/taskforceAgentDefinition.js +7 -1
- package/dist/shared/taskforceAgentModels.d.ts +1 -0
- package/dist/shared/taskforceAgentModels.js +30 -1
- package/dist/storage/postgresAdapter.d.ts +20 -3
- package/dist/storage/postgresAdapter.js +110 -14
- package/dist/storage/postgresRequestDiagnostics.d.ts +8 -0
- package/dist/storage/postgresRequestDiagnostics.js +24 -0
- package/dist/storage/postgresWorker.js +13 -4
- package/dist/storage/postgresWorkerProtocol.d.ts +29 -0
- package/dist/storage/postgresWorkerProtocol.js +30 -0
- package/dist/storage/workspaceAssetStore.d.ts +32 -0
- package/dist/storage/workspaceAssetStore.js +70 -0
- package/dist/sync/cloudSyncApi.d.ts +4 -1
- package/dist/sync/cloudSyncApi.js +7 -2
- package/dist/sync/contentSyncState.d.ts +1 -1
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +17 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +77 -23
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +6 -2
- package/dist/sync/coordinator/workspaceSyncTransportGateway.js +4 -2
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +20 -2
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +4 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +11 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +16 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +2 -1
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +46 -4
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +3 -1
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +51 -11
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +8 -3
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +2 -0
- package/dist/sync/syncApplyHandlers.d.ts +3 -1
- package/dist/sync/syncApplyHandlers.js +29 -0
- package/dist/sync/syncService.d.ts +2 -0
- package/dist/sync/syncService.js +13 -1
- package/dist/sync/taskSyncPayload.d.ts +1 -0
- package/dist/sync/taskSyncPayload.js +6 -0
- package/dist/sync/v3/combinedFeedCapability.js +4 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +3 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +31 -3
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +2 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +4 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +1 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +47 -12
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +5 -3
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +27 -2
- package/dist/sync/v3/localInitiativeOutboxService.js +4 -2
- package/dist/sync/v3/localOutboxDispatcher.js +5 -1
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.js +12 -2
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +3 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +62 -10
- package/dist/sync/v3/localTaskCreateOutboxService.js +15 -6
- package/dist/sync/v3/localTaskMetadataClient.d.ts +1 -0
- package/dist/sync/v3/localTaskMetadataClient.js +1 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.js +5 -1
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.js +7 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.js +14 -6
- package/dist/sync/v3/localTaskStatusClient.d.ts +1 -0
- package/dist/sync/v3/localTaskStatusClient.js +6 -1
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +54 -13
- package/dist/sync/v3/localWorkstreamOutboxService.js +4 -2
- package/dist/sync/v3/syncDurabilityStore.d.ts +15 -0
- package/dist/sync/v3/syncDurabilityStore.js +201 -43
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +7 -4
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +37 -12
- package/dist/sync/v3/taskChecklistMutationService.d.ts +4 -2
- package/dist/sync/v3/taskChecklistMutationService.js +4 -0
- package/dist/sync/v3/taskCreateMutationService.d.ts +2 -2
- package/dist/sync/v3/taskCreateMutationService.js +7 -4
- package/dist/sync/v3/taskMetadataCoexistence.js +4 -0
- package/dist/sync/v3/taskMetadataMutationService.d.ts +3 -0
- package/dist/sync/v3/taskMetadataMutationService.js +4 -0
- package/dist/sync/v3/taskRestoreMutationService.d.ts +2 -2
- package/dist/sync/v3/taskRestoreMutationService.js +7 -4
- package/dist/sync/v3/taskStatusMutationService.d.ts +2 -0
- package/dist/sync/v3/taskStatusMutationService.js +4 -0
- package/dist/sync/v3/workflowAssignmentSync.d.ts +1 -0
- package/dist/sync/v3/workflowAssignmentSync.js +3 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +14 -12
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +27 -10
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +52 -10
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +10 -1
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +15 -4
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +66 -13
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +57 -22
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +10 -4
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +124 -51
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +120 -28
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +3 -1
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +18 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +6 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +23 -10
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +64 -13
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +26 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +15 -5
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +50 -14
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +11 -3
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +19 -7
- package/dist/sync/v3/workspaceSyncV3RepairSqlBatching.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3RepairSqlBatching.js +10 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +9 -2
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.js +37 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.js +9 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.js +1 -1
- package/dist/sync/workspacePullFeed.d.ts +6 -1
- package/dist/sync/workspacePullFeed.js +174 -162
- package/dist/sync/workspaceRepair.d.ts +3 -0
- package/dist/sync/workspaceRepair.js +67 -6
- package/dist/sync/workspaceSyncModel.d.ts +11 -0
- package/dist/sync/workspaceSyncModel.js +27 -2
- package/dist/types.d.ts +55 -1
- package/dist/types.js +6 -0
- package/dist/ui/assets/{AiIdentityRosterCard-DB1BLO_j.js → AiIdentityRosterCard-BZM4aQnM.js} +1 -1
- package/dist/ui/assets/AiProfilesModule-BbAEWtHH.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-B68Wg-RV.js +3 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-TzYu7pkG.css +1 -0
- package/dist/ui/assets/AssetTraySortControl-C8Rztyal.js +1 -0
- package/dist/ui/assets/ContextAttachmentManager-Cj3c7X9y.js +3 -0
- package/dist/ui/assets/{DocumentWorkspace-BC7sy5TG.js → DocumentWorkspace-B5uvzems.js} +4 -4
- package/dist/ui/assets/EntityActivityTimeline-BVFvCB5R.js +1 -0
- package/dist/ui/assets/PlanningModule-B5DWQOGz.js +1 -0
- package/dist/ui/assets/PlanningModule-CoIR9hbV.css +1 -0
- package/dist/ui/assets/PlansPage-AY4cGWco.js +1 -0
- package/dist/ui/assets/TaskContextUpload-DZxTVesW.js +1 -0
- package/dist/ui/assets/TaskContextUpload-qmBeUw3u.css +1 -0
- package/dist/ui/assets/TaskSettings-BeWAuyZj.js +12 -0
- package/dist/ui/assets/{TaskforceAgentsModule-CkAxW19K.js → TaskforceAgentsModule-BifCYtjR.js} +6 -6
- package/dist/ui/assets/WorkflowManagerModule-DEr5di_r.js +1 -0
- package/dist/ui/assets/index-I5zhdtgt.js +7 -0
- package/dist/ui/assets/index-VRFsx3wz.css +1 -0
- package/dist/ui/assets/{vendor-icons-B8ZNsH1g.js → vendor-icons-D9Lpw-j4.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/constants.d.ts +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/utils/contextAttachmentUpload.d.ts +2 -0
- package/dist/utils/contextAttachmentUpload.js +7 -0
- package/dist/utils/contextFiles.d.ts +1 -1
- package/dist/utils/contextFiles.js +4 -4
- package/dist/utils/taskActivity.d.ts +3 -2
- package/dist/utils/taskActivity.js +19 -2
- package/dist/utils/taskEditorReconciliation.d.ts +40 -0
- package/dist/utils/taskEditorReconciliation.js +217 -0
- package/dist/utils/taskNormalization.d.ts +1 -0
- package/dist/utils/taskNormalization.js +39 -0
- package/dist/utils/taskSearch.js +2 -2
- package/dist/utils/uiNotice.d.ts +4 -0
- package/package.json +21 -4
- package/dist/ui/assets/AiProfilesModule-DPxQeF9N.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DHNYaNg6.js +0 -3
- package/dist/ui/assets/AssetTraySortControl-DphbyHVc.js +0 -1
- package/dist/ui/assets/ContextAttachmentManager-CMxSzHqc.js +0 -3
- package/dist/ui/assets/EntityActivityTimeline-pJ2ZjZ-k.js +0 -1
- package/dist/ui/assets/PlanningModule-CeTqXMMz.css +0 -1
- package/dist/ui/assets/PlanningModule-t5GbvVR9.js +0 -1
- package/dist/ui/assets/PlansPage-BVH_NfgT.js +0 -1
- package/dist/ui/assets/TaskContextUpload-Ds4LnDzV.css +0 -1
- package/dist/ui/assets/TaskContextUpload-bl4fOOUz.js +0 -1
- package/dist/ui/assets/TaskSettings-xVsxSa0g.js +0 -12
- package/dist/ui/assets/WorkflowManagerModule-BKqIGVnF.js +0 -1
- package/dist/ui/assets/index-BzJlVnNS.css +0 -1
- package/dist/ui/assets/index-Cx7vZJHL.js +0 -7
|
@@ -3,20 +3,48 @@ import { fingerprintWorkspaceContentBody } from '../workspaceContentManifest.js'
|
|
|
3
3
|
export async function hydrateWorkspaceSyncV3AttachmentAsset(input) {
|
|
4
4
|
const remoteServices = input.remoteServices;
|
|
5
5
|
const applyV2Batch = input.localServices.applyV2Batch;
|
|
6
|
+
const completionIdentity = `attachment-asset:${input.assetId}`;
|
|
6
7
|
const response = await remoteServices.pullWorkspaceContent({
|
|
7
8
|
workspaceId: input.workspaceId,
|
|
8
9
|
requests: [{ kind: 'asset', assetId: input.assetId }],
|
|
9
10
|
previousCursor: null,
|
|
11
|
+
independentCompletionIdentity: completionIdentity,
|
|
10
12
|
});
|
|
11
13
|
const receipt = response.transferReceipt;
|
|
12
14
|
let transferCommitted = false;
|
|
15
|
+
let localApplyStarted = false;
|
|
13
16
|
try {
|
|
14
17
|
if (!response.ok) {
|
|
15
18
|
return { success: false, error: `Workspace attachment asset hydration failed (${response.status || 0}).` };
|
|
16
19
|
}
|
|
17
20
|
const data = response.data || {};
|
|
18
|
-
if ((data.
|
|
19
|
-
return {
|
|
21
|
+
if ((data.remaining?.length || 0) > 0) {
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
error: `Workspace attachment asset hydration is incomplete: ${input.assetId}`,
|
|
25
|
+
disposition: 'retryable',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const exactMissing = Array.isArray(data.missing) && data.missing.find((entry) => (entry?.kind === 'asset'
|
|
29
|
+
&& 'assetId' in entry
|
|
30
|
+
&& String(entry.assetId || '').trim() === input.assetId));
|
|
31
|
+
if (exactMissing) {
|
|
32
|
+
return {
|
|
33
|
+
success: false,
|
|
34
|
+
error: exactMissing.disposition === 'terminal-unavailable'
|
|
35
|
+
? `Workspace attachment asset is authoritatively unavailable in cloud metadata: ${input.assetId}`
|
|
36
|
+
: `Workspace attachment asset body is temporarily unavailable in cloud content: ${input.assetId}`,
|
|
37
|
+
disposition: exactMissing.disposition === 'terminal-unavailable'
|
|
38
|
+
? 'terminal-unavailable'
|
|
39
|
+
: 'retryable',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if ((data.missing?.length || 0) > 0) {
|
|
43
|
+
return {
|
|
44
|
+
success: false,
|
|
45
|
+
error: `Workspace attachment asset hydration returned an unexpected missing result: ${input.assetId}`,
|
|
46
|
+
disposition: 'retryable',
|
|
47
|
+
};
|
|
20
48
|
}
|
|
21
49
|
const rawChanges = Array.isArray(data.changes) ? data.changes : [];
|
|
22
50
|
const changes = rawChanges.filter((change) => ((change.op === 'document-upsert' || change.op === 'asset-upsert')
|
|
@@ -50,10 +78,9 @@ export async function hydrateWorkspaceSyncV3AttachmentAsset(input) {
|
|
|
50
78
|
return { success: false, error: `Workspace attachment asset hydration verification failed: ${input.assetId}` };
|
|
51
79
|
}
|
|
52
80
|
const completionGroup = receipt
|
|
53
|
-
? remoteServices.
|
|
81
|
+
? remoteServices.buildIndependentContentApplyCompletionGroup({
|
|
54
82
|
workspaceId: input.workspaceId,
|
|
55
|
-
|
|
56
|
-
nextCursor: null,
|
|
83
|
+
identity: completionIdentity,
|
|
57
84
|
receipts: [receipt],
|
|
58
85
|
})
|
|
59
86
|
: undefined;
|
|
@@ -63,6 +90,7 @@ export async function hydrateWorkspaceSyncV3AttachmentAsset(input) {
|
|
|
63
90
|
error: 'Workspace attachment asset hydration could not bind its transfer to local apply.',
|
|
64
91
|
};
|
|
65
92
|
}
|
|
93
|
+
localApplyStarted = true;
|
|
66
94
|
const applyResult = completionGroup
|
|
67
95
|
? await applyV2Batch(input.workspaceId, changes, { completionGroup })
|
|
68
96
|
: await applyV2Batch(input.workspaceId, changes);
|
|
@@ -80,11 +108,25 @@ export async function hydrateWorkspaceSyncV3AttachmentAsset(input) {
|
|
|
80
108
|
}
|
|
81
109
|
finally {
|
|
82
110
|
if (receipt && !transferCommitted) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
111
|
+
if (!localApplyStarted) {
|
|
112
|
+
const completionGroup = remoteServices.buildIndependentContentApplyCompletionGroup({
|
|
113
|
+
workspaceId: input.workspaceId,
|
|
114
|
+
identity: completionIdentity,
|
|
115
|
+
receipts: [receipt],
|
|
116
|
+
});
|
|
117
|
+
if (completionGroup) {
|
|
118
|
+
localApplyStarted = true;
|
|
119
|
+
const settlement = await applyV2Batch(input.workspaceId, [], { completionGroup });
|
|
120
|
+
transferCommitted = settlement.ok;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (!transferCommitted) {
|
|
124
|
+
await remoteServices.abandonTransferReceipts({
|
|
125
|
+
workspaceId: input.workspaceId,
|
|
126
|
+
receipts: [receipt],
|
|
127
|
+
errorCode: 'WORKSPACE_SYNC_V3_ATTACHMENT_HYDRATION_NOT_COMMITTED',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
88
130
|
}
|
|
89
131
|
}
|
|
90
132
|
}
|
|
@@ -71,6 +71,10 @@ export function createWorkspaceSyncV3CloudOperationHandlers() {
|
|
|
71
71
|
...withDeferredOriginActor(context, operation.payload.originActor),
|
|
72
72
|
taskId: operation.entityId, patch: operation.payload.patch,
|
|
73
73
|
saveSource: operation.payload.saveSource,
|
|
74
|
+
expectedDetailRevision: operation.payload.expectedDetailRevision,
|
|
75
|
+
assertPrecondition: operation.payload.expectedDetailRevision && context.core.assertTaskDetailRevisionForUpdate
|
|
76
|
+
? () => context.core.assertTaskDetailRevisionForUpdate(operation.entityId, operation.payload.expectedDetailRevision, context.workspaceId)
|
|
77
|
+
: undefined,
|
|
74
78
|
baseEntityRevision: operation.baseEntityRevision, baseLifecycleRevision: operation.baseLifecycleRevision,
|
|
75
79
|
});
|
|
76
80
|
},
|
|
@@ -187,11 +191,15 @@ export function createWorkspaceSyncV3CloudOperationHandlers() {
|
|
|
187
191
|
supports: (envelope) => envelope.operation.domain === 'task' && envelope.operation.mutationKind === 'set-status',
|
|
188
192
|
apply: (envelope, context) => {
|
|
189
193
|
const operation = envelope.operation;
|
|
190
|
-
const { originActor, ...payload } = operation.payload;
|
|
194
|
+
const { originActor, expectedDetailRevision, ...payload } = operation.payload;
|
|
191
195
|
return runDurableTaskStatusMutation({
|
|
192
196
|
...withDeferredOriginActor(context, originActor),
|
|
193
197
|
taskId: operation.entityId,
|
|
194
198
|
payload,
|
|
199
|
+
expectedDetailRevision,
|
|
200
|
+
assertPrecondition: expectedDetailRevision && context.core.assertTaskDetailRevisionForUpdate
|
|
201
|
+
? () => context.core.assertTaskDetailRevisionForUpdate(operation.entityId, expectedDetailRevision, context.workspaceId)
|
|
202
|
+
: undefined,
|
|
195
203
|
baseEntityRevision: operation.baseEntityRevision,
|
|
196
204
|
baseLifecycleRevision: operation.baseLifecycleRevision,
|
|
197
205
|
});
|
|
@@ -261,6 +269,7 @@ export function createWorkspaceSyncV3CloudOperationHandlers() {
|
|
|
261
269
|
...withDeferredOriginActor(context, operation.payload.originActor),
|
|
262
270
|
taskId: operation.entityId,
|
|
263
271
|
links: operation.payload.links,
|
|
272
|
+
cardCoverAssetId: operation.payload.cardCoverAssetId,
|
|
264
273
|
baseEntityRevision: operation.baseEntityRevision,
|
|
265
274
|
baseLifecycleRevision: operation.baseLifecycleRevision,
|
|
266
275
|
});
|
|
@@ -221,6 +221,12 @@ function peerReadinessError(response) {
|
|
|
221
221
|
? `Cloud combined workspace sync prerequisite is not ready (${firstMissing}).`
|
|
222
222
|
: 'Cloud combined workspace sync capability attestation is missing or incompatible.';
|
|
223
223
|
}
|
|
224
|
+
function repairResponseError(response, workspaceId, expected) {
|
|
225
|
+
const code = String(response.data?.code || '').trim();
|
|
226
|
+
return code && !['CURSOR_EXPIRED', 'COVERAGE_CHANGED', 'EXPLICIT_REPAIR'].includes(code)
|
|
227
|
+
? invalidRepairResponseError(response, workspaceId, expected)
|
|
228
|
+
: peerReadinessError(response);
|
|
229
|
+
}
|
|
224
230
|
function isUnavailablePersistedRepairCursor(response) {
|
|
225
231
|
if (response.data?.success !== false)
|
|
226
232
|
return false;
|
|
@@ -319,10 +325,14 @@ async function runWorkspaceSyncV3CombinedProjectionCycleInternal(input, staleRep
|
|
|
319
325
|
let projection = initial;
|
|
320
326
|
let recoveryRepairApplied = false;
|
|
321
327
|
let restartStaleRepair = false;
|
|
328
|
+
let restartCoverageRepair = false;
|
|
322
329
|
let restartedStaleRepair = staleRepairAlreadyRestarted;
|
|
323
330
|
const persistedCoverage = projectionCoverage(projection);
|
|
324
331
|
if (!persistedCoverage)
|
|
325
332
|
return localFailure(projection, 'Persisted combined workspace sync coverage is unsupported.');
|
|
333
|
+
restartCoverageRepair = projection.owner === 'v3'
|
|
334
|
+
&& projection.repair !== null
|
|
335
|
+
&& !exactCoverage(persistedCoverage, coverage);
|
|
326
336
|
if (projection.coverageRepairRequired
|
|
327
337
|
|| (projection.owner === 'v3' && !projection.repair && !exactCoverage(persistedCoverage, coverage))) {
|
|
328
338
|
const feed = await dependencies.pullFeed(input.resolveCloudAuthUrl, {
|
|
@@ -407,12 +417,12 @@ async function runWorkspaceSyncV3CombinedProjectionCycleInternal(input, staleRep
|
|
|
407
417
|
}
|
|
408
418
|
let restartExpiredRepair = false;
|
|
409
419
|
let restartedExpiredRepair = false;
|
|
410
|
-
while (projection.owner === 'v2' || projection.repair || restartStaleRepair) {
|
|
411
|
-
const previousCursor = restartExpiredRepair || restartStaleRepair
|
|
420
|
+
while (projection.owner === 'v2' || projection.repair || restartStaleRepair || restartCoverageRepair) {
|
|
421
|
+
const previousCursor = restartExpiredRepair || restartStaleRepair || restartCoverageRepair
|
|
412
422
|
? null : projection.repair?.cursor || null;
|
|
413
423
|
const feed = await dependencies.pullFeed(input.resolveCloudAuthUrl, {
|
|
414
424
|
workspaceId: input.workspaceId,
|
|
415
|
-
...(restartExpiredRepair || restartStaleRepair
|
|
425
|
+
...(restartExpiredRepair || restartStaleRepair || restartCoverageRepair
|
|
416
426
|
? { forceRepair: true }
|
|
417
427
|
: { repairCursor: previousCursor }),
|
|
418
428
|
limit: 100,
|
|
@@ -431,7 +441,7 @@ async function runWorkspaceSyncV3CombinedProjectionCycleInternal(input, staleRep
|
|
|
431
441
|
}
|
|
432
442
|
const repair = repairFromFeed(feed, input.workspaceId, coverage);
|
|
433
443
|
if (!repair)
|
|
434
|
-
return localFailure(projection,
|
|
444
|
+
return localFailure(projection, repairResponseError(feed, input.workspaceId, coverage));
|
|
435
445
|
const applied = await applySelectedProjection(dependencies, input.workspaceId, {
|
|
436
446
|
kind: 'repair', epoch: projection.epoch, previousCursor, page: repair,
|
|
437
447
|
...(input.recoveryBatchId ? { recoveryBatchId: input.recoveryBatchId } : {}),
|
|
@@ -443,6 +453,7 @@ async function runWorkspaceSyncV3CombinedProjectionCycleInternal(input, staleRep
|
|
|
443
453
|
projection = updated;
|
|
444
454
|
restartExpiredRepair = false;
|
|
445
455
|
restartStaleRepair = false;
|
|
456
|
+
restartCoverageRepair = false;
|
|
446
457
|
if (repairSnapshotWasInvalidated(applied)) {
|
|
447
458
|
if (restartedStaleRepair) {
|
|
448
459
|
return localFailure(projection, 'A refreshed combined repair snapshot still predates authoritative local state.');
|
|
@@ -6,7 +6,7 @@ import { validateWorkspaceSyncV3CombinedRepairPage, WorkspaceSyncV3CombinedProje
|
|
|
6
6
|
import { fingerprintWorkspaceSyncPayload, WorkspaceSyncDurabilityStore } from './syncDurabilityStore.js';
|
|
7
7
|
import { WorkflowStore } from '../../storage/workflowStore.js';
|
|
8
8
|
import { serializeTaskRelationshipForSync } from './workspaceSyncV3TaskRelationshipProjection.js';
|
|
9
|
-
import { serializeWorkspaceSyncV3EntityEventPayload, serializeWorkspaceSyncV3TaskAttachmentLinksPayload, serializeWorkspaceSyncV3TaskChecklistPayload, serializeWorkspaceSyncV3TaskCommentsPayload, validateWorkspaceSyncV3EntityEventPayload, } from './workspaceSyncV3NestedTaskCodecs.js';
|
|
9
|
+
import { serializeWorkspaceSyncV3EntityEventPayload, serializeWorkspaceSyncV3TaskAttachmentLinksPayload, serializeWorkspaceSyncV3TaskAttachmentLinksV2Payload, serializeWorkspaceSyncV3TaskChecklistPayload, serializeWorkspaceSyncV3TaskCommentsPayload, validateWorkspaceSyncV3EntityEventPayload, } from './workspaceSyncV3NestedTaskCodecs.js';
|
|
10
10
|
import { applyWorkspaceSyncV3NestedTaskEntries, WorkspaceSyncV3TaskCommentAggregateDivergenceError, } from './workspaceSyncV3NestedTaskApply.js';
|
|
11
11
|
import { LocalSyncIdentityStore } from './localSyncIdentityStore.js';
|
|
12
12
|
import { enqueueLocalTaskCommentReconciliation } from './localTaskCommentOutboxService.js';
|
|
@@ -25,7 +25,8 @@ function combinedRepairBaselineMarker(page) {
|
|
|
25
25
|
})}`;
|
|
26
26
|
}
|
|
27
27
|
const NESTED_TASK_PROJECTIONS = new Set([
|
|
28
|
-
'task-comments/full-v1', 'task-checklist/full-v1', 'task-attachment-links/full-v1',
|
|
28
|
+
'task-comments/full-v1', 'task-checklist/full-v1', 'task-attachment-links/full-v1',
|
|
29
|
+
'task-attachment-links/full-v2', 'entity-event/full-v1',
|
|
29
30
|
]);
|
|
30
31
|
const WORKFLOW_RUNTIME_PROJECTIONS = new Set([
|
|
31
32
|
'workflow-published-definition/full-v2',
|
|
@@ -59,7 +60,8 @@ function coveredDomains(projections) {
|
|
|
59
60
|
domains.push('task-comments');
|
|
60
61
|
if (projections.has('task-checklist/full-v1'))
|
|
61
62
|
domains.push('task-checklist');
|
|
62
|
-
if (projections.has('task-attachment-links/full-v1')
|
|
63
|
+
if (projections.has('task-attachment-links/full-v1')
|
|
64
|
+
|| projections.has('task-attachment-links/full-v2'))
|
|
63
65
|
domains.push('task-attachment-links');
|
|
64
66
|
if (projections.has('entity-event/full-v1'))
|
|
65
67
|
domains.push('entity-event');
|
|
@@ -172,6 +174,24 @@ function isExactNestedProjectionReplay(input) {
|
|
|
172
174
|
&& input.current.lastSequence === input.entry.sequence
|
|
173
175
|
&& input.current.canonicalFingerprint === (input.entry.canonicalFingerprint || input.entry.payloadFingerprint);
|
|
174
176
|
}
|
|
177
|
+
function isExactPlanningRootProjectionReplay(input) {
|
|
178
|
+
return (input.entry.projection === 'initiative/full-v1'
|
|
179
|
+
|| input.entry.projection === 'workstream/full-v1')
|
|
180
|
+
&& input.current.owned
|
|
181
|
+
&& input.current.entityRevision === input.entry.entityRevision
|
|
182
|
+
&& input.current.lifecycleRevision === input.entry.lifecycleRevision
|
|
183
|
+
&& input.current.lastSequence === input.entry.sequence
|
|
184
|
+
&& input.current.canonicalFingerprint === (input.entry.canonicalFingerprint || input.entry.payloadFingerprint);
|
|
185
|
+
}
|
|
186
|
+
function parentOwnedNestedTaskId(entry) {
|
|
187
|
+
if (entry.projection === 'task-comments/full-v1'
|
|
188
|
+
|| entry.projection === 'task-checklist/full-v1'
|
|
189
|
+
|| entry.projection === 'task-attachment-links/full-v1'
|
|
190
|
+
|| entry.projection === 'task-attachment-links/full-v2') {
|
|
191
|
+
return entry.entityId;
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
175
195
|
function applyEntries(input) {
|
|
176
196
|
const store = new WorkspaceSyncDurabilityStore(input.core.getDatabaseAdapter());
|
|
177
197
|
const workflowApply = prepareWorkspaceSyncV3WorkflowRuntimeApply({
|
|
@@ -191,13 +211,18 @@ function applyEntries(input) {
|
|
|
191
211
|
throw coveredLocalOperationsError('Combined feed apply is blocked by covered local operations.');
|
|
192
212
|
}
|
|
193
213
|
const notices = notifications();
|
|
214
|
+
const deletedTaskRoots = new Set();
|
|
194
215
|
for (const entry of input.entries) {
|
|
195
216
|
let taskChange = null;
|
|
196
217
|
let nestedTaskChangeId = null;
|
|
218
|
+
const nestedTaskId = parentOwnedNestedTaskId(entry);
|
|
219
|
+
if (nestedTaskId && deletedTaskRoots.has(nestedTaskId))
|
|
220
|
+
continue;
|
|
197
221
|
const current = store.readWorkspaceDomainOwnership({ tenantId: input.tenantId,
|
|
198
222
|
workspaceId: input.workspaceId, domain: entry.domain, entityId: entry.entityId });
|
|
199
223
|
const exactTaskRootReplay = isExactTaskRootProjectionReplay({ entry, current });
|
|
200
224
|
const exactNestedReplay = isExactNestedProjectionReplay({ entry, current });
|
|
225
|
+
const exactPlanningRootReplay = isExactPlanningRootProjectionReplay({ entry, current });
|
|
201
226
|
const applyEntry = () => {
|
|
202
227
|
if (entry.projection === 'task/root-v1') {
|
|
203
228
|
taskChange = applyTaskEntry({ core: input.core, workspaceId: input.workspaceId, entry });
|
|
@@ -259,7 +284,7 @@ function applyEntries(input) {
|
|
|
259
284
|
}
|
|
260
285
|
};
|
|
261
286
|
let applied;
|
|
262
|
-
if (exactTaskRootReplay || exactNestedReplay) {
|
|
287
|
+
if (exactTaskRootReplay || exactNestedReplay || exactPlanningRootReplay) {
|
|
263
288
|
const result = applyEntry();
|
|
264
289
|
applied = result?.state === 'deferred'
|
|
265
290
|
? { state: 'deferred' }
|
|
@@ -278,6 +303,16 @@ function applyEntries(input) {
|
|
|
278
303
|
shouldRecordRevision: (result) => result?.state !== 'deferred',
|
|
279
304
|
});
|
|
280
305
|
}
|
|
306
|
+
if (entry.projection === 'task/root-v1') {
|
|
307
|
+
if (taskChange === 'upsert') {
|
|
308
|
+
deletedTaskRoots.delete(entry.entityId);
|
|
309
|
+
}
|
|
310
|
+
else if (taskChange === 'delete'
|
|
311
|
+
|| (!input.core.getTask(entry.entityId, input.workspaceId)
|
|
312
|
+
&& input.core.hasTaskDeletionMarkerForSync(entry.entityId, input.workspaceId))) {
|
|
313
|
+
deletedTaskRoots.add(entry.entityId);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
281
316
|
if (applied.state !== 'applied')
|
|
282
317
|
continue;
|
|
283
318
|
if (entry.projection === 'task/root-v1' && entry.mutationKind !== 'delete') {
|
|
@@ -356,12 +391,19 @@ function listLocalTaskNestedProjection(core, workspaceId, projection) {
|
|
|
356
391
|
taskId: task.id, items: task.checklistItems || [],
|
|
357
392
|
}));
|
|
358
393
|
}
|
|
359
|
-
else {
|
|
394
|
+
else if (projection === 'task-attachment-links/full-v1') {
|
|
360
395
|
values.set(task.id, serializeWorkspaceSyncV3TaskAttachmentLinksPayload({
|
|
361
396
|
taskId: task.id,
|
|
362
397
|
links: core.listTaskAttachmentLinksForDurableSync(task.id, workspaceId),
|
|
363
398
|
}));
|
|
364
399
|
}
|
|
400
|
+
else {
|
|
401
|
+
values.set(task.id, serializeWorkspaceSyncV3TaskAttachmentLinksV2Payload({
|
|
402
|
+
taskId: task.id,
|
|
403
|
+
links: core.listTaskAttachmentLinksForDurableSync(task.id, workspaceId),
|
|
404
|
+
cardCoverAssetId: task.cardCoverAssetId ?? null,
|
|
405
|
+
}));
|
|
406
|
+
}
|
|
365
407
|
}
|
|
366
408
|
const last = page.at(-1);
|
|
367
409
|
cursor = page.length === 1000 && last
|
|
@@ -406,6 +448,9 @@ function nestedLocalDomains(core, workspaceId, projections, liveEntityIds) {
|
|
|
406
448
|
if (projections.has('task-attachment-links/full-v1')) {
|
|
407
449
|
domains.push(['task-attachment-links', listLocalTaskNestedProjection(core, workspaceId, 'task-attachment-links/full-v1')]);
|
|
408
450
|
}
|
|
451
|
+
else if (projections.has('task-attachment-links/full-v2')) {
|
|
452
|
+
domains.push(['task-attachment-links', listLocalTaskNestedProjection(core, workspaceId, 'task-attachment-links/full-v2')]);
|
|
453
|
+
}
|
|
409
454
|
if (projections.has('entity-event/full-v1')) {
|
|
410
455
|
domains.push(['entity-event', listLocalEntityEvents(core, workspaceId, liveEntityIds)]);
|
|
411
456
|
}
|
|
@@ -550,13 +595,18 @@ function isCompatibleLegacyAttachmentLinks(core, workspaceId, local, incoming) {
|
|
|
550
595
|
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
551
596
|
return false;
|
|
552
597
|
const incomingLink = value;
|
|
553
|
-
if (localLink.role !== incomingLink.role)
|
|
554
|
-
return false;
|
|
555
598
|
const localAsset = store.get(String(localLink.assetId || ''), workspaceId);
|
|
556
599
|
const incomingAsset = store.get(String(incomingLink.assetId || ''), workspaceId);
|
|
557
600
|
if (!localAsset || !incomingAsset || localAsset.deletedAt || incomingAsset.deletedAt
|
|
558
601
|
|| localAsset.storageKey !== incomingAsset.storageKey)
|
|
559
602
|
return false;
|
|
603
|
+
const compatibleRole = localLink.role === incomingLink.role
|
|
604
|
+
|| (localAsset.storageProvider === 'external'
|
|
605
|
+
&& localLink.role === 'reference'
|
|
606
|
+
&& incomingAsset.storageProvider !== 'external'
|
|
607
|
+
&& incomingLink.role === (incomingAsset.kind === 'image' ? 'image' : 'attachment'));
|
|
608
|
+
if (!compatibleRole)
|
|
609
|
+
return false;
|
|
560
610
|
const sameContent = localAsset.contentSha256 === incomingAsset.contentSha256
|
|
561
611
|
&& localAsset.sizeBytes === incomingAsset.sizeBytes;
|
|
562
612
|
const authoritativeMaterialization = localAsset.storageProvider === 'external'
|
|
@@ -574,15 +624,15 @@ function isCompatibleLegacyAttachmentLinks(core, workspaceId, local, incoming) {
|
|
|
574
624
|
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
575
625
|
return false;
|
|
576
626
|
const incomingLink = value;
|
|
577
|
-
if (localLink.role !== incomingLink.role)
|
|
578
|
-
return false;
|
|
579
627
|
const incomingAsset = store.get(String(incomingLink.assetId || ''), workspaceId);
|
|
580
628
|
return Boolean(incomingAsset && !incomingAsset.deletedAt
|
|
581
629
|
&& incomingAsset.storageProvider !== 'external'
|
|
630
|
+
&& localLink.role === 'reference'
|
|
631
|
+
&& incomingLink.role === (incomingAsset.kind === 'image' ? 'image' : 'attachment')
|
|
582
632
|
&& incomingAsset.storageKey === localAsset.storageKey
|
|
583
633
|
&& incomingAsset.sizeBytes >= localAsset.sizeBytes);
|
|
584
634
|
}));
|
|
585
|
-
})
|
|
635
|
+
});
|
|
586
636
|
return compatible;
|
|
587
637
|
}
|
|
588
638
|
function assertLocalInventoryReady(input) {
|
|
@@ -957,25 +1007,28 @@ export function applyWorkspaceSyncV3CombinedRepairPage(input) {
|
|
|
957
1007
|
})();
|
|
958
1008
|
}
|
|
959
1009
|
const recoveryTargets = recoveryBatchId
|
|
960
|
-
? recoveryStore.
|
|
1010
|
+
? recoveryStore.listOutboxRecoveryBaselineTargets({ tenantId, workspaceId, recoveryBatchId })
|
|
961
1011
|
: [];
|
|
962
1012
|
const selectRecoveryEntries = (entries) => {
|
|
963
1013
|
const byTarget = new Map(entries.map((entry) => [`${entry.domain}\0${entry.entityId}`, entry]));
|
|
964
1014
|
return recoveryTargets.map((target) => {
|
|
965
1015
|
const entry = byTarget.get(`${target.domain}\0${target.entityId}`);
|
|
966
1016
|
if (!entry) {
|
|
1017
|
+
if (!target.required)
|
|
1018
|
+
return null;
|
|
967
1019
|
throw staleRepairSnapshotError(target.domain, target.entityId);
|
|
968
1020
|
}
|
|
969
1021
|
const supportedTarget = ((target.domain === 'task' && entry.projection === 'task/root-v1')
|
|
970
1022
|
|| (target.domain === 'task-comments' && entry.projection === 'task-comments/full-v1')
|
|
971
1023
|
|| (target.domain === 'task-attachment-links'
|
|
972
|
-
&& entry.projection === 'task-attachment-links/full-v1'
|
|
1024
|
+
&& (entry.projection === 'task-attachment-links/full-v1'
|
|
1025
|
+
|| entry.projection === 'task-attachment-links/full-v2'))
|
|
973
1026
|
|| (target.domain === 'entity-event' && entry.projection === 'entity-event/full-v1'));
|
|
974
1027
|
if (!supportedTarget) {
|
|
975
1028
|
throw new Error('Targeted workspace sync recovery does not support this projection.');
|
|
976
1029
|
}
|
|
977
1030
|
return entry;
|
|
978
|
-
});
|
|
1031
|
+
}).filter((entry) => entry !== null);
|
|
979
1032
|
};
|
|
980
1033
|
const projections = coveredProjections(input.page);
|
|
981
1034
|
let notices = notifications();
|
|
@@ -7,6 +7,8 @@ export declare function prepareWorkspaceSyncV3CombinedRepairSnapshot(input: {
|
|
|
7
7
|
nestedCoverage?: boolean;
|
|
8
8
|
workflowCoverage?: boolean;
|
|
9
9
|
planningOrderCoverage?: boolean;
|
|
10
|
+
taskCoverCoverage?: boolean;
|
|
11
|
+
coveredLegacyWritesFenced?: boolean;
|
|
10
12
|
}): {
|
|
11
13
|
highWatermark: string;
|
|
12
14
|
insertedEntities: number;
|
|
@@ -20,16 +22,25 @@ export declare function prepareWorkspaceSyncV3NestedRepairSnapshot(input: {
|
|
|
20
22
|
core: TaskforceCore;
|
|
21
23
|
workspaceId: string;
|
|
22
24
|
now?: string;
|
|
25
|
+
coveredLegacyWritesFenced?: boolean;
|
|
23
26
|
}): ReturnType<typeof prepareWorkspaceSyncV3CombinedRepairSnapshot>;
|
|
24
27
|
export declare function prepareWorkspaceSyncV3WorkflowRepairSnapshot(input: {
|
|
25
28
|
core: TaskforceCore;
|
|
26
29
|
workspaceId: string;
|
|
27
30
|
now?: string;
|
|
31
|
+
coveredLegacyWritesFenced?: boolean;
|
|
28
32
|
}): ReturnType<typeof prepareWorkspaceSyncV3CombinedRepairSnapshot>;
|
|
29
33
|
export declare function prepareWorkspaceSyncV3PlanningOrderRepairSnapshot(input: {
|
|
30
34
|
core: TaskforceCore;
|
|
31
35
|
workspaceId: string;
|
|
32
36
|
now?: string;
|
|
37
|
+
coveredLegacyWritesFenced?: boolean;
|
|
38
|
+
}): ReturnType<typeof prepareWorkspaceSyncV3CombinedRepairSnapshot>;
|
|
39
|
+
export declare function prepareWorkspaceSyncV3TaskCoverRepairSnapshot(input: {
|
|
40
|
+
core: TaskforceCore;
|
|
41
|
+
workspaceId: string;
|
|
42
|
+
now?: string;
|
|
43
|
+
coveredLegacyWritesFenced?: boolean;
|
|
33
44
|
}): ReturnType<typeof prepareWorkspaceSyncV3CombinedRepairSnapshot>;
|
|
34
45
|
export declare function ensureWorkspaceSyncV3CombinedRepairBaselines(input: {
|
|
35
46
|
core: TaskforceCore;
|
|
@@ -3,16 +3,17 @@ import { serializeInitiativeForSync, serializeWorkstreamForSync } from '../plann
|
|
|
3
3
|
import { serializeTaskForSync } from '../taskSyncPayload.js';
|
|
4
4
|
import { canonicalWorkspaceSyncJson } from './canonicalWorkspaceSyncJson.js';
|
|
5
5
|
import { WORKSPACE_SYNC_COMBINED_PROJECTION, fingerprintWorkspaceSyncPayload, WORKSPACE_SYNC_CONTRACT_VERSION, WorkspaceSyncRevisionConflictError, } from './syncDurabilityStore.js';
|
|
6
|
-
import { buildWorkspaceSyncV3CombinedRepairSnapshot, buildWorkspaceSyncV3CombinedRepairSnapshotFromLockedCandidates, buildWorkspaceSyncV3NestedRepairSnapshot, buildWorkspaceSyncV3PlanningOrderRepairSnapshot, buildWorkspaceSyncV3WorkflowRepairSnapshot, listWorkspaceSyncV3CombinedRepairCandidates, listWorkspaceSyncV3NestedRepairCandidates, listWorkspaceSyncV3PlanningOrderRepairCandidates, listWorkspaceSyncV3WorkflowRepairCandidates, } from './workspaceSyncV3CombinedRepairSnapshot.js';
|
|
6
|
+
import { buildWorkspaceSyncV3CombinedRepairSnapshot, buildWorkspaceSyncV3CombinedRepairSnapshotFromLockedCandidates, buildWorkspaceSyncV3NestedRepairSnapshot, buildWorkspaceSyncV3PlanningOrderRepairSnapshot, buildWorkspaceSyncV3TaskCoverRepairSnapshot, buildWorkspaceSyncV3WorkflowRepairSnapshot, listWorkspaceSyncV3CombinedRepairCandidates, listWorkspaceSyncV3NestedRepairCandidates, listWorkspaceSyncV3PlanningOrderRepairCandidates, listWorkspaceSyncV3TaskCoverRepairCandidates, listWorkspaceSyncV3WorkflowRepairCandidates, } from './workspaceSyncV3CombinedRepairSnapshot.js';
|
|
7
7
|
import { WORKSPACE_SYNC_V3_COMBINED_COVERAGE_PROFILE } from './workspaceSyncV3CombinedCoverage.js';
|
|
8
8
|
import { WORKSPACE_SYNC_V3_NESTED_COVERAGE_PROFILE } from './workspaceSyncV3NestedCoverage.js';
|
|
9
9
|
import { WORKSPACE_SYNC_V3_WORKFLOW_COVERAGE_PROFILE } from './workspaceSyncV3WorkflowCoverage.js';
|
|
10
10
|
import { WORKSPACE_SYNC_V3_PLANNING_ORDER_COVERAGE_PROFILE } from './workspaceSyncV3PlanningOrderCoverage.js';
|
|
11
|
+
import { WORKSPACE_SYNC_V3_TASK_COVER_COVERAGE_PROFILE } from './workspaceSyncV3TaskCoverCoverage.js';
|
|
11
12
|
import { serializeWorkspaceSyncV3TaskAttachmentLinksPayload, serializeWorkspaceSyncV3TaskCommentsPayload, } from './workspaceSyncV3NestedTaskCodecs.js';
|
|
12
13
|
import { projectWorkspaceSyncV3NestedTaskJournalRow } from './workspaceSyncV3NestedTaskProjection.js';
|
|
13
14
|
import { serializeTaskRelationshipForSync } from './workspaceSyncV3TaskRelationshipProjection.js';
|
|
14
15
|
import { projectWorkspaceSyncV3TaskRootJournalRow, serializeTaskRootForSync, } from './workspaceSyncV3TaskRootProjection.js';
|
|
15
|
-
|
|
16
|
+
import { workspaceSyncV3RepairEntityReadBatchSize } from './workspaceSyncV3RepairSqlBatching.js';
|
|
16
17
|
const BASELINE_CLIENT_ID = 'sync-v3-repair';
|
|
17
18
|
const LEGACY_REPAIRABLE_NESTED_DOMAINS = new Set([
|
|
18
19
|
'task-comments', 'task-checklist', 'task-attachment-links',
|
|
@@ -84,10 +85,11 @@ function lifecycleState(candidate) {
|
|
|
84
85
|
function readRevisions(input) {
|
|
85
86
|
const result = new Map();
|
|
86
87
|
const db = input.core.getDatabaseAdapter();
|
|
88
|
+
const batchSize = workspaceSyncV3RepairEntityReadBatchSize(db);
|
|
87
89
|
for (const domain of [...new Set(input.candidates.map((candidate) => candidate.domain))]) {
|
|
88
90
|
const ids = input.candidates.filter((candidate) => candidate.domain === domain).map((candidate) => candidate.entityId);
|
|
89
|
-
for (let offset = 0; offset < ids.length; offset +=
|
|
90
|
-
const batch = ids.slice(offset, offset +
|
|
91
|
+
for (let offset = 0; offset < ids.length; offset += batchSize) {
|
|
92
|
+
const batch = ids.slice(offset, offset + batchSize);
|
|
91
93
|
const placeholders = batch.map(() => '?').join(', ');
|
|
92
94
|
const rows = db.prepare(`
|
|
93
95
|
SELECT entity_id, contract_version,
|
|
@@ -250,6 +252,7 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
250
252
|
const tenantId = input.core.getTenantId();
|
|
251
253
|
const db = input.core.getDatabaseAdapter();
|
|
252
254
|
return db.transaction(() => {
|
|
255
|
+
const startedAt = Date.now();
|
|
253
256
|
const lock = db.prepare(`
|
|
254
257
|
INSERT INTO workspace_sync_sequences (tenant_id, workspace_id, last_sequence, updated_at)
|
|
255
258
|
VALUES (?, ?, 0, ?)
|
|
@@ -257,17 +260,22 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
257
260
|
RETURNING CAST(last_sequence AS TEXT) AS last_sequence
|
|
258
261
|
`).get(tenantId, workspaceId, now);
|
|
259
262
|
sequence(lock?.last_sequence);
|
|
263
|
+
const lockCompletedAt = Date.now();
|
|
260
264
|
const candidates = input.workflowCoverage
|
|
261
265
|
? listWorkspaceSyncV3WorkflowRepairCandidates(input.core, workspaceId)
|
|
262
|
-
: input.
|
|
263
|
-
?
|
|
264
|
-
: input.
|
|
265
|
-
?
|
|
266
|
-
:
|
|
266
|
+
: input.taskCoverCoverage
|
|
267
|
+
? listWorkspaceSyncV3TaskCoverRepairCandidates(input.core, workspaceId)
|
|
268
|
+
: input.planningOrderCoverage
|
|
269
|
+
? listWorkspaceSyncV3PlanningOrderRepairCandidates(input.core, workspaceId)
|
|
270
|
+
: input.nestedCoverage
|
|
271
|
+
? listWorkspaceSyncV3NestedRepairCandidates(input.core, workspaceId)
|
|
272
|
+
: listWorkspaceSyncV3CombinedRepairCandidates(input.core, workspaceId);
|
|
273
|
+
const inventoryCompletedAt = Date.now();
|
|
267
274
|
const keys = candidates.map((candidate) => `${candidate.domain}\0${candidate.entityId}`);
|
|
268
275
|
if (new Set(keys).size !== keys.length)
|
|
269
276
|
throw new Error('Combined repair baseline contains duplicate entities.');
|
|
270
277
|
const revisions = readRevisions({ core: input.core, tenantId, workspaceId, candidates });
|
|
278
|
+
const revisionsCompletedAt = Date.now();
|
|
271
279
|
const missing = [];
|
|
272
280
|
const legacyRelationshipSkews = [];
|
|
273
281
|
const legacyNestedDrifts = [];
|
|
@@ -383,6 +391,7 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
383
391
|
});
|
|
384
392
|
}
|
|
385
393
|
}
|
|
394
|
+
const validationCompletedAt = Date.now();
|
|
386
395
|
const rowCount = legacyRelationshipSkews.length + legacyNestedDrifts.length + missing.reduce((count, candidate) => {
|
|
387
396
|
if (candidate.domain === 'workflow-published-definition'
|
|
388
397
|
|| candidate.domain === 'workflow-execution'
|
|
@@ -541,13 +550,16 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
541
550
|
if (Number(updated.changes) !== 1)
|
|
542
551
|
throw repairConflict('legacy-nested-repair-raced', repair.candidate);
|
|
543
552
|
}
|
|
553
|
+
const baselineWritesCompletedAt = Date.now();
|
|
544
554
|
const profile = input.workflowCoverage
|
|
545
555
|
? WORKSPACE_SYNC_V3_WORKFLOW_COVERAGE_PROFILE
|
|
546
|
-
: input.
|
|
547
|
-
?
|
|
548
|
-
: input.
|
|
549
|
-
?
|
|
550
|
-
:
|
|
556
|
+
: input.taskCoverCoverage
|
|
557
|
+
? WORKSPACE_SYNC_V3_TASK_COVER_COVERAGE_PROFILE
|
|
558
|
+
: input.planningOrderCoverage
|
|
559
|
+
? WORKSPACE_SYNC_V3_PLANNING_ORDER_COVERAGE_PROFILE
|
|
560
|
+
: input.nestedCoverage
|
|
561
|
+
? WORKSPACE_SYNC_V3_NESTED_COVERAGE_PROFILE
|
|
562
|
+
: WORKSPACE_SYNC_V3_COMBINED_COVERAGE_PROFILE;
|
|
551
563
|
const activeOwner = db.prepare(`
|
|
552
564
|
SELECT 1 AS active
|
|
553
565
|
FROM workspace_sync_projection_state
|
|
@@ -557,9 +569,10 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
557
569
|
`).get(tenantId, workspaceId, WORKSPACE_SYNC_COMBINED_PROJECTION, WORKSPACE_SYNC_CONTRACT_VERSION, profile.coverageProfileId, profile.coverageVersion, profile.coverageDigest);
|
|
558
570
|
// Exact active v3 ownership closes every ordinary writer over the same
|
|
559
571
|
// sequence lock, so the inventory read above remains the authoritative
|
|
560
|
-
// cut.
|
|
561
|
-
//
|
|
562
|
-
|
|
572
|
+
// cut. The cloud activation route may attest the same invariant by
|
|
573
|
+
// fencing covered legacy/v2 writers. Unfenced rollback repair still
|
|
574
|
+
// re-inventories because those writers do not reserve this lock.
|
|
575
|
+
const snapshot = activeOwner?.active === 1 || input.coveredLegacyWritesFenced === true
|
|
563
576
|
? buildWorkspaceSyncV3CombinedRepairSnapshotFromLockedCandidates({
|
|
564
577
|
core: input.core,
|
|
565
578
|
workspaceId,
|
|
@@ -568,17 +581,36 @@ export function prepareWorkspaceSyncV3CombinedRepairSnapshot(input) {
|
|
|
568
581
|
nestedCoverage: input.nestedCoverage === true,
|
|
569
582
|
workflowCoverage: input.workflowCoverage === true,
|
|
570
583
|
planningOrderCoverage: input.planningOrderCoverage === true,
|
|
584
|
+
taskCoverCoverage: input.taskCoverCoverage === true,
|
|
571
585
|
})
|
|
572
586
|
: input.workflowCoverage
|
|
573
587
|
? buildWorkspaceSyncV3WorkflowRepairSnapshot({ core: input.core, workspaceId })
|
|
574
|
-
: input.
|
|
575
|
-
?
|
|
576
|
-
: input.
|
|
577
|
-
?
|
|
578
|
-
:
|
|
588
|
+
: input.taskCoverCoverage
|
|
589
|
+
? buildWorkspaceSyncV3TaskCoverRepairSnapshot({ core: input.core, workspaceId })
|
|
590
|
+
: input.planningOrderCoverage
|
|
591
|
+
? buildWorkspaceSyncV3PlanningOrderRepairSnapshot({ core: input.core, workspaceId })
|
|
592
|
+
: input.nestedCoverage
|
|
593
|
+
? buildWorkspaceSyncV3NestedRepairSnapshot({ core: input.core, workspaceId })
|
|
594
|
+
: buildWorkspaceSyncV3CombinedRepairSnapshot({ core: input.core, workspaceId });
|
|
595
|
+
const snapshotCompletedAt = Date.now();
|
|
579
596
|
if (snapshot.snapshotSequence !== highWatermark) {
|
|
580
597
|
throw new Error('Combined repair baseline snapshot sequence changed while locked.');
|
|
581
598
|
}
|
|
599
|
+
console.info('[Taskforce Sync Repair Baseline Timing]', JSON.stringify({
|
|
600
|
+
workspaceId,
|
|
601
|
+
coverage: input.workflowCoverage ? 'workflow'
|
|
602
|
+
: input.taskCoverCoverage ? 'task-cover'
|
|
603
|
+
: input.planningOrderCoverage ? 'planning-order'
|
|
604
|
+
: input.nestedCoverage ? 'nested' : 'combined',
|
|
605
|
+
candidates: candidates.length,
|
|
606
|
+
lock: lockCompletedAt - startedAt,
|
|
607
|
+
inventory: inventoryCompletedAt - lockCompletedAt,
|
|
608
|
+
revisions: revisionsCompletedAt - inventoryCompletedAt,
|
|
609
|
+
validation: validationCompletedAt - revisionsCompletedAt,
|
|
610
|
+
baselineWrites: baselineWritesCompletedAt - validationCompletedAt,
|
|
611
|
+
snapshot: snapshotCompletedAt - baselineWritesCompletedAt,
|
|
612
|
+
total: snapshotCompletedAt - startedAt,
|
|
613
|
+
}));
|
|
582
614
|
return { highWatermark, insertedEntities: missing.length + legacyRelationshipSkews.length + legacyNestedDrifts.length,
|
|
583
615
|
insertedJournalRows: rowCount, snapshot };
|
|
584
616
|
})();
|
|
@@ -592,6 +624,9 @@ export function prepareWorkspaceSyncV3WorkflowRepairSnapshot(input) {
|
|
|
592
624
|
export function prepareWorkspaceSyncV3PlanningOrderRepairSnapshot(input) {
|
|
593
625
|
return prepareWorkspaceSyncV3CombinedRepairSnapshot({ ...input, planningOrderCoverage: true });
|
|
594
626
|
}
|
|
627
|
+
export function prepareWorkspaceSyncV3TaskCoverRepairSnapshot(input) {
|
|
628
|
+
return prepareWorkspaceSyncV3CombinedRepairSnapshot({ ...input, taskCoverCoverage: true });
|
|
629
|
+
}
|
|
595
630
|
export function ensureWorkspaceSyncV3CombinedRepairBaselines(input) {
|
|
596
631
|
const { snapshot: _snapshot, ...result } = prepareWorkspaceSyncV3CombinedRepairSnapshot(input);
|
|
597
632
|
return result;
|
|
@@ -3,6 +3,7 @@ import { WORKSPACE_SYNC_V3_COMBINED_COVERAGE_PROFILE } from './workspaceSyncV3Co
|
|
|
3
3
|
import { WORKSPACE_SYNC_V3_NESTED_COVERAGE_PROFILE } from './workspaceSyncV3NestedCoverage.js';
|
|
4
4
|
import { WORKSPACE_SYNC_V3_WORKFLOW_COVERAGE_PROFILE } from './workspaceSyncV3WorkflowCoverage.js';
|
|
5
5
|
import { WORKSPACE_SYNC_V3_PLANNING_ORDER_COVERAGE_PROFILE } from './workspaceSyncV3PlanningOrderCoverage.js';
|
|
6
|
+
import { WORKSPACE_SYNC_V3_TASK_COVER_COVERAGE_PROFILE } from './workspaceSyncV3TaskCoverCoverage.js';
|
|
6
7
|
import { type WorkspaceSyncV3FeedEntry } from './workspaceSyncV3Feed.js';
|
|
7
8
|
import { type WorkspaceSyncV3FeedCursorKeyring } from './workspaceSyncV3FeedCursorKeys.js';
|
|
8
9
|
export interface WorkspaceSyncV3CombinedRepairCursor {
|
|
@@ -21,7 +22,7 @@ export interface WorkspaceSyncV3CombinedRepairPage {
|
|
|
21
22
|
success: true;
|
|
22
23
|
protocolVersion: 3;
|
|
23
24
|
workspaceId: string;
|
|
24
|
-
coverage: typeof WORKSPACE_SYNC_V3_COMBINED_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_NESTED_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_WORKFLOW_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_PLANNING_ORDER_COVERAGE_PROFILE;
|
|
25
|
+
coverage: typeof WORKSPACE_SYNC_V3_COMBINED_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_NESTED_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_WORKFLOW_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_PLANNING_ORDER_COVERAGE_PROFILE | typeof WORKSPACE_SYNC_V3_TASK_COVER_COVERAGE_PROFILE;
|
|
25
26
|
snapshotId: string;
|
|
26
27
|
snapshotSequence: string;
|
|
27
28
|
expiresAt: string;
|
|
@@ -47,6 +48,8 @@ export declare function decodeWorkspaceSyncV3CombinedRepairCursor(raw: string |
|
|
|
47
48
|
export declare function decodeWorkspaceSyncV3NestedRepairCursor(raw: string | null | undefined, keyring: WorkspaceSyncV3FeedCursorKeyring): WorkspaceSyncV3CombinedRepairCursor | null;
|
|
48
49
|
export declare function decodeWorkspaceSyncV3WorkflowRepairCursor(raw: string | null | undefined, keyring: WorkspaceSyncV3FeedCursorKeyring): WorkspaceSyncV3CombinedRepairCursor | null;
|
|
49
50
|
export declare function decodeWorkspaceSyncV3PlanningOrderRepairCursor(raw: string | null | undefined, keyring: WorkspaceSyncV3FeedCursorKeyring): WorkspaceSyncV3CombinedRepairCursor | null;
|
|
51
|
+
export declare function decodeWorkspaceSyncV3TaskCoverRepairCursor(raw: string | null | undefined, keyring: WorkspaceSyncV3FeedCursorKeyring): WorkspaceSyncV3CombinedRepairCursor | null;
|
|
52
|
+
export declare const WORKSPACE_SYNC_REPAIR_SNAPSHOT_CLEANUP_BATCH_SIZE = 500;
|
|
50
53
|
export declare function buildWorkspaceSyncV3CombinedRepairPage(input: {
|
|
51
54
|
core: TaskforceCore;
|
|
52
55
|
workspaceId: string;
|
|
@@ -59,7 +62,10 @@ export declare function buildWorkspaceSyncV3CombinedRepairPage(input: {
|
|
|
59
62
|
nestedCoverage?: boolean;
|
|
60
63
|
workflowCoverage?: boolean;
|
|
61
64
|
planningOrderCoverage?: boolean;
|
|
65
|
+
taskCoverCoverage?: boolean;
|
|
66
|
+
coveredLegacyWritesFenced?: boolean;
|
|
62
67
|
}): WorkspaceSyncV3CombinedRepairPage;
|
|
63
|
-
export declare function buildWorkspaceSyncV3NestedRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
64
|
-
export declare function buildWorkspaceSyncV3WorkflowRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
65
|
-
export declare function buildWorkspaceSyncV3PlanningOrderRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
68
|
+
export declare function buildWorkspaceSyncV3NestedRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage' | 'taskCoverCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
69
|
+
export declare function buildWorkspaceSyncV3WorkflowRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage' | 'taskCoverCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
70
|
+
export declare function buildWorkspaceSyncV3PlanningOrderRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage' | 'taskCoverCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|
|
71
|
+
export declare function buildWorkspaceSyncV3TaskCoverRepairPage(input: Omit<Parameters<typeof buildWorkspaceSyncV3CombinedRepairPage>[0], 'nestedCoverage' | 'workflowCoverage' | 'planningOrderCoverage' | 'taskCoverCoverage'>): WorkspaceSyncV3CombinedRepairPage;
|