@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
|
@@ -33,7 +33,8 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
33
33
|
const excludedProjections = new Set(input.excludedProjections || []);
|
|
34
34
|
const commentsV3Owned = excludedProjections.has('task-comments/full-v1');
|
|
35
35
|
const checklistV3Owned = excludedProjections.has('task-checklist/full-v1');
|
|
36
|
-
const attachmentsV3Owned = excludedProjections.has('task-attachment-links/full-v1')
|
|
36
|
+
const attachmentsV3Owned = excludedProjections.has('task-attachment-links/full-v1')
|
|
37
|
+
|| excludedProjections.has('task-attachment-links/full-v2');
|
|
37
38
|
const suppressTaskCarriers = excludedProjections.has('task/root-v1')
|
|
38
39
|
&& commentsV3Owned && checklistV3Owned && attachmentsV3Owned;
|
|
39
40
|
const syncCursor = cursor ? { watermark: cursor.u, id: cursor.id } : null;
|
|
@@ -245,6 +246,14 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
245
246
|
workstream
|
|
246
247
|
}))
|
|
247
248
|
.filter((entry) => Number.isFinite(Date.parse(entry.watermark)) && entry.workstream.id.length > 0);
|
|
249
|
+
const planningIdentityEntries = readSnapshot('planning-identities', [], () => core.listPlanningEntityIdentities(workspaceId))
|
|
250
|
+
.map((identity) => ({
|
|
251
|
+
kind: 'planning-identity',
|
|
252
|
+
watermark: String(identity.updatedAt || '').trim(),
|
|
253
|
+
sortId: `planning-identity:${identity.entityType}:${identity.entityId}`,
|
|
254
|
+
identity,
|
|
255
|
+
}))
|
|
256
|
+
.filter((entry) => Number.isFinite(Date.parse(entry.watermark)) && entry.identity.entityId.length > 0);
|
|
248
257
|
const aiProfileEntries = readSnapshot('ai-profiles', [], () => core.listAiProfiles(workspaceId, { includeArchived: true }))
|
|
249
258
|
.map((profile) => ({
|
|
250
259
|
kind: 'ai-profile',
|
|
@@ -469,6 +478,7 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
469
478
|
...taxonomyEntries,
|
|
470
479
|
...initiativeEntries,
|
|
471
480
|
...workstreamEntries,
|
|
481
|
+
...planningIdentityEntries,
|
|
472
482
|
...aiProfileEntries,
|
|
473
483
|
...documentEntries,
|
|
474
484
|
...documentDeleteEntries,
|
|
@@ -568,171 +578,173 @@ export async function buildWorkspacePullFeed(input) {
|
|
|
568
578
|
? [{ op: 'initiative-upsert', initiative: entry.initiative, watermark: entry.watermark }]
|
|
569
579
|
: entry.kind === 'workstream'
|
|
570
580
|
? [{ op: 'workstream-upsert', workstream: entry.workstream, watermark: entry.watermark }]
|
|
571
|
-
: entry.kind === '
|
|
572
|
-
? [{ op: '
|
|
573
|
-
: entry.kind === '
|
|
574
|
-
? [{ op: '
|
|
575
|
-
: entry.kind === 'document-review-session
|
|
576
|
-
? [{ op: 'document-review-session-
|
|
577
|
-
: entry.kind === 'document-review-
|
|
578
|
-
? [{ op: 'document-review-
|
|
579
|
-
: entry.kind === 'document-review-comment
|
|
580
|
-
? [{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
: entry.kind === 'annotated-attachment-session
|
|
590
|
-
? [{ op: 'annotated-attachment-session-
|
|
591
|
-
: entry.kind === '
|
|
592
|
-
? [{ op: '
|
|
593
|
-
: entry.kind === 'agent
|
|
594
|
-
? [{ op: 'agent-
|
|
595
|
-
: entry.kind === '
|
|
596
|
-
? [{ op: '
|
|
597
|
-
: entry.kind === 'agent-
|
|
598
|
-
? [{ op: 'agent-
|
|
599
|
-
: entry.kind === '
|
|
600
|
-
? [{ op: '
|
|
601
|
-
: entry.kind === '
|
|
602
|
-
? [{ op: '
|
|
603
|
-
: entry.kind === '
|
|
604
|
-
?
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
sha256: entry.contentSha256,
|
|
629
|
-
sizeBytes: entry.sizeBytes,
|
|
630
|
-
updatedAt: entry.watermark,
|
|
631
|
-
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
581
|
+
: entry.kind === 'planning-identity'
|
|
582
|
+
? [{ op: 'planning-identity-upsert', identity: entry.identity, watermark: entry.watermark }]
|
|
583
|
+
: entry.kind === 'ai-profile'
|
|
584
|
+
? [{ op: 'ai-profile-upsert', profile: entry.profile, watermark: entry.watermark }]
|
|
585
|
+
: entry.kind === 'document-review-session'
|
|
586
|
+
? [{ op: 'document-review-session-upsert', session: entry.session, watermark: entry.watermark }]
|
|
587
|
+
: entry.kind === 'document-review-session-delete'
|
|
588
|
+
? [{ op: 'document-review-session-delete', sessionId: entry.sessionId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
589
|
+
: entry.kind === 'document-review-comment'
|
|
590
|
+
? [{ op: 'document-review-comment-upsert', comment: entry.comment, watermark: entry.watermark }]
|
|
591
|
+
: entry.kind === 'document-review-comment-delete'
|
|
592
|
+
? [{
|
|
593
|
+
op: 'document-review-comment-delete',
|
|
594
|
+
commentId: entry.commentId,
|
|
595
|
+
deletedAt: entry.watermark,
|
|
596
|
+
deletedByActorId: entry.deletedByActorId,
|
|
597
|
+
watermark: entry.watermark,
|
|
598
|
+
}]
|
|
599
|
+
: entry.kind === 'annotated-attachment-session'
|
|
600
|
+
? [{ op: 'annotated-attachment-session-upsert', session: entry.session, watermark: entry.watermark }]
|
|
601
|
+
: entry.kind === 'annotated-attachment-session-delete'
|
|
602
|
+
? [{ op: 'annotated-attachment-session-delete', sessionId: entry.sessionId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
603
|
+
: entry.kind === 'taskforce-agent'
|
|
604
|
+
? [{ op: 'taskforce-agent-upsert', agent: entry.agent, watermark: entry.watermark }]
|
|
605
|
+
: entry.kind === 'agent-role'
|
|
606
|
+
? [{ op: 'agent-role-upsert', role: entry.role, watermark: entry.watermark }]
|
|
607
|
+
: entry.kind === 'taskforce-agent-skill'
|
|
608
|
+
? [{ op: 'taskforce-agent-skill-upsert', skill: entry.skill, watermark: entry.watermark }]
|
|
609
|
+
: entry.kind === 'agent-conversation'
|
|
610
|
+
? [{ op: 'agent-conversation-upsert', conversation: entry.conversation, watermark: entry.watermark }]
|
|
611
|
+
: entry.kind === 'task-event'
|
|
612
|
+
? [{ op: 'task-event-upsert', event: entry.event, watermark: entry.watermark }]
|
|
613
|
+
: entry.kind === 'entity-event'
|
|
614
|
+
? [{ op: 'entity-event-upsert', event: entry.event, watermark: entry.watermark }]
|
|
615
|
+
: entry.kind === 'document'
|
|
616
|
+
? (() => {
|
|
617
|
+
if (contentMode === 'manifest'
|
|
618
|
+
|| isHydrationMissing(entry)
|
|
619
|
+
|| isContentUnavailable(entry)) {
|
|
620
|
+
const metadata = {
|
|
621
|
+
assetId: entry.assetId,
|
|
622
|
+
documentId: entry.documentId,
|
|
623
|
+
referenceNumber: entry.referenceNumber,
|
|
624
|
+
version: entry.version,
|
|
625
|
+
taskId: entry.taskId,
|
|
626
|
+
linkTargetType: entry.linkTargetType,
|
|
627
|
+
linkTargetId: entry.linkTargetId,
|
|
628
|
+
logicalName: entry.logicalName,
|
|
629
|
+
caption: entry.caption,
|
|
630
|
+
originalFilename: entry.originalFilename,
|
|
631
|
+
linkRole: entry.linkRole,
|
|
632
|
+
links: entry.links,
|
|
633
|
+
};
|
|
634
|
+
return [{
|
|
635
|
+
op: 'document-manifest',
|
|
636
|
+
manifest: {
|
|
637
|
+
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
632
638
|
kind: 'document',
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
+
path: entry.path,
|
|
640
|
+
sha256: entry.contentSha256,
|
|
641
|
+
sizeBytes: entry.sizeBytes,
|
|
642
|
+
updatedAt: entry.watermark,
|
|
643
|
+
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
644
|
+
kind: 'document',
|
|
645
|
+
metadata,
|
|
646
|
+
}),
|
|
647
|
+
existsLocally: entry.contentAvailable,
|
|
648
|
+
},
|
|
649
|
+
metadata,
|
|
650
|
+
watermark: entry.watermark,
|
|
651
|
+
}];
|
|
652
|
+
}
|
|
653
|
+
const payload = hydratedDocuments.get(entry.path);
|
|
654
|
+
if (!payload)
|
|
655
|
+
return [];
|
|
656
|
+
return [{
|
|
657
|
+
op: 'document-upsert',
|
|
658
|
+
path: entry.path,
|
|
659
|
+
updatedAt: entry.watermark,
|
|
660
|
+
content: payload.content,
|
|
661
|
+
assetId: payload.assetId,
|
|
662
|
+
documentId: payload.documentId,
|
|
663
|
+
referenceNumber: payload.referenceNumber,
|
|
664
|
+
version: payload.version,
|
|
665
|
+
taskId: payload.taskId,
|
|
666
|
+
linkTargetType: payload.linkTargetType,
|
|
667
|
+
linkTargetId: payload.linkTargetId,
|
|
668
|
+
logicalName: payload.logicalName,
|
|
669
|
+
caption: payload.caption,
|
|
670
|
+
originalFilename: payload.originalFilename,
|
|
671
|
+
linkRole: payload.linkRole === 'reference' ? 'reference' : 'attachment',
|
|
672
|
+
...(payload.links ? { links: payload.links } : {}),
|
|
673
|
+
watermark: entry.watermark
|
|
639
674
|
}];
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
: entry.kind === 'asset'
|
|
667
|
-
? (() => {
|
|
668
|
-
if (contentMode === 'manifest'
|
|
669
|
-
|| isHydrationMissing(entry)
|
|
670
|
-
|| isContentUnavailable(entry)) {
|
|
671
|
-
const metadata = {
|
|
672
|
-
assetId: entry.assetId,
|
|
673
|
-
assetKind: entry.kindValue,
|
|
674
|
-
mimeType: entry.mimeType,
|
|
675
|
-
referenceNumber: entry.referenceNumber,
|
|
676
|
-
taskId: entry.taskId,
|
|
677
|
-
linkTargetType: entry.linkTargetType,
|
|
678
|
-
linkTargetId: entry.linkTargetId,
|
|
679
|
-
logicalName: entry.logicalName,
|
|
680
|
-
caption: entry.caption,
|
|
681
|
-
originalFilename: entry.originalFilename,
|
|
682
|
-
linkRole: entry.linkRole,
|
|
683
|
-
links: entry.links,
|
|
684
|
-
};
|
|
685
|
-
return [{
|
|
686
|
-
op: 'asset-manifest',
|
|
687
|
-
manifest: {
|
|
688
|
-
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
689
|
-
kind: 'asset',
|
|
690
|
-
path: entry.path,
|
|
691
|
-
sha256: entry.contentSha256,
|
|
692
|
-
sizeBytes: entry.sizeBytes,
|
|
693
|
-
updatedAt: entry.watermark,
|
|
694
|
-
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
675
|
+
})()
|
|
676
|
+
: entry.kind === 'document-delete'
|
|
677
|
+
? [{ op: 'document-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
678
|
+
: entry.kind === 'asset'
|
|
679
|
+
? (() => {
|
|
680
|
+
if (contentMode === 'manifest'
|
|
681
|
+
|| isHydrationMissing(entry)
|
|
682
|
+
|| isContentUnavailable(entry)) {
|
|
683
|
+
const metadata = {
|
|
684
|
+
assetId: entry.assetId,
|
|
685
|
+
assetKind: entry.kindValue,
|
|
686
|
+
mimeType: entry.mimeType,
|
|
687
|
+
referenceNumber: entry.referenceNumber,
|
|
688
|
+
taskId: entry.taskId,
|
|
689
|
+
linkTargetType: entry.linkTargetType,
|
|
690
|
+
linkTargetId: entry.linkTargetId,
|
|
691
|
+
logicalName: entry.logicalName,
|
|
692
|
+
caption: entry.caption,
|
|
693
|
+
originalFilename: entry.originalFilename,
|
|
694
|
+
linkRole: entry.linkRole,
|
|
695
|
+
links: entry.links,
|
|
696
|
+
};
|
|
697
|
+
return [{
|
|
698
|
+
op: 'asset-manifest',
|
|
699
|
+
manifest: {
|
|
700
|
+
manifestVersion: WORKSPACE_CONTENT_MANIFEST_VERSION,
|
|
695
701
|
kind: 'asset',
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
+
path: entry.path,
|
|
703
|
+
sha256: entry.contentSha256,
|
|
704
|
+
sizeBytes: entry.sizeBytes,
|
|
705
|
+
updatedAt: entry.watermark,
|
|
706
|
+
metadataFingerprint: createWorkspaceContentMetadataFingerprintV1({
|
|
707
|
+
kind: 'asset',
|
|
708
|
+
metadata,
|
|
709
|
+
}),
|
|
710
|
+
existsLocally: entry.contentAvailable,
|
|
711
|
+
},
|
|
712
|
+
metadata,
|
|
713
|
+
watermark: entry.watermark,
|
|
714
|
+
}];
|
|
715
|
+
}
|
|
716
|
+
const payload = hydratedAssets.get(entry.path);
|
|
717
|
+
if (!payload)
|
|
718
|
+
return [];
|
|
719
|
+
return [{
|
|
720
|
+
op: 'asset-upsert',
|
|
721
|
+
path: entry.path,
|
|
722
|
+
updatedAt: entry.watermark,
|
|
723
|
+
contentBase64: payload.contentBase64,
|
|
724
|
+
assetId: payload.assetId,
|
|
725
|
+
kind: payload.kind,
|
|
726
|
+
mimeType: payload.mimeType,
|
|
727
|
+
referenceNumber: payload.referenceNumber,
|
|
728
|
+
taskId: payload.taskId,
|
|
729
|
+
linkTargetType: payload.linkTargetType,
|
|
730
|
+
linkTargetId: payload.linkTargetId,
|
|
731
|
+
logicalName: payload.logicalName,
|
|
732
|
+
caption: payload.caption,
|
|
733
|
+
originalFilename: payload.originalFilename,
|
|
734
|
+
linkRole: payload.linkRole,
|
|
735
|
+
...(payload.links ? { links: payload.links } : {}),
|
|
736
|
+
watermark: entry.watermark
|
|
702
737
|
}];
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
kind: payload.kind,
|
|
714
|
-
mimeType: payload.mimeType,
|
|
715
|
-
referenceNumber: payload.referenceNumber,
|
|
716
|
-
taskId: payload.taskId,
|
|
717
|
-
linkTargetType: payload.linkTargetType,
|
|
718
|
-
linkTargetId: payload.linkTargetId,
|
|
719
|
-
logicalName: payload.logicalName,
|
|
720
|
-
caption: payload.caption,
|
|
721
|
-
originalFilename: payload.originalFilename,
|
|
722
|
-
linkRole: payload.linkRole,
|
|
723
|
-
...(payload.links ? { links: payload.links } : {}),
|
|
724
|
-
watermark: entry.watermark
|
|
725
|
-
}];
|
|
726
|
-
})()
|
|
727
|
-
: entry.kind === 'asset-delete'
|
|
728
|
-
? [{ op: 'asset-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
729
|
-
: [{
|
|
730
|
-
op: 'upsert',
|
|
731
|
-
task: entry.task,
|
|
732
|
-
archived: Boolean(entry.archived),
|
|
733
|
-
...(entry.durableRevision ? { durableRevision: entry.durableRevision } : {}),
|
|
734
|
-
watermark: entry.watermark,
|
|
735
|
-
}]));
|
|
738
|
+
})()
|
|
739
|
+
: entry.kind === 'asset-delete'
|
|
740
|
+
? [{ op: 'asset-delete', path: entry.path, assetId: entry.assetId, deletedAt: entry.watermark, watermark: entry.watermark }]
|
|
741
|
+
: [{
|
|
742
|
+
op: 'upsert',
|
|
743
|
+
task: entry.task,
|
|
744
|
+
archived: Boolean(entry.archived),
|
|
745
|
+
...(entry.durableRevision ? { durableRevision: entry.durableRevision } : {}),
|
|
746
|
+
watermark: entry.watermark,
|
|
747
|
+
}]));
|
|
736
748
|
let pageBytes = Buffer.byteLength(JSON.stringify({ workspaceId, changes: [], workspaceMembers }), 'utf8');
|
|
737
749
|
let includedEntryCount = 0;
|
|
738
750
|
let includedChangeCount = 0;
|
|
@@ -22,6 +22,7 @@ export interface WorkspaceRepairManifestDocumentEntry {
|
|
|
22
22
|
sha256: string;
|
|
23
23
|
sizeBytes: number;
|
|
24
24
|
existsLocally: boolean;
|
|
25
|
+
contentCheckReliable: boolean;
|
|
25
26
|
source: 'metadata' | 'filesystem';
|
|
26
27
|
publicationState: 'legacy' | 'versioned' | 'deleted' | 'invalid';
|
|
27
28
|
publicationError: string | null;
|
|
@@ -36,6 +37,7 @@ export interface WorkspaceRepairManifestAssetEntry {
|
|
|
36
37
|
sha256: string;
|
|
37
38
|
sizeBytes: number;
|
|
38
39
|
existsLocally: boolean;
|
|
40
|
+
contentCheckReliable: boolean;
|
|
39
41
|
source: 'metadata' | 'filesystem';
|
|
40
42
|
publicationState: 'legacy' | 'versioned' | 'deleted' | 'invalid';
|
|
41
43
|
publicationError: string | null;
|
|
@@ -103,4 +105,5 @@ export declare function scanWorkspaceRepair(input: WorkspaceRepairInput): Worksp
|
|
|
103
105
|
export declare function applyWorkspaceRepair(input: WorkspaceRepairInput & {
|
|
104
106
|
upsertDocumentWatermark: (workspaceId: string, path: string, contentHash: string, updatedAt: string) => void;
|
|
105
107
|
repairMissingAssetLinks?: boolean;
|
|
108
|
+
repairMissingContentFiles?: boolean;
|
|
106
109
|
}): WorkspaceRepairApplyResult;
|
|
@@ -44,6 +44,14 @@ function collectFiles(dirPath, predicate) {
|
|
|
44
44
|
visit(root);
|
|
45
45
|
return output;
|
|
46
46
|
}
|
|
47
|
+
function isStorageRootAccessible(basePath) {
|
|
48
|
+
try {
|
|
49
|
+
return fs.statSync(basePath).isDirectory();
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
47
55
|
function readFileFingerprint(absolutePath) {
|
|
48
56
|
try {
|
|
49
57
|
const stat = fs.statSync(absolutePath);
|
|
@@ -145,6 +153,7 @@ function buildManifestEntriesFromMetadata(tenantId, workspaceId, store, basePath
|
|
|
145
153
|
const assetDeletes = [];
|
|
146
154
|
const protectedDocumentPaths = new Set();
|
|
147
155
|
const protectedAssetPaths = new Set();
|
|
156
|
+
const storageRootAccessible = isStorageRootAccessible(basePath);
|
|
148
157
|
const metadataEntries = store.listAllByWorkspace(workspaceId, { includeDeleted: true });
|
|
149
158
|
for (const entry of metadataEntries) {
|
|
150
159
|
const contentKind = entry.kind === 'document' ? 'document' : 'asset';
|
|
@@ -192,6 +201,7 @@ function buildManifestEntriesFromMetadata(tenantId, workspaceId, store, basePath
|
|
|
192
201
|
? resolveStorageKeyPathInsideRoot(basePath, published.physicalKey)
|
|
193
202
|
: null;
|
|
194
203
|
let existsLocally = false;
|
|
204
|
+
let contentCheckReliable = true;
|
|
195
205
|
if (!supportsPublishedContent) {
|
|
196
206
|
existsLocally = true;
|
|
197
207
|
}
|
|
@@ -200,13 +210,23 @@ function buildManifestEntriesFromMetadata(tenantId, workspaceId, store, basePath
|
|
|
200
210
|
existsLocally = true;
|
|
201
211
|
}
|
|
202
212
|
else if (physicalPath) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
catch {
|
|
213
|
+
if (!storageRootAccessible) {
|
|
214
|
+
// The storage root itself couldn't be verified (e.g. an unmounted volume or
|
|
215
|
+
// transient I/O failure) — every local file would look "missing" in that state,
|
|
216
|
+
// so don't let a whole-root outage masquerade as N individual deletions.
|
|
209
217
|
existsLocally = false;
|
|
218
|
+
contentCheckReliable = false;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
try {
|
|
222
|
+
const stat = fs.statSync(physicalPath);
|
|
223
|
+
existsLocally = stat.isFile()
|
|
224
|
+
&& (published.source !== 'versioned' || stat.size === published.sizeBytes);
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
existsLocally = false;
|
|
228
|
+
contentCheckReliable = error?.code === 'ENOENT';
|
|
229
|
+
}
|
|
210
230
|
}
|
|
211
231
|
}
|
|
212
232
|
}
|
|
@@ -231,6 +251,7 @@ function buildManifestEntriesFromMetadata(tenantId, workspaceId, store, basePath
|
|
|
231
251
|
sha256: contentSha256,
|
|
232
252
|
sizeBytes,
|
|
233
253
|
existsLocally,
|
|
254
|
+
contentCheckReliable,
|
|
234
255
|
source: 'metadata',
|
|
235
256
|
publicationState,
|
|
236
257
|
publicationError,
|
|
@@ -249,6 +270,7 @@ function buildManifestEntriesFromMetadata(tenantId, workspaceId, store, basePath
|
|
|
249
270
|
sha256: contentSha256,
|
|
250
271
|
sizeBytes,
|
|
251
272
|
existsLocally,
|
|
273
|
+
contentCheckReliable,
|
|
252
274
|
source: 'metadata',
|
|
253
275
|
publicationState,
|
|
254
276
|
publicationError,
|
|
@@ -307,6 +329,7 @@ export function buildWorkspaceRepairManifest(input) {
|
|
|
307
329
|
sha256: fingerprint.sha256,
|
|
308
330
|
sizeBytes: fingerprint.sizeBytes,
|
|
309
331
|
existsLocally: true,
|
|
332
|
+
contentCheckReliable: true,
|
|
310
333
|
source: 'filesystem',
|
|
311
334
|
publicationState: 'legacy',
|
|
312
335
|
publicationError: null,
|
|
@@ -337,6 +360,7 @@ export function buildWorkspaceRepairManifest(input) {
|
|
|
337
360
|
sha256: fingerprint.sha256,
|
|
338
361
|
sizeBytes: fingerprint.sizeBytes,
|
|
339
362
|
existsLocally: true,
|
|
363
|
+
contentCheckReliable: true,
|
|
340
364
|
source: 'filesystem',
|
|
341
365
|
publicationState: 'legacy',
|
|
342
366
|
publicationError: null,
|
|
@@ -466,6 +490,19 @@ export function scanWorkspaceRepair(input) {
|
|
|
466
490
|
continue;
|
|
467
491
|
}
|
|
468
492
|
if (!document.existsLocally) {
|
|
493
|
+
if (!document.contentCheckReliable) {
|
|
494
|
+
issues.push({
|
|
495
|
+
code: 'invalid_published_document_content',
|
|
496
|
+
entityKind: 'document',
|
|
497
|
+
path: document.path,
|
|
498
|
+
assetId: document.assetId,
|
|
499
|
+
taskId: document.taskId,
|
|
500
|
+
repairable: false,
|
|
501
|
+
recommendedAction: 'inspect-published-content',
|
|
502
|
+
detail: 'Local document file could not be confirmed missing — the storage root was unreachable or the check was inconclusive. Skipped to avoid converting unavailable content into an authoritative deletion.'
|
|
503
|
+
});
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
469
506
|
issues.push({
|
|
470
507
|
code: 'missing_document_file',
|
|
471
508
|
entityKind: 'document',
|
|
@@ -564,6 +601,19 @@ export function scanWorkspaceRepair(input) {
|
|
|
564
601
|
if (!asset.existsLocally) {
|
|
565
602
|
if (protectedAiAvatarAssetPaths.has(asset.path))
|
|
566
603
|
continue;
|
|
604
|
+
if (!asset.contentCheckReliable) {
|
|
605
|
+
issues.push({
|
|
606
|
+
code: 'invalid_published_asset_content',
|
|
607
|
+
entityKind: 'asset',
|
|
608
|
+
path: asset.path,
|
|
609
|
+
assetId: asset.assetId,
|
|
610
|
+
taskId: asset.taskId,
|
|
611
|
+
repairable: false,
|
|
612
|
+
recommendedAction: 'inspect-published-content',
|
|
613
|
+
detail: 'Local asset file could not be confirmed missing — the storage root was unreachable or the check was inconclusive. Skipped to avoid converting unavailable content into an authoritative deletion.'
|
|
614
|
+
});
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
567
617
|
issues.push({
|
|
568
618
|
code: 'missing_asset_file',
|
|
569
619
|
entityKind: 'asset',
|
|
@@ -791,6 +841,17 @@ export function applyWorkspaceRepair(input) {
|
|
|
791
841
|
continue;
|
|
792
842
|
}
|
|
793
843
|
if ((issue.code === 'missing_document_file' || issue.code === 'missing_asset_file') && issue.assetId) {
|
|
844
|
+
if (input.repairMissingContentFiles !== true) {
|
|
845
|
+
actionsApplied.push({
|
|
846
|
+
code: issue.code,
|
|
847
|
+
path: issue.path,
|
|
848
|
+
assetId: issue.assetId,
|
|
849
|
+
action: issue.recommendedAction,
|
|
850
|
+
status: 'skipped',
|
|
851
|
+
detail: 'Missing content file repair requires explicit admin confirmation, since a single failed existence check can also mean the content is temporarily unavailable rather than deleted.'
|
|
852
|
+
});
|
|
853
|
+
continue;
|
|
854
|
+
}
|
|
794
855
|
const updated = input.workspaceAssetStore.markDeleted(issue.assetId, workspaceId);
|
|
795
856
|
actionsApplied.push({
|
|
796
857
|
code: issue.code,
|
|
@@ -11,6 +11,7 @@ import type { WorkspaceAssetSyncLinkPayload } from './contentSyncPayload.js';
|
|
|
11
11
|
import type { WorkspaceAssetManifestMetadata, WorkspaceContentManifestEntry, WorkspaceDocumentManifestMetadata } from './workspaceContentManifest.js';
|
|
12
12
|
import type { TaskRelationshipRecord } from '../core/Taskforce.js';
|
|
13
13
|
import type { AgentConfigurationIssue, AgentConfigurationState } from '../shared/taskforceAgentDefinition.js';
|
|
14
|
+
import type { PlanningIdentityColor, PlanningIdentityEntityType, PlanningIdentityIcon } from '../shared/planningIdentity.js';
|
|
14
15
|
export type WorkspaceSyncTaskSnapshot = TaskSyncPayload;
|
|
15
16
|
export interface WorkspaceSyncTaskDelete {
|
|
16
17
|
taskId: string;
|
|
@@ -246,6 +247,13 @@ export interface WorkspaceSyncWorkstreamSnapshot {
|
|
|
246
247
|
isArchived?: boolean;
|
|
247
248
|
durableRevision?: WorkspaceSyncDurablePlanningRevision<'workstream'>;
|
|
248
249
|
}
|
|
250
|
+
export interface WorkspaceSyncPlanningIdentitySnapshot {
|
|
251
|
+
entityType: PlanningIdentityEntityType;
|
|
252
|
+
entityId: string;
|
|
253
|
+
icon: PlanningIdentityIcon | null;
|
|
254
|
+
color: PlanningIdentityColor | null;
|
|
255
|
+
updatedAt: string;
|
|
256
|
+
}
|
|
249
257
|
export type WorkspaceSyncPlanningComment = CanonicalPlanningComment;
|
|
250
258
|
export type WorkspaceSyncPlanningDomain = 'initiative' | 'workstream';
|
|
251
259
|
export type WorkspaceSyncPlanningMutationKind = 'create' | 'metadata-update' | 'append-comment' | 'archive' | 'unarchive';
|
|
@@ -300,6 +308,9 @@ export type WorkspaceSyncChange = {
|
|
|
300
308
|
} | {
|
|
301
309
|
op: 'workstream-upsert';
|
|
302
310
|
workstream: WorkspaceSyncWorkstreamSnapshot;
|
|
311
|
+
} | {
|
|
312
|
+
op: 'planning-identity-upsert';
|
|
313
|
+
identity: WorkspaceSyncPlanningIdentitySnapshot;
|
|
303
314
|
} | {
|
|
304
315
|
op: 'taxonomy-upsert';
|
|
305
316
|
taxonomies?: unknown[];
|