@lostgradient/weft 0.2.1 → 0.4.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 +123 -43
- package/dist/cli/conformance.js +7 -1
- package/dist/cli/generated/operation-client.generated.d.ts +55 -13
- package/dist/cli/generated/operation-client.generated.js +3 -0
- package/dist/cli/help-text.d.ts +1 -1
- package/dist/cli/help-text.js +1 -0
- package/dist/cli/operation-catalog-snapshot.d.ts +8 -0
- package/dist/cli/operation-catalog-snapshot.js +11 -0
- package/dist/cli/parse-schedule-arguments.js +3 -1
- package/dist/cli/schedule.js +2 -1
- package/dist/cli/types.d.ts +1 -0
- package/dist/cli-main.js +80 -79
- package/dist/client/handle-delegation.d.ts +7 -2
- package/dist/client/handle-delegation.js +9 -1
- package/dist/client/http-client-requests.d.ts +4 -1
- package/dist/client/http-client-requests.js +10 -0
- package/dist/client/http-client.d.ts +10 -4
- package/dist/client/http-client.js +18 -1
- package/dist/client/http-request.d.ts +11 -1
- package/dist/client/http-request.js +17 -7
- package/dist/client/index.d.ts +1 -1
- package/dist/client/interface.d.ts +100 -4
- package/dist/client/local.d.ts +7 -1
- package/dist/client/local.js +17 -2
- package/dist/client/start-body.d.ts +9 -2
- package/dist/client/start-body.js +13 -4
- package/dist/core/byte-arrays.d.ts +5 -0
- package/dist/core/byte-arrays.js +5 -0
- package/dist/core/checkpoint/lifecycle.d.ts +3 -0
- package/dist/core/checkpoint/lifecycle.js +9 -4
- package/dist/core/checkpoint/serialization.js +12 -5
- package/dist/core/codec/extension-codec.d.ts +16 -0
- package/dist/core/codec/extension-codec.js +104 -8
- package/dist/core/codec/index.d.ts +1 -0
- package/dist/core/codec/index.js +1 -0
- package/dist/core/codec/serializer-registry.d.ts +122 -0
- package/dist/core/codec/serializer-registry.js +51 -0
- package/dist/core/context/activity-retry-state.d.ts +38 -0
- package/dist/core/context/activity-retry-state.js +89 -0
- package/dist/core/context/activity-schedule-to-close.d.ts +159 -0
- package/dist/core/context/activity-schedule-to-close.js +69 -0
- package/dist/core/context/child-workflow-pipe.d.ts +5 -5
- package/dist/core/context/child-workflow-pipe.js +15 -2
- package/dist/core/context/context-presence.d.ts +19 -0
- package/dist/core/context/context-presence.js +13 -0
- package/dist/core/context/durable-operations.d.ts +25 -0
- package/dist/core/context/durable-operations.js +64 -0
- package/dist/core/context/index.d.ts +18 -5
- package/dist/core/context/index.js +17 -12
- package/dist/core/context/internals.d.ts +29 -0
- package/dist/core/context/internals.js +6 -1
- package/dist/core/context/operation-request.d.ts +35 -0
- package/dist/core/context/parallel-cache-entry.d.ts +14 -5
- package/dist/core/context/run-operation.d.ts +21 -3
- package/dist/core/context/run-operation.js +56 -93
- package/dist/core/context/session-state.js +7 -8
- package/dist/core/context/speculative-child.js +2 -0
- package/dist/core/context/types.d.ts +15 -0
- package/dist/core/context/version-patching.d.ts +8 -0
- package/dist/core/context/version-patching.js +40 -0
- package/dist/core/context/workflow-logger.d.ts +98 -0
- package/dist/core/context/workflow-logger.js +68 -0
- package/dist/core/engine/activity-heartbeat-tracking.d.ts +64 -0
- package/dist/core/engine/activity-heartbeat-tracking.js +42 -0
- package/dist/core/engine/activity-per-attempt-timeout.d.ts +41 -0
- package/dist/core/engine/activity-per-attempt-timeout.js +36 -0
- package/dist/core/engine/activity-reconciliation.d.ts +1 -0
- package/dist/core/engine/activity-reconciliation.js +12 -1
- package/dist/core/engine/activity-resolution.d.ts +23 -0
- package/dist/core/engine/activity-resolution.js +37 -0
- package/dist/core/engine/aggregate.js +66 -30
- package/dist/core/engine/async-activity-completion.d.ts +23 -6
- package/dist/core/engine/async-activity-completion.js +53 -12
- package/dist/core/engine/attributes-tags.js +9 -4
- package/dist/core/engine/bulk-operations-purge.d.ts +26 -0
- package/dist/core/engine/bulk-operations-purge.js +38 -3
- package/dist/core/engine/bulk-operations-shared.d.ts +2 -0
- package/dist/core/engine/bulk-operations-shared.js +8 -2
- package/dist/core/engine/bulk-operations.d.ts +4 -1
- package/dist/core/engine/bulk-operations.js +235 -24
- package/dist/core/engine/callback-creators-bundles.d.ts +9 -0
- package/dist/core/engine/callback-creators-bundles.js +30 -2
- package/dist/core/engine/callback-creators-core.js +6 -4
- package/dist/core/engine/callback-creators-router.js +10 -0
- package/dist/core/engine/callback-creators-schedule.d.ts +2 -2
- package/dist/core/engine/callback-creators-schedule.js +12 -8
- package/dist/core/engine/candidate-read-batching.d.ts +6 -0
- package/dist/core/engine/candidate-read-batching.js +1 -0
- package/dist/core/engine/checkpoint-io.js +61 -25
- package/dist/core/engine/checkpoint-reads.js +3 -2
- package/dist/core/engine/checkpoint-replay.d.ts +20 -0
- package/dist/core/engine/checkpoint-replay.js +242 -0
- package/dist/core/engine/checkpoint-side-effects.d.ts +23 -0
- package/dist/core/engine/checkpoint-side-effects.js +35 -0
- package/dist/core/engine/child-workflow-cancellation.d.ts +10 -0
- package/dist/core/engine/child-workflow-cancellation.js +40 -0
- package/dist/core/engine/child-workflow.js +27 -4
- package/dist/core/engine/condition-waiters.d.ts +14 -0
- package/dist/core/engine/condition-waiters.js +5 -0
- package/dist/core/engine/construction.d.ts +3 -1
- package/dist/core/engine/construction.js +30 -8
- package/dist/core/engine/coordination-branch-executors.d.ts +70 -0
- package/dist/core/engine/coordination-branch-executors.js +107 -0
- package/dist/core/engine/deferred-consume-envelope.d.ts +59 -0
- package/dist/core/engine/deferred-consume-envelope.js +14 -0
- package/dist/core/engine/disposal.js +25 -0
- package/dist/core/engine/engine-create-types.d.ts +14 -18
- package/dist/core/engine/engine-internal-types.d.ts +38 -3
- package/dist/core/engine/engine-leak-warnings.d.ts +6 -0
- package/dist/core/engine/engine-leak-warnings.js +4 -0
- package/dist/core/engine/engine-runtime-helpers.d.ts +17 -0
- package/dist/core/engine/engine-runtime-helpers.js +26 -5
- package/dist/core/engine/errors.d.ts +121 -0
- package/dist/core/engine/errors.js +45 -1
- package/dist/core/engine/event-log-compaction.d.ts +8 -0
- package/dist/core/engine/event-log-compaction.js +20 -2
- package/dist/core/engine/fenced-write.d.ts +65 -0
- package/dist/core/engine/fenced-write.js +71 -0
- package/dist/core/engine/finalizer-state.d.ts +28 -0
- package/dist/core/engine/finalizer-state.js +16 -0
- package/dist/core/engine/handle-result.js +1 -1
- package/dist/core/engine/handles.d.ts +97 -40
- package/dist/core/engine/handles.js +25 -27
- package/dist/core/engine/index.d.ts +125 -15
- package/dist/core/engine/index.js +207 -11
- package/dist/core/engine/inline-launch-queue.d.ts +14 -0
- package/dist/core/engine/inline-launch-queue.js +32 -7
- package/dist/core/engine/inline-parking.js +3 -2
- package/dist/core/engine/internals.d.ts +125 -13
- package/dist/core/engine/lease-codec.d.ts +35 -0
- package/dist/core/engine/lease-codec.js +32 -0
- package/dist/core/engine/lease-deposition.d.ts +66 -0
- package/dist/core/engine/lease-deposition.js +10 -0
- package/dist/core/engine/lease-errors.d.ts +99 -0
- package/dist/core/engine/lease-errors.js +30 -0
- package/dist/core/engine/lease-manager.d.ts +114 -0
- package/dist/core/engine/lease-manager.js +135 -0
- package/dist/core/engine/lifecycle/fork-helpers.js +1 -7
- package/dist/core/engine/lifecycle/persist.js +15 -52
- package/dist/core/engine/lifecycle/recovered-services.d.ts +8 -6
- package/dist/core/engine/lifecycle/recovered-services.js +18 -3
- package/dist/core/engine/lifecycle/resume.js +39 -11
- package/dist/core/engine/lifecycle/shared.d.ts +8 -1
- package/dist/core/engine/lifecycle/start-batch.d.ts +1 -1
- package/dist/core/engine/lifecycle/start-batch.js +2 -1
- package/dist/core/engine/lifecycle/start-commit.d.ts +56 -0
- package/dist/core/engine/lifecycle/start-commit.js +69 -0
- package/dist/core/engine/lifecycle/start-exec.d.ts +30 -2
- package/dist/core/engine/lifecycle/start-exec.js +38 -0
- package/dist/core/engine/lifecycle/start-or-signal-create.d.ts +58 -0
- package/dist/core/engine/lifecycle/start-or-signal-create.js +95 -0
- package/dist/core/engine/lifecycle/start-or-signal-resolution.d.ts +79 -0
- package/dist/core/engine/lifecycle/start-or-signal-resolution.js +60 -0
- package/dist/core/engine/lifecycle/start-or-signal.d.ts +46 -0
- package/dist/core/engine/lifecycle/start-or-signal.js +71 -0
- package/dist/core/engine/lifecycle/start-terminal-conflict-purge.d.ts +39 -0
- package/dist/core/engine/lifecycle/start-terminal-conflict-purge.js +28 -0
- package/dist/core/engine/lifecycle/start.d.ts +6 -6
- package/dist/core/engine/lifecycle/start.js +47 -45
- package/dist/core/engine/lifecycle/transition.js +17 -5
- package/dist/core/engine/lifecycle.d.ts +3 -2
- package/dist/core/engine/lifecycle.js +9 -2
- package/dist/core/engine/list-candidate-resolution.js +2 -2
- package/dist/core/engine/listing.js +10 -6
- package/dist/core/engine/operations-activity.d.ts +4 -11
- package/dist/core/engine/operations-activity.js +22 -49
- package/dist/core/engine/operations-coordination.d.ts +10 -0
- package/dist/core/engine/operations-coordination.js +43 -8
- package/dist/core/engine/operations-router.d.ts +6 -0
- package/dist/core/engine/operations-router.js +2 -0
- package/dist/core/engine/operations-speculate.js +6 -2
- package/dist/core/engine/operations-stream.js +12 -2
- package/dist/core/engine/operations-time.d.ts +4 -2
- package/dist/core/engine/operations-time.js +14 -2
- package/dist/core/engine/operations-wait-condition.d.ts +23 -0
- package/dist/core/engine/operations-wait-condition.js +62 -0
- package/dist/core/engine/ownership-options.d.ts +23 -0
- package/dist/core/engine/ownership-options.js +26 -0
- package/dist/core/engine/payload-size-policy.d.ts +3 -0
- package/dist/core/engine/payload-size-policy.js +4 -0
- package/dist/core/engine/pending-updates.d.ts +17 -0
- package/dist/core/engine/pending-updates.js +33 -11
- package/dist/core/engine/persisted-data-version.d.ts +5 -9
- package/dist/core/engine/persisted-data-version.js +4 -5
- package/dist/core/engine/queries.js +1 -1
- package/dist/core/engine/registration.d.ts +1 -0
- package/dist/core/engine/registration.js +18 -3
- package/dist/core/engine/schedule-handle.d.ts +45 -0
- package/dist/core/engine/schedule-handle.js +26 -0
- package/dist/core/engine/schedule-jitter.d.ts +5 -0
- package/dist/core/engine/schedule-jitter.js +10 -0
- package/dist/core/engine/schedule-run.d.ts +17 -0
- package/dist/core/engine/schedule-run.js +38 -0
- package/dist/core/engine/schedule-timer.js +81 -17
- package/dist/core/engine/schedules.d.ts +8 -5
- package/dist/core/engine/schedules.js +44 -19
- package/dist/core/engine/search-attribute-records.d.ts +4 -0
- package/dist/core/engine/search-attribute-records.js +17 -0
- package/dist/core/engine/second-instance-detector.d.ts +96 -0
- package/dist/core/engine/second-instance-detector.js +108 -0
- package/dist/core/engine/signals.d.ts +38 -0
- package/dist/core/engine/signals.js +55 -19
- package/dist/core/engine/state-utilities.d.ts +49 -2
- package/dist/core/engine/state-utilities.js +114 -3
- package/dist/core/engine/storage-io.d.ts +16 -2
- package/dist/core/engine/storage-io.js +26 -5
- package/dist/core/engine/stream-chunk-loading.d.ts +2 -0
- package/dist/core/engine/stream-chunk-loading.js +24 -1
- package/dist/core/engine/sub-operation.js +22 -3
- package/dist/core/engine/termination/cleanup.d.ts +28 -1
- package/dist/core/engine/termination/cleanup.js +44 -2
- package/dist/core/engine/termination/complete.js +48 -9
- package/dist/core/engine/termination/finalizer-activity.d.ts +53 -0
- package/dist/core/engine/termination/finalizer-activity.js +30 -0
- package/dist/core/engine/termination/finalizer-claim.d.ts +110 -0
- package/dist/core/engine/termination/finalizer-claim.js +80 -0
- package/dist/core/engine/termination/finalizer.d.ts +48 -0
- package/dist/core/engine/termination/finalizer.js +159 -0
- package/dist/core/engine/termination/suspend.d.ts +70 -0
- package/dist/core/engine/termination/suspend.js +41 -0
- package/dist/core/engine/termination.d.ts +5 -2
- package/dist/core/engine/termination.js +6 -0
- package/dist/core/engine/updates.js +5 -25
- package/dist/core/engine/validation/schedule.d.ts +2 -1
- package/dist/core/engine/validation/schedule.js +51 -2
- package/dist/core/engine/validation.js +54 -3
- package/dist/core/engine/waiting-update-response.d.ts +8 -0
- package/dist/core/engine/waiting-update-response.js +22 -0
- package/dist/core/engine/workflow-concurrency.d.ts +10 -0
- package/dist/core/engine/workflow-concurrency.js +136 -0
- package/dist/core/engine/workflow-feed.d.ts +9 -8
- package/dist/core/engine/workflow-feed.js +4 -1
- package/dist/core/engine/workflow-indexes.d.ts +9 -0
- package/dist/core/engine/workflow-indexes.js +10 -0
- package/dist/core/engine/workflow-state-stream.js +33 -13
- package/dist/core/engine/workflow-visibility-queries.d.ts +2 -2
- package/dist/core/engine-helpers.js +1 -0
- package/dist/core/events/activity-events.d.ts +43 -12
- package/dist/core/events/activity-events.js +28 -0
- package/dist/core/events/attribute-events.d.ts +2 -3
- package/dist/core/events/event-map.d.ts +19 -12
- package/dist/core/events/index.d.ts +1 -0
- package/dist/core/events/index.js +1 -0
- package/dist/core/events/schedule-events.d.ts +71 -0
- package/dist/core/events/schedule-events.js +29 -0
- package/dist/core/events/signal-events.d.ts +4 -6
- package/dist/core/events/system-events.d.ts +29 -19
- package/dist/core/events/system-events.js +26 -0
- package/dist/core/events/update-events.d.ts +6 -8
- package/dist/core/events/workflow-events.d.ts +108 -20
- package/dist/core/events/workflow-events.js +35 -0
- package/dist/core/failure-categories.js +5 -17
- package/dist/core/fault-code.d.ts +9 -3
- package/dist/core/fault-code.js +1 -0
- package/dist/core/inline-execution-strategy.context-options.d.ts +69 -0
- package/dist/core/inline-execution-strategy.context-options.js +56 -0
- package/dist/core/inline-execution-strategy.d.ts +31 -36
- package/dist/core/inline-execution-strategy.js +16 -27
- package/dist/core/list-filter-validation.d.ts +1 -1
- package/dist/core/list-filter-validation.js +2 -1
- package/dist/core/payload-size.d.ts +1 -1
- package/dist/core/persisted-data-incompatible-error.d.ts +9 -7
- package/dist/core/review/events.d.ts +6 -8
- package/dist/core/scheduler/scheduler-class.d.ts +10 -1
- package/dist/core/scheduler/scheduler-class.js +38 -11
- package/dist/core/scheduler/timer-batch.js +9 -1
- package/dist/core/scheduler/timer-sources.d.ts +1 -0
- package/dist/core/scheduler/timer-sources.js +11 -5
- package/dist/core/session-state.d.ts +0 -1
- package/dist/core/session-state.js +2 -2
- package/dist/core/start-workflow-validation.d.ts +56 -0
- package/dist/core/start-workflow-validation.js +30 -1
- package/dist/core/step-context.d.ts +10 -6
- package/dist/core/step-context.js +7 -15
- package/dist/core/types/activity-verification.d.ts +67 -0
- package/dist/core/types/activity-verification.js +0 -0
- package/dist/core/types/activity.d.ts +86 -64
- package/dist/core/types/bulk.d.ts +50 -9
- package/dist/core/types/checkpoint.d.ts +44 -8
- package/dist/core/types/identity.d.ts +8 -1
- package/dist/core/types/launch-metadata.d.ts +33 -0
- package/dist/core/types/launch-metadata.js +0 -0
- package/dist/core/types/list-options.d.ts +146 -0
- package/dist/core/types/list-options.js +0 -0
- package/dist/core/types/message-handles.d.ts +25 -0
- package/dist/core/types/options.d.ts +165 -215
- package/dist/core/types/reviews.d.ts +2 -1
- package/dist/core/types/schedules.d.ts +39 -3
- package/dist/core/types/services-resolution.d.ts +47 -0
- package/dist/core/types/services-resolution.js +0 -0
- package/dist/core/types/state.d.ts +11 -11
- package/dist/core/types/workflow-builder-runtime.d.ts +12 -3
- package/dist/core/types/workflow-builder-runtime.js +11 -2
- package/dist/core/types/workflow-builder.d.ts +47 -15
- package/dist/core/types/workflow-concurrency.d.ts +39 -0
- package/dist/core/types/workflow-concurrency.js +0 -0
- package/dist/core/types/workflow-context.d.ts +157 -14
- package/dist/core/types/workflow-definition.d.ts +53 -10
- package/dist/core/types/workflow-function.d.ts +101 -9
- package/dist/core/types/workflow-log.d.ts +98 -0
- package/dist/core/types/workflow-log.js +0 -0
- package/dist/core/types/workflow-registries.d.ts +14 -3
- package/dist/core/types/workflow-registry.d.ts +3 -0
- package/dist/core/types/workflow-snapshot.d.ts +29 -0
- package/dist/core/types/workflow-snapshot.js +0 -0
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.js +7 -0
- package/dist/core/versioning.d.ts +9 -39
- package/dist/core/versioning.js +2 -12
- package/dist/core/weft-error.d.ts +44 -1
- package/dist/core/weft-error.js +19 -1
- package/dist/core/worker-execution-strategy-options.d.ts +26 -0
- package/dist/core/worker-execution-strategy.js +40 -36
- package/dist/core/worker-inbound-message.d.ts +38 -0
- package/dist/core/worker-inbound-message.js +37 -0
- package/dist/core/worker-log-abuse-counter.d.ts +175 -0
- package/dist/core/worker-log-abuse-counter.js +107 -0
- package/dist/core/worker-message-helpers.d.ts +47 -0
- package/dist/core/worker-message-helpers.js +26 -0
- package/dist/core/worker-protocol-guard.js +1 -1
- package/dist/core/worker-protocol-log.d.ts +56 -0
- package/dist/core/worker-protocol-log.js +18 -0
- package/dist/core/worker-protocol.d.ts +23 -0
- package/dist/core/worker-protocol.js +12 -2
- package/dist/core/workflow-version-tuple.d.ts +3 -9
- package/dist/core/workflow-version-tuple.js +2 -3
- package/dist/diagnostics/doctor.js +6 -3
- package/dist/diagnostics/format.js +3 -8
- package/dist/diagnostics/types.d.ts +5 -5
- package/dist/diagnostics/validate.d.ts +0 -1
- package/dist/diagnostics/version-check.d.ts +1 -1
- package/dist/diagnostics/version-check.js +10 -13
- package/dist/index.d.ts +13 -11
- package/dist/index.js +39 -4
- package/dist/json-schema.js +3 -3
- package/dist/mcp/cli.js +35 -35
- package/dist/mcp/dispatcher.js +1 -1
- package/dist/mcp/http.js +16 -6
- package/dist/mcp/list-filter.js +2 -1
- package/dist/mcp/protocol.d.ts +2 -0
- package/dist/mcp/protocol.js +1 -1
- package/dist/mcp/session.d.ts +16 -0
- package/dist/mcp/session.js +60 -6
- package/dist/mcp/tools.js +73 -6
- package/dist/observability/index.js +2 -2
- package/dist/server/asyncapi-channels.js +5 -2
- package/dist/server/attribute-filters.d.ts +8 -3
- package/dist/server/attribute-filters.js +6 -1
- package/dist/server/authentication/api-key.d.ts +2 -1
- package/dist/server/authentication/api-key.js +5 -2
- package/dist/server/authentication/constant-time-api-key.d.ts +15 -0
- package/dist/server/authentication/constant-time-api-key.js +24 -0
- package/dist/server/authentication/index.d.ts +1 -1
- package/dist/server/authentication/index.js +7 -4
- package/dist/server/authentication/rotating-api-key-store.d.ts +5 -3
- package/dist/server/authentication/rotating-api-key-store.js +19 -11
- package/dist/server/engine-event-feed-backend.d.ts +4 -5
- package/dist/server/fault-to-http.js +8 -1
- package/dist/server/fault-to-json-rpc.js +1 -0
- package/dist/server/fleet-event-feed.d.ts +31 -0
- package/dist/server/fleet-event-feed.js +157 -0
- package/dist/server/handler/index.js +1 -1
- package/dist/server/handler/response-helpers.js +2 -1
- package/dist/server/handler/route-dispatch.d.ts +6 -3
- package/dist/server/handler/route-dispatch.js +2 -2
- package/dist/server/handler.js +31 -31
- package/dist/server/index.d.ts +32 -2
- package/dist/server/index.js +35 -35
- package/dist/server/interactive-operations.js +1 -0
- package/dist/server/json-rpc-transport-helpers.d.ts +1 -0
- package/dist/server/json-rpc-transport-helpers.js +2 -1
- package/dist/server/json-rpc-websocket-runtime.d.ts +11 -2
- package/dist/server/json-rpc-websocket-runtime.js +1 -0
- package/dist/server/json-rpc-websocket-subscriptions.d.ts +10 -0
- package/dist/server/json-rpc-websocket-subscriptions.js +29 -0
- package/dist/server/json-rpc-websocket-types.d.ts +22 -0
- package/dist/server/json-rpc-websocket-types.js +0 -0
- package/dist/server/json-rpc-websocket-validation.js +20 -4
- package/dist/server/json-rpc-websocket.d.ts +2 -43
- package/dist/server/json-rpc-websocket.js +57 -74
- package/dist/server/openapi.d.ts +2 -1
- package/dist/server/openapi.js +1 -3
- package/dist/server/openrpc-document-schema.d.ts +78 -0
- package/dist/server/openrpc-document-schema.js +27 -1
- package/dist/server/openrpc-errors.d.ts +3 -0
- package/dist/server/openrpc-errors.js +2 -1
- package/dist/server/openrpc.js +32 -0
- package/dist/server/operation-catalog/index.d.ts +1 -1
- package/dist/server/operation-catalog/pipeline-helpers.js +1 -0
- package/dist/server/operation-catalog/pipeline-stages.js +26 -12
- package/dist/server/operation-catalog/pipeline.js +8 -1
- package/dist/server/operation-catalog/registry.js +13 -0
- package/dist/server/operation-catalog/types.d.ts +20 -9
- package/dist/server/operation-fault.d.ts +10 -0
- package/dist/server/operation-fault.js +2 -0
- package/dist/server/operation-registry.d.ts +12 -11
- package/dist/server/operation-registry.js +12 -3
- package/dist/server/operations/aggregate-workflows.d.ts +15 -15
- package/dist/server/operations/async-activity.d.ts +2 -2
- package/dist/server/operations/async-activity.js +12 -7
- package/dist/server/operations/bulk-cancel-workflows.d.ts +1 -1
- package/dist/server/operations/bulk-cancel-workflows.js +2 -2
- package/dist/server/operations/bulk-delete-workflows.d.ts +1 -1
- package/dist/server/operations/bulk-delete-workflows.js +2 -2
- package/dist/server/operations/bulk-filter-helpers.d.ts +8 -6
- package/dist/server/operations/bulk-filter-helpers.js +54 -24
- package/dist/server/operations/bulk-mutate-workflow-tags.d.ts +11 -9
- package/dist/server/operations/bulk-mutate-workflow-tags.js +2 -2
- package/dist/server/operations/bulk-operation-helpers.d.ts +2 -2
- package/dist/server/operations/bulk-retry-failed-workflows.d.ts +7 -0
- package/dist/server/operations/bulk-retry-failed-workflows.js +64 -0
- package/dist/server/operations/bulk-signal-workflows.d.ts +11 -9
- package/dist/server/operations/bulk-signal-workflows.js +2 -2
- package/dist/server/operations/cancel-schedule.d.ts +1 -1
- package/dist/server/operations/create-schedule.d.ts +3 -1
- package/dist/server/operations/create-schedule.js +29 -11
- package/dist/server/operations/fleet-events-subscription.d.ts +54 -0
- package/dist/server/operations/fleet-events-subscription.js +99 -0
- package/dist/server/operations/fork-workflow.d.ts +1 -1
- package/dist/server/operations/fork-workflow.js +3 -2
- package/dist/server/operations/get-checkpoint-at.d.ts +1 -1
- package/dist/server/operations/get-registry.d.ts +1 -1
- package/dist/server/operations/get-retention-overview.d.ts +1 -1
- package/dist/server/operations/get-review.d.ts +1 -1
- package/dist/server/operations/get-schedule.d.ts +1 -1
- package/dist/server/operations/get-stream-chunks.d.ts +1 -1
- package/dist/server/operations/get-system-metrics.d.ts +2 -2
- package/dist/server/operations/get-task-diagnostics.d.ts +45 -6
- package/dist/server/operations/get-task-diagnostics.js +101 -7
- package/dist/server/operations/get-update-result.d.ts +1 -1
- package/dist/server/operations/get-workflow-attributes.d.ts +1 -1
- package/dist/server/operations/get-workflow-events.d.ts +1 -1
- package/dist/server/operations/get-workflow-result.d.ts +1 -1
- package/dist/server/operations/get-workflow-timeline.d.ts +1 -1
- package/dist/server/operations/get-workflow.d.ts +1 -1
- package/dist/server/operations/list-checkpoints.d.ts +1 -1
- package/dist/server/operations/list-reviews.d.ts +1 -1
- package/dist/server/operations/list-schedules.d.ts +1 -1
- package/dist/server/operations/list-task-queues.d.ts +2 -2
- package/dist/server/operations/list-workers.d.ts +2 -2
- package/dist/server/operations/list-workflows.d.ts +1 -1
- package/dist/server/operations/operation-helpers.d.ts +16 -1
- package/dist/server/operations/operation-helpers.js +15 -3
- package/dist/server/operations/pause-schedule.d.ts +1 -1
- package/dist/server/operations/purge-workflows.d.ts +5 -5
- package/dist/server/operations/purge-workflows.js +2 -2
- package/dist/server/operations/query-workflow.d.ts +1 -1
- package/dist/server/operations/query-workflow.js +3 -2
- package/dist/server/operations/recover-all.d.ts +1 -1
- package/dist/server/operations/replay-workflow.d.ts +1 -1
- package/dist/server/operations/resume-schedule.d.ts +1 -1
- package/dist/server/operations/resume-workflow.js +2 -2
- package/dist/server/operations/set-workflow-attributes.d.ts +1 -1
- package/dist/server/operations/set-workflow-attributes.js +6 -3
- package/dist/server/operations/signal-workflow.js +8 -3
- package/dist/server/operations/single-workflow-tag-mutation.js +13 -3
- package/dist/server/operations/start-or-signal-workflow.d.ts +44 -0
- package/dist/server/operations/start-or-signal-workflow.js +130 -0
- package/dist/server/operations/start-workflow-options.d.ts +38 -0
- package/dist/server/operations/start-workflow-options.js +63 -0
- package/dist/server/operations/start-workflow-rest-input.d.ts +14 -0
- package/dist/server/operations/start-workflow-rest-input.js +31 -0
- package/dist/server/operations/start-workflow.d.ts +1 -1
- package/dist/server/operations/start-workflow.js +15 -92
- package/dist/server/operations/storage.d.ts +6 -6
- package/dist/server/operations/storage.js +24 -14
- package/dist/server/operations/stream-workflow-sse.d.ts +1 -1
- package/dist/server/operations/submit-review-decision.d.ts +1 -1
- package/dist/server/operations/submit-review-decision.js +6 -3
- package/dist/server/operations/suspend-workflow.d.ts +13 -0
- package/dist/server/operations/suspend-workflow.js +36 -0
- package/dist/server/operations/update-schedule.d.ts +1 -1
- package/dist/server/operations/update-schedule.js +7 -4
- package/dist/server/operations/update-workflow.d.ts +1 -1
- package/dist/server/operations/update-workflow.js +7 -3
- package/dist/server/operations/worker-drain.d.ts +8 -8
- package/dist/server/operations/worker-drain.js +11 -8
- package/dist/server/operations/workflow-events-subscription.d.ts +7 -8
- package/dist/server/operations/workflow-events-subscription.js +43 -8
- package/dist/server/rest-binding.d.ts +21 -8
- package/dist/server/rest-bindings.js +24 -0
- package/dist/server/rest-body.d.ts +10 -0
- package/dist/server/rest-body.js +80 -0
- package/dist/server/runtime/authentication-bridge.d.ts +1 -0
- package/dist/server/runtime/authentication-bridge.js +33 -6
- package/dist/server/runtime/client-visible-events.d.ts +3 -0
- package/dist/server/runtime/client-visible-events.js +65 -0
- package/dist/server/runtime/context.d.ts +7 -0
- package/dist/server/runtime/event-broadcasting.d.ts +6 -0
- package/dist/server/runtime/event-broadcasting.js +72 -38
- package/dist/server/runtime/retry.d.ts +1 -0
- package/dist/server/runtime/retry.js +14 -0
- package/dist/server/runtime/shutdown.d.ts +7 -6
- package/dist/server/runtime/shutdown.js +6 -1
- package/dist/server/runtime/task-dispatch.js +5 -3
- package/dist/server/runtime/task-polling.d.ts +16 -2
- package/dist/server/runtime/task-polling.js +80 -24
- package/dist/server/runtime/task-reconciliation.js +9 -1
- package/dist/server/runtime/task-result-resolution.d.ts +15 -0
- package/dist/server/runtime/task-result-resolution.js +81 -0
- package/dist/server/runtime/websocket-stream.d.ts +20 -1
- package/dist/server/runtime/websocket-stream.js +173 -7
- package/dist/server/runtime/websocket-upgrade.js +22 -3
- package/dist/server/runtime/websocket-worker.d.ts +1 -1
- package/dist/server/runtime/websocket-worker.js +46 -30
- package/dist/server/serve-internals.d.ts +11 -1
- package/dist/server/serve-internals.js +20 -2
- package/dist/server/task-state.d.ts +38 -0
- package/dist/server/task-state.js +28 -0
- package/dist/server/workflow-event-feed.d.ts +36 -115
- package/dist/server/workflow-event-feed.js +92 -27
- package/dist/service-worker/index.js +31 -31
- package/dist/storage/auto.js +1 -1
- package/dist/storage/bun-sql.js +24 -0
- package/dist/storage/capabilities.d.ts +10 -2
- package/dist/storage/capabilities.js +2 -2
- package/dist/storage/compressed-storage.js +1 -1
- package/dist/storage/default-scope.d.ts +7 -4
- package/dist/storage/http.js +2 -2
- package/dist/storage/index.d.ts +81 -4
- package/dist/storage/indexeddb.js +1 -1
- package/dist/storage/interface.d.ts +189 -0
- package/dist/storage/interface.js +1 -1
- package/dist/storage/key-prefixes.d.ts +1 -1
- package/dist/storage/key-prefixes.js +12 -0
- package/dist/storage/lmdb.d.ts +4 -3
- package/dist/storage/lmdb.js +1 -1
- package/dist/storage/memory.js +1 -1
- package/dist/storage/neon-batch.d.ts +30 -0
- package/dist/storage/neon-batch.js +30 -0
- package/dist/storage/neon-value-mapping.d.ts +74 -0
- package/dist/storage/neon-value-mapping.js +23 -0
- package/dist/storage/neon.d.ts +124 -0
- package/dist/storage/neon.js +15 -0
- package/dist/storage/node-sqlite-loader.d.ts +71 -0
- package/dist/storage/node-sqlite-loader.js +41 -0
- package/dist/storage/node-sqlite.d.ts +1 -19
- package/dist/storage/node-sqlite.js +61 -32
- package/dist/storage/postgres-key-value-queries.d.ts +104 -0
- package/dist/storage/postgres-key-value-queries.js +101 -0
- package/dist/storage/resolve.d.ts +2 -165
- package/dist/storage/resolve.js +1 -1
- package/dist/storage/scoped-storage.js +1 -1
- package/dist/storage/storage-configuration.d.ts +209 -0
- package/dist/storage/storage-configuration.js +0 -0
- package/dist/storage/testing.d.ts +168 -0
- package/dist/storage/testing.js +2 -0
- package/dist/storage/text-value-store.d.ts +9 -9
- package/dist/storage/turso.d.ts +8 -0
- package/dist/storage/turso.js +2 -2
- package/dist/storage/typed-storage.js +1 -1
- package/dist/storage/web-extension.js +1 -1
- package/dist/testing/index.js +35 -35
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/index.js +9 -5
- package/dist/worker/long-poll.js +4 -0
- package/dist/worker/protocol-messages.d.ts +20 -0
- package/dist/worker/protocol-schemas.d.ts +32 -0
- package/dist/worker/protocol-schemas.js +8 -4
- package/dist/worker/protocol-task-result.d.ts +28 -0
- package/dist/worker/protocol-task-result.js +76 -0
- package/dist/worker/protocol.d.ts +4 -15
- package/dist/worker/protocol.js +1 -1
- package/dist/worker/registry/fair-share.d.ts +29 -0
- package/dist/worker/registry/fair-share.js +30 -0
- package/dist/worker/registry/routing.d.ts +18 -0
- package/dist/worker/registry/routing.js +14 -0
- package/dist/worker/registry/types.d.ts +7 -0
- package/dist/worker/registry.d.ts +16 -1
- package/dist/worker/registry.js +24 -36
- package/dist/workers/worker-replay-state.d.ts +32 -0
- package/dist/workers/worker-replay-state.js +35 -0
- package/dist/workers/worker-state-namespace.d.ts +21 -0
- package/dist/workers/worker-state-namespace.js +13 -0
- package/dist/workers/workflow-runner.d.ts +19 -15
- package/dist/workers/workflow-runner.js +72 -60
- package/dist/workers/workflow-worker-entry.js +5 -2
- package/package.json +21 -4
|
@@ -51,12 +51,19 @@ export async function checkAuthorization(operation, input, context) {
|
|
|
51
51
|
}
|
|
52
52
|
if (!isAuthorizationDecision(decision))
|
|
53
53
|
return failure({ code: "EngineFailure", message: "internal error", data: {} });
|
|
54
|
-
if (!decision.allowed)
|
|
54
|
+
if (!decision.allowed) {
|
|
55
|
+
if (decision.classification === "unauthorized")
|
|
56
|
+
return failure({
|
|
57
|
+
code: "Unauthorized",
|
|
58
|
+
message: decision.reason,
|
|
59
|
+
data: { reason: decision.reason }
|
|
60
|
+
});
|
|
55
61
|
return failure({
|
|
56
62
|
code: "Forbidden",
|
|
57
63
|
message: decision.reason,
|
|
58
64
|
data: { reason: decision.reason }
|
|
59
65
|
});
|
|
66
|
+
}
|
|
60
67
|
return null;
|
|
61
68
|
}
|
|
62
69
|
export function parseAndApplyUnknownKeyPolicy(operation, rawInput, policyKey, pipelineTrace) {
|
|
@@ -166,23 +173,30 @@ function safeParseInput(inputSchema, input) {
|
|
|
166
173
|
function isAuthorizationDecision(value) {
|
|
167
174
|
if (typeof value !== "object" || value === null)
|
|
168
175
|
return !1;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
allowed = value.allowed;
|
|
172
|
-
} catch {
|
|
176
|
+
const allowed = readObjectProperty(value, "allowed");
|
|
177
|
+
if (!allowed.ok)
|
|
173
178
|
return !1;
|
|
174
|
-
|
|
175
|
-
if (allowed === !0)
|
|
179
|
+
if (allowed.value === !0)
|
|
176
180
|
return !0;
|
|
177
|
-
if (allowed !== !1)
|
|
181
|
+
if (allowed.value !== !1)
|
|
182
|
+
return !1;
|
|
183
|
+
const reason = readObjectProperty(value, "reason");
|
|
184
|
+
if (!reason.ok || typeof reason.value !== "string")
|
|
178
185
|
return !1;
|
|
179
|
-
|
|
186
|
+
const classification = readObjectProperty(value, "classification");
|
|
187
|
+
if (!classification.ok)
|
|
188
|
+
return !1;
|
|
189
|
+
return isAuthorizationFailureClassification(classification.value);
|
|
190
|
+
}
|
|
191
|
+
function readObjectProperty(value, property) {
|
|
180
192
|
try {
|
|
181
|
-
|
|
193
|
+
return { ok: !0, value: value[property] };
|
|
182
194
|
} catch {
|
|
183
|
-
return !1;
|
|
195
|
+
return { ok: !1 };
|
|
184
196
|
}
|
|
185
|
-
|
|
197
|
+
}
|
|
198
|
+
function isAuthorizationFailureClassification(value) {
|
|
199
|
+
return value === void 0 || value === "unauthorized" || value === "forbidden";
|
|
186
200
|
}
|
|
187
201
|
function failure(fault) {
|
|
188
202
|
return { ok: !1, fault };
|
|
@@ -10,7 +10,14 @@ export async function executeOperation(operationName, rawInput, context) {
|
|
|
10
10
|
const lookup = lookupOperation(operationName, context);
|
|
11
11
|
if (!lookup.ok)
|
|
12
12
|
return lookup;
|
|
13
|
-
const operation = lookup.value,
|
|
13
|
+
const operation = lookup.value, operationKind = operation.kind ?? "unary";
|
|
14
|
+
if (operationKind === "subscription" || operationKind === "stream" && context.transport !== "http-rest")
|
|
15
|
+
return dispatchFailure({
|
|
16
|
+
code: "Unprocessable",
|
|
17
|
+
message: `operation "${operation.name}" is not unary`,
|
|
18
|
+
data: { reason: `operation kind is "${operationKind}"` }
|
|
19
|
+
});
|
|
20
|
+
const prepared = await prepareAuthorizedInput(operation, rawInput, context);
|
|
14
21
|
if (!prepared.ok)
|
|
15
22
|
return prepared;
|
|
16
23
|
let output;
|
|
@@ -28,6 +28,18 @@ function freezeScopeRequirement(requirement) {
|
|
|
28
28
|
scopes
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
function freezeParameterizedAccessHint(hint) {
|
|
32
|
+
if (hint === void 0)
|
|
33
|
+
return;
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
discriminator: hint.discriminator,
|
|
36
|
+
...hint.defaultValue === void 0 ? {} : { defaultValue: hint.defaultValue },
|
|
37
|
+
variants: Object.freeze(hint.variants.map((variant) => Object.freeze({
|
|
38
|
+
value: variant.value,
|
|
39
|
+
access: freezeAccessPolicy(variant.access)
|
|
40
|
+
})))
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
function objectInputSchema(operation) {
|
|
32
44
|
if (!(operation.inputSchema instanceof z.ZodObject))
|
|
33
45
|
throw Error(`operation "${operation.name}" inputSchema must be a z.ZodObject (got ${operation.inputSchema.constructor.name}); wrappers like .optional() / transforms hide the top-level shape from the unknown-key policy check`);
|
|
@@ -64,6 +76,7 @@ function freezeOperation(operation) {
|
|
|
64
76
|
tags: Object.freeze([...operation.tags]),
|
|
65
77
|
...operation.producibleFaults === void 0 ? {} : { producibleFaults: Object.freeze([...operation.producibleFaults]) },
|
|
66
78
|
access: freezeAccessPolicy(operation.access),
|
|
79
|
+
...operation.parameterizedAccess === void 0 ? {} : { parameterizedAccess: freezeParameterizedAccessHint(operation.parameterizedAccess) },
|
|
67
80
|
...operation.mcpTool === void 0 ? {} : { mcpTool: Object.freeze({ workflowType: operation.mcpTool.workflowType }) },
|
|
68
81
|
transports: Object.freeze({ ...operation.transports }),
|
|
69
82
|
unknownKeyPolicy: Object.freeze({ ...operation.unknownKeyPolicy })
|
|
@@ -44,7 +44,7 @@ export type SubscriptionOperationInvocation<Element, Envelope> = {
|
|
|
44
44
|
readonly iterable: AsyncIterable<Element>;
|
|
45
45
|
readonly close: () => Promise<void>;
|
|
46
46
|
};
|
|
47
|
-
export type OperationInvocationResult<Output> = Output | StreamOperationInvocation<
|
|
47
|
+
export type OperationInvocationResult<Output, Element = unknown> = Output | StreamOperationInvocation<Element> | SubscriptionOperationInvocation<Element, Output>;
|
|
48
48
|
/**
|
|
49
49
|
* Metadata that connects an operation-catalog entry to a live MCP tool.
|
|
50
50
|
*
|
|
@@ -65,8 +65,17 @@ export type AuthorizationDecision = {
|
|
|
65
65
|
allowed: true;
|
|
66
66
|
} | {
|
|
67
67
|
allowed: false;
|
|
68
|
+
classification?: 'unauthorized' | 'forbidden';
|
|
68
69
|
reason: string;
|
|
69
70
|
};
|
|
71
|
+
export type ParameterizedAccessHint = {
|
|
72
|
+
readonly discriminator: string;
|
|
73
|
+
readonly defaultValue?: string;
|
|
74
|
+
readonly variants: ReadonlyArray<{
|
|
75
|
+
readonly value: string;
|
|
76
|
+
readonly access: AccessPolicy;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
70
79
|
/**
|
|
71
80
|
* Stable audit markers emitted after each successful operation pipeline stage.
|
|
72
81
|
*/
|
|
@@ -89,7 +98,7 @@ export type OperationContext<Input> = {
|
|
|
89
98
|
* Common operation fields shared by unary, stream, and subscription kinds.
|
|
90
99
|
* The discriminated union below adds `kind` and `eventSchema` per kind.
|
|
91
100
|
*/
|
|
92
|
-
type OperationDefinitionBase<Input, Output> = {
|
|
101
|
+
type OperationDefinitionBase<Input, Output, Element = unknown> = {
|
|
93
102
|
readonly name: string;
|
|
94
103
|
readonly mcpExposable: boolean;
|
|
95
104
|
readonly mcpTool?: McpToolMetadata;
|
|
@@ -127,6 +136,7 @@ type OperationDefinitionBase<Input, Output> = {
|
|
|
127
136
|
*/
|
|
128
137
|
readonly outputSchema: z.ZodType<Output>;
|
|
129
138
|
readonly access: AccessPolicy;
|
|
139
|
+
readonly parameterizedAccess?: ParameterizedAccessHint;
|
|
130
140
|
/** Fault codes this operation can raise in addition to universal pipeline defaults. */
|
|
131
141
|
readonly producibleFaults?: ReadonlyArray<FaultCode>;
|
|
132
142
|
/** Whether non-public operations should appear in generated discovery documents. */
|
|
@@ -134,7 +144,7 @@ type OperationDefinitionBase<Input, Output> = {
|
|
|
134
144
|
readonly transports: TransportAvailability;
|
|
135
145
|
readonly unknownKeyPolicy: UnknownKeyPolicy;
|
|
136
146
|
readonly authorize?: (context: OperationContext<Input>) => Promise<AuthorizationDecision>;
|
|
137
|
-
readonly invoke: (context: OperationContext<Input>) => Promise<OperationInvocationResult<Output>>;
|
|
147
|
+
readonly invoke: (context: OperationContext<Input>) => Promise<OperationInvocationResult<Output, Element>>;
|
|
138
148
|
};
|
|
139
149
|
/**
|
|
140
150
|
* Unary (request/response) operation. `kind` may be omitted (defaults to
|
|
@@ -143,7 +153,7 @@ type OperationDefinitionBase<Input, Output> = {
|
|
|
143
153
|
* enforces this at the type level: passing `eventSchema` to a unary
|
|
144
154
|
* operation is a TypeScript error, not a silent runtime mismatch.
|
|
145
155
|
*/
|
|
146
|
-
type UnaryOperationDefinition<Input, Output> = OperationDefinitionBase<Input, Output> & {
|
|
156
|
+
type UnaryOperationDefinition<Input, Output, Element = unknown> = OperationDefinitionBase<Input, Output, Element> & {
|
|
147
157
|
readonly kind?: 'unary';
|
|
148
158
|
readonly eventSchema?: never;
|
|
149
159
|
};
|
|
@@ -154,9 +164,9 @@ type UnaryOperationDefinition<Input, Output> = OperationDefinitionBase<Input, Ou
|
|
|
154
164
|
* have no contract to validate per-element output against, which would
|
|
155
165
|
* silently leak un-validated data to consumers.
|
|
156
166
|
*/
|
|
157
|
-
type StreamOperationDefinition<Input, Output> = OperationDefinitionBase<Input, Output> & {
|
|
167
|
+
type StreamOperationDefinition<Input, Output, Element> = OperationDefinitionBase<Input, Output, Element> & {
|
|
158
168
|
readonly kind: 'stream';
|
|
159
|
-
readonly eventSchema: z.ZodType
|
|
169
|
+
readonly eventSchema: z.ZodType<Element>;
|
|
160
170
|
};
|
|
161
171
|
/**
|
|
162
172
|
* WebSocket subscription operation. `kind: 'subscription'` is required and
|
|
@@ -164,9 +174,9 @@ type StreamOperationDefinition<Input, Output> = OperationDefinitionBase<Input, O
|
|
|
164
174
|
* rationale as `StreamOperationDefinition` — the type forbids declaring a
|
|
165
175
|
* subscription without its element schema.
|
|
166
176
|
*/
|
|
167
|
-
type SubscriptionOperationDefinition<Input, Output> = OperationDefinitionBase<Input, Output> & {
|
|
177
|
+
type SubscriptionOperationDefinition<Input, Output, Element> = OperationDefinitionBase<Input, Output, Element> & {
|
|
168
178
|
readonly kind: 'subscription';
|
|
169
|
-
readonly eventSchema: z.ZodType
|
|
179
|
+
readonly eventSchema: z.ZodType<Element>;
|
|
170
180
|
};
|
|
171
181
|
/**
|
|
172
182
|
* Discriminated union over the three operation kinds. The discriminator
|
|
@@ -176,7 +186,7 @@ type SubscriptionOperationDefinition<Input, Output> = OperationDefinitionBase<In
|
|
|
176
186
|
* rather than a runtime EngineFailure; unary operations cannot
|
|
177
187
|
* accidentally carry an `eventSchema` that the pipeline would never read.
|
|
178
188
|
*/
|
|
179
|
-
export type OperationDefinition<Input, Output> = UnaryOperationDefinition<Input, Output> | StreamOperationDefinition<Input, Output> | SubscriptionOperationDefinition<Input, Output>;
|
|
189
|
+
export type OperationDefinition<Input, Output, Element = unknown> = UnaryOperationDefinition<Input, Output, Element> | StreamOperationDefinition<Input, Output, Element> | SubscriptionOperationDefinition<Input, Output, Element>;
|
|
180
190
|
/**
|
|
181
191
|
* An operation with its Input/Output type parameters erased. The dispatcher
|
|
182
192
|
* only feeds values that have been validated by the operation's own schema.
|
|
@@ -207,6 +217,7 @@ type RegistrableOperationBase = {
|
|
|
207
217
|
readonly inputSchema: z.ZodType;
|
|
208
218
|
readonly outputSchema: z.ZodType;
|
|
209
219
|
readonly access: AccessPolicy;
|
|
220
|
+
readonly parameterizedAccess?: ParameterizedAccessHint;
|
|
210
221
|
/** Fault codes this operation can raise in addition to universal pipeline defaults. */
|
|
211
222
|
readonly producibleFaults?: ReadonlyArray<FaultCode>;
|
|
212
223
|
/** Whether non-public operations should appear in generated discovery documents. */
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
* See Track 8 design decision 4.
|
|
34
34
|
*/
|
|
35
35
|
import type { FaultCode } from '../core/fault-code.ts';
|
|
36
|
+
import type { WeftErrorCode } from '../core/weft-error.ts';
|
|
36
37
|
export type { FaultCode };
|
|
37
38
|
/** Transport identifiers as seen by `executeOperation`. */
|
|
38
39
|
export type TransportKind = 'http-rest' | 'jsonRpcHttp' | 'jsonRpcWebSocket' | 'jsonRpcStdio';
|
|
@@ -65,12 +66,14 @@ export type OperationFault = {
|
|
|
65
66
|
data: {
|
|
66
67
|
resource: string;
|
|
67
68
|
identifier?: string | undefined;
|
|
69
|
+
weftCode?: WeftErrorCode;
|
|
68
70
|
};
|
|
69
71
|
} | {
|
|
70
72
|
code: 'Conflict';
|
|
71
73
|
message: string;
|
|
72
74
|
data: {
|
|
73
75
|
reason: string;
|
|
76
|
+
weftCode?: WeftErrorCode;
|
|
74
77
|
missingTypes?: readonly string[] | undefined;
|
|
75
78
|
missingWorkflowCount?: number | undefined;
|
|
76
79
|
samplesTruncated?: boolean | undefined;
|
|
@@ -81,6 +84,12 @@ export type OperationFault = {
|
|
|
81
84
|
data: {
|
|
82
85
|
reason: string;
|
|
83
86
|
};
|
|
87
|
+
} | {
|
|
88
|
+
code: 'PayloadTooLarge';
|
|
89
|
+
message: string;
|
|
90
|
+
data: {
|
|
91
|
+
maxBytes: number;
|
|
92
|
+
};
|
|
84
93
|
} | {
|
|
85
94
|
code: 'Timeout';
|
|
86
95
|
message: string;
|
|
@@ -110,6 +119,7 @@ export type OperationFault = {
|
|
|
110
119
|
message: string;
|
|
111
120
|
data: {
|
|
112
121
|
issues: ReadonlyArray<FlattenedZodIssue>;
|
|
122
|
+
weftCode?: WeftErrorCode;
|
|
113
123
|
};
|
|
114
124
|
} | {
|
|
115
125
|
code: 'MethodNotFound';
|
|
@@ -5,6 +5,7 @@ export const FAULT_CODE_TO_HTTP_STATUS = Object.freeze({
|
|
|
5
5
|
Conflict: 409,
|
|
6
6
|
Unprocessable: 422,
|
|
7
7
|
Timeout: 408,
|
|
8
|
+
PayloadTooLarge: 413,
|
|
8
9
|
NotImplemented: 501,
|
|
9
10
|
UnsupportedTransport: 501,
|
|
10
11
|
SubscriptionOverflow: 500,
|
|
@@ -41,6 +42,7 @@ export const FAULT_CODE_TO_JSON_RPC_CODE = Object.freeze({
|
|
|
41
42
|
Conflict: -32021,
|
|
42
43
|
Unprocessable: -32022,
|
|
43
44
|
Timeout: -32023,
|
|
45
|
+
PayloadTooLarge: -32024,
|
|
44
46
|
NotImplemented: -32025,
|
|
45
47
|
UnsupportedTransport: -32030,
|
|
46
48
|
SubscriptionOverflow: -32031,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { z } from 'zod';
|
|
20
20
|
import type { AccessPolicy } from './authorization.ts';
|
|
21
|
-
import {
|
|
21
|
+
import type { AuthorizationDecision, McpToolMetadata, OperationContext, OperationDefinition, OperationInvocationResult, ParameterizedAccessHint, TransportAvailability, UnknownKeyPolicy } from './operation-catalog/types.ts';
|
|
22
22
|
import type { FaultCode } from './operation-fault.ts';
|
|
23
23
|
export { isValidOperationName, validateOperationName } from './operation-catalog.ts';
|
|
24
24
|
/**
|
|
@@ -31,10 +31,10 @@ export { isValidOperationName, validateOperationName } from './operation-catalog
|
|
|
31
31
|
* passes. When present, BOTH `access` AND `authorize` must permit the
|
|
32
32
|
* call: the policy runs first, then the parameter-aware hook.
|
|
33
33
|
*/
|
|
34
|
-
type OperationDefinitionInputBase<Input, Output> = {
|
|
34
|
+
type OperationDefinitionInputBase<Input, Output, Element = unknown> = {
|
|
35
35
|
readonly name: string;
|
|
36
36
|
readonly mcpExposable: boolean;
|
|
37
|
-
readonly mcpTool?:
|
|
37
|
+
readonly mcpTool?: McpToolMetadata;
|
|
38
38
|
readonly summary: string;
|
|
39
39
|
/**
|
|
40
40
|
* Optional longer-form prose. See {@link OperationDefinition} for the
|
|
@@ -53,12 +53,13 @@ type OperationDefinitionInputBase<Input, Output> = {
|
|
|
53
53
|
readonly inputSchema: z.ZodType<Input>;
|
|
54
54
|
readonly outputSchema: z.ZodType<Output>;
|
|
55
55
|
readonly access: AccessPolicy;
|
|
56
|
+
readonly parameterizedAccess?: ParameterizedAccessHint;
|
|
56
57
|
readonly producibleFaults?: ReadonlyArray<FaultCode>;
|
|
57
58
|
readonly discoverable?: boolean;
|
|
58
59
|
readonly transports: TransportAvailability;
|
|
59
60
|
readonly unknownKeyPolicy: UnknownKeyPolicy;
|
|
60
|
-
readonly authorize?:
|
|
61
|
-
readonly invoke:
|
|
61
|
+
readonly authorize?: (context: OperationContext<Input>) => Promise<AuthorizationDecision>;
|
|
62
|
+
readonly invoke: (context: OperationContext<Input>) => Promise<OperationInvocationResult<Output, Element>>;
|
|
62
63
|
};
|
|
63
64
|
/**
|
|
64
65
|
* Discriminated input for `defineOperation`, mirroring the discriminated
|
|
@@ -68,15 +69,15 @@ type OperationDefinitionInputBase<Input, Output> = {
|
|
|
68
69
|
* that would otherwise fire when a streaming operation tries to validate
|
|
69
70
|
* elements without a schema.
|
|
70
71
|
*/
|
|
71
|
-
export type OperationDefinitionInput<Input, Output> = (OperationDefinitionInputBase<Input, Output> & {
|
|
72
|
+
export type OperationDefinitionInput<Input, Output, Element = unknown> = (OperationDefinitionInputBase<Input, Output, Element> & {
|
|
72
73
|
readonly kind?: 'unary';
|
|
73
74
|
readonly eventSchema?: never;
|
|
74
|
-
}) | (OperationDefinitionInputBase<Input, Output> & {
|
|
75
|
+
}) | (OperationDefinitionInputBase<Input, Output, Element> & {
|
|
75
76
|
readonly kind: 'stream';
|
|
76
|
-
readonly eventSchema: z.ZodType
|
|
77
|
-
}) | (OperationDefinitionInputBase<Input, Output> & {
|
|
77
|
+
readonly eventSchema: z.ZodType<Element>;
|
|
78
|
+
}) | (OperationDefinitionInputBase<Input, Output, Element> & {
|
|
78
79
|
readonly kind: 'subscription';
|
|
79
|
-
readonly eventSchema: z.ZodType
|
|
80
|
+
readonly eventSchema: z.ZodType<Element>;
|
|
80
81
|
});
|
|
81
82
|
/**
|
|
82
83
|
* Typed builder for a single operation. Validates the name at construction
|
|
@@ -97,4 +98,4 @@ export type OperationDefinitionInput<Input, Output> = (OperationDefinitionInputB
|
|
|
97
98
|
* the assembly check is the trust boundary that OpenRPC discovery and
|
|
98
99
|
* JSON-RPC dispatch rely on.
|
|
99
100
|
*/
|
|
100
|
-
export declare function defineOperation<Input, Output>(input: OperationDefinitionInput<Input, Output>): OperationDefinition<Input, Output>;
|
|
101
|
+
export declare function defineOperation<Input, Output, Element = unknown>(input: OperationDefinitionInput<Input, Output, Element>): OperationDefinition<Input, Output, Element>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validateOperationName
|
|
3
|
-
} from "./operation-catalog.js";
|
|
1
|
+
import { validateOperationName } from "./operation-catalog.js";
|
|
4
2
|
export { isValidOperationName, validateOperationName } from "./operation-catalog.js";
|
|
5
3
|
export function defineOperation(input) {
|
|
6
4
|
validateOperationName(input.name);
|
|
@@ -14,6 +12,7 @@ export function defineOperation(input) {
|
|
|
14
12
|
destructive: input.destructive,
|
|
15
13
|
inputSchema: input.inputSchema,
|
|
16
14
|
outputSchema: input.outputSchema,
|
|
15
|
+
...input.parameterizedAccess === void 0 ? {} : { parameterizedAccess: copyParameterizedAccessHint(input.parameterizedAccess) },
|
|
17
16
|
...input.producibleFaults === void 0 ? {} : { producibleFaults: [...input.producibleFaults] },
|
|
18
17
|
...input.discoverable === void 0 ? {} : { discoverable: input.discoverable },
|
|
19
18
|
access: copyAccessPolicy(input.access),
|
|
@@ -30,6 +29,16 @@ export function defineOperation(input) {
|
|
|
30
29
|
...baseFields
|
|
31
30
|
};
|
|
32
31
|
}
|
|
32
|
+
function copyParameterizedAccessHint(hint) {
|
|
33
|
+
return {
|
|
34
|
+
discriminator: hint.discriminator,
|
|
35
|
+
...hint.defaultValue === void 0 ? {} : { defaultValue: hint.defaultValue },
|
|
36
|
+
variants: hint.variants.map((variant) => ({
|
|
37
|
+
value: variant.value,
|
|
38
|
+
access: copyAccessPolicy(variant.access)
|
|
39
|
+
}))
|
|
40
|
+
};
|
|
41
|
+
}
|
|
33
42
|
function copyAccessPolicy(policy) {
|
|
34
43
|
if (policy.kind === "scoped")
|
|
35
44
|
return {
|
|
@@ -5,13 +5,6 @@ declare const aggregateWorkflowsInput: z.ZodObject<{
|
|
|
5
5
|
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<import("../../index.ts").WorkflowStatus, unknown, z.core.$ZodTypeInternals<import("../../index.ts").WorkflowStatus, unknown>>, z.ZodArray<z.ZodType<import("../../index.ts").WorkflowStatus, unknown, z.core.$ZodTypeInternals<import("../../index.ts").WorkflowStatus, unknown>>>]>>;
|
|
6
6
|
type: z.ZodOptional<z.ZodString>;
|
|
7
7
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
idPrefix: z.ZodOptional<z.ZodString>;
|
|
9
|
-
createdAt: z.ZodOptional<z.ZodObject<{
|
|
10
|
-
gte: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
lte: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
gt: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
lt: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
}, z.core.$strict>>;
|
|
15
8
|
attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
9
|
key: z.ZodUnion<readonly [z.ZodString, z.ZodAny]>;
|
|
17
10
|
value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -20,6 +13,13 @@ declare const aggregateWorkflowsInput: z.ZodObject<{
|
|
|
20
13
|
gte: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
21
14
|
lte: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
22
15
|
}, z.core.$strip>>>;
|
|
16
|
+
idPrefix: z.ZodOptional<z.ZodString>;
|
|
17
|
+
createdAt: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
gte: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
lte: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
gt: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
lt: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
23
|
updatedAt: z.ZodOptional<z.ZodObject<{
|
|
24
24
|
gte: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
lte: z.ZodOptional<z.ZodNumber>;
|
|
@@ -47,13 +47,6 @@ export declare const aggregateWorkflowsOperation: import("../operation-catalog.t
|
|
|
47
47
|
status?: import("../../index.ts").WorkflowStatus | import("../../index.ts").WorkflowStatus[] | undefined;
|
|
48
48
|
type?: string | undefined;
|
|
49
49
|
tags?: string[] | undefined;
|
|
50
|
-
idPrefix?: string | undefined;
|
|
51
|
-
createdAt?: {
|
|
52
|
-
gte?: number | undefined;
|
|
53
|
-
lte?: number | undefined;
|
|
54
|
-
gt?: number | undefined;
|
|
55
|
-
lt?: number | undefined;
|
|
56
|
-
} | undefined;
|
|
57
50
|
attributes?: {
|
|
58
51
|
key: any;
|
|
59
52
|
value?: unknown;
|
|
@@ -62,6 +55,13 @@ export declare const aggregateWorkflowsOperation: import("../operation-catalog.t
|
|
|
62
55
|
gte?: unknown;
|
|
63
56
|
lte?: unknown;
|
|
64
57
|
}[] | undefined;
|
|
58
|
+
idPrefix?: string | undefined;
|
|
59
|
+
createdAt?: {
|
|
60
|
+
gte?: number | undefined;
|
|
61
|
+
lte?: number | undefined;
|
|
62
|
+
gt?: number | undefined;
|
|
63
|
+
lt?: number | undefined;
|
|
64
|
+
} | undefined;
|
|
65
65
|
updatedAt?: {
|
|
66
66
|
gte?: number | undefined;
|
|
67
67
|
lte?: number | undefined;
|
|
@@ -76,6 +76,6 @@ export declare const aggregateWorkflowsOperation: import("../operation-catalog.t
|
|
|
76
76
|
} | undefined;
|
|
77
77
|
failureCategory?: import("../../index.ts").FailureCategory | import("../../index.ts").FailureCategory[] | undefined;
|
|
78
78
|
limit?: number | undefined;
|
|
79
|
-
}, AggregateResult>;
|
|
79
|
+
}, AggregateResult, unknown>;
|
|
80
80
|
export declare const aggregateWorkflowsRestBinding: UnknownRestBinding;
|
|
81
81
|
export {};
|
|
@@ -29,7 +29,7 @@ export declare const completeAsyncActivityOperation: import("../operation-catalo
|
|
|
29
29
|
result?: unknown;
|
|
30
30
|
}, {
|
|
31
31
|
ok: true;
|
|
32
|
-
}>;
|
|
32
|
+
}, unknown>;
|
|
33
33
|
export declare const failAsyncActivityOperation: import("../operation-catalog.ts").OperationDefinition<{
|
|
34
34
|
token: string;
|
|
35
35
|
error: {
|
|
@@ -38,7 +38,7 @@ export declare const failAsyncActivityOperation: import("../operation-catalog.ts
|
|
|
38
38
|
};
|
|
39
39
|
}, {
|
|
40
40
|
ok: true;
|
|
41
|
-
}>;
|
|
41
|
+
}, unknown>;
|
|
42
42
|
export declare const completeAsyncActivityRestBinding: UnknownRestBinding;
|
|
43
43
|
export declare const failAsyncActivityRestBinding: UnknownRestBinding;
|
|
44
44
|
export {};
|
|
@@ -3,7 +3,8 @@ import { AsyncActivityTokenNotFoundError } from "../../core/engine.js";
|
|
|
3
3
|
import { PayloadSizeExceededError } from "../../core/payload-size.js";
|
|
4
4
|
import { raiseFault } from "../operation-catalog.js";
|
|
5
5
|
import { defineOperation } from "../operation-registry.js";
|
|
6
|
-
import {
|
|
6
|
+
import { readRestJsonBody } from "../rest-body.js";
|
|
7
|
+
import { invalidParamsFault, isOperationFault, shapeRestFault } from "./operation-helpers.js";
|
|
7
8
|
const asyncActivityAccess = { kind: "public" }, httpAndJsonRpcTransports = {
|
|
8
9
|
http: !0,
|
|
9
10
|
jsonRpcHttp: !0,
|
|
@@ -87,8 +88,12 @@ function shapeAsyncActivitySuccess(output) {
|
|
|
87
88
|
headers: { "Content-Type": "application/json" }
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
|
-
async function readJsonObjectBody(request) {
|
|
91
|
-
const body = await request
|
|
91
|
+
async function readJsonObjectBody(request, context) {
|
|
92
|
+
const body = await readRestJsonBody(request, context).catch((error) => {
|
|
93
|
+
if (isOperationFault(error))
|
|
94
|
+
throw error;
|
|
95
|
+
return null;
|
|
96
|
+
});
|
|
92
97
|
if (typeof body !== "object" || body === null || Array.isArray(body))
|
|
93
98
|
throw invalidParamsFault("Request body must be a JSON object.");
|
|
94
99
|
return body;
|
|
@@ -102,8 +107,8 @@ export const completeAsyncActivityRestBinding = {
|
|
|
102
107
|
token: { kind: "body-field", bodyField: "token" },
|
|
103
108
|
result: { kind: "body-field", bodyField: "result" }
|
|
104
109
|
},
|
|
105
|
-
extractInput: async (request) => {
|
|
106
|
-
const body = await readJsonObjectBody(request);
|
|
110
|
+
extractInput: async (request, _pathParams, context) => {
|
|
111
|
+
const body = await readJsonObjectBody(request, context);
|
|
107
112
|
return {
|
|
108
113
|
token: body.token,
|
|
109
114
|
..."result" in body ? { result: body.result } : {}
|
|
@@ -121,8 +126,8 @@ export const completeAsyncActivityRestBinding = {
|
|
|
121
126
|
token: { kind: "body-field", bodyField: "token" },
|
|
122
127
|
error: { kind: "body-field", bodyField: "error" }
|
|
123
128
|
},
|
|
124
|
-
extractInput: async (request) => {
|
|
125
|
-
const body = await readJsonObjectBody(request);
|
|
129
|
+
extractInput: async (request, _pathParams, context) => {
|
|
130
|
+
const body = await readJsonObjectBody(request, context);
|
|
126
131
|
return {
|
|
127
132
|
token: body.token,
|
|
128
133
|
error: body.error
|
|
@@ -3,5 +3,5 @@ import type { UnknownRestBinding } from '../rest-bindings.ts';
|
|
|
3
3
|
import { type BulkListFilterInput, type BulkOperationControlInput } from './bulk-filter-helpers.ts';
|
|
4
4
|
export type BulkCancelWorkflowsInput = BulkListFilterInput & BulkOperationControlInput;
|
|
5
5
|
export type BulkCancelWorkflowsOutput = BulkCancelResult | BulkOperationDryRunResult;
|
|
6
|
-
export declare const bulkCancelWorkflowsOperation: import("../operation-catalog.ts").OperationDefinition<BulkCancelWorkflowsInput, BulkCancelWorkflowsOutput>;
|
|
6
|
+
export declare const bulkCancelWorkflowsOperation: import("../operation-catalog.ts").OperationDefinition<BulkCancelWorkflowsInput, BulkCancelWorkflowsOutput, unknown>;
|
|
7
7
|
export declare const bulkCancelWorkflowsRestBinding: UnknownRestBinding;
|
|
@@ -47,8 +47,8 @@ export const bulkCancelWorkflowsOperation = defineOperation({
|
|
|
47
47
|
pathParamNames: [],
|
|
48
48
|
operationName: "weft.workflows.bulk.cancel",
|
|
49
49
|
inputSources: {},
|
|
50
|
-
extractInput: async (request) => {
|
|
51
|
-
const raw = await readOptionalJsonBody(request);
|
|
50
|
+
extractInput: async (request, _pathParams, context) => {
|
|
51
|
+
const raw = await readOptionalJsonBody(request, context);
|
|
52
52
|
try {
|
|
53
53
|
return {
|
|
54
54
|
...parseBulkListFilterFromBody(raw),
|
|
@@ -3,5 +3,5 @@ import type { UnknownRestBinding } from '../rest-bindings.ts';
|
|
|
3
3
|
import { type BulkListFilterInput, type BulkOperationControlInput } from './bulk-filter-helpers.ts';
|
|
4
4
|
export type BulkDeleteWorkflowsInput = BulkListFilterInput & BulkOperationControlInput;
|
|
5
5
|
export type BulkDeleteWorkflowsOutput = BulkDeleteResult | BulkOperationDryRunResult;
|
|
6
|
-
export declare const bulkDeleteWorkflowsOperation: import("../operation-catalog.ts").OperationDefinition<BulkDeleteWorkflowsInput, BulkDeleteWorkflowsOutput>;
|
|
6
|
+
export declare const bulkDeleteWorkflowsOperation: import("../operation-catalog.ts").OperationDefinition<BulkDeleteWorkflowsInput, BulkDeleteWorkflowsOutput, unknown>;
|
|
7
7
|
export declare const bulkDeleteWorkflowsRestBinding: UnknownRestBinding;
|
|
@@ -54,8 +54,8 @@ export const bulkDeleteWorkflowsOperation = defineOperation({
|
|
|
54
54
|
pathParamNames: [],
|
|
55
55
|
operationName: "weft.workflows.bulk.delete",
|
|
56
56
|
inputSources: {},
|
|
57
|
-
extractInput: async (request) => {
|
|
58
|
-
const raw = await readOptionalJsonBody(request);
|
|
57
|
+
extractInput: async (request, _pathParams, context) => {
|
|
58
|
+
const raw = await readOptionalJsonBody(request, context);
|
|
59
59
|
try {
|
|
60
60
|
return {
|
|
61
61
|
...parseBulkListFilterFromBody(raw),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { BulkOperationCommitOptions, BulkOperationDryRunOptions, FailureCategory, ListFilter, SearchAttributeValue, WorkflowStatus } from '../../core/types.ts';
|
|
2
|
+
import type { AttributeFilterScalarValue, BulkOperationCommitOptions, BulkOperationDryRunOptions, FailureCategory, ListFilter, SearchAttributeValue, WorkflowStatus } from '../../core/types.ts';
|
|
3
3
|
import type { OperationFault } from '../operation-fault.ts';
|
|
4
4
|
import type { Principal } from '../principal.ts';
|
|
5
|
+
import type { RestInputContext } from '../rest-binding.ts';
|
|
5
6
|
export declare const bulkListFilterInputSchema: z.ZodObject<{
|
|
6
7
|
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<WorkflowStatus, WorkflowStatus>, z.ZodArray<z.ZodCustom<WorkflowStatus, WorkflowStatus>>]>>;
|
|
7
8
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -9,10 +10,10 @@ export declare const bulkListFilterInputSchema: z.ZodObject<{
|
|
|
9
10
|
attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
11
|
key: z.ZodString;
|
|
11
12
|
value: z.ZodOptional<z.ZodCustom<SearchAttributeValue, SearchAttributeValue>>;
|
|
12
|
-
gt: z.ZodOptional<z.ZodCustom<
|
|
13
|
-
lt: z.ZodOptional<z.ZodCustom<
|
|
14
|
-
gte: z.ZodOptional<z.ZodCustom<
|
|
15
|
-
lte: z.ZodOptional<z.ZodCustom<
|
|
13
|
+
gt: z.ZodOptional<z.ZodCustom<AttributeFilterScalarValue, AttributeFilterScalarValue>>;
|
|
14
|
+
lt: z.ZodOptional<z.ZodCustom<AttributeFilterScalarValue, AttributeFilterScalarValue>>;
|
|
15
|
+
gte: z.ZodOptional<z.ZodCustom<AttributeFilterScalarValue, AttributeFilterScalarValue>>;
|
|
16
|
+
lte: z.ZodOptional<z.ZodCustom<AttributeFilterScalarValue, AttributeFilterScalarValue>>;
|
|
16
17
|
}, z.core.$strip>>>;
|
|
17
18
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
18
19
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
@@ -42,6 +43,7 @@ export declare const bulkOperationControlInputSchema: z.ZodObject<{
|
|
|
42
43
|
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
43
44
|
confirmationToken: z.ZodOptional<z.ZodString>;
|
|
44
45
|
requestId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
bulkConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
45
47
|
}, z.core.$strip>;
|
|
46
48
|
export type BulkOperationControlInput = z.infer<typeof bulkOperationControlInputSchema>;
|
|
47
49
|
export declare const bulkOperatorAccessPolicy: {
|
|
@@ -54,7 +56,7 @@ export declare const bulkOperatorAccessPolicy: {
|
|
|
54
56
|
export declare function faultMessage(error: unknown): string;
|
|
55
57
|
export declare function unprocessableFault(message: string): OperationFault;
|
|
56
58
|
export declare function engineFailureFault(message: string): OperationFault;
|
|
57
|
-
export declare function readOptionalJsonBody(request: Request): Promise<unknown>;
|
|
59
|
+
export declare function readOptionalJsonBody(request: Request, context?: RestInputContext): Promise<unknown>;
|
|
58
60
|
export declare function parseBulkListFilterFromBody(body: unknown): ListFilter;
|
|
59
61
|
export declare function parseRequiredBulkListFilter(body: unknown): ListFilter;
|
|
60
62
|
export declare function listFilterFromBulkInput(input: BulkListFilterInput): ListFilter;
|