@taskforcehq/taskforce 0.3.328 → 0.3.330
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 +523 -79
- 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/features/AiProfilesModule.js +3 -5
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +24 -8
- package/dist/components/features/TaskSettings.d.ts +12 -1
- package/dist/components/features/TaskSettings.js +217 -54
- package/dist/components/features/TaskforceAgentsModule.d.ts +1 -2
- package/dist/components/features/TaskforceAgentsModule.js +586 -116
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +1 -1
- package/dist/components/features/agentConnections/AgentConnectionControl.d.ts +15 -0
- package/dist/components/features/agentConnections/AgentConnectionControl.js +125 -0
- package/dist/components/features/agentConnections/ModelConnectionsPanel.d.ts +18 -0
- package/dist/components/features/agentConnections/ModelConnectionsPanel.js +393 -0
- package/dist/components/features/agentConnections/modelConnectionsApi.d.ts +65 -0
- package/dist/components/features/agentConnections/modelConnectionsApi.js +129 -0
- package/dist/components/features/planning/PlanningModule.js +2 -5
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +1 -1
- package/dist/components/features/planning/PlanningTaskOrderList.js +17 -6
- package/dist/components/features/planning/planningTaskArrangement.d.ts +1 -0
- package/dist/components/features/planning/planningTaskArrangement.js +5 -5
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +15 -24
- package/dist/components/features/taskforceAgentEditorModel.d.ts +2 -1
- package/dist/components/features/taskforceAgentEditorModel.js +5 -1
- package/dist/components/features/workflowManager/workflowManagerApi.d.ts +1 -1
- package/dist/components/features/workflowManager/workflowManagerApi.js +3 -0
- package/dist/components/task/TaskCard.d.ts +5 -0
- package/dist/components/task/TaskCard.js +65 -10
- package/dist/components/task/TaskImageReviews.js +14 -5
- 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/TaskWorkflowAssignmentField.js +68 -10
- package/dist/components/ui/PasswordInput.d.ts +6 -0
- package/dist/components/ui/PasswordInput.js +11 -0
- 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 +32 -55
- package/dist/components/views/WidgetView.js +3 -3
- package/dist/components/views/panels/PlanningDrawer.js +5 -12
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +26 -17
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +4 -3
- package/dist/components/views/standalone/modals/SyncStatusModal.js +33 -38
- package/dist/config/envSchema.js +60 -1
- package/dist/config/localServiceRuntimeContract.d.ts +13 -0
- package/dist/config/localServiceRuntimeContract.js +135 -0
- package/dist/core/AiProfileService.js +46 -8
- package/dist/core/DeletedTaskLifecycleService.d.ts +1 -0
- package/dist/core/DeletedTaskLifecycleService.js +37 -6
- package/dist/core/McpTokenService.d.ts +23 -1
- package/dist/core/McpTokenService.js +93 -10
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +3 -2
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +33 -9
- package/dist/core/TaskChecklistCommandService.d.ts +27 -0
- package/dist/core/TaskChecklistCommandService.js +83 -5
- package/dist/core/TaskLifecycleCommandService.d.ts +3 -1
- package/dist/core/TaskLifecycleCommandService.js +6 -2
- package/dist/core/Taskforce.d.ts +94 -2
- package/dist/core/Taskforce.js +760 -36
- package/dist/core/types.d.ts +14 -0
- package/dist/documentReviews/commandService.d.ts +2 -1
- package/dist/documentReviews/commandService.js +6 -3
- package/dist/hooks/sync/orchestratorShared.d.ts +1 -0
- package/dist/hooks/sync/orchestratorShared.js +2 -0
- 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/sync/useLocalSyncCoordinatorSnapshot.d.ts +3 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +85 -9
- package/dist/hooks/sync/useSyncStatusControls.d.ts +4 -1
- package/dist/hooks/sync/useSyncStatusControls.js +47 -11
- 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 +6 -0
- package/dist/hooks/tasks/useTaskFormActions.js +65 -12
- 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/useSyncOrchestrator.d.ts +3 -0
- package/dist/hooks/useSyncOrchestrator.js +111 -2
- package/dist/hooks/useTaskData.d.ts +40 -1
- package/dist/hooks/useTaskData.js +240 -9
- package/dist/hooks/useTaskMutations.d.ts +12 -2
- package/dist/hooks/useTaskMutations.js +266 -52
- package/dist/hooks/useTaskforce.d.ts +39 -9
- package/dist/hooks/useTaskforce.js +359 -40
- 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/clientRegistry.d.ts +2 -2
- package/dist/mcp/clientRegistry.js +1 -1
- package/dist/mcp/documentAssetRegistrar.js +53 -41
- package/dist/mcp/documentHelpers.d.ts +1 -0
- package/dist/mcp/documentHelpers.js +7 -3
- package/dist/mcp/durableTaskMutationRouter.d.ts +4 -1
- package/dist/mcp/durableTaskMutationRouter.js +10 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.js +4 -0
- package/dist/mcp/httpProtocolRouting.d.ts +10 -0
- package/dist/mcp/httpProtocolRouting.js +19 -0
- package/dist/mcp/localCliHealth.d.ts +2 -2
- package/dist/mcp/localCliHealth.js +2 -2
- package/dist/mcp/localServiceProxy.d.ts +1 -0
- package/dist/mcp/localServiceProxy.js +530 -68
- package/dist/mcp/planningAttachmentCommandAdapter.d.ts +3 -1
- package/dist/mcp/planningAttachmentCommandAdapter.js +20 -2
- package/dist/mcp/runtime.d.ts +54 -79
- package/dist/mcp/runtime.js +556 -139
- package/dist/mcp/taskPlanningRegistrar.js +64 -42
- package/dist/mcp/toolCallCompatibility.js +38 -1
- package/dist/mcp/toolCatalog.d.ts +1 -0
- package/dist/mcp/toolProfiles.d.ts +2 -0
- package/dist/mcp/toolProfiles.js +10 -0
- package/dist/mcp/toolRegistry.d.ts +1 -0
- package/dist/mcp/toolRegistry.js +1 -0
- package/dist/mcp/workflowExecutionRegistrar.js +4 -4
- package/dist/migrations/taskSchemaMigrations.d.ts +5 -0
- package/dist/migrations/taskSchemaMigrations.js +427 -0
- package/dist/runtime/appGateDefinitions.d.ts +30 -6
- package/dist/runtime/appGateDefinitions.js +6 -6
- package/dist/runtime/appGates.d.ts +13 -13
- package/dist/runtime/appGates.js +36 -13
- package/dist/runtime/nodeAppGates.d.ts +8 -0
- package/dist/runtime/nodeAppGates.js +27 -0
- package/dist/server/cloudCollectionRead.d.ts +1 -1
- package/dist/server/cloudCollectionRead.js +2 -2
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +123 -14
- package/dist/server/localDatabaseIdentity.js +4 -1
- package/dist/server/localServiceLease.d.ts +3 -0
- package/dist/server/localServiceLease.js +11 -2
- package/dist/server/localServiceSessions.d.ts +14 -17
- package/dist/server/localServiceSessions.js +308 -94
- package/dist/server/localWorkspaceSyncServerRuntime.js +12 -7
- 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.d.ts +4 -0
- package/dist/server/routes/admin.js +113 -3
- package/dist/server/routes/agentRoles.js +3 -2
- package/dist/server/routes/agentSkills.js +3 -2
- package/dist/server/routes/agents.d.ts +7 -0
- package/dist/server/routes/agents.js +394 -39
- package/dist/server/routes/annotatedAttachments.js +3 -2
- package/dist/server/routes/auth.js +3 -1
- package/dist/server/routes/billing.js +5 -1
- package/dist/server/routes/durableTaskHttpRouters.d.ts +11 -2
- package/dist/server/routes/executorPhaseAApprovals.d.ts +19 -0
- package/dist/server/routes/executorPhaseAApprovals.js +140 -0
- package/dist/server/routes/executorPhaseAIssuerRedemptions.d.ts +11 -0
- package/dist/server/routes/executorPhaseAIssuerRedemptions.js +24 -0
- package/dist/server/routes/githubReviewEvidence.d.ts +19 -0
- package/dist/server/routes/githubReviewEvidence.js +116 -0
- package/dist/server/routes/localService.d.ts +15 -4
- package/dist/server/routes/localService.js +138 -40
- package/dist/server/routes/modelConnections.d.ts +24 -0
- package/dist/server/routes/modelConnections.js +205 -0
- package/dist/server/routes/primitives.d.ts +2 -0
- package/dist/server/routes/shared.d.ts +19 -0
- package/dist/server/routes/shared.js +95 -19
- package/dist/server/routes/sync.js +1 -0
- package/dist/server/routes/syncAuxRoutes.js +9 -2
- package/dist/server/routes/syncPullApplyRoutes.js +23 -4
- package/dist/server/routes/syncPushRoutes.d.ts +1 -0
- package/dist/server/routes/syncPushRoutes.js +1 -0
- package/dist/server/routes/syncV3FeedRoutes.js +27 -16
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +28 -2
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +1 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +26 -0
- package/dist/server/routes/syncV3OperationRoutes.js +45 -9
- package/dist/server/routes/tasks.js +124 -13
- package/dist/server/routes/workflows.js +9 -1
- package/dist/server/routes/workspaces.js +43 -1
- package/dist/server/routes.js +59 -0
- package/dist/server/workspaceDeletionAdmission.d.ts +23 -0
- package/dist/server/workspaceDeletionAdmission.js +50 -0
- package/dist/service/localServiceCli.js +16 -0
- package/dist/service/localServiceClientLifecycle.js +36 -10
- package/dist/services/codexAppServerModelGateway.d.ts +161 -0
- package/dist/services/codexAppServerModelGateway.js +663 -0
- package/dist/services/codexDeviceCodeLoginManager.d.ts +39 -0
- package/dist/services/codexDeviceCodeLoginManager.js +265 -0
- package/dist/services/codexModelProviderConnectionLifecycle.d.ts +8 -0
- package/dist/services/codexModelProviderConnectionLifecycle.js +73 -0
- package/dist/services/executorPhaseAApprovalRuntime.d.ts +14 -0
- package/dist/services/executorPhaseAApprovalRuntime.js +24 -0
- package/dist/services/executorPhaseAApprovalService.d.ts +40 -0
- package/dist/services/executorPhaseAApprovalService.js +609 -0
- package/dist/services/executorPhaseADriftEvaluator.d.ts +78 -0
- package/dist/services/executorPhaseADriftEvaluator.js +93 -0
- package/dist/services/executorPhaseAIssuerCore.d.ts +126 -0
- package/dist/services/executorPhaseAIssuerCore.js +295 -0
- package/dist/services/executorPhaseAIssuerRedemptionService.d.ts +34 -0
- package/dist/services/executorPhaseAIssuerRedemptionService.js +158 -0
- package/dist/services/githubReviewEvidenceRuntime.d.ts +14 -0
- package/dist/services/githubReviewEvidenceRuntime.js +30 -0
- package/dist/services/githubReviewEvidenceService.d.ts +93 -0
- package/dist/services/githubReviewEvidenceService.js +336 -0
- package/dist/services/modelGateway.d.ts +7 -0
- package/dist/services/modelProviderConnectionService.d.ts +71 -0
- package/dist/services/modelProviderConnectionService.js +279 -0
- package/dist/services/modelProviderCredentialHome.d.ts +32 -0
- package/dist/services/modelProviderCredentialHome.js +271 -0
- package/dist/services/ownerScopedModelConnectionGateway.d.ts +12 -0
- package/dist/services/ownerScopedModelConnectionGateway.js +30 -0
- package/dist/services/taskforceAgentConnectionBindingService.d.ts +66 -0
- package/dist/services/taskforceAgentConnectionBindingService.js +185 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +8 -2
- package/dist/services/taskforceAgentMcpBridge.js +30 -27
- package/dist/shared/adminEdgeProxy.d.ts +5 -0
- package/dist/shared/adminEdgeProxy.js +94 -0
- package/dist/shared/adminProxySessionCookies.d.ts +16 -0
- package/dist/shared/adminProxySessionCookies.js +86 -0
- package/dist/shared/aiProfileColors.d.ts +31 -1
- package/dist/shared/aiProfileColors.js +14 -6
- package/dist/shared/executorPhaseAApprovalGoldenVector.json +269 -0
- package/dist/shared/executorPhaseAApprovalReceipt.d.ts +112 -0
- package/dist/shared/executorPhaseAApprovalReceipt.js +58 -0
- package/dist/shared/executorPhaseAApprovalTrustPolicy.json +10 -0
- package/dist/shared/executorPhaseADriftContracts.d.ts +37 -0
- package/dist/shared/executorPhaseADriftContracts.js +63 -0
- package/dist/shared/executorPhaseAIssuerContracts.d.ts +75 -0
- package/dist/shared/executorPhaseAIssuerContracts.js +90 -0
- package/dist/shared/executorPhaseARunAuthorization.d.ts +120 -0
- package/dist/shared/executorPhaseARunAuthorization.js +232 -0
- package/dist/shared/executorPhaseASchemaValidation.d.ts +7 -0
- package/dist/shared/executorPhaseASchemaValidation.js +53 -0
- package/dist/shared/executorPhaseASchemas/approval-receipt.schema.json +106 -0
- package/dist/shared/executorPhaseASchemas/drift-attestation.schema.json +54 -0
- package/dist/shared/executorPhaseASchemas/drift-request.schema.json +47 -0
- package/dist/shared/executorPhaseASchemas/foundation-manifest.schema.json +29 -0
- package/dist/shared/executorPhaseASchemas/issuer-audit-record.schema.json +24 -0
- package/dist/shared/executorPhaseASchemas/issuer-proof.schema.json +43 -0
- package/dist/shared/executorPhaseASchemas/issuer-redemption-request.schema.json +18 -0
- package/dist/shared/executorPhaseASchemas/issuer-redemption-response.schema.json +39 -0
- package/dist/shared/executorPhaseASchemas/logical-envelope.schema.json +149 -0
- package/dist/shared/executorPhaseASchemas/preflight-report.schema.json +216 -0
- package/dist/shared/executorPhaseASchemas/run-capability.schema.json +111 -0
- package/dist/shared/executorPhaseASchemas/sender-proof.schema.json +37 -0
- package/dist/shared/executorPhaseASchemas/workload-grant.schema.json +68 -0
- package/dist/shared/executorPhaseASchemas/workload-jwt-claims.schema.json +67 -0
- package/dist/shared/executorPhaseATiming.d.ts +1 -0
- package/dist/shared/executorPhaseATiming.js +1 -0
- package/dist/shared/planningIdentity.js +1 -1
- package/dist/shared/productLogoKeys.d.ts +2 -0
- package/dist/shared/productLogoKeys.js +18 -0
- package/dist/shared/taskforceAgentDefinition.d.ts +0 -1
- package/dist/shared/taskforceAgentDefinition.js +6 -3
- package/dist/shared/taskforceAgentModels.d.ts +1 -0
- package/dist/shared/taskforceAgentModels.js +36 -3
- package/dist/shared/userFeatureGrants.d.ts +4 -0
- package/dist/shared/userFeatureGrants.js +7 -0
- package/dist/storage/executorPhaseAApprovalReceiptStore.d.ts +37 -0
- package/dist/storage/executorPhaseAApprovalReceiptStore.js +81 -0
- package/dist/storage/executorPhaseARunAuthorizationStore.d.ts +103 -0
- package/dist/storage/executorPhaseARunAuthorizationStore.js +492 -0
- package/dist/storage/githubReviewEvidenceInstallationStore.d.ts +26 -0
- package/dist/storage/githubReviewEvidenceInstallationStore.js +89 -0
- package/dist/storage/modelProviderConnectionStore.d.ts +99 -0
- package/dist/storage/modelProviderConnectionStore.js +446 -0
- package/dist/storage/postgresAdapter.d.ts +24 -3
- package/dist/storage/postgresAdapter.js +117 -14
- package/dist/storage/postgresWorker.js +22 -5
- package/dist/storage/postgresWorkerProtocol.d.ts +30 -0
- package/dist/storage/postgresWorkerProtocol.js +30 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.d.ts +31 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.js +84 -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 +1 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +67 -30
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.d.ts +10 -0
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.js +29 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +6 -2
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +15 -1
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +99 -2
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +1 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +33 -4
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +2 -1
- package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +38 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.js +50 -1
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +20 -2
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +6 -6
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +4 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +11 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +14 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +84 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +11 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +2 -1
- package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +31 -4
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +3 -1
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +134 -43
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +6 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +11 -4
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +29 -0
- package/dist/sync/syncApplyHandlers.d.ts +2 -0
- package/dist/sync/syncApplyHandlers.js +10 -1
- package/dist/sync/syncService.d.ts +17 -0
- package/dist/sync/syncService.js +87 -19
- package/dist/sync/taskforceAgentSyncAuthorization.d.ts +16 -0
- package/dist/sync/taskforceAgentSyncAuthorization.js +20 -0
- package/dist/sync/v3/combinedFeedCapability.js +8 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.js +18 -10
- package/dist/sync/v3/durableOperationReplay.d.ts +14 -0
- package/dist/sync/v3/durableOperationReplay.js +18 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +2 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +14 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +4 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +62 -15
- package/dist/sync/v3/durableTaskCommentMutationRouter.js +3 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +1 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +30 -8
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +5 -3
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +37 -2
- package/dist/sync/v3/durableTaxonomyMutationRouter.js +5 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +11 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +39 -10
- package/dist/sync/v3/durableWorkstreamMutationRouter.js +18 -10
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +16 -5
- package/dist/sync/v3/localOutboxDispatchRuntime.js +2 -2
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +47 -7
- package/dist/sync/v3/localTaskChecklistOutboxHandler.js +16 -2
- package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +4 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.js +14 -1
- 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 +10 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +272 -24
- package/dist/sync/v3/syncDurabilityStore.d.ts +41 -0
- package/dist/sync/v3/syncDurabilityStore.js +199 -13
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +6 -4
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +19 -10
- package/dist/sync/v3/taskChecklistMutationService.d.ts +15 -2
- package/dist/sync/v3/taskChecklistMutationService.js +48 -1
- package/dist/sync/v3/taskCreateMutationService.d.ts +2 -2
- package/dist/sync/v3/taskCreateMutationService.js +7 -4
- 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 +31 -1
- package/dist/sync/v3/taskStatusMutationService.js +123 -3
- package/dist/sync/v3/workflowAssignmentSync.d.ts +6 -0
- package/dist/sync/v3/workflowAssignmentSync.js +30 -0
- package/dist/sync/v3/workspaceSyncJournalReader.js +1 -1
- package/dist/sync/v3/workspaceSyncOperationRetentionService.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncOperationRetentionService.js +83 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +13 -3
- 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.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +18 -3
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +8 -3
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +51 -10
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +14 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +49 -25
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +13 -4
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +124 -57
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +20 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +106 -30
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +4 -1
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +34 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +12 -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 +5 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +55 -9
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.d.ts +17 -0
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.js +64 -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/workspaceSyncV3WorkflowTaskCoverCoverage.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverCoverage.js +33 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.js +8 -0
- package/dist/sync/workspacePullFeed.js +2 -1
- package/dist/sync/workspaceRepair.d.ts +8 -2
- package/dist/sync/workspaceRepair.js +222 -6
- package/dist/sync/workspaceSyncModel.d.ts +21 -0
- package/dist/sync/workspaceSyncModel.js +35 -7
- package/dist/sync/workspaceSyncState.d.ts +1 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +6 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.js +5 -0
- package/dist/types.d.ts +47 -1
- package/dist/types.js +6 -0
- package/dist/ui/assets/AiIdentityRosterCard-OcSz1PkK.js +1 -0
- package/dist/ui/assets/AiProfilesModule-ByhYW5Xi.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BTM6nIg_.js +3 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-TzYu7pkG.css +1 -0
- package/dist/ui/assets/{AssetTraySortControl-Kf1pelSy.js → AssetTraySortControl-DabEG8L4.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-B8boOs6Q.js → ContextAttachmentManager-Coa8yVGM.js} +2 -2
- package/dist/ui/assets/{DocumentWorkspace-DXH4XUsB.js → DocumentWorkspace-BB0qhdix.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BtSTq0ON.js → EntityActivityTimeline-CZ8x4UJE.js} +1 -1
- package/dist/ui/assets/PlanningModule-pRPjR7v5.js +1 -0
- package/dist/ui/assets/PlansPage-D86pZSSl.js +1 -0
- package/dist/ui/assets/TaskContextUpload-BVIkU9yT.js +1 -0
- package/dist/ui/assets/TaskSettings-Cv1mNhv_.js +12 -0
- package/dist/ui/assets/TaskforceAgentsModule-b-8R25cJ.css +1 -0
- package/dist/ui/assets/TaskforceAgentsModule-gmH-PD2q.js +24 -0
- package/dist/ui/assets/{WorkflowManagerModule-DWFspC-o.js → WorkflowManagerModule-DbfnHJ-f.js} +1 -1
- package/dist/ui/assets/index-BZ-hdZSk.css +1 -0
- package/dist/ui/assets/index-CTsDBaef.js +7 -0
- package/dist/ui/assets/{vendor-icons-BkFLXavV.js → vendor-icons-Bsq-mcEn.js} +1 -1
- package/dist/ui/branding/logos/letterhead_dark.png +0 -0
- package/dist/ui/branding/logos/letterhead_light.png +0 -0
- package/dist/ui/branding/logos/signature_dark.png +0 -0
- package/dist/ui/branding/logos/signature_light.png +0 -0
- package/dist/ui/index.html +3 -3
- package/dist/utils/aiProfileDefaultLogo.js +16 -48
- package/dist/utils/httpSetCookie.d.ts +1 -0
- package/dist/utils/httpSetCookie.js +4 -1
- package/dist/utils/localRuntimeUrl.d.ts +1 -0
- package/dist/utils/localRuntimeUrl.js +14 -0
- package/dist/utils/productLogoRegistry.d.ts +2 -0
- package/dist/utils/productLogoRegistry.js +36 -0
- package/dist/utils/syncStatusPresentation.d.ts +4 -0
- package/dist/utils/syncStatusPresentation.js +17 -0
- 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/taskEvents.d.ts +2 -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/dist/utils/workspaceSyncPresentation.d.ts +1 -1
- package/dist/utils/workspaceSyncPresentation.js +23 -17
- package/package.json +36 -6
- package/dist/ui/assets/AiIdentityRosterCard-MZs7lVED.js +0 -1
- package/dist/ui/assets/AiProfilesModule-C3i0LOxe.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DVZk5Tln.js +0 -3
- package/dist/ui/assets/PlanningModule-BPVyEa-f.js +0 -1
- package/dist/ui/assets/PlansPage-ChqgxALc.js +0 -1
- package/dist/ui/assets/TaskContextUpload-CB3ol0sN.js +0 -1
- package/dist/ui/assets/TaskSettings-g4ECKNOz.js +0 -12
- package/dist/ui/assets/TaskforceAgentsModule-BazdUwxZ.js +0 -21
- package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +0 -1
- package/dist/ui/assets/index-BUplSsv_.js +0 -7
- package/dist/ui/assets/index-gz2EXuoK.css +0 -1
|
@@ -36,11 +36,12 @@ function taskHttpObservedPrecondition(task, taskId) {
|
|
|
36
36
|
return {
|
|
37
37
|
taskId,
|
|
38
38
|
updatedAt: task?.updatedAt ?? null,
|
|
39
|
+
detailRevision: task?.detailRevision ?? null,
|
|
39
40
|
status: task?.status ?? null,
|
|
40
41
|
isArchived: task?.isArchived === true,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks, setArchivedTasks, setDeletedTasks, setError, resetForm, setActiveTab, fetchTasks, fetchArchive, fetchDeletedTasks, mergeTaskFromServer, pushNotice, cloudAuthConfigured, runtimeMode, isAuthenticated, workspaceCloudSyncEnabled, buildWorkspaceSyncSignature, pushWorkspaceChangesToCloud, workspacePendingSignatureRef, workspaceDeletedTaskIdsRef, workspaceDeletedTaskWatermarksRef, mutateTaskMetadata, mutateTaskStatus, mutateTaskLifecycle, mutateTaskDelete, mutateTaskRestore, durableTaskMetadataActivationEnabled = false, durableTaskStatusActivationEnabled = false, durableTaskDeleteActivationEnabled = false, durableTaskHttpRootActivationEnabled = false, workspaceId = 'default', taskHttpMutationClient, }) {
|
|
44
|
+
export function useTaskMutations({ tasks, archivedTasks, editingTaskId, editingTaskDetailRevision = null, setTasks, setArchivedTasks, setDeletedTasks, setError, resetForm, setActiveTab, fetchTasks, fetchArchive, fetchDeletedTasks, mergeTaskFromServer, pushNotice, cloudAuthConfigured, runtimeMode, isAuthenticated, workspaceCloudSyncEnabled, buildWorkspaceSyncSignature, pushWorkspaceChangesToCloud, workspacePendingSignatureRef, workspaceDeletedTaskIdsRef, workspaceDeletedTaskWatermarksRef, mutateTaskMetadata, mutateTaskStatus, mutateTaskLifecycle, mutateTaskDelete, mutateTaskRestore, durableTaskMetadataActivationEnabled = false, durableTaskStatusActivationEnabled = false, durableTaskDeleteActivationEnabled = false, durableTaskHttpRootActivationEnabled = false, workspaceId = 'default', taskHttpMutationClient, onTaskRevisionConflict, onTaskMutationAccepted, pendingTaskMetadataOverlaysRef, }) {
|
|
44
45
|
const authoritativeTaskSnapshotsRef = useRef(new Map());
|
|
45
46
|
useEffect(() => {
|
|
46
47
|
if (typeof window === 'undefined')
|
|
@@ -418,8 +419,10 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
418
419
|
pushNotice(message, 'error');
|
|
419
420
|
return true;
|
|
420
421
|
}
|
|
421
|
-
if ('task' in result && result.task)
|
|
422
|
+
if ('task' in result && result.task) {
|
|
422
423
|
mergeTaskFromServer(result.task);
|
|
424
|
+
onTaskMutationAccepted?.(result.task);
|
|
425
|
+
}
|
|
423
426
|
if (result.state === 'accepted') {
|
|
424
427
|
setError('');
|
|
425
428
|
}
|
|
@@ -441,8 +444,10 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
441
444
|
pushNotice(message, 'error');
|
|
442
445
|
}
|
|
443
446
|
return true;
|
|
444
|
-
}, [mergeTaskFromServer, pushNotice, setArchivedTasks, setError, setTasks]);
|
|
445
|
-
const handleSetStatus = useCallback(async (task, status, updates = {}) => {
|
|
447
|
+
}, [mergeTaskFromServer, onTaskMutationAccepted, pushNotice, setArchivedTasks, setError, setTasks]);
|
|
448
|
+
const handleSetStatus = useCallback(async (task, status, updates = {}, expectedDetailRevisionOverride) => {
|
|
449
|
+
const expectedDetailRevision = expectedDetailRevisionOverride
|
|
450
|
+
?? (task.id === editingTaskId ? editingTaskDetailRevision : null);
|
|
446
451
|
const containsDurableMetadata = Object.keys(updates)
|
|
447
452
|
.some((key) => DURABLE_TASK_METADATA_FIELD_NAMES.has(key));
|
|
448
453
|
const unsupportedFields = Object.keys(updates).filter((key) => (!TASK_STATUS_CONTROL_FIELDS.has(key) && !DURABLE_TASK_METADATA_FIELD_NAMES.has(key)));
|
|
@@ -468,17 +473,55 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
468
473
|
setArchivedTasks((current) => current.map((item) => item.id === task.id ? { ...item, ...optimisticPatch } : item));
|
|
469
474
|
if (mutateTaskStatus) {
|
|
470
475
|
try {
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
476
|
+
const buildDurablePayload = (targetStatus, targetUpdates, detailRevision) => {
|
|
477
|
+
const assigneeIntent = Object.prototype.hasOwnProperty.call(targetUpdates, 'assignee')
|
|
478
|
+
? { kind: 'set', value: targetUpdates.assignee ?? null }
|
|
479
|
+
: { kind: 'preserve' };
|
|
480
|
+
const metadataPatch = selectDurableTaskMetadataPatch(targetUpdates);
|
|
481
|
+
delete metadataPatch.assignee;
|
|
482
|
+
return {
|
|
483
|
+
status: targetStatus,
|
|
484
|
+
assigneeIntent,
|
|
485
|
+
canceledReason: targetStatus === 'cancelled'
|
|
486
|
+
? (targetUpdates.canceledReason ?? null)
|
|
487
|
+
: null,
|
|
488
|
+
metadataPatch,
|
|
489
|
+
...(detailRevision ? { expectedDetailRevision: detailRevision } : {}),
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
let durableResult = await mutateTaskStatus(task.id, buildDurablePayload(status, updates, expectedDetailRevision));
|
|
493
|
+
if (durableResult
|
|
494
|
+
&& (durableResult.state === 'rejected' || durableResult.state === 'failed')
|
|
495
|
+
&& durableResult.errorCode === 'TASK_DETAIL_REVISION_CONFLICT') {
|
|
496
|
+
const previousTask = previousTasks.find((item) => item.id === task.id)
|
|
497
|
+
|| previousArchivedTasks.find((item) => item.id === task.id);
|
|
498
|
+
setTasks((current) => rollbackTargetTaskPatch(current, previousTask, task.id, optimisticPatch));
|
|
499
|
+
setArchivedTasks((current) => rollbackTargetTaskPatch(current, previousTask, task.id, optimisticPatch));
|
|
500
|
+
const resolution = await onTaskRevisionConflict?.(task.id, null);
|
|
501
|
+
if (resolution?.retryDetailRevision) {
|
|
502
|
+
const retryPatch = Object.fromEntries(Object.entries(updates).map(([key, value]) => [
|
|
503
|
+
key,
|
|
504
|
+
resolution.retryPatch && Object.prototype.hasOwnProperty.call(resolution.retryPatch, key)
|
|
505
|
+
? resolution.retryPatch[key]
|
|
506
|
+
: value,
|
|
507
|
+
]));
|
|
508
|
+
const retryStatus = (resolution.retryPatch?.status || status);
|
|
509
|
+
durableResult = await mutateTaskStatus(task.id, buildDurablePayload(retryStatus, retryPatch, resolution.retryDetailRevision));
|
|
510
|
+
if (durableResult
|
|
511
|
+
&& (durableResult.state === 'rejected' || durableResult.state === 'failed')
|
|
512
|
+
&& durableResult.errorCode === 'TASK_DETAIL_REVISION_CONFLICT') {
|
|
513
|
+
const secondResolution = await onTaskRevisionConflict?.(task.id, null);
|
|
514
|
+
if (secondResolution?.handled) {
|
|
515
|
+
setError('');
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
else if (resolution?.handled) {
|
|
521
|
+
setError('');
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
482
525
|
if (durableResult && finishDurableTaskMutation(durableResult, task.id, optimisticPatch, previousTasks, previousArchivedTasks))
|
|
483
526
|
return;
|
|
484
527
|
if (!durableResult && durableTaskStatusActivationEnabled) {
|
|
@@ -515,15 +558,54 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
515
558
|
return;
|
|
516
559
|
}
|
|
517
560
|
try {
|
|
518
|
-
const legacyPatch = {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
561
|
+
const legacyPatch = {
|
|
562
|
+
...updates,
|
|
563
|
+
status,
|
|
564
|
+
completedAt: optimisticPatch.completedAt,
|
|
565
|
+
...(expectedDetailRevision ? { expectedDetailRevision } : {}),
|
|
523
566
|
};
|
|
524
|
-
|
|
567
|
+
let activePatch = legacyPatch;
|
|
568
|
+
let res;
|
|
569
|
+
let data = {};
|
|
570
|
+
for (let attempt = 0;; attempt += 1) {
|
|
571
|
+
res = await fetchCloudTaskRootPatch(`/api/taskforce/task/${task.id}`, {
|
|
572
|
+
method: 'PATCH',
|
|
573
|
+
headers: { 'Content-Type': 'application/json' },
|
|
574
|
+
body: JSON.stringify(activePatch),
|
|
575
|
+
}, activePatch, task.id, taskHttpObservedPrecondition(task, task.id));
|
|
576
|
+
if (res.ok)
|
|
577
|
+
break;
|
|
578
|
+
data = await res.json().catch(() => ({}));
|
|
579
|
+
if (data.code !== 'TASK_DETAIL_REVISION_CONFLICT')
|
|
580
|
+
break;
|
|
581
|
+
setTasks(previousTasks);
|
|
582
|
+
setArchivedTasks(previousArchivedTasks);
|
|
583
|
+
const currentDetailRevision = typeof data?.details?.currentDetailRevision === 'string'
|
|
584
|
+
? data.details.currentDetailRevision
|
|
585
|
+
: null;
|
|
586
|
+
const resolution = await onTaskRevisionConflict?.(task.id, currentDetailRevision);
|
|
587
|
+
if (attempt === 0 && resolution?.retryDetailRevision) {
|
|
588
|
+
const retryPatch = Object.fromEntries(Object.entries(legacyPatch).map(([key, value]) => [
|
|
589
|
+
key,
|
|
590
|
+
resolution.retryPatch && Object.prototype.hasOwnProperty.call(resolution.retryPatch, key)
|
|
591
|
+
? resolution.retryPatch[key]
|
|
592
|
+
: value,
|
|
593
|
+
]));
|
|
594
|
+
activePatch = {
|
|
595
|
+
...retryPatch,
|
|
596
|
+
expectedDetailRevision: resolution.retryDetailRevision,
|
|
597
|
+
};
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
if (resolution?.handled) {
|
|
601
|
+
setError('');
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
525
606
|
if (!res.ok) {
|
|
526
|
-
|
|
607
|
+
if (Object.keys(data).length === 0)
|
|
608
|
+
data = await res.json().catch(() => ({}));
|
|
527
609
|
const message = data.error || 'Failed to update task status.';
|
|
528
610
|
setError(message);
|
|
529
611
|
pushNotice(message, 'error');
|
|
@@ -532,8 +614,10 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
532
614
|
return;
|
|
533
615
|
}
|
|
534
616
|
const updatedTask = await res.json().catch(() => null);
|
|
535
|
-
if (updatedTask)
|
|
617
|
+
if (updatedTask) {
|
|
536
618
|
mergeTaskFromServer(updatedTask);
|
|
619
|
+
onTaskMutationAccepted?.(updatedTask);
|
|
620
|
+
}
|
|
537
621
|
else
|
|
538
622
|
await fetchTasks(true);
|
|
539
623
|
queueWorkspaceSyncFromAuthoritativeTaskState();
|
|
@@ -549,6 +633,8 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
549
633
|
}, [
|
|
550
634
|
archivedTasks,
|
|
551
635
|
durableTaskMetadataActivationEnabled,
|
|
636
|
+
editingTaskDetailRevision,
|
|
637
|
+
editingTaskId,
|
|
552
638
|
durableTaskHttpRootActivationEnabled,
|
|
553
639
|
durableTaskStatusActivationEnabled,
|
|
554
640
|
fetchTasks,
|
|
@@ -556,6 +642,8 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
556
642
|
finishDurableTaskMutation,
|
|
557
643
|
mergeTaskFromServer,
|
|
558
644
|
mutateTaskStatus,
|
|
645
|
+
onTaskMutationAccepted,
|
|
646
|
+
onTaskRevisionConflict,
|
|
559
647
|
pushNotice,
|
|
560
648
|
queueWorkspaceSyncFromAuthoritativeTaskState,
|
|
561
649
|
setArchivedTasks,
|
|
@@ -564,8 +652,14 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
564
652
|
tasks,
|
|
565
653
|
]);
|
|
566
654
|
const handleUpdateTask = useCallback(async (id, updates) => {
|
|
567
|
-
const
|
|
568
|
-
|
|
655
|
+
const specialFields = updates;
|
|
656
|
+
const saveSource = specialFields.saveSource;
|
|
657
|
+
const expectedDetailRevision = typeof specialFields.expectedDetailRevision === 'string'
|
|
658
|
+
? specialFields.expectedDetailRevision
|
|
659
|
+
: id === editingTaskId
|
|
660
|
+
? editingTaskDetailRevision
|
|
661
|
+
: null;
|
|
662
|
+
updates = Object.fromEntries(Object.entries(updates).filter(([key]) => (key !== 'saveSource' && key !== 'expectedDetailRevision')));
|
|
569
663
|
if (Object.keys(updates).length === 0)
|
|
570
664
|
return true;
|
|
571
665
|
const authoritativeTask = authoritativeTaskSnapshotsRef.current.get(id);
|
|
@@ -589,7 +683,7 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
589
683
|
if (updates.status) {
|
|
590
684
|
const target = tasks.find((task) => task.id === id) || archivedTasks.find((task) => task.id === id);
|
|
591
685
|
if (target) {
|
|
592
|
-
await handleSetStatus(target, updates.status, updates);
|
|
686
|
+
await handleSetStatus(target, updates.status, updates, expectedDetailRevision);
|
|
593
687
|
return;
|
|
594
688
|
}
|
|
595
689
|
if (durableTaskStatusActivationEnabled) {
|
|
@@ -609,12 +703,80 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
609
703
|
let hasLegacyCarriers = Object.keys(legacyCarrierPatch).length > 0;
|
|
610
704
|
let durableMetadataHandled = false;
|
|
611
705
|
if (hasDurableMetadata && mutateTaskMetadata) {
|
|
706
|
+
const pendingOverlay = {
|
|
707
|
+
patch: durableMetadataPatch,
|
|
708
|
+
observedUpdatedAt: observedTask?.updatedAt || null,
|
|
709
|
+
};
|
|
710
|
+
pendingTaskMetadataOverlaysRef?.current.set(id, pendingOverlay);
|
|
711
|
+
const clearPendingOverlay = () => {
|
|
712
|
+
if (pendingTaskMetadataOverlaysRef?.current.get(id) === pendingOverlay) {
|
|
713
|
+
pendingTaskMetadataOverlaysRef.current.delete(id);
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
const ownsPendingOverlay = () => (!pendingTaskMetadataOverlaysRef
|
|
717
|
+
|| pendingTaskMetadataOverlaysRef.current.get(id) === pendingOverlay);
|
|
612
718
|
try {
|
|
613
|
-
const
|
|
614
|
-
|
|
719
|
+
const initialMutationOptions = {
|
|
720
|
+
...(saveSource ? { saveSource } : {}),
|
|
721
|
+
...(expectedDetailRevision ? { expectedDetailRevision } : {}),
|
|
722
|
+
};
|
|
723
|
+
let durableResult = Object.keys(initialMutationOptions).length > 0
|
|
724
|
+
? await mutateTaskMetadata(id, durableMetadataPatch, initialMutationOptions)
|
|
615
725
|
: await mutateTaskMetadata(id, durableMetadataPatch);
|
|
726
|
+
if (!ownsPendingOverlay())
|
|
727
|
+
return false;
|
|
616
728
|
if (durableResult && durableResult.state !== 'disabled') {
|
|
729
|
+
if ((durableResult.state === 'rejected' || durableResult.state === 'failed')
|
|
730
|
+
&& durableResult.errorCode === 'TASK_DETAIL_REVISION_CONFLICT') {
|
|
731
|
+
const previousTask = previousTasks.find((task) => task.id === id)
|
|
732
|
+
|| previousArchivedTasks.find((task) => task.id === id);
|
|
733
|
+
setTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
734
|
+
setArchivedTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
735
|
+
const resolution = await onTaskRevisionConflict?.(id, null);
|
|
736
|
+
if (!ownsPendingOverlay())
|
|
737
|
+
return false;
|
|
738
|
+
if (resolution?.retryDetailRevision) {
|
|
739
|
+
const reconciledPatch = resolution.retryPatch;
|
|
740
|
+
const retryMetadataPatch = Object.fromEntries(Object.entries(durableMetadataPatch).map(([key, value]) => [
|
|
741
|
+
key,
|
|
742
|
+
reconciledPatch && Object.prototype.hasOwnProperty.call(reconciledPatch, key)
|
|
743
|
+
? reconciledPatch[key]
|
|
744
|
+
: value,
|
|
745
|
+
]));
|
|
746
|
+
pendingOverlay.patch = retryMetadataPatch;
|
|
747
|
+
durableResult = await mutateTaskMetadata(id, retryMetadataPatch, {
|
|
748
|
+
...(saveSource ? { saveSource } : {}),
|
|
749
|
+
expectedDetailRevision: resolution.retryDetailRevision,
|
|
750
|
+
});
|
|
751
|
+
if (!ownsPendingOverlay())
|
|
752
|
+
return false;
|
|
753
|
+
if (durableResult
|
|
754
|
+
&& (durableResult.state === 'rejected' || durableResult.state === 'failed')
|
|
755
|
+
&& durableResult.errorCode === 'TASK_DETAIL_REVISION_CONFLICT') {
|
|
756
|
+
const secondResolution = await onTaskRevisionConflict?.(id, null);
|
|
757
|
+
if (secondResolution?.handled) {
|
|
758
|
+
setError('');
|
|
759
|
+
return false;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
else if (resolution?.handled) {
|
|
764
|
+
setError('');
|
|
765
|
+
return false;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (!durableResult || durableResult.state === 'disabled') {
|
|
769
|
+
const previousTask = previousTasks.find((task) => task.id === id)
|
|
770
|
+
|| previousArchivedTasks.find((task) => task.id === id);
|
|
771
|
+
setTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
772
|
+
setArchivedTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
773
|
+
const message = 'Task was not saved because durable metadata capture became unavailable during retry.';
|
|
774
|
+
setError(message);
|
|
775
|
+
pushNotice(message, 'error');
|
|
776
|
+
return false;
|
|
777
|
+
}
|
|
617
778
|
if (durableResult.state === 'rejected' || durableResult.state === 'failed') {
|
|
779
|
+
clearPendingOverlay();
|
|
618
780
|
const previousTask = previousTasks.find((task) => task.id === id)
|
|
619
781
|
|| previousArchivedTasks.find((task) => task.id === id);
|
|
620
782
|
setTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
@@ -629,8 +791,18 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
629
791
|
return false;
|
|
630
792
|
}
|
|
631
793
|
durableMetadataHandled = true;
|
|
632
|
-
if ('task' in durableResult
|
|
794
|
+
if ('task' in durableResult
|
|
795
|
+
&& durableResult.task?.updatedAt
|
|
796
|
+
&& pendingTaskMetadataOverlaysRef?.current.get(id) === pendingOverlay) {
|
|
797
|
+
pendingOverlay.observedUpdatedAt = durableResult.task.updatedAt;
|
|
798
|
+
}
|
|
799
|
+
if ('task' in durableResult
|
|
800
|
+
&& durableResult.task
|
|
801
|
+
&& (!pendingTaskMetadataOverlaysRef
|
|
802
|
+
|| pendingTaskMetadataOverlaysRef.current.get(id) === pendingOverlay)) {
|
|
633
803
|
mergeTaskFromServer(durableResult.task);
|
|
804
|
+
onTaskMutationAccepted?.(durableResult.task);
|
|
805
|
+
}
|
|
634
806
|
if (durableResult.state === 'accepted') {
|
|
635
807
|
setError('');
|
|
636
808
|
}
|
|
@@ -663,18 +835,24 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
663
835
|
if (!hasLegacyCarriers)
|
|
664
836
|
return true;
|
|
665
837
|
}
|
|
666
|
-
else
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
838
|
+
else {
|
|
839
|
+
clearPendingOverlay();
|
|
840
|
+
if (durableTaskMetadataActivationEnabled) {
|
|
841
|
+
const previousTask = previousTasks.find((task) => task.id === id)
|
|
842
|
+
|| previousArchivedTasks.find((task) => task.id === id);
|
|
843
|
+
setTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
844
|
+
setArchivedTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, updates));
|
|
845
|
+
const message = 'Task was not saved because durable metadata capture was unavailable.';
|
|
846
|
+
setError(message);
|
|
847
|
+
pushNotice(message, 'error');
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
675
850
|
}
|
|
676
851
|
}
|
|
677
852
|
catch (error) {
|
|
853
|
+
if (!ownsPendingOverlay())
|
|
854
|
+
return false;
|
|
855
|
+
clearPendingOverlay();
|
|
678
856
|
console.error('Durable task metadata update failed before a conclusive result.', error);
|
|
679
857
|
if (hasLegacyCarriers) {
|
|
680
858
|
const previousTask = previousTasks.find((task) => task.id === id)
|
|
@@ -708,32 +886,68 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
708
886
|
const legacyRequestPatch = {
|
|
709
887
|
...legacyCarrierPatch,
|
|
710
888
|
...(saveSource ? { saveSource } : {}),
|
|
889
|
+
...(expectedDetailRevision ? { expectedDetailRevision } : {}),
|
|
711
890
|
};
|
|
712
891
|
const requestInit = {
|
|
713
892
|
method: 'PATCH',
|
|
714
893
|
headers: { 'Content-Type': 'application/json' },
|
|
715
894
|
body: JSON.stringify(legacyRequestPatch),
|
|
716
895
|
};
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
896
|
+
let activeRequestPatch = legacyRequestPatch;
|
|
897
|
+
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
898
|
+
const activeRequestInit = attempt === 0 ? requestInit : {
|
|
899
|
+
...requestInit,
|
|
900
|
+
body: JSON.stringify(activeRequestPatch),
|
|
901
|
+
};
|
|
902
|
+
const res = await fetchCloudTaskRootPatch(`/api/taskforce/task/${id}`, activeRequestInit, activeRequestPatch, id, taskHttpObservedPrecondition(previousTasks.find((task) => task.id === id)
|
|
903
|
+
|| previousArchivedTasks.find((task) => task.id === id), id));
|
|
904
|
+
if (res.ok) {
|
|
905
|
+
const updatedTask = await res.json().catch(() => null);
|
|
906
|
+
mergeTaskFromServer(updatedTask);
|
|
907
|
+
if (updatedTask && typeof updatedTask === 'object' && typeof updatedTask.id === 'string') {
|
|
908
|
+
onTaskMutationAccepted?.(updatedTask);
|
|
909
|
+
}
|
|
910
|
+
// Attachment saves also depend on the canonical asset snapshot refresh. Give that
|
|
911
|
+
// snapshot a brief head start so the next push includes both task metadata and bytes.
|
|
912
|
+
queueWorkspaceSyncFromAuthoritativeTaskState(updates.attachments !== undefined ? 150 : 0);
|
|
913
|
+
setError('');
|
|
914
|
+
return true;
|
|
915
|
+
}
|
|
720
916
|
const data = await res.json().catch(() => ({}));
|
|
721
|
-
const message = data.error || `Failed to update task ${id}.`;
|
|
722
|
-
setError(message);
|
|
723
|
-
pushNotice(message, 'error');
|
|
724
917
|
const previousTask = previousTasks.find((task) => task.id === id)
|
|
725
918
|
|| previousArchivedTasks.find((task) => task.id === id);
|
|
726
919
|
setTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, legacyCarrierPatch));
|
|
727
920
|
setArchivedTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, legacyCarrierPatch));
|
|
921
|
+
if (data.code === 'TASK_DETAIL_REVISION_CONFLICT') {
|
|
922
|
+
const currentDetailRevision = typeof data?.details?.currentDetailRevision === 'string'
|
|
923
|
+
? data.details.currentDetailRevision
|
|
924
|
+
: null;
|
|
925
|
+
const resolution = await onTaskRevisionConflict?.(id, currentDetailRevision);
|
|
926
|
+
if (attempt === 0 && resolution?.retryDetailRevision) {
|
|
927
|
+
const reconciledPatch = resolution.retryPatch;
|
|
928
|
+
const retryPatch = Object.fromEntries(Object.entries(legacyRequestPatch).map(([key, value]) => [
|
|
929
|
+
key,
|
|
930
|
+
reconciledPatch && Object.prototype.hasOwnProperty.call(reconciledPatch, key)
|
|
931
|
+
? reconciledPatch[key]
|
|
932
|
+
: value,
|
|
933
|
+
]));
|
|
934
|
+
activeRequestPatch = {
|
|
935
|
+
...retryPatch,
|
|
936
|
+
expectedDetailRevision: resolution.retryDetailRevision,
|
|
937
|
+
};
|
|
938
|
+
continue;
|
|
939
|
+
}
|
|
940
|
+
if (resolution?.handled) {
|
|
941
|
+
setError('');
|
|
942
|
+
return false;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
const message = data.error || `Failed to update task ${id}.`;
|
|
946
|
+
setError(message);
|
|
947
|
+
pushNotice(message, 'error');
|
|
728
948
|
return false;
|
|
729
949
|
}
|
|
730
|
-
|
|
731
|
-
mergeTaskFromServer(updatedTask);
|
|
732
|
-
// Attachment saves also depend on the canonical asset snapshot refresh. Give that
|
|
733
|
-
// snapshot a brief head start so the next push includes both task metadata and bytes.
|
|
734
|
-
queueWorkspaceSyncFromAuthoritativeTaskState(updates.attachments !== undefined ? 150 : 0);
|
|
735
|
-
setError('');
|
|
736
|
-
return true;
|
|
950
|
+
return false;
|
|
737
951
|
}
|
|
738
952
|
catch (err) {
|
|
739
953
|
console.error("Failed to update task", err);
|
|
@@ -746,7 +960,7 @@ export function useTaskMutations({ tasks, archivedTasks, editingTaskId, setTasks
|
|
|
746
960
|
setArchivedTasks((currentTasks) => rollbackTargetTaskPatch(currentTasks, previousTask, id, legacyCarrierPatch));
|
|
747
961
|
return false;
|
|
748
962
|
}
|
|
749
|
-
}, [tasks, archivedTasks, pushNotice, mergeTaskFromServer, mutateTaskMetadata, queueWorkspaceSyncFromAuthoritativeTaskState, handleSetStatus, durableTaskMetadataActivationEnabled, durableTaskStatusActivationEnabled, fetchCloudTaskRootPatch]);
|
|
963
|
+
}, [tasks, archivedTasks, editingTaskDetailRevision, editingTaskId, pushNotice, mergeTaskFromServer, mutateTaskMetadata, onTaskMutationAccepted, onTaskRevisionConflict, pendingTaskMetadataOverlaysRef, queueWorkspaceSyncFromAuthoritativeTaskState, handleSetStatus, durableTaskMetadataActivationEnabled, durableTaskStatusActivationEnabled, fetchCloudTaskRootPatch]);
|
|
750
964
|
const handleToggleComplete = async (task) => {
|
|
751
965
|
const newStatus = task.status === 'done' ? 'task' : 'done';
|
|
752
966
|
await handleSetStatus(task, newStatus);
|
|
@@ -38,6 +38,7 @@ import type { PlanningIdentityColor, PlanningIdentityIcon } from '../shared/plan
|
|
|
38
38
|
import type { UiNotice } from '../utils/uiNotice';
|
|
39
39
|
import type { TaskAssigneeOption } from '../utils/assignees';
|
|
40
40
|
import { type WorkspaceModuleId } from './workspace/workspaceLocalState';
|
|
41
|
+
export declare function buildRelationshipTasks(tasks: TaskItem[], archivedTasks: TaskItem[], taskDetails: TaskItem[], editingTaskId: string | null): TaskItem[];
|
|
41
42
|
export interface UseTaskforceProps {
|
|
42
43
|
config?: Partial<TaskforceConfig>;
|
|
43
44
|
initialTaskId?: string;
|
|
@@ -108,6 +109,7 @@ export declare function sanitizePlanningBootstrapPayload(input: unknown): Planni
|
|
|
108
109
|
export declare function useTaskforce({ config, initialTaskId, initialActivityEntryId, requestedWorkspaceId, onTaskCountChange, onClose }: UseTaskforceProps): {
|
|
109
110
|
config: {
|
|
110
111
|
cloudEnvironment: any;
|
|
112
|
+
appGates: any;
|
|
111
113
|
apiBaseUrl: string | undefined;
|
|
112
114
|
cloudAuthBaseUrl: string | undefined;
|
|
113
115
|
wsBaseUrl: string | undefined;
|
|
@@ -136,6 +138,11 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
136
138
|
manualComplexityEnabled: boolean;
|
|
137
139
|
checklistDropdownEnabled: boolean;
|
|
138
140
|
showTaskCardStatusLabel: boolean;
|
|
141
|
+
showTaskCardDescription: boolean;
|
|
142
|
+
showTaskCardAttachments: boolean;
|
|
143
|
+
showTaskCardChecklistProgress: boolean;
|
|
144
|
+
showTaskCardLatestActivity: boolean;
|
|
145
|
+
tintTaskCardActivityBackground: boolean;
|
|
139
146
|
};
|
|
140
147
|
isOpen: boolean;
|
|
141
148
|
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
|
@@ -158,11 +165,16 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
158
165
|
manualComplexityEnabled: boolean;
|
|
159
166
|
checklistDropdownEnabled: boolean;
|
|
160
167
|
showTaskCardStatusLabel: boolean;
|
|
168
|
+
showTaskCardDescription: boolean;
|
|
169
|
+
showTaskCardAttachments: boolean;
|
|
170
|
+
showTaskCardChecklistProgress: boolean;
|
|
171
|
+
showTaskCardLatestActivity: boolean;
|
|
172
|
+
tintTaskCardActivityBackground: boolean;
|
|
161
173
|
setManualComplexityEnabled: Dispatch<SetStateAction<boolean>>;
|
|
162
174
|
mcpHostRoot: string;
|
|
163
175
|
setMcpHostRoot: Dispatch<SetStateAction<string>>;
|
|
164
|
-
settingsSection: "mcp" | "categories" | "types" | "general" | "
|
|
165
|
-
setSettingsSection: Dispatch<SetStateAction<"mcp" | "categories" | "types" | "general" | "
|
|
176
|
+
settingsSection: "mcp" | "categories" | "types" | "general" | "documents" | "taxonomy" | "agents" | "appearance-application" | "appearance-task-cards" | "appearance-task-forms" | "integrations" | null;
|
|
177
|
+
setSettingsSection: Dispatch<SetStateAction<"mcp" | "categories" | "types" | "general" | "documents" | "taxonomy" | "agents" | "appearance-application" | "appearance-task-cards" | "appearance-task-forms" | "integrations" | null>>;
|
|
166
178
|
runtimeMode: "local" | "cloud";
|
|
167
179
|
workspaceMode: "single-local" | "multi-cloud";
|
|
168
180
|
workspaceSwitchingEnabled: boolean;
|
|
@@ -193,6 +205,8 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
193
205
|
phase: import("./sync/useLocalSyncCoordinatorSnapshot").LocalSyncCoordinatorSnapshotPhase;
|
|
194
206
|
snapshot: import("../sync/coordinator/localSyncCoordinatorBrowserClient").LocalSyncCoordinatorStatusResponse | null;
|
|
195
207
|
errorMessage: string | null;
|
|
208
|
+
activeCommandType: import("../sync/coordinator/localSyncCoordinatorTypes").LocalSyncCoordinatorCommandType | null;
|
|
209
|
+
activePriorityCommandType: import("../sync/coordinator/localSyncCoordinatorTypes").LocalSyncCoordinatorCommandType | null;
|
|
196
210
|
} | null;
|
|
197
211
|
transferLocalCoordinatorOwnership: (targetMode: "server" | "browser-gateway") => Promise<boolean>;
|
|
198
212
|
retryUserGlobalSettingsSync: () => Promise<void>;
|
|
@@ -244,7 +258,7 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
244
258
|
realtimeSyncEnabled: boolean;
|
|
245
259
|
realtimeSyncFlagSource: "default" | "unknown" | "settings" | "env";
|
|
246
260
|
currentWorkspaceId: string;
|
|
247
|
-
currentWorkspaceRole: "
|
|
261
|
+
currentWorkspaceRole: "owner" | "member" | "admin" | "read-only" | null;
|
|
248
262
|
availableWorkspaces: WorkspaceSummary[];
|
|
249
263
|
assigneeOptions: TaskAssigneeOption[];
|
|
250
264
|
workspaceCloudSyncEnabled: boolean;
|
|
@@ -446,8 +460,8 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
446
460
|
type: "category";
|
|
447
461
|
value: string;
|
|
448
462
|
} | null>>;
|
|
449
|
-
groupBy: "category" | "type" | "priority" | "
|
|
450
|
-
setGroupBy: Dispatch<SetStateAction<"category" | "type" | "priority" | "
|
|
463
|
+
groupBy: "category" | "type" | "priority" | "complexity" | "status" | "assignee" | "schedule";
|
|
464
|
+
setGroupBy: Dispatch<SetStateAction<"category" | "type" | "priority" | "complexity" | "status" | "assignee" | "schedule">>;
|
|
451
465
|
activeWorkspaceModule: WorkspaceModuleId;
|
|
452
466
|
setActiveWorkspaceModule: Dispatch<SetStateAction<WorkspaceModuleId>>;
|
|
453
467
|
emptyColumnMode: "show" | "collapse" | "hide";
|
|
@@ -553,6 +567,7 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
553
567
|
reorderWorkstreamTasks: (workstreamId: string, taskIds: string[]) => Promise<void>;
|
|
554
568
|
handleEdit: (task: TaskItem, options?: {
|
|
555
569
|
preserveReturnTrail?: boolean;
|
|
570
|
+
adoptAsBaseline?: boolean;
|
|
556
571
|
}) => void;
|
|
557
572
|
handleDelete: (id: string, archive?: boolean, options?: {
|
|
558
573
|
skipConfirm?: boolean;
|
|
@@ -573,7 +588,7 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
573
588
|
handlePermanentlyDeleteDeletedTask: (id: string) => Promise<boolean>;
|
|
574
589
|
handleEmptyDeletedTasks: () => Promise<number | null>;
|
|
575
590
|
handleUpdateTask: (id: string, updates: Partial<TaskItem>) => Promise<boolean | undefined>;
|
|
576
|
-
handleSetStatus: (task: TaskItem, status: import("../core/TaskDurableStatusMutationService").DurableTaskTargetStatus, updates?: Partial<TaskItem
|
|
591
|
+
handleSetStatus: (task: TaskItem, status: import("../core/TaskDurableStatusMutationService").DurableTaskTargetStatus, updates?: Partial<TaskItem>, expectedDetailRevisionOverride?: string | null) => Promise<void>;
|
|
577
592
|
editingTaskId: string | null;
|
|
578
593
|
loading: boolean;
|
|
579
594
|
error: string;
|
|
@@ -639,6 +654,10 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
639
654
|
pushNotice: (message: string, tone?: UiNotice["tone"], ttlMs?: number, action?: {
|
|
640
655
|
label: string;
|
|
641
656
|
onAction: () => void;
|
|
657
|
+
primary?: boolean;
|
|
658
|
+
secondaryLabel?: string;
|
|
659
|
+
onSecondaryAction?: () => void;
|
|
660
|
+
dismissible?: boolean;
|
|
642
661
|
ownerKey?: string;
|
|
643
662
|
}) => void;
|
|
644
663
|
clearNotice: () => void;
|
|
@@ -735,8 +754,13 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
735
754
|
manualComplexityEnabled: boolean;
|
|
736
755
|
checklistDropdownEnabled: boolean;
|
|
737
756
|
showTaskCardStatusLabel: boolean;
|
|
757
|
+
showTaskCardDescription: boolean;
|
|
758
|
+
showTaskCardAttachments: boolean;
|
|
759
|
+
showTaskCardChecklistProgress: boolean;
|
|
760
|
+
showTaskCardLatestActivity: boolean;
|
|
761
|
+
tintTaskCardActivityBackground: boolean;
|
|
738
762
|
pathSaved: boolean;
|
|
739
|
-
initialSection: "mcp" | "categories" | "types" | "priorities" | "general" | "
|
|
763
|
+
initialSection: "mcp" | "categories" | "types" | "priorities" | "general" | "documents" | "taxonomy" | "agents" | "initiatives" | "appearance-application" | "appearance-task-cards" | "appearance-task-forms" | "integrations" | null;
|
|
740
764
|
setupState: any;
|
|
741
765
|
buildInfo: any;
|
|
742
766
|
onSaveSetupMode: (...args: any[]) => any;
|
|
@@ -744,15 +768,21 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
744
768
|
onThemeChange: (value: any) => void;
|
|
745
769
|
onSaveTheme: (...args: any[]) => any;
|
|
746
770
|
onSaveGlobalTheme: (...args: any[]) => any;
|
|
771
|
+
onUseGlobalThemeDefault: (...args: any[]) => any;
|
|
747
772
|
onKeyShortcutChange: (value: string) => void;
|
|
748
773
|
onJsonBackupEnabledChange: (...args: any[]) => any;
|
|
749
774
|
onSaveGlobalJsonBackupEnabled: (...args: any[]) => any;
|
|
775
|
+
onUseGlobalJsonBackupDefault: (...args: any[]) => any;
|
|
750
776
|
onSaveGlobalWeekStartsOn: (...args: any[]) => any;
|
|
751
777
|
onSaveLocale: (...args: any[]) => any;
|
|
752
778
|
onManualComplexityEnabledChange: (...args: any[]) => any;
|
|
753
779
|
onChecklistDropdownEnabledChange: (...args: any[]) => any;
|
|
754
780
|
onShowTaskCardStatusLabelChange: (...args: any[]) => any;
|
|
755
|
-
|
|
781
|
+
onShowTaskCardDescriptionChange: (...args: any[]) => any;
|
|
782
|
+
onShowTaskCardAttachmentsChange: (...args: any[]) => any;
|
|
783
|
+
onShowTaskCardChecklistProgressChange: (...args: any[]) => any;
|
|
784
|
+
onShowTaskCardLatestActivityChange: (...args: any[]) => any;
|
|
785
|
+
onTintTaskCardActivityBackgroundChange: (...args: any[]) => any;
|
|
756
786
|
onSaveSettings: (...args: any[]) => any;
|
|
757
787
|
initiativeTemplates: any[];
|
|
758
788
|
onRefreshInitiativeTemplates: (...args: any[]) => any;
|
|
@@ -796,7 +826,7 @@ export declare function useTaskforce({ config, initialTaskId, initialActivityEnt
|
|
|
796
826
|
cloudAuthBaseUrl: string | undefined;
|
|
797
827
|
cloudMcpBaseUrl: string | undefined;
|
|
798
828
|
workspaceSwitchingEnabled: boolean;
|
|
799
|
-
currentWorkspaceRole: "
|
|
829
|
+
currentWorkspaceRole: "owner" | "member" | "admin" | "read-only";
|
|
800
830
|
currentWorkspaceName: string;
|
|
801
831
|
onDeleteWorkspace: (...args: any[]) => any;
|
|
802
832
|
onMcpHostRootChange: (value: string) => void;
|