@smthrs/control 0.0.0-stage → 1.0.0-rc.3
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/CHANGELOG.md +194 -0
- package/LICENSE +21 -0
- package/README.md +168 -2
- package/dist/cjs/ApprovalAuthority.d.ts +73 -0
- package/dist/cjs/ApprovalAuthority.d.ts.map +1 -0
- package/dist/cjs/ApprovalAuthority.js +62 -0
- package/dist/cjs/ApprovalAuthority.js.map +7 -0
- package/dist/cjs/Cancellation.d.ts +107 -0
- package/dist/cjs/Cancellation.d.ts.map +1 -0
- package/dist/cjs/Cancellation.js +72 -0
- package/dist/cjs/Cancellation.js.map +7 -0
- package/dist/cjs/Channels.d.ts +170 -0
- package/dist/cjs/Channels.d.ts.map +1 -0
- package/dist/cjs/Channels.js +278 -0
- package/dist/cjs/Channels.js.map +7 -0
- package/dist/cjs/Control.d.ts +202 -0
- package/dist/cjs/Control.d.ts.map +1 -0
- package/dist/cjs/Control.js +47 -0
- package/dist/cjs/Control.js.map +7 -0
- package/dist/cjs/ControlClient.d.ts +52 -0
- package/dist/cjs/ControlClient.d.ts.map +1 -0
- package/dist/cjs/ControlClient.js +191 -0
- package/dist/cjs/ControlClient.js.map +7 -0
- package/dist/cjs/ControlError.d.ts +318 -0
- package/dist/cjs/ControlError.d.ts.map +1 -0
- package/dist/cjs/ControlError.js +249 -0
- package/dist/cjs/ControlError.js.map +7 -0
- package/dist/cjs/ControlExecutor.d.ts +372 -0
- package/dist/cjs/ControlExecutor.d.ts.map +1 -0
- package/dist/cjs/ControlExecutor.js +123 -0
- package/dist/cjs/ControlExecutor.js.map +7 -0
- package/dist/cjs/ControlFacts.d.ts +454 -0
- package/dist/cjs/ControlFacts.d.ts.map +1 -0
- package/dist/cjs/ControlFacts.js +261 -0
- package/dist/cjs/ControlFacts.js.map +7 -0
- package/dist/cjs/ControlLive.d.ts +23 -0
- package/dist/cjs/ControlLive.d.ts.map +1 -0
- package/dist/cjs/ControlLive.js +1280 -0
- package/dist/cjs/ControlLive.js.map +7 -0
- package/dist/cjs/ControlRpcs.d.ts +1204 -0
- package/dist/cjs/ControlRpcs.d.ts.map +1 -0
- package/dist/cjs/ControlRpcs.js +247 -0
- package/dist/cjs/ControlRpcs.js.map +7 -0
- package/dist/cjs/ControlRuntime.d.ts +635 -0
- package/dist/cjs/ControlRuntime.d.ts.map +1 -0
- package/dist/cjs/ControlRuntime.js +740 -0
- package/dist/cjs/ControlRuntime.js.map +7 -0
- package/dist/cjs/ControlSchema.d.ts +2642 -0
- package/dist/cjs/ControlSchema.d.ts.map +1 -0
- package/dist/cjs/ControlSchema.js +634 -0
- package/dist/cjs/ControlSchema.js.map +7 -0
- package/dist/cjs/ControlServer.d.ts +51 -0
- package/dist/cjs/ControlServer.d.ts.map +1 -0
- package/dist/cjs/ControlServer.js +121 -0
- package/dist/cjs/ControlServer.js.map +7 -0
- package/dist/cjs/Credential.d.ts +136 -0
- package/dist/cjs/Credential.d.ts.map +1 -0
- package/dist/cjs/Credential.js +168 -0
- package/dist/cjs/Credential.js.map +7 -0
- package/dist/cjs/CredentialCipher.d.ts +90 -0
- package/dist/cjs/CredentialCipher.d.ts.map +1 -0
- package/dist/cjs/CredentialCipher.js +45 -0
- package/dist/cjs/CredentialCipher.js.map +7 -0
- package/dist/cjs/CredentialStore.d.ts +97 -0
- package/dist/cjs/CredentialStore.d.ts.map +1 -0
- package/dist/cjs/CredentialStore.js +81 -0
- package/dist/cjs/CredentialStore.js.map +7 -0
- package/dist/cjs/DispatchReader.d.ts +112 -0
- package/dist/cjs/DispatchReader.d.ts.map +1 -0
- package/dist/cjs/DispatchReader.js +45 -0
- package/dist/cjs/DispatchReader.js.map +7 -0
- package/dist/cjs/Health.d.ts +333 -0
- package/dist/cjs/Health.d.ts.map +1 -0
- package/dist/cjs/Health.js +311 -0
- package/dist/cjs/Health.js.map +7 -0
- package/dist/cjs/JevSessionChecker.d.ts +57 -0
- package/dist/cjs/JevSessionChecker.d.ts.map +1 -0
- package/dist/cjs/JevSessionChecker.js +113 -0
- package/dist/cjs/JevSessionChecker.js.map +7 -0
- package/dist/cjs/Lineage.d.ts +131 -0
- package/dist/cjs/Lineage.d.ts.map +1 -0
- package/dist/cjs/Lineage.js +81 -0
- package/dist/cjs/Lineage.js.map +7 -0
- package/dist/cjs/Migrations.d.ts +34 -0
- package/dist/cjs/Migrations.d.ts.map +1 -0
- package/dist/cjs/Migrations.js +60 -0
- package/dist/cjs/Migrations.js.map +7 -0
- package/dist/cjs/Monitor.d.ts +282 -0
- package/dist/cjs/Monitor.d.ts.map +1 -0
- package/dist/cjs/Monitor.js +283 -0
- package/dist/cjs/Monitor.js.map +7 -0
- package/dist/cjs/ScopedToken.d.ts +193 -0
- package/dist/cjs/ScopedToken.d.ts.map +1 -0
- package/dist/cjs/ScopedToken.js +135 -0
- package/dist/cjs/ScopedToken.js.map +7 -0
- package/dist/cjs/SqlControlRuntime.d.ts +161 -0
- package/dist/cjs/SqlControlRuntime.d.ts.map +1 -0
- package/dist/cjs/SqlControlRuntime.js +1521 -0
- package/dist/cjs/SqlControlRuntime.js.map +7 -0
- package/dist/cjs/SqlCredentialStore.d.ts +43 -0
- package/dist/cjs/SqlCredentialStore.d.ts.map +1 -0
- package/dist/cjs/SqlCredentialStore.js +113 -0
- package/dist/cjs/SqlCredentialStore.js.map +7 -0
- package/dist/cjs/Steering.d.ts +69 -0
- package/dist/cjs/Steering.d.ts.map +1 -0
- package/dist/cjs/Steering.js +49 -0
- package/dist/cjs/Steering.js.map +7 -0
- package/dist/cjs/SystemFlows.d.ts +223 -0
- package/dist/cjs/SystemFlows.d.ts.map +1 -0
- package/dist/cjs/SystemFlows.js +195 -0
- package/dist/cjs/SystemFlows.js.map +7 -0
- package/dist/cjs/WebCryptoCipher.d.ts +49 -0
- package/dist/cjs/WebCryptoCipher.d.ts.map +1 -0
- package/dist/cjs/WebCryptoCipher.js +129 -0
- package/dist/cjs/WebCryptoCipher.js.map +7 -0
- package/dist/cjs/WebhookChannel.d.ts +113 -0
- package/dist/cjs/WebhookChannel.d.ts.map +1 -0
- package/dist/cjs/WebhookChannel.js +98 -0
- package/dist/cjs/WebhookChannel.js.map +7 -0
- package/dist/cjs/index.d.ts +160 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +91 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/MutationBoundary.d.ts +27 -0
- package/dist/cjs/internal/MutationBoundary.d.ts.map +1 -0
- package/dist/cjs/internal/MutationBoundary.js +50 -0
- package/dist/cjs/internal/MutationBoundary.js.map +7 -0
- package/dist/cjs/internal/activeFibers.d.ts +12 -0
- package/dist/cjs/internal/activeFibers.d.ts.map +1 -0
- package/dist/cjs/internal/activeFibers.js +30 -0
- package/dist/cjs/internal/activeFibers.js.map +7 -0
- package/dist/cjs/internal/issues.d.ts +28 -0
- package/dist/cjs/internal/issues.d.ts.map +1 -0
- package/dist/cjs/internal/issues.js +34 -0
- package/dist/cjs/internal/issues.js.map +7 -0
- package/dist/cjs/internal/planning.d.ts +347 -0
- package/dist/cjs/internal/planning.d.ts.map +1 -0
- package/dist/cjs/internal/planning.js +137 -0
- package/dist/cjs/internal/planning.js.map +7 -0
- package/dist/cjs/internal/sqlSchemaErrors.d.ts +18 -0
- package/dist/cjs/internal/sqlSchemaErrors.d.ts.map +1 -0
- package/dist/cjs/internal/sqlSchemaErrors.js +40 -0
- package/dist/cjs/internal/sqlSchemaErrors.js.map +7 -0
- package/dist/cjs/migrations/0001_control_tables.d.ts +18 -0
- package/dist/cjs/migrations/0001_control_tables.d.ts.map +1 -0
- package/dist/cjs/migrations/0001_control_tables.js +115 -0
- package/dist/cjs/migrations/0001_control_tables.js.map +7 -0
- package/dist/cjs/migrations/0002_run_keys.d.ts +15 -0
- package/dist/cjs/migrations/0002_run_keys.d.ts.map +1 -0
- package/dist/cjs/migrations/0002_run_keys.js +44 -0
- package/dist/cjs/migrations/0002_run_keys.js.map +7 -0
- package/dist/cjs/migrations/0003_signal_commands.d.ts +13 -0
- package/dist/cjs/migrations/0003_signal_commands.d.ts.map +1 -0
- package/dist/cjs/migrations/0003_signal_commands.js +50 -0
- package/dist/cjs/migrations/0003_signal_commands.js.map +7 -0
- package/dist/cjs/migrations/0004_approval_decisions.d.ts +13 -0
- package/dist/cjs/migrations/0004_approval_decisions.d.ts.map +1 -0
- package/dist/cjs/migrations/0004_approval_decisions.js +45 -0
- package/dist/cjs/migrations/0004_approval_decisions.js.map +7 -0
- package/dist/cjs/migrations/0005_signal_principals.d.ts +18 -0
- package/dist/cjs/migrations/0005_signal_principals.d.ts.map +1 -0
- package/dist/cjs/migrations/0005_signal_principals.js +45 -0
- package/dist/cjs/migrations/0005_signal_principals.js.map +7 -0
- package/dist/cjs/migrations/0006_run_principals.d.ts +18 -0
- package/dist/cjs/migrations/0006_run_principals.d.ts.map +1 -0
- package/dist/cjs/migrations/0006_run_principals.js +49 -0
- package/dist/cjs/migrations/0006_run_principals.js.map +7 -0
- package/dist/cjs/migrations/0007_resume_consent.d.ts +18 -0
- package/dist/cjs/migrations/0007_resume_consent.d.ts.map +1 -0
- package/dist/cjs/migrations/0007_resume_consent.js +46 -0
- package/dist/cjs/migrations/0007_resume_consent.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/test/TestControl.d.ts +19 -0
- package/dist/cjs/test/TestControl.d.ts.map +1 -0
- package/dist/cjs/test/TestControl.js +62 -0
- package/dist/cjs/test/TestControl.js.map +7 -0
- package/dist/esm/ApprovalAuthority.d.ts +73 -0
- package/dist/esm/ApprovalAuthority.d.ts.map +1 -0
- package/dist/esm/ApprovalAuthority.js +72 -0
- package/dist/esm/ApprovalAuthority.js.map +1 -0
- package/dist/esm/Cancellation.d.ts +107 -0
- package/dist/esm/Cancellation.d.ts.map +1 -0
- package/dist/esm/Cancellation.js +116 -0
- package/dist/esm/Cancellation.js.map +1 -0
- package/dist/esm/Channels.d.ts +170 -0
- package/dist/esm/Channels.d.ts.map +1 -0
- package/dist/esm/Channels.js +312 -0
- package/dist/esm/Channels.js.map +1 -0
- package/dist/esm/Control.d.ts +202 -0
- package/dist/esm/Control.d.ts.map +1 -0
- package/dist/esm/Control.js +42 -0
- package/dist/esm/Control.js.map +1 -0
- package/dist/esm/ControlClient.d.ts +52 -0
- package/dist/esm/ControlClient.d.ts.map +1 -0
- package/dist/esm/ControlClient.js +217 -0
- package/dist/esm/ControlClient.js.map +1 -0
- package/dist/esm/ControlError.d.ts +318 -0
- package/dist/esm/ControlError.d.ts.map +1 -0
- package/dist/esm/ControlError.js +359 -0
- package/dist/esm/ControlError.js.map +1 -0
- package/dist/esm/ControlExecutor.d.ts +372 -0
- package/dist/esm/ControlExecutor.d.ts.map +1 -0
- package/dist/esm/ControlExecutor.js +212 -0
- package/dist/esm/ControlExecutor.js.map +1 -0
- package/dist/esm/ControlFacts.d.ts +454 -0
- package/dist/esm/ControlFacts.d.ts.map +1 -0
- package/dist/esm/ControlFacts.js +324 -0
- package/dist/esm/ControlFacts.js.map +1 -0
- package/dist/esm/ControlLive.d.ts +23 -0
- package/dist/esm/ControlLive.d.ts.map +1 -0
- package/dist/esm/ControlLive.js +1585 -0
- package/dist/esm/ControlLive.js.map +1 -0
- package/dist/esm/ControlRpcs.d.ts +1204 -0
- package/dist/esm/ControlRpcs.d.ts.map +1 -0
- package/dist/esm/ControlRpcs.js +299 -0
- package/dist/esm/ControlRpcs.js.map +1 -0
- package/dist/esm/ControlRuntime.d.ts +635 -0
- package/dist/esm/ControlRuntime.d.ts.map +1 -0
- package/dist/esm/ControlRuntime.js +807 -0
- package/dist/esm/ControlRuntime.js.map +1 -0
- package/dist/esm/ControlSchema.d.ts +2642 -0
- package/dist/esm/ControlSchema.d.ts.map +1 -0
- package/dist/esm/ControlSchema.js +1030 -0
- package/dist/esm/ControlSchema.js.map +1 -0
- package/dist/esm/ControlServer.d.ts +51 -0
- package/dist/esm/ControlServer.d.ts.map +1 -0
- package/dist/esm/ControlServer.js +145 -0
- package/dist/esm/ControlServer.js.map +1 -0
- package/dist/esm/Credential.d.ts +136 -0
- package/dist/esm/Credential.d.ts.map +1 -0
- package/dist/esm/Credential.js +190 -0
- package/dist/esm/Credential.js.map +1 -0
- package/dist/esm/CredentialCipher.d.ts +90 -0
- package/dist/esm/CredentialCipher.d.ts.map +1 -0
- package/dist/esm/CredentialCipher.js +56 -0
- package/dist/esm/CredentialCipher.js.map +1 -0
- package/dist/esm/CredentialStore.d.ts +97 -0
- package/dist/esm/CredentialStore.d.ts.map +1 -0
- package/dist/esm/CredentialStore.js +101 -0
- package/dist/esm/CredentialStore.js.map +1 -0
- package/dist/esm/DispatchReader.d.ts +112 -0
- package/dist/esm/DispatchReader.d.ts.map +1 -0
- package/dist/esm/DispatchReader.js +76 -0
- package/dist/esm/DispatchReader.js.map +1 -0
- package/dist/esm/Health.d.ts +333 -0
- package/dist/esm/Health.d.ts.map +1 -0
- package/dist/esm/Health.js +400 -0
- package/dist/esm/Health.js.map +1 -0
- package/dist/esm/JevSessionChecker.d.ts +57 -0
- package/dist/esm/JevSessionChecker.d.ts.map +1 -0
- package/dist/esm/JevSessionChecker.js +108 -0
- package/dist/esm/JevSessionChecker.js.map +1 -0
- package/dist/esm/Lineage.d.ts +131 -0
- package/dist/esm/Lineage.d.ts.map +1 -0
- package/dist/esm/Lineage.js +174 -0
- package/dist/esm/Lineage.js.map +1 -0
- package/dist/esm/Migrations.d.ts +34 -0
- package/dist/esm/Migrations.d.ts.map +1 -0
- package/dist/esm/Migrations.js +53 -0
- package/dist/esm/Migrations.js.map +1 -0
- package/dist/esm/Monitor.d.ts +282 -0
- package/dist/esm/Monitor.d.ts.map +1 -0
- package/dist/esm/Monitor.js +415 -0
- package/dist/esm/Monitor.js.map +1 -0
- package/dist/esm/ScopedToken.d.ts +193 -0
- package/dist/esm/ScopedToken.d.ts.map +1 -0
- package/dist/esm/ScopedToken.js +224 -0
- package/dist/esm/ScopedToken.js.map +1 -0
- package/dist/esm/SqlControlRuntime.d.ts +161 -0
- package/dist/esm/SqlControlRuntime.d.ts.map +1 -0
- package/dist/esm/SqlControlRuntime.js +1756 -0
- package/dist/esm/SqlControlRuntime.js.map +1 -0
- package/dist/esm/SqlCredentialStore.d.ts +43 -0
- package/dist/esm/SqlCredentialStore.d.ts.map +1 -0
- package/dist/esm/SqlCredentialStore.js +97 -0
- package/dist/esm/SqlCredentialStore.js.map +1 -0
- package/dist/esm/Steering.d.ts +69 -0
- package/dist/esm/Steering.d.ts.map +1 -0
- package/dist/esm/Steering.js +89 -0
- package/dist/esm/Steering.js.map +1 -0
- package/dist/esm/SystemFlows.d.ts +223 -0
- package/dist/esm/SystemFlows.d.ts.map +1 -0
- package/dist/esm/SystemFlows.js +198 -0
- package/dist/esm/SystemFlows.js.map +1 -0
- package/dist/esm/WebCryptoCipher.d.ts +49 -0
- package/dist/esm/WebCryptoCipher.d.ts.map +1 -0
- package/dist/esm/WebCryptoCipher.js +123 -0
- package/dist/esm/WebCryptoCipher.js.map +1 -0
- package/dist/esm/WebhookChannel.d.ts +113 -0
- package/dist/esm/WebhookChannel.d.ts.map +1 -0
- package/dist/esm/WebhookChannel.js +109 -0
- package/dist/esm/WebhookChannel.js.map +1 -0
- package/dist/esm/index.d.ts +160 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +160 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/MutationBoundary.d.ts +27 -0
- package/dist/esm/internal/MutationBoundary.d.ts.map +1 -0
- package/dist/esm/internal/MutationBoundary.js +40 -0
- package/dist/esm/internal/MutationBoundary.js.map +1 -0
- package/dist/esm/internal/activeFibers.d.ts +12 -0
- package/dist/esm/internal/activeFibers.d.ts.map +1 -0
- package/dist/esm/internal/activeFibers.js +17 -0
- package/dist/esm/internal/activeFibers.js.map +1 -0
- package/dist/esm/internal/issues.d.ts +28 -0
- package/dist/esm/internal/issues.d.ts.map +1 -0
- package/dist/esm/internal/issues.js +35 -0
- package/dist/esm/internal/issues.js.map +1 -0
- package/dist/esm/internal/planning.d.ts +347 -0
- package/dist/esm/internal/planning.d.ts.map +1 -0
- package/dist/esm/internal/planning.js +199 -0
- package/dist/esm/internal/planning.js.map +1 -0
- package/dist/esm/internal/sqlSchemaErrors.d.ts +18 -0
- package/dist/esm/internal/sqlSchemaErrors.d.ts.map +1 -0
- package/dist/esm/internal/sqlSchemaErrors.js +38 -0
- package/dist/esm/internal/sqlSchemaErrors.js.map +1 -0
- package/dist/esm/migrations/0001_control_tables.d.ts +18 -0
- package/dist/esm/migrations/0001_control_tables.d.ts.map +1 -0
- package/dist/esm/migrations/0001_control_tables.js +96 -0
- package/dist/esm/migrations/0001_control_tables.js.map +1 -0
- package/dist/esm/migrations/0002_run_keys.d.ts +15 -0
- package/dist/esm/migrations/0002_run_keys.d.ts.map +1 -0
- package/dist/esm/migrations/0002_run_keys.js +22 -0
- package/dist/esm/migrations/0002_run_keys.js.map +1 -0
- package/dist/esm/migrations/0003_signal_commands.d.ts +13 -0
- package/dist/esm/migrations/0003_signal_commands.d.ts.map +1 -0
- package/dist/esm/migrations/0003_signal_commands.js +26 -0
- package/dist/esm/migrations/0003_signal_commands.js.map +1 -0
- package/dist/esm/migrations/0004_approval_decisions.d.ts +13 -0
- package/dist/esm/migrations/0004_approval_decisions.d.ts.map +1 -0
- package/dist/esm/migrations/0004_approval_decisions.js +25 -0
- package/dist/esm/migrations/0004_approval_decisions.js.map +1 -0
- package/dist/esm/migrations/0005_signal_principals.d.ts +18 -0
- package/dist/esm/migrations/0005_signal_principals.d.ts.map +1 -0
- package/dist/esm/migrations/0005_signal_principals.js +27 -0
- package/dist/esm/migrations/0005_signal_principals.js.map +1 -0
- package/dist/esm/migrations/0006_run_principals.d.ts +18 -0
- package/dist/esm/migrations/0006_run_principals.d.ts.map +1 -0
- package/dist/esm/migrations/0006_run_principals.js +30 -0
- package/dist/esm/migrations/0006_run_principals.js.map +1 -0
- package/dist/esm/migrations/0007_resume_consent.d.ts +18 -0
- package/dist/esm/migrations/0007_resume_consent.d.ts.map +1 -0
- package/dist/esm/migrations/0007_resume_consent.js +27 -0
- package/dist/esm/migrations/0007_resume_consent.js.map +1 -0
- package/dist/esm/test/TestControl.d.ts +19 -0
- package/dist/esm/test/TestControl.d.ts.map +1 -0
- package/dist/esm/test/TestControl.js +30 -0
- package/dist/esm/test/TestControl.js.map +1 -0
- package/docs/README.md +189 -0
- package/docs/api.md +982 -0
- package/docs/concepts/authority.md +109 -0
- package/docs/concepts/cancellation.md +129 -0
- package/docs/concepts/lineage.md +132 -0
- package/docs/concepts/ownership.md +139 -0
- package/docs/concepts/projections.md +203 -0
- package/docs/concepts/receipts.md +128 -0
- package/docs/guides/approvals.md +284 -0
- package/docs/guides/cancel-and-resume.md +162 -0
- package/docs/guides/durable-storage.md +147 -0
- package/docs/guides/implement-an-executor.md +173 -0
- package/docs/guides/ingest-a-webhook.md +177 -0
- package/docs/guides/list-runs.md +160 -0
- package/docs/guides/monitor-runs.md +176 -0
- package/docs/guides/observe-health.md +147 -0
- package/docs/guides/postgres-tests.md +5 -0
- package/docs/guides/serve-over-rpc.md +220 -0
- package/docs/guides/signal-a-run.md +53 -0
- package/docs/guides/steer-a-run.md +138 -0
- package/docs/guides/store-credentials.md +164 -0
- package/docs/guides/testing.md +139 -0
- package/docs/guides/watch-a-run.md +154 -0
- package/docs/installation.md +106 -0
- package/docs/quickstart.md +163 -0
- package/docs/troubleshooting.md +208 -0
- package/package.json +405 -3
- package/src/ApprovalAuthority.ts +114 -0
- package/src/Cancellation.ts +172 -0
- package/src/Channels.ts +493 -0
- package/src/Control.ts +337 -0
- package/src/ControlClient.ts +319 -0
- package/src/ControlError.ts +378 -0
- package/src/ControlExecutor.ts +490 -0
- package/src/ControlFacts.ts +383 -0
- package/src/ControlLive.ts +2113 -0
- package/src/ControlRpcs.ts +443 -0
- package/src/ControlRuntime.ts +1597 -0
- package/src/ControlSchema.ts +1380 -0
- package/src/ControlServer.ts +182 -0
- package/src/Credential.ts +310 -0
- package/src/CredentialCipher.ts +110 -0
- package/src/CredentialStore.ts +152 -0
- package/src/DispatchReader.ts +122 -0
- package/src/Health.ts +591 -0
- package/src/JevSessionChecker.ts +127 -0
- package/src/Lineage.ts +203 -0
- package/src/Migrations.ts +56 -0
- package/src/Monitor.ts +600 -0
- package/src/ScopedToken.ts +306 -0
- package/src/SqlControlRuntime.ts +2476 -0
- package/src/SqlCredentialStore.ts +148 -0
- package/src/Steering.ts +96 -0
- package/src/SystemFlows.ts +225 -0
- package/src/WebCryptoCipher.ts +169 -0
- package/src/WebhookChannel.ts +166 -0
- package/src/index.ts +188 -0
- package/src/internal/MutationBoundary.ts +46 -0
- package/src/internal/activeFibers.ts +22 -0
- package/src/internal/issues.ts +40 -0
- package/src/internal/planning.ts +262 -0
- package/src/internal/sqlSchemaErrors.ts +37 -0
- package/src/migrations/0001_control_tables.ts +99 -0
- package/src/migrations/0002_run_keys.ts +23 -0
- package/src/migrations/0003_signal_commands.ts +27 -0
- package/src/migrations/0004_approval_decisions.ts +25 -0
- package/src/migrations/0005_signal_principals.ts +27 -0
- package/src/migrations/0006_run_principals.ts +31 -0
- package/src/migrations/0007_resume_consent.ts +28 -0
- package/src/test/TestControl.ts +47 -0
|
@@ -0,0 +1,2642 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializable control-plane values shared by local and RPC projections.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.1.0
|
|
5
|
+
*/
|
|
6
|
+
import * as SteerPayload from "@smthrs/notifications/SteerPayload";
|
|
7
|
+
import { DiscoveryWarning } from "@smthrs/registry/Descriptor";
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
/**
|
|
10
|
+
* A durable control-plane run identifier.
|
|
11
|
+
*
|
|
12
|
+
* @since 0.1.0
|
|
13
|
+
* @category models
|
|
14
|
+
*/
|
|
15
|
+
export declare const RunId: Schema.String;
|
|
16
|
+
/**
|
|
17
|
+
* A durable control-plane run identifier.
|
|
18
|
+
*
|
|
19
|
+
* @since 0.1.0
|
|
20
|
+
* @category models
|
|
21
|
+
*/
|
|
22
|
+
export type RunId = typeof RunId.Type;
|
|
23
|
+
/**
|
|
24
|
+
* A registry flow identifier.
|
|
25
|
+
*
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
* @category models
|
|
28
|
+
*/
|
|
29
|
+
export declare const FlowId: Schema.String;
|
|
30
|
+
/**
|
|
31
|
+
* A registry flow identifier.
|
|
32
|
+
*
|
|
33
|
+
* @since 0.1.0
|
|
34
|
+
* @category models
|
|
35
|
+
*/
|
|
36
|
+
export type FlowId = typeof FlowId.Type;
|
|
37
|
+
/**
|
|
38
|
+
* A caller-supplied key that makes a control mutation idempotent.
|
|
39
|
+
*
|
|
40
|
+
* @since 0.1.0
|
|
41
|
+
* @category models
|
|
42
|
+
*/
|
|
43
|
+
export declare const IdempotencyKey: Schema.String;
|
|
44
|
+
/**
|
|
45
|
+
* A caller-supplied key that makes a control mutation idempotent.
|
|
46
|
+
*
|
|
47
|
+
* @since 0.1.0
|
|
48
|
+
* @category models
|
|
49
|
+
*/
|
|
50
|
+
export type IdempotencyKey = typeof IdempotencyKey.Type;
|
|
51
|
+
/**
|
|
52
|
+
* A server-authenticated identity stamped at the control boundary.
|
|
53
|
+
*
|
|
54
|
+
* @since 0.1.0
|
|
55
|
+
* @category models
|
|
56
|
+
*/
|
|
57
|
+
export declare const Principal: Schema.Struct<{
|
|
58
|
+
readonly id: Schema.String;
|
|
59
|
+
readonly kind: Schema.String;
|
|
60
|
+
readonly stampedAt: Schema.Number;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* A server-authenticated identity stamped at the control boundary.
|
|
64
|
+
*
|
|
65
|
+
* @since 0.1.0
|
|
66
|
+
* @category models
|
|
67
|
+
*/
|
|
68
|
+
export type Principal = typeof Principal.Type;
|
|
69
|
+
/**
|
|
70
|
+
* The capabilities, flows, budget, and placement approved for a plan.
|
|
71
|
+
*
|
|
72
|
+
* `budget` holds the run's approved ceilings: `tokens`, `milliseconds` of
|
|
73
|
+
* active time, and `usd` in dollars, and its `deadline`: milliseconds of
|
|
74
|
+
* wall-clock time counted from the run's first start, shared by every round
|
|
75
|
+
* of the run. An absent ceiling or deadline is none.
|
|
76
|
+
*
|
|
77
|
+
* @since 0.1.0
|
|
78
|
+
* @category models
|
|
79
|
+
*/
|
|
80
|
+
export declare const Envelope: Schema.Struct<{
|
|
81
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
82
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
83
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
84
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
85
|
+
readonly budget: Schema.Struct<{
|
|
86
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
87
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
88
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
89
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
90
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
91
|
+
}>;
|
|
92
|
+
readonly host: Schema.optional<Schema.String>;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* The capabilities, flows, budget, and placement approved for a plan.
|
|
96
|
+
*
|
|
97
|
+
* @since 0.1.0
|
|
98
|
+
* @category models
|
|
99
|
+
*/
|
|
100
|
+
export type Envelope = typeof Envelope.Type;
|
|
101
|
+
/**
|
|
102
|
+
* The durability selected for an approval grant.
|
|
103
|
+
*
|
|
104
|
+
* @since 0.1.0
|
|
105
|
+
* @category models
|
|
106
|
+
*/
|
|
107
|
+
export declare const GrantScope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
108
|
+
/**
|
|
109
|
+
* The durability selected for an approval grant.
|
|
110
|
+
*
|
|
111
|
+
* @since 0.1.0
|
|
112
|
+
* @category models
|
|
113
|
+
*/
|
|
114
|
+
export type GrantScope = typeof GrantScope.Type;
|
|
115
|
+
/**
|
|
116
|
+
* A plan or in-run approval target. The digest and full envelope are submitted
|
|
117
|
+
* with the target so the server can verify exactly what the caller reviewed.
|
|
118
|
+
*
|
|
119
|
+
* @since 0.1.0
|
|
120
|
+
* @category models
|
|
121
|
+
*/
|
|
122
|
+
export declare const ApprovalTarget: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
123
|
+
readonly planId: Schema.String;
|
|
124
|
+
readonly digest: Schema.String;
|
|
125
|
+
readonly envelope: Schema.Struct<{
|
|
126
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
127
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
128
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
129
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
130
|
+
readonly budget: Schema.Struct<{
|
|
131
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
132
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
133
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
134
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
135
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly host: Schema.optional<Schema.String>;
|
|
138
|
+
}>;
|
|
139
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
140
|
+
readonly runId: Schema.String;
|
|
141
|
+
readonly requestId: Schema.String;
|
|
142
|
+
readonly digest: Schema.String;
|
|
143
|
+
readonly envelope: Schema.Struct<{
|
|
144
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
145
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
146
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
147
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
148
|
+
readonly budget: Schema.Struct<{
|
|
149
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
150
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
151
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
152
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
153
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
154
|
+
}>;
|
|
155
|
+
readonly host: Schema.optional<Schema.String>;
|
|
156
|
+
}>;
|
|
157
|
+
}>]>;
|
|
158
|
+
/**
|
|
159
|
+
* A plan or in-run approval target.
|
|
160
|
+
*
|
|
161
|
+
* @since 0.1.0
|
|
162
|
+
* @category models
|
|
163
|
+
*/
|
|
164
|
+
export type ApprovalTarget = typeof ApprovalTarget.Type;
|
|
165
|
+
/**
|
|
166
|
+
* The complete, reviewable payload emitted by planning and submitted unchanged
|
|
167
|
+
* when an approval decision is made.
|
|
168
|
+
*
|
|
169
|
+
* @since 0.1.0
|
|
170
|
+
* @category models
|
|
171
|
+
*/
|
|
172
|
+
export declare const ApprovalPayload: Schema.Struct<{
|
|
173
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
174
|
+
readonly planId: Schema.String;
|
|
175
|
+
readonly digest: Schema.String;
|
|
176
|
+
readonly envelope: Schema.Struct<{
|
|
177
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
178
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
179
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
180
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
181
|
+
readonly budget: Schema.Struct<{
|
|
182
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
183
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
184
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
185
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
186
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
187
|
+
}>;
|
|
188
|
+
readonly host: Schema.optional<Schema.String>;
|
|
189
|
+
}>;
|
|
190
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
191
|
+
readonly runId: Schema.String;
|
|
192
|
+
readonly requestId: Schema.String;
|
|
193
|
+
readonly digest: Schema.String;
|
|
194
|
+
readonly envelope: Schema.Struct<{
|
|
195
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
196
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
197
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
198
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
199
|
+
readonly budget: Schema.Struct<{
|
|
200
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
201
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
202
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
203
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
204
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
205
|
+
}>;
|
|
206
|
+
readonly host: Schema.optional<Schema.String>;
|
|
207
|
+
}>;
|
|
208
|
+
}>]>;
|
|
209
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
210
|
+
readonly idempotencyKey: Schema.String;
|
|
211
|
+
}>;
|
|
212
|
+
/**
|
|
213
|
+
* The complete, reviewable payload emitted by planning.
|
|
214
|
+
*
|
|
215
|
+
* @since 0.1.0
|
|
216
|
+
* @category models
|
|
217
|
+
*/
|
|
218
|
+
export type ApprovalPayload = typeof ApprovalPayload.Type;
|
|
219
|
+
/**
|
|
220
|
+
* What `smithers plan` reports for one node before anything runs.
|
|
221
|
+
*
|
|
222
|
+
* The two outcomes fall out of step keys for free — a key either hits the
|
|
223
|
+
* step cache or it does not — which is why they are reported here rather than
|
|
224
|
+
* discovered during execution. The third outcome, `release`, belongs to
|
|
225
|
+
* orphan reconciliation and is deliberately not part of a plan card.
|
|
226
|
+
*
|
|
227
|
+
* @since 0.1.0
|
|
228
|
+
* @category models
|
|
229
|
+
*/
|
|
230
|
+
export declare const PlanNodeStatus: Schema.Literals<readonly ["cached", "run"]>;
|
|
231
|
+
/**
|
|
232
|
+
* What `smithers plan` reports for one node before anything runs.
|
|
233
|
+
*
|
|
234
|
+
* @since 0.1.0
|
|
235
|
+
* @category models
|
|
236
|
+
*/
|
|
237
|
+
export type PlanNodeStatus = typeof PlanNodeStatus.Type;
|
|
238
|
+
/**
|
|
239
|
+
* One keyed node of the plan an approval is being taken on.
|
|
240
|
+
*
|
|
241
|
+
* `key` is an `@smthrs/keys` `Key` produced by `@smthrs/plan`'s step-key
|
|
242
|
+
* compiler, so a node named here and a node recorded in the persisted plan are
|
|
243
|
+
* the same node. Ids are lookup addresses and are never hashed.
|
|
244
|
+
*
|
|
245
|
+
* @since 0.1.0
|
|
246
|
+
* @category models
|
|
247
|
+
*/
|
|
248
|
+
export declare const PlanNode: Schema.Struct<{
|
|
249
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
250
|
+
readonly id: Schema.NonEmptyString;
|
|
251
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
252
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
253
|
+
readonly material: Schema.Struct<{
|
|
254
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
255
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
256
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
257
|
+
readonly body: Schema.Unknown;
|
|
258
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
259
|
+
readonly value: Schema.Unknown;
|
|
260
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
261
|
+
readonly from: Schema.NonEmptyString;
|
|
262
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
263
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
264
|
+
readonly from: Schema.NonEmptyString;
|
|
265
|
+
}>]>>;
|
|
266
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
267
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
268
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
269
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
270
|
+
}>;
|
|
271
|
+
readonly effects: Schema.Struct<{
|
|
272
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
273
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
274
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
275
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
276
|
+
readonly name: Schema.NonEmptyString;
|
|
277
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
278
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
279
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
280
|
+
}>]>>;
|
|
281
|
+
}>]>>;
|
|
282
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
283
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
284
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
285
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
286
|
+
readonly path: Schema.NonEmptyString;
|
|
287
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
288
|
+
readonly name: Schema.NonEmptyString;
|
|
289
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
290
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
291
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
292
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
293
|
+
readonly path: Schema.NonEmptyString;
|
|
294
|
+
}>]>>;
|
|
295
|
+
}>]>>;
|
|
296
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
297
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
298
|
+
}>;
|
|
299
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
300
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
301
|
+
readonly with: Schema.NonEmptyString;
|
|
302
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
303
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
304
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
305
|
+
}>>;
|
|
306
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
307
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
308
|
+
readonly priority: Schema.Int;
|
|
309
|
+
readonly generation: Schema.Int;
|
|
310
|
+
}>;
|
|
311
|
+
/**
|
|
312
|
+
* One keyed node of the plan an approval is being taken on.
|
|
313
|
+
*
|
|
314
|
+
* @since 0.1.0
|
|
315
|
+
* @category models
|
|
316
|
+
*/
|
|
317
|
+
export type PlanNode = typeof PlanNode.Type;
|
|
318
|
+
/**
|
|
319
|
+
* Why one node of a plan waits for another.
|
|
320
|
+
*
|
|
321
|
+
* These are the reasons the two shipped graph builders already record.
|
|
322
|
+
* `value` consumes an upstream result and `continuation` is the sequencing
|
|
323
|
+
* edge of a builder or a branch arm, from both. `failure` is `@smthrs/flow`'s
|
|
324
|
+
* recovery arm; `conflict` is the ordering edge `@smthrs/core`'s
|
|
325
|
+
* write-conflict pass adds, and `lane-merge` orders laned writers with their
|
|
326
|
+
* merge. A host reports the vocabulary of the builder it graphs with.
|
|
327
|
+
*
|
|
328
|
+
* @since 0.1.0
|
|
329
|
+
* @category models
|
|
330
|
+
*/
|
|
331
|
+
export declare const PlanEdgeReason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
332
|
+
/**
|
|
333
|
+
* Why one node of a plan waits for another.
|
|
334
|
+
*
|
|
335
|
+
* @since 0.1.0
|
|
336
|
+
* @category models
|
|
337
|
+
*/
|
|
338
|
+
export type PlanEdgeReason = typeof PlanEdgeReason.Type;
|
|
339
|
+
/**
|
|
340
|
+
* One labelled edge of the graph a plan was built from.
|
|
341
|
+
*
|
|
342
|
+
* @since 0.1.0
|
|
343
|
+
* @category models
|
|
344
|
+
*/
|
|
345
|
+
export declare const PlanEdge: Schema.Struct<{
|
|
346
|
+
readonly from: Schema.NonEmptyString;
|
|
347
|
+
readonly to: Schema.NonEmptyString;
|
|
348
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
349
|
+
}>;
|
|
350
|
+
/**
|
|
351
|
+
* One labelled edge of the graph a plan was built from.
|
|
352
|
+
*
|
|
353
|
+
* @since 0.1.0
|
|
354
|
+
* @category models
|
|
355
|
+
*/
|
|
356
|
+
export type PlanEdge = typeof PlanEdge.Type;
|
|
357
|
+
/**
|
|
358
|
+
* One node of the built graph, as the reader of a plan drills into it.
|
|
359
|
+
*
|
|
360
|
+
* It carries the address and the declaration site, and nothing else: the
|
|
361
|
+
* keyed node beside it (`PlanNode`) already says what the node is and what it
|
|
362
|
+
* would do, and this is the one fact about it the key material deliberately
|
|
363
|
+
* does not hold. `declaredAt` is the journal's own schema, so a plan card and
|
|
364
|
+
* a run's records state a declaration site the same way and under the same
|
|
365
|
+
* refusal of an absolute path; a host that cannot make a path relative to its
|
|
366
|
+
* own root omits it.
|
|
367
|
+
*
|
|
368
|
+
* @since 0.1.0
|
|
369
|
+
* @category models
|
|
370
|
+
*/
|
|
371
|
+
export declare const PlanGraphNode: Schema.Struct<{
|
|
372
|
+
readonly id: Schema.NonEmptyString;
|
|
373
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
374
|
+
readonly path: Schema.NonEmptyString;
|
|
375
|
+
readonly line: Schema.Int;
|
|
376
|
+
}>>;
|
|
377
|
+
}>;
|
|
378
|
+
/**
|
|
379
|
+
* One node of the built graph, as the reader of a plan drills into it.
|
|
380
|
+
*
|
|
381
|
+
* @since 0.1.0
|
|
382
|
+
* @category models
|
|
383
|
+
*/
|
|
384
|
+
export type PlanGraphNode = typeof PlanGraphNode.Type;
|
|
385
|
+
/**
|
|
386
|
+
* The shape of the graph a plan was built from, for a reader that draws it.
|
|
387
|
+
*
|
|
388
|
+
* A `PlanNode` carries `dependsOn`, which is one unlabelled edge set: it
|
|
389
|
+
* cannot tell a value dependency from a `catch` arm or from an ordering edge
|
|
390
|
+
* a write conflict added. The graph builder knows which is which, so a host
|
|
391
|
+
* that graphs a flow reports the reasons here rather than making every reader
|
|
392
|
+
* guess them back.
|
|
393
|
+
*
|
|
394
|
+
* `nodes` is the same statement about provenance: the builder observed where
|
|
395
|
+
* each node was declared and the key material deliberately does not carry it,
|
|
396
|
+
* so it travels here, beside the edges and outside the digest. A host that
|
|
397
|
+
* reports none is a host whose reader cannot open the code, not a host whose
|
|
398
|
+
* plan is wrong.
|
|
399
|
+
*
|
|
400
|
+
* @since 0.1.0
|
|
401
|
+
* @category models
|
|
402
|
+
*/
|
|
403
|
+
export declare const PlanGraph: Schema.Struct<{
|
|
404
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
405
|
+
readonly from: Schema.NonEmptyString;
|
|
406
|
+
readonly to: Schema.NonEmptyString;
|
|
407
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
408
|
+
}>>;
|
|
409
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
410
|
+
readonly id: Schema.NonEmptyString;
|
|
411
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
412
|
+
readonly path: Schema.NonEmptyString;
|
|
413
|
+
readonly line: Schema.Int;
|
|
414
|
+
}>>;
|
|
415
|
+
}>>>;
|
|
416
|
+
/**
|
|
417
|
+
* The revision of the workspace those declaration sites were read out of.
|
|
418
|
+
*
|
|
419
|
+
* A site is a path and a line, and neither says which bytes were there: a
|
|
420
|
+
* host's working tree moves, so the same path after an edit or a branch
|
|
421
|
+
* switch is a different file. This is the immutable name of the tree the
|
|
422
|
+
* host loaded the flow from — a jj working-copy commit id, or a git commit
|
|
423
|
+
* for a tree that still matches one — and a reader asks the content route
|
|
424
|
+
* for the file AT this revision rather than for whatever is on disk now.
|
|
425
|
+
*
|
|
426
|
+
* A host that cannot name one reports nothing, and a reader that has
|
|
427
|
+
* nothing shows no code at all rather than code it cannot bind (D-068).
|
|
428
|
+
*
|
|
429
|
+
* Exactly the forty lowercase hex digits the only producer emits
|
|
430
|
+
* (`SourceRevision.objectId`), because the app puts this value straight
|
|
431
|
+
* into a contents route's `?ref=` and a route that spawns jj or git from it
|
|
432
|
+
* should never see anything else.
|
|
433
|
+
*/
|
|
434
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
435
|
+
}>;
|
|
436
|
+
/**
|
|
437
|
+
* The shape of the graph a plan was built from, for a reader that draws it.
|
|
438
|
+
*
|
|
439
|
+
* @since 0.1.0
|
|
440
|
+
* @category models
|
|
441
|
+
*/
|
|
442
|
+
export type PlanGraph = typeof PlanGraph.Type;
|
|
443
|
+
/**
|
|
444
|
+
* The reviewable, signed payload returned by planning and resubmitted to
|
|
445
|
+
* approval without reconstructing authority client-side.
|
|
446
|
+
*
|
|
447
|
+
* `nodes` is the keyed node graph the plan phase produced. It is part of the
|
|
448
|
+
* card, and part of the digest an approval binds to, because "approve this
|
|
449
|
+
* flow with this input" and "approve this graph of keyed work" are different
|
|
450
|
+
* promises: a change that re-keys a node changes what will run, and an
|
|
451
|
+
* approval taken against the old graph must not authorize the new one. A host
|
|
452
|
+
* that has not built a graph reports an empty one and loses nothing.
|
|
453
|
+
*
|
|
454
|
+
* @since 0.1.0
|
|
455
|
+
* @category models
|
|
456
|
+
*/
|
|
457
|
+
export declare const PlanCard: Schema.Struct<{
|
|
458
|
+
readonly planId: Schema.String;
|
|
459
|
+
readonly flowId: Schema.String;
|
|
460
|
+
readonly digest: Schema.String;
|
|
461
|
+
readonly inputSummary: Schema.String;
|
|
462
|
+
/** Discovery diagnostics for the selected flow; outside the approval identity. */
|
|
463
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof DiscoveryWarning>>;
|
|
464
|
+
readonly envelope: Schema.Struct<{
|
|
465
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
466
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
467
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
468
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
469
|
+
readonly budget: Schema.Struct<{
|
|
470
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
471
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
472
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
473
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
474
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
475
|
+
}>;
|
|
476
|
+
readonly host: Schema.optional<Schema.String>;
|
|
477
|
+
}>;
|
|
478
|
+
readonly deployClass: Schema.Boolean;
|
|
479
|
+
/** Executable source/metadata identity supplied by a discovery-based host. */
|
|
480
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
481
|
+
readonly plan: Schema.optional<Schema.Struct<{
|
|
482
|
+
readonly planId: Schema.NonEmptyString;
|
|
483
|
+
readonly flow: Schema.NonEmptyString;
|
|
484
|
+
readonly generation: Schema.Int;
|
|
485
|
+
readonly baseDigest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
486
|
+
readonly digest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
487
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
488
|
+
readonly id: Schema.NonEmptyString;
|
|
489
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
490
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
491
|
+
readonly material: Schema.Struct<{
|
|
492
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
493
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
494
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
495
|
+
readonly body: Schema.Unknown;
|
|
496
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
497
|
+
readonly value: Schema.Unknown;
|
|
498
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
499
|
+
readonly from: Schema.NonEmptyString;
|
|
500
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
501
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
502
|
+
readonly from: Schema.NonEmptyString;
|
|
503
|
+
}>]>>;
|
|
504
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
505
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
506
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
507
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
508
|
+
}>;
|
|
509
|
+
readonly effects: Schema.Struct<{
|
|
510
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
511
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
512
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
513
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
514
|
+
readonly name: Schema.NonEmptyString;
|
|
515
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
516
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
517
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
518
|
+
}>]>>;
|
|
519
|
+
}>]>>;
|
|
520
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
521
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
522
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
523
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
524
|
+
readonly path: Schema.NonEmptyString;
|
|
525
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
526
|
+
readonly name: Schema.NonEmptyString;
|
|
527
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
528
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
529
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
530
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
531
|
+
readonly path: Schema.NonEmptyString;
|
|
532
|
+
}>]>>;
|
|
533
|
+
}>]>>;
|
|
534
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
535
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
536
|
+
}>;
|
|
537
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
538
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
539
|
+
readonly with: Schema.NonEmptyString;
|
|
540
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
541
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
542
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
543
|
+
}>>;
|
|
544
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
545
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
546
|
+
readonly priority: Schema.Int;
|
|
547
|
+
readonly generation: Schema.Int;
|
|
548
|
+
}>>;
|
|
549
|
+
}>>;
|
|
550
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
551
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
552
|
+
readonly id: Schema.NonEmptyString;
|
|
553
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
554
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
555
|
+
readonly material: Schema.Struct<{
|
|
556
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
557
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
558
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
559
|
+
readonly body: Schema.Unknown;
|
|
560
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
561
|
+
readonly value: Schema.Unknown;
|
|
562
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
563
|
+
readonly from: Schema.NonEmptyString;
|
|
564
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
565
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
566
|
+
readonly from: Schema.NonEmptyString;
|
|
567
|
+
}>]>>;
|
|
568
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
569
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
570
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
571
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
572
|
+
}>;
|
|
573
|
+
readonly effects: Schema.Struct<{
|
|
574
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
575
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
576
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
577
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
578
|
+
readonly name: Schema.NonEmptyString;
|
|
579
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
580
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
581
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
582
|
+
}>]>>;
|
|
583
|
+
}>]>>;
|
|
584
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
585
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
586
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
587
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
588
|
+
readonly path: Schema.NonEmptyString;
|
|
589
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
590
|
+
readonly name: Schema.NonEmptyString;
|
|
591
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
592
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
593
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
594
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
595
|
+
readonly path: Schema.NonEmptyString;
|
|
596
|
+
}>]>>;
|
|
597
|
+
}>]>>;
|
|
598
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
599
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
600
|
+
}>;
|
|
601
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
602
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
603
|
+
readonly with: Schema.NonEmptyString;
|
|
604
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
605
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
606
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
607
|
+
}>>;
|
|
608
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
609
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
610
|
+
readonly priority: Schema.Int;
|
|
611
|
+
readonly generation: Schema.Int;
|
|
612
|
+
}>>;
|
|
613
|
+
/**
|
|
614
|
+
* The labelled edges of the graph this plan was built from, and where its
|
|
615
|
+
* nodes were declared.
|
|
616
|
+
*
|
|
617
|
+
* Deliberately OUTSIDE the digest an approval binds to: the edges and the
|
|
618
|
+
* declaration sites describe the plan a reader draws, and nothing here
|
|
619
|
+
* changes what will run. The
|
|
620
|
+
* persisted plan's own digest already covers keys, edges, effects,
|
|
621
|
+
* conflicts, priorities and generations, so a host that starts reporting
|
|
622
|
+
* this field re-plans to the digest it planned to before and every parked
|
|
623
|
+
* approval still validates.
|
|
624
|
+
*/
|
|
625
|
+
readonly graph: Schema.optional<Schema.Struct<{
|
|
626
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
627
|
+
readonly from: Schema.NonEmptyString;
|
|
628
|
+
readonly to: Schema.NonEmptyString;
|
|
629
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
630
|
+
}>>;
|
|
631
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
632
|
+
readonly id: Schema.NonEmptyString;
|
|
633
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
634
|
+
readonly path: Schema.NonEmptyString;
|
|
635
|
+
readonly line: Schema.Int;
|
|
636
|
+
}>>;
|
|
637
|
+
}>>>;
|
|
638
|
+
/**
|
|
639
|
+
* The revision of the workspace those declaration sites were read out of.
|
|
640
|
+
*
|
|
641
|
+
* A site is a path and a line, and neither says which bytes were there: a
|
|
642
|
+
* host's working tree moves, so the same path after an edit or a branch
|
|
643
|
+
* switch is a different file. This is the immutable name of the tree the
|
|
644
|
+
* host loaded the flow from — a jj working-copy commit id, or a git commit
|
|
645
|
+
* for a tree that still matches one — and a reader asks the content route
|
|
646
|
+
* for the file AT this revision rather than for whatever is on disk now.
|
|
647
|
+
*
|
|
648
|
+
* A host that cannot name one reports nothing, and a reader that has
|
|
649
|
+
* nothing shows no code at all rather than code it cannot bind (D-068).
|
|
650
|
+
*
|
|
651
|
+
* Exactly the forty lowercase hex digits the only producer emits
|
|
652
|
+
* (`SourceRevision.objectId`), because the app puts this value straight
|
|
653
|
+
* into a contents route's `?ref=` and a route that spawns jj or git from it
|
|
654
|
+
* should never see anything else.
|
|
655
|
+
*/
|
|
656
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
657
|
+
}>>;
|
|
658
|
+
readonly approval: Schema.Struct<{
|
|
659
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
660
|
+
readonly planId: Schema.String;
|
|
661
|
+
readonly digest: Schema.String;
|
|
662
|
+
readonly envelope: Schema.Struct<{
|
|
663
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
664
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
665
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
666
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
667
|
+
readonly budget: Schema.Struct<{
|
|
668
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
669
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
670
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
671
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
672
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
673
|
+
}>;
|
|
674
|
+
readonly host: Schema.optional<Schema.String>;
|
|
675
|
+
}>;
|
|
676
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
677
|
+
readonly runId: Schema.String;
|
|
678
|
+
readonly requestId: Schema.String;
|
|
679
|
+
readonly digest: Schema.String;
|
|
680
|
+
readonly envelope: Schema.Struct<{
|
|
681
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
682
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
683
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
684
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
685
|
+
readonly budget: Schema.Struct<{
|
|
686
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
687
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
688
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
689
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
690
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
691
|
+
}>;
|
|
692
|
+
readonly host: Schema.optional<Schema.String>;
|
|
693
|
+
}>;
|
|
694
|
+
}>]>;
|
|
695
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
696
|
+
readonly idempotencyKey: Schema.String;
|
|
697
|
+
}>;
|
|
698
|
+
}>;
|
|
699
|
+
/**
|
|
700
|
+
* The reviewable, signed payload returned by planning and resubmitted to
|
|
701
|
+
* approval without reconstructing authority client-side.
|
|
702
|
+
*
|
|
703
|
+
* @since 0.1.0
|
|
704
|
+
* @category models
|
|
705
|
+
*/
|
|
706
|
+
export type PlanCard = typeof PlanCard.Type;
|
|
707
|
+
/**
|
|
708
|
+
* Stable statuses projected for a durable run.
|
|
709
|
+
*
|
|
710
|
+
* @since 0.1.0
|
|
711
|
+
* @category models
|
|
712
|
+
*/
|
|
713
|
+
export declare const RunStatus: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
714
|
+
/**
|
|
715
|
+
* Stable statuses projected for a durable run.
|
|
716
|
+
*
|
|
717
|
+
* @since 0.1.0
|
|
718
|
+
* @category models
|
|
719
|
+
*/
|
|
720
|
+
export type RunStatus = typeof RunStatus.Type;
|
|
721
|
+
/**
|
|
722
|
+
* How a run came to exist, when it did not start on its own.
|
|
723
|
+
*
|
|
724
|
+
* Defined by `@smthrs/control/Lineage` and re-exported here so a serializable
|
|
725
|
+
* projection needs one import.
|
|
726
|
+
*
|
|
727
|
+
* @since 0.1.0
|
|
728
|
+
* @category models
|
|
729
|
+
*/
|
|
730
|
+
export declare const RunOrigin: Schema.Literals<readonly ["child", "fork", "continuation"]>;
|
|
731
|
+
/**
|
|
732
|
+
* How a run came to exist, when it did not start on its own.
|
|
733
|
+
*
|
|
734
|
+
* @since 0.1.0
|
|
735
|
+
* @category models
|
|
736
|
+
*/
|
|
737
|
+
export type RunOrigin = typeof RunOrigin.Type;
|
|
738
|
+
/**
|
|
739
|
+
* Where a cancellation came from.
|
|
740
|
+
*
|
|
741
|
+
* `control` is an operator asking through this plane, and it is the only
|
|
742
|
+
* source that can name a principal. `cascade` is a run swept up in an
|
|
743
|
+
* ancestor's cancellation. `engine` is everything the runtime decided on its
|
|
744
|
+
* own account: a lease expiry, a budget, a supervisor.
|
|
745
|
+
*
|
|
746
|
+
* @since 0.1.0
|
|
747
|
+
* @category models
|
|
748
|
+
*/
|
|
749
|
+
export declare const CancelSource: Schema.Literals<readonly ["control", "engine", "cascade"]>;
|
|
750
|
+
/**
|
|
751
|
+
* Where a cancellation came from.
|
|
752
|
+
*
|
|
753
|
+
* @since 0.1.0
|
|
754
|
+
* @category models
|
|
755
|
+
*/
|
|
756
|
+
export type CancelSource = typeof CancelSource.Type;
|
|
757
|
+
/**
|
|
758
|
+
* Who cancelled a run, why, and on whose behalf.
|
|
759
|
+
*
|
|
760
|
+
* A durable cancellation is anonymous on its own: the run row records that
|
|
761
|
+
* somebody asked and when, and nothing else. This is the attribution the
|
|
762
|
+
* journal adds back. `principal` and `reason` are present exactly when a
|
|
763
|
+
* request named them, which a cascade inherits from the request that started
|
|
764
|
+
* it and an engine-decided cancellation never has.
|
|
765
|
+
*
|
|
766
|
+
* @since 0.1.0
|
|
767
|
+
* @category models
|
|
768
|
+
*/
|
|
769
|
+
export declare const Cancellation: Schema.Struct<{
|
|
770
|
+
readonly requestedAt: Schema.Number;
|
|
771
|
+
readonly source: Schema.Literals<readonly ["control", "engine", "cascade"]>;
|
|
772
|
+
readonly principal: Schema.optional<Schema.Struct<{
|
|
773
|
+
readonly id: Schema.String;
|
|
774
|
+
readonly kind: Schema.String;
|
|
775
|
+
readonly stampedAt: Schema.Number;
|
|
776
|
+
}>>;
|
|
777
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
778
|
+
/** The cancelled ancestor this run was swept up with, on a cascade. */
|
|
779
|
+
readonly cascadedFrom: Schema.optional<Schema.String>;
|
|
780
|
+
}>;
|
|
781
|
+
/**
|
|
782
|
+
* Who cancelled a run, why, and on whose behalf.
|
|
783
|
+
*
|
|
784
|
+
* @since 0.1.0
|
|
785
|
+
* @category models
|
|
786
|
+
*/
|
|
787
|
+
export type Cancellation = typeof Cancellation.Type;
|
|
788
|
+
/**
|
|
789
|
+
* One open wait in a run tree that a person or named signal can end.
|
|
790
|
+
*
|
|
791
|
+
* A run that calls another flow parks the CHILD execution, not the run an
|
|
792
|
+
* operator named. `run-3` of `coding/request` sat at `waiting-reason: event`
|
|
793
|
+
* while the question a person owed an answer to — `coding-clarification` —
|
|
794
|
+
* was parked three executions below it on `coding/PreparePlan`. Every reader
|
|
795
|
+
* that asked the named run what it was waiting on was therefore told "an
|
|
796
|
+
* event", which is true of that one row and false of the run tree: nothing
|
|
797
|
+
* was going to arrive, because the run was waiting on a human.
|
|
798
|
+
*
|
|
799
|
+
* This is the wait as the ROOT of the tree reports it. `runId` is the
|
|
800
|
+
* execution actually holding it, which is what a decision has to be routed
|
|
801
|
+
* to; `token` is the durable wait address, submitted back unchanged;
|
|
802
|
+
* `request` is what the wait declared about itself, which for a `HumanTask`
|
|
803
|
+
* is `{kind, name, prompt, attempt, maxAttempts}`.
|
|
804
|
+
*
|
|
805
|
+
* @since 1.0.0
|
|
806
|
+
* @category models
|
|
807
|
+
*/
|
|
808
|
+
export declare const PendingWait: Schema.Struct<{
|
|
809
|
+
/** The execution parked on this wait, which may be the root run itself. */
|
|
810
|
+
readonly runId: Schema.String;
|
|
811
|
+
/** The flow that execution is running. */
|
|
812
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
813
|
+
/** The supervisor vocabulary: `approval` for people or `event` for a named signal. */
|
|
814
|
+
readonly reason: Schema.String;
|
|
815
|
+
/** The durable wait address a decision is routed to. */
|
|
816
|
+
readonly token: Schema.String;
|
|
817
|
+
/** Digest used to join replayed display facts to this current operational address. */
|
|
818
|
+
readonly tokenDigest: Schema.optional<Schema.String>;
|
|
819
|
+
/** The wait point's own name, when the token addresses a named one. */
|
|
820
|
+
readonly name: Schema.optional<Schema.String>;
|
|
821
|
+
/** Which attempt of a re-asked question this is, counting from 1. */
|
|
822
|
+
readonly attempt: Schema.optional<Schema.Number>;
|
|
823
|
+
/** What the wait declared about itself, absent when it declared nothing. */
|
|
824
|
+
readonly request: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
825
|
+
/** When the execution holding this wait was created. */
|
|
826
|
+
readonly createdAt: Schema.Number;
|
|
827
|
+
}>;
|
|
828
|
+
/**
|
|
829
|
+
* One open wait in a run tree that a person or named signal can end.
|
|
830
|
+
*
|
|
831
|
+
* @since 1.0.0
|
|
832
|
+
* @category models
|
|
833
|
+
*/
|
|
834
|
+
export type PendingWait = typeof PendingWait.Type;
|
|
835
|
+
/**
|
|
836
|
+
* A compact summary for run listings and status projections.
|
|
837
|
+
*
|
|
838
|
+
* @since 0.1.0
|
|
839
|
+
* @category models
|
|
840
|
+
*/
|
|
841
|
+
export declare const RunSummary: Schema.Struct<{
|
|
842
|
+
/** Whether lifecycle fields were observed in the engine or no engine row was visible. */
|
|
843
|
+
readonly executionObservation: Schema.optional<Schema.Literals<readonly ["observed", "missing"]>>;
|
|
844
|
+
/** Exact native semantic observation; never a control-stream fact. */
|
|
845
|
+
readonly executionView: Schema.optional<Schema.Struct<{
|
|
846
|
+
readonly root: Schema.Struct<{
|
|
847
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
848
|
+
readonly flowName: Schema.NonEmptyString;
|
|
849
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
850
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
851
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
852
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
853
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
854
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
855
|
+
readonly roundOrdinal: Schema.Int;
|
|
856
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
857
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
858
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
859
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
860
|
+
readonly reason: Schema.NonEmptyString;
|
|
861
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
862
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
863
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
864
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
865
|
+
}>>;
|
|
866
|
+
}>;
|
|
867
|
+
readonly current: Schema.Struct<{
|
|
868
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
869
|
+
readonly flowName: Schema.NonEmptyString;
|
|
870
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
871
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
872
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
873
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
874
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
875
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
876
|
+
readonly roundOrdinal: Schema.Int;
|
|
877
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
878
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
879
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
880
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
881
|
+
readonly reason: Schema.NonEmptyString;
|
|
882
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
883
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
884
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
885
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
886
|
+
}>>;
|
|
887
|
+
}>;
|
|
888
|
+
readonly humanWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
889
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
890
|
+
readonly flowName: Schema.NonEmptyString;
|
|
891
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
892
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
893
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
894
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
895
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
896
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
897
|
+
readonly roundOrdinal: Schema.Int;
|
|
898
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
899
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
900
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
901
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
902
|
+
readonly reason: Schema.NonEmptyString;
|
|
903
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
904
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
905
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
906
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
907
|
+
}>>;
|
|
908
|
+
}>>>;
|
|
909
|
+
}>>;
|
|
910
|
+
readonly runId: Schema.String;
|
|
911
|
+
readonly flowId: Schema.String;
|
|
912
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
913
|
+
readonly planId: Schema.optional<Schema.String>;
|
|
914
|
+
readonly planDigest: Schema.optional<Schema.String>;
|
|
915
|
+
/** The flow's executable identity when the run started; resume refuses a different one. */
|
|
916
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
917
|
+
/** The engine version that started the run. */
|
|
918
|
+
readonly engineVersion: Schema.optional<Schema.String>;
|
|
919
|
+
/**
|
|
920
|
+
* How the code that would resume this run differs from the code it
|
|
921
|
+
* recorded. Computed by an exact run lookup, never stored; absent when
|
|
922
|
+
* nothing changed or the run is terminal.
|
|
923
|
+
*/
|
|
924
|
+
readonly codeDrift: Schema.optional<Schema.Struct<{
|
|
925
|
+
readonly recorded: Schema.optional<Schema.String>;
|
|
926
|
+
readonly current: Schema.optional<Schema.String>;
|
|
927
|
+
readonly recordedEngine: Schema.optional<Schema.String>;
|
|
928
|
+
readonly currentEngine: Schema.optional<Schema.String>;
|
|
929
|
+
}>>;
|
|
930
|
+
readonly ownerId: Schema.optional<Schema.String>;
|
|
931
|
+
/**
|
|
932
|
+
* The authenticated principal that launched this run through the control
|
|
933
|
+
* plane. A reader that does not see every run sees only the runs its own
|
|
934
|
+
* principal launched. Absent on a run the engine created (a child, a fork,
|
|
935
|
+
* a later trampoline round) and on a run launched before it was recorded;
|
|
936
|
+
* only a reader that sees every run sees those.
|
|
937
|
+
*/
|
|
938
|
+
readonly launchedBy: Schema.optional<Schema.Struct<{
|
|
939
|
+
readonly id: Schema.String;
|
|
940
|
+
readonly kind: Schema.String;
|
|
941
|
+
}>>;
|
|
942
|
+
/**
|
|
943
|
+
* The run this one branched from: the spawning run, the forked-from run, or
|
|
944
|
+
* the previous trampoline round. Absent on a run with no ancestor.
|
|
945
|
+
*/
|
|
946
|
+
readonly parentRunId: Schema.optional<Schema.String>;
|
|
947
|
+
/**
|
|
948
|
+
* The trampoline lineage this run is a round of, and which round it is.
|
|
949
|
+
* Both absent means a lineage of one, read as round 0 of itself.
|
|
950
|
+
*/
|
|
951
|
+
readonly lineageId: Schema.optional<Schema.String>;
|
|
952
|
+
readonly roundOrdinal: Schema.optional<Schema.Number>;
|
|
953
|
+
readonly origin: Schema.optional<Schema.Literals<readonly ["child", "fork", "continuation"]>>;
|
|
954
|
+
/**
|
|
955
|
+
* What a parked run is holding on: `approval`, `event`, `timer`, `quota`, or
|
|
956
|
+
* a reason a plugin declared. Absent on a run that is not parked, and on a
|
|
957
|
+
* park whose owner released the run without declaring one.
|
|
958
|
+
*
|
|
959
|
+
* The CLI's `ps` and `status` listings also render `executor` here for a run
|
|
960
|
+
* that has sat at `accepted` with no owner process past the launch handoff
|
|
961
|
+
* window. That value is computed at render time and never stored, so a
|
|
962
|
+
* reader going through the control RPC, the gateway projection, or a plugin
|
|
963
|
+
* sees the field absent on the same run.
|
|
964
|
+
*/
|
|
965
|
+
readonly waitingReason: Schema.optional<Schema.String>;
|
|
966
|
+
/** What has been steered to this run and not yet delivered. */
|
|
967
|
+
readonly steering: Schema.optional<Schema.Struct<{
|
|
968
|
+
readonly pending: Schema.Number;
|
|
969
|
+
}>>;
|
|
970
|
+
/**
|
|
971
|
+
* A resume this run has been told to take and no host has taken up yet.
|
|
972
|
+
*
|
|
973
|
+
* A decision on an in-run approval restarts the run server-side, and the
|
|
974
|
+
* process that decides is usually not the process that hosts the execution:
|
|
975
|
+
* an operator's `smithers approve`, a gateway, a second CLI. The intent is
|
|
976
|
+
* therefore recorded durably here, and the host that owns the execution
|
|
977
|
+
* takes it up on its next tick and clears it. The number is the durable
|
|
978
|
+
* sequence of the request, so an operator can tell a delegation that is
|
|
979
|
+
* still outstanding from one that has been taken up. Absent means nothing
|
|
980
|
+
* is waiting to be taken up.
|
|
981
|
+
*/
|
|
982
|
+
readonly pendingResume: Schema.optional<Schema.Number>;
|
|
983
|
+
/**
|
|
984
|
+
* The executor claim this run was parked under.
|
|
985
|
+
*
|
|
986
|
+
* A parked execution releases its owner columns — that is what makes it
|
|
987
|
+
* resumable at all — so after a park nothing on the row says which process
|
|
988
|
+
* is hosting it. Every process that shares the databases can therefore see
|
|
989
|
+
* the parked execution and resume it, including a short-lived `smithers
|
|
990
|
+
* approve` that would drive the run and then exit. The fence the park was
|
|
991
|
+
* written under is recorded here instead, so the host that parked the run
|
|
992
|
+
* recognizes its own park and every other composition can tell that the
|
|
993
|
+
* execution is not its to take up (triage B-15). Absent on a run that is not
|
|
994
|
+
* parked, and on a park written by something that held no fence.
|
|
995
|
+
*/
|
|
996
|
+
readonly parkedBy: Schema.optional<Schema.String>;
|
|
997
|
+
/** Who cancelled this run, why, and on whose behalf. Absent until one did. */
|
|
998
|
+
readonly cancellation: Schema.optional<Schema.Struct<{
|
|
999
|
+
readonly requestedAt: Schema.Number;
|
|
1000
|
+
readonly source: Schema.Literals<readonly ["control", "engine", "cascade"]>;
|
|
1001
|
+
readonly principal: Schema.optional<Schema.Struct<{
|
|
1002
|
+
readonly id: Schema.String;
|
|
1003
|
+
readonly kind: Schema.String;
|
|
1004
|
+
readonly stampedAt: Schema.Number;
|
|
1005
|
+
}>>;
|
|
1006
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1007
|
+
/** The cancelled ancestor this run was swept up with, on a cascade. */
|
|
1008
|
+
readonly cascadedFrom: Schema.optional<Schema.String>;
|
|
1009
|
+
}>>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Open human waits anywhere in this run's tree, nearest execution first.
|
|
1012
|
+
*
|
|
1013
|
+
* Present only when there is at least one, so a run nobody owes an answer
|
|
1014
|
+
* carries no field rather than an empty array. `status` rolls up with it:
|
|
1015
|
+
* a run any of whose descendants is parked on `approval` reports
|
|
1016
|
+
* `waiting-approval`, which is what the existing inbox filters select on.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly pendingWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1019
|
+
/** The execution parked on this wait, which may be the root run itself. */
|
|
1020
|
+
readonly runId: Schema.String;
|
|
1021
|
+
/** The flow that execution is running. */
|
|
1022
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
1023
|
+
/** The supervisor vocabulary: `approval` for people or `event` for a named signal. */
|
|
1024
|
+
readonly reason: Schema.String;
|
|
1025
|
+
/** The durable wait address a decision is routed to. */
|
|
1026
|
+
readonly token: Schema.String;
|
|
1027
|
+
/** Digest used to join replayed display facts to this current operational address. */
|
|
1028
|
+
readonly tokenDigest: Schema.optional<Schema.String>;
|
|
1029
|
+
/** The wait point's own name, when the token addresses a named one. */
|
|
1030
|
+
readonly name: Schema.optional<Schema.String>;
|
|
1031
|
+
/** Which attempt of a re-asked question this is, counting from 1. */
|
|
1032
|
+
readonly attempt: Schema.optional<Schema.Number>;
|
|
1033
|
+
/** What the wait declared about itself, absent when it declared nothing. */
|
|
1034
|
+
readonly request: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1035
|
+
/** When the execution holding this wait was created. */
|
|
1036
|
+
readonly createdAt: Schema.Number;
|
|
1037
|
+
}>>>;
|
|
1038
|
+
/**
|
|
1039
|
+
* When the run's approved deadline passes: its `createdAt` plus the
|
|
1040
|
+
* envelope's `budget.deadline`, which is the instant the run is failed with
|
|
1041
|
+
* `deadline_exceeded` if it has not settled. Absent on a run approved with
|
|
1042
|
+
* no deadline.
|
|
1043
|
+
*/
|
|
1044
|
+
readonly deadlineAt: Schema.optional<Schema.Number>;
|
|
1045
|
+
readonly createdAt: Schema.Number;
|
|
1046
|
+
readonly updatedAt: Schema.Number;
|
|
1047
|
+
}>;
|
|
1048
|
+
/**
|
|
1049
|
+
* A compact summary for run listings and status projections.
|
|
1050
|
+
*
|
|
1051
|
+
* @since 0.1.0
|
|
1052
|
+
* @category models
|
|
1053
|
+
*/
|
|
1054
|
+
export type RunSummary = typeof RunSummary.Type;
|
|
1055
|
+
/**
|
|
1056
|
+
* An operator message inserted into the transcript at the next turn boundary.
|
|
1057
|
+
*
|
|
1058
|
+
* `kind` is optional here and required on every other variant, which is what
|
|
1059
|
+
* keeps a steer written before the vocabulary widened readable: a body and no
|
|
1060
|
+
* kind is a message, and always was.
|
|
1061
|
+
*
|
|
1062
|
+
* @since 0.1.0
|
|
1063
|
+
* @category models
|
|
1064
|
+
*/
|
|
1065
|
+
export declare const MessageSteer: Schema.Struct<{
|
|
1066
|
+
readonly kind: Schema.optional<Schema.Literal<"Message">>;
|
|
1067
|
+
readonly body: Schema.String;
|
|
1068
|
+
readonly messageId: Schema.String;
|
|
1069
|
+
readonly runId: Schema.String;
|
|
1070
|
+
readonly principal: Schema.Struct<{
|
|
1071
|
+
readonly id: Schema.String;
|
|
1072
|
+
readonly kind: Schema.String;
|
|
1073
|
+
readonly stampedAt: Schema.Number;
|
|
1074
|
+
}>;
|
|
1075
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1076
|
+
readonly createdAt: Schema.Number;
|
|
1077
|
+
}>;
|
|
1078
|
+
/**
|
|
1079
|
+
* A model-seat change that applies from the next turn on.
|
|
1080
|
+
*
|
|
1081
|
+
* @since 0.1.0
|
|
1082
|
+
* @category models
|
|
1083
|
+
*/
|
|
1084
|
+
export declare const SeatSteer: Schema.Struct<{
|
|
1085
|
+
readonly kind: Schema.Literal<"Seat">;
|
|
1086
|
+
readonly seat: Schema.NonEmptyString;
|
|
1087
|
+
readonly messageId: Schema.String;
|
|
1088
|
+
readonly runId: Schema.String;
|
|
1089
|
+
readonly principal: Schema.Struct<{
|
|
1090
|
+
readonly id: Schema.String;
|
|
1091
|
+
readonly kind: Schema.String;
|
|
1092
|
+
readonly stampedAt: Schema.Number;
|
|
1093
|
+
}>;
|
|
1094
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1095
|
+
readonly createdAt: Schema.Number;
|
|
1096
|
+
}>;
|
|
1097
|
+
/**
|
|
1098
|
+
* A thinking-level change that applies from the next turn on.
|
|
1099
|
+
*
|
|
1100
|
+
* @since 0.1.0
|
|
1101
|
+
* @category models
|
|
1102
|
+
*/
|
|
1103
|
+
export declare const ThinkingSteer: Schema.Struct<{
|
|
1104
|
+
readonly kind: Schema.Literal<"Thinking">;
|
|
1105
|
+
readonly thinking: Schema.Literals<readonly ["none", "minimal", "low", "medium", "high", "xhigh"]>;
|
|
1106
|
+
readonly messageId: Schema.String;
|
|
1107
|
+
readonly runId: Schema.String;
|
|
1108
|
+
readonly principal: Schema.Struct<{
|
|
1109
|
+
readonly id: Schema.String;
|
|
1110
|
+
readonly kind: Schema.String;
|
|
1111
|
+
readonly stampedAt: Schema.Number;
|
|
1112
|
+
}>;
|
|
1113
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1114
|
+
readonly createdAt: Schema.Number;
|
|
1115
|
+
}>;
|
|
1116
|
+
/**
|
|
1117
|
+
* Tools added to the active set for future turns.
|
|
1118
|
+
*
|
|
1119
|
+
* @since 0.1.0
|
|
1120
|
+
* @category models
|
|
1121
|
+
*/
|
|
1122
|
+
export declare const ToolsSteer: Schema.Struct<{
|
|
1123
|
+
readonly kind: Schema.Literal<"Tools">;
|
|
1124
|
+
readonly toolNames: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1125
|
+
readonly messageId: Schema.String;
|
|
1126
|
+
readonly runId: Schema.String;
|
|
1127
|
+
readonly principal: Schema.Struct<{
|
|
1128
|
+
readonly id: Schema.String;
|
|
1129
|
+
readonly kind: Schema.String;
|
|
1130
|
+
readonly stampedAt: Schema.Number;
|
|
1131
|
+
}>;
|
|
1132
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1133
|
+
readonly createdAt: Schema.Number;
|
|
1134
|
+
}>;
|
|
1135
|
+
/**
|
|
1136
|
+
* A durable operator steer delivered at an execution turn boundary.
|
|
1137
|
+
*
|
|
1138
|
+
* An operator steers a run for four different reasons, and only one of them is
|
|
1139
|
+
* something to tell the model. Saying "your seat changed" would spend a turn on
|
|
1140
|
+
* bookkeeping; changing the seat is what was asked for. So the four are one
|
|
1141
|
+
* union rather than four free-text conventions the harness would have to
|
|
1142
|
+
* parse.
|
|
1143
|
+
*
|
|
1144
|
+
* @since 0.1.0
|
|
1145
|
+
* @category models
|
|
1146
|
+
*/
|
|
1147
|
+
export declare const SteerMessage: Schema.Union<readonly [Schema.Struct<{
|
|
1148
|
+
readonly kind: Schema.optional<Schema.Literal<"Message">>;
|
|
1149
|
+
readonly body: Schema.String;
|
|
1150
|
+
readonly messageId: Schema.String;
|
|
1151
|
+
readonly runId: Schema.String;
|
|
1152
|
+
readonly principal: Schema.Struct<{
|
|
1153
|
+
readonly id: Schema.String;
|
|
1154
|
+
readonly kind: Schema.String;
|
|
1155
|
+
readonly stampedAt: Schema.Number;
|
|
1156
|
+
}>;
|
|
1157
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1158
|
+
readonly createdAt: Schema.Number;
|
|
1159
|
+
}>, Schema.Struct<{
|
|
1160
|
+
readonly kind: Schema.Literal<"Seat">;
|
|
1161
|
+
readonly seat: Schema.NonEmptyString;
|
|
1162
|
+
readonly messageId: Schema.String;
|
|
1163
|
+
readonly runId: Schema.String;
|
|
1164
|
+
readonly principal: Schema.Struct<{
|
|
1165
|
+
readonly id: Schema.String;
|
|
1166
|
+
readonly kind: Schema.String;
|
|
1167
|
+
readonly stampedAt: Schema.Number;
|
|
1168
|
+
}>;
|
|
1169
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1170
|
+
readonly createdAt: Schema.Number;
|
|
1171
|
+
}>, Schema.Struct<{
|
|
1172
|
+
readonly kind: Schema.Literal<"Thinking">;
|
|
1173
|
+
readonly thinking: Schema.Literals<readonly ["none", "minimal", "low", "medium", "high", "xhigh"]>;
|
|
1174
|
+
readonly messageId: Schema.String;
|
|
1175
|
+
readonly runId: Schema.String;
|
|
1176
|
+
readonly principal: Schema.Struct<{
|
|
1177
|
+
readonly id: Schema.String;
|
|
1178
|
+
readonly kind: Schema.String;
|
|
1179
|
+
readonly stampedAt: Schema.Number;
|
|
1180
|
+
}>;
|
|
1181
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1182
|
+
readonly createdAt: Schema.Number;
|
|
1183
|
+
}>, Schema.Struct<{
|
|
1184
|
+
readonly kind: Schema.Literal<"Tools">;
|
|
1185
|
+
readonly toolNames: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1186
|
+
readonly messageId: Schema.String;
|
|
1187
|
+
readonly runId: Schema.String;
|
|
1188
|
+
readonly principal: Schema.Struct<{
|
|
1189
|
+
readonly id: Schema.String;
|
|
1190
|
+
readonly kind: Schema.String;
|
|
1191
|
+
readonly stampedAt: Schema.Number;
|
|
1192
|
+
}>;
|
|
1193
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1194
|
+
readonly createdAt: Schema.Number;
|
|
1195
|
+
}>]>;
|
|
1196
|
+
/**
|
|
1197
|
+
* A durable operator steer delivered at an execution turn boundary.
|
|
1198
|
+
*
|
|
1199
|
+
* @since 0.1.0
|
|
1200
|
+
* @category models
|
|
1201
|
+
*/
|
|
1202
|
+
export type SteerMessage = typeof SteerMessage.Type;
|
|
1203
|
+
/**
|
|
1204
|
+
* The stored steering item one steer carries.
|
|
1205
|
+
*
|
|
1206
|
+
* The envelope — who asked, when, for which run — is control-plane
|
|
1207
|
+
* bookkeeping. What crosses into the notification queue is the item alone, in
|
|
1208
|
+
* the vocabulary `@smthrs/notifications` defines and the harness reads back.
|
|
1209
|
+
*
|
|
1210
|
+
* @param message the steer
|
|
1211
|
+
* @since 0.1.0
|
|
1212
|
+
* @category conversions
|
|
1213
|
+
*/
|
|
1214
|
+
export declare const steerItem: (message: SteerMessage) => SteerPayload.SteerPayload;
|
|
1215
|
+
/**
|
|
1216
|
+
* A durable, named signal delivered to a waiting run.
|
|
1217
|
+
*
|
|
1218
|
+
* @since 0.1.0
|
|
1219
|
+
* @category models
|
|
1220
|
+
*/
|
|
1221
|
+
export declare const SignalPayload: Schema.Struct<{
|
|
1222
|
+
readonly name: Schema.String;
|
|
1223
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1224
|
+
}>;
|
|
1225
|
+
/**
|
|
1226
|
+
* A durable, named signal delivered to a waiting run.
|
|
1227
|
+
*
|
|
1228
|
+
* @since 0.1.0
|
|
1229
|
+
* @category models
|
|
1230
|
+
*/
|
|
1231
|
+
export type SignalPayload = typeof SignalPayload.Type;
|
|
1232
|
+
/**
|
|
1233
|
+
* The RPC request schema for planning.
|
|
1234
|
+
*
|
|
1235
|
+
* The wire accepts JSON because an RPC request must be serializable. The local
|
|
1236
|
+
* `Control.PlanInput` keeps `input` as `unknown` so a runtime can decode its
|
|
1237
|
+
* flow's own input schema before anything crosses a transport.
|
|
1238
|
+
*
|
|
1239
|
+
* @since 0.1.0
|
|
1240
|
+
* @category models
|
|
1241
|
+
*/
|
|
1242
|
+
export declare const PlanInputSchema: Schema.Struct<{
|
|
1243
|
+
readonly flowId: Schema.String;
|
|
1244
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1245
|
+
readonly idempotencyKey: Schema.optional<Schema.String>;
|
|
1246
|
+
readonly budget: Schema.optional<Schema.Struct<{
|
|
1247
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1248
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1249
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1250
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1251
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1252
|
+
}>>;
|
|
1253
|
+
}>;
|
|
1254
|
+
/**
|
|
1255
|
+
* The RPC request schema for starting a plan or resuming a run.
|
|
1256
|
+
*
|
|
1257
|
+
* @since 0.1.0
|
|
1258
|
+
* @category models
|
|
1259
|
+
*/
|
|
1260
|
+
export declare const RunInputSchema: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
1261
|
+
readonly planId: Schema.String;
|
|
1262
|
+
readonly digest: Schema.String;
|
|
1263
|
+
readonly envelope: Schema.Struct<{
|
|
1264
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1265
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1266
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1267
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1268
|
+
readonly budget: Schema.Struct<{
|
|
1269
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1270
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1271
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1272
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1273
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1274
|
+
}>;
|
|
1275
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1276
|
+
}>;
|
|
1277
|
+
readonly idempotencyKey: Schema.String;
|
|
1278
|
+
}>, Schema.TaggedStruct<"Resume", {
|
|
1279
|
+
readonly runId: Schema.String;
|
|
1280
|
+
readonly idempotencyKey: Schema.String;
|
|
1281
|
+
readonly allowCodeDrift: Schema.optional<Schema.Boolean>;
|
|
1282
|
+
}>]>;
|
|
1283
|
+
/**
|
|
1284
|
+
* The RPC request schema for an approval decision.
|
|
1285
|
+
*
|
|
1286
|
+
* The authenticated server supplies the principal, so a client cannot name a
|
|
1287
|
+
* different identity on the wire.
|
|
1288
|
+
*
|
|
1289
|
+
* @since 0.1.0
|
|
1290
|
+
* @category models
|
|
1291
|
+
*/
|
|
1292
|
+
export declare const ApprovalInputSchema: Schema.Struct<{
|
|
1293
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
1294
|
+
readonly planId: Schema.String;
|
|
1295
|
+
readonly digest: Schema.String;
|
|
1296
|
+
readonly envelope: Schema.Struct<{
|
|
1297
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1298
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1299
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1300
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1301
|
+
readonly budget: Schema.Struct<{
|
|
1302
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1303
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1304
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1305
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1306
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1307
|
+
}>;
|
|
1308
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1309
|
+
}>;
|
|
1310
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
1311
|
+
readonly runId: Schema.String;
|
|
1312
|
+
readonly requestId: Schema.String;
|
|
1313
|
+
readonly digest: Schema.String;
|
|
1314
|
+
readonly envelope: Schema.Struct<{
|
|
1315
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1316
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1317
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1318
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1319
|
+
readonly budget: Schema.Struct<{
|
|
1320
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1321
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1322
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1323
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1324
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1325
|
+
}>;
|
|
1326
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1327
|
+
}>;
|
|
1328
|
+
}>]>;
|
|
1329
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
1330
|
+
readonly idempotencyKey: Schema.String;
|
|
1331
|
+
}>;
|
|
1332
|
+
/**
|
|
1333
|
+
* The RPC request schema for steering a run.
|
|
1334
|
+
*
|
|
1335
|
+
* @since 0.1.0
|
|
1336
|
+
* @category models
|
|
1337
|
+
*/
|
|
1338
|
+
export declare const SteerInputSchema: Schema.Struct<{
|
|
1339
|
+
readonly version: Schema.optional<Schema.Number>;
|
|
1340
|
+
readonly runId: Schema.String;
|
|
1341
|
+
readonly message: Schema.Union<readonly [Schema.Struct<{
|
|
1342
|
+
readonly kind: Schema.optional<Schema.Literal<"Message">>;
|
|
1343
|
+
readonly body: Schema.String;
|
|
1344
|
+
readonly messageId: Schema.String;
|
|
1345
|
+
readonly runId: Schema.String;
|
|
1346
|
+
readonly principal: Schema.Struct<{
|
|
1347
|
+
readonly id: Schema.String;
|
|
1348
|
+
readonly kind: Schema.String;
|
|
1349
|
+
readonly stampedAt: Schema.Number;
|
|
1350
|
+
}>;
|
|
1351
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1352
|
+
readonly createdAt: Schema.Number;
|
|
1353
|
+
}>, Schema.Struct<{
|
|
1354
|
+
readonly kind: Schema.Literal<"Seat">;
|
|
1355
|
+
readonly seat: Schema.NonEmptyString;
|
|
1356
|
+
readonly messageId: Schema.String;
|
|
1357
|
+
readonly runId: Schema.String;
|
|
1358
|
+
readonly principal: Schema.Struct<{
|
|
1359
|
+
readonly id: Schema.String;
|
|
1360
|
+
readonly kind: Schema.String;
|
|
1361
|
+
readonly stampedAt: Schema.Number;
|
|
1362
|
+
}>;
|
|
1363
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1364
|
+
readonly createdAt: Schema.Number;
|
|
1365
|
+
}>, Schema.Struct<{
|
|
1366
|
+
readonly kind: Schema.Literal<"Thinking">;
|
|
1367
|
+
readonly thinking: Schema.Literals<readonly ["none", "minimal", "low", "medium", "high", "xhigh"]>;
|
|
1368
|
+
readonly messageId: Schema.String;
|
|
1369
|
+
readonly runId: Schema.String;
|
|
1370
|
+
readonly principal: Schema.Struct<{
|
|
1371
|
+
readonly id: Schema.String;
|
|
1372
|
+
readonly kind: Schema.String;
|
|
1373
|
+
readonly stampedAt: Schema.Number;
|
|
1374
|
+
}>;
|
|
1375
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1376
|
+
readonly createdAt: Schema.Number;
|
|
1377
|
+
}>, Schema.Struct<{
|
|
1378
|
+
readonly kind: Schema.Literal<"Tools">;
|
|
1379
|
+
readonly toolNames: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1380
|
+
readonly messageId: Schema.String;
|
|
1381
|
+
readonly runId: Schema.String;
|
|
1382
|
+
readonly principal: Schema.Struct<{
|
|
1383
|
+
readonly id: Schema.String;
|
|
1384
|
+
readonly kind: Schema.String;
|
|
1385
|
+
readonly stampedAt: Schema.Number;
|
|
1386
|
+
}>;
|
|
1387
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
1388
|
+
readonly createdAt: Schema.Number;
|
|
1389
|
+
}>]>;
|
|
1390
|
+
readonly idempotencyKey: Schema.String;
|
|
1391
|
+
}>;
|
|
1392
|
+
/**
|
|
1393
|
+
* The RPC request schema for signaling a run.
|
|
1394
|
+
*
|
|
1395
|
+
* @since 0.1.0
|
|
1396
|
+
* @category models
|
|
1397
|
+
*/
|
|
1398
|
+
export declare const SignalInputSchema: Schema.Struct<{
|
|
1399
|
+
readonly runId: Schema.String;
|
|
1400
|
+
readonly signal: Schema.Struct<{
|
|
1401
|
+
readonly name: Schema.String;
|
|
1402
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1403
|
+
}>;
|
|
1404
|
+
readonly idempotencyKey: Schema.String;
|
|
1405
|
+
}>;
|
|
1406
|
+
/**
|
|
1407
|
+
* The shared fields of an RPC run mutation request.
|
|
1408
|
+
*
|
|
1409
|
+
* @since 0.1.0
|
|
1410
|
+
* @category models
|
|
1411
|
+
*/
|
|
1412
|
+
export declare const RunMutationInputSchema: Schema.Struct<{
|
|
1413
|
+
readonly runId: Schema.String;
|
|
1414
|
+
readonly idempotencyKey: Schema.String;
|
|
1415
|
+
}>;
|
|
1416
|
+
/**
|
|
1417
|
+
* The RPC request schema for a lifecycle mutation that records a reason.
|
|
1418
|
+
*
|
|
1419
|
+
* The reason is on the wire because the server records it with the decision.
|
|
1420
|
+
* The principal is absent because the authenticated server stamps it.
|
|
1421
|
+
*
|
|
1422
|
+
* @since 0.1.0
|
|
1423
|
+
* @category models
|
|
1424
|
+
*/
|
|
1425
|
+
export declare const ReasonedMutationInputSchema: Schema.Struct<{
|
|
1426
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1427
|
+
readonly runId: Schema.String;
|
|
1428
|
+
readonly idempotencyKey: Schema.String;
|
|
1429
|
+
}>;
|
|
1430
|
+
/**
|
|
1431
|
+
* The RPC request schema for cancellation.
|
|
1432
|
+
*
|
|
1433
|
+
* Cancellation currently has the same wire shape as every reasoned lifecycle
|
|
1434
|
+
* mutation. This named alias keeps the operation's public contract explicit.
|
|
1435
|
+
*
|
|
1436
|
+
* @since 0.1.0
|
|
1437
|
+
* @category models
|
|
1438
|
+
*/
|
|
1439
|
+
export declare const CancelInputSchema: Schema.Struct<{
|
|
1440
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1441
|
+
readonly runId: Schema.String;
|
|
1442
|
+
readonly idempotencyKey: Schema.String;
|
|
1443
|
+
}>;
|
|
1444
|
+
/**
|
|
1445
|
+
* The RPC request schema for resume: a reasoned mutation that may accept a
|
|
1446
|
+
* changed flow.
|
|
1447
|
+
*
|
|
1448
|
+
* @since 1.0.0
|
|
1449
|
+
* @category models
|
|
1450
|
+
*/
|
|
1451
|
+
export declare const ResumeInputSchema: Schema.Struct<{
|
|
1452
|
+
readonly allowCodeDrift: Schema.optional<Schema.Boolean>;
|
|
1453
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
1454
|
+
readonly runId: Schema.String;
|
|
1455
|
+
readonly idempotencyKey: Schema.String;
|
|
1456
|
+
}>;
|
|
1457
|
+
/**
|
|
1458
|
+
* A checkpoint in one journal entry's expansion. Without `offset`, the whole
|
|
1459
|
+
* entry is consumed. With it, only members through that zero-based index are
|
|
1460
|
+
* consumed. Pass the cursor back unchanged with the same run id.
|
|
1461
|
+
*
|
|
1462
|
+
* @since 0.1.0
|
|
1463
|
+
* @category models
|
|
1464
|
+
*/
|
|
1465
|
+
export declare const WatchCursor: Schema.Struct<{
|
|
1466
|
+
readonly sequence: Schema.Int;
|
|
1467
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
1468
|
+
}>;
|
|
1469
|
+
/**
|
|
1470
|
+
* A checkpoint in one journal entry's expansion.
|
|
1471
|
+
*
|
|
1472
|
+
* @since 0.1.0
|
|
1473
|
+
* @category models
|
|
1474
|
+
*/
|
|
1475
|
+
export type WatchCursor = typeof WatchCursor.Type;
|
|
1476
|
+
/**
|
|
1477
|
+
* A journal-projection cursor, optional run restriction, and delivery mode.
|
|
1478
|
+
* Omitting `follow` preserves the live-stream behavior; `false` requests a
|
|
1479
|
+
* finite snapshot of entries durable when the request is handled.
|
|
1480
|
+
*
|
|
1481
|
+
* @since 0.1.0
|
|
1482
|
+
* @category models
|
|
1483
|
+
*/
|
|
1484
|
+
export declare const WatchFilter: Schema.Struct<{
|
|
1485
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1486
|
+
/** Resume after a fully consumed source entry, including all its deltas. Requires `runId`. */
|
|
1487
|
+
readonly afterSequence: Schema.optional<Schema.Number>;
|
|
1488
|
+
/** Resume after one emitted event, even inside an expansion. Requires `runId`. Cannot be combined with `afterSequence`. */
|
|
1489
|
+
readonly afterCursor: Schema.optional<Schema.Struct<{
|
|
1490
|
+
readonly sequence: Schema.Int;
|
|
1491
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
1492
|
+
}>>;
|
|
1493
|
+
readonly follow: Schema.optional<Schema.Boolean>;
|
|
1494
|
+
}>;
|
|
1495
|
+
/**
|
|
1496
|
+
* A resumable journal-projection watch cursor and optional run restriction.
|
|
1497
|
+
*
|
|
1498
|
+
* @since 0.1.0
|
|
1499
|
+
* @category models
|
|
1500
|
+
*/
|
|
1501
|
+
export type WatchFilter = typeof WatchFilter.Type;
|
|
1502
|
+
/**
|
|
1503
|
+
* One ordered journal-projection delta streamed by `watch`.
|
|
1504
|
+
*
|
|
1505
|
+
* @since 0.1.0
|
|
1506
|
+
* @category models
|
|
1507
|
+
*/
|
|
1508
|
+
export declare const ControlEvent: Schema.Struct<{
|
|
1509
|
+
/** Present on `ControlLive.watch` events; absent on raw projections and older providers. */
|
|
1510
|
+
readonly cursor: Schema.optional<Schema.Struct<{
|
|
1511
|
+
readonly sequence: Schema.Int;
|
|
1512
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
1513
|
+
}>>;
|
|
1514
|
+
readonly sequence: Schema.Number;
|
|
1515
|
+
readonly kind: Schema.String;
|
|
1516
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1517
|
+
readonly occurredAt: Schema.Number;
|
|
1518
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1519
|
+
}>;
|
|
1520
|
+
/**
|
|
1521
|
+
* One ordered journal-projection delta streamed by `watch`.
|
|
1522
|
+
*
|
|
1523
|
+
* @since 0.1.0
|
|
1524
|
+
* @category models
|
|
1525
|
+
*/
|
|
1526
|
+
export type ControlEvent = typeof ControlEvent.Type;
|
|
1527
|
+
/**
|
|
1528
|
+
* How many items a listing returns when the caller names no `limit`.
|
|
1529
|
+
*
|
|
1530
|
+
* A listing with no bound returned the whole collection and paid one pending
|
|
1531
|
+
* steer query per run, so `smithers ps` on a busy project grew without bound.
|
|
1532
|
+
* A default is the smallest fix that keeps every caller working: a client that
|
|
1533
|
+
* wants more walks `nextCursor`.
|
|
1534
|
+
*
|
|
1535
|
+
* @since 0.1.0
|
|
1536
|
+
* @category models
|
|
1537
|
+
*/
|
|
1538
|
+
export declare const defaultPageSize = 100;
|
|
1539
|
+
/**
|
|
1540
|
+
* The largest `limit` a listing accepts.
|
|
1541
|
+
*
|
|
1542
|
+
* The cap is the resource bound: a remote bearer holder cannot ask one request
|
|
1543
|
+
* to project an unbounded number of rows.
|
|
1544
|
+
*
|
|
1545
|
+
* @since 0.1.0
|
|
1546
|
+
* @category models
|
|
1547
|
+
*/
|
|
1548
|
+
export declare const maxPageSize = 500;
|
|
1549
|
+
/**
|
|
1550
|
+
* A page size a listing can actually make progress on.
|
|
1551
|
+
*
|
|
1552
|
+
* `0`, a negative size, a fraction, `NaN`, and `Infinity` are all refused. A
|
|
1553
|
+
* zero-sized page used to answer `{ items: [], nextCursor: "0" }`, which is a
|
|
1554
|
+
* cursor a client loops on forever.
|
|
1555
|
+
*
|
|
1556
|
+
* @since 0.1.0
|
|
1557
|
+
* @category models
|
|
1558
|
+
*/
|
|
1559
|
+
export declare const PageLimit: Schema.Int;
|
|
1560
|
+
/**
|
|
1561
|
+
* How a claimed trigger occurrence ended.
|
|
1562
|
+
*
|
|
1563
|
+
* The same six words `@smthrs/triggers` records in its fire ledger. They are
|
|
1564
|
+
* declared here rather than imported because the triggers package depends on
|
|
1565
|
+
* this one (its scheduler launches runs through `Control`), so the vocabulary
|
|
1566
|
+
* has to live on the control side of that edge.
|
|
1567
|
+
*
|
|
1568
|
+
* @since 1.0.0
|
|
1569
|
+
* @category models
|
|
1570
|
+
*/
|
|
1571
|
+
export declare const FireOutcome: Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>;
|
|
1572
|
+
/**
|
|
1573
|
+
* How a claimed trigger occurrence ended.
|
|
1574
|
+
*
|
|
1575
|
+
* @since 1.0.0
|
|
1576
|
+
* @category models
|
|
1577
|
+
*/
|
|
1578
|
+
export type FireOutcome = typeof FireOutcome.Type;
|
|
1579
|
+
/**
|
|
1580
|
+
* One registered trigger as a listing reports it.
|
|
1581
|
+
*
|
|
1582
|
+
* `nextOccurrencesMs` is the store clock's view of the next fires, computed at
|
|
1583
|
+
* read time, so an operator sees when a schedule will next run without
|
|
1584
|
+
* evaluating the cron expression client-side. `schedulerLastTickMs` is the
|
|
1585
|
+
* last poll the scheduler recorded; absent means no scheduler has ticked on
|
|
1586
|
+
* this host, so an enabled trigger is not going to fire. `activeRunId` names
|
|
1587
|
+
* the run the trigger is currently holding, and is absent while the trigger
|
|
1588
|
+
* holds a reservation rather than a launched run.
|
|
1589
|
+
*
|
|
1590
|
+
* @since 1.0.0
|
|
1591
|
+
* @category models
|
|
1592
|
+
*/
|
|
1593
|
+
export declare const TriggerSummary: Schema.Struct<{
|
|
1594
|
+
readonly triggerId: Schema.String;
|
|
1595
|
+
readonly flowId: Schema.String;
|
|
1596
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1597
|
+
readonly cron: Schema.String;
|
|
1598
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
1599
|
+
readonly overlap: Schema.Literals<readonly ["skip", "buffer-one", "supersede"]>;
|
|
1600
|
+
readonly catchUp: Schema.Literals<readonly ["none", "one", "all"]>;
|
|
1601
|
+
readonly maxCatchUp: Schema.optional<Schema.Number>;
|
|
1602
|
+
readonly enabled: Schema.Boolean;
|
|
1603
|
+
readonly revision: Schema.Number;
|
|
1604
|
+
readonly lastFiredAtMs: Schema.optional<Schema.Number>;
|
|
1605
|
+
readonly pendingAtMs: Schema.optional<Schema.Number>;
|
|
1606
|
+
readonly activeRunId: Schema.optional<Schema.String>;
|
|
1607
|
+
readonly nextOccurrencesMs: Schema.$Array<Schema.Number>;
|
|
1608
|
+
readonly schedulerLastTickMs: Schema.optional<Schema.Number>;
|
|
1609
|
+
}>;
|
|
1610
|
+
/**
|
|
1611
|
+
* One registered trigger as a listing reports it.
|
|
1612
|
+
*
|
|
1613
|
+
* @since 1.0.0
|
|
1614
|
+
* @category models
|
|
1615
|
+
*/
|
|
1616
|
+
export type TriggerSummary = typeof TriggerSummary.Type;
|
|
1617
|
+
/**
|
|
1618
|
+
* One claimed trigger occurrence and what became of it.
|
|
1619
|
+
*
|
|
1620
|
+
* `outcome` is `null` while the occurrence is claimed and not yet reported,
|
|
1621
|
+
* which is the window between a claim and its `recordResult`. `waiting` names
|
|
1622
|
+
* what a launched run is parked on when the ledger can see it.
|
|
1623
|
+
*
|
|
1624
|
+
* @since 1.0.0
|
|
1625
|
+
* @category models
|
|
1626
|
+
*/
|
|
1627
|
+
export declare const FireSummary: Schema.Struct<{
|
|
1628
|
+
readonly triggerId: Schema.String;
|
|
1629
|
+
readonly occurrenceAtMs: Schema.Number;
|
|
1630
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>>;
|
|
1631
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1632
|
+
readonly error: Schema.optional<Schema.String>;
|
|
1633
|
+
readonly waiting: Schema.optional<Schema.Literal<"approval">>;
|
|
1634
|
+
}>;
|
|
1635
|
+
/**
|
|
1636
|
+
* One claimed trigger occurrence and what became of it.
|
|
1637
|
+
*
|
|
1638
|
+
* @since 1.0.0
|
|
1639
|
+
* @category models
|
|
1640
|
+
*/
|
|
1641
|
+
export type FireSummary = typeof FireSummary.Type;
|
|
1642
|
+
/**
|
|
1643
|
+
* An operator's decision on a stored plan.
|
|
1644
|
+
*
|
|
1645
|
+
* @since 1.0.0
|
|
1646
|
+
* @category models
|
|
1647
|
+
*/
|
|
1648
|
+
export declare const PlanDecision: Schema.Literals<readonly ["pending", "approved", "denied"]>;
|
|
1649
|
+
/**
|
|
1650
|
+
* An operator's decision on a stored plan.
|
|
1651
|
+
*
|
|
1652
|
+
* @since 1.0.0
|
|
1653
|
+
* @category models
|
|
1654
|
+
*/
|
|
1655
|
+
export type PlanDecision = typeof PlanDecision.Type;
|
|
1656
|
+
/**
|
|
1657
|
+
* One stored plan as a listing reports it: the card an approval submits
|
|
1658
|
+
* (`card.approval`), the decoded input it was planned with, and its decision.
|
|
1659
|
+
*
|
|
1660
|
+
* @since 1.0.0
|
|
1661
|
+
* @category models
|
|
1662
|
+
*/
|
|
1663
|
+
export declare const PlanSummary: Schema.Struct<{
|
|
1664
|
+
readonly card: Schema.Struct<{
|
|
1665
|
+
readonly planId: Schema.String;
|
|
1666
|
+
readonly flowId: Schema.String;
|
|
1667
|
+
readonly digest: Schema.String;
|
|
1668
|
+
readonly inputSummary: Schema.String;
|
|
1669
|
+
/** Discovery diagnostics for the selected flow; outside the approval identity. */
|
|
1670
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof DiscoveryWarning>>;
|
|
1671
|
+
readonly envelope: Schema.Struct<{
|
|
1672
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1673
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1674
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1675
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1676
|
+
readonly budget: Schema.Struct<{
|
|
1677
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1678
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1679
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1680
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1681
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1682
|
+
}>;
|
|
1683
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1684
|
+
}>;
|
|
1685
|
+
readonly deployClass: Schema.Boolean;
|
|
1686
|
+
/** Executable source/metadata identity supplied by a discovery-based host. */
|
|
1687
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
1688
|
+
readonly plan: Schema.optional<Schema.Struct<{
|
|
1689
|
+
readonly planId: Schema.NonEmptyString;
|
|
1690
|
+
readonly flow: Schema.NonEmptyString;
|
|
1691
|
+
readonly generation: Schema.Int;
|
|
1692
|
+
readonly baseDigest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
1693
|
+
readonly digest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
1694
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
1695
|
+
readonly id: Schema.NonEmptyString;
|
|
1696
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
1697
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
1698
|
+
readonly material: Schema.Struct<{
|
|
1699
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
1700
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
1701
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
1702
|
+
readonly body: Schema.Unknown;
|
|
1703
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
1704
|
+
readonly value: Schema.Unknown;
|
|
1705
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
1706
|
+
readonly from: Schema.NonEmptyString;
|
|
1707
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
1708
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
1709
|
+
readonly from: Schema.NonEmptyString;
|
|
1710
|
+
}>]>>;
|
|
1711
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
1712
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1713
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
1714
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
1715
|
+
}>;
|
|
1716
|
+
readonly effects: Schema.Struct<{
|
|
1717
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1718
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1719
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1720
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
1721
|
+
readonly name: Schema.NonEmptyString;
|
|
1722
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1723
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1724
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1725
|
+
}>]>>;
|
|
1726
|
+
}>]>>;
|
|
1727
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1728
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1729
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1730
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
1731
|
+
readonly path: Schema.NonEmptyString;
|
|
1732
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
1733
|
+
readonly name: Schema.NonEmptyString;
|
|
1734
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1735
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1736
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1737
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
1738
|
+
readonly path: Schema.NonEmptyString;
|
|
1739
|
+
}>]>>;
|
|
1740
|
+
}>]>>;
|
|
1741
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1742
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
1743
|
+
}>;
|
|
1744
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
1745
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
1746
|
+
readonly with: Schema.NonEmptyString;
|
|
1747
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
1748
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1749
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1750
|
+
}>>;
|
|
1751
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1752
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1753
|
+
readonly priority: Schema.Int;
|
|
1754
|
+
readonly generation: Schema.Int;
|
|
1755
|
+
}>>;
|
|
1756
|
+
}>>;
|
|
1757
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
1758
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
1759
|
+
readonly id: Schema.NonEmptyString;
|
|
1760
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
1761
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
1762
|
+
readonly material: Schema.Struct<{
|
|
1763
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
1764
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
1765
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
1766
|
+
readonly body: Schema.Unknown;
|
|
1767
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
1768
|
+
readonly value: Schema.Unknown;
|
|
1769
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
1770
|
+
readonly from: Schema.NonEmptyString;
|
|
1771
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
1772
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
1773
|
+
readonly from: Schema.NonEmptyString;
|
|
1774
|
+
}>]>>;
|
|
1775
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
1776
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1777
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
1778
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
1779
|
+
}>;
|
|
1780
|
+
readonly effects: Schema.Struct<{
|
|
1781
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1782
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1783
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1784
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
1785
|
+
readonly name: Schema.NonEmptyString;
|
|
1786
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1787
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1788
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1789
|
+
}>]>>;
|
|
1790
|
+
}>]>>;
|
|
1791
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1792
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1793
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1794
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
1795
|
+
readonly path: Schema.NonEmptyString;
|
|
1796
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
1797
|
+
readonly name: Schema.NonEmptyString;
|
|
1798
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1799
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1800
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1801
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
1802
|
+
readonly path: Schema.NonEmptyString;
|
|
1803
|
+
}>]>>;
|
|
1804
|
+
}>]>>;
|
|
1805
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1806
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
1807
|
+
}>;
|
|
1808
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
1809
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
1810
|
+
readonly with: Schema.NonEmptyString;
|
|
1811
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
1812
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1813
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1814
|
+
}>>;
|
|
1815
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1816
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1817
|
+
readonly priority: Schema.Int;
|
|
1818
|
+
readonly generation: Schema.Int;
|
|
1819
|
+
}>>;
|
|
1820
|
+
/**
|
|
1821
|
+
* The labelled edges of the graph this plan was built from, and where its
|
|
1822
|
+
* nodes were declared.
|
|
1823
|
+
*
|
|
1824
|
+
* Deliberately OUTSIDE the digest an approval binds to: the edges and the
|
|
1825
|
+
* declaration sites describe the plan a reader draws, and nothing here
|
|
1826
|
+
* changes what will run. The
|
|
1827
|
+
* persisted plan's own digest already covers keys, edges, effects,
|
|
1828
|
+
* conflicts, priorities and generations, so a host that starts reporting
|
|
1829
|
+
* this field re-plans to the digest it planned to before and every parked
|
|
1830
|
+
* approval still validates.
|
|
1831
|
+
*/
|
|
1832
|
+
readonly graph: Schema.optional<Schema.Struct<{
|
|
1833
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
1834
|
+
readonly from: Schema.NonEmptyString;
|
|
1835
|
+
readonly to: Schema.NonEmptyString;
|
|
1836
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
1837
|
+
}>>;
|
|
1838
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1839
|
+
readonly id: Schema.NonEmptyString;
|
|
1840
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
1841
|
+
readonly path: Schema.NonEmptyString;
|
|
1842
|
+
readonly line: Schema.Int;
|
|
1843
|
+
}>>;
|
|
1844
|
+
}>>>;
|
|
1845
|
+
/**
|
|
1846
|
+
* The revision of the workspace those declaration sites were read out of.
|
|
1847
|
+
*
|
|
1848
|
+
* A site is a path and a line, and neither says which bytes were there: a
|
|
1849
|
+
* host's working tree moves, so the same path after an edit or a branch
|
|
1850
|
+
* switch is a different file. This is the immutable name of the tree the
|
|
1851
|
+
* host loaded the flow from — a jj working-copy commit id, or a git commit
|
|
1852
|
+
* for a tree that still matches one — and a reader asks the content route
|
|
1853
|
+
* for the file AT this revision rather than for whatever is on disk now.
|
|
1854
|
+
*
|
|
1855
|
+
* A host that cannot name one reports nothing, and a reader that has
|
|
1856
|
+
* nothing shows no code at all rather than code it cannot bind (D-068).
|
|
1857
|
+
*
|
|
1858
|
+
* Exactly the forty lowercase hex digits the only producer emits
|
|
1859
|
+
* (`SourceRevision.objectId`), because the app puts this value straight
|
|
1860
|
+
* into a contents route's `?ref=` and a route that spawns jj or git from it
|
|
1861
|
+
* should never see anything else.
|
|
1862
|
+
*/
|
|
1863
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
1864
|
+
}>>;
|
|
1865
|
+
readonly approval: Schema.Struct<{
|
|
1866
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
1867
|
+
readonly planId: Schema.String;
|
|
1868
|
+
readonly digest: Schema.String;
|
|
1869
|
+
readonly envelope: Schema.Struct<{
|
|
1870
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1871
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1872
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1873
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1874
|
+
readonly budget: Schema.Struct<{
|
|
1875
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1876
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1877
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1878
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1879
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1880
|
+
}>;
|
|
1881
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1882
|
+
}>;
|
|
1883
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
1884
|
+
readonly runId: Schema.String;
|
|
1885
|
+
readonly requestId: Schema.String;
|
|
1886
|
+
readonly digest: Schema.String;
|
|
1887
|
+
readonly envelope: Schema.Struct<{
|
|
1888
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1889
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
1890
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1891
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1892
|
+
readonly budget: Schema.Struct<{
|
|
1893
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1894
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1895
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1896
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1897
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1898
|
+
}>;
|
|
1899
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1900
|
+
}>;
|
|
1901
|
+
}>]>;
|
|
1902
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
1903
|
+
readonly idempotencyKey: Schema.String;
|
|
1904
|
+
}>;
|
|
1905
|
+
}>;
|
|
1906
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1907
|
+
readonly decision: Schema.Literals<readonly ["pending", "approved", "denied"]>;
|
|
1908
|
+
}>;
|
|
1909
|
+
/**
|
|
1910
|
+
* One stored plan as a listing reports it.
|
|
1911
|
+
*
|
|
1912
|
+
* @since 1.0.0
|
|
1913
|
+
* @category models
|
|
1914
|
+
*/
|
|
1915
|
+
export type PlanSummary = typeof PlanSummary.Type;
|
|
1916
|
+
/** Exact native observations, including unavailable evidence rather than a guessed lifecycle.
|
|
1917
|
+
* @category schemas
|
|
1918
|
+
* @since 1.0.0
|
|
1919
|
+
*/
|
|
1920
|
+
export declare const ExecutionBatch: Schema.Struct<{
|
|
1921
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
1922
|
+
readonly revision: Schema.NullOr<Schema.Int>;
|
|
1923
|
+
readonly snapshots: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Observed", {
|
|
1924
|
+
readonly executionId: Schema.String;
|
|
1925
|
+
readonly source: Schema.String;
|
|
1926
|
+
readonly revision: Schema.Int;
|
|
1927
|
+
readonly observation: Schema.Struct<{
|
|
1928
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
1929
|
+
readonly flowName: Schema.NonEmptyString;
|
|
1930
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
1931
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
1932
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
1933
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
1934
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
1935
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
1936
|
+
readonly roundOrdinal: Schema.Int;
|
|
1937
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
1938
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
1939
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
1940
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
1941
|
+
readonly reason: Schema.NonEmptyString;
|
|
1942
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
1943
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
1944
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
1945
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1946
|
+
}>>;
|
|
1947
|
+
}>;
|
|
1948
|
+
}>, Schema.TaggedStruct<"Missing", {
|
|
1949
|
+
readonly executionId: Schema.String;
|
|
1950
|
+
readonly source: Schema.String;
|
|
1951
|
+
readonly revision: Schema.Int;
|
|
1952
|
+
readonly deleted: Schema.Boolean;
|
|
1953
|
+
}>, Schema.TaggedStruct<"Unavailable", {
|
|
1954
|
+
readonly executionId: Schema.String;
|
|
1955
|
+
readonly reason: Schema.Literals<readonly ["unsupported", "outside-run", "ancestry-unavailable"]>;
|
|
1956
|
+
}>]>>;
|
|
1957
|
+
}>;
|
|
1958
|
+
/** Native execution observations with their source watermark.
|
|
1959
|
+
* @category models
|
|
1960
|
+
* @since 1.0.0
|
|
1961
|
+
*/
|
|
1962
|
+
export type ExecutionBatch = typeof ExecutionBatch.Type;
|
|
1963
|
+
/**
|
|
1964
|
+
* A typed listing request for discovered flows, durable runs, registered
|
|
1965
|
+
* triggers, the trigger fire ledger, or stored plans.
|
|
1966
|
+
*
|
|
1967
|
+
* `plans` lists stored plans oldest first, narrowed by flow and decision, so an
|
|
1968
|
+
* operator can find what is waiting for approval: a build target declaring
|
|
1969
|
+
* `approval: "required"` leaves a pending `system/target` plan. Plans are an
|
|
1970
|
+
* operator's to read; a restricted reader lists none.
|
|
1971
|
+
*
|
|
1972
|
+
* `principalId` selects the runs whose `launchedBy.id` it names. It narrows a
|
|
1973
|
+
* listing; it is not an authorization boundary. The server restricts a reader
|
|
1974
|
+
* that does not see every run to the runs its own principal launched, whatever
|
|
1975
|
+
* filter it sends.
|
|
1976
|
+
*
|
|
1977
|
+
* @since 0.1.0
|
|
1978
|
+
* @category models
|
|
1979
|
+
*/
|
|
1980
|
+
export declare const ListRequest: Schema.Union<readonly [Schema.TaggedStruct<"executions", {
|
|
1981
|
+
readonly runId: Schema.String;
|
|
1982
|
+
readonly executionIds: Schema.$Array<Schema.NonEmptyString>;
|
|
1983
|
+
}>, Schema.TaggedStruct<"flows", {
|
|
1984
|
+
readonly filters: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1985
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
1986
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
1987
|
+
}>, Schema.TaggedStruct<"runs", {
|
|
1988
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
1989
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1990
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
1991
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>>;
|
|
1992
|
+
readonly terminal: Schema.optional<Schema.Boolean>;
|
|
1993
|
+
readonly principalId: Schema.optional<Schema.String>;
|
|
1994
|
+
readonly parentRunId: Schema.optional<Schema.String>;
|
|
1995
|
+
readonly lineageId: Schema.optional<Schema.String>;
|
|
1996
|
+
/** Runs created at or after this epoch millisecond. */
|
|
1997
|
+
readonly since: Schema.optional<Schema.Number>;
|
|
1998
|
+
/** Runs created before this epoch millisecond. */
|
|
1999
|
+
readonly until: Schema.optional<Schema.Number>;
|
|
2000
|
+
/** Runs a fire of this trigger started. */
|
|
2001
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
2002
|
+
}>>;
|
|
2003
|
+
/** Creation time, newest or oldest first; omitted preserves the historical listing order. */
|
|
2004
|
+
readonly order: Schema.optional<Schema.Literals<readonly ["newest", "oldest"]>>;
|
|
2005
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
2006
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
2007
|
+
}>, Schema.TaggedStruct<"triggers", {
|
|
2008
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
2009
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
2010
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
2011
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
2012
|
+
}>>;
|
|
2013
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
2014
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
2015
|
+
}>, Schema.TaggedStruct<"fires", {
|
|
2016
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
2017
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
2018
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
2019
|
+
readonly outcome: Schema.optional<Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>>;
|
|
2020
|
+
}>>;
|
|
2021
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
2022
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
2023
|
+
}>, Schema.TaggedStruct<"plans", {
|
|
2024
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
2025
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
2026
|
+
readonly decision: Schema.optional<Schema.Literals<readonly ["pending", "approved", "denied"]>>;
|
|
2027
|
+
}>>;
|
|
2028
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
2029
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
2030
|
+
}>]>;
|
|
2031
|
+
/**
|
|
2032
|
+
* A typed listing request for discovered flows, durable runs, registered
|
|
2033
|
+
* triggers, the trigger fire ledger, or stored plans.
|
|
2034
|
+
*
|
|
2035
|
+
* @since 0.1.0
|
|
2036
|
+
* @category models
|
|
2037
|
+
*/
|
|
2038
|
+
export type ListRequest = typeof ListRequest.Type;
|
|
2039
|
+
/**
|
|
2040
|
+
* A typed page returned for a flow, run, trigger, fire, or plan listing.
|
|
2041
|
+
*
|
|
2042
|
+
* @since 0.1.0
|
|
2043
|
+
* @category models
|
|
2044
|
+
*/
|
|
2045
|
+
export declare const ListResponse: Schema.Union<readonly [Schema.TaggedStruct<"executions", {
|
|
2046
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
2047
|
+
readonly revision: Schema.NullOr<Schema.Int>;
|
|
2048
|
+
readonly items: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Observed", {
|
|
2049
|
+
readonly executionId: Schema.String;
|
|
2050
|
+
readonly source: Schema.String;
|
|
2051
|
+
readonly revision: Schema.Int;
|
|
2052
|
+
readonly observation: Schema.Struct<{
|
|
2053
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2054
|
+
readonly flowName: Schema.NonEmptyString;
|
|
2055
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
2056
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
2057
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2058
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2059
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
2060
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2061
|
+
readonly roundOrdinal: Schema.Int;
|
|
2062
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2063
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
2064
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
2065
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
2066
|
+
readonly reason: Schema.NonEmptyString;
|
|
2067
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2068
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
2069
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
2070
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2071
|
+
}>>;
|
|
2072
|
+
}>;
|
|
2073
|
+
}>, Schema.TaggedStruct<"Missing", {
|
|
2074
|
+
readonly executionId: Schema.String;
|
|
2075
|
+
readonly source: Schema.String;
|
|
2076
|
+
readonly revision: Schema.Int;
|
|
2077
|
+
readonly deleted: Schema.Boolean;
|
|
2078
|
+
}>, Schema.TaggedStruct<"Unavailable", {
|
|
2079
|
+
readonly executionId: Schema.String;
|
|
2080
|
+
readonly reason: Schema.Literals<readonly ["unsupported", "outside-run", "ancestry-unavailable"]>;
|
|
2081
|
+
}>]>>;
|
|
2082
|
+
readonly nextCursor: Schema.optional<Schema.Never>;
|
|
2083
|
+
}>, Schema.TaggedStruct<"flows", {
|
|
2084
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
2085
|
+
readonly flowId: Schema.String;
|
|
2086
|
+
readonly description: Schema.String;
|
|
2087
|
+
readonly inputSchema: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2088
|
+
}>>;
|
|
2089
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof DiscoveryWarning>>;
|
|
2090
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
2091
|
+
}>, Schema.TaggedStruct<"runs", {
|
|
2092
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
2093
|
+
/** Whether lifecycle fields were observed in the engine or no engine row was visible. */
|
|
2094
|
+
readonly executionObservation: Schema.optional<Schema.Literals<readonly ["observed", "missing"]>>;
|
|
2095
|
+
/** Exact native semantic observation; never a control-stream fact. */
|
|
2096
|
+
readonly executionView: Schema.optional<Schema.Struct<{
|
|
2097
|
+
readonly root: Schema.Struct<{
|
|
2098
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2099
|
+
readonly flowName: Schema.NonEmptyString;
|
|
2100
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
2101
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
2102
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2103
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2104
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
2105
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2106
|
+
readonly roundOrdinal: Schema.Int;
|
|
2107
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2108
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
2109
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
2110
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
2111
|
+
readonly reason: Schema.NonEmptyString;
|
|
2112
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2113
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
2114
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
2115
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2116
|
+
}>>;
|
|
2117
|
+
}>;
|
|
2118
|
+
readonly current: Schema.Struct<{
|
|
2119
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2120
|
+
readonly flowName: Schema.NonEmptyString;
|
|
2121
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
2122
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
2123
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2124
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2125
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
2126
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2127
|
+
readonly roundOrdinal: Schema.Int;
|
|
2128
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2129
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
2130
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
2131
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
2132
|
+
readonly reason: Schema.NonEmptyString;
|
|
2133
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2134
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
2135
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
2136
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2137
|
+
}>>;
|
|
2138
|
+
}>;
|
|
2139
|
+
readonly humanWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2140
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2141
|
+
readonly flowName: Schema.NonEmptyString;
|
|
2142
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
2143
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
2144
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2145
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2146
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
2147
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
2148
|
+
readonly roundOrdinal: Schema.Int;
|
|
2149
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2150
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
2151
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
2152
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
2153
|
+
readonly reason: Schema.NonEmptyString;
|
|
2154
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
2155
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
2156
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
2157
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
2158
|
+
}>>;
|
|
2159
|
+
}>>>;
|
|
2160
|
+
}>>;
|
|
2161
|
+
readonly runId: Schema.String;
|
|
2162
|
+
readonly flowId: Schema.String;
|
|
2163
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
2164
|
+
readonly planId: Schema.optional<Schema.String>;
|
|
2165
|
+
readonly planDigest: Schema.optional<Schema.String>;
|
|
2166
|
+
/** The flow's executable identity when the run started; resume refuses a different one. */
|
|
2167
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
2168
|
+
/** The engine version that started the run. */
|
|
2169
|
+
readonly engineVersion: Schema.optional<Schema.String>;
|
|
2170
|
+
/**
|
|
2171
|
+
* How the code that would resume this run differs from the code it
|
|
2172
|
+
* recorded. Computed by an exact run lookup, never stored; absent when
|
|
2173
|
+
* nothing changed or the run is terminal.
|
|
2174
|
+
*/
|
|
2175
|
+
readonly codeDrift: Schema.optional<Schema.Struct<{
|
|
2176
|
+
readonly recorded: Schema.optional<Schema.String>;
|
|
2177
|
+
readonly current: Schema.optional<Schema.String>;
|
|
2178
|
+
readonly recordedEngine: Schema.optional<Schema.String>;
|
|
2179
|
+
readonly currentEngine: Schema.optional<Schema.String>;
|
|
2180
|
+
}>>;
|
|
2181
|
+
readonly ownerId: Schema.optional<Schema.String>;
|
|
2182
|
+
/**
|
|
2183
|
+
* The authenticated principal that launched this run through the control
|
|
2184
|
+
* plane. A reader that does not see every run sees only the runs its own
|
|
2185
|
+
* principal launched. Absent on a run the engine created (a child, a fork,
|
|
2186
|
+
* a later trampoline round) and on a run launched before it was recorded;
|
|
2187
|
+
* only a reader that sees every run sees those.
|
|
2188
|
+
*/
|
|
2189
|
+
readonly launchedBy: Schema.optional<Schema.Struct<{
|
|
2190
|
+
readonly id: Schema.String;
|
|
2191
|
+
readonly kind: Schema.String;
|
|
2192
|
+
}>>;
|
|
2193
|
+
/**
|
|
2194
|
+
* The run this one branched from: the spawning run, the forked-from run, or
|
|
2195
|
+
* the previous trampoline round. Absent on a run with no ancestor.
|
|
2196
|
+
*/
|
|
2197
|
+
readonly parentRunId: Schema.optional<Schema.String>;
|
|
2198
|
+
/**
|
|
2199
|
+
* The trampoline lineage this run is a round of, and which round it is.
|
|
2200
|
+
* Both absent means a lineage of one, read as round 0 of itself.
|
|
2201
|
+
*/
|
|
2202
|
+
readonly lineageId: Schema.optional<Schema.String>;
|
|
2203
|
+
readonly roundOrdinal: Schema.optional<Schema.Number>;
|
|
2204
|
+
readonly origin: Schema.optional<Schema.Literals<readonly ["child", "fork", "continuation"]>>;
|
|
2205
|
+
/**
|
|
2206
|
+
* What a parked run is holding on: `approval`, `event`, `timer`, `quota`, or
|
|
2207
|
+
* a reason a plugin declared. Absent on a run that is not parked, and on a
|
|
2208
|
+
* park whose owner released the run without declaring one.
|
|
2209
|
+
*
|
|
2210
|
+
* The CLI's `ps` and `status` listings also render `executor` here for a run
|
|
2211
|
+
* that has sat at `accepted` with no owner process past the launch handoff
|
|
2212
|
+
* window. That value is computed at render time and never stored, so a
|
|
2213
|
+
* reader going through the control RPC, the gateway projection, or a plugin
|
|
2214
|
+
* sees the field absent on the same run.
|
|
2215
|
+
*/
|
|
2216
|
+
readonly waitingReason: Schema.optional<Schema.String>;
|
|
2217
|
+
/** What has been steered to this run and not yet delivered. */
|
|
2218
|
+
readonly steering: Schema.optional<Schema.Struct<{
|
|
2219
|
+
readonly pending: Schema.Number;
|
|
2220
|
+
}>>;
|
|
2221
|
+
/**
|
|
2222
|
+
* A resume this run has been told to take and no host has taken up yet.
|
|
2223
|
+
*
|
|
2224
|
+
* A decision on an in-run approval restarts the run server-side, and the
|
|
2225
|
+
* process that decides is usually not the process that hosts the execution:
|
|
2226
|
+
* an operator's `smithers approve`, a gateway, a second CLI. The intent is
|
|
2227
|
+
* therefore recorded durably here, and the host that owns the execution
|
|
2228
|
+
* takes it up on its next tick and clears it. The number is the durable
|
|
2229
|
+
* sequence of the request, so an operator can tell a delegation that is
|
|
2230
|
+
* still outstanding from one that has been taken up. Absent means nothing
|
|
2231
|
+
* is waiting to be taken up.
|
|
2232
|
+
*/
|
|
2233
|
+
readonly pendingResume: Schema.optional<Schema.Number>;
|
|
2234
|
+
/**
|
|
2235
|
+
* The executor claim this run was parked under.
|
|
2236
|
+
*
|
|
2237
|
+
* A parked execution releases its owner columns — that is what makes it
|
|
2238
|
+
* resumable at all — so after a park nothing on the row says which process
|
|
2239
|
+
* is hosting it. Every process that shares the databases can therefore see
|
|
2240
|
+
* the parked execution and resume it, including a short-lived `smithers
|
|
2241
|
+
* approve` that would drive the run and then exit. The fence the park was
|
|
2242
|
+
* written under is recorded here instead, so the host that parked the run
|
|
2243
|
+
* recognizes its own park and every other composition can tell that the
|
|
2244
|
+
* execution is not its to take up (triage B-15). Absent on a run that is not
|
|
2245
|
+
* parked, and on a park written by something that held no fence.
|
|
2246
|
+
*/
|
|
2247
|
+
readonly parkedBy: Schema.optional<Schema.String>;
|
|
2248
|
+
/** Who cancelled this run, why, and on whose behalf. Absent until one did. */
|
|
2249
|
+
readonly cancellation: Schema.optional<Schema.Struct<{
|
|
2250
|
+
readonly requestedAt: Schema.Number;
|
|
2251
|
+
readonly source: Schema.Literals<readonly ["control", "engine", "cascade"]>;
|
|
2252
|
+
readonly principal: Schema.optional<Schema.Struct<{
|
|
2253
|
+
readonly id: Schema.String;
|
|
2254
|
+
readonly kind: Schema.String;
|
|
2255
|
+
readonly stampedAt: Schema.Number;
|
|
2256
|
+
}>>;
|
|
2257
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
2258
|
+
/** The cancelled ancestor this run was swept up with, on a cascade. */
|
|
2259
|
+
readonly cascadedFrom: Schema.optional<Schema.String>;
|
|
2260
|
+
}>>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Open human waits anywhere in this run's tree, nearest execution first.
|
|
2263
|
+
*
|
|
2264
|
+
* Present only when there is at least one, so a run nobody owes an answer
|
|
2265
|
+
* carries no field rather than an empty array. `status` rolls up with it:
|
|
2266
|
+
* a run any of whose descendants is parked on `approval` reports
|
|
2267
|
+
* `waiting-approval`, which is what the existing inbox filters select on.
|
|
2268
|
+
*/
|
|
2269
|
+
readonly pendingWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2270
|
+
/** The execution parked on this wait, which may be the root run itself. */
|
|
2271
|
+
readonly runId: Schema.String;
|
|
2272
|
+
/** The flow that execution is running. */
|
|
2273
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
2274
|
+
/** The supervisor vocabulary: `approval` for people or `event` for a named signal. */
|
|
2275
|
+
readonly reason: Schema.String;
|
|
2276
|
+
/** The durable wait address a decision is routed to. */
|
|
2277
|
+
readonly token: Schema.String;
|
|
2278
|
+
/** Digest used to join replayed display facts to this current operational address. */
|
|
2279
|
+
readonly tokenDigest: Schema.optional<Schema.String>;
|
|
2280
|
+
/** The wait point's own name, when the token addresses a named one. */
|
|
2281
|
+
readonly name: Schema.optional<Schema.String>;
|
|
2282
|
+
/** Which attempt of a re-asked question this is, counting from 1. */
|
|
2283
|
+
readonly attempt: Schema.optional<Schema.Number>;
|
|
2284
|
+
/** What the wait declared about itself, absent when it declared nothing. */
|
|
2285
|
+
readonly request: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
2286
|
+
/** When the execution holding this wait was created. */
|
|
2287
|
+
readonly createdAt: Schema.Number;
|
|
2288
|
+
}>>>;
|
|
2289
|
+
/**
|
|
2290
|
+
* When the run's approved deadline passes: its `createdAt` plus the
|
|
2291
|
+
* envelope's `budget.deadline`, which is the instant the run is failed with
|
|
2292
|
+
* `deadline_exceeded` if it has not settled. Absent on a run approved with
|
|
2293
|
+
* no deadline.
|
|
2294
|
+
*/
|
|
2295
|
+
readonly deadlineAt: Schema.optional<Schema.Number>;
|
|
2296
|
+
readonly createdAt: Schema.Number;
|
|
2297
|
+
readonly updatedAt: Schema.Number;
|
|
2298
|
+
}>>;
|
|
2299
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
2300
|
+
}>, Schema.TaggedStruct<"triggers", {
|
|
2301
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
2302
|
+
readonly triggerId: Schema.String;
|
|
2303
|
+
readonly flowId: Schema.String;
|
|
2304
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2305
|
+
readonly cron: Schema.String;
|
|
2306
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
2307
|
+
readonly overlap: Schema.Literals<readonly ["skip", "buffer-one", "supersede"]>;
|
|
2308
|
+
readonly catchUp: Schema.Literals<readonly ["none", "one", "all"]>;
|
|
2309
|
+
readonly maxCatchUp: Schema.optional<Schema.Number>;
|
|
2310
|
+
readonly enabled: Schema.Boolean;
|
|
2311
|
+
readonly revision: Schema.Number;
|
|
2312
|
+
readonly lastFiredAtMs: Schema.optional<Schema.Number>;
|
|
2313
|
+
readonly pendingAtMs: Schema.optional<Schema.Number>;
|
|
2314
|
+
readonly activeRunId: Schema.optional<Schema.String>;
|
|
2315
|
+
readonly nextOccurrencesMs: Schema.$Array<Schema.Number>;
|
|
2316
|
+
readonly schedulerLastTickMs: Schema.optional<Schema.Number>;
|
|
2317
|
+
}>>;
|
|
2318
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
2319
|
+
}>, Schema.TaggedStruct<"fires", {
|
|
2320
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
2321
|
+
readonly triggerId: Schema.String;
|
|
2322
|
+
readonly occurrenceAtMs: Schema.Number;
|
|
2323
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>>;
|
|
2324
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
2325
|
+
readonly error: Schema.optional<Schema.String>;
|
|
2326
|
+
readonly waiting: Schema.optional<Schema.Literal<"approval">>;
|
|
2327
|
+
}>>;
|
|
2328
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
2329
|
+
}>, Schema.TaggedStruct<"plans", {
|
|
2330
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
2331
|
+
readonly card: Schema.Struct<{
|
|
2332
|
+
readonly planId: Schema.String;
|
|
2333
|
+
readonly flowId: Schema.String;
|
|
2334
|
+
readonly digest: Schema.String;
|
|
2335
|
+
readonly inputSummary: Schema.String;
|
|
2336
|
+
/** Discovery diagnostics for the selected flow; outside the approval identity. */
|
|
2337
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof DiscoveryWarning>>;
|
|
2338
|
+
readonly envelope: Schema.Struct<{
|
|
2339
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
2340
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
2341
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
2342
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
2343
|
+
readonly budget: Schema.Struct<{
|
|
2344
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
2345
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
2346
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
2347
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
2348
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
2349
|
+
}>;
|
|
2350
|
+
readonly host: Schema.optional<Schema.String>;
|
|
2351
|
+
}>;
|
|
2352
|
+
readonly deployClass: Schema.Boolean;
|
|
2353
|
+
/** Executable source/metadata identity supplied by a discovery-based host. */
|
|
2354
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
2355
|
+
readonly plan: Schema.optional<Schema.Struct<{
|
|
2356
|
+
readonly planId: Schema.NonEmptyString;
|
|
2357
|
+
readonly flow: Schema.NonEmptyString;
|
|
2358
|
+
readonly generation: Schema.Int;
|
|
2359
|
+
readonly baseDigest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
2360
|
+
readonly digest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
2361
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
2362
|
+
readonly id: Schema.NonEmptyString;
|
|
2363
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
2364
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
2365
|
+
readonly material: Schema.Struct<{
|
|
2366
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
2367
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
2368
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
2369
|
+
readonly body: Schema.Unknown;
|
|
2370
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
2371
|
+
readonly value: Schema.Unknown;
|
|
2372
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
2373
|
+
readonly from: Schema.NonEmptyString;
|
|
2374
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
2375
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
2376
|
+
readonly from: Schema.NonEmptyString;
|
|
2377
|
+
}>]>>;
|
|
2378
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
2379
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
2380
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
2381
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
2382
|
+
}>;
|
|
2383
|
+
readonly effects: Schema.Struct<{
|
|
2384
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2385
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2386
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2387
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
2388
|
+
readonly name: Schema.NonEmptyString;
|
|
2389
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2390
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2391
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2392
|
+
}>]>>;
|
|
2393
|
+
}>]>>;
|
|
2394
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2395
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2396
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2397
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
2398
|
+
readonly path: Schema.NonEmptyString;
|
|
2399
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
2400
|
+
readonly name: Schema.NonEmptyString;
|
|
2401
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2402
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2403
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2404
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
2405
|
+
readonly path: Schema.NonEmptyString;
|
|
2406
|
+
}>]>>;
|
|
2407
|
+
}>]>>;
|
|
2408
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2409
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
2410
|
+
}>;
|
|
2411
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
2412
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
2413
|
+
readonly with: Schema.NonEmptyString;
|
|
2414
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
2415
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
2416
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
2417
|
+
}>>;
|
|
2418
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
2419
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
2420
|
+
readonly priority: Schema.Int;
|
|
2421
|
+
readonly generation: Schema.Int;
|
|
2422
|
+
}>>;
|
|
2423
|
+
}>>;
|
|
2424
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
2425
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
2426
|
+
readonly id: Schema.NonEmptyString;
|
|
2427
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
2428
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
2429
|
+
readonly material: Schema.Struct<{
|
|
2430
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
2431
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
2432
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
2433
|
+
readonly body: Schema.Unknown;
|
|
2434
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
2435
|
+
readonly value: Schema.Unknown;
|
|
2436
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
2437
|
+
readonly from: Schema.NonEmptyString;
|
|
2438
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
2439
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
2440
|
+
readonly from: Schema.NonEmptyString;
|
|
2441
|
+
}>]>>;
|
|
2442
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
2443
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
2444
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
2445
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
2446
|
+
}>;
|
|
2447
|
+
readonly effects: Schema.Struct<{
|
|
2448
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2449
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2450
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2451
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
2452
|
+
readonly name: Schema.NonEmptyString;
|
|
2453
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2454
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2455
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2456
|
+
}>]>>;
|
|
2457
|
+
}>]>>;
|
|
2458
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2459
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2460
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2461
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
2462
|
+
readonly path: Schema.NonEmptyString;
|
|
2463
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
2464
|
+
readonly name: Schema.NonEmptyString;
|
|
2465
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
2466
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
2467
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2468
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
2469
|
+
readonly path: Schema.NonEmptyString;
|
|
2470
|
+
}>]>>;
|
|
2471
|
+
}>]>>;
|
|
2472
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
2473
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
2474
|
+
}>;
|
|
2475
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
2476
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
2477
|
+
readonly with: Schema.NonEmptyString;
|
|
2478
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
2479
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
2480
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
2481
|
+
}>>;
|
|
2482
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
2483
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
2484
|
+
readonly priority: Schema.Int;
|
|
2485
|
+
readonly generation: Schema.Int;
|
|
2486
|
+
}>>;
|
|
2487
|
+
/**
|
|
2488
|
+
* The labelled edges of the graph this plan was built from, and where its
|
|
2489
|
+
* nodes were declared.
|
|
2490
|
+
*
|
|
2491
|
+
* Deliberately OUTSIDE the digest an approval binds to: the edges and the
|
|
2492
|
+
* declaration sites describe the plan a reader draws, and nothing here
|
|
2493
|
+
* changes what will run. The
|
|
2494
|
+
* persisted plan's own digest already covers keys, edges, effects,
|
|
2495
|
+
* conflicts, priorities and generations, so a host that starts reporting
|
|
2496
|
+
* this field re-plans to the digest it planned to before and every parked
|
|
2497
|
+
* approval still validates.
|
|
2498
|
+
*/
|
|
2499
|
+
readonly graph: Schema.optional<Schema.Struct<{
|
|
2500
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
2501
|
+
readonly from: Schema.NonEmptyString;
|
|
2502
|
+
readonly to: Schema.NonEmptyString;
|
|
2503
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
2504
|
+
}>>;
|
|
2505
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2506
|
+
readonly id: Schema.NonEmptyString;
|
|
2507
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
2508
|
+
readonly path: Schema.NonEmptyString;
|
|
2509
|
+
readonly line: Schema.Int;
|
|
2510
|
+
}>>;
|
|
2511
|
+
}>>>;
|
|
2512
|
+
/**
|
|
2513
|
+
* The revision of the workspace those declaration sites were read out of.
|
|
2514
|
+
*
|
|
2515
|
+
* A site is a path and a line, and neither says which bytes were there: a
|
|
2516
|
+
* host's working tree moves, so the same path after an edit or a branch
|
|
2517
|
+
* switch is a different file. This is the immutable name of the tree the
|
|
2518
|
+
* host loaded the flow from — a jj working-copy commit id, or a git commit
|
|
2519
|
+
* for a tree that still matches one — and a reader asks the content route
|
|
2520
|
+
* for the file AT this revision rather than for whatever is on disk now.
|
|
2521
|
+
*
|
|
2522
|
+
* A host that cannot name one reports nothing, and a reader that has
|
|
2523
|
+
* nothing shows no code at all rather than code it cannot bind (D-068).
|
|
2524
|
+
*
|
|
2525
|
+
* Exactly the forty lowercase hex digits the only producer emits
|
|
2526
|
+
* (`SourceRevision.objectId`), because the app puts this value straight
|
|
2527
|
+
* into a contents route's `?ref=` and a route that spawns jj or git from it
|
|
2528
|
+
* should never see anything else.
|
|
2529
|
+
*/
|
|
2530
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
2531
|
+
}>>;
|
|
2532
|
+
readonly approval: Schema.Struct<{
|
|
2533
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
2534
|
+
readonly planId: Schema.String;
|
|
2535
|
+
readonly digest: Schema.String;
|
|
2536
|
+
readonly envelope: Schema.Struct<{
|
|
2537
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
2538
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
2539
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
2540
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
2541
|
+
readonly budget: Schema.Struct<{
|
|
2542
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
2543
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
2544
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
2545
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
2546
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
2547
|
+
}>;
|
|
2548
|
+
readonly host: Schema.optional<Schema.String>;
|
|
2549
|
+
}>;
|
|
2550
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
2551
|
+
readonly runId: Schema.String;
|
|
2552
|
+
readonly requestId: Schema.String;
|
|
2553
|
+
readonly digest: Schema.String;
|
|
2554
|
+
readonly envelope: Schema.Struct<{
|
|
2555
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
2556
|
+
/** Unrestricted builtin/addon/package imports, outside the guarded capability ceiling. */
|
|
2557
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
2558
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
2559
|
+
readonly budget: Schema.Struct<{
|
|
2560
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
2561
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
2562
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
2563
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
2564
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
2565
|
+
}>;
|
|
2566
|
+
readonly host: Schema.optional<Schema.String>;
|
|
2567
|
+
}>;
|
|
2568
|
+
}>]>;
|
|
2569
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
2570
|
+
readonly idempotencyKey: Schema.String;
|
|
2571
|
+
}>;
|
|
2572
|
+
}>;
|
|
2573
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
2574
|
+
readonly decision: Schema.Literals<readonly ["pending", "approved", "denied"]>;
|
|
2575
|
+
}>>;
|
|
2576
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
2577
|
+
}>]>;
|
|
2578
|
+
/**
|
|
2579
|
+
* A typed page returned for a flow, run, trigger, fire, or plan listing.
|
|
2580
|
+
*
|
|
2581
|
+
* @since 0.1.0
|
|
2582
|
+
* @category models
|
|
2583
|
+
*/
|
|
2584
|
+
export type ListResponse = typeof ListResponse.Type;
|
|
2585
|
+
/**
|
|
2586
|
+
* A live process that hosts a run: its machine and process id.
|
|
2587
|
+
*
|
|
2588
|
+
* @since 1.0.0
|
|
2589
|
+
* @category models
|
|
2590
|
+
*/
|
|
2591
|
+
export declare const RunHost: Schema.Struct<{
|
|
2592
|
+
readonly hostId: Schema.String;
|
|
2593
|
+
readonly pid: Schema.Number;
|
|
2594
|
+
}>;
|
|
2595
|
+
/**
|
|
2596
|
+
* A live process that hosts a run: its machine and process id.
|
|
2597
|
+
*
|
|
2598
|
+
* @since 1.0.0
|
|
2599
|
+
* @category models
|
|
2600
|
+
*/
|
|
2601
|
+
export type RunHost = typeof RunHost.Type;
|
|
2602
|
+
/**
|
|
2603
|
+
* The idempotent outcome returned by every control mutation.
|
|
2604
|
+
*
|
|
2605
|
+
* An `Accepted` resume with `handedTo` was not claimed by the caller: the live
|
|
2606
|
+
* process that parked the run takes it up and drives it.
|
|
2607
|
+
*
|
|
2608
|
+
* @since 0.1.0
|
|
2609
|
+
* @category models
|
|
2610
|
+
*/
|
|
2611
|
+
export declare const Receipt: Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
2612
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
2613
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
2614
|
+
readonly receiptId: Schema.String;
|
|
2615
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
2616
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
2617
|
+
readonly hostId: Schema.String;
|
|
2618
|
+
readonly pid: Schema.Number;
|
|
2619
|
+
}>>;
|
|
2620
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
2621
|
+
readonly receiptId: Schema.String;
|
|
2622
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
2623
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
2624
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
2625
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
2626
|
+
readonly receiptId: Schema.String;
|
|
2627
|
+
readonly planId: Schema.String;
|
|
2628
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
2629
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
2630
|
+
readonly message: Schema.String;
|
|
2631
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
2632
|
+
readonly runId: Schema.String;
|
|
2633
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
2634
|
+
}>]>;
|
|
2635
|
+
/**
|
|
2636
|
+
* The idempotent outcome returned by every control mutation.
|
|
2637
|
+
*
|
|
2638
|
+
* @since 0.1.0
|
|
2639
|
+
* @category models
|
|
2640
|
+
*/
|
|
2641
|
+
export type Receipt = typeof Receipt.Type;
|
|
2642
|
+
//# sourceMappingURL=ControlSchema.d.ts.map
|