@taskforcehq/taskforce 0.3.329 → 0.3.332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/Taskforce.module.css +290 -45
- package/dist/components/features/AiProfilesModule.js +3 -5
- package/dist/components/features/TaskSettings.js +70 -14
- 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 +2 -2
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.js +2 -2
- 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 +15 -3
- package/dist/components/features/planning/planningMetadata.d.ts +10 -0
- package/dist/components/features/planning/planningMetadata.js +8 -0
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +15 -24
- package/dist/components/features/taskforceAgentEditorModel.d.ts +2 -1
- package/dist/components/features/taskforceAgentEditorModel.js +3 -1
- package/dist/components/features/workflowManager/workflowManagerApi.d.ts +1 -1
- package/dist/components/features/workflowManager/workflowManagerApi.js +3 -0
- package/dist/components/task/TaskWorkflowAssignmentField.js +68 -10
- package/dist/components/views/StandaloneLayout.js +62 -27
- package/dist/components/views/panels/PlanningDrawer.d.ts +2 -1
- package/dist/components/views/panels/PlanningDrawer.js +12 -8
- 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 +55 -1
- package/dist/core/McpTokenService.d.ts +25 -1
- package/dist/core/McpTokenService.js +106 -15
- 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 +43 -3
- package/dist/core/Taskforce.js +158 -7
- package/dist/core/types.d.ts +9 -0
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +2 -0
- package/dist/documentReviews/DocumentReviewCommentStore.js +28 -9
- 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/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/useSyncOrchestrator.d.ts +3 -0
- package/dist/hooks/useSyncOrchestrator.js +111 -2
- package/dist/hooks/useTaskData.d.ts +31 -1
- package/dist/hooks/useTaskData.js +29 -7
- package/dist/hooks/useTaskMutations.d.ts +3 -1
- package/dist/hooks/useTaskMutations.js +46 -12
- package/dist/hooks/useTaskforce.d.ts +2 -0
- package/dist/hooks/useTaskforce.js +11 -2
- package/dist/mcp/clientRegistry.d.ts +2 -2
- package/dist/mcp/clientRegistry.js +1 -1
- package/dist/mcp/documentAssetRegistrar.js +9 -6
- 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 +11 -0
- package/dist/mcp/httpProtocolRouting.js +22 -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 +408 -102
- package/dist/mcp/taskPlanningRegistrar.js +25 -6
- package/dist/mcp/toolProfiles.d.ts +2 -0
- package/dist/mcp/toolProfiles.js +11 -0
- package/dist/mcp/toolRegistry.d.ts +1 -0
- package/dist/mcp/toolRegistry.js +9 -8
- package/dist/mcp/workflowExecutionRegistrar.js +4 -4
- package/dist/migrations/taskSchemaMigrations.d.ts +5 -0
- package/dist/migrations/taskSchemaMigrations.js +415 -0
- package/dist/runtime/appGates.d.ts +2 -1
- package/dist/runtime/appGates.js +7 -0
- package/dist/server/buildInfo.d.ts +1 -0
- package/dist/server/buildInfo.js +5 -1
- package/dist/server/cloudMcpCapacityTelemetry.d.ts +68 -0
- package/dist/server/cloudMcpCapacityTelemetry.js +221 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +108 -11
- package/dist/server/localDatabaseIdentity.js +4 -1
- package/dist/server/localServiceLease.js +2 -1
- package/dist/server/localServiceSessions.d.ts +14 -17
- package/dist/server/localServiceSessions.js +308 -94
- package/dist/server/localWorkspaceSyncServerRuntime.js +25 -19
- package/dist/server/routes/admin.d.ts +4 -0
- package/dist/server/routes/admin.js +126 -5
- package/dist/server/routes/agents.d.ts +7 -0
- package/dist/server/routes/agents.js +277 -24
- package/dist/server/routes/billing.js +5 -1
- package/dist/server/routes/durableTaskHttpRouters.d.ts +2 -0
- 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 +136 -40
- package/dist/server/routes/modelConnections.d.ts +24 -0
- package/dist/server/routes/modelConnections.js +205 -0
- package/dist/server/routes/shared.d.ts +22 -0
- package/dist/server/routes/shared.js +298 -182
- package/dist/server/routes/sync.js +1 -0
- package/dist/server/routes/syncAuxRoutes.js +5 -1
- package/dist/server/routes/syncPushRoutes.d.ts +1 -0
- package/dist/server/routes/syncPushRoutes.js +1 -0
- package/dist/server/routes/syncV3FeedRoutes.js +10 -1
- package/dist/server/routes/syncV3OperationRoutes.js +35 -9
- package/dist/server/routes/tasks.js +21 -2
- package/dist/server/routes/workflows.js +9 -1
- package/dist/server/routes.js +59 -0
- package/dist/service/localServiceCli.d.ts +2 -2
- package/dist/service/localServiceCli.js +4 -3
- package/dist/services/codexAppServerModelGateway.d.ts +54 -5
- package/dist/services/codexAppServerModelGateway.js +246 -21
- 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 +139 -0
- package/dist/services/executorPhaseAIssuerCore.js +402 -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 +2 -2
- package/dist/services/taskforceAgentMcpBridge.js +42 -29
- 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 -9
- package/dist/shared/taskforceAgentModels.js +7 -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 +4 -0
- package/dist/storage/postgresAdapter.js +14 -1
- package/dist/storage/postgresRequestDiagnostics.d.ts +9 -1
- package/dist/storage/postgresRequestDiagnostics.js +15 -2
- package/dist/storage/postgresWorker.js +20 -2
- package/dist/storage/postgresWorkerProtocol.d.ts +7 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.d.ts +31 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.js +84 -0
- package/dist/storage/workflowStore.d.ts +2 -0
- package/dist/storage/workflowStore.js +39 -2
- package/dist/sync/cloudSyncApi.js +4 -2
- package/dist/sync/collaborationSyncState.js +5 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +60 -29
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.d.ts +10 -0
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.js +29 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.d.ts +3 -1
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +18 -0
- 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/workspaceSyncEngineLifecyclePolicy.js +6 -6
- 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/workspaceSyncEngineRuntime.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +112 -38
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +6 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +3 -1
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +31 -0
- package/dist/sync/syncApplyHandlers.d.ts +3 -0
- package/dist/sync/syncApplyHandlers.js +81 -15
- package/dist/sync/syncService.d.ts +15 -0
- package/dist/sync/syncService.js +83 -18
- package/dist/sync/taskforceAgentSyncAuthorization.d.ts +16 -0
- package/dist/sync/taskforceAgentSyncAuthorization.js +20 -0
- package/dist/sync/v3/combinedFeedCapability.js +4 -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.js +3 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +2 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +58 -15
- package/dist/sync/v3/durableTaskCommentMutationRouter.js +3 -0
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +1 -1
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +10 -0
- package/dist/sync/v3/durableTaxonomyMutationRouter.js +5 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +18 -7
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +89 -23
- 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/localOutboxRecoveryPreparationService.js +8 -2
- 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.d.ts +3 -1
- package/dist/sync/v3/localTaskCreateOutboxService.js +6 -1
- package/dist/sync/v3/localTaskDeleteOutboxService.js +1 -0
- package/dist/sync/v3/localTaskLifecycleOutboxService.d.ts +2 -1
- package/dist/sync/v3/localTaskLifecycleOutboxService.js +5 -1
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +2 -1
- package/dist/sync/v3/localTaskMetadataOutboxService.js +6 -2
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +10 -1
- package/dist/sync/v3/localTaskStatusOutboxService.js +238 -16
- package/dist/sync/v3/syncDurabilityStore.d.ts +36 -1
- package/dist/sync/v3/syncDurabilityStore.js +202 -8
- package/dist/sync/v3/taskChecklistMutationService.d.ts +11 -0
- package/dist/sync/v3/taskChecklistMutationService.js +44 -1
- package/dist/sync/v3/taskStatusMutationService.d.ts +29 -1
- package/dist/sync/v3/taskStatusMutationService.js +119 -3
- package/dist/sync/v3/workflowAssignmentSync.d.ts +5 -0
- package/dist/sync/v3/workflowAssignmentSync.js +27 -0
- package/dist/sync/v3/workflowRuntimeMutationService.d.ts +5 -0
- package/dist/sync/v3/workflowRuntimeMutationService.js +124 -71
- 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/workspaceSyncV3CloudOperationHandler.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +9 -2
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +25 -3
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +44 -32
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +9 -5
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +54 -38
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +70 -31
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +16 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +6 -0
- package/dist/sync/v3/workspaceSyncV3Feed.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3Feed.js +6 -1
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +2 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +49 -18
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +5 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +36 -2
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.d.ts +17 -0
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.js +64 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.js +50 -5
- 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/workspaceRepair.d.ts +5 -2
- package/dist/sync/workspaceRepair.js +161 -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/ui/assets/AiIdentityRosterCard-CDMPtnbC.js +1 -0
- package/dist/ui/assets/AiProfilesModule-Cww85C4E.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-B68Wg-RV.js → AnnotatedAttachmentWorkspace-Dt9TKYSH.js} +1 -1
- package/dist/ui/assets/{AssetTraySortControl-C8Rztyal.js → AssetTraySortControl-CKgapnxu.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-Cj3c7X9y.js → ContextAttachmentManager-T-cEVcOZ.js} +2 -2
- package/dist/ui/assets/{DocumentWorkspace-B5uvzems.js → DocumentWorkspace-HD4MUjAZ.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BVFvCB5R.js → EntityActivityTimeline-_V0zfMuh.js} +1 -1
- package/dist/ui/assets/PlanningModule-mTkBygsB.js +1 -0
- package/dist/ui/assets/{PlansPage-AY4cGWco.js → PlansPage-Btiq06VO.js} +1 -1
- package/dist/ui/assets/{TaskContextUpload-DZxTVesW.js → TaskContextUpload-C00NVUpn.js} +1 -1
- package/dist/ui/assets/TaskSettings-Cp-L-4xh.js +12 -0
- package/dist/ui/assets/TaskforceAgentsModule-Coq9-PUp.js +24 -0
- package/dist/ui/assets/TaskforceAgentsModule-b-8R25cJ.css +1 -0
- package/dist/ui/assets/{WorkflowManagerModule-DEr5di_r.js → WorkflowManagerModule-CuqRzMmM.js} +1 -1
- package/dist/ui/assets/index-BZ-hdZSk.css +1 -0
- package/dist/ui/assets/index-DSQINwt9.js +7 -0
- package/dist/ui/assets/{vendor-icons-D9Lpw-j4.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/taskEvents.d.ts +2 -0
- package/dist/utils/workspaceSyncPresentation.d.ts +1 -1
- package/dist/utils/workspaceSyncPresentation.js +23 -17
- package/package.json +24 -4
- package/dist/ui/assets/AiIdentityRosterCard-BZM4aQnM.js +0 -1
- package/dist/ui/assets/AiProfilesModule-BbAEWtHH.js +0 -1
- package/dist/ui/assets/PlanningModule-B5DWQOGz.js +0 -1
- package/dist/ui/assets/TaskSettings-BeWAuyZj.js +0 -12
- package/dist/ui/assets/TaskforceAgentsModule-BifCYtjR.js +0 -21
- package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +0 -1
- package/dist/ui/assets/index-I5zhdtgt.js +0 -7
- package/dist/ui/assets/index-VRFsx3wz.css +0 -1
|
@@ -534,6 +534,7 @@ export function ensureWorkspaceSchema(db) {
|
|
|
534
534
|
user_id TEXT NOT NULL,
|
|
535
535
|
name TEXT NOT NULL,
|
|
536
536
|
scopes_json TEXT NOT NULL,
|
|
537
|
+
tool_profile TEXT NOT NULL DEFAULT 'default',
|
|
537
538
|
token_prefix TEXT NOT NULL,
|
|
538
539
|
token_hash TEXT NOT NULL,
|
|
539
540
|
status TEXT NOT NULL DEFAULT 'active',
|
|
@@ -654,6 +655,7 @@ export function ensureWorkspaceSchema(db) {
|
|
|
654
655
|
{ name: 'user_id', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN user_id TEXT NOT NULL DEFAULT ''` },
|
|
655
656
|
{ name: 'name', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN name TEXT NOT NULL DEFAULT ''` },
|
|
656
657
|
{ name: 'scopes_json', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN scopes_json TEXT NOT NULL DEFAULT '[]'` },
|
|
658
|
+
{ name: 'tool_profile', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN tool_profile TEXT NOT NULL DEFAULT 'default'` },
|
|
657
659
|
{ name: 'token_prefix', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN token_prefix TEXT NOT NULL DEFAULT ''` },
|
|
658
660
|
{ name: 'token_hash', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN token_hash TEXT NOT NULL DEFAULT ''` },
|
|
659
661
|
{ name: 'status', sql: `ALTER TABLE mcp_access_tokens ADD COLUMN status TEXT NOT NULL DEFAULT 'active'` },
|
|
@@ -1688,6 +1690,9 @@ export function buildWorkspaceSyncDurabilitySchemaSql(provider) {
|
|
|
1688
1690
|
CREATE INDEX IF NOT EXISTS idx_workspace_sync_repair_snapshots_expiry
|
|
1689
1691
|
ON workspace_sync_repair_snapshots(tenant_id, workspace_id, expires_at);
|
|
1690
1692
|
|
|
1693
|
+
CREATE INDEX IF NOT EXISTS idx_workspace_sync_repair_snapshots_global_expiry
|
|
1694
|
+
ON workspace_sync_repair_snapshots(tenant_id, expires_at, workspace_id, snapshot_id);
|
|
1695
|
+
|
|
1691
1696
|
CREATE INDEX IF NOT EXISTS idx_workspace_sync_repair_snapshots_created
|
|
1692
1697
|
ON workspace_sync_repair_snapshots(tenant_id, workspace_id, created_at);
|
|
1693
1698
|
|
|
@@ -1730,6 +1735,60 @@ export function buildWorkspaceSyncDurabilitySchemaSql(provider) {
|
|
|
1730
1735
|
}
|
|
1731
1736
|
export function ensureWorkspaceSyncDurabilitySchema(db) {
|
|
1732
1737
|
db.exec(buildWorkspaceSyncDurabilitySchemaSql(db.provider));
|
|
1738
|
+
db.exec(`
|
|
1739
|
+
CREATE TABLE IF NOT EXISTS workspace_sync_content_tombstone_provenance (
|
|
1740
|
+
id TEXT PRIMARY KEY,
|
|
1741
|
+
tenant_id TEXT NOT NULL,
|
|
1742
|
+
workspace_id TEXT NOT NULL,
|
|
1743
|
+
kind TEXT NOT NULL,
|
|
1744
|
+
logical_path TEXT NOT NULL,
|
|
1745
|
+
source TEXT NOT NULL,
|
|
1746
|
+
operation_id TEXT,
|
|
1747
|
+
actor_id TEXT,
|
|
1748
|
+
source_runtime TEXT,
|
|
1749
|
+
source_updated_at TEXT NOT NULL,
|
|
1750
|
+
repair_involved INTEGER NOT NULL DEFAULT 0,
|
|
1751
|
+
recorded_at TEXT NOT NULL
|
|
1752
|
+
);
|
|
1753
|
+
CREATE INDEX IF NOT EXISTS idx_workspace_sync_content_tombstone_provenance_path
|
|
1754
|
+
ON workspace_sync_content_tombstone_provenance(
|
|
1755
|
+
tenant_id, workspace_id, kind, logical_path, recorded_at
|
|
1756
|
+
);
|
|
1757
|
+
CREATE INDEX IF NOT EXISTS idx_workspace_sync_content_tombstone_provenance_recorded
|
|
1758
|
+
ON workspace_sync_content_tombstone_provenance(tenant_id, workspace_id, recorded_at);
|
|
1759
|
+
`);
|
|
1760
|
+
// workspace_sync_content_pull_obligations (T-1607) is normally created by
|
|
1761
|
+
// ensureLocalSyncCoordinatorSchema, but that function only runs for
|
|
1762
|
+
// runtimeMode === 'local' (see core/Taskforce.ts). Cloud/Postgres deployments
|
|
1763
|
+
// otherwise depended solely on the static migrations/postgres/001_init.sql
|
|
1764
|
+
// bootstrap, which only benefits brand-new databases — an existing cloud
|
|
1765
|
+
// deployment provisioned before that table existed would never self-heal.
|
|
1766
|
+
// ensureWorkspaceSyncDurabilitySchema runs unconditionally on every startup
|
|
1767
|
+
// for both runtimes, so creating it here too (idempotently) closes that gap
|
|
1768
|
+
// for already-provisioned cloud deployments as well.
|
|
1769
|
+
db.exec(`
|
|
1770
|
+
CREATE TABLE IF NOT EXISTS workspace_sync_content_pull_obligations (
|
|
1771
|
+
tenant_id TEXT NOT NULL,
|
|
1772
|
+
workspace_id TEXT NOT NULL,
|
|
1773
|
+
kind TEXT NOT NULL,
|
|
1774
|
+
path TEXT NOT NULL,
|
|
1775
|
+
source_watermark TEXT NOT NULL,
|
|
1776
|
+
metadata_fingerprint TEXT NOT NULL,
|
|
1777
|
+
expected_sha256 TEXT NOT NULL,
|
|
1778
|
+
expected_size_bytes INTEGER NOT NULL,
|
|
1779
|
+
manifest_updated_at TEXT NOT NULL,
|
|
1780
|
+
attempts INTEGER NOT NULL DEFAULT 0,
|
|
1781
|
+
last_error TEXT,
|
|
1782
|
+
created_at TEXT NOT NULL,
|
|
1783
|
+
updated_at TEXT NOT NULL,
|
|
1784
|
+
resolved_at TEXT,
|
|
1785
|
+
PRIMARY KEY (tenant_id, workspace_id, kind, path)
|
|
1786
|
+
);
|
|
1787
|
+
CREATE INDEX IF NOT EXISTS idx_workspace_sync_content_pull_obligations_open
|
|
1788
|
+
ON workspace_sync_content_pull_obligations(
|
|
1789
|
+
tenant_id, workspace_id, resolved_at, updated_at, kind, path
|
|
1790
|
+
);
|
|
1791
|
+
`);
|
|
1733
1792
|
if (db.provider === 'sqlite' && hasTable(db, 'tasks')) {
|
|
1734
1793
|
db.exec(`
|
|
1735
1794
|
CREATE TRIGGER IF NOT EXISTS trg_tasks_v3_create_fence
|
|
@@ -2076,6 +2135,7 @@ export function ensureLocalSyncCoordinatorSchema(db) {
|
|
|
2076
2135
|
upstream_disposition TEXT NOT NULL,
|
|
2077
2136
|
last_committed_cursor_json TEXT,
|
|
2078
2137
|
required_action TEXT NOT NULL,
|
|
2138
|
+
coalescing_key TEXT,
|
|
2079
2139
|
created_at TEXT NOT NULL,
|
|
2080
2140
|
resolved_at TEXT,
|
|
2081
2141
|
resolved_boundary_json TEXT
|
|
@@ -2292,6 +2352,17 @@ export function ensureLocalSyncCoordinatorSchema(db) {
|
|
|
2292
2352
|
ADD COLUMN resolved_boundary_json TEXT
|
|
2293
2353
|
`);
|
|
2294
2354
|
}
|
|
2355
|
+
if (!recoveryObligationColumns.has('coalescing_key')) {
|
|
2356
|
+
db.exec(`
|
|
2357
|
+
ALTER TABLE local_sync_recovery_obligations
|
|
2358
|
+
ADD COLUMN coalescing_key TEXT
|
|
2359
|
+
`);
|
|
2360
|
+
}
|
|
2361
|
+
db.exec(`
|
|
2362
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_local_sync_recovery_obligations_open_key
|
|
2363
|
+
ON local_sync_recovery_obligations(coalescing_key)
|
|
2364
|
+
WHERE coalescing_key IS NOT NULL AND resolved_at IS NULL
|
|
2365
|
+
`);
|
|
2295
2366
|
}
|
|
2296
2367
|
export function ensureWorkspaceDocumentsSchema(db) {
|
|
2297
2368
|
db.exec(`
|
|
@@ -2425,6 +2496,350 @@ export function ensureTaskforceAgentsSchema(db) {
|
|
|
2425
2496
|
: `ALTER TABLE agent_conversations ADD COLUMN task_id TEXT`);
|
|
2426
2497
|
}
|
|
2427
2498
|
}
|
|
2499
|
+
export function ensureModelProviderConnectionsSchema(db) {
|
|
2500
|
+
db.exec(`
|
|
2501
|
+
CREATE TABLE IF NOT EXISTS model_provider_connections (
|
|
2502
|
+
id TEXT PRIMARY KEY,
|
|
2503
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2504
|
+
owner_user_id TEXT NOT NULL,
|
|
2505
|
+
provider_key TEXT NOT NULL,
|
|
2506
|
+
authentication_type TEXT NOT NULL,
|
|
2507
|
+
lifecycle_status TEXT NOT NULL DEFAULT 'pending',
|
|
2508
|
+
display_metadata_json TEXT NOT NULL DEFAULT '{}',
|
|
2509
|
+
credential_home_ref TEXT NOT NULL,
|
|
2510
|
+
last_verified_at TEXT,
|
|
2511
|
+
last_refreshed_at TEXT,
|
|
2512
|
+
last_failure_at TEXT,
|
|
2513
|
+
failure_code TEXT,
|
|
2514
|
+
disconnected_at TEXT,
|
|
2515
|
+
revoked_at TEXT,
|
|
2516
|
+
revoked_by_user_id TEXT,
|
|
2517
|
+
created_at TEXT NOT NULL,
|
|
2518
|
+
updated_at TEXT NOT NULL,
|
|
2519
|
+
UNIQUE (tenant_id, credential_home_ref),
|
|
2520
|
+
FOREIGN KEY (owner_user_id) REFERENCES users(id)
|
|
2521
|
+
);
|
|
2522
|
+
|
|
2523
|
+
CREATE INDEX IF NOT EXISTS idx_model_provider_connections_owner
|
|
2524
|
+
ON model_provider_connections(tenant_id, owner_user_id, lifecycle_status, updated_at);
|
|
2525
|
+
|
|
2526
|
+
CREATE TABLE IF NOT EXISTS model_provider_connection_leases (
|
|
2527
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2528
|
+
connection_id TEXT NOT NULL,
|
|
2529
|
+
lease_token TEXT NOT NULL,
|
|
2530
|
+
operation TEXT NOT NULL,
|
|
2531
|
+
acquired_at TEXT NOT NULL,
|
|
2532
|
+
expires_at TEXT NOT NULL,
|
|
2533
|
+
updated_at TEXT NOT NULL,
|
|
2534
|
+
PRIMARY KEY (tenant_id, connection_id),
|
|
2535
|
+
FOREIGN KEY (connection_id) REFERENCES model_provider_connections(id) ON DELETE CASCADE
|
|
2536
|
+
);
|
|
2537
|
+
|
|
2538
|
+
CREATE INDEX IF NOT EXISTS idx_model_provider_connection_leases_expiry
|
|
2539
|
+
ON model_provider_connection_leases(tenant_id, expires_at);
|
|
2540
|
+
|
|
2541
|
+
CREATE TABLE IF NOT EXISTS model_provider_connection_events (
|
|
2542
|
+
id TEXT PRIMARY KEY,
|
|
2543
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2544
|
+
connection_id TEXT NOT NULL,
|
|
2545
|
+
owner_user_id TEXT NOT NULL,
|
|
2546
|
+
actor_user_id TEXT NOT NULL,
|
|
2547
|
+
event_type TEXT NOT NULL,
|
|
2548
|
+
outcome TEXT NOT NULL,
|
|
2549
|
+
reason_code TEXT,
|
|
2550
|
+
created_at TEXT NOT NULL
|
|
2551
|
+
);
|
|
2552
|
+
|
|
2553
|
+
CREATE INDEX IF NOT EXISTS idx_model_provider_connection_events_connection
|
|
2554
|
+
ON model_provider_connection_events(tenant_id, connection_id, created_at);
|
|
2555
|
+
`);
|
|
2556
|
+
}
|
|
2557
|
+
export function ensureTaskforceAgentConnectionBindingsSchema(db) {
|
|
2558
|
+
db.exec(`
|
|
2559
|
+
CREATE TABLE IF NOT EXISTS taskforce_agent_connection_bindings (
|
|
2560
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2561
|
+
workspace_id TEXT NOT NULL DEFAULT 'default',
|
|
2562
|
+
agent_id TEXT NOT NULL,
|
|
2563
|
+
connection_id TEXT NOT NULL,
|
|
2564
|
+
owner_user_id TEXT NOT NULL,
|
|
2565
|
+
provider_key TEXT NOT NULL,
|
|
2566
|
+
model_source TEXT NOT NULL,
|
|
2567
|
+
created_by_user_id TEXT NOT NULL,
|
|
2568
|
+
updated_by_user_id TEXT NOT NULL,
|
|
2569
|
+
created_at TEXT NOT NULL,
|
|
2570
|
+
updated_at TEXT NOT NULL,
|
|
2571
|
+
PRIMARY KEY (tenant_id, workspace_id, agent_id),
|
|
2572
|
+
FOREIGN KEY (agent_id) REFERENCES taskforce_agents(id) ON DELETE CASCADE,
|
|
2573
|
+
FOREIGN KEY (connection_id) REFERENCES model_provider_connections(id) ON DELETE CASCADE
|
|
2574
|
+
);
|
|
2575
|
+
|
|
2576
|
+
CREATE INDEX IF NOT EXISTS idx_taskforce_agent_connection_bindings_owner
|
|
2577
|
+
ON taskforce_agent_connection_bindings(
|
|
2578
|
+
tenant_id, workspace_id, owner_user_id, updated_at
|
|
2579
|
+
);
|
|
2580
|
+
|
|
2581
|
+
CREATE INDEX IF NOT EXISTS idx_taskforce_agent_connection_bindings_connection
|
|
2582
|
+
ON taskforce_agent_connection_bindings(tenant_id, connection_id);
|
|
2583
|
+
`);
|
|
2584
|
+
}
|
|
2585
|
+
export function ensureGitHubReviewEvidenceInstallationBindingsSchema(db) {
|
|
2586
|
+
db.exec(`
|
|
2587
|
+
CREATE TABLE IF NOT EXISTS github_review_evidence_installation_bindings (
|
|
2588
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2589
|
+
workspace_id TEXT NOT NULL,
|
|
2590
|
+
installation_id TEXT NOT NULL,
|
|
2591
|
+
account_id TEXT NOT NULL,
|
|
2592
|
+
account_login TEXT NOT NULL,
|
|
2593
|
+
account_type TEXT NOT NULL,
|
|
2594
|
+
repository_selection TEXT NOT NULL,
|
|
2595
|
+
bound_by_user_id TEXT NOT NULL,
|
|
2596
|
+
created_at TEXT NOT NULL,
|
|
2597
|
+
updated_at TEXT NOT NULL,
|
|
2598
|
+
PRIMARY KEY (tenant_id, workspace_id),
|
|
2599
|
+
UNIQUE (installation_id),
|
|
2600
|
+
FOREIGN KEY (workspace_id) REFERENCES workspaces(id) ON DELETE CASCADE
|
|
2601
|
+
);
|
|
2602
|
+
|
|
2603
|
+
CREATE INDEX IF NOT EXISTS idx_github_review_evidence_installation
|
|
2604
|
+
ON github_review_evidence_installation_bindings(tenant_id, installation_id);
|
|
2605
|
+
`);
|
|
2606
|
+
}
|
|
2607
|
+
export function ensureExecutorPhaseAApprovalReceiptsSchema(db) {
|
|
2608
|
+
const bytesType = db.provider === 'postgres' ? 'BYTEA' : 'BLOB';
|
|
2609
|
+
if (hasTable(db, 'executor_phase_a_approval_receipts')) {
|
|
2610
|
+
if (db.provider === 'postgres') {
|
|
2611
|
+
db.exec(`
|
|
2612
|
+
ALTER TABLE executor_phase_a_approval_receipts
|
|
2613
|
+
ADD COLUMN IF NOT EXISTS receipt_kind TEXT,
|
|
2614
|
+
ADD COLUMN IF NOT EXISTS original_capability_id TEXT,
|
|
2615
|
+
ADD COLUMN IF NOT EXISTS residual_inventory_sha256 TEXT;
|
|
2616
|
+
UPDATE executor_phase_a_approval_receipts
|
|
2617
|
+
SET receipt_kind = 'main'
|
|
2618
|
+
WHERE receipt_kind IS NULL;
|
|
2619
|
+
ALTER TABLE executor_phase_a_approval_receipts
|
|
2620
|
+
ALTER COLUMN receipt_kind SET NOT NULL;
|
|
2621
|
+
DO $$
|
|
2622
|
+
BEGIN
|
|
2623
|
+
IF NOT EXISTS (
|
|
2624
|
+
SELECT 1 FROM pg_constraint
|
|
2625
|
+
WHERE conrelid = 'executor_phase_a_approval_receipts'::regclass
|
|
2626
|
+
AND conname = 'executor_phase_a_approval_receipts_kind_check'
|
|
2627
|
+
) THEN
|
|
2628
|
+
ALTER TABLE executor_phase_a_approval_receipts
|
|
2629
|
+
ADD CONSTRAINT executor_phase_a_approval_receipts_kind_check
|
|
2630
|
+
CHECK (receipt_kind IN ('main', 'cleanup-only'));
|
|
2631
|
+
END IF;
|
|
2632
|
+
END $$;
|
|
2633
|
+
`);
|
|
2634
|
+
const legacyConstraints = db.prepare(`
|
|
2635
|
+
SELECT constraint_name AS name
|
|
2636
|
+
FROM information_schema.table_constraints
|
|
2637
|
+
WHERE table_schema = current_schema()
|
|
2638
|
+
AND table_name = 'executor_phase_a_approval_receipts'
|
|
2639
|
+
AND constraint_type = 'UNIQUE'
|
|
2640
|
+
`).all();
|
|
2641
|
+
for (const constraint of legacyConstraints) {
|
|
2642
|
+
const name = String(constraint.name || '');
|
|
2643
|
+
if (!/^[A-Za-z0-9_]+$/.test(name))
|
|
2644
|
+
continue;
|
|
2645
|
+
const columns = db.prepare(`
|
|
2646
|
+
SELECT column_name AS name
|
|
2647
|
+
FROM information_schema.key_column_usage
|
|
2648
|
+
WHERE table_schema = current_schema()
|
|
2649
|
+
AND table_name = 'executor_phase_a_approval_receipts'
|
|
2650
|
+
AND constraint_name = ?
|
|
2651
|
+
ORDER BY ordinal_position
|
|
2652
|
+
`).all(name);
|
|
2653
|
+
if (columns.map((column) => column.name).join(',') === 'tenant_id,workspace_id,task_id,run_id') {
|
|
2654
|
+
db.exec(`ALTER TABLE executor_phase_a_approval_receipts DROP CONSTRAINT "${name}"`);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
else {
|
|
2659
|
+
const columns = db.prepare(`PRAGMA table_info(executor_phase_a_approval_receipts)`).all();
|
|
2660
|
+
if (!columns.some((column) => column.name === 'receipt_kind')) {
|
|
2661
|
+
db.transaction(() => db.exec(`
|
|
2662
|
+
ALTER TABLE executor_phase_a_approval_receipts RENAME TO executor_phase_a_approval_receipts_v1;
|
|
2663
|
+
CREATE TABLE executor_phase_a_approval_receipts (
|
|
2664
|
+
receipt_id TEXT PRIMARY KEY,
|
|
2665
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2666
|
+
workspace_id TEXT NOT NULL,
|
|
2667
|
+
task_id TEXT NOT NULL,
|
|
2668
|
+
task_reference TEXT NOT NULL,
|
|
2669
|
+
run_id TEXT NOT NULL,
|
|
2670
|
+
receipt_kind TEXT NOT NULL CHECK (receipt_kind IN ('main', 'cleanup-only')),
|
|
2671
|
+
original_capability_id TEXT,
|
|
2672
|
+
residual_inventory_sha256 TEXT,
|
|
2673
|
+
actor_user_id TEXT NOT NULL,
|
|
2674
|
+
preflight_sha256 TEXT NOT NULL,
|
|
2675
|
+
logical_envelope_sha256 TEXT NOT NULL,
|
|
2676
|
+
canonical_preflight_bytes BLOB NOT NULL,
|
|
2677
|
+
canonical_receipt_bytes BLOB NOT NULL,
|
|
2678
|
+
receipt_sha256 TEXT NOT NULL,
|
|
2679
|
+
key_id TEXT NOT NULL,
|
|
2680
|
+
approved_at TEXT NOT NULL,
|
|
2681
|
+
expires_at TEXT NOT NULL,
|
|
2682
|
+
created_at TEXT NOT NULL,
|
|
2683
|
+
UNIQUE (tenant_id, workspace_id, task_id, run_id, receipt_kind)
|
|
2684
|
+
);
|
|
2685
|
+
INSERT INTO executor_phase_a_approval_receipts (
|
|
2686
|
+
receipt_id, tenant_id, workspace_id, task_id, task_reference, run_id,
|
|
2687
|
+
receipt_kind, original_capability_id, residual_inventory_sha256,
|
|
2688
|
+
actor_user_id, preflight_sha256, logical_envelope_sha256,
|
|
2689
|
+
canonical_preflight_bytes, canonical_receipt_bytes, receipt_sha256,
|
|
2690
|
+
key_id, approved_at, expires_at, created_at
|
|
2691
|
+
)
|
|
2692
|
+
SELECT receipt_id, tenant_id, workspace_id, task_id, task_reference, run_id,
|
|
2693
|
+
'main', NULL, NULL, actor_user_id, preflight_sha256, logical_envelope_sha256,
|
|
2694
|
+
canonical_preflight_bytes, canonical_receipt_bytes, receipt_sha256,
|
|
2695
|
+
key_id, approved_at, expires_at, created_at
|
|
2696
|
+
FROM executor_phase_a_approval_receipts_v1;
|
|
2697
|
+
DROP TABLE executor_phase_a_approval_receipts_v1;
|
|
2698
|
+
`))();
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
db.exec(`
|
|
2703
|
+
CREATE TABLE IF NOT EXISTS executor_phase_a_approval_receipts (
|
|
2704
|
+
receipt_id TEXT PRIMARY KEY,
|
|
2705
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2706
|
+
workspace_id TEXT NOT NULL,
|
|
2707
|
+
task_id TEXT NOT NULL,
|
|
2708
|
+
task_reference TEXT NOT NULL,
|
|
2709
|
+
run_id TEXT NOT NULL,
|
|
2710
|
+
receipt_kind TEXT NOT NULL CHECK (receipt_kind IN ('main', 'cleanup-only')),
|
|
2711
|
+
original_capability_id TEXT,
|
|
2712
|
+
residual_inventory_sha256 TEXT,
|
|
2713
|
+
actor_user_id TEXT NOT NULL,
|
|
2714
|
+
preflight_sha256 TEXT NOT NULL,
|
|
2715
|
+
logical_envelope_sha256 TEXT NOT NULL,
|
|
2716
|
+
canonical_preflight_bytes ${bytesType} NOT NULL,
|
|
2717
|
+
canonical_receipt_bytes ${bytesType} NOT NULL,
|
|
2718
|
+
receipt_sha256 TEXT NOT NULL,
|
|
2719
|
+
key_id TEXT NOT NULL,
|
|
2720
|
+
approved_at TEXT NOT NULL,
|
|
2721
|
+
expires_at TEXT NOT NULL,
|
|
2722
|
+
created_at TEXT NOT NULL,
|
|
2723
|
+
UNIQUE (tenant_id, workspace_id, task_id, run_id, receipt_kind)
|
|
2724
|
+
);
|
|
2725
|
+
|
|
2726
|
+
CREATE INDEX IF NOT EXISTS idx_executor_phase_a_receipts_scope
|
|
2727
|
+
ON executor_phase_a_approval_receipts(tenant_id, workspace_id, task_id, approved_at);
|
|
2728
|
+
|
|
2729
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_executor_phase_a_receipts_run_kind
|
|
2730
|
+
ON executor_phase_a_approval_receipts(tenant_id, workspace_id, task_id, run_id, receipt_kind);
|
|
2731
|
+
`);
|
|
2732
|
+
}
|
|
2733
|
+
export function ensureExecutorPhaseARunAuthorizationsSchema(db) {
|
|
2734
|
+
db.exec(`
|
|
2735
|
+
CREATE TABLE IF NOT EXISTS executor_phase_a_run_capabilities (
|
|
2736
|
+
capability_id TEXT PRIMARY KEY,
|
|
2737
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2738
|
+
workspace_id TEXT NOT NULL,
|
|
2739
|
+
task_id TEXT NOT NULL,
|
|
2740
|
+
run_id TEXT NOT NULL,
|
|
2741
|
+
receipt_id TEXT NOT NULL,
|
|
2742
|
+
receipt_sha256 TEXT NOT NULL,
|
|
2743
|
+
capability_kind TEXT NOT NULL CHECK (capability_kind IN ('main', 'cleanup-only')),
|
|
2744
|
+
original_capability_id TEXT,
|
|
2745
|
+
residual_inventory_sha256 TEXT,
|
|
2746
|
+
actor_user_id TEXT NOT NULL,
|
|
2747
|
+
account_id TEXT NOT NULL,
|
|
2748
|
+
region TEXT NOT NULL,
|
|
2749
|
+
availability_zone TEXT NOT NULL,
|
|
2750
|
+
read_principal_arn TEXT NOT NULL,
|
|
2751
|
+
broker_key_fingerprint TEXT NOT NULL,
|
|
2752
|
+
capability_sha256 TEXT NOT NULL,
|
|
2753
|
+
preflight_sha256 TEXT NOT NULL,
|
|
2754
|
+
logical_envelope_sha256 TEXT NOT NULL,
|
|
2755
|
+
source_commit TEXT NOT NULL,
|
|
2756
|
+
role_map_sha256 TEXT NOT NULL,
|
|
2757
|
+
oidc_audience_sha256 TEXT NOT NULL,
|
|
2758
|
+
issued_at TEXT NOT NULL,
|
|
2759
|
+
expires_at TEXT NOT NULL,
|
|
2760
|
+
mutation_deadline TEXT NOT NULL,
|
|
2761
|
+
cleanup_deadline TEXT NOT NULL,
|
|
2762
|
+
status TEXT NOT NULL CHECK (status IN (
|
|
2763
|
+
'active', 'awaiting-cleanup-approval', 'completed', 'cleanup-failed', 'expired'
|
|
2764
|
+
)),
|
|
2765
|
+
hard_stopped_at TEXT,
|
|
2766
|
+
created_at TEXT NOT NULL,
|
|
2767
|
+
updated_at TEXT NOT NULL,
|
|
2768
|
+
UNIQUE (tenant_id, workspace_id, task_id, run_id, receipt_id, broker_key_fingerprint),
|
|
2769
|
+
UNIQUE (tenant_id, receipt_id),
|
|
2770
|
+
UNIQUE (tenant_id, original_capability_id)
|
|
2771
|
+
);
|
|
2772
|
+
|
|
2773
|
+
CREATE INDEX IF NOT EXISTS idx_executor_phase_a_run_capabilities_scope
|
|
2774
|
+
ON executor_phase_a_run_capabilities(tenant_id, workspace_id, task_id, run_id, status);
|
|
2775
|
+
|
|
2776
|
+
CREATE TABLE IF NOT EXISTS executor_phase_a_sender_nonces (
|
|
2777
|
+
nonce_id TEXT PRIMARY KEY,
|
|
2778
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2779
|
+
capability_id TEXT NOT NULL,
|
|
2780
|
+
request_sha256 TEXT NOT NULL,
|
|
2781
|
+
phase TEXT NOT NULL CHECK (phase IN ('bootstrap', 'ami-build', 'provenance', 'runtime', 'cleanup')),
|
|
2782
|
+
issued_at TEXT NOT NULL,
|
|
2783
|
+
expires_at TEXT NOT NULL,
|
|
2784
|
+
consumed_at TEXT,
|
|
2785
|
+
status TEXT NOT NULL CHECK (status IN ('issued', 'consumed', 'revoked', 'expired')),
|
|
2786
|
+
created_at TEXT NOT NULL,
|
|
2787
|
+
updated_at TEXT NOT NULL,
|
|
2788
|
+
UNIQUE (tenant_id, capability_id, nonce_id),
|
|
2789
|
+
FOREIGN KEY (capability_id) REFERENCES executor_phase_a_run_capabilities(capability_id) ON DELETE RESTRICT
|
|
2790
|
+
);
|
|
2791
|
+
|
|
2792
|
+
CREATE TABLE IF NOT EXISTS executor_phase_a_workload_grants (
|
|
2793
|
+
grant_id TEXT PRIMARY KEY,
|
|
2794
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2795
|
+
capability_id TEXT NOT NULL,
|
|
2796
|
+
workspace_id TEXT NOT NULL,
|
|
2797
|
+
task_id TEXT NOT NULL,
|
|
2798
|
+
run_id TEXT NOT NULL,
|
|
2799
|
+
receipt_id TEXT NOT NULL,
|
|
2800
|
+
phase TEXT NOT NULL CHECK (phase IN ('bootstrap', 'ami-build', 'provenance', 'runtime', 'cleanup')),
|
|
2801
|
+
role_arn TEXT NOT NULL,
|
|
2802
|
+
grant_sha256 TEXT NOT NULL,
|
|
2803
|
+
token_id TEXT NOT NULL,
|
|
2804
|
+
nonce_id TEXT NOT NULL,
|
|
2805
|
+
sender_proof_sha256 TEXT NOT NULL,
|
|
2806
|
+
broker_key_fingerprint TEXT NOT NULL,
|
|
2807
|
+
source_identity TEXT NOT NULL,
|
|
2808
|
+
session_tags_sha256 TEXT NOT NULL,
|
|
2809
|
+
policy_sha256 TEXT NOT NULL,
|
|
2810
|
+
issued_at TEXT NOT NULL,
|
|
2811
|
+
expires_at TEXT NOT NULL,
|
|
2812
|
+
used_at TEXT,
|
|
2813
|
+
status TEXT NOT NULL CHECK (status IN ('issued', 'used', 'revoked', 'rejected', 'expired')),
|
|
2814
|
+
created_at TEXT NOT NULL,
|
|
2815
|
+
updated_at TEXT NOT NULL,
|
|
2816
|
+
UNIQUE (tenant_id, token_id),
|
|
2817
|
+
UNIQUE (tenant_id, capability_id, nonce_id),
|
|
2818
|
+
UNIQUE (tenant_id, capability_id, sender_proof_sha256),
|
|
2819
|
+
FOREIGN KEY (capability_id) REFERENCES executor_phase_a_run_capabilities(capability_id) ON DELETE RESTRICT
|
|
2820
|
+
);
|
|
2821
|
+
|
|
2822
|
+
CREATE INDEX IF NOT EXISTS idx_executor_phase_a_workload_grants_scope
|
|
2823
|
+
ON executor_phase_a_workload_grants(tenant_id, capability_id, phase, status, issued_at);
|
|
2824
|
+
|
|
2825
|
+
CREATE TABLE IF NOT EXISTS executor_phase_a_issuer_redemptions (
|
|
2826
|
+
request_id TEXT PRIMARY KEY,
|
|
2827
|
+
tenant_id TEXT NOT NULL DEFAULT 'default',
|
|
2828
|
+
grant_id TEXT NOT NULL,
|
|
2829
|
+
grant_sha256 TEXT NOT NULL,
|
|
2830
|
+
sender_proof_sha256 TEXT NOT NULL,
|
|
2831
|
+
request_sha256 TEXT NOT NULL,
|
|
2832
|
+
canonical_response_bytes ${db.provider === 'postgres' ? 'BYTEA' : 'BLOB'} NOT NULL,
|
|
2833
|
+
response_sha256 TEXT NOT NULL,
|
|
2834
|
+
redeemed_at TEXT NOT NULL,
|
|
2835
|
+
UNIQUE (tenant_id, grant_id),
|
|
2836
|
+
FOREIGN KEY (grant_id) REFERENCES executor_phase_a_workload_grants(grant_id) ON DELETE RESTRICT
|
|
2837
|
+
);
|
|
2838
|
+
|
|
2839
|
+
CREATE INDEX IF NOT EXISTS idx_executor_phase_a_issuer_redemptions_grant
|
|
2840
|
+
ON executor_phase_a_issuer_redemptions(tenant_id, grant_id, redeemed_at);
|
|
2841
|
+
`);
|
|
2842
|
+
}
|
|
2428
2843
|
export function ensureAgentRolesSchema(db) {
|
|
2429
2844
|
db.exec(`
|
|
2430
2845
|
CREATE TABLE IF NOT EXISTS agent_roles (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TaskforceCloudEnvironment } from '../config/cloudEnvironment.js';
|
|
2
2
|
import { APP_GATE_DEFINITIONS as APP_GATE_CONFIG } from './appGateDefinitions.js';
|
|
3
3
|
export declare const ANNOTATED_ATTACHMENTS_WORKSPACE_FEATURE_KEY: "annotated_attachments.workspace_access";
|
|
4
4
|
export declare const DOCUMENT_WORKSPACE_FEATURE_KEY: "documents.workspace_access";
|
|
@@ -26,4 +26,5 @@ export declare function listAppGateDefinitions(): AppGateDefinition[];
|
|
|
26
26
|
export declare function getAppGateDefinition(featureKey: string): AppGateDefinition | null;
|
|
27
27
|
export declare function resolveAppGateAccess(featureKey: string, environment: TaskforceCloudEnvironment): ResolvedFeatureAccess;
|
|
28
28
|
export declare function resolveAppGateAccessMap(environment: TaskforceCloudEnvironment): ResolvedFeatureAccessMap;
|
|
29
|
+
export declare function resolveClientAppGateAccessMap(accessMap: ResolvedFeatureAccessMap | null | undefined, cloudEnvironment: unknown): ResolvedFeatureAccessMap;
|
|
29
30
|
export declare function isResolvedFeatureAccessMap(value: unknown): value is ResolvedFeatureAccessMap;
|
package/dist/runtime/appGates.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseTaskforceCloudEnvironment, } from '../config/cloudEnvironment.js';
|
|
1
2
|
import { APP_GATE_DEFINITIONS as APP_GATE_CONFIG } from './appGateDefinitions.js';
|
|
2
3
|
export const ANNOTATED_ATTACHMENTS_WORKSPACE_FEATURE_KEY = 'annotated_attachments.workspace_access';
|
|
3
4
|
export const DOCUMENT_WORKSPACE_FEATURE_KEY = 'documents.workspace_access';
|
|
@@ -53,6 +54,12 @@ export function resolveAppGateAccess(featureKey, environment) {
|
|
|
53
54
|
export function resolveAppGateAccessMap(environment) {
|
|
54
55
|
return Object.fromEntries(listAppGateDefinitions().map(({ key }) => [key, resolveAppGateAccess(key, environment)]));
|
|
55
56
|
}
|
|
57
|
+
export function resolveClientAppGateAccessMap(accessMap, cloudEnvironment) {
|
|
58
|
+
if (accessMap && isResolvedFeatureAccessMap(accessMap))
|
|
59
|
+
return accessMap;
|
|
60
|
+
const environment = parseTaskforceCloudEnvironment(String(cloudEnvironment || '')) || 'production';
|
|
61
|
+
return resolveAppGateAccessMap(environment);
|
|
62
|
+
}
|
|
56
63
|
export function isResolvedFeatureAccessMap(value) {
|
|
57
64
|
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
58
65
|
return false;
|
package/dist/server/buildInfo.js
CHANGED
|
@@ -88,6 +88,9 @@ export function resolveBuildInfo(env = process.env) {
|
|
|
88
88
|
env.CF_PAGES_URL,
|
|
89
89
|
env.GITHUB_RUN_ID
|
|
90
90
|
]);
|
|
91
|
+
const environmentId = resolveFirstNonEmpty([
|
|
92
|
+
env.RAILWAY_ENVIRONMENT_ID,
|
|
93
|
+
]);
|
|
91
94
|
const version = explicitVersion
|
|
92
95
|
? explicitVersion
|
|
93
96
|
: appendBuildMetadata(packageVersion, [deployId, gitSha, buildTimeToken(buildTime)]);
|
|
@@ -95,6 +98,7 @@ export function resolveBuildInfo(env = process.env) {
|
|
|
95
98
|
version,
|
|
96
99
|
gitSha,
|
|
97
100
|
buildTime,
|
|
98
|
-
deployId
|
|
101
|
+
deployId,
|
|
102
|
+
environmentId,
|
|
99
103
|
};
|
|
100
104
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ServerResponse } from 'node:http';
|
|
2
|
+
import type { RequestPerformanceDiagnostics } from '../storage/postgresRequestDiagnostics.js';
|
|
3
|
+
export declare const TASKFORCE_CAPACITY_TRACE_HEADER = "x-taskforce-capacity-trace";
|
|
4
|
+
export type CloudMcpRequestClass = 'initialize' | 'discover' | 'tools_list' | 'read' | 'write' | 'other';
|
|
5
|
+
export type CloudMcpOutcome = 'success' | 'rejected' | 'client_error' | 'server_error' | 'timeout_or_abort';
|
|
6
|
+
export type CloudMcpRejectionClass = 'rate_limited' | 'auth_or_scope' | 'protocol' | 'other_client';
|
|
7
|
+
type EventLoopSampler = {
|
|
8
|
+
enable(): void;
|
|
9
|
+
disable?(): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
percentile(percentile: number): number;
|
|
12
|
+
readonly max: number;
|
|
13
|
+
};
|
|
14
|
+
type CapacityTelemetryOptions = {
|
|
15
|
+
emit?: (payload: Record<string, unknown>) => void;
|
|
16
|
+
eventLoop?: EventLoopSampler;
|
|
17
|
+
now?: () => number;
|
|
18
|
+
cpuUsage?: typeof process.cpuUsage;
|
|
19
|
+
memoryUsage?: typeof process.memoryUsage;
|
|
20
|
+
windowMs?: number;
|
|
21
|
+
maxSamples?: number;
|
|
22
|
+
};
|
|
23
|
+
export declare class CloudMcpCapacityTelemetry {
|
|
24
|
+
private readonly emit;
|
|
25
|
+
private readonly eventLoop;
|
|
26
|
+
private readonly now;
|
|
27
|
+
private readonly cpuUsage;
|
|
28
|
+
private readonly memoryUsage;
|
|
29
|
+
private readonly windowMs;
|
|
30
|
+
private readonly maxSamples;
|
|
31
|
+
private activeRequests;
|
|
32
|
+
private maxActiveRequests;
|
|
33
|
+
private samples;
|
|
34
|
+
private completedRequests;
|
|
35
|
+
private requestClassCounts;
|
|
36
|
+
private outcomeCounts;
|
|
37
|
+
private rejectionCounts;
|
|
38
|
+
private statusClassCounts;
|
|
39
|
+
private windowStartedAt;
|
|
40
|
+
private windowCpuStartedAt;
|
|
41
|
+
private readonly flushTimer;
|
|
42
|
+
constructor(options?: CapacityTelemetryOptions);
|
|
43
|
+
begin(requestClass?: CloudMcpRequestClass): {
|
|
44
|
+
classify: (nextClass: CloudMcpRequestClass) => void;
|
|
45
|
+
setTraceHeaders: (res: ServerResponse, postgres?: RequestPerformanceDiagnostics | null) => void;
|
|
46
|
+
finish: (input: {
|
|
47
|
+
statusCode: number;
|
|
48
|
+
aborted?: boolean;
|
|
49
|
+
postgres?: RequestPerformanceDiagnostics | null;
|
|
50
|
+
}) => void;
|
|
51
|
+
};
|
|
52
|
+
snapshot(): Record<string, unknown>;
|
|
53
|
+
flush(): Record<string, unknown> | null;
|
|
54
|
+
shutdown(): void;
|
|
55
|
+
private flushIfDue;
|
|
56
|
+
private minimumPoolIdle;
|
|
57
|
+
}
|
|
58
|
+
export declare function isCloudMcpCapacityTelemetryEnabled(): boolean;
|
|
59
|
+
export declare function beginCloudMcpCapacityRequest(requestClass?: CloudMcpRequestClass): {
|
|
60
|
+
classify: (nextClass: CloudMcpRequestClass) => void;
|
|
61
|
+
setTraceHeaders: (res: ServerResponse, postgres?: RequestPerformanceDiagnostics | null) => void;
|
|
62
|
+
finish: (input: {
|
|
63
|
+
statusCode: number;
|
|
64
|
+
aborted?: boolean;
|
|
65
|
+
postgres?: RequestPerformanceDiagnostics | null;
|
|
66
|
+
}) => void;
|
|
67
|
+
};
|
|
68
|
+
export {};
|