@lostgradient/weft 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -4
- package/dist/cli/codegen-emit-dedup.d.ts +81 -0
- package/dist/cli/codegen-emit-dedup.js +45 -0
- package/dist/cli/codegen-emit-registry.d.ts +90 -0
- package/dist/cli/codegen-emit-registry.js +50 -0
- package/dist/cli/codegen-emit.d.ts +26 -39
- package/dist/cli/codegen-emit.js +4 -27
- package/dist/cli/codegen-validate.d.ts +49 -0
- package/dist/cli/codegen-validate.js +186 -0
- package/dist/cli/codegen.js +6 -87
- package/dist/cli/generated/operation-catalog.snapshot.json +287 -3
- package/dist/cli/generated/operation-client.generated.d.ts +324 -10
- package/dist/cli/generated/operation-client.generated.js +12 -0
- package/dist/cli/output.js +1 -1
- package/dist/cli/storage-factory.js +2 -0
- package/dist/cli/workflow-commands.js +2 -0
- package/dist/cli-main.js +1 -1
- package/dist/core/application-payload-digest.d.ts +42 -0
- package/dist/core/application-payload-digest.js +76 -0
- package/dist/core/application-primitive-abort.d.ts +50 -0
- package/dist/core/application-primitive-abort.js +40 -0
- package/dist/core/application-primitive-attempt-registry.d.ts +74 -0
- package/dist/core/application-primitive-attempt-registry.js +73 -0
- package/dist/core/application-primitive-codec.d.ts +36 -0
- package/dist/core/application-primitive-codec.js +56 -0
- package/dist/core/application-primitive-commit.d.ts +67 -0
- package/dist/core/application-primitive-commit.js +66 -0
- package/dist/core/application-primitive-guards.d.ts +62 -0
- package/dist/core/application-primitive-guards.js +89 -0
- package/dist/core/application-primitive-payload.d.ts +29 -0
- package/dist/core/application-primitive-payload.js +65 -0
- package/dist/core/application-primitive-timing.d.ts +18 -0
- package/dist/core/application-primitive-timing.js +22 -0
- package/dist/core/atomic-state.js +2 -0
- package/dist/core/catalog/codec.d.ts +40 -0
- package/dist/core/catalog/codec.js +45 -0
- package/dist/core/catalog/errors.d.ts +104 -0
- package/dist/core/catalog/errors.js +41 -0
- package/dist/core/catalog/index.d.ts +25 -0
- package/dist/core/catalog/index.js +15 -0
- package/dist/core/catalog/reference-counts.d.ts +105 -0
- package/dist/core/catalog/reference-counts.js +28 -0
- package/dist/core/catalog/removal.d.ts +52 -0
- package/dist/core/catalog/removal.js +14 -0
- package/dist/core/catalog/storage-io.d.ts +78 -0
- package/dist/core/catalog/storage-io.js +106 -0
- package/dist/core/catalog/types.d.ts +108 -0
- package/dist/core/catalog/types.js +0 -0
- package/dist/core/catalog/workflow-catalog.d.ts +165 -0
- package/dist/core/catalog/workflow-catalog.js +198 -0
- package/dist/core/compare-codepoint.d.ts +13 -0
- package/dist/core/compare-codepoint.js +7 -0
- package/dist/core/compression.js +2 -0
- package/dist/core/context/attributes.d.ts +1 -1
- package/dist/core/context/durable-operations.d.ts +2 -2
- package/dist/core/context/index.js +5 -3
- package/dist/core/context/state-namespace.d.ts +1 -1
- package/dist/core/contract/build.d.ts +64 -0
- package/dist/core/contract/build.js +99 -0
- package/dist/core/contract/compatibility.d.ts +187 -0
- package/dist/core/contract/compatibility.js +37 -0
- package/dist/core/contract/failure.d.ts +64 -0
- package/dist/core/contract/failure.js +4 -0
- package/dist/core/contract/hash.d.ts +92 -0
- package/dist/core/contract/hash.js +34 -0
- package/dist/core/contract/index.d.ts +21 -0
- package/dist/core/contract/index.js +22 -0
- package/dist/core/contract/limits.d.ts +74 -0
- package/dist/core/contract/limits.js +1 -0
- package/dist/core/contract/manifest-parse-schema.d.ts +37 -0
- package/dist/core/contract/manifest-parse-schema.js +106 -0
- package/dist/core/contract/manifest-parse.d.ts +76 -0
- package/dist/core/contract/manifest-parse.js +189 -0
- package/dist/core/contract/manifest.d.ts +56 -0
- package/dist/core/contract/manifest.js +31 -0
- package/dist/core/contract/normalize.d.ts +97 -0
- package/dist/core/contract/normalize.js +127 -0
- package/dist/core/contract/revision.d.ts +29 -0
- package/dist/core/contract/revision.js +5 -0
- package/dist/core/contract/types.d.ts +274 -0
- package/dist/core/contract/types.js +1 -0
- package/dist/core/engine/catalog-activation.d.ts +40 -0
- package/dist/core/engine/catalog-activation.js +17 -0
- package/dist/core/engine/catalog-events.d.ts +36 -0
- package/dist/core/engine/catalog-events.js +15 -0
- package/dist/core/engine/catalog-readiness.d.ts +49 -0
- package/dist/core/engine/catalog-readiness.js +59 -0
- package/dist/core/engine/catalog-removal.d.ts +132 -0
- package/dist/core/engine/catalog-removal.js +70 -0
- package/dist/core/engine/construction.d.ts +1 -1
- package/dist/core/engine/construction.js +4 -2
- package/dist/core/engine/disposal.js +9 -0
- package/dist/core/engine/engine-workflows-namespace.d.ts +130 -0
- package/dist/core/engine/engine-workflows-namespace.js +49 -0
- package/dist/core/engine/finalizer-metadata.d.ts +22 -0
- package/dist/core/engine/finalizer-metadata.js +12 -0
- package/dist/core/engine/handle-result.js +2 -0
- package/dist/core/engine/index.d.ts +83 -0
- package/dist/core/engine/index.js +61 -0
- package/dist/core/engine/internals.d.ts +44 -1
- package/dist/core/engine/internals.js +6 -0
- package/dist/core/engine/lifecycle/start.js +3 -0
- package/dist/core/engine/registration.d.ts +76 -0
- package/dist/core/engine/registration.js +12 -6
- package/dist/core/engine/source-registration.d.ts +42 -0
- package/dist/core/engine/source-registration.js +36 -0
- package/dist/core/engine/source-resolution.d.ts +85 -0
- package/dist/core/engine/source-resolution.js +119 -0
- package/dist/core/engine/validation.js +2 -2
- package/dist/core/events/catalog-events.d.ts +117 -0
- package/dist/core/events/catalog-events.js +62 -0
- package/dist/core/events/event-map.d.ts +6 -0
- package/dist/core/events/index.d.ts +1 -0
- package/dist/core/events/index.js +1 -0
- package/dist/core/mailbox-admission.d.ts +26 -0
- package/dist/core/mailbox-admission.js +130 -0
- package/dist/core/mailbox-claims.d.ts +251 -0
- package/dist/core/mailbox-claims.js +0 -0
- package/dist/core/mailbox-codec.d.ts +32 -0
- package/dist/core/mailbox-codec.js +221 -0
- package/dist/core/mailbox-contract.d.ts +290 -0
- package/dist/core/mailbox-contract.js +0 -0
- package/dist/core/mailbox-delivery.d.ts +37 -0
- package/dist/core/mailbox-delivery.js +193 -0
- package/dist/core/mailbox-guards.d.ts +78 -0
- package/dist/core/mailbox-guards.js +58 -0
- package/dist/core/mailbox-index-codec.d.ts +41 -0
- package/dist/core/mailbox-index-codec.js +71 -0
- package/dist/core/mailbox-internals.d.ts +156 -0
- package/dist/core/mailbox-internals.js +154 -0
- package/dist/core/mailbox-maintenance.d.ts +29 -0
- package/dist/core/mailbox-maintenance.js +196 -0
- package/dist/core/mailbox-settlement.d.ts +69 -0
- package/dist/core/mailbox-settlement.js +206 -0
- package/dist/core/mailbox-storage.d.ts +117 -0
- package/dist/core/mailbox-storage.js +115 -0
- package/dist/core/mailbox-transition-helpers.d.ts +70 -0
- package/dist/core/mailbox-transition-helpers.js +43 -0
- package/dist/core/mailbox-transitions-recovery.d.ts +28 -0
- package/dist/core/mailbox-transitions-recovery.js +64 -0
- package/dist/core/mailbox-transitions.d.ts +138 -0
- package/dist/core/mailbox-transitions.js +180 -0
- package/dist/core/mailbox-types.d.ts +406 -0
- package/dist/core/mailbox-types.js +16 -0
- package/dist/core/mailbox-validation.d.ts +65 -0
- package/dist/core/mailbox-validation.js +73 -0
- package/dist/core/mailbox-waits.d.ts +50 -0
- package/dist/core/mailbox-waits.js +97 -0
- package/dist/core/mailbox.d.ts +163 -0
- package/dist/core/mailbox.js +211 -0
- package/dist/core/outbox-claims.d.ts +307 -0
- package/dist/core/outbox-claims.js +0 -0
- package/dist/core/outbox-codec.d.ts +24 -0
- package/dist/core/outbox-codec.js +257 -0
- package/dist/core/outbox-contract.d.ts +346 -0
- package/dist/core/outbox-contract.js +0 -0
- package/dist/core/outbox-delivery.d.ts +34 -0
- package/dist/core/outbox-delivery.js +149 -0
- package/dist/core/outbox-drain.d.ts +29 -0
- package/dist/core/outbox-drain.js +158 -0
- package/dist/core/outbox-enqueue.d.ts +24 -0
- package/dist/core/outbox-enqueue.js +115 -0
- package/dist/core/outbox-guards.d.ts +76 -0
- package/dist/core/outbox-guards.js +60 -0
- package/dist/core/outbox-index-codec.d.ts +33 -0
- package/dist/core/outbox-index-codec.js +71 -0
- package/dist/core/outbox-internals.d.ts +99 -0
- package/dist/core/outbox-internals.js +159 -0
- package/dist/core/outbox-listing.d.ts +12 -0
- package/dist/core/outbox-listing.js +38 -0
- package/dist/core/outbox-maintenance.d.ts +28 -0
- package/dist/core/outbox-maintenance.js +191 -0
- package/dist/core/outbox-operations.d.ts +18 -0
- package/dist/core/outbox-operations.js +46 -0
- package/dist/core/outbox-runner.d.ts +30 -0
- package/dist/core/outbox-runner.js +217 -0
- package/dist/core/outbox-settlement.d.ts +57 -0
- package/dist/core/outbox-settlement.js +183 -0
- package/dist/core/outbox-storage.d.ts +107 -0
- package/dist/core/outbox-storage.js +127 -0
- package/dist/core/outbox-transition-helpers.d.ts +83 -0
- package/dist/core/outbox-transition-helpers.js +63 -0
- package/dist/core/outbox-transitions-recovery.d.ts +30 -0
- package/dist/core/outbox-transitions-recovery.js +42 -0
- package/dist/core/outbox-transitions.d.ts +145 -0
- package/dist/core/outbox-transitions.js +236 -0
- package/dist/core/outbox-types.d.ts +400 -0
- package/dist/core/outbox-types.js +20 -0
- package/dist/core/outbox-validation.d.ts +101 -0
- package/dist/core/outbox-validation.js +127 -0
- package/dist/core/outbox-waits.d.ts +39 -0
- package/dist/core/outbox-waits.js +88 -0
- package/dist/core/outbox.d.ts +156 -0
- package/dist/core/outbox.js +234 -0
- package/dist/core/registry-limits.d.ts +49 -0
- package/dist/core/registry-limits.js +10 -0
- package/dist/core/registry-schema-conversion.d.ts +20 -0
- package/dist/core/registry-schema-conversion.js +22 -0
- package/dist/core/registry-snapshot.d.ts +91 -42
- package/dist/core/registry-snapshot.js +39 -77
- package/dist/core/registry-workflow-contract-draft.d.ts +32 -0
- package/dist/core/registry-workflow-contract-draft.js +28 -0
- package/dist/core/registry-workflow-manifest.d.ts +122 -0
- package/dist/core/registry-workflow-manifest.js +92 -0
- package/dist/core/source/errors.d.ts +55 -0
- package/dist/core/source/errors.js +13 -0
- package/dist/core/source/index.d.ts +19 -0
- package/dist/core/source/index.js +4 -0
- package/dist/core/source/resolvers.d.ts +45 -0
- package/dist/core/source/resolvers.js +9 -0
- package/dist/core/source/types.d.ts +211 -0
- package/dist/core/source/types.js +0 -0
- package/dist/core/source/validate.d.ts +91 -0
- package/dist/core/source/validate.js +62 -0
- package/dist/core/source/workflow-source.d.ts +43 -0
- package/dist/core/source/workflow-source.js +16 -0
- package/dist/core/types/workflow-registries.d.ts +7 -0
- package/dist/core/types/workflow-registry.d.ts +12 -0
- package/dist/core/versioning.js +2 -0
- package/dist/core/weft-error.d.ts +1 -1
- package/dist/core/weft-error.js +9 -1
- package/dist/http.js +2 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +50 -0
- package/dist/indexeddb.js +1 -1
- package/dist/json-schema.js +3 -3
- package/dist/mcp/resources.js +2 -0
- package/dist/runtime/portable.d.ts +9 -1
- package/dist/server/fault-to-json-rpc.js +3 -1
- package/dist/server/handler/auth-context-principal.js +4 -0
- package/dist/server/json-rpc-http.js +2 -0
- package/dist/server/json-rpc-websocket.js +6 -4
- package/dist/server/operation-catalog/index.d.ts +1 -1
- package/dist/server/operation-catalog/pipeline-helpers.js +2 -0
- package/dist/server/operation-catalog/types.d.ts +17 -0
- package/dist/server/operation-fault.d.ts +3 -0
- package/dist/server/operation-fault.js +3 -1
- package/dist/server/operations/activate-workflow-revision.d.ts +30 -0
- package/dist/server/operations/activate-workflow-revision.js +69 -0
- package/dist/server/operations/fleet-events-subscription.js +1 -1
- package/dist/server/operations/fork-workflow.js +1 -1
- package/dist/server/operations/get-active-workflow-revision.d.ts +32 -0
- package/dist/server/operations/get-active-workflow-revision.js +46 -0
- package/dist/server/operations/get-catalog-diagnostics.d.ts +85 -0
- package/dist/server/operations/get-catalog-diagnostics.js +57 -0
- package/dist/server/operations/get-registry.js +17 -4
- package/dist/server/operations/get-workflow-revision.d.ts +25 -0
- package/dist/server/operations/get-workflow-revision.js +50 -0
- package/dist/server/operations/install-workflow-revision.d.ts +27 -0
- package/dist/server/operations/install-workflow-revision.js +46 -0
- package/dist/server/operations/list-workflow-revisions.d.ts +20 -0
- package/dist/server/operations/list-workflow-revisions.js +40 -0
- package/dist/server/operations/start-or-signal-workflow.js +1 -1
- package/dist/server/operations/start-workflow.js +1 -1
- package/dist/server/operations/static-registrations.js +36 -0
- package/dist/server/operations/storage.js +2 -2
- package/dist/server/operations/submit-review-decision.js +1 -1
- package/dist/server/operations/workflow-catalog-operation-helpers.d.ts +59 -0
- package/dist/server/operations/workflow-catalog-operation-helpers.js +135 -0
- package/dist/server/runtime/websocket-upgrade.js +2 -0
- package/dist/storage/bun-sql.js +49 -6
- package/dist/storage/catalog-keys.d.ts +45 -0
- package/dist/storage/catalog-keys.js +6 -0
- package/dist/storage/compressed-storage.js +1 -1
- package/dist/storage/derived-operations.js +1 -1
- package/dist/storage/index.d.ts +26 -1
- package/dist/storage/interface.d.ts +26 -1
- package/dist/storage/interface.js +1 -1
- package/dist/storage/key-encoding.d.ts +15 -0
- package/dist/storage/key-encoding.js +3 -0
- package/dist/storage/key-prefixes.d.ts +1 -1
- package/dist/storage/key-prefixes.js +15 -0
- package/dist/storage/lmdb.d.ts +26 -1
- package/dist/storage/lmdb.js +1 -1
- package/dist/storage/mailbox-keys.d.ts +80 -0
- package/dist/storage/mailbox-keys.js +14 -0
- package/dist/storage/memory.js +1 -1
- package/dist/storage/neon.js +2 -2
- package/dist/storage/node-sqlite-loader.d.ts +1 -1
- package/dist/storage/node-sqlite-loader.js +2 -2
- package/dist/storage/node-sqlite.js +51 -8
- package/dist/storage/outbox-keys.d.ts +77 -0
- package/dist/storage/outbox-keys.js +14 -0
- package/dist/storage/postgres.js +2 -2
- package/dist/storage/resolve.js +1 -1
- package/dist/storage/scoped-storage.js +1 -1
- package/dist/storage/storage-configuration.d.ts +6 -0
- package/dist/storage/testing.js +1 -1
- package/dist/storage/turso.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web-extension.js +1 -1
- package/dist/worker/manifest/registry-contract-builder.d.ts +21 -3
- package/dist/worker/manifest/registry-contract-builder.js +40 -31
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CatalogWeftClient, type WeftClientConnection } from '../operation-client-runtime.ts';
|
|
2
|
-
export declare const CATALOG_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.get", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.diagnostics", "weft.workers.drain", "weft.workers.list", "weft.workers.rejections", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
|
|
2
|
+
export declare const CATALOG_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.catalog.diagnostics", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.get", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.diagnostics", "weft.workers.drain", "weft.workers.list", "weft.workers.rejections", "weft.workers.resume", "weft.workflows.active.get", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.revisions.activate", "weft.workflows.revisions.get", "weft.workflows.revisions.install", "weft.workflows.revisions.list", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
|
|
3
3
|
export type CatalogOperationName = (typeof CATALOG_OPERATION_NAMES)[number];
|
|
4
|
-
export declare const CLIENT_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.diagnostics.deadletters.clear", "weft.tasks.get", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.diagnostics", "weft.workers.drain", "weft.workers.list", "weft.workers.rejections", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
|
|
4
|
+
export declare const CLIENT_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.catalog.diagnostics", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.diagnostics.deadletters.clear", "weft.tasks.get", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.diagnostics", "weft.workers.drain", "weft.workers.list", "weft.workers.rejections", "weft.workers.resume", "weft.workflows.active.get", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.revisions.activate", "weft.workflows.revisions.get", "weft.workflows.revisions.install", "weft.workflows.revisions.list", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
|
|
5
5
|
export type ClientOperationName = (typeof CLIENT_OPERATION_NAMES)[number];
|
|
6
6
|
export declare const CLIENT_REST_OPERATION_BINDINGS: {
|
|
7
7
|
readonly 'weft.tasks.diagnostics.deadletters.clear': {
|
|
@@ -19,6 +19,27 @@ export declare const CLIENT_REST_OPERATION_BINDINGS: {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
type SharedActivityContractHashArti_d7d91df4 = {
|
|
23
|
+
readonly activityContractHash?: string;
|
|
24
|
+
readonly artifactDigest?: string;
|
|
25
|
+
readonly buildId?: string;
|
|
26
|
+
readonly deploymentName?: string;
|
|
27
|
+
readonly workflowRevision?: string;
|
|
28
|
+
};
|
|
29
|
+
type SharedAffectedWorkersDeploymen_e4c61ae8 = {
|
|
30
|
+
readonly affectedWorkers: number;
|
|
31
|
+
readonly deploymentName: string;
|
|
32
|
+
readonly health: 'active' | 'draining' | 'drained';
|
|
33
|
+
readonly inFlight: number;
|
|
34
|
+
readonly target: 'deployment';
|
|
35
|
+
};
|
|
36
|
+
type SharedAffectedWorkersHealthInF_c3f6ebcc = {
|
|
37
|
+
readonly affectedWorkers: number;
|
|
38
|
+
readonly health: 'active' | 'draining' | 'drained';
|
|
39
|
+
readonly inFlight: number;
|
|
40
|
+
readonly target: 'worker';
|
|
41
|
+
readonly workerId: string;
|
|
42
|
+
};
|
|
22
43
|
type SharedAttributesBulkConcurrenc_0f0d07d6 = {
|
|
23
44
|
readonly attributes?: ReadonlyArray<SharedGtGteKey_e658e64c>;
|
|
24
45
|
readonly bulkConcurrency?: number;
|
|
@@ -55,6 +76,13 @@ type SharedAttributesCreatedAtExecu_47f8e20e = {
|
|
|
55
76
|
readonly type?: string;
|
|
56
77
|
readonly updatedAt?: SharedGtGteLt_d9a61361;
|
|
57
78
|
};
|
|
79
|
+
type SharedBackoffMultiplierInitial_64d024ea = {
|
|
80
|
+
readonly backoffMultiplier: number;
|
|
81
|
+
readonly initialBackoff: number | string;
|
|
82
|
+
readonly maxAttempts: number;
|
|
83
|
+
readonly maxBackoff: number | string;
|
|
84
|
+
readonly nonRetryableErrors?: ReadonlyArray<string>;
|
|
85
|
+
};
|
|
58
86
|
type SharedGtGteKey_e658e64c = {
|
|
59
87
|
readonly gt?: unknown;
|
|
60
88
|
readonly gte?: unknown;
|
|
@@ -106,6 +134,30 @@ export type ClientOperationTypes = {
|
|
|
106
134
|
};
|
|
107
135
|
readonly faults: never;
|
|
108
136
|
};
|
|
137
|
+
'weft.catalog.diagnostics': {
|
|
138
|
+
readonly input: {
|
|
139
|
+
readonly name: string;
|
|
140
|
+
readonly revision: string;
|
|
141
|
+
};
|
|
142
|
+
readonly output: {
|
|
143
|
+
readonly active: boolean;
|
|
144
|
+
readonly activeRevision?: string;
|
|
145
|
+
readonly installed: boolean;
|
|
146
|
+
readonly name: string;
|
|
147
|
+
readonly references: {
|
|
148
|
+
readonly activeExecutionRealms: number;
|
|
149
|
+
readonly inFlightStarts: number;
|
|
150
|
+
readonly nonTerminalRuns: number;
|
|
151
|
+
readonly pendingDispatches: number;
|
|
152
|
+
readonly pinnedSchedules: number;
|
|
153
|
+
readonly registeredDefinitions: number;
|
|
154
|
+
readonly retainedRecoveryRecords: number;
|
|
155
|
+
};
|
|
156
|
+
readonly removable: boolean;
|
|
157
|
+
readonly revision: string;
|
|
158
|
+
};
|
|
159
|
+
readonly faults: never;
|
|
160
|
+
};
|
|
109
161
|
'weft.recover.all': {
|
|
110
162
|
readonly input: {};
|
|
111
163
|
readonly output: {
|
|
@@ -290,9 +342,11 @@ export type ClientOperationTypes = {
|
|
|
290
342
|
'weft.system.registry': {
|
|
291
343
|
readonly input: {};
|
|
292
344
|
readonly output: {
|
|
345
|
+
readonly activeRevisions: unknown;
|
|
293
346
|
readonly activities: unknown;
|
|
294
|
-
readonly
|
|
295
|
-
readonly
|
|
347
|
+
readonly generatedAt: string;
|
|
348
|
+
readonly registryVersion: 2;
|
|
349
|
+
readonly workflows: ReadonlyArray<unknown>;
|
|
296
350
|
};
|
|
297
351
|
readonly faults: never;
|
|
298
352
|
};
|
|
@@ -391,7 +445,212 @@ export type ClientOperationTypes = {
|
|
|
391
445
|
readonly input: {
|
|
392
446
|
readonly operationId: string;
|
|
393
447
|
};
|
|
394
|
-
readonly output:
|
|
448
|
+
readonly output: {
|
|
449
|
+
readonly activityName: string;
|
|
450
|
+
readonly attempt: number;
|
|
451
|
+
readonly availableAt: number;
|
|
452
|
+
readonly createdAt: number;
|
|
453
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
454
|
+
readonly fairShareKey?: string;
|
|
455
|
+
readonly firstQueuedAt: number;
|
|
456
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
457
|
+
readonly lastDispatchedAt?: number;
|
|
458
|
+
readonly lastQueuedAt: number;
|
|
459
|
+
readonly lastRequeueReason?: string;
|
|
460
|
+
readonly operationId: string;
|
|
461
|
+
readonly priority?: number;
|
|
462
|
+
readonly queue: string;
|
|
463
|
+
readonly requeueCount: number;
|
|
464
|
+
readonly retryCount: number;
|
|
465
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
466
|
+
readonly scheduleToCloseDeadline?: number;
|
|
467
|
+
readonly startedAt?: number;
|
|
468
|
+
readonly state: 'queued';
|
|
469
|
+
readonly stickyWorkflowId?: string;
|
|
470
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
471
|
+
readonly workflowExecutionToken?: string;
|
|
472
|
+
readonly workflowId?: string;
|
|
473
|
+
readonly workflowType: string;
|
|
474
|
+
} | {
|
|
475
|
+
readonly activityName: string;
|
|
476
|
+
readonly attempt: number;
|
|
477
|
+
readonly createdAt: number;
|
|
478
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
479
|
+
readonly fairShareKey?: string;
|
|
480
|
+
readonly firstQueuedAt: number;
|
|
481
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
482
|
+
readonly lastHeartbeatAt: number;
|
|
483
|
+
readonly lastQueuedAt: number;
|
|
484
|
+
readonly lastRequeueReason?: string;
|
|
485
|
+
readonly leaseDeadline: number;
|
|
486
|
+
readonly operationId: string;
|
|
487
|
+
readonly priority?: number;
|
|
488
|
+
readonly queue: string;
|
|
489
|
+
readonly requeueCount: number;
|
|
490
|
+
readonly retryCount: number;
|
|
491
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
492
|
+
readonly scheduleToCloseDeadline?: number;
|
|
493
|
+
readonly startedAt: number;
|
|
494
|
+
readonly state: 'leased';
|
|
495
|
+
readonly stickyWorkflowId?: string;
|
|
496
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
497
|
+
readonly workflowExecutionToken?: string;
|
|
498
|
+
readonly workflowId?: string;
|
|
499
|
+
readonly workflowType: string;
|
|
500
|
+
} | {
|
|
501
|
+
readonly activityName: string;
|
|
502
|
+
readonly attempt: number;
|
|
503
|
+
readonly createdAt: number;
|
|
504
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
505
|
+
readonly fairShareKey?: string;
|
|
506
|
+
readonly firstQueuedAt: number;
|
|
507
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
508
|
+
readonly lastHeartbeatAt: number;
|
|
509
|
+
readonly lastQueuedAt: number;
|
|
510
|
+
readonly lastRequeueReason?: string;
|
|
511
|
+
readonly leaseDeadline: number;
|
|
512
|
+
readonly operationId: string;
|
|
513
|
+
readonly pendingStatus: 'completed' | 'failed';
|
|
514
|
+
readonly priority?: number;
|
|
515
|
+
readonly queue: string;
|
|
516
|
+
readonly requeueCount: number;
|
|
517
|
+
readonly resultDigest: string;
|
|
518
|
+
readonly retryCount: number;
|
|
519
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
520
|
+
readonly scheduleToCloseDeadline?: number;
|
|
521
|
+
readonly startedAt: number;
|
|
522
|
+
readonly state: 'completing';
|
|
523
|
+
readonly stickyWorkflowId?: string;
|
|
524
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
525
|
+
readonly workflowExecutionToken?: string;
|
|
526
|
+
readonly workflowId?: string;
|
|
527
|
+
readonly workflowType: string;
|
|
528
|
+
} | {
|
|
529
|
+
readonly activityName: string;
|
|
530
|
+
readonly attempt: number;
|
|
531
|
+
readonly cancellationReason: string;
|
|
532
|
+
readonly cancellationRequestedAt: number;
|
|
533
|
+
readonly createdAt: number;
|
|
534
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
535
|
+
readonly fairShareKey?: string;
|
|
536
|
+
readonly firstQueuedAt: number;
|
|
537
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
538
|
+
readonly lastHeartbeatAt: number;
|
|
539
|
+
readonly lastQueuedAt: number;
|
|
540
|
+
readonly lastRequeueReason?: string;
|
|
541
|
+
readonly leaseDeadline: number;
|
|
542
|
+
readonly operationId: string;
|
|
543
|
+
readonly priority?: number;
|
|
544
|
+
readonly queue: string;
|
|
545
|
+
readonly requeueCount: number;
|
|
546
|
+
readonly retryCount: number;
|
|
547
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
548
|
+
readonly scheduleToCloseDeadline?: number;
|
|
549
|
+
readonly startedAt: number;
|
|
550
|
+
readonly state: 'cancelling';
|
|
551
|
+
readonly stickyWorkflowId?: string;
|
|
552
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
553
|
+
readonly workflowExecutionToken?: string;
|
|
554
|
+
readonly workflowId?: string;
|
|
555
|
+
readonly workflowType: string;
|
|
556
|
+
} | {
|
|
557
|
+
readonly activityName: string;
|
|
558
|
+
readonly adopted: boolean;
|
|
559
|
+
readonly adoptedAt?: number;
|
|
560
|
+
readonly attempt: number;
|
|
561
|
+
readonly createdAt: number;
|
|
562
|
+
readonly disposition: 'resolved';
|
|
563
|
+
readonly error?: string;
|
|
564
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
565
|
+
readonly fairShareKey?: string;
|
|
566
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
567
|
+
readonly operationId: string;
|
|
568
|
+
readonly priority?: number;
|
|
569
|
+
readonly queue: string;
|
|
570
|
+
readonly resultDigest: string;
|
|
571
|
+
readonly resultStatus: 'completed' | 'failed';
|
|
572
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
573
|
+
readonly scheduleToCloseDeadline?: number;
|
|
574
|
+
readonly state: 'terminal';
|
|
575
|
+
readonly stickyWorkflowId?: string;
|
|
576
|
+
readonly terminalAt: number;
|
|
577
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
578
|
+
readonly workflowExecutionToken?: string;
|
|
579
|
+
readonly workflowId?: string;
|
|
580
|
+
readonly workflowType: string;
|
|
581
|
+
} | {
|
|
582
|
+
readonly activityName: string;
|
|
583
|
+
readonly adopted: boolean;
|
|
584
|
+
readonly adoptedAt?: number;
|
|
585
|
+
readonly attempt: number;
|
|
586
|
+
readonly cancellationReason: string;
|
|
587
|
+
readonly createdAt: number;
|
|
588
|
+
readonly disposition: 'cancelled';
|
|
589
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
590
|
+
readonly fairShareKey?: string;
|
|
591
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
592
|
+
readonly operationId: string;
|
|
593
|
+
readonly priority?: number;
|
|
594
|
+
readonly queue: string;
|
|
595
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
596
|
+
readonly scheduleToCloseDeadline?: number;
|
|
597
|
+
readonly state: 'terminal';
|
|
598
|
+
readonly stickyWorkflowId?: string;
|
|
599
|
+
readonly terminalAt: number;
|
|
600
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
601
|
+
readonly workflowExecutionToken?: string;
|
|
602
|
+
readonly workflowId?: string;
|
|
603
|
+
readonly workflowType: string;
|
|
604
|
+
} | {
|
|
605
|
+
readonly activityName: string;
|
|
606
|
+
readonly adopted: boolean;
|
|
607
|
+
readonly adoptedAt?: number;
|
|
608
|
+
readonly attempt: number;
|
|
609
|
+
readonly createdAt: number;
|
|
610
|
+
readonly disposition: 'retryExhausted';
|
|
611
|
+
readonly error: string;
|
|
612
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
613
|
+
readonly fairShareKey?: string;
|
|
614
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
615
|
+
readonly operationId: string;
|
|
616
|
+
readonly priority?: number;
|
|
617
|
+
readonly queue: string;
|
|
618
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
619
|
+
readonly scheduleToCloseDeadline?: number;
|
|
620
|
+
readonly state: 'terminal';
|
|
621
|
+
readonly stickyWorkflowId?: string;
|
|
622
|
+
readonly terminalAt: number;
|
|
623
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
624
|
+
readonly workflowExecutionToken?: string;
|
|
625
|
+
readonly workflowId?: string;
|
|
626
|
+
readonly workflowType: string;
|
|
627
|
+
} | {
|
|
628
|
+
readonly activityName: string;
|
|
629
|
+
readonly attempt: number;
|
|
630
|
+
readonly createdAt: number;
|
|
631
|
+
readonly deadLetteredAt: number;
|
|
632
|
+
readonly error?: string;
|
|
633
|
+
readonly executionRequirement?: SharedActivityContractHashArti_d7d91df4;
|
|
634
|
+
readonly fairShareKey?: string;
|
|
635
|
+
readonly headerKeys: ReadonlyArray<string>;
|
|
636
|
+
readonly lastRequeueReason?: string;
|
|
637
|
+
readonly operationId: string;
|
|
638
|
+
readonly pendingStatus: 'completed' | 'failed';
|
|
639
|
+
readonly persistenceFailureReason: string;
|
|
640
|
+
readonly priority?: number;
|
|
641
|
+
readonly queue: string;
|
|
642
|
+
readonly requeueCount: number;
|
|
643
|
+
readonly resultDigest: string;
|
|
644
|
+
readonly retryCount: number;
|
|
645
|
+
readonly retryPolicy?: SharedBackoffMultiplierInitial_64d024ea;
|
|
646
|
+
readonly scheduleToCloseDeadline?: number;
|
|
647
|
+
readonly state: 'deadLettered';
|
|
648
|
+
readonly stickyWorkflowId?: string;
|
|
649
|
+
readonly visibilityTimeoutMilliseconds: number;
|
|
650
|
+
readonly workflowExecutionToken?: string;
|
|
651
|
+
readonly workflowId?: string;
|
|
652
|
+
readonly workflowType: string;
|
|
653
|
+
};
|
|
395
654
|
readonly faults: 'NotFound';
|
|
396
655
|
};
|
|
397
656
|
'weft.updates.result.get': {
|
|
@@ -406,14 +665,14 @@ export type ClientOperationTypes = {
|
|
|
406
665
|
readonly deploymentName: string;
|
|
407
666
|
readonly reason?: string;
|
|
408
667
|
};
|
|
409
|
-
readonly output:
|
|
668
|
+
readonly output: SharedAffectedWorkersHealthInF_c3f6ebcc | SharedAffectedWorkersDeploymen_e4c61ae8;
|
|
410
669
|
readonly faults: never;
|
|
411
670
|
};
|
|
412
671
|
'weft.worker.deployments.resume': {
|
|
413
672
|
readonly input: {
|
|
414
673
|
readonly deploymentName: string;
|
|
415
674
|
};
|
|
416
|
-
readonly output:
|
|
675
|
+
readonly output: SharedAffectedWorkersHealthInF_c3f6ebcc | SharedAffectedWorkersDeploymen_e4c61ae8;
|
|
417
676
|
readonly faults: never;
|
|
418
677
|
};
|
|
419
678
|
'weft.workers.diagnostics': {
|
|
@@ -452,7 +711,7 @@ export type ClientOperationTypes = {
|
|
|
452
711
|
readonly reason?: string;
|
|
453
712
|
readonly workerId: string;
|
|
454
713
|
};
|
|
455
|
-
readonly output:
|
|
714
|
+
readonly output: SharedAffectedWorkersHealthInF_c3f6ebcc | SharedAffectedWorkersDeploymen_e4c61ae8;
|
|
456
715
|
readonly faults: 'NotFound';
|
|
457
716
|
};
|
|
458
717
|
'weft.workers.list': {
|
|
@@ -512,9 +771,16 @@ export type ClientOperationTypes = {
|
|
|
512
771
|
readonly input: {
|
|
513
772
|
readonly workerId: string;
|
|
514
773
|
};
|
|
515
|
-
readonly output:
|
|
774
|
+
readonly output: SharedAffectedWorkersHealthInF_c3f6ebcc | SharedAffectedWorkersDeploymen_e4c61ae8;
|
|
516
775
|
readonly faults: 'NotFound';
|
|
517
776
|
};
|
|
777
|
+
'weft.workflows.active.get': {
|
|
778
|
+
readonly input: {
|
|
779
|
+
readonly name: unknown;
|
|
780
|
+
};
|
|
781
|
+
readonly output: unknown;
|
|
782
|
+
readonly faults: 'InvalidParams' | 'NotFound';
|
|
783
|
+
};
|
|
518
784
|
'weft.workflows.activities.pending.list': {
|
|
519
785
|
readonly input: {
|
|
520
786
|
readonly cursor?: string;
|
|
@@ -667,7 +933,23 @@ export type ClientOperationTypes = {
|
|
|
667
933
|
readonly input: {
|
|
668
934
|
readonly workflowId: string;
|
|
669
935
|
};
|
|
670
|
-
readonly output:
|
|
936
|
+
readonly output: {
|
|
937
|
+
readonly attempts: number;
|
|
938
|
+
readonly status: 'pending';
|
|
939
|
+
} | {
|
|
940
|
+
readonly attempts: number;
|
|
941
|
+
readonly startedAt: number;
|
|
942
|
+
readonly status: 'running';
|
|
943
|
+
} | {
|
|
944
|
+
readonly attempts: number;
|
|
945
|
+
readonly completedAt: number;
|
|
946
|
+
readonly status: 'succeeded';
|
|
947
|
+
} | {
|
|
948
|
+
readonly attempts: number;
|
|
949
|
+
readonly error: string;
|
|
950
|
+
readonly failedAt: number;
|
|
951
|
+
readonly status: 'failed';
|
|
952
|
+
} | null;
|
|
671
953
|
readonly faults: never;
|
|
672
954
|
};
|
|
673
955
|
'weft.workflows.fork': {
|
|
@@ -746,6 +1028,38 @@ export type ClientOperationTypes = {
|
|
|
746
1028
|
};
|
|
747
1029
|
readonly faults: 'Conflict' | 'NotFound';
|
|
748
1030
|
};
|
|
1031
|
+
'weft.workflows.revisions.activate': {
|
|
1032
|
+
readonly input: {
|
|
1033
|
+
readonly expectedGeneration?: unknown;
|
|
1034
|
+
readonly name: unknown;
|
|
1035
|
+
readonly policy?: unknown;
|
|
1036
|
+
readonly revision: unknown;
|
|
1037
|
+
};
|
|
1038
|
+
readonly output: unknown;
|
|
1039
|
+
readonly faults: 'Conflict' | 'InvalidParams' | 'NotFound';
|
|
1040
|
+
};
|
|
1041
|
+
'weft.workflows.revisions.get': {
|
|
1042
|
+
readonly input: {
|
|
1043
|
+
readonly name: unknown;
|
|
1044
|
+
readonly revision: unknown;
|
|
1045
|
+
};
|
|
1046
|
+
readonly output: unknown;
|
|
1047
|
+
readonly faults: 'InvalidParams' | 'NotFound';
|
|
1048
|
+
};
|
|
1049
|
+
'weft.workflows.revisions.install': {
|
|
1050
|
+
readonly input: {
|
|
1051
|
+
readonly manifest: unknown;
|
|
1052
|
+
};
|
|
1053
|
+
readonly output: unknown;
|
|
1054
|
+
readonly faults: 'Conflict' | 'InvalidParams';
|
|
1055
|
+
};
|
|
1056
|
+
'weft.workflows.revisions.list': {
|
|
1057
|
+
readonly input: {
|
|
1058
|
+
readonly name: unknown;
|
|
1059
|
+
};
|
|
1060
|
+
readonly output: unknown;
|
|
1061
|
+
readonly faults: 'InvalidParams';
|
|
1062
|
+
};
|
|
749
1063
|
'weft.workflows.scheduleprovenance.get': {
|
|
750
1064
|
readonly input: {
|
|
751
1065
|
readonly workflowId: string;
|
|
@@ -6,6 +6,7 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
6
6
|
"weft.activities.complete",
|
|
7
7
|
"weft.activities.fail",
|
|
8
8
|
"weft.alerts.list",
|
|
9
|
+
"weft.catalog.diagnostics",
|
|
9
10
|
"weft.recover.all",
|
|
10
11
|
"weft.retention.get",
|
|
11
12
|
"weft.reviews.decision.submit",
|
|
@@ -34,6 +35,7 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
34
35
|
"weft.workers.list",
|
|
35
36
|
"weft.workers.rejections",
|
|
36
37
|
"weft.workers.resume",
|
|
38
|
+
"weft.workflows.active.get",
|
|
37
39
|
"weft.workflows.activities.pending.list",
|
|
38
40
|
"weft.workflows.aggregate",
|
|
39
41
|
"weft.workflows.attributes.get",
|
|
@@ -56,6 +58,10 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
56
58
|
"weft.workflows.replay",
|
|
57
59
|
"weft.workflows.result.get",
|
|
58
60
|
"weft.workflows.resume",
|
|
61
|
+
"weft.workflows.revisions.activate",
|
|
62
|
+
"weft.workflows.revisions.get",
|
|
63
|
+
"weft.workflows.revisions.install",
|
|
64
|
+
"weft.workflows.revisions.list",
|
|
59
65
|
"weft.workflows.scheduleprovenance.get",
|
|
60
66
|
"weft.workflows.signal",
|
|
61
67
|
"weft.workflows.start",
|
|
@@ -71,6 +77,7 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
71
77
|
"weft.activities.complete",
|
|
72
78
|
"weft.activities.fail",
|
|
73
79
|
"weft.alerts.list",
|
|
80
|
+
"weft.catalog.diagnostics",
|
|
74
81
|
"weft.recover.all",
|
|
75
82
|
"weft.retention.get",
|
|
76
83
|
"weft.reviews.decision.submit",
|
|
@@ -100,6 +107,7 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
100
107
|
"weft.workers.list",
|
|
101
108
|
"weft.workers.rejections",
|
|
102
109
|
"weft.workers.resume",
|
|
110
|
+
"weft.workflows.active.get",
|
|
103
111
|
"weft.workflows.activities.pending.list",
|
|
104
112
|
"weft.workflows.aggregate",
|
|
105
113
|
"weft.workflows.attributes.get",
|
|
@@ -122,6 +130,10 @@ export const CATALOG_OPERATION_NAMES = [
|
|
|
122
130
|
"weft.workflows.replay",
|
|
123
131
|
"weft.workflows.result.get",
|
|
124
132
|
"weft.workflows.resume",
|
|
133
|
+
"weft.workflows.revisions.activate",
|
|
134
|
+
"weft.workflows.revisions.get",
|
|
135
|
+
"weft.workflows.revisions.install",
|
|
136
|
+
"weft.workflows.revisions.list",
|
|
125
137
|
"weft.workflows.scheduleprovenance.get",
|
|
126
138
|
"weft.workflows.signal",
|
|
127
139
|
"weft.workflows.start",
|
package/dist/cli/output.js
CHANGED
|
@@ -54,7 +54,7 @@ export function truncateToWidth(value, width) {
|
|
|
54
54
|
export async function confirmDestructive(options) {
|
|
55
55
|
if (options.assumeYes)
|
|
56
56
|
return "confirmed";
|
|
57
|
-
if (!(options.isTty ??
|
|
57
|
+
if (!(options.isTty ?? process.stdin.isTTY))
|
|
58
58
|
return "non-interactive";
|
|
59
59
|
const readLine = options.readLine ?? defaultReadLine;
|
|
60
60
|
process.stdout.write(`${options.prompt} [y/N] `);
|
|
@@ -26,6 +26,8 @@ export async function executeWorkflow(command) {
|
|
|
26
26
|
return executeWorkflowCancel(command, connection);
|
|
27
27
|
case "signal":
|
|
28
28
|
return executeWorkflowSignal(command, connection);
|
|
29
|
+
default:
|
|
30
|
+
throw Error(`Unknown workflow command action: ${JSON.stringify(command)}`);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
function isRecord(value) {
|
package/dist/cli-main.js
CHANGED
|
@@ -42,7 +42,7 @@ const parsedArguments = (() => {
|
|
|
42
42
|
} catch (error) {
|
|
43
43
|
const message = error instanceof Error ? error.message : String(error);
|
|
44
44
|
console.error(`Error: ${message}`);
|
|
45
|
-
process.exit(findCliSubcommandName(Bun.argv.slice(2)) === "api" ? 3 : 1);
|
|
45
|
+
return process.exit(findCliSubcommandName(Bun.argv.slice(2)) === "api" ? 3 : 1);
|
|
46
46
|
}
|
|
47
47
|
})();
|
|
48
48
|
if (parsedArguments.command === "version") {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical payload digests for the durable application primitives (WFT-84).
|
|
3
|
+
*
|
|
4
|
+
* Idempotency binds a retry to `(caller, target, kind, payloadDigest)`, so the
|
|
5
|
+
* digest has to be stable for values that are logically equal but built in a
|
|
6
|
+
* different order. Object key insertion order, `Map` entry order, and `Set`
|
|
7
|
+
* member order all change MessagePack bytes without changing meaning, so this
|
|
8
|
+
* module canonicalizes those orderings first and only then hands the value to
|
|
9
|
+
* Weft's structured-clone codec.
|
|
10
|
+
*
|
|
11
|
+
* Digesting the codec's own output — rather than a hand-rolled JSON walk — is
|
|
12
|
+
* deliberate: `Uint8Array`, `Date`, `Map`, and `Set` keep their identity, so an
|
|
13
|
+
* opaque multimodal or managed-asset reference contributes its real bytes to the
|
|
14
|
+
* digest instead of being coerced to text.
|
|
15
|
+
*
|
|
16
|
+
* @module core/application-payload-digest
|
|
17
|
+
*/
|
|
18
|
+
import { WeftError } from './weft-error.ts';
|
|
19
|
+
/**
|
|
20
|
+
* Thrown when a value cannot be canonicalized into a stable digest — a cycle, a
|
|
21
|
+
* type the structured-clone codec cannot carry, or nesting past the depth
|
|
22
|
+
* ceiling.
|
|
23
|
+
*
|
|
24
|
+
* Internal by design: callers see it re-thrown as the public
|
|
25
|
+
* `ApplicationCommandValidationError` with this error as `cause`, so the public
|
|
26
|
+
* error union stays small while the specific reason survives.
|
|
27
|
+
*/
|
|
28
|
+
export declare class PayloadDigestError extends WeftError<'PayloadDigestError'> {
|
|
29
|
+
constructor(message: string);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* SHA-256 the canonical encoding of an arbitrary structured-clone value.
|
|
33
|
+
*
|
|
34
|
+
* @throws {PayloadDigestError} When the value cycles, nests too deeply, or holds
|
|
35
|
+
* a type the structured-clone codec cannot carry.
|
|
36
|
+
*/
|
|
37
|
+
export declare function computePayloadDigest(value: unknown): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* SHA-256 a list of opaque identity components, length-prefixed so no component
|
|
40
|
+
* boundary can be forged by embedding a separator.
|
|
41
|
+
*/
|
|
42
|
+
export declare function computeIdentityDigest(components: readonly string[]): Promise<string>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { encode } from "./codec.js";
|
|
2
|
+
import { WeftError } from "./weft-error.js";
|
|
3
|
+
const MAX_CANONICAL_DEPTH = 64;
|
|
4
|
+
|
|
5
|
+
export class PayloadDigestError extends WeftError {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super("PayloadDigestError", message);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function compareBytes(left, right) {
|
|
11
|
+
if (left.length !== right.length)
|
|
12
|
+
return left.length - right.length;
|
|
13
|
+
for (let index = 0;index < left.length; index += 1) {
|
|
14
|
+
const difference = (left[index] ?? 0) - (right[index] ?? 0);
|
|
15
|
+
if (difference !== 0)
|
|
16
|
+
return difference;
|
|
17
|
+
}
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
function isPlainObject(value) {
|
|
21
|
+
const prototype = Object.getPrototypeOf(value);
|
|
22
|
+
return prototype === null || prototype === Object.prototype;
|
|
23
|
+
}
|
|
24
|
+
function canonicalize(value, seen, depth) {
|
|
25
|
+
if (depth > MAX_CANONICAL_DEPTH)
|
|
26
|
+
throw new PayloadDigestError(`Payload nesting exceeds the ${MAX_CANONICAL_DEPTH}-level canonical digest ceiling.`);
|
|
27
|
+
if (value === null || typeof value !== "object") {
|
|
28
|
+
if (typeof value === "function" || typeof value === "symbol")
|
|
29
|
+
throw new PayloadDigestError(`Payload contains a non-cloneable ${typeof value} value.`);
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
if (seen.has(value))
|
|
33
|
+
throw new PayloadDigestError("Payload contains a cycle.");
|
|
34
|
+
seen.add(value);
|
|
35
|
+
try {
|
|
36
|
+
return canonicalizeObject(value, seen, depth);
|
|
37
|
+
} finally {
|
|
38
|
+
seen.delete(value);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function canonicalizeObject(value, seen, depth) {
|
|
42
|
+
if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer || value instanceof Date)
|
|
43
|
+
return value;
|
|
44
|
+
if (Array.isArray(value))
|
|
45
|
+
return value.map((element) => canonicalize(element, seen, depth + 1));
|
|
46
|
+
if (value instanceof Set)
|
|
47
|
+
return new Set(sortByEncoding([...value].map((m) => canonicalize(m, seen, depth + 1))));
|
|
48
|
+
if (value instanceof Map) {
|
|
49
|
+
const sorted = [...value].map(([key, entryValue]) => [canonicalize(key, seen, depth + 1), canonicalize(entryValue, seen, depth + 1)]).map((entry) => ({ entry, bytes: encode(entry) })).toSorted((left, right) => compareBytes(left.bytes, right.bytes)).map(({ entry }) => entry);
|
|
50
|
+
return new Map(sorted);
|
|
51
|
+
}
|
|
52
|
+
if (!isPlainObject(value))
|
|
53
|
+
throw new PayloadDigestError("Payload contains a class instance the canonical digest cannot order.");
|
|
54
|
+
const canonical = Object.create(null);
|
|
55
|
+
for (const key of Object.keys(value).toSorted())
|
|
56
|
+
Object.defineProperty(canonical, key, {
|
|
57
|
+
value: canonicalize(Reflect.get(value, key), seen, depth + 1),
|
|
58
|
+
enumerable: !0,
|
|
59
|
+
writable: !0,
|
|
60
|
+
configurable: !0
|
|
61
|
+
});
|
|
62
|
+
return canonical;
|
|
63
|
+
}
|
|
64
|
+
function sortByEncoding(values) {
|
|
65
|
+
return values.map((value) => ({ value, bytes: encode(value) })).toSorted((left, right) => compareBytes(left.bytes, right.bytes)).map(({ value }) => value);
|
|
66
|
+
}
|
|
67
|
+
function toHex(bytes) {
|
|
68
|
+
return [...new Uint8Array(bytes)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
69
|
+
}
|
|
70
|
+
export async function computePayloadDigest(value) {
|
|
71
|
+
const canonical = canonicalize(value, new Set, 0);
|
|
72
|
+
return toHex(await crypto.subtle.digest("SHA-256", encode(canonical)));
|
|
73
|
+
}
|
|
74
|
+
export async function computeIdentityDigest(components) {
|
|
75
|
+
return toHex(await crypto.subtle.digest("SHA-256", encode([...components])));
|
|
76
|
+
}
|