@smthrs/control 0.0.0-stage → 1.0.0-rc.4
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 +1293 -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 +744 -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 +1522 -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 +1589 -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 +808 -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 +7 -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 +2127 -0
- package/src/ControlRpcs.ts +443 -0
- package/src/ControlRuntime.ts +1601 -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 +2478 -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,1204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema-backed RPC projection of the control service.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.1.0
|
|
5
|
+
*/
|
|
6
|
+
import { NotificationError } from "@smthrs/notifications/NotificationQueue";
|
|
7
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
8
|
+
import { Rpc, RpcGroup, RpcMiddleware } from "effect/unstable/rpc";
|
|
9
|
+
import { AlreadyResolved, ClaimLost, CodeDrift, EnvelopeMismatch, FlowNotFound, InvalidInput, LaunchFailed, NoMatchingWait, PersistenceError, PlanDenied, PlanDigestMismatch, PlanNotFound, RunNotFound, TransportError, Unauthorized, Unavailable } from "./ControlError.ts";
|
|
10
|
+
import { type Principal } from "./ControlSchema.ts";
|
|
11
|
+
declare const ControlPrincipal_base: Context.ServiceClass<ControlPrincipal, "/control/ControlPrincipal", {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly kind: string;
|
|
14
|
+
readonly stampedAt: number;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Authenticated principal made available to control RPC handlers.
|
|
18
|
+
*
|
|
19
|
+
* @category services
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
*/
|
|
22
|
+
export declare class ControlPrincipal extends ControlPrincipal_base {
|
|
23
|
+
}
|
|
24
|
+
declare const ControlAuth_base: RpcMiddleware.ServiceClass<ControlAuth, "/control/ControlAuth", ControlPrincipal, typeof Unauthorized, never, never, false>;
|
|
25
|
+
/**
|
|
26
|
+
* Middleware boundary that authenticates control RPC requests.
|
|
27
|
+
*
|
|
28
|
+
* @category middleware
|
|
29
|
+
* @since 0.1.0
|
|
30
|
+
*/
|
|
31
|
+
export declare class ControlAuth extends ControlAuth_base {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Which authenticated principals read every run.
|
|
35
|
+
*
|
|
36
|
+
* `List` and `Watch` answer a principal this returns `true` for with every
|
|
37
|
+
* run: that principal is an operator. Every other principal reads only the
|
|
38
|
+
* runs it launched (`RunSummary.launchedBy`) and, from `Watch`, only their
|
|
39
|
+
* events. The authentication layer decides, because it is what knows which
|
|
40
|
+
* identities it can stamp: `layerBearerAuth` and `layerNoopAuth` stamp one
|
|
41
|
+
* principal and make it the operator, and `layerAuth` takes the rule as an
|
|
42
|
+
* option. Where nothing provides one, no principal is an operator.
|
|
43
|
+
*
|
|
44
|
+
* @category services
|
|
45
|
+
* @since 1.0.0
|
|
46
|
+
*/
|
|
47
|
+
export declare const RunVisibility: Context.Reference<{
|
|
48
|
+
readonly seesAllRuns: (principal: typeof Principal.Type) => boolean;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* The sentence a client reads when a control handler dies.
|
|
52
|
+
*
|
|
53
|
+
* @category defects
|
|
54
|
+
* @since 1.0.0
|
|
55
|
+
*/
|
|
56
|
+
export declare const defectMessage = "Something went wrong on our side. Not your fault.";
|
|
57
|
+
/**
|
|
58
|
+
* Wire schema for a control RPC defect: an untyped failure that no procedure
|
|
59
|
+
* declares.
|
|
60
|
+
*
|
|
61
|
+
* Encoding replaces a defect value (an `Error`, a failure an `orDie` turned
|
|
62
|
+
* into a defect, any non-string value) with `{ name: "Error", message }`
|
|
63
|
+
* carrying {@link defectMessage}, so a driver message, path, or stack never
|
|
64
|
+
* reaches a client. The server logs the raw defect. A string passes unchanged:
|
|
65
|
+
* the RPC server's own request-decoding sentence, which describes the caller's
|
|
66
|
+
* payload, is one, and so is an author-written `Effect.die` sentence.
|
|
67
|
+
*
|
|
68
|
+
* Decoding is Effect's default `Schema.Defect()` decoding, so a client reads
|
|
69
|
+
* this shape and an older server's shape alike, and an older client reads this
|
|
70
|
+
* shape as an `Error`.
|
|
71
|
+
*
|
|
72
|
+
* @category defects
|
|
73
|
+
* @since 1.0.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const ControlDefect: Schema.decodeTo<Schema.Unknown, Schema.Codec<Schema.Json, Schema.Json, never, never>, never, never>;
|
|
76
|
+
/**
|
|
77
|
+
* The ten remote procedures corresponding to `Control` operations.
|
|
78
|
+
*
|
|
79
|
+
* @category groups
|
|
80
|
+
* @since 0.1.0
|
|
81
|
+
*/
|
|
82
|
+
export declare const ControlRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"Plan", Schema.Struct<{
|
|
83
|
+
readonly flowId: Schema.String;
|
|
84
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
85
|
+
readonly idempotencyKey: Schema.optional<Schema.String>;
|
|
86
|
+
readonly budget: Schema.optional<Schema.Struct<{
|
|
87
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
88
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
89
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
90
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
91
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
92
|
+
}>>;
|
|
93
|
+
}>, Schema.Struct<{
|
|
94
|
+
readonly planId: Schema.String;
|
|
95
|
+
readonly flowId: Schema.String;
|
|
96
|
+
readonly digest: Schema.String;
|
|
97
|
+
readonly inputSummary: Schema.String;
|
|
98
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof import("@smthrs/registry/Descriptor").DiscoveryWarning>>;
|
|
99
|
+
readonly envelope: Schema.Struct<{
|
|
100
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
101
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
102
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
103
|
+
readonly budget: Schema.Struct<{
|
|
104
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
105
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
106
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
107
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
108
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
109
|
+
}>;
|
|
110
|
+
readonly host: Schema.optional<Schema.String>;
|
|
111
|
+
}>;
|
|
112
|
+
readonly deployClass: Schema.Boolean;
|
|
113
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
114
|
+
readonly plan: Schema.optional<Schema.Struct<{
|
|
115
|
+
readonly planId: Schema.NonEmptyString;
|
|
116
|
+
readonly flow: Schema.NonEmptyString;
|
|
117
|
+
readonly generation: Schema.Int;
|
|
118
|
+
readonly baseDigest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
119
|
+
readonly digest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
120
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
121
|
+
readonly id: Schema.NonEmptyString;
|
|
122
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
123
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
124
|
+
readonly material: Schema.Struct<{
|
|
125
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
126
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
127
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
128
|
+
readonly body: Schema.Unknown;
|
|
129
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
130
|
+
readonly value: Schema.Unknown;
|
|
131
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
132
|
+
readonly from: Schema.NonEmptyString;
|
|
133
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
134
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
135
|
+
readonly from: Schema.NonEmptyString;
|
|
136
|
+
}>]>>;
|
|
137
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
138
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
139
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
140
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
141
|
+
}>;
|
|
142
|
+
readonly effects: Schema.Struct<{
|
|
143
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
144
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
145
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
146
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
147
|
+
readonly name: Schema.NonEmptyString;
|
|
148
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
149
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
150
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
151
|
+
}>]>>;
|
|
152
|
+
}>]>>;
|
|
153
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
154
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
155
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
156
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
157
|
+
readonly path: Schema.NonEmptyString;
|
|
158
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
159
|
+
readonly name: Schema.NonEmptyString;
|
|
160
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
161
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
162
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
163
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
164
|
+
readonly path: Schema.NonEmptyString;
|
|
165
|
+
}>]>>;
|
|
166
|
+
}>]>>;
|
|
167
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
168
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
169
|
+
}>;
|
|
170
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
171
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
172
|
+
readonly with: Schema.NonEmptyString;
|
|
173
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
174
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
175
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
176
|
+
}>>;
|
|
177
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
178
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
179
|
+
readonly priority: Schema.Int;
|
|
180
|
+
readonly generation: Schema.Int;
|
|
181
|
+
}>>;
|
|
182
|
+
}>>;
|
|
183
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
184
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
185
|
+
readonly id: Schema.NonEmptyString;
|
|
186
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
187
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
188
|
+
readonly material: Schema.Struct<{
|
|
189
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
190
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
191
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
192
|
+
readonly body: Schema.Unknown;
|
|
193
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
194
|
+
readonly value: Schema.Unknown;
|
|
195
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
196
|
+
readonly from: Schema.NonEmptyString;
|
|
197
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
198
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
199
|
+
readonly from: Schema.NonEmptyString;
|
|
200
|
+
}>]>>;
|
|
201
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
202
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
203
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
204
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
205
|
+
}>;
|
|
206
|
+
readonly effects: Schema.Struct<{
|
|
207
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
208
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
209
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
210
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
211
|
+
readonly name: Schema.NonEmptyString;
|
|
212
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
213
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
214
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
215
|
+
}>]>>;
|
|
216
|
+
}>]>>;
|
|
217
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
218
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
219
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
220
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
221
|
+
readonly path: Schema.NonEmptyString;
|
|
222
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
223
|
+
readonly name: Schema.NonEmptyString;
|
|
224
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
225
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
226
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
227
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
228
|
+
readonly path: Schema.NonEmptyString;
|
|
229
|
+
}>]>>;
|
|
230
|
+
}>]>>;
|
|
231
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
232
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
233
|
+
}>;
|
|
234
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
235
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
236
|
+
readonly with: Schema.NonEmptyString;
|
|
237
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
238
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
239
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
240
|
+
}>>;
|
|
241
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
242
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
243
|
+
readonly priority: Schema.Int;
|
|
244
|
+
readonly generation: Schema.Int;
|
|
245
|
+
}>>;
|
|
246
|
+
readonly graph: Schema.optional<Schema.Struct<{
|
|
247
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
248
|
+
readonly from: Schema.NonEmptyString;
|
|
249
|
+
readonly to: Schema.NonEmptyString;
|
|
250
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
251
|
+
}>>;
|
|
252
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
253
|
+
readonly id: Schema.NonEmptyString;
|
|
254
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
255
|
+
readonly path: Schema.NonEmptyString;
|
|
256
|
+
readonly line: Schema.Int;
|
|
257
|
+
}>>;
|
|
258
|
+
}>>>;
|
|
259
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
260
|
+
}>>;
|
|
261
|
+
readonly approval: Schema.Struct<{
|
|
262
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
263
|
+
readonly planId: Schema.String;
|
|
264
|
+
readonly digest: Schema.String;
|
|
265
|
+
readonly envelope: Schema.Struct<{
|
|
266
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
267
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
268
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
269
|
+
readonly budget: Schema.Struct<{
|
|
270
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
271
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
272
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
273
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
274
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
275
|
+
}>;
|
|
276
|
+
readonly host: Schema.optional<Schema.String>;
|
|
277
|
+
}>;
|
|
278
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
279
|
+
readonly runId: Schema.String;
|
|
280
|
+
readonly requestId: Schema.String;
|
|
281
|
+
readonly digest: Schema.String;
|
|
282
|
+
readonly envelope: Schema.Struct<{
|
|
283
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
284
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
285
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
286
|
+
readonly budget: Schema.Struct<{
|
|
287
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
288
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
289
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
290
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
291
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
292
|
+
}>;
|
|
293
|
+
readonly host: Schema.optional<Schema.String>;
|
|
294
|
+
}>;
|
|
295
|
+
}>]>;
|
|
296
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
297
|
+
readonly idempotencyKey: Schema.String;
|
|
298
|
+
}>;
|
|
299
|
+
}>, Schema.Union<readonly [typeof FlowNotFound, typeof InvalidInput, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized]>, typeof ControlAuth, never> | Rpc.Rpc<"Run", Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
300
|
+
readonly planId: Schema.String;
|
|
301
|
+
readonly digest: Schema.String;
|
|
302
|
+
readonly envelope: Schema.Struct<{
|
|
303
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
304
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
305
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
306
|
+
readonly budget: Schema.Struct<{
|
|
307
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
308
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
309
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
310
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
311
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
312
|
+
}>;
|
|
313
|
+
readonly host: Schema.optional<Schema.String>;
|
|
314
|
+
}>;
|
|
315
|
+
readonly idempotencyKey: Schema.String;
|
|
316
|
+
}>, Schema.TaggedStruct<"Resume", {
|
|
317
|
+
readonly runId: Schema.String;
|
|
318
|
+
readonly idempotencyKey: Schema.String;
|
|
319
|
+
readonly allowCodeDrift: Schema.optional<Schema.Boolean>;
|
|
320
|
+
}>]>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
321
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
322
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
323
|
+
readonly receiptId: Schema.String;
|
|
324
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
325
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
326
|
+
readonly hostId: Schema.String;
|
|
327
|
+
readonly pid: Schema.Number;
|
|
328
|
+
}>>;
|
|
329
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
330
|
+
readonly receiptId: Schema.String;
|
|
331
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
332
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
333
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
334
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
335
|
+
readonly receiptId: Schema.String;
|
|
336
|
+
readonly planId: Schema.String;
|
|
337
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
338
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
339
|
+
readonly message: Schema.String;
|
|
340
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
341
|
+
readonly runId: Schema.String;
|
|
342
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
343
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof PlanNotFound, typeof PlanDenied, typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof ClaimLost, typeof CodeDrift, typeof InvalidInput, typeof LaunchFailed, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized]>, typeof ControlAuth, never> | Rpc.Rpc<"Approve", Schema.Struct<{
|
|
344
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
345
|
+
readonly planId: Schema.String;
|
|
346
|
+
readonly digest: Schema.String;
|
|
347
|
+
readonly envelope: Schema.Struct<{
|
|
348
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
349
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
350
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
351
|
+
readonly budget: Schema.Struct<{
|
|
352
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
353
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
354
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
355
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
356
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
357
|
+
}>;
|
|
358
|
+
readonly host: Schema.optional<Schema.String>;
|
|
359
|
+
}>;
|
|
360
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
361
|
+
readonly runId: Schema.String;
|
|
362
|
+
readonly requestId: Schema.String;
|
|
363
|
+
readonly digest: Schema.String;
|
|
364
|
+
readonly envelope: Schema.Struct<{
|
|
365
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
366
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
367
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
368
|
+
readonly budget: Schema.Struct<{
|
|
369
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
370
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
371
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
372
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
373
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
374
|
+
}>;
|
|
375
|
+
readonly host: Schema.optional<Schema.String>;
|
|
376
|
+
}>;
|
|
377
|
+
}>]>;
|
|
378
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
379
|
+
readonly idempotencyKey: Schema.String;
|
|
380
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
381
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
382
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
383
|
+
readonly receiptId: Schema.String;
|
|
384
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
385
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
386
|
+
readonly hostId: Schema.String;
|
|
387
|
+
readonly pid: Schema.Number;
|
|
388
|
+
}>>;
|
|
389
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
390
|
+
readonly receiptId: Schema.String;
|
|
391
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
392
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
393
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
394
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
395
|
+
readonly receiptId: Schema.String;
|
|
396
|
+
readonly planId: Schema.String;
|
|
397
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
398
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
399
|
+
readonly message: Schema.String;
|
|
400
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
401
|
+
readonly runId: Schema.String;
|
|
402
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
403
|
+
}>]>, Schema.Union<readonly [typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof AlreadyResolved, typeof PlanNotFound, typeof RunNotFound, typeof CodeDrift, typeof InvalidInput, typeof Unauthorized, typeof PersistenceError, typeof Unavailable, typeof TransportError]>, typeof ControlAuth, never> | Rpc.Rpc<"Deny", Schema.Struct<{
|
|
404
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
405
|
+
readonly planId: Schema.String;
|
|
406
|
+
readonly digest: Schema.String;
|
|
407
|
+
readonly envelope: Schema.Struct<{
|
|
408
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
409
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
410
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
411
|
+
readonly budget: Schema.Struct<{
|
|
412
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
413
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
414
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
415
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
416
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
417
|
+
}>;
|
|
418
|
+
readonly host: Schema.optional<Schema.String>;
|
|
419
|
+
}>;
|
|
420
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
421
|
+
readonly runId: Schema.String;
|
|
422
|
+
readonly requestId: Schema.String;
|
|
423
|
+
readonly digest: Schema.String;
|
|
424
|
+
readonly envelope: Schema.Struct<{
|
|
425
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
426
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
427
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
428
|
+
readonly budget: Schema.Struct<{
|
|
429
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
430
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
431
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
432
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
433
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
434
|
+
}>;
|
|
435
|
+
readonly host: Schema.optional<Schema.String>;
|
|
436
|
+
}>;
|
|
437
|
+
}>]>;
|
|
438
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
439
|
+
readonly idempotencyKey: Schema.String;
|
|
440
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
441
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
442
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
443
|
+
readonly receiptId: Schema.String;
|
|
444
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
445
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
446
|
+
readonly hostId: Schema.String;
|
|
447
|
+
readonly pid: Schema.Number;
|
|
448
|
+
}>>;
|
|
449
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
450
|
+
readonly receiptId: Schema.String;
|
|
451
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
452
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
453
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
454
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
455
|
+
readonly receiptId: Schema.String;
|
|
456
|
+
readonly planId: Schema.String;
|
|
457
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
458
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
459
|
+
readonly message: Schema.String;
|
|
460
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
461
|
+
readonly runId: Schema.String;
|
|
462
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
463
|
+
}>]>, Schema.Union<readonly [typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof AlreadyResolved, typeof PlanNotFound, typeof RunNotFound, typeof CodeDrift, typeof InvalidInput, typeof Unauthorized, typeof PersistenceError, typeof Unavailable, typeof TransportError]>, typeof ControlAuth, never> | Rpc.Rpc<"Steer", Schema.Struct<{
|
|
464
|
+
readonly version: Schema.optional<Schema.Number>;
|
|
465
|
+
readonly runId: Schema.String;
|
|
466
|
+
readonly message: Schema.Union<readonly [Schema.Struct<{
|
|
467
|
+
readonly kind: Schema.optional<Schema.Literal<"Message">>;
|
|
468
|
+
readonly body: Schema.String;
|
|
469
|
+
readonly messageId: Schema.String;
|
|
470
|
+
readonly runId: Schema.String;
|
|
471
|
+
readonly principal: Schema.Struct<{
|
|
472
|
+
readonly id: Schema.String;
|
|
473
|
+
readonly kind: Schema.String;
|
|
474
|
+
readonly stampedAt: Schema.Number;
|
|
475
|
+
}>;
|
|
476
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
477
|
+
readonly createdAt: Schema.Number;
|
|
478
|
+
}>, Schema.Struct<{
|
|
479
|
+
readonly kind: Schema.Literal<"Seat">;
|
|
480
|
+
readonly seat: Schema.NonEmptyString;
|
|
481
|
+
readonly messageId: Schema.String;
|
|
482
|
+
readonly runId: Schema.String;
|
|
483
|
+
readonly principal: Schema.Struct<{
|
|
484
|
+
readonly id: Schema.String;
|
|
485
|
+
readonly kind: Schema.String;
|
|
486
|
+
readonly stampedAt: Schema.Number;
|
|
487
|
+
}>;
|
|
488
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
489
|
+
readonly createdAt: Schema.Number;
|
|
490
|
+
}>, Schema.Struct<{
|
|
491
|
+
readonly kind: Schema.Literal<"Thinking">;
|
|
492
|
+
readonly thinking: Schema.Literals<readonly ["none", "minimal", "low", "medium", "high", "xhigh"]>;
|
|
493
|
+
readonly messageId: Schema.String;
|
|
494
|
+
readonly runId: Schema.String;
|
|
495
|
+
readonly principal: Schema.Struct<{
|
|
496
|
+
readonly id: Schema.String;
|
|
497
|
+
readonly kind: Schema.String;
|
|
498
|
+
readonly stampedAt: Schema.Number;
|
|
499
|
+
}>;
|
|
500
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
501
|
+
readonly createdAt: Schema.Number;
|
|
502
|
+
}>, Schema.Struct<{
|
|
503
|
+
readonly kind: Schema.Literal<"Tools">;
|
|
504
|
+
readonly toolNames: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
505
|
+
readonly messageId: Schema.String;
|
|
506
|
+
readonly runId: Schema.String;
|
|
507
|
+
readonly principal: Schema.Struct<{
|
|
508
|
+
readonly id: Schema.String;
|
|
509
|
+
readonly kind: Schema.String;
|
|
510
|
+
readonly stampedAt: Schema.Number;
|
|
511
|
+
}>;
|
|
512
|
+
readonly attribution: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
513
|
+
readonly createdAt: Schema.Number;
|
|
514
|
+
}>]>;
|
|
515
|
+
readonly idempotencyKey: Schema.String;
|
|
516
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
517
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
518
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
519
|
+
readonly receiptId: Schema.String;
|
|
520
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
521
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
522
|
+
readonly hostId: Schema.String;
|
|
523
|
+
readonly pid: Schema.Number;
|
|
524
|
+
}>>;
|
|
525
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
526
|
+
readonly receiptId: Schema.String;
|
|
527
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
528
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
529
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
530
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
531
|
+
readonly receiptId: Schema.String;
|
|
532
|
+
readonly planId: Schema.String;
|
|
533
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
534
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
535
|
+
readonly message: Schema.String;
|
|
536
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
537
|
+
readonly runId: Schema.String;
|
|
538
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
539
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof InvalidInput, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized, typeof NotificationError]>, typeof ControlAuth, never> | Rpc.Rpc<"Signal", Schema.Struct<{
|
|
540
|
+
readonly runId: Schema.String;
|
|
541
|
+
readonly signal: Schema.Struct<{
|
|
542
|
+
readonly name: Schema.String;
|
|
543
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
544
|
+
}>;
|
|
545
|
+
readonly idempotencyKey: Schema.String;
|
|
546
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
547
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
548
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
549
|
+
readonly receiptId: Schema.String;
|
|
550
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
551
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
552
|
+
readonly hostId: Schema.String;
|
|
553
|
+
readonly pid: Schema.Number;
|
|
554
|
+
}>>;
|
|
555
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
556
|
+
readonly receiptId: Schema.String;
|
|
557
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
558
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
559
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
560
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
561
|
+
readonly receiptId: Schema.String;
|
|
562
|
+
readonly planId: Schema.String;
|
|
563
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
564
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
565
|
+
readonly message: Schema.String;
|
|
566
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
567
|
+
readonly runId: Schema.String;
|
|
568
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
569
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof NoMatchingWait, typeof InvalidInput, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized]>, typeof ControlAuth, never> | Rpc.Rpc<"Cancel", Schema.Struct<{
|
|
570
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
571
|
+
readonly runId: Schema.String;
|
|
572
|
+
readonly idempotencyKey: Schema.String;
|
|
573
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
574
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
575
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
576
|
+
readonly receiptId: Schema.String;
|
|
577
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
578
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
579
|
+
readonly hostId: Schema.String;
|
|
580
|
+
readonly pid: Schema.Number;
|
|
581
|
+
}>>;
|
|
582
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
583
|
+
readonly receiptId: Schema.String;
|
|
584
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
585
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
586
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
587
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
588
|
+
readonly receiptId: Schema.String;
|
|
589
|
+
readonly planId: Schema.String;
|
|
590
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
591
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
592
|
+
readonly message: Schema.String;
|
|
593
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
594
|
+
readonly runId: Schema.String;
|
|
595
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
596
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof ClaimLost, typeof InvalidInput, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized]>, typeof ControlAuth, never> | Rpc.Rpc<"Resume", Schema.Struct<{
|
|
597
|
+
readonly allowCodeDrift: Schema.optional<Schema.Boolean>;
|
|
598
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
599
|
+
readonly runId: Schema.String;
|
|
600
|
+
readonly idempotencyKey: Schema.String;
|
|
601
|
+
}>, Schema.Union<readonly [Schema.TaggedStruct<"Accepted", {
|
|
602
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
603
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
604
|
+
readonly receiptId: Schema.String;
|
|
605
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
606
|
+
readonly handedTo: Schema.optional<Schema.Struct<{
|
|
607
|
+
readonly hostId: Schema.String;
|
|
608
|
+
readonly pid: Schema.Number;
|
|
609
|
+
}>>;
|
|
610
|
+
}>, Schema.TaggedStruct<"AlreadyApplied", {
|
|
611
|
+
readonly receiptId: Schema.String;
|
|
612
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
613
|
+
readonly inputConsumed: Schema.optional<Schema.Boolean>;
|
|
614
|
+
readonly inputBody: Schema.optional<Schema.String>;
|
|
615
|
+
}>, Schema.TaggedStruct<"Parked", {
|
|
616
|
+
readonly receiptId: Schema.String;
|
|
617
|
+
readonly planId: Schema.String;
|
|
618
|
+
readonly status: Schema.Literal<"waiting-approval">;
|
|
619
|
+
}>, Schema.TaggedStruct<"Conflict", {
|
|
620
|
+
readonly message: Schema.String;
|
|
621
|
+
}>, Schema.TaggedStruct<"Terminal", {
|
|
622
|
+
readonly runId: Schema.String;
|
|
623
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
624
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof ClaimLost, typeof CodeDrift, typeof InvalidInput, typeof PersistenceError, typeof Unavailable, typeof TransportError, typeof Unauthorized]>, typeof ControlAuth, never> | Rpc.Rpc<"List", Schema.Union<readonly [Schema.TaggedStruct<"executions", {
|
|
625
|
+
readonly runId: Schema.String;
|
|
626
|
+
readonly executionIds: Schema.$Array<Schema.NonEmptyString>;
|
|
627
|
+
}>, Schema.TaggedStruct<"flows", {
|
|
628
|
+
readonly filters: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
629
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
630
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
631
|
+
}>, Schema.TaggedStruct<"runs", {
|
|
632
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
633
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
634
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
635
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>>;
|
|
636
|
+
readonly terminal: Schema.optional<Schema.Boolean>;
|
|
637
|
+
readonly principalId: Schema.optional<Schema.String>;
|
|
638
|
+
readonly parentRunId: Schema.optional<Schema.String>;
|
|
639
|
+
readonly lineageId: Schema.optional<Schema.String>;
|
|
640
|
+
readonly since: Schema.optional<Schema.Number>;
|
|
641
|
+
readonly until: Schema.optional<Schema.Number>;
|
|
642
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
643
|
+
}>>;
|
|
644
|
+
readonly order: Schema.optional<Schema.Literals<readonly ["newest", "oldest"]>>;
|
|
645
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
646
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
647
|
+
}>, Schema.TaggedStruct<"triggers", {
|
|
648
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
649
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
650
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
651
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
652
|
+
}>>;
|
|
653
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
654
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
655
|
+
}>, Schema.TaggedStruct<"fires", {
|
|
656
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
657
|
+
readonly triggerId: Schema.optional<Schema.String>;
|
|
658
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
659
|
+
readonly outcome: Schema.optional<Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>>;
|
|
660
|
+
}>>;
|
|
661
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
662
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
663
|
+
}>, Schema.TaggedStruct<"plans", {
|
|
664
|
+
readonly filters: Schema.optional<Schema.Struct<{
|
|
665
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
666
|
+
readonly decision: Schema.optional<Schema.Literals<readonly ["pending", "approved", "denied"]>>;
|
|
667
|
+
}>>;
|
|
668
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
669
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
670
|
+
}>]>, Schema.Union<readonly [Schema.TaggedStruct<"executions", {
|
|
671
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
672
|
+
readonly revision: Schema.NullOr<Schema.Int>;
|
|
673
|
+
readonly items: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Observed", {
|
|
674
|
+
readonly executionId: Schema.String;
|
|
675
|
+
readonly source: Schema.String;
|
|
676
|
+
readonly revision: Schema.Int;
|
|
677
|
+
readonly observation: Schema.Struct<{
|
|
678
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
679
|
+
readonly flowName: Schema.NonEmptyString;
|
|
680
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
681
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
682
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
683
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
684
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
685
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
686
|
+
readonly roundOrdinal: Schema.Int;
|
|
687
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
688
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
689
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
690
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
691
|
+
readonly reason: Schema.NonEmptyString;
|
|
692
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
693
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
694
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
695
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
696
|
+
}>>;
|
|
697
|
+
}>;
|
|
698
|
+
}>, Schema.TaggedStruct<"Missing", {
|
|
699
|
+
readonly executionId: Schema.String;
|
|
700
|
+
readonly source: Schema.String;
|
|
701
|
+
readonly revision: Schema.Int;
|
|
702
|
+
readonly deleted: Schema.Boolean;
|
|
703
|
+
}>, Schema.TaggedStruct<"Unavailable", {
|
|
704
|
+
readonly executionId: Schema.String;
|
|
705
|
+
readonly reason: Schema.Literals<readonly ["unsupported", "outside-run", "ancestry-unavailable"]>;
|
|
706
|
+
}>]>>;
|
|
707
|
+
readonly nextCursor: Schema.optional<Schema.Never>;
|
|
708
|
+
}>, Schema.TaggedStruct<"flows", {
|
|
709
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
710
|
+
readonly flowId: Schema.String;
|
|
711
|
+
readonly description: Schema.String;
|
|
712
|
+
readonly inputSchema: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
713
|
+
}>>;
|
|
714
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof import("@smthrs/registry/Descriptor").DiscoveryWarning>>;
|
|
715
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
716
|
+
}>, Schema.TaggedStruct<"runs", {
|
|
717
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
718
|
+
readonly executionObservation: Schema.optional<Schema.Literals<readonly ["observed", "missing"]>>;
|
|
719
|
+
readonly executionView: Schema.optional<Schema.Struct<{
|
|
720
|
+
readonly root: Schema.Struct<{
|
|
721
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
722
|
+
readonly flowName: Schema.NonEmptyString;
|
|
723
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
724
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
725
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
726
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
727
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
728
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
729
|
+
readonly roundOrdinal: Schema.Int;
|
|
730
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
731
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
732
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
733
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
734
|
+
readonly reason: Schema.NonEmptyString;
|
|
735
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
736
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
737
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
738
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
739
|
+
}>>;
|
|
740
|
+
}>;
|
|
741
|
+
readonly current: Schema.Struct<{
|
|
742
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
743
|
+
readonly flowName: Schema.NonEmptyString;
|
|
744
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
745
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
746
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
747
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
748
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
749
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
750
|
+
readonly roundOrdinal: Schema.Int;
|
|
751
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
752
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
753
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
754
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
755
|
+
readonly reason: Schema.NonEmptyString;
|
|
756
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
757
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
758
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
759
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
760
|
+
}>>;
|
|
761
|
+
}>;
|
|
762
|
+
readonly humanWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
763
|
+
readonly executionId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
764
|
+
readonly flowName: Schema.NonEmptyString;
|
|
765
|
+
readonly status: Schema.Literals<readonly ["pending", "running", "suspended", "completed", "failed", "cancelled"]>;
|
|
766
|
+
readonly createdAtMs: Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">;
|
|
767
|
+
readonly startedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
768
|
+
readonly finishedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
769
|
+
readonly parentRunId: Schema.NullOr<Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">>;
|
|
770
|
+
readonly lineageId: Schema.brand<Schema.String, "@smthrs/journal/JournalEvent/RunId">;
|
|
771
|
+
readonly roundOrdinal: Schema.Int;
|
|
772
|
+
readonly cancelRequestedAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
773
|
+
readonly treeVersion: Schema.optional<Schema.Literal<1>>;
|
|
774
|
+
readonly parentPolicy: Schema.optional<Schema.Literals<readonly ["cancel", "detach"]>>;
|
|
775
|
+
readonly waiting: Schema.NullOr<Schema.Struct<{
|
|
776
|
+
readonly reason: Schema.NonEmptyString;
|
|
777
|
+
readonly wakeAtMs: Schema.NullOr<Schema.brand<Schema.Int, "@smthrs/journal/TimestampMs">>;
|
|
778
|
+
readonly tokenDigest: Schema.NullOr<Schema.NonEmptyString>;
|
|
779
|
+
readonly point: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
780
|
+
readonly request: Schema.optional<Schema.NullOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
781
|
+
}>>;
|
|
782
|
+
}>>>;
|
|
783
|
+
}>>;
|
|
784
|
+
readonly runId: Schema.String;
|
|
785
|
+
readonly flowId: Schema.String;
|
|
786
|
+
readonly status: Schema.Literals<readonly ["accepted", "running", "parked", "waiting-approval", "cancelled", "completed", "failed"]>;
|
|
787
|
+
readonly planId: Schema.optional<Schema.String>;
|
|
788
|
+
readonly planDigest: Schema.optional<Schema.String>;
|
|
789
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
790
|
+
readonly engineVersion: Schema.optional<Schema.String>;
|
|
791
|
+
readonly codeDrift: Schema.optional<Schema.Struct<{
|
|
792
|
+
readonly recorded: Schema.optional<Schema.String>;
|
|
793
|
+
readonly current: Schema.optional<Schema.String>;
|
|
794
|
+
readonly recordedEngine: Schema.optional<Schema.String>;
|
|
795
|
+
readonly currentEngine: Schema.optional<Schema.String>;
|
|
796
|
+
}>>;
|
|
797
|
+
readonly ownerId: Schema.optional<Schema.String>;
|
|
798
|
+
readonly launchedBy: Schema.optional<Schema.Struct<{
|
|
799
|
+
readonly id: Schema.String;
|
|
800
|
+
readonly kind: Schema.String;
|
|
801
|
+
}>>;
|
|
802
|
+
readonly parentRunId: Schema.optional<Schema.String>;
|
|
803
|
+
readonly lineageId: Schema.optional<Schema.String>;
|
|
804
|
+
readonly roundOrdinal: Schema.optional<Schema.Number>;
|
|
805
|
+
readonly origin: Schema.optional<Schema.Literals<readonly ["child", "fork", "continuation"]>>;
|
|
806
|
+
readonly waitingReason: Schema.optional<Schema.String>;
|
|
807
|
+
readonly steering: Schema.optional<Schema.Struct<{
|
|
808
|
+
readonly pending: Schema.Number;
|
|
809
|
+
}>>;
|
|
810
|
+
readonly pendingResume: Schema.optional<Schema.Number>;
|
|
811
|
+
readonly parkedBy: Schema.optional<Schema.String>;
|
|
812
|
+
readonly cancellation: Schema.optional<Schema.Struct<{
|
|
813
|
+
readonly requestedAt: Schema.Number;
|
|
814
|
+
readonly source: Schema.Literals<readonly ["control", "engine", "cascade"]>;
|
|
815
|
+
readonly principal: Schema.optional<Schema.Struct<{
|
|
816
|
+
readonly id: Schema.String;
|
|
817
|
+
readonly kind: Schema.String;
|
|
818
|
+
readonly stampedAt: Schema.Number;
|
|
819
|
+
}>>;
|
|
820
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
821
|
+
readonly cascadedFrom: Schema.optional<Schema.String>;
|
|
822
|
+
}>>;
|
|
823
|
+
readonly pendingWaits: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
824
|
+
readonly runId: Schema.String;
|
|
825
|
+
readonly flowId: Schema.optional<Schema.String>;
|
|
826
|
+
readonly reason: Schema.String;
|
|
827
|
+
readonly token: Schema.String;
|
|
828
|
+
readonly tokenDigest: Schema.optional<Schema.String>;
|
|
829
|
+
readonly name: Schema.optional<Schema.String>;
|
|
830
|
+
readonly attempt: Schema.optional<Schema.Number>;
|
|
831
|
+
readonly request: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
832
|
+
readonly createdAt: Schema.Number;
|
|
833
|
+
}>>>;
|
|
834
|
+
readonly deadlineAt: Schema.optional<Schema.Number>;
|
|
835
|
+
readonly createdAt: Schema.Number;
|
|
836
|
+
readonly updatedAt: Schema.Number;
|
|
837
|
+
}>>;
|
|
838
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
839
|
+
}>, Schema.TaggedStruct<"triggers", {
|
|
840
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
841
|
+
readonly triggerId: Schema.String;
|
|
842
|
+
readonly flowId: Schema.String;
|
|
843
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
844
|
+
readonly cron: Schema.String;
|
|
845
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
846
|
+
readonly overlap: Schema.Literals<readonly ["skip", "buffer-one", "supersede"]>;
|
|
847
|
+
readonly catchUp: Schema.Literals<readonly ["none", "one", "all"]>;
|
|
848
|
+
readonly maxCatchUp: Schema.optional<Schema.Number>;
|
|
849
|
+
readonly enabled: Schema.Boolean;
|
|
850
|
+
readonly revision: Schema.Number;
|
|
851
|
+
readonly lastFiredAtMs: Schema.optional<Schema.Number>;
|
|
852
|
+
readonly pendingAtMs: Schema.optional<Schema.Number>;
|
|
853
|
+
readonly activeRunId: Schema.optional<Schema.String>;
|
|
854
|
+
readonly nextOccurrencesMs: Schema.$Array<Schema.Number>;
|
|
855
|
+
readonly schedulerLastTickMs: Schema.optional<Schema.Number>;
|
|
856
|
+
}>>;
|
|
857
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
858
|
+
}>, Schema.TaggedStruct<"fires", {
|
|
859
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
860
|
+
readonly triggerId: Schema.String;
|
|
861
|
+
readonly occurrenceAtMs: Schema.Number;
|
|
862
|
+
readonly outcome: Schema.NullOr<Schema.Literals<readonly ["launched", "completed", "skipped", "buffered", "superseded", "failed"]>>;
|
|
863
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
864
|
+
readonly error: Schema.optional<Schema.String>;
|
|
865
|
+
readonly waiting: Schema.optional<Schema.Literal<"approval">>;
|
|
866
|
+
}>>;
|
|
867
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
868
|
+
}>, Schema.TaggedStruct<"plans", {
|
|
869
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
870
|
+
readonly card: Schema.Struct<{
|
|
871
|
+
readonly planId: Schema.String;
|
|
872
|
+
readonly flowId: Schema.String;
|
|
873
|
+
readonly digest: Schema.String;
|
|
874
|
+
readonly inputSummary: Schema.String;
|
|
875
|
+
readonly warnings: Schema.optional<Schema.$Array<typeof import("@smthrs/registry/Descriptor").DiscoveryWarning>>;
|
|
876
|
+
readonly envelope: Schema.Struct<{
|
|
877
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
878
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
879
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
880
|
+
readonly budget: Schema.Struct<{
|
|
881
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
882
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
883
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
884
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
885
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
886
|
+
}>;
|
|
887
|
+
readonly host: Schema.optional<Schema.String>;
|
|
888
|
+
}>;
|
|
889
|
+
readonly deployClass: Schema.Boolean;
|
|
890
|
+
readonly executionDigest: Schema.optional<Schema.String>;
|
|
891
|
+
readonly plan: Schema.optional<Schema.Struct<{
|
|
892
|
+
readonly planId: Schema.NonEmptyString;
|
|
893
|
+
readonly flow: Schema.NonEmptyString;
|
|
894
|
+
readonly generation: Schema.Int;
|
|
895
|
+
readonly baseDigest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
896
|
+
readonly digest: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
897
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
898
|
+
readonly id: Schema.NonEmptyString;
|
|
899
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
900
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
901
|
+
readonly material: Schema.Struct<{
|
|
902
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
903
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
904
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
905
|
+
readonly body: Schema.Unknown;
|
|
906
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
907
|
+
readonly value: Schema.Unknown;
|
|
908
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
909
|
+
readonly from: Schema.NonEmptyString;
|
|
910
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
911
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
912
|
+
readonly from: Schema.NonEmptyString;
|
|
913
|
+
}>]>>;
|
|
914
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
915
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
916
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
917
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
918
|
+
}>;
|
|
919
|
+
readonly effects: Schema.Struct<{
|
|
920
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
921
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
922
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
923
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
924
|
+
readonly name: Schema.NonEmptyString;
|
|
925
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
926
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
927
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
928
|
+
}>]>>;
|
|
929
|
+
}>]>>;
|
|
930
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
931
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
932
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
933
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
934
|
+
readonly path: Schema.NonEmptyString;
|
|
935
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
936
|
+
readonly name: Schema.NonEmptyString;
|
|
937
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
938
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
939
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
940
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
941
|
+
readonly path: Schema.NonEmptyString;
|
|
942
|
+
}>]>>;
|
|
943
|
+
}>]>>;
|
|
944
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
945
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
946
|
+
}>;
|
|
947
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
948
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
949
|
+
readonly with: Schema.NonEmptyString;
|
|
950
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
951
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
952
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
953
|
+
}>>;
|
|
954
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
955
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
956
|
+
readonly priority: Schema.Int;
|
|
957
|
+
readonly generation: Schema.Int;
|
|
958
|
+
}>>;
|
|
959
|
+
}>>;
|
|
960
|
+
readonly nodes: Schema.$Array<Schema.Struct<{
|
|
961
|
+
readonly status: Schema.Literals<readonly ["cached", "run"]>;
|
|
962
|
+
readonly id: Schema.NonEmptyString;
|
|
963
|
+
readonly kind: Schema.Literals<readonly ["step", "agent", "merge"]>;
|
|
964
|
+
readonly key: Schema.brand<Schema.String, "@smthrs/keys/Key">;
|
|
965
|
+
readonly material: Schema.Struct<{
|
|
966
|
+
readonly version: Schema.Literal<"flows/key-material/v2">;
|
|
967
|
+
readonly kind: Schema.Literals<readonly ["sealed", "compensable", "irreversible"]>;
|
|
968
|
+
readonly nondeterministic: Schema.optional<Schema.Literal<true>>;
|
|
969
|
+
readonly body: Schema.Unknown;
|
|
970
|
+
readonly inputs: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"Literal", {
|
|
971
|
+
readonly value: Schema.Unknown;
|
|
972
|
+
}>, Schema.TaggedStruct<"Ref", {
|
|
973
|
+
readonly from: Schema.NonEmptyString;
|
|
974
|
+
readonly path: Schema.$Array<Schema.String>;
|
|
975
|
+
}>, Schema.TaggedStruct<"Pending", {
|
|
976
|
+
readonly from: Schema.NonEmptyString;
|
|
977
|
+
}>]>>;
|
|
978
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
979
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
980
|
+
readonly effects: Schema.optional<Schema.Unknown>;
|
|
981
|
+
readonly placement: Schema.optional<Schema.Unknown>;
|
|
982
|
+
}>;
|
|
983
|
+
readonly effects: Schema.Struct<{
|
|
984
|
+
readonly reads: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
985
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
986
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
987
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
988
|
+
readonly name: Schema.NonEmptyString;
|
|
989
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
990
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
991
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
992
|
+
}>]>>;
|
|
993
|
+
}>]>>;
|
|
994
|
+
readonly writes: Schema.$Array<Schema.Union<readonly [Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
995
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
996
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
997
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
998
|
+
readonly path: Schema.NonEmptyString;
|
|
999
|
+
}>]>, Schema.TaggedStruct<"Filegroup", {
|
|
1000
|
+
readonly name: Schema.NonEmptyString;
|
|
1001
|
+
readonly entries: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.TaggedStruct<"Glob", {
|
|
1002
|
+
readonly include: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1003
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1004
|
+
}>, Schema.TaggedStruct<"TreeArtifact", {
|
|
1005
|
+
readonly path: Schema.NonEmptyString;
|
|
1006
|
+
}>]>>;
|
|
1007
|
+
}>]>>;
|
|
1008
|
+
readonly removes: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1009
|
+
readonly boundaryMode: Schema.Literals<readonly ["hard", "expected"]>;
|
|
1010
|
+
}>;
|
|
1011
|
+
readonly dependsOn: Schema.$Array<Schema.NonEmptyString>;
|
|
1012
|
+
readonly conflicts: Schema.$Array<Schema.Struct<{
|
|
1013
|
+
readonly with: Schema.NonEmptyString;
|
|
1014
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
1015
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1016
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1017
|
+
}>>;
|
|
1018
|
+
readonly strategy: Schema.Literals<readonly ["serialize", "lane", "fail"]>;
|
|
1019
|
+
readonly runtime: Schema.Literals<readonly ["delay-rebase", "stop-merge"]>;
|
|
1020
|
+
readonly priority: Schema.Int;
|
|
1021
|
+
readonly generation: Schema.Int;
|
|
1022
|
+
}>>;
|
|
1023
|
+
readonly graph: Schema.optional<Schema.Struct<{
|
|
1024
|
+
readonly edges: Schema.$Array<Schema.Struct<{
|
|
1025
|
+
readonly from: Schema.NonEmptyString;
|
|
1026
|
+
readonly to: Schema.NonEmptyString;
|
|
1027
|
+
readonly reason: Schema.Literals<readonly ["value", "continuation", "failure", "conflict", "lane-merge"]>;
|
|
1028
|
+
}>>;
|
|
1029
|
+
readonly nodes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1030
|
+
readonly id: Schema.NonEmptyString;
|
|
1031
|
+
readonly declaredAt: Schema.optionalKey<Schema.Struct<{
|
|
1032
|
+
readonly path: Schema.NonEmptyString;
|
|
1033
|
+
readonly line: Schema.Int;
|
|
1034
|
+
}>>;
|
|
1035
|
+
}>>>;
|
|
1036
|
+
readonly sourceRevision: Schema.optional<Schema.NonEmptyString>;
|
|
1037
|
+
}>>;
|
|
1038
|
+
readonly approval: Schema.Struct<{
|
|
1039
|
+
readonly target: Schema.Union<readonly [Schema.TaggedStruct<"Plan", {
|
|
1040
|
+
readonly planId: Schema.String;
|
|
1041
|
+
readonly digest: Schema.String;
|
|
1042
|
+
readonly envelope: Schema.Struct<{
|
|
1043
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1044
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1045
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1046
|
+
readonly budget: Schema.Struct<{
|
|
1047
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1048
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1049
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1050
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1051
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1052
|
+
}>;
|
|
1053
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1054
|
+
}>;
|
|
1055
|
+
}>, Schema.TaggedStruct<"Node", {
|
|
1056
|
+
readonly runId: Schema.String;
|
|
1057
|
+
readonly requestId: Schema.String;
|
|
1058
|
+
readonly digest: Schema.String;
|
|
1059
|
+
readonly envelope: Schema.Struct<{
|
|
1060
|
+
readonly capabilities: Schema.$Array<Schema.String>;
|
|
1061
|
+
readonly hostImports: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1062
|
+
readonly flows: Schema.$Array<Schema.String>;
|
|
1063
|
+
readonly budget: Schema.Struct<{
|
|
1064
|
+
readonly tokens: Schema.optional<Schema.Number>;
|
|
1065
|
+
readonly milliseconds: Schema.optional<Schema.Number>;
|
|
1066
|
+
readonly usd: Schema.optional<Schema.Number>;
|
|
1067
|
+
readonly onExceeded: Schema.optional<Schema.Literals<readonly ["fail", "warn", "skip-remaining", "park"]>>;
|
|
1068
|
+
readonly deadline: Schema.optional<Schema.Int>;
|
|
1069
|
+
}>;
|
|
1070
|
+
readonly host: Schema.optional<Schema.String>;
|
|
1071
|
+
}>;
|
|
1072
|
+
}>]>;
|
|
1073
|
+
readonly scope: Schema.Literals<readonly ["once", "run", "remembered"]>;
|
|
1074
|
+
readonly idempotencyKey: Schema.String;
|
|
1075
|
+
}>;
|
|
1076
|
+
}>;
|
|
1077
|
+
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1078
|
+
readonly decision: Schema.Literals<readonly ["pending", "approved", "denied"]>;
|
|
1079
|
+
}>>;
|
|
1080
|
+
readonly nextCursor: Schema.optional<Schema.String>;
|
|
1081
|
+
}>]>, Schema.Union<readonly [typeof RunNotFound, typeof PlanNotFound, typeof PlanDenied, typeof FlowNotFound, typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof ClaimLost, typeof CodeDrift, typeof AlreadyResolved, typeof InvalidInput, typeof Unauthorized, typeof Unavailable, typeof TransportError, typeof PersistenceError, typeof LaunchFailed, typeof NoMatchingWait, typeof import("./ControlError.ts").CredentialConflict, typeof NotificationError]>, typeof ControlAuth, never> | Rpc.Rpc<"Watch", Schema.Struct<{
|
|
1082
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1083
|
+
readonly afterSequence: Schema.optional<Schema.Number>;
|
|
1084
|
+
readonly afterCursor: Schema.optional<Schema.Struct<{
|
|
1085
|
+
readonly sequence: Schema.Int;
|
|
1086
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
1087
|
+
}>>;
|
|
1088
|
+
readonly follow: Schema.optional<Schema.Boolean>;
|
|
1089
|
+
}>, import("effect/unstable/rpc/RpcSchema").Stream<Schema.Struct<{
|
|
1090
|
+
readonly cursor: Schema.optional<Schema.Struct<{
|
|
1091
|
+
readonly sequence: Schema.Int;
|
|
1092
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
1093
|
+
}>>;
|
|
1094
|
+
readonly sequence: Schema.Number;
|
|
1095
|
+
readonly kind: Schema.String;
|
|
1096
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
1097
|
+
readonly occurredAt: Schema.Number;
|
|
1098
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1099
|
+
}>, Schema.Union<readonly [typeof RunNotFound, typeof PlanNotFound, typeof PlanDenied, typeof FlowNotFound, typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof ClaimLost, typeof CodeDrift, typeof AlreadyResolved, typeof InvalidInput, typeof Unauthorized, typeof Unavailable, typeof TransportError, typeof PersistenceError, typeof LaunchFailed, typeof NoMatchingWait, typeof import("./ControlError.ts").CredentialConflict, typeof NotificationError]>>, Schema.Never, typeof ControlAuth, never>>;
|
|
1100
|
+
/**
|
|
1101
|
+
* The call a boundary is authenticating, when it knows one: the procedure's
|
|
1102
|
+
* tag and the payload it was sent. An edge authenticating a socket upgrade
|
|
1103
|
+
* knows no call and passes none.
|
|
1104
|
+
*
|
|
1105
|
+
* @category models
|
|
1106
|
+
* @since 1.0.0
|
|
1107
|
+
*/
|
|
1108
|
+
export interface Call {
|
|
1109
|
+
readonly rpc: string;
|
|
1110
|
+
readonly payload: unknown;
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Header authenticator used by the control RPC boundary.
|
|
1114
|
+
*
|
|
1115
|
+
* `call` is present for an in-band RPC frame and absent at a transport edge.
|
|
1116
|
+
* An authenticator that grants everything ignores it; one that grants a
|
|
1117
|
+
* scope reads it, and admits an edge on the credential alone.
|
|
1118
|
+
*
|
|
1119
|
+
* @category models
|
|
1120
|
+
* @since 0.1.0
|
|
1121
|
+
*/
|
|
1122
|
+
export interface Authenticator {
|
|
1123
|
+
readonly authenticate: (headers: Readonly<Record<string, string>>, call?: Call | undefined) => Effect.Effect<typeof Principal.Type, Unauthorized>;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Configuration for the single-token bearer authenticator.
|
|
1127
|
+
*
|
|
1128
|
+
* Every request carrying the configured token receives the same principal.
|
|
1129
|
+
* This is the intentionally small alpha trust boundary, not a per-user
|
|
1130
|
+
* authorization system.
|
|
1131
|
+
*
|
|
1132
|
+
* @category models
|
|
1133
|
+
* @since 0.1.0
|
|
1134
|
+
*/
|
|
1135
|
+
export interface BearerAuthOptions {
|
|
1136
|
+
readonly token: string;
|
|
1137
|
+
readonly principal: Omit<typeof Principal.Type, "stampedAt">;
|
|
1138
|
+
readonly now?: (() => number) | undefined;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* The bearer credential a request carries, or `undefined` when its
|
|
1142
|
+
* `Authorization` header is absent or is not a well-formed bearer scheme.
|
|
1143
|
+
*
|
|
1144
|
+
* @category getters
|
|
1145
|
+
* @since 1.0.0
|
|
1146
|
+
*/
|
|
1147
|
+
export declare const bearerCredential: (headers: Readonly<Record<string, string>>) => string | undefined;
|
|
1148
|
+
/**
|
|
1149
|
+
* Authenticates one shared bearer token and stamps its server-owned principal.
|
|
1150
|
+
* Missing, malformed, empty, and incorrect credentials all fail closed with
|
|
1151
|
+
* the same `Unauthorized` response.
|
|
1152
|
+
*
|
|
1153
|
+
* @category constructors
|
|
1154
|
+
* @since 0.1.0
|
|
1155
|
+
*/
|
|
1156
|
+
export declare const bearerAuthenticator: (options: BearerAuthOptions) => Authenticator;
|
|
1157
|
+
/**
|
|
1158
|
+
* The first authenticator to accept a request answers for all of them. Each
|
|
1159
|
+
* is asked in order, and a request none accepts fails with the last refusal,
|
|
1160
|
+
* or with the plain `Unauthorized` when there is nothing to ask.
|
|
1161
|
+
*
|
|
1162
|
+
* @category constructors
|
|
1163
|
+
* @since 1.0.0
|
|
1164
|
+
*/
|
|
1165
|
+
export declare const anyAuthenticator: (authenticators: ReadonlyArray<Authenticator>) => Authenticator;
|
|
1166
|
+
/**
|
|
1167
|
+
* Options for {@link layerAuth}.
|
|
1168
|
+
*
|
|
1169
|
+
* @category models
|
|
1170
|
+
* @since 1.0.0
|
|
1171
|
+
*/
|
|
1172
|
+
export interface AuthOptions {
|
|
1173
|
+
/**
|
|
1174
|
+
* The operators: the principals `List` and `Watch` show every run. Omitted,
|
|
1175
|
+
* every principal reads only the runs it launched. See {@link RunVisibility}.
|
|
1176
|
+
*/
|
|
1177
|
+
readonly seesAllRuns?: ((principal: typeof Principal.Type) => boolean) | undefined;
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Provides `ControlAuth` from a transport-header authenticator, telling it
|
|
1181
|
+
* which procedure and payload each frame carries. Each authenticated call
|
|
1182
|
+
* also receives the {@link RunVisibility} rule for the principal it stamps.
|
|
1183
|
+
*
|
|
1184
|
+
* @category layers
|
|
1185
|
+
* @since 0.1.0
|
|
1186
|
+
*/
|
|
1187
|
+
export declare const layerAuth: (authenticator: Authenticator, options?: AuthOptions) => Layer.Layer<ControlAuth, never, never>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Provides `ControlAuth` using one shared bearer token. Its one principal is
|
|
1190
|
+
* the operator and reads every run.
|
|
1191
|
+
*
|
|
1192
|
+
* @category layers
|
|
1193
|
+
* @since 0.1.0
|
|
1194
|
+
*/
|
|
1195
|
+
export declare const layerBearerAuth: (options: BearerAuthOptions) => Layer.Layer<ControlAuth, never, never>;
|
|
1196
|
+
/**
|
|
1197
|
+
* Permissive authentication middleware for tests and trusted in-process use.
|
|
1198
|
+
*
|
|
1199
|
+
* @category layers
|
|
1200
|
+
* @since 0.1.0
|
|
1201
|
+
*/
|
|
1202
|
+
export declare const layerNoopAuth: (principal?: typeof Principal.Type) => Layer.Layer<ControlAuth, never, never>;
|
|
1203
|
+
export {};
|
|
1204
|
+
//# sourceMappingURL=ControlRpcs.d.ts.map
|