stageflow 0.25.0 → 0.30.0
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 +14 -3
- package/builtin-skills/browser/SKILL.md +42 -0
- package/dist/a2a/contracts.d.ts +1 -0
- package/dist/a2a/contracts.js +1 -0
- package/dist/a2a/registry.d.ts +2 -0
- package/dist/a2a/registry.js +20 -1
- package/dist/a2a/server.d.ts +7 -0
- package/dist/a2a/server.js +5 -2
- package/dist/a2a/service.d.ts +1 -1
- package/dist/a2a/service.js +57 -8
- package/dist/a2a/store.d.ts +8 -5
- package/dist/a2a/store.js +24 -67
- package/dist/agent/activity.d.ts +3 -0
- package/dist/agent/bootProviderConfig.d.ts +21 -0
- package/dist/agent/bootProviderConfig.js +74 -0
- package/dist/agent/claudeAdapter.js +2 -2
- package/dist/agent/cursorProvider.d.ts +2 -0
- package/dist/agent/cursorProvider.js +30 -5
- package/dist/agent/fakeAgent.d.ts +1 -0
- package/dist/agent/fakeAgent.js +13 -0
- package/dist/agent/piAdapter.d.ts +11 -24
- package/dist/agent/piAdapter.js +107 -50
- package/dist/agent/piIsolatedMcp.d.ts +2 -0
- package/dist/agent/piIsolatedMcp.js +10 -2
- package/dist/agent/piSessionFactory.d.ts +38 -0
- package/dist/agent/piSessionFactory.js +60 -0
- package/dist/agent/port.d.ts +8 -0
- package/dist/agent/streamLogRedact.d.ts +7 -1
- package/dist/agent/streamLogRedact.js +26 -11
- package/dist/browser/anchor.d.ts +27 -0
- package/dist/browser/anchor.js +127 -0
- package/dist/browser/auditSink.d.ts +38 -0
- package/dist/browser/auditSink.js +34 -0
- package/dist/browser/browserHost.d.ts +86 -0
- package/dist/browser/browserHost.js +7 -0
- package/dist/browser/browserSweep.d.ts +14 -0
- package/dist/browser/browserSweep.js +54 -0
- package/dist/browser/browserTeardown.d.ts +56 -0
- package/dist/browser/browserTeardown.js +235 -0
- package/dist/browser/fakeRemoteBrowserHost.d.ts +2 -0
- package/dist/browser/fakeRemoteBrowserHost.js +34 -0
- package/dist/browser/gateHandoff.d.ts +25 -0
- package/dist/browser/gateHandoff.js +83 -0
- package/dist/browser/humanLogin.d.ts +18 -0
- package/dist/browser/humanLogin.js +34 -0
- package/dist/browser/keyProvider.d.ts +10 -0
- package/dist/browser/keyProvider.js +39 -0
- package/dist/browser/localBrowserHost.d.ts +10 -0
- package/dist/browser/localBrowserHost.js +152 -0
- package/dist/browser/localProfileLock.d.ts +2 -0
- package/dist/browser/localProfileLock.js +218 -0
- package/dist/browser/localProfileStore.d.ts +5 -0
- package/dist/browser/localProfileStore.js +91 -0
- package/dist/browser/loginCheck.d.ts +53 -0
- package/dist/browser/loginCheck.js +147 -0
- package/dist/browser/memoryProfileLock.d.ts +2 -0
- package/dist/browser/memoryProfileLock.js +53 -0
- package/dist/browser/memoryProfileStore.d.ts +2 -0
- package/dist/browser/memoryProfileStore.js +31 -0
- package/dist/browser/navigationAudit.d.ts +16 -0
- package/dist/browser/navigationAudit.js +53 -0
- package/dist/browser/persistedEnv.d.ts +3 -0
- package/dist/browser/persistedEnv.js +15 -0
- package/dist/browser/profileLock.d.ts +40 -0
- package/dist/browser/profileLock.js +10 -0
- package/dist/browser/profileStore.d.ts +23 -0
- package/dist/browser/profileStore.js +39 -0
- package/dist/browser/runLiveness.d.ts +13 -0
- package/dist/browser/runLiveness.js +39 -0
- package/dist/browser/sitePolicy.d.ts +10 -0
- package/dist/browser/sitePolicy.js +61 -0
- package/dist/browser/stageBrowserEnv.d.ts +22 -0
- package/dist/browser/stageBrowserEnv.js +147 -0
- package/dist/browser/stageProfileLock.d.ts +17 -0
- package/dist/browser/stageProfileLock.js +39 -0
- package/dist/cli/artifactCommand.js +9 -16
- package/dist/cli/backupCommand.d.ts +9 -0
- package/dist/cli/backupCommand.js +111 -0
- package/dist/cli/browserCommand.d.ts +44 -0
- package/dist/cli/browserCommand.js +472 -0
- package/dist/cli/debugRunCommand.d.ts +10 -0
- package/dist/cli/debugRunCommand.js +109 -0
- package/dist/cli/doctorCommand.d.ts +32 -0
- package/dist/cli/doctorCommand.js +453 -0
- package/dist/cli/envelopeCommand.js +9 -2
- package/dist/cli/exportAllCommand.d.ts +55 -0
- package/dist/cli/exportAllCommand.js +218 -0
- package/dist/cli/exportRunCommand.js +23 -21
- package/dist/cli/hostClient.d.ts +41 -3
- package/dist/cli/hostClient.js +129 -14
- package/dist/cli/initCommand.d.ts +1 -0
- package/dist/cli/initCommand.js +23 -7
- package/dist/cli/initTemplates.d.ts +5 -2
- package/dist/cli/initTemplates.js +32 -2
- package/dist/cli/resolveSafeOutPath.d.ts +2 -0
- package/dist/cli/resolveSafeOutPath.js +40 -0
- package/dist/cli/restoreCommand.d.ts +10 -0
- package/dist/cli/restoreCommand.js +90 -0
- package/dist/cli/runCommand.d.ts +3 -2
- package/dist/cli/runCommand.js +93 -11
- package/dist/cli/runOutput.d.ts +4 -0
- package/dist/cli/runOutput.js +33 -7
- package/dist/cli/runStageCommand.d.ts +1 -0
- package/dist/cli/runStageCommand.js +44 -25
- package/dist/cli/runsCommand.d.ts +1 -1
- package/dist/cli/runsCommand.js +168 -10
- package/dist/cli/triggerCommand.d.ts +12 -0
- package/dist/cli/triggerCommand.js +183 -0
- package/dist/cli/validateCommand.d.ts +1 -1
- package/dist/cli/validateCommand.js +23 -6
- package/dist/cli.js +202 -32
- package/dist/config/browseCatalog.d.ts +1 -0
- package/dist/config/browseCatalog.js +5 -4
- package/dist/config/builtinSkills.d.ts +4 -0
- package/dist/config/builtinSkills.js +23 -0
- package/dist/config/catalogRelativePath.d.ts +63 -0
- package/dist/config/catalogRelativePath.js +126 -0
- package/dist/config/configOrigin.d.ts +27 -0
- package/dist/config/configOrigin.js +59 -0
- package/dist/config/createTrigger.d.ts +27 -0
- package/dist/config/createTrigger.js +232 -0
- package/dist/config/draftPackage.d.ts +117 -0
- package/dist/config/draftPackage.js +550 -0
- package/dist/config/ensureCatalogScanRoot.d.ts +16 -0
- package/dist/config/ensureCatalogScanRoot.js +73 -0
- package/dist/config/hostConfig.d.ts +57 -0
- package/dist/config/hostConfig.js +360 -0
- package/dist/config/listSkills.d.ts +26 -0
- package/dist/config/listSkills.js +206 -5
- package/dist/config/loadOutcome.d.ts +7 -1
- package/dist/config/loadPipeline.js +39 -2
- package/dist/config/loadStage.js +25 -0
- package/dist/config/loadStageflowManifest.js +25 -0
- package/dist/config/loadTask.d.ts +2 -0
- package/dist/config/loadTask.js +57 -18
- package/dist/config/loadTrigger.d.ts +9 -0
- package/dist/config/loadTrigger.js +120 -0
- package/dist/config/materializeStageModels.js +5 -1
- package/dist/config/mergePipelineIncludes.d.ts +3 -0
- package/dist/config/mergePipelineIncludes.js +19 -0
- package/dist/config/migrateYaml.js +6 -11
- package/dist/config/multiProjectCatalog.d.ts +32 -0
- package/dist/config/multiProjectCatalog.js +150 -0
- package/dist/config/normalizePipelineStageEntry.js +27 -1
- package/dist/config/parseCompletionContract.js +6 -0
- package/dist/config/pipelineStageKeys.js +3 -0
- package/dist/config/publishDraftPackage.d.ts +7 -0
- package/dist/config/publishDraftPackage.js +25 -0
- package/dist/config/resolveCatalogContext.js +1 -1
- package/dist/config/resolveCatalogRoots.d.ts +27 -0
- package/dist/config/resolveCatalogRoots.js +76 -0
- package/dist/config/resolveModel.d.ts +7 -1
- package/dist/config/resolveModel.js +11 -1
- package/dist/config/resolvePipelineDag.js +1 -1
- package/dist/config/resolveStageMcpServers.d.ts +9 -1
- package/dist/config/resolveStageMcpServers.js +36 -9
- package/dist/config/scanCatalogPaths.d.ts +1 -1
- package/dist/config/scanCatalogPaths.js +6 -2
- package/dist/config/secretFromEnvOrFile.d.ts +9 -0
- package/dist/config/secretFromEnvOrFile.js +34 -0
- package/dist/config/seededCatalog.d.ts +11 -0
- package/dist/config/seededCatalog.js +29 -0
- package/dist/config/stageBrowser.d.ts +12 -0
- package/dist/config/stageBrowser.js +118 -0
- package/dist/config/toolRequires.d.ts +24 -0
- package/dist/config/toolRequires.js +115 -0
- package/dist/config/triggerCatalog.d.ts +10 -0
- package/dist/config/triggerCatalog.js +37 -0
- package/dist/config/validateCatalog.d.ts +17 -3
- package/dist/config/validateCatalog.js +223 -3
- package/dist/config/validateCompletionContract.js +8 -0
- package/dist/diagnostics/checks.d.ts +39 -0
- package/dist/diagnostics/checks.js +135 -0
- package/dist/envelope/preEmitChecks.d.ts +1 -1
- package/dist/envelope/preEmitChecks.js +8 -0
- package/dist/errors/codes.d.ts +14 -0
- package/dist/errors/codes.js +59 -0
- package/dist/git/cache.d.ts +14 -0
- package/dist/git/cache.js +150 -0
- package/dist/git/credentials.d.ts +9 -0
- package/dist/git/credentials.js +88 -0
- package/dist/git/errors.d.ts +20 -0
- package/dist/git/errors.js +94 -0
- package/dist/git/exec.d.ts +16 -0
- package/dist/git/exec.js +135 -0
- package/dist/git/operations.d.ts +29 -0
- package/dist/git/operations.js +153 -0
- package/dist/git/version.d.ts +1 -0
- package/dist/git/version.js +10 -0
- package/dist/logging/audit.d.ts +16 -0
- package/dist/logging/audit.js +19 -0
- package/dist/logging/commonWords.d.ts +2 -0
- package/dist/logging/commonWords.js +13 -0
- package/dist/logging/logger.d.ts +49 -0
- package/dist/logging/logger.js +193 -0
- package/dist/logging/namedSecrets.d.ts +6 -0
- package/dist/logging/namedSecrets.js +58 -0
- package/dist/logging/redact.d.ts +17 -0
- package/dist/logging/redact.js +105 -0
- package/dist/mcp/catalogTools.js +492 -81
- package/dist/mcp/checkoutTools.d.ts +52 -0
- package/dist/mcp/checkoutTools.js +332 -0
- package/dist/mcp/controlTools.js +182 -6
- package/dist/mcp/deps.d.ts +3 -0
- package/dist/mcp/getStartedTool.d.ts +3 -0
- package/dist/mcp/getStartedTool.js +62 -0
- package/dist/mcp/readArtifact.d.ts +11 -0
- package/dist/mcp/readArtifact.js +46 -30
- package/dist/mcp/server.js +2 -0
- package/dist/mcp/tools.js +6 -0
- package/dist/mcp/triggerTools.d.ts +3 -0
- package/dist/mcp/triggerTools.js +176 -0
- package/dist/net/proxy.d.ts +14 -0
- package/dist/net/proxy.js +78 -0
- package/dist/operatorAgent/docsRetrieval.d.ts +40 -0
- package/dist/operatorAgent/docsRetrieval.js +269 -0
- package/dist/operatorAgent/draftContext.d.ts +16 -0
- package/dist/operatorAgent/draftContext.js +68 -0
- package/dist/operatorAgent/fakeHost.d.ts +39 -0
- package/dist/operatorAgent/fakeHost.js +92 -0
- package/dist/operatorAgent/host.d.ts +40 -0
- package/dist/operatorAgent/host.js +179 -0
- package/dist/operatorAgent/index.d.ts +9 -0
- package/dist/operatorAgent/index.js +8 -0
- package/dist/operatorAgent/piModel.d.ts +80 -0
- package/dist/operatorAgent/piModel.js +528 -0
- package/dist/operatorAgent/profiles/workshopAuthor.d.ts +23 -0
- package/dist/operatorAgent/profiles/workshopAuthor.js +338 -0
- package/dist/operatorAgent/profiles/workshopAuthorPlaybook.d.ts +6 -0
- package/dist/operatorAgent/profiles/workshopAuthorPlaybook.js +103 -0
- package/dist/operatorAgent/profiles/workshopAuthorTools.d.ts +57 -0
- package/dist/operatorAgent/profiles/workshopAuthorTools.js +623 -0
- package/dist/operatorAgent/proposals.d.ts +32 -0
- package/dist/operatorAgent/proposals.js +144 -0
- package/dist/operatorAgent/types.d.ts +128 -0
- package/dist/operatorAgent/types.js +1 -0
- package/dist/package-meta.d.ts +2 -1
- package/dist/package-meta.js +2 -1
- package/dist/preflight/bash.d.ts +8 -0
- package/dist/preflight/bash.js +34 -0
- package/dist/preflight/claudeRoot.d.ts +11 -0
- package/dist/preflight/claudeRoot.js +23 -0
- package/dist/preflight/mcpCommands.d.ts +8 -0
- package/dist/preflight/mcpCommands.js +36 -0
- package/dist/preflight/pipelinePreflight.d.ts +40 -0
- package/dist/preflight/pipelinePreflight.js +192 -0
- package/dist/preflight/tls.d.ts +6 -0
- package/dist/preflight/tls.js +18 -0
- package/dist/preflight/toolchain.d.ts +45 -0
- package/dist/preflight/toolchain.js +219 -0
- package/dist/project/findManifestRoot.d.ts +3 -0
- package/dist/project/findManifestRoot.js +35 -0
- package/dist/project/findProjectRoot.js +3 -4
- package/dist/project/globalHome.d.ts +7 -0
- package/dist/project/globalHome.js +63 -2
- package/dist/project/resolveProjectContext.js +2 -2
- package/dist/project/resolveStageflowContext.d.ts +7 -0
- package/dist/project/resolveStageflowContext.js +46 -30
- package/dist/projection/projectRun.d.ts +2 -1
- package/dist/projection/projectRun.js +1 -0
- package/dist/runstore/assertTmpdir.d.ts +1 -0
- package/dist/runstore/assertTmpdir.js +25 -0
- package/dist/runstore/backup.d.ts +52 -0
- package/dist/runstore/backup.js +292 -0
- package/dist/runstore/createStore.d.ts +18 -1
- package/dist/runstore/createStore.js +64 -5
- package/dist/runstore/debugBundle.d.ts +60 -0
- package/dist/runstore/debugBundle.js +143 -0
- package/dist/runstore/diskUsage.d.ts +50 -0
- package/dist/runstore/diskUsage.js +214 -0
- package/dist/runstore/exportRunPayload.d.ts +8 -0
- package/dist/runstore/exportRunPayload.js +23 -0
- package/dist/runstore/normalizeCatalogPath.d.ts +1 -0
- package/dist/runstore/normalizeCatalogPath.js +10 -0
- package/dist/runstore/paths.d.ts +5 -0
- package/dist/runstore/paths.js +145 -1
- package/dist/runstore/port.d.ts +139 -13
- package/dist/runstore/port.js +8 -1
- package/dist/runstore/restore.d.ts +81 -0
- package/dist/runstore/restore.js +355 -0
- package/dist/runstore/retention.d.ts +27 -0
- package/dist/runstore/retention.js +74 -0
- package/dist/runstore/runManifest.d.ts +146 -0
- package/dist/runstore/runManifest.js +288 -0
- package/dist/runstore/runProjection.d.ts +3 -1
- package/dist/runstore/runProjection.js +63 -1
- package/dist/runstore/sqlite/SqliteRunStore.d.ts +35 -3
- package/dist/runstore/sqlite/SqliteRunStore.js +442 -219
- package/dist/runstore/sqlite/applyStorePragmas.d.ts +39 -0
- package/dist/runstore/sqlite/applyStorePragmas.js +145 -0
- package/dist/runstore/sqlite/migrations/001-baseline.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/001-baseline.js +10 -0
- package/dist/runstore/sqlite/migrations/002-repository-binding.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/002-repository-binding.js +29 -0
- package/dist/runstore/sqlite/migrations/003-run-lifecycle.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/003-run-lifecycle.js +28 -0
- package/dist/runstore/sqlite/migrations/004-auto-resume-count.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/004-auto-resume-count.js +19 -0
- package/dist/runstore/sqlite/migrations/005-config-origins.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/005-config-origins.js +19 -0
- package/dist/runstore/sqlite/migrations/006-pipeline-body-and-caller.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/006-pipeline-body-and-caller.js +28 -0
- package/dist/runstore/sqlite/migrations/007-projects-registry.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/007-projects-registry.js +31 -0
- package/dist/runstore/sqlite/migrations/008-triggers-table.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/008-triggers-table.js +19 -0
- package/dist/runstore/sqlite/migrations/009-trigger-next-run.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/009-trigger-next-run.js +19 -0
- package/dist/runstore/sqlite/migrations/010-trigger-adapter-state.d.ts +7 -0
- package/dist/runstore/sqlite/migrations/010-trigger-adapter-state.js +17 -0
- package/dist/runstore/sqlite/migrations/index.d.ts +21 -0
- package/dist/runstore/sqlite/migrations/index.js +78 -0
- package/dist/runstore/sqlite/schema.d.ts +20 -1
- package/dist/runstore/sqlite/schema.js +277 -1
- package/dist/runstore/sqlite/storeOpenError.d.ts +6 -0
- package/dist/runstore/sqlite/storeOpenError.js +11 -0
- package/dist/runstore/sqlite/storeSchemaError.d.ts +5 -0
- package/dist/runstore/sqlite/storeSchemaError.js +8 -0
- package/dist/runstore/stageExecution.js +3 -0
- package/dist/runstore/storeFilesystem.d.ts +32 -0
- package/dist/runstore/storeFilesystem.js +148 -0
- package/dist/runstore/trackProjection.js +2 -0
- package/dist/runstore/workspaceLayout.d.ts +13 -0
- package/dist/runstore/workspaceLayout.js +76 -0
- package/dist/runtime/answerResume.d.ts +1 -0
- package/dist/runtime/answerResume.js +3 -1
- package/dist/runtime/completionCheckRunner.d.ts +15 -1
- package/dist/runtime/completionCheckRunner.js +67 -7
- package/dist/runtime/containerLimits.d.ts +16 -0
- package/dist/runtime/containerLimits.js +84 -0
- package/dist/runtime/credentialBinding.d.ts +2 -0
- package/dist/runtime/credentialBinding.js +3 -0
- package/dist/runtime/credentialMaterialisation.d.ts +28 -0
- package/dist/runtime/credentialMaterialisation.js +128 -0
- package/dist/runtime/emailSource.d.ts +72 -0
- package/dist/runtime/emailSource.js +304 -0
- package/dist/runtime/gitCheckoutCapability.js +7 -13
- package/dist/runtime/githubPollSource.d.ts +86 -0
- package/dist/runtime/githubPollSource.js +284 -0
- package/dist/runtime/pipelineRunner.d.ts +40 -1
- package/dist/runtime/pipelineRunner.js +181 -17
- package/dist/runtime/pipelineScheduler.d.ts +17 -0
- package/dist/runtime/pipelineScheduler.js +220 -28
- package/dist/runtime/reloadRunCatalog.js +6 -1
- package/dist/runtime/repositoryMaterialize.d.ts +47 -0
- package/dist/runtime/repositoryMaterialize.js +235 -0
- package/dist/runtime/resumeTimedOut.d.ts +1 -1
- package/dist/runtime/resumeTimedOut.js +5 -2
- package/dist/runtime/runChangeBus.js +9 -0
- package/dist/runtime/runDeletion.d.ts +7 -0
- package/dist/runtime/runDeletion.js +37 -0
- package/dist/runtime/runManager.d.ts +169 -4
- package/dist/runtime/runManager.js +1748 -83
- package/dist/runtime/runRetentionSweep.d.ts +31 -0
- package/dist/runtime/runRetentionSweep.js +328 -0
- package/dist/runtime/runRetryCoordinator.d.ts +4 -0
- package/dist/runtime/runRetryCoordinator.js +20 -2
- package/dist/runtime/runSkills.d.ts +40 -0
- package/dist/runtime/runSkills.js +173 -0
- package/dist/runtime/scheduleSource.d.ts +38 -0
- package/dist/runtime/scheduleSource.js +119 -0
- package/dist/runtime/settingsFile.d.ts +5 -0
- package/dist/runtime/settingsFile.js +61 -54
- package/dist/runtime/stageAttemptBootstrap.d.ts +5 -1
- package/dist/runtime/stageAttemptBootstrap.js +250 -27
- package/dist/runtime/stageCacheEnv.d.ts +6 -0
- package/dist/runtime/stageCacheEnv.js +34 -0
- package/dist/runtime/stageConcurrency.d.ts +2 -1
- package/dist/runtime/stageConcurrency.js +4 -2
- package/dist/runtime/stageEnvironment.d.ts +38 -0
- package/dist/runtime/stageEnvironment.js +194 -0
- package/dist/runtime/stageHitl.d.ts +1 -0
- package/dist/runtime/stageHitl.js +5 -1
- package/dist/runtime/stageProcessLauncher.d.ts +20 -0
- package/dist/runtime/stageProcessLauncher.js +236 -41
- package/dist/runtime/stageRecovery.d.ts +3 -1
- package/dist/runtime/stageRecovery.js +19 -4
- package/dist/runtime/stageRoots.d.ts +38 -1
- package/dist/runtime/stageRoots.js +118 -0
- package/dist/runtime/stageRunner.d.ts +6 -0
- package/dist/runtime/stageRunner.js +32 -6
- package/dist/runtime/stageSecretDecl.d.ts +9 -0
- package/dist/runtime/stageSecretDecl.js +102 -0
- package/dist/runtime/stageSecrets.d.ts +40 -0
- package/dist/runtime/stageSecrets.js +181 -0
- package/dist/runtime/stageStreamLog.d.ts +1 -0
- package/dist/runtime/stageStreamLog.js +2 -1
- package/dist/runtime/stageWorker.d.ts +3 -2
- package/dist/runtime/stageWorker.js +58 -10
- package/dist/runtime/stageWorkerProtocol.d.ts +5 -0
- package/dist/runtime/stageWorkerProtocol.js +8 -0
- package/dist/runtime/startPayload.d.ts +32 -0
- package/dist/runtime/startPayload.js +59 -0
- package/dist/runtime/taskInput.js +14 -5
- package/dist/runtime/triggerCatalog.d.ts +6 -0
- package/dist/runtime/triggerCatalog.js +24 -0
- package/dist/runtime/triggerEventMatch.d.ts +2 -0
- package/dist/runtime/triggerEventMatch.js +6 -0
- package/dist/runtime/triggerPort.d.ts +14 -0
- package/dist/runtime/triggerPort.js +1 -0
- package/dist/runtime/triggerRunner.d.ts +17 -0
- package/dist/runtime/triggerRunner.js +89 -0
- package/dist/runtime/verifiedStageExecution.d.ts +8 -0
- package/dist/runtime/verifiedStageExecution.js +16 -1
- package/dist/runtime/webhookSignature.d.ts +1 -0
- package/dist/runtime/webhookSignature.js +12 -0
- package/dist/runtime/workspaceBinding.d.ts +20 -0
- package/dist/runtime/workspaceBinding.js +60 -0
- package/dist/server/allowedHosts.d.ts +19 -0
- package/dist/server/allowedHosts.js +179 -0
- package/dist/server/bootstrap.d.ts +42 -2
- package/dist/server/bootstrap.js +273 -5
- package/dist/server/controlToken.d.ts +47 -0
- package/dist/server/controlToken.js +254 -0
- package/dist/server/createHttpHost.d.ts +11 -2
- package/dist/server/createHttpHost.js +106 -10
- package/dist/server/ensureGlobalService.d.ts +5 -1
- package/dist/server/ensureGlobalService.js +35 -1
- package/dist/server/healthSurfaces.d.ts +6 -0
- package/dist/server/healthSurfaces.js +123 -0
- package/dist/server/http.d.ts +27 -1
- package/dist/server/http.js +2254 -477
- package/dist/server/listenHost.d.ts +5 -0
- package/dist/server/listenHost.js +56 -0
- package/dist/server/mcpHost.d.ts +10 -1
- package/dist/server/mcpHost.js +36 -6
- package/dist/server/operatorResults.d.ts +2 -2
- package/dist/server/operatorResults.js +40 -29
- package/dist/server/requestAuthContext.d.ts +12 -0
- package/dist/server/requestAuthContext.js +21 -0
- package/dist/server/shutdown.d.ts +69 -0
- package/dist/server/shutdown.js +219 -0
- package/dist/server/triggerRoutes.d.ts +15 -0
- package/dist/server/triggerRoutes.js +268 -0
- package/dist/tools/askOperator.d.ts +3 -2
- package/dist/types/completion.d.ts +3 -0
- package/dist/types/pipeline.d.ts +10 -1
- package/dist/types/preEmitCheck.d.ts +7 -0
- package/dist/types/stage.d.ts +22 -0
- package/dist/types/stageflowManifest.d.ts +3 -0
- package/dist/types/task.d.ts +8 -0
- package/dist/types/trigger.d.ts +18 -0
- package/dist/types/trigger.js +1 -0
- package/dist/ui/assets/{index-CSsDued1.css → index-Bv4p1aPK.css} +1 -1
- package/dist/ui/assets/index-CntB4bZR.js +133 -0
- package/dist/ui/index.html +2 -2
- package/dist/workshop/autosave.d.ts +58 -0
- package/dist/workshop/autosave.js +222 -0
- package/dist/workshop/buildStore.d.ts +79 -0
- package/dist/workshop/buildStore.js +326 -0
- package/dist/workshop/chatTurn.d.ts +232 -0
- package/dist/workshop/chatTurn.js +475 -0
- package/dist/workshop/modelSettings.d.ts +18 -0
- package/dist/workshop/modelSettings.js +44 -0
- package/dist/workshop/sessionStore.d.ts +61 -0
- package/dist/workshop/sessionStore.js +254 -0
- package/dist/workshop/workshopPin.d.ts +72 -0
- package/dist/workshop/workshopPin.js +193 -0
- package/examples/README.md +99 -0
- package/examples/archify-on-pr/README.md +213 -0
- package/examples/archify-on-pr/archify-on-pr.pipeline.yaml +19 -0
- package/examples/archify-on-pr/archify-on-pr.task.yaml +19 -0
- package/examples/archify-on-pr/author-diagrams.yaml +106 -0
- package/examples/archify-on-pr/detect-changes.yaml +89 -0
- package/examples/browser-session/README.md +77 -0
- package/examples/browser-session/browser-session.pipeline.yaml +50 -0
- package/examples/browser-session/browser-session.task.yaml +6 -0
- package/examples/browser-session/check-login.yaml +22 -0
- package/examples/browser-session/fixture-server.mjs +64 -0
- package/examples/browser-session/human-login.yaml +31 -0
- package/examples/browser-session/merge.yaml +36 -0
- package/examples/browser-session/work-a.yaml +41 -0
- package/examples/browser-session/work-b.yaml +41 -0
- package/examples/ci-validate/README.md +35 -0
- package/examples/ci-validate/check.yaml +13 -0
- package/examples/ci-validate/ci-demo.pipeline.yaml +4 -0
- package/examples/ci-validate/validate.sh +5 -0
- package/examples/compliance-review-demo/README.md +125 -0
- package/examples/compliance-review-demo/compliance-review-demo.pipeline.yaml +29 -0
- package/examples/compliance-review-demo/connect-account.yaml +47 -0
- package/examples/compliance-review-demo/map-to-control.yaml +123 -0
- package/examples/compliance-review-demo/poll-bucket-config.yaml +103 -0
- package/examples/compliance-review-demo/publish-report.yaml +79 -0
- package/examples/compliance-review-demo/review-verdict.yaml +122 -0
- package/examples/compliance-review-demo/run-compliance-check.yaml +96 -0
- package/examples/compliance-review-demo/store-evidence.yaml +143 -0
- package/examples/conditional-fork/README.md +89 -0
- package/examples/conditional-fork/branch-a.yaml +13 -0
- package/examples/conditional-fork/branch-b.yaml +13 -0
- package/examples/conditional-fork/decide.yaml +35 -0
- package/examples/conditional-fork/fork-demo.pipeline.yaml +20 -0
- package/examples/conditional-fork/fork-demo.task.yaml +8 -0
- package/examples/context7-mcp/README.md +42 -0
- package/examples/context7-mcp/context7-mcp.pipeline.yaml +15 -0
- package/examples/context7-mcp/context7-mcp.task.yaml +4 -0
- package/examples/context7-mcp/fetch-docs.yaml +52 -0
- package/examples/context7-mcp/resolve-library.yaml +31 -0
- package/examples/context7-mcp/write-brief.yaml +52 -0
- package/examples/feature-loop/README.md +104 -0
- package/examples/feature-loop/address-feedback.yaml +148 -0
- package/examples/feature-loop/align.yaml +116 -0
- package/examples/feature-loop/decompose.yaml +86 -0
- package/examples/feature-loop/default-model-hierarchy.task.yaml +58 -0
- package/examples/feature-loop/feature-loop.pipeline.yaml +140 -0
- package/examples/feature-loop/feature-loop.task.yaml +25 -0
- package/examples/feature-loop/implement.yaml +128 -0
- package/examples/feature-loop/plan.yaml +111 -0
- package/examples/feature-loop/publish.yaml +167 -0
- package/examples/feature-loop/review.yaml +146 -0
- package/examples/feature-loop/verify.yaml +106 -0
- package/examples/feedback-loop/README.md +72 -0
- package/examples/feedback-loop/VERIFY.md +208 -0
- package/examples/feedback-loop/continue-only.task.yaml +4 -0
- package/examples/feedback-loop/exhaust-require-continue.task.yaml +6 -0
- package/examples/feedback-loop/exhaust-wait-human.task.yaml +11 -0
- package/examples/feedback-loop/feedback-loop-wait-human.pipeline.yaml +23 -0
- package/examples/feedback-loop/feedback-loop.pipeline.yaml +23 -0
- package/examples/feedback-loop/feedback-loop.task.yaml +4 -0
- package/examples/feedback-loop/implement.yaml +14 -0
- package/examples/feedback-loop/plan.yaml +14 -0
- package/examples/feedback-loop/review.yaml +15 -0
- package/examples/feedback-loop/send-back-once.task.yaml +6 -0
- package/examples/feedback-loop/submit.yaml +12 -0
- package/examples/generic-fan-in/README.md +151 -0
- package/examples/generic-fan-in/clarify.yaml +18 -0
- package/examples/generic-fan-in/generic-fan-in-accepted.pipeline.yaml +19 -0
- package/examples/generic-fan-in/generic-fan-in-accepted.task.yaml +8 -0
- package/examples/generic-fan-in/generic-fan-in.pipeline.yaml +18 -0
- package/examples/generic-fan-in/generic-fan-in.task.yaml +9 -0
- package/examples/generic-fan-in/research.yaml +45 -0
- package/examples/generic-fan-in/synthesize.yaml +66 -0
- package/examples/generic-fan-in/validation.yaml +45 -0
- package/examples/github-release/README.md +78 -0
- package/examples/github-release/draft-release-notes.yaml +64 -0
- package/examples/github-release/github-release.pipeline.yaml +11 -0
- package/examples/github-release/github-release.task.yaml +13 -0
- package/examples/github-release/publish-github-release.yaml +64 -0
- package/examples/hello-world/README.md +28 -0
- package/examples/hello-world/hello.pipeline.yaml +4 -0
- package/examples/hello-world/my-task.task.yaml +6 -0
- package/examples/hello-world/research.yaml +18 -0
- package/examples/mcp-hitl-tour/README.md +113 -0
- package/examples/mcp-hitl-tour/draft-angle.yaml +33 -0
- package/examples/mcp-hitl-tour/draft-short.yaml +32 -0
- package/examples/mcp-hitl-tour/emit-angles.yaml +45 -0
- package/examples/mcp-hitl-tour/gather.yaml +31 -0
- package/examples/mcp-hitl-tour/intake.yaml +62 -0
- package/examples/mcp-hitl-tour/mcp-hitl-tour-exhaust.task.yaml +13 -0
- package/examples/mcp-hitl-tour/mcp-hitl-tour.pipeline.yaml +54 -0
- package/examples/mcp-hitl-tour/mcp-hitl-tour.task.yaml +16 -0
- package/examples/mcp-hitl-tour/polish.yaml +33 -0
- package/examples/mcp-hitl-tour/review.yaml +17 -0
- package/examples/mcp-hitl-tour/ship.yaml +25 -0
- package/examples/oss-issue-contribution/README.md +218 -0
- package/examples/oss-issue-contribution/oss-address-review-feedback.yaml +117 -0
- package/examples/oss-issue-contribution/oss-approve-contribution.yaml +181 -0
- package/examples/oss-issue-contribution/oss-approve-plan.yaml +111 -0
- package/examples/oss-issue-contribution/oss-explain-fix.yaml +108 -0
- package/examples/oss-issue-contribution/oss-explain-issue.yaml +114 -0
- package/examples/oss-issue-contribution/oss-implement-source-fix.yaml +171 -0
- package/examples/oss-issue-contribution/oss-investigate-area.yaml +116 -0
- package/examples/oss-issue-contribution/oss-issue-contribution.pipeline.yaml +125 -0
- package/examples/oss-issue-contribution/oss-issue-intake.yaml +106 -0
- package/examples/oss-issue-contribution/oss-plan-investigation.yaml +112 -0
- package/examples/oss-issue-contribution/oss-plan-review.yaml +109 -0
- package/examples/oss-issue-contribution/oss-reproduce-issue.yaml +140 -0
- package/examples/oss-issue-contribution/oss-review-change.yaml +107 -0
- package/examples/oss-issue-contribution/oss-verify-fix.yaml +130 -0
- package/examples/oss-issue-contribution/oss-write-regression-test.yaml +135 -0
- package/examples/oss-issue-contribution/pi-7629.task.yaml +79 -0
- package/examples/oss-issue-contribution/pi-8919.task.yaml +75 -0
- package/examples/oss-issue-contribution/pydantic-ai-7971.task.yaml +53 -0
- package/examples/oss-quick-fix/README.md +65 -0
- package/examples/oss-quick-fix/implement-fix.yaml +84 -0
- package/examples/oss-quick-fix/oss-quick-fix.pipeline.yaml +35 -0
- package/examples/oss-quick-fix/oss-quick-fix.task.yaml +19 -0
- package/examples/oss-quick-fix/ship-fix.yaml +81 -0
- package/examples/oss-quick-fix/understand-issue.yaml +67 -0
- package/examples/oss-quick-fix/verify-fix.yaml +73 -0
- package/examples/plan-review/README.md +37 -0
- package/examples/plan-review/plan-review-followup.yaml +13 -0
- package/examples/plan-review/plan-review.pipeline.yaml +9 -0
- package/examples/plan-review/plan-review.task.yaml +9 -0
- package/examples/plan-review/plan-review.yaml +25 -0
- package/examples/playwright-mcp/README.md +39 -0
- package/examples/playwright-mcp/playwright-mcp.pipeline.yaml +5 -0
- package/examples/playwright-mcp/playwright-mcp.task.yaml +4 -0
- package/examples/playwright-mcp/screenshot.yaml +40 -0
- package/examples/retry-tour/README.md +75 -0
- package/examples/retry-tour/retry-tour.pipeline.yaml +122 -0
- package/examples/retry-tour/retry-tour.task.yaml +9 -0
- package/examples/route-if-tour/README.md +202 -0
- package/examples/route-if-tour/route-if-tour.pipeline.yaml +950 -0
- package/examples/route-if-tour/route-if-tour.task.yaml +4 -0
- package/examples/route-wiring-smoke-test/01-core-routing.pipeline.yaml +168 -0
- package/examples/route-wiring-smoke-test/02-on-gating.pipeline.yaml +44 -0
- package/examples/route-wiring-smoke-test/03-two-entry-points.pipeline.yaml +28 -0
- package/examples/route-wiring-smoke-test/04-entry-false-equivalent-to-omitted.pipeline.yaml +27 -0
- package/examples/route-wiring-smoke-test/05-fork-choice.pipeline.yaml +110 -0
- package/examples/route-wiring-smoke-test/06-fan-out-fan-in.pipeline.yaml +82 -0
- package/examples/route-wiring-smoke-test/07-loop-human-decision.pipeline.yaml +82 -0
- package/examples/route-wiring-smoke-test/08-skip-fallback-and-multi-on-gate.pipeline.yaml +77 -0
- package/examples/route-wiring-smoke-test/09-multi-loop-targets.pipeline.yaml +102 -0
- package/examples/route-wiring-smoke-test/10-uses-dialect-fork.pipeline.yaml +23 -0
- package/examples/route-wiring-smoke-test/11-sequential-io-handoff.pipeline.yaml +37 -0
- package/examples/route-wiring-smoke-test/12-complex-io-schemas.pipeline.yaml +138 -0
- package/examples/route-wiring-smoke-test/13-ref-io-handoff.pipeline.yaml +84 -0
- package/examples/route-wiring-smoke-test/14-if-eq-gating.pipeline.yaml +50 -0
- package/examples/route-wiring-smoke-test/15-if-all-gated.pipeline.yaml +37 -0
- package/examples/route-wiring-smoke-test/16-if-composition.pipeline.yaml +65 -0
- package/examples/route-wiring-smoke-test/17-if-join.pipeline.yaml +80 -0
- package/examples/route-wiring-smoke-test/README.md +377 -0
- package/examples/route-wiring-smoke-test/rejected/01-reject-legacy-needs.pipeline.yaml +26 -0
- package/examples/route-wiring-smoke-test/rejected/02-reject-legacy-fork.pipeline.yaml +25 -0
- package/examples/route-wiring-smoke-test/rejected/03-reject-legacy-feedback-loop.pipeline.yaml +30 -0
- package/examples/route-wiring-smoke-test/rejected/04-reject-missing-entry.pipeline.yaml +24 -0
- package/examples/route-wiring-smoke-test/rejected/05-reject-unreachable.pipeline.yaml +35 -0
- package/examples/route-wiring-smoke-test/rejected/06-reject-allow-none-without-route-select.pipeline.yaml +37 -0
- package/examples/route-wiring-smoke-test/rejected/07-reject-cycle.pipeline.yaml +27 -0
- package/examples/route-wiring-smoke-test/rejected/08-reject-loop-non-ancestor.pipeline.yaml +42 -0
- package/examples/route-wiring-smoke-test/rejected/09-reject-route-select-leaf.pipeline.yaml +26 -0
- package/examples/route-wiring-smoke-test/rejected/12-reject-loop-replay-unsafe.pipeline.yaml +55 -0
- package/examples/route-wiring-smoke-test/rejected/13-reject-multiple-loop-entries.pipeline.yaml +51 -0
- package/examples/route-wiring-smoke-test/rejected/14-reject-duplicate-stage-id.pipeline.yaml +35 -0
- package/examples/route-wiring-smoke-test/rejected/15-reject-unknown-route-target.pipeline.yaml +15 -0
- package/examples/route-wiring-smoke-test/rejected/16-reject-malformed-route-item.pipeline.yaml +15 -0
- package/examples/route-wiring-smoke-test/rejected/17-reject-io-incompatible.pipeline.yaml +33 -0
- package/examples/route-wiring-smoke-test/rejected/18-reject-nested-io.pipeline.yaml +51 -0
- package/examples/route-wiring-smoke-test/rejected/19-reject-array-item-io.pipeline.yaml +55 -0
- package/examples/route-wiring-smoke-test/rejected/20-reject-closed-io.pipeline.yaml +36 -0
- package/examples/route-wiring-smoke-test/rejected/21-reject-ref-io.pipeline.yaml +42 -0
- package/examples/route-wiring-smoke-test/rejected/22-reject-if-unknown-field.pipeline.yaml +33 -0
- package/examples/route-wiring-smoke-test/rejected/23-reject-if-optional-field.pipeline.yaml +32 -0
- package/examples/route-wiring-smoke-test/rejected/24-reject-if-empty-all.pipeline.yaml +31 -0
- package/examples/route-wiring-smoke-test/rejected/25-reject-if-gt-on-string.pipeline.yaml +33 -0
- package/examples/route-wiring-smoke-test/rejected/26-reject-if-optional-nested.pipeline.yaml +36 -0
- package/examples/route-wiring-smoke-test/rejected/27-reject-if-on-loop.pipeline.yaml +63 -0
- package/examples/route-wiring-smoke-test/rejected/29-reject-if-on-failed.pipeline.yaml +46 -0
- package/examples/route-wiring-smoke-test/smoke-test.task.yaml +4 -0
- package/examples/route-wiring-smoke-test/stages/branch-a.yaml +12 -0
- package/examples/route-wiring-smoke-test/stages/branch-b.yaml +12 -0
- package/examples/route-wiring-smoke-test/stages/decide.yaml +12 -0
- package/examples/route-wiring-smoke-test/stages/finish.yaml +12 -0
- package/examples/ship-feature/README.md +190 -0
- package/examples/ship-feature/feat-address-feedback.yaml +119 -0
- package/examples/ship-feature/feat-implement.yaml +180 -0
- package/examples/ship-feature/feat-plan.yaml +120 -0
- package/examples/ship-feature/feat-review.yaml +109 -0
- package/examples/ship-feature/feat-ship.yaml +203 -0
- package/examples/ship-feature/ship-feature.pipeline.yaml +44 -0
- package/examples/ship-feature/ship-feature.task.yaml +78 -0
- package/examples/stage-mcp/README.md +145 -0
- package/examples/stage-mcp/echo-mcp.mjs +20 -0
- package/examples/stage-mcp/stage-mcp-dead.pipeline.yaml +5 -0
- package/examples/stage-mcp/stage-mcp-dead.task.yaml +3 -0
- package/examples/stage-mcp/stage-mcp-missing-var.pipeline.yaml +5 -0
- package/examples/stage-mcp/stage-mcp-missing-var.task.yaml +3 -0
- package/examples/stage-mcp/stage-mcp.pipeline.yaml +5 -0
- package/examples/stage-mcp/stage-mcp.task.yaml +4 -0
- package/examples/stage-mcp/use-echo.yaml +20 -0
- package/examples/stageflow.yaml +51 -0
- package/examples/verify-tour/README.md +80 -0
- package/examples/verify-tour/verify-tour.pipeline.yaml +162 -0
- package/examples/verify-tour/verify-tour.task.yaml +11 -0
- package/package.json +9 -1
- package/skills/stageflow/SKILL.md +6 -6
- package/skills/stageflow/references/control-surface.md +13 -5
- package/skills/stageflow/scripts/detect-host.mjs +14 -1
- package/skills/stageflow/scripts/detect-host.test.mjs +29 -1
- package/skills/stageflow-author/SKILL.md +4 -3
- package/skills/stageflow-author/references/catalog-mapping.md +16 -0
- package/skills/stageflow-author/references/catalog-write-conventions.md +1 -1
- package/skills/stageflow-author/references/stage-prompt-template.md +4 -4
- package/skills/stageflow-run/SKILL.md +22 -12
- package/skills/stageflow-run/references/mcp-call.md +9 -1
- package/skills/stageflow-run/references/task-and-pipeline-selection.md +19 -6
- package/skills/stageflow-run/scripts/mcp-call.mjs +46 -6
- package/skills/stageflow-run/scripts/mcp-call.test.mjs +64 -0
- package/skills/stageflow-session-capture/references/catalog-authoring.md +2 -0
- package/skills/stageflow-setup/SKILL.md +51 -8
- package/dist/ui/assets/index-Da5EHU6M.js +0 -119
package/dist/runstore/port.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { StageLogLine } from "../agent/activity.js";
|
|
2
|
+
import type { ConfigOriginRecord } from "../config/configOrigin.js";
|
|
2
3
|
import type { RunSubmission, RunSubmissionRecord } from "./submission.js";
|
|
3
4
|
import type { AskOperatorPrompt } from "../tools/askOperator.js";
|
|
4
5
|
import type { StageEnvelope } from "../types/envelope.js";
|
|
@@ -6,14 +7,15 @@ import type { FeedbackLoopConfig, InlinePipelineDefinition, ResolvedPipelineDag
|
|
|
6
7
|
import type { CompletionCheck } from "../types/completion.js";
|
|
7
8
|
import type { StageGateKind } from "../types/stage.js";
|
|
8
9
|
import type { StageUsage } from "../types/usage.js";
|
|
9
|
-
export type
|
|
10
|
+
export type { ConfigOriginRecord };
|
|
11
|
+
export type RunStatus = "created" | "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
10
12
|
export type RunPipelineDagSnapshot = ResolvedPipelineDag & {
|
|
11
13
|
stage_ids: string[];
|
|
12
14
|
gate_kinds?: Record<string, StageGateKind[]>;
|
|
13
15
|
/** IR: per-stage clone assignment schema. YAML: `io.input.schema`. */
|
|
14
16
|
clone_input_schema?: Record<string, unknown>;
|
|
15
17
|
};
|
|
16
|
-
export type StageReadiness = "blocked" | "ready" | "running" | "waiting" | "succeeded" | "failed" | "skipped";
|
|
18
|
+
export type StageReadiness = "blocked" | "ready" | "running" | "waiting" | "interrupted" | "succeeded" | "failed" | "skipped";
|
|
17
19
|
export type PipelineTrackNode = {
|
|
18
20
|
stage_id: string;
|
|
19
21
|
status: StageSnapshot["status"];
|
|
@@ -52,12 +54,25 @@ export type RunMeta = {
|
|
|
52
54
|
pipeline_path?: string;
|
|
53
55
|
task_path?: string;
|
|
54
56
|
project_root?: string;
|
|
57
|
+
repository?: string;
|
|
58
|
+
ref?: string;
|
|
59
|
+
resolved_sha?: string;
|
|
60
|
+
run_branch?: string;
|
|
61
|
+
git_author_name?: string;
|
|
62
|
+
git_author_email?: string;
|
|
63
|
+
cancel_reason?: string;
|
|
64
|
+
finished_at?: string;
|
|
65
|
+
slimmed_at?: string;
|
|
66
|
+
disk_bytes?: number;
|
|
67
|
+
disk_measured_at?: string;
|
|
68
|
+
config_origins?: ConfigOriginRecord[];
|
|
69
|
+
pipeline_source?: "inline" | "path";
|
|
70
|
+
caller_id?: string;
|
|
71
|
+
run_manifest?: unknown;
|
|
72
|
+
skip_gates?: boolean;
|
|
55
73
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* memory of the original in-process call — reconstruct the pipeline
|
|
59
|
-
* without needing a catalog file, mirroring how task_yaml already lets
|
|
60
|
-
* task reconstruction work without a task_path.
|
|
74
|
+
* Parsed inline pipeline body for stage-worker reload when there is no
|
|
75
|
+
* pipeline_path. Derived from stored pipeline_body.
|
|
61
76
|
*/
|
|
62
77
|
inline_pipeline?: InlinePipelineDefinition;
|
|
63
78
|
};
|
|
@@ -73,7 +88,7 @@ export type StageLogEvent = StageLogLine & {
|
|
|
73
88
|
export type StageSnapshot = {
|
|
74
89
|
stage_id: string;
|
|
75
90
|
definition_id?: string;
|
|
76
|
-
status: "pending" | "running" | "waiting_for_input" | "succeeded" | "failed" | "skipped";
|
|
91
|
+
status: "pending" | "running" | "waiting_for_input" | "interrupted" | "succeeded" | "failed" | "skipped";
|
|
77
92
|
events: StageLogEvent[];
|
|
78
93
|
envelope: StageEnvelope | null;
|
|
79
94
|
artifacts: string[];
|
|
@@ -94,6 +109,7 @@ export type StageExecution = {
|
|
|
94
109
|
envelope: StageEnvelope | null;
|
|
95
110
|
cost_usd?: number;
|
|
96
111
|
usage?: StageUsage;
|
|
112
|
+
auto_resume_count: number;
|
|
97
113
|
};
|
|
98
114
|
export type StageExecutionPatch = {
|
|
99
115
|
status?: StageSnapshot["status"];
|
|
@@ -103,6 +119,7 @@ export type StageExecutionPatch = {
|
|
|
103
119
|
envelope?: StageEnvelope | null;
|
|
104
120
|
cost_usd?: number;
|
|
105
121
|
usage?: StageUsage;
|
|
122
|
+
auto_resume_count?: number;
|
|
106
123
|
};
|
|
107
124
|
/** The durable disposition of completion verification for one stage attempt. */
|
|
108
125
|
export type VerificationOutcome = "not_run" | "passed" | "failed" | "error";
|
|
@@ -231,6 +248,22 @@ export type CreateForkGenerationInput = Omit<ForkGenerationRecord, "run_id" | "s
|
|
|
231
248
|
status?: ForkGenerationStatus;
|
|
232
249
|
};
|
|
233
250
|
export type ForkGenerationPatch = Partial<Pick<ForkGenerationRecord, "status">>;
|
|
251
|
+
/** Durable registration of a catalog-owned `*.trigger.yaml` definition. */
|
|
252
|
+
export type TriggerRecord = {
|
|
253
|
+
id: string;
|
|
254
|
+
definition_ref: string;
|
|
255
|
+
enabled: boolean;
|
|
256
|
+
last_fired_at?: string;
|
|
257
|
+
last_run_id?: string;
|
|
258
|
+
next_run_at?: string;
|
|
259
|
+
created_at: string;
|
|
260
|
+
updated_at: string;
|
|
261
|
+
};
|
|
262
|
+
export type UpsertTriggerInput = {
|
|
263
|
+
id: string;
|
|
264
|
+
definitionRef: string;
|
|
265
|
+
enabled: boolean;
|
|
266
|
+
};
|
|
234
267
|
export type CompactStage = {
|
|
235
268
|
id: string;
|
|
236
269
|
status: StageSnapshot["status"];
|
|
@@ -238,6 +271,16 @@ export type CompactStage = {
|
|
|
238
271
|
definition_id?: string;
|
|
239
272
|
cost_usd?: number;
|
|
240
273
|
};
|
|
274
|
+
export type RunBindingCompact = {
|
|
275
|
+
kind: "repository" | "checkout" | "unbound";
|
|
276
|
+
repository?: string;
|
|
277
|
+
ref?: string;
|
|
278
|
+
resolved_sha?: string;
|
|
279
|
+
};
|
|
280
|
+
export type RunBindingDetail = RunBindingCompact & {
|
|
281
|
+
run_branch?: string;
|
|
282
|
+
checkout_root?: string;
|
|
283
|
+
};
|
|
241
284
|
export type RunSummary = {
|
|
242
285
|
run_id: string;
|
|
243
286
|
pipeline_id: string;
|
|
@@ -245,9 +288,11 @@ export type RunSummary = {
|
|
|
245
288
|
pipeline_path?: string;
|
|
246
289
|
task_path?: string;
|
|
247
290
|
project_root?: string;
|
|
291
|
+
pipeline_source?: "inline" | "path";
|
|
248
292
|
status: RunStatus;
|
|
249
293
|
created_at: string;
|
|
250
294
|
updated_at?: string;
|
|
295
|
+
binding: RunBindingCompact;
|
|
251
296
|
stages: CompactStage[];
|
|
252
297
|
/** Present when a stage is waiting_for_input (first such stage). */
|
|
253
298
|
waiting_stage_id?: string;
|
|
@@ -265,13 +310,22 @@ export type RunSummary = {
|
|
|
265
310
|
active_feedback_loop?: FeedbackLoopRecord;
|
|
266
311
|
/** Sum of every stage's cost_usd; omitted when no stage reported usage. */
|
|
267
312
|
total_cost_usd?: number;
|
|
313
|
+
cancel_reason?: string;
|
|
314
|
+
finished_at?: string;
|
|
315
|
+
slimmed_at?: string;
|
|
316
|
+
disk_bytes?: number;
|
|
317
|
+
disk_measured_at?: string;
|
|
268
318
|
};
|
|
269
|
-
export type RunDetail = Omit<RunSummary, "stages"> & {
|
|
319
|
+
export type RunDetail = Omit<RunSummary, "stages" | "binding"> & {
|
|
320
|
+
binding: RunBindingDetail;
|
|
270
321
|
task_yaml: string;
|
|
271
322
|
stages: StageSnapshot[];
|
|
272
323
|
pipeline_track: PipelineTrackProjection;
|
|
273
324
|
/** Append-only feedback-loop and replay history, ordered by creation. */
|
|
274
325
|
feedback_loops: FeedbackLoopHistory[];
|
|
326
|
+
config_origins?: ConfigOriginRecord[];
|
|
327
|
+
caller_id?: string;
|
|
328
|
+
run_manifest?: unknown;
|
|
275
329
|
};
|
|
276
330
|
export type FeedbackLoopHistory = {
|
|
277
331
|
loop: FeedbackLoopRecord;
|
|
@@ -285,6 +339,7 @@ export type FeedbackLoopHistory = {
|
|
|
285
339
|
};
|
|
286
340
|
export type CreateRunInput = {
|
|
287
341
|
submission?: RunSubmission;
|
|
342
|
+
runId?: string;
|
|
288
343
|
pipelineId: string;
|
|
289
344
|
taskYaml: string;
|
|
290
345
|
taskId?: string;
|
|
@@ -296,8 +351,24 @@ export type CreateRunInput = {
|
|
|
296
351
|
pipelinePath?: string;
|
|
297
352
|
taskPath?: string;
|
|
298
353
|
projectRoot?: string;
|
|
299
|
-
|
|
354
|
+
repository?: string;
|
|
355
|
+
ref?: string;
|
|
356
|
+
resolvedSha?: string;
|
|
357
|
+
runBranch?: string;
|
|
358
|
+
gitAuthorName?: string;
|
|
359
|
+
gitAuthorEmail?: string;
|
|
360
|
+
status?: RunStatus;
|
|
361
|
+
pipelineSource?: "inline" | "path";
|
|
362
|
+
/** Durable JSON string stored in pipeline_body. Prefer this for slots writers. */
|
|
363
|
+
pipelineBody?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Convenience for callers/tests that have a parsed inline pipeline.
|
|
366
|
+
* Stored as pipeline_body JSON; surfaced back as meta.inline_pipeline on read.
|
|
367
|
+
*/
|
|
300
368
|
inlinePipeline?: InlinePipelineDefinition;
|
|
369
|
+
callerId?: string;
|
|
370
|
+
runManifest?: unknown;
|
|
371
|
+
skipGates?: boolean;
|
|
301
372
|
};
|
|
302
373
|
export type ListRunsFilter = {
|
|
303
374
|
status?: RunStatus;
|
|
@@ -305,6 +376,7 @@ export type ListRunsFilter = {
|
|
|
305
376
|
since?: string;
|
|
306
377
|
/** Match pipeline_id or pipeline_path */
|
|
307
378
|
pipeline?: string;
|
|
379
|
+
caller_id?: string;
|
|
308
380
|
};
|
|
309
381
|
/**
|
|
310
382
|
* Persistence port for pipeline run state.
|
|
@@ -313,11 +385,49 @@ export type ListRunsFilter = {
|
|
|
313
385
|
* run id is all you have (catalog / rehydrate).
|
|
314
386
|
*/
|
|
315
387
|
export interface RunStore {
|
|
388
|
+
/** Checkpoint WAL (when applicable) and release the store connection. */
|
|
389
|
+
close(): Promise<void>;
|
|
390
|
+
/**
|
|
391
|
+
* Consistent compacted snapshot of the live DB via `VACUUM INTO`.
|
|
392
|
+
* Only SqliteRunStore implements this; callers must not open a second raw connection.
|
|
393
|
+
*/
|
|
394
|
+
snapshotInto(destPath: string): Promise<{
|
|
395
|
+
userVersion: number;
|
|
396
|
+
}>;
|
|
316
397
|
getRunBySubmission(key: string): Promise<RunSubmissionRecord | null>;
|
|
317
398
|
createRun(input: CreateRunInput): Promise<CreatedRun>;
|
|
318
399
|
updateRunStatus(runId: string, status: RunStatus): Promise<void>;
|
|
400
|
+
/**
|
|
401
|
+
* Conditional status update (CAS): sets `status` only when the row currently
|
|
402
|
+
* has `expectedStatus`. Returns false when the run exists but status differs;
|
|
403
|
+
* throws when the run is missing.
|
|
404
|
+
*/
|
|
405
|
+
tryUpdateRunStatus(runId: string, status: RunStatus, expectedStatus: RunStatus): Promise<boolean>;
|
|
406
|
+
/** Patch workspace-binding columns on an existing run (queued → materialize). */
|
|
407
|
+
patchRunWorkspaceBinding(runId: string, patch: {
|
|
408
|
+
checkoutRoot?: string;
|
|
409
|
+
repository?: string;
|
|
410
|
+
ref?: string;
|
|
411
|
+
resolvedSha?: string;
|
|
412
|
+
runBranch?: string;
|
|
413
|
+
}): Promise<void>;
|
|
414
|
+
/** Append resolved config origin records (MCP / skill / verify). Dedupes by name+origin+path. */
|
|
415
|
+
appendConfigOrigins(runId: string, origins: ConfigOriginRecord[]): Promise<void>;
|
|
416
|
+
setCancelReason(runId: string, reason: string): Promise<void>;
|
|
417
|
+
/** Persist cached disk usage for `listRuns` (never measured inside listRuns). */
|
|
418
|
+
setRunDiskUsage(runId: string, diskBytes: number, measuredAt: string): Promise<void>;
|
|
419
|
+
/** Record that SLIM reclaim completed for this run (R18 idempotency gate). */
|
|
420
|
+
setSlimmedAt(runId: string, slimmedAt: string): Promise<void>;
|
|
421
|
+
/** Hard-delete every run-scoped row. Throws `Run not found: …` when missing. */
|
|
422
|
+
deleteRun(runId: string): Promise<void>;
|
|
319
423
|
readRunMeta(runId: string): Promise<RunMeta>;
|
|
320
424
|
readTaskYaml(runId: string): Promise<string>;
|
|
425
|
+
readPipelineBody(runId: string): Promise<string | null>;
|
|
426
|
+
/**
|
|
427
|
+
* Atomic replace of the `run_manifest` JSON blob (build → redact → write).
|
|
428
|
+
* Pass `null` to clear.
|
|
429
|
+
*/
|
|
430
|
+
updateRunManifest(runId: string, manifest: unknown): Promise<void>;
|
|
321
431
|
/** Opaque run workspace root for agents and artifact tools. */
|
|
322
432
|
getWorkspaceDir(runId: string): string;
|
|
323
433
|
ensureStageWorkspace(runId: string, stageId: string): Promise<void>;
|
|
@@ -327,6 +437,8 @@ export interface RunStore {
|
|
|
327
437
|
getLatestStageExecution(runId: string, stageId: string): Promise<StageExecution | null>;
|
|
328
438
|
countStageAttempts(runId: string, stageId: string): Promise<number>;
|
|
329
439
|
getStageExecution(runId: string, stageId: string, attempt: number): Promise<StageExecution>;
|
|
440
|
+
/** Latest attempt rows whose status is `interrupted` (targeted scan; not listRuns). */
|
|
441
|
+
listInterruptedStageExecutions(): Promise<StageExecution[]>;
|
|
330
442
|
updateStageExecution(runId: string, stageId: string, attempt: number, patch: StageExecutionPatch): Promise<void>;
|
|
331
443
|
/** Create or update evidence for one check in a stage execution attempt. */
|
|
332
444
|
upsertVerificationCheckResult(runId: string, stageId: string, result: VerificationCheckResultPatch, options?: {
|
|
@@ -346,8 +458,22 @@ export interface RunStore {
|
|
|
346
458
|
}): Promise<void>;
|
|
347
459
|
listStageEvents(runId: string, stageId: string, attempt?: number): Promise<StageLogEvent[]>;
|
|
348
460
|
listRuns(filter?: ListRunsFilter): Promise<RunSummary[]>;
|
|
349
|
-
/**
|
|
350
|
-
|
|
461
|
+
/** Idempotent upsert; returns the realpath/resolve-normalized absolute key. */
|
|
462
|
+
ensureProject(absPath: string): Promise<string>;
|
|
463
|
+
/** Absolute roots from the durable projects registry. */
|
|
464
|
+
listRegisteredProjects(): Promise<string[]>;
|
|
465
|
+
/** Idempotent create-or-update of a trigger's catalog registration. */
|
|
466
|
+
upsertTrigger(input: UpsertTriggerInput): Promise<TriggerRecord>;
|
|
467
|
+
getTrigger(id: string): Promise<TriggerRecord | null>;
|
|
468
|
+
listTriggers(): Promise<TriggerRecord[]>;
|
|
469
|
+
/** Record a fire: stamps last_fired_at/last_run_id. Throws if the trigger is missing. */
|
|
470
|
+
recordTriggerFired(id: string, runId: string): Promise<void>;
|
|
471
|
+
/** Persist the next computed fire time for a schedule-kind trigger. Throws if the trigger is missing. */
|
|
472
|
+
setTriggerNextRun(id: string, nextRunAt: string): Promise<void>;
|
|
473
|
+
/** Read a single adapter-owned state value for a trigger, or null if unset. */
|
|
474
|
+
getTriggerAdapterState(triggerId: string, key: string): Promise<string | null>;
|
|
475
|
+
/** Upsert a single adapter-owned state value for a trigger. */
|
|
476
|
+
setTriggerAdapterState(triggerId: string, key: string, value: string): Promise<void>;
|
|
351
477
|
readRun(runId: string): Promise<RunDetail>;
|
|
352
478
|
updatePipelineDag(runId: string, dag: RunPipelineDagSnapshot): Promise<void>;
|
|
353
479
|
createFeedbackLoop(runId: string, input: CreateFeedbackLoopInput): Promise<FeedbackLoopRecord>;
|
|
@@ -377,4 +503,4 @@ export interface RunStore {
|
|
|
377
503
|
}
|
|
378
504
|
export declare function stageStatusFromEvents(events: StageLogEvent[]): StageSnapshot["status"];
|
|
379
505
|
export declare function findUnhandledFailedStage(stages: StageSnapshot[], dag?: Pick<RunPipelineDagSnapshot, "nodes"> | null): StageSnapshot | undefined;
|
|
380
|
-
export declare function deriveStatusFromStages(stages: StageSnapshot[], dag?: Pick<RunPipelineDagSnapshot, "nodes"> | null): RunStatus;
|
|
506
|
+
export declare function deriveStatusFromStages(stages: StageSnapshot[], dag?: Pick<RunPipelineDagSnapshot, "nodes"> | null, currentStatus?: RunStatus): RunStatus;
|
package/dist/runstore/port.js
CHANGED
|
@@ -6,6 +6,8 @@ export function stageStatusFromEvents(events) {
|
|
|
6
6
|
status = "running";
|
|
7
7
|
if (ev.event === "waiting_for_input")
|
|
8
8
|
status = "waiting_for_input";
|
|
9
|
+
if (ev.event === "interrupted")
|
|
10
|
+
status = "interrupted";
|
|
9
11
|
if (ev.event === "succeeded")
|
|
10
12
|
status = "succeeded";
|
|
11
13
|
if (ev.event === "failed")
|
|
@@ -54,7 +56,11 @@ function stageResolvedForSuccess(stage, dag, byId) {
|
|
|
54
56
|
}
|
|
55
57
|
return false;
|
|
56
58
|
}
|
|
57
|
-
|
|
59
|
+
const OPERATOR_TERMINAL_STATUSES = new Set(["cancelled", "queued"]);
|
|
60
|
+
export function deriveStatusFromStages(stages, dag, currentStatus) {
|
|
61
|
+
if (currentStatus !== undefined && OPERATOR_TERMINAL_STATUSES.has(currentStatus)) {
|
|
62
|
+
return currentStatus;
|
|
63
|
+
}
|
|
58
64
|
if (stages.length === 0)
|
|
59
65
|
return "created";
|
|
60
66
|
if (findUnhandledFailedStage(stages, dag))
|
|
@@ -65,6 +71,7 @@ export function deriveStatusFromStages(stages, dag) {
|
|
|
65
71
|
}
|
|
66
72
|
if (stages.some((s) => s.status === "running" ||
|
|
67
73
|
s.status === "waiting_for_input" ||
|
|
74
|
+
s.status === "interrupted" ||
|
|
68
75
|
s.status === "succeeded")) {
|
|
69
76
|
return "running";
|
|
70
77
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type ServiceProbeResult } from "../server/ensureGlobalService.js";
|
|
2
|
+
export type RestoreErrorCode = "restore_host_live" | "restore_store_busy" | "restore_verify_failed" | "restore_schema_too_new" | "restore_version_mismatch" | "restore_unsafe_member" | "restore_failed" | "restore_not_found";
|
|
3
|
+
export declare class RestoreError extends Error {
|
|
4
|
+
readonly code: RestoreErrorCode;
|
|
5
|
+
readonly detail?: Record<string, unknown>;
|
|
6
|
+
constructor(message: string, code: RestoreErrorCode, detail?: Record<string, unknown>);
|
|
7
|
+
}
|
|
8
|
+
export type RestoreManifest = {
|
|
9
|
+
created_at?: string;
|
|
10
|
+
stageflow_version?: string;
|
|
11
|
+
schema_version?: number;
|
|
12
|
+
contents?: string[];
|
|
13
|
+
credentials_included?: boolean;
|
|
14
|
+
a2a_artifacts_included?: boolean;
|
|
15
|
+
fingerprint_skew?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type VerifiedRestoreArchive = {
|
|
18
|
+
stagingDir: string;
|
|
19
|
+
dbPath: string;
|
|
20
|
+
manifest: RestoreManifest | null;
|
|
21
|
+
schemaVersion: number;
|
|
22
|
+
missingA2aArtifactRows: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function restorePendingDir(homeDir?: string): string;
|
|
25
|
+
export declare function restoreMarkerPath(homeDir?: string): string;
|
|
26
|
+
export declare function restoreAppliedPath(homeDir?: string): string;
|
|
27
|
+
export declare function restoreFailedPath(homeDir?: string): string;
|
|
28
|
+
export type RestoreMarker = {
|
|
29
|
+
archive: string;
|
|
30
|
+
attempts: number;
|
|
31
|
+
staged_at: string;
|
|
32
|
+
drain_deadline?: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function extractVerifiedArchive(archivePath: string): Promise<VerifiedRestoreArchive>;
|
|
35
|
+
export declare function assertHostDownForRestore(options?: {
|
|
36
|
+
probe?: () => Promise<ServiceProbeResult>;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Open an exclusive lock on state.db with busy_timeout=0 and hold it through
|
|
40
|
+
* the provided callback (used to relocate the DB triplet safely).
|
|
41
|
+
*/
|
|
42
|
+
export declare function withExclusiveStoreLock<T>(homeDir: string, fn: () => T): T;
|
|
43
|
+
export type ApplyRestoreResult = {
|
|
44
|
+
schema_version: number;
|
|
45
|
+
missing_a2a_artifact_rows: number;
|
|
46
|
+
pre_restore_stamp: string;
|
|
47
|
+
};
|
|
48
|
+
export declare function applyRestoreArchive(options: {
|
|
49
|
+
archivePath: string;
|
|
50
|
+
homeDir?: string;
|
|
51
|
+
force?: boolean;
|
|
52
|
+
restoreCredentials?: boolean;
|
|
53
|
+
probe?: () => Promise<ServiceProbeResult>;
|
|
54
|
+
}): Promise<ApplyRestoreResult>;
|
|
55
|
+
export declare function stageRestoreForBoot(options: {
|
|
56
|
+
archivePath: string;
|
|
57
|
+
homeDir?: string;
|
|
58
|
+
graceMs?: number;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
marker: RestoreMarker;
|
|
61
|
+
stagedPath: string;
|
|
62
|
+
}>;
|
|
63
|
+
export declare function resolveBackupNameForRestore(name: string, homeDir?: string): Promise<string>;
|
|
64
|
+
export type BootRestoreOutcome = {
|
|
65
|
+
status: "none";
|
|
66
|
+
} | {
|
|
67
|
+
status: "applied";
|
|
68
|
+
result: ApplyRestoreResult;
|
|
69
|
+
} | {
|
|
70
|
+
status: "failed";
|
|
71
|
+
reason: string;
|
|
72
|
+
attempts: number;
|
|
73
|
+
} | {
|
|
74
|
+
status: "blocked";
|
|
75
|
+
reason: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Apply a staged restore marker before opening the store for serving.
|
|
79
|
+
* Never re-applies restore.applied. Two failures → restore.failed (hard non-serve).
|
|
80
|
+
*/
|
|
81
|
+
export declare function applyPendingRestoreAtBoot(homeDir?: string): Promise<BootRestoreOutcome>;
|