@workflow/world-testing 5.0.0-beta.42 → 5.0.0-beta.44
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/dist/.well-known/workflow/v1/__step_registrations.mjs +263 -114
- package/dist/.well-known/workflow/v1/flow.mjs +2969 -1117
- package/dist/.well-known/workflow/v1/manifest.json +385 -385
- package/dist/src/event-ids.d.mts.map +1 -1
- package/dist/src/event-ids.mjs +11 -4
- package/dist/src/server.mjs +4 -1
- package/package.json +5 -5
|
@@ -50,6 +50,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
50
50
|
mod
|
|
51
51
|
));
|
|
52
52
|
|
|
53
|
+
// ../utils/dist/global-singleton.js
|
|
54
|
+
function globalSingleton(name, shapeVersion, create) {
|
|
55
|
+
const key = /* @__PURE__ */ Symbol.for(`${name}/v${shapeVersion}`);
|
|
56
|
+
const store = globalThis;
|
|
57
|
+
const existing = store[key];
|
|
58
|
+
if (existing !== void 0) {
|
|
59
|
+
return existing;
|
|
60
|
+
}
|
|
61
|
+
const created = create();
|
|
62
|
+
store[key] = created;
|
|
63
|
+
return created;
|
|
64
|
+
}
|
|
65
|
+
var init_global_singleton = __esm({
|
|
66
|
+
"../utils/dist/global-singleton.js"() {
|
|
67
|
+
"use strict";
|
|
68
|
+
__name(globalSingleton, "globalSingleton");
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
53
72
|
// ../utils/dist/parse-name.js
|
|
54
73
|
function parseName(tag, name) {
|
|
55
74
|
if (typeof name !== "string") {
|
|
@@ -319,30 +338,15 @@ var init_time = __esm({
|
|
|
319
338
|
}
|
|
320
339
|
});
|
|
321
340
|
|
|
322
|
-
// ../utils/dist/workflow-routes.js
|
|
323
|
-
var init_workflow_routes = __esm({
|
|
324
|
-
"../utils/dist/workflow-routes.js"() {
|
|
325
|
-
"use strict";
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
// ../utils/dist/world-target.js
|
|
330
|
-
var init_world_target = __esm({
|
|
331
|
-
"../utils/dist/world-target.js"() {
|
|
332
|
-
"use strict";
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
|
|
336
341
|
// ../utils/dist/index.js
|
|
337
342
|
var init_dist = __esm({
|
|
338
343
|
"../utils/dist/index.js"() {
|
|
339
344
|
"use strict";
|
|
345
|
+
init_global_singleton();
|
|
340
346
|
init_parse_name();
|
|
341
347
|
init_pluralize();
|
|
342
348
|
init_promise();
|
|
343
349
|
init_time();
|
|
344
|
-
init_workflow_routes();
|
|
345
|
-
init_world_target();
|
|
346
350
|
}
|
|
347
351
|
});
|
|
348
352
|
|
|
@@ -556,7 +560,7 @@ Caused by: ${options.cause.stack}`;
|
|
|
556
560
|
}
|
|
557
561
|
hint;
|
|
558
562
|
/**
|
|
559
|
-
* Serialization errors are deterministic
|
|
563
|
+
* Serialization errors are deterministic: if a step returns a non-POJO,
|
|
560
564
|
* replaying the step will always produce the same non-serializable value.
|
|
561
565
|
* Retrying is guaranteed to fail, so these errors are surfaced as fatal
|
|
562
566
|
* and skip the step-retry loop. `FatalError.is()` recognizes any error
|
|
@@ -16548,7 +16552,7 @@ var init_serialization = __esm({
|
|
|
16548
16552
|
});
|
|
16549
16553
|
|
|
16550
16554
|
// ../world/dist/events.js
|
|
16551
|
-
var EventTypeSchema, RunEventTypeSchema, RUN_EVENT_TYPES, TerminalRunEventTypeSchema, TERMINAL_RUN_EVENT_TYPES, StepEventTypeSchema, STEP_EVENT_TYPES, TerminalStepEventTypeSchema, TERMINAL_STEP_EVENT_TYPES, HookLifecycleEventTypeSchema, HOOK_LIFECYCLE_EVENT_TYPES, HookEventRequiringExistenceTypeSchema, HOOK_EVENTS_REQUIRING_EXISTENCE, WaitEventTypeSchema, WAIT_EVENT_TYPES, ChildEntityCreationEventTypeSchema, CHILD_ENTITY_CREATION_EVENT_TYPES, EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE, EVENT_DATA_REF_FIELDS, BaseEventSchema, stepLatencyTelemetryFields, StepCompletedEventSchema, StepFailedEventSchema, StepRetryingEventSchema, StepStartedEventSchema, StepCreatedEventSchema, HookCreatedEventSchema, HookReceivedEventSchema, HookDisposedEventSchema, HookConflictEventSchema, WaitCreatedEventSchema, WaitCompletedEventSchema, AttributeWriterSchema, AttrSetEventSchema, RunCreatedEventSchema, RunStartedEventSchema, RunCompletedEventSchema, RunFailedEventSchema, RunCancelledEventSchema, CreateEventSchema, AllEventsSchema, EventSchema;
|
|
16555
|
+
var EventTypeSchema, RunEventTypeSchema, RUN_EVENT_TYPES, TerminalRunEventTypeSchema, TERMINAL_RUN_EVENT_TYPES, StepEventTypeSchema, STEP_EVENT_TYPES, TerminalStepEventTypeSchema, TERMINAL_STEP_EVENT_TYPES, HookLifecycleEventTypeSchema, HOOK_LIFECYCLE_EVENT_TYPES, HookEventRequiringExistenceTypeSchema, HOOK_EVENTS_REQUIRING_EXISTENCE, WaitEventTypeSchema, WAIT_EVENT_TYPES, ChildEntityCreationEventTypeSchema, CHILD_ENTITY_CREATION_EVENT_TYPES, EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE, EVENT_DATA_REF_FIELDS, BaseEventSchema, stepLatencyTelemetryFields, StepCompletedEventSchema, StepFailedEventSchema, StepRetryingEventSchema, StepStartedEventSchema, StepCreatedEventSchema, HookCreatedEventSchema, HookReceivedEventSchema, HookDisposedEventSchema, HookConflictEventSchema, NoopEventSchema, WaitCreatedEventSchema, WaitCompletedEventSchema, AttributeWriterSchema, AttrSetEventSchema, RunCreatedEventSchema, RunStartedEventSchema, RunCompletedEventSchema, RunFailedEventSchema, RunCancelledEventSchema, CreateEventSchema, AllEventsSchema, EventSchema;
|
|
16552
16556
|
var init_events = __esm({
|
|
16553
16557
|
"../world/dist/events.js"() {
|
|
16554
16558
|
"use strict";
|
|
@@ -16577,7 +16581,11 @@ var init_events = __esm({
|
|
|
16577
16581
|
"hook_conflict",
|
|
16578
16582
|
// Wait lifecycle events
|
|
16579
16583
|
"wait_created",
|
|
16580
|
-
"wait_completed"
|
|
16584
|
+
"wait_completed",
|
|
16585
|
+
// Sealed-log filler (specVersion >= 7): written ONLY by the World's backend
|
|
16586
|
+
// to occupy a slot whose writer allocated it and died. Carries no workflow
|
|
16587
|
+
// meaning; replay skips it (see EventsConsumer). Never user-creatable.
|
|
16588
|
+
"noop"
|
|
16581
16589
|
]);
|
|
16582
16590
|
RunEventTypeSchema = EventTypeSchema.extract([
|
|
16583
16591
|
"run_created",
|
|
@@ -16674,7 +16682,7 @@ var init_events = __esm({
|
|
|
16674
16682
|
rsfs: external_exports.number().optional(),
|
|
16675
16683
|
// Synchronous workflow-function replay duration of only the FINAL replay
|
|
16676
16684
|
// pass within the rsfs window (the pass that scheduled the first step),
|
|
16677
|
-
// excluding awaited network I/O
|
|
16685
|
+
// excluding awaited network I/O. Not accumulated across earlier
|
|
16678
16686
|
// pre-first-step passes, so it is not "the replay portion of rsfs". Only
|
|
16679
16687
|
// present alongside rsfs, and only for the run's first step.
|
|
16680
16688
|
finalSchedulingReplay: external_exports.number().optional(),
|
|
@@ -16734,7 +16742,7 @@ var init_events = __esm({
|
|
|
16734
16742
|
// handler is executing this step's body inline. Stamped on the lazy
|
|
16735
16743
|
// step_started (and re-stamped on an owner-recovery bare start) so
|
|
16736
16744
|
// that a wake replay can tell "this attempt is in flight in a live
|
|
16737
|
-
// invocation" apart from "this attempt died with its process"
|
|
16745
|
+
// invocation" apart from "this attempt died with its process": the
|
|
16738
16746
|
// owner's queue message doubles as the liveness lease (a crash means
|
|
16739
16747
|
// the queue redelivers that same messageId, which is allowed to
|
|
16740
16748
|
// re-execute). Ownership derives from the step's LATEST step_started:
|
|
@@ -16790,6 +16798,12 @@ var init_events = __esm({
|
|
|
16790
16798
|
conflictingRunId: external_exports.string().optional()
|
|
16791
16799
|
})
|
|
16792
16800
|
});
|
|
16801
|
+
NoopEventSchema = BaseEventSchema.extend({
|
|
16802
|
+
eventType: external_exports.literal("noop"),
|
|
16803
|
+
eventData: external_exports.object({
|
|
16804
|
+
sealed: external_exports.boolean().optional()
|
|
16805
|
+
}).passthrough().optional()
|
|
16806
|
+
});
|
|
16793
16807
|
WaitCreatedEventSchema = BaseEventSchema.extend({
|
|
16794
16808
|
eventType: external_exports.literal("wait_created"),
|
|
16795
16809
|
correlationId: external_exports.string(),
|
|
@@ -16836,7 +16850,7 @@ var init_events = __esm({
|
|
|
16836
16850
|
* The run's X25519 public key (base64), stamped by SDKs that support
|
|
16837
16851
|
* sealed (`encp`) envelopes. Persisted onto the run entity so that
|
|
16838
16852
|
* cross-run writers can seal payloads to this run without holding its
|
|
16839
|
-
* symmetric key. Not secret
|
|
16853
|
+
* symmetric key. Not secret. See `WorkflowRunBaseSchema`.
|
|
16840
16854
|
*/
|
|
16841
16855
|
encryptionPublicKey: external_exports.string().optional()
|
|
16842
16856
|
})
|
|
@@ -16930,7 +16944,8 @@ var init_events = __esm({
|
|
|
16930
16944
|
HookConflictEventSchema,
|
|
16931
16945
|
// Wait lifecycle events
|
|
16932
16946
|
WaitCreatedEventSchema,
|
|
16933
|
-
WaitCompletedEventSchema
|
|
16947
|
+
WaitCompletedEventSchema,
|
|
16948
|
+
NoopEventSchema
|
|
16934
16949
|
]);
|
|
16935
16950
|
EventSchema = AllEventsSchema.and(external_exports.object({
|
|
16936
16951
|
runId: external_exports.string(),
|
|
@@ -16999,7 +17014,7 @@ var init_runs = __esm({
|
|
|
16999
17014
|
* ```
|
|
17000
17015
|
*/
|
|
17001
17016
|
workflowName: external_exports.string(),
|
|
17002
|
-
// Optional in database for
|
|
17017
|
+
// Optional in database for backward compatibility, defaults to 1 (legacy) when reading
|
|
17003
17018
|
specVersion: external_exports.number().optional(),
|
|
17004
17019
|
executionContext: external_exports.record(external_exports.string(), external_exports.any()).optional(),
|
|
17005
17020
|
input: SerializedDataSchema.optional(),
|
|
@@ -17027,12 +17042,12 @@ var init_runs = __esm({
|
|
|
17027
17042
|
*
|
|
17028
17043
|
* Defaults to `{}` after schema parsing so consumers always receive
|
|
17029
17044
|
* a record regardless of world. World adapters need not initialize
|
|
17030
|
-
* the field on disk
|
|
17045
|
+
* the field on disk: `world-local` JSON files written before this
|
|
17031
17046
|
* field existed, and rows from any other adapter that omits the
|
|
17032
17047
|
* column, both read as `{}` after Zod parses them.
|
|
17033
17048
|
*
|
|
17034
17049
|
* EXPERIMENTAL (MVP): the full Workflow Attributes feature replaces
|
|
17035
|
-
* the direct-mutation MVP path with an event-sourced model
|
|
17050
|
+
* the direct-mutation MVP path with an event-sourced model. See
|
|
17036
17051
|
* the attributes-mvp changelog entry.
|
|
17037
17052
|
*/
|
|
17038
17053
|
attributes: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
@@ -17040,12 +17055,12 @@ var init_runs = __esm({
|
|
|
17040
17055
|
* The run's X25519 public key, base64-encoded (~44 chars).
|
|
17041
17056
|
*
|
|
17042
17057
|
* Lets any party that can read this run seal a payload *to* it without
|
|
17043
|
-
* being able to read the run's data
|
|
17044
|
-
* hook resumption from another deployment, or a child workflow
|
|
17045
|
-
* a forwarded stream. The matching private scalar is never
|
|
17046
|
-
* re-derived on demand from the deployment's own key
|
|
17047
|
-
* field is not secret and its presence does not weaken
|
|
17048
|
-
* confidentiality.
|
|
17058
|
+
* being able to read the run's data. This is used for cross-run writes
|
|
17059
|
+
* such as a hook resumption from another deployment, or a child workflow
|
|
17060
|
+
* writing into a forwarded stream. The matching private scalar is never
|
|
17061
|
+
* stored: it is re-derived on demand from the deployment's own key
|
|
17062
|
+
* material, so this field is not secret and its presence does not weaken
|
|
17063
|
+
* the run's confidentiality.
|
|
17049
17064
|
*
|
|
17050
17065
|
* Stamped at run creation by SDKs that support sealed (`encp`) envelopes.
|
|
17051
17066
|
* **Presence is the writer-side gate**: a run only carries a public key if
|
|
@@ -17378,11 +17393,13 @@ function envNumber(name, fallback, options = {}) {
|
|
|
17378
17393
|
}
|
|
17379
17394
|
return parsed;
|
|
17380
17395
|
}
|
|
17381
|
-
var warnedEnvValues;
|
|
17396
|
+
var WarnedEnvValuesKey, globalStore, warnedEnvValues;
|
|
17382
17397
|
var init_env_config = __esm({
|
|
17383
17398
|
"../world/dist/env-config.js"() {
|
|
17384
17399
|
"use strict";
|
|
17385
|
-
|
|
17400
|
+
WarnedEnvValuesKey = /* @__PURE__ */ Symbol.for("@workflow/world//warnedEnvValues/v1");
|
|
17401
|
+
globalStore = globalThis;
|
|
17402
|
+
warnedEnvValues = globalStore[WarnedEnvValuesKey] ??= /* @__PURE__ */ new Set();
|
|
17386
17403
|
__name(warnOnce, "warnOnce");
|
|
17387
17404
|
__name(envNumber, "envNumber");
|
|
17388
17405
|
}
|
|
@@ -17457,12 +17474,12 @@ var init_queue = __esm({
|
|
|
17457
17474
|
* two can disagree: if the message is consumed by a deployment in a
|
|
17458
17475
|
* DIFFERENT environment, that consumer's `run_started` re-creates the run
|
|
17459
17476
|
* under ITS tenant, so the same client-minted `wrun_` id ends up existing
|
|
17460
|
-
* in two environments
|
|
17477
|
+
* in two environments: one stuck pending forever, the other executing.
|
|
17461
17478
|
* Carrying the creator's environment lets the consumer compare it against
|
|
17462
17479
|
* its own and refuse the delivery instead of forking the run.
|
|
17463
17480
|
*
|
|
17464
17481
|
* Absent for worlds with no environment dimension (local, Postgres), and
|
|
17465
|
-
* for older SDKs
|
|
17482
|
+
* for older SDKs. Consumers must treat it as advisory and skip the check
|
|
17466
17483
|
* when it is missing.
|
|
17467
17484
|
*/
|
|
17468
17485
|
environment: external_exports.string().optional()
|
|
@@ -17487,8 +17504,8 @@ var init_queue = __esm({
|
|
|
17487
17504
|
hookId: external_exports.string(),
|
|
17488
17505
|
/**
|
|
17489
17506
|
* The hook's token, written into the `hook_received` event's `eventData` so
|
|
17490
|
-
* the consumer's re-ensured event carries the same token the producer
|
|
17491
|
-
*
|
|
17507
|
+
* the consumer's re-ensured event carries the same token the producer
|
|
17508
|
+
* would. Replay validates `eventData.token` against the `createHook` token.
|
|
17492
17509
|
*/
|
|
17493
17510
|
token: external_exports.string(),
|
|
17494
17511
|
/** The serialized resume payload, reused verbatim from the direct write. */
|
|
@@ -17498,7 +17515,7 @@ var init_queue = __esm({
|
|
|
17498
17515
|
* serialized bytes and forwarded verbatim on both the direct `events.create`
|
|
17499
17516
|
* and this queue message. The consumer forwards it back to the server so both
|
|
17500
17517
|
* writers of the same `resumeId` record an identical digest on the
|
|
17501
|
-
* `(runId, resumeId)` constraint
|
|
17518
|
+
* `(runId, resumeId)` constraint, required because the v4 payload ref is not
|
|
17502
17519
|
* content-stable server-side.
|
|
17503
17520
|
*/
|
|
17504
17521
|
payloadDigest: external_exports.string(),
|
|
@@ -17506,15 +17523,15 @@ var init_queue = __esm({
|
|
|
17506
17523
|
* The deployment the run is pinned to, from the producer's resume context.
|
|
17507
17524
|
* Lets the consumer detect a misrouted delivery with a cheap ambient
|
|
17508
17525
|
* deployment-id comparison BEFORE its hoisted `hook_received` replay-preload
|
|
17509
|
-
* write
|
|
17526
|
+
* write: only a detected mismatch pays for the authoritative run fetch and
|
|
17510
17527
|
* the deployment-affinity guard. Optional for queued-message compatibility:
|
|
17511
|
-
* messages from older producers omit it and
|
|
17528
|
+
* messages from older producers omit it and skip the pre-write
|
|
17512
17529
|
* check (the authoritative guard before replay still protects them).
|
|
17513
17530
|
*/
|
|
17514
17531
|
deploymentId: external_exports.string().optional()
|
|
17515
17532
|
});
|
|
17516
17533
|
HookResumeTimingSchema = external_exports.object({
|
|
17517
|
-
/** Epoch ms at entry into `resumeHook()
|
|
17534
|
+
/** Epoch ms at entry into `resumeHook()`: the start of the TTR window. */
|
|
17518
17535
|
resumeRequestedAtMs: external_exports.number(),
|
|
17519
17536
|
/** Epoch ms immediately before the queue publish was requested. */
|
|
17520
17537
|
queuePublishRequestedAtMs: external_exports.number(),
|
|
@@ -17550,10 +17567,41 @@ var init_queue = __esm({
|
|
|
17550
17567
|
serverErrorRetryCount: external_exports.number().int().optional(),
|
|
17551
17568
|
/** Number of times this message has been re-routed after a deployment mismatch */
|
|
17552
17569
|
deploymentMismatchRetryCount: external_exports.number().int().nonnegative().optional(),
|
|
17570
|
+
/**
|
|
17571
|
+
* The wait this message is the delayed continuation for, and which attempt
|
|
17572
|
+
* in that wait's chain it is.
|
|
17573
|
+
*
|
|
17574
|
+
* Present only on wait-continuation messages. It exists so the invocation a
|
|
17575
|
+
* continuation wakes can recognize itself as that continuation: if the wait
|
|
17576
|
+
* is STILL pending when it replays — the continuation arrived before its
|
|
17577
|
+
* deadline — then its own idempotency key is already spent, and re-enqueueing
|
|
17578
|
+
* under the same key is silently dropped by the world's dedupe window. The
|
|
17579
|
+
* attempt number is what makes the next key fresh, so an early delivery
|
|
17580
|
+
* costs one extra hop instead of losing the wait's timer permanently.
|
|
17581
|
+
*
|
|
17582
|
+
* Counted on the message for the same reason as
|
|
17583
|
+
* {@link WorkflowInvokePayloadSchema.shape.preconditionReinvocations}: the
|
|
17584
|
+
* budget has to survive across invocations, and a fresh enqueue resets
|
|
17585
|
+
* anything the queue tracks itself. Absent on the first continuation, so a
|
|
17586
|
+
* producer that predates this field is indistinguishable from attempt 0 and
|
|
17587
|
+
* a consumer that predates it simply ignores the field.
|
|
17588
|
+
*/
|
|
17589
|
+
/**
|
|
17590
|
+
* `.catch(undefined)` for the reason `hookResumeTiming` has it: this field
|
|
17591
|
+
* must never be able to fail the parse of the invocation payload. A
|
|
17592
|
+
* malformed value would otherwise throw on every delivery of the message
|
|
17593
|
+
* and burn the run's delivery budget. Degrading to `undefined` reads as
|
|
17594
|
+
* "not a continuation", which costs at worst the pre-attempt behavior for
|
|
17595
|
+
* that one wait rather than killing the run.
|
|
17596
|
+
*/
|
|
17597
|
+
waitContinuation: external_exports.object({
|
|
17598
|
+
correlationId: external_exports.string(),
|
|
17599
|
+
attempt: external_exports.number().int().nonnegative()
|
|
17600
|
+
}).optional().catch(void 0),
|
|
17553
17601
|
/** Step ID for inline step execution in combined handler. If provided, the flow execution
|
|
17554
17602
|
* will jump directly to execute the step with the given ID before doing an event replay. */
|
|
17555
17603
|
stepId: external_exports.string().optional(),
|
|
17556
|
-
/** Step name, sent alongside stepId to avoid loading the event log
|
|
17604
|
+
/** Step name, sent alongside stepId to avoid loading the event log to resolve the name. */
|
|
17557
17605
|
stepName: external_exports.string().optional(),
|
|
17558
17606
|
/** Run creation data, only present on the first queue delivery from start() */
|
|
17559
17607
|
runInput: RunInputSchema.optional(),
|
|
@@ -17574,8 +17622,8 @@ var init_queue = __esm({
|
|
|
17574
17622
|
* Hook-resume TTR timing. Present on both `resumeHook()` dispatch paths
|
|
17575
17623
|
* (unlike `hookInput`, which only rides the parallel fast path), and
|
|
17576
17624
|
* forwarded onto a dispatched step message when the resuming invocation
|
|
17577
|
-
* hands the next durable step to another invocation. Purely observational
|
|
17578
|
-
*
|
|
17625
|
+
* hands the next durable step to another invocation. Purely observational.
|
|
17626
|
+
* See {@link HookResumeTimingSchema}.
|
|
17579
17627
|
*
|
|
17580
17628
|
* `.catch(undefined)` because this field must never be able to fail the
|
|
17581
17629
|
* parse of the invocation payload: a malformed value (a NaN boundary, a
|
|
@@ -17633,7 +17681,7 @@ var init_hooks = __esm({
|
|
|
17633
17681
|
// `@workflow/core` re-ensures the `hook_received` event from the queue
|
|
17634
17682
|
// message's `hookInput` on replay, so `resumeHook()`'s parallel fast path is
|
|
17635
17683
|
// safe to use. Because a run is pinned to its creating deployment, this
|
|
17636
|
-
// marker is a reliable per-run attestation
|
|
17684
|
+
// marker is a reliable per-run attestation, unlike inferring support from a
|
|
17637
17685
|
// version compare against a predicted release cutoff. Absent on runs created
|
|
17638
17686
|
// before the marker existed (fall back to the sequential path).
|
|
17639
17687
|
hookResumeInputVersion: external_exports.number().optional()
|
|
@@ -17656,7 +17704,7 @@ var init_hooks = __esm({
|
|
|
17656
17704
|
environment: external_exports.string(),
|
|
17657
17705
|
metadata: SerializedDataSchema.optional(),
|
|
17658
17706
|
createdAt: external_exports.coerce.date(),
|
|
17659
|
-
// Optional in database for
|
|
17707
|
+
// Optional in database for backward compatibility, defaults to 1 (legacy) when reading
|
|
17660
17708
|
specVersion: external_exports.number().optional(),
|
|
17661
17709
|
isWebhook: external_exports.boolean().optional(),
|
|
17662
17710
|
isSystem: external_exports.boolean().optional(),
|
|
@@ -17668,9 +17716,9 @@ var init_hooks = __esm({
|
|
|
17668
17716
|
// falls back to `runs.get`.
|
|
17669
17717
|
resumeContext: HookResumeContextSchema.optional(),
|
|
17670
17718
|
// Backend dedup capability, computed FRESH by the server on every by-token
|
|
17671
|
-
// lookup
|
|
17719
|
+
// lookup: RESPONSE-ONLY and TRANSIENT. Never persisted on the hook entity
|
|
17672
17720
|
// and never part of `resumeContext`, so a server rollback or kill switch
|
|
17673
|
-
// takes effect on the
|
|
17721
|
+
// takes effect on the next lookup (the field stops appearing).
|
|
17674
17722
|
// `resumeHook()` gates its parallel fast path on this being present and
|
|
17675
17723
|
// current. Absent against an older/rolled-back server or when the kill switch
|
|
17676
17724
|
// is active.
|
|
@@ -17679,6 +17727,14 @@ var init_hooks = __esm({
|
|
|
17679
17727
|
}
|
|
17680
17728
|
});
|
|
17681
17729
|
|
|
17730
|
+
// ../world/dist/node-http-flag.js
|
|
17731
|
+
var init_node_http_flag = __esm({
|
|
17732
|
+
"../world/dist/node-http-flag.js"() {
|
|
17733
|
+
"use strict";
|
|
17734
|
+
init_env_config();
|
|
17735
|
+
}
|
|
17736
|
+
});
|
|
17737
|
+
|
|
17682
17738
|
// ../world/dist/recovery.js
|
|
17683
17739
|
var init_recovery = __esm({
|
|
17684
17740
|
"../world/dist/recovery.js"() {
|
|
@@ -17731,17 +17787,19 @@ var init_slot_identity = __esm({
|
|
|
17731
17787
|
function isLegacySpecVersion(v) {
|
|
17732
17788
|
return v === void 0 || v === null || v <= SPEC_VERSION_LEGACY;
|
|
17733
17789
|
}
|
|
17734
|
-
var SPEC_VERSION_LEGACY, SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT, SPEC_VERSION_SUPPORTS_ATTRIBUTES, SPEC_VERSION_SUPPORTS_COMPRESSION, SPEC_VERSION_SUPPORTS_SLOT_IDENTITY, SPEC_VERSION_CURRENT, SPEC_VERSION_MAX_SUPPORTED;
|
|
17790
|
+
var SPEC_VERSION_LEGACY, SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT, SPEC_VERSION_SUPPORTS_ATTRIBUTES, SPEC_VERSION_SUPPORTS_COMPRESSION, SPEC_VERSION_SUPPORTS_SLOT_IDENTITY, SPEC_VERSION_SUPPORTS_SEALED_LOG, SPEC_VERSION_CURRENT, SPEC_VERSION_MAX_SUPPORTED;
|
|
17735
17791
|
var init_spec_version = __esm({
|
|
17736
17792
|
"../world/dist/spec-version.js"() {
|
|
17737
17793
|
"use strict";
|
|
17794
|
+
init_env_config();
|
|
17738
17795
|
SPEC_VERSION_LEGACY = 1;
|
|
17739
17796
|
SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT = 3;
|
|
17740
17797
|
SPEC_VERSION_SUPPORTS_ATTRIBUTES = 4;
|
|
17741
17798
|
SPEC_VERSION_SUPPORTS_COMPRESSION = 5;
|
|
17742
17799
|
SPEC_VERSION_SUPPORTS_SLOT_IDENTITY = 6;
|
|
17743
|
-
|
|
17744
|
-
|
|
17800
|
+
SPEC_VERSION_SUPPORTS_SEALED_LOG = 7;
|
|
17801
|
+
SPEC_VERSION_CURRENT = SPEC_VERSION_SUPPORTS_SEALED_LOG;
|
|
17802
|
+
SPEC_VERSION_MAX_SUPPORTED = SPEC_VERSION_SUPPORTS_SEALED_LOG;
|
|
17745
17803
|
__name(isLegacySpecVersion, "isLegacySpecVersion");
|
|
17746
17804
|
}
|
|
17747
17805
|
});
|
|
@@ -17918,6 +17976,7 @@ var init_dist4 = __esm({
|
|
|
17918
17976
|
init_env_config();
|
|
17919
17977
|
init_events();
|
|
17920
17978
|
init_hooks();
|
|
17979
|
+
init_node_http_flag();
|
|
17921
17980
|
init_queue();
|
|
17922
17981
|
init_recovery();
|
|
17923
17982
|
init_runs();
|
|
@@ -18089,7 +18148,7 @@ function importPublicKey(publicKey) {
|
|
|
18089
18148
|
},
|
|
18090
18149
|
/* extractable */
|
|
18091
18150
|
true,
|
|
18092
|
-
// Public keys carry no usages for X25519
|
|
18151
|
+
// Public keys carry no usages for X25519: the private key does the
|
|
18093
18152
|
// deriving; the public key is only ever an argument to it.
|
|
18094
18153
|
[]
|
|
18095
18154
|
);
|
|
@@ -18403,7 +18462,7 @@ var init_types = __esm({
|
|
|
18403
18462
|
/** Encrypted payload (inner payload has its own format prefix) */
|
|
18404
18463
|
ENCRYPTED: "encr",
|
|
18405
18464
|
/**
|
|
18406
|
-
* Sealed payload
|
|
18465
|
+
* Sealed payload: asymmetrically encrypted to a run's X25519 public key
|
|
18407
18466
|
* (inner payload has its own format prefix).
|
|
18408
18467
|
*
|
|
18409
18468
|
* Used for *cross-run* writes (hook payloads, forwarded stream frames),
|
|
@@ -19614,7 +19673,6 @@ var RegisteredStepsKey, globalSymbols, registeredSteps, BUILTIN_RESPONSE_STEP_NA
|
|
|
19614
19673
|
var init_private = __esm({
|
|
19615
19674
|
"../core/dist/private.js"() {
|
|
19616
19675
|
"use strict";
|
|
19617
|
-
init_dist();
|
|
19618
19676
|
RegisteredStepsKey = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps");
|
|
19619
19677
|
globalSymbols = globalThis;
|
|
19620
19678
|
registeredSteps = globalSymbols[RegisteredStepsKey] ??= /* @__PURE__ */ new Map();
|
|
@@ -19632,11 +19690,11 @@ var init_private = __esm({
|
|
|
19632
19690
|
// ../core/dist/runtime/world-compatibility.js
|
|
19633
19691
|
function assertWorldSupportsRuntimeProtocol(world) {
|
|
19634
19692
|
const declared = world.specVersion;
|
|
19635
|
-
if (declared !== void 0 && declared !== null && declared >=
|
|
19693
|
+
if (declared !== void 0 && declared !== null && declared >= SPEC_VERSION_SUPPORTS_SLOT_IDENTITY && declared <= SPEC_VERSION_MAX_SUPPORTED) {
|
|
19636
19694
|
return;
|
|
19637
19695
|
}
|
|
19638
19696
|
const supportedVersion = declared ?? "none";
|
|
19639
|
-
throw new WorkflowRuntimeError(`This Workflow runtime supports Worlds with spec version ${
|
|
19697
|
+
throw new WorkflowRuntimeError(`This Workflow runtime supports Worlds with spec version ${SPEC_VERSION_SUPPORTS_SLOT_IDENTITY} through ${SPEC_VERSION_MAX_SUPPORTED}, but the configured World declares spec version ${supportedVersion}. Install a World package version compatible with the current Workflow runtime.`);
|
|
19640
19698
|
}
|
|
19641
19699
|
var init_world_compatibility = __esm({
|
|
19642
19700
|
"../core/dist/runtime/world-compatibility.js"() {
|
|
@@ -19694,7 +19752,7 @@ function withGuestCodeStats(stats, fn) {
|
|
|
19694
19752
|
}
|
|
19695
19753
|
}
|
|
19696
19754
|
function isUseStepClosureFn(fn) {
|
|
19697
|
-
return typeof fn === "function" &&
|
|
19755
|
+
return typeof fn === "function" && useStepClosures.fns.has(fn);
|
|
19698
19756
|
}
|
|
19699
19757
|
function recordGuestCode(kind, detail) {
|
|
19700
19758
|
if (!activeStats) return;
|
|
@@ -19857,15 +19915,18 @@ function readToStringTag(value) {
|
|
|
19857
19915
|
const tag = readProperty(value, Symbol.toStringTag);
|
|
19858
19916
|
return typeof tag === "string" ? tag : void 0;
|
|
19859
19917
|
}
|
|
19860
|
-
var activeStats, reportedProxies,
|
|
19918
|
+
var activeStats, reportedProxies, useStepClosures, uncurryThis, dateGetDate, dateGetTime, dateToISOString, regExpSource, regExpFlags, arrayBufferByteLength, mapEntries, setValues, numberValueOf, stringValueOf, booleanValueOf, bigIntValueOf, TypedArrayPrototype, typedArrayTag, typedArrayBuffer, typedArrayByteOffset, typedArrayByteLength, typedArrayLength, dataViewBuffer, dataViewByteOffset, dataViewByteLength, sharedArrayBufferByteLength, headersIterator, urlHrefGetter, urlSearchParamsToStringMethod, isProxy, functionToString, KNOWN_VIEW_TAGS, BRAND_DECIDED_TAGS, hardenedStringifyOperations;
|
|
19861
19919
|
var init_hardened = __esm({
|
|
19862
19920
|
"../core/dist/serialization/hardened.js"() {
|
|
19863
19921
|
"use strict";
|
|
19922
|
+
init_dist();
|
|
19864
19923
|
init_devalue();
|
|
19865
19924
|
activeStats = null;
|
|
19866
19925
|
reportedProxies = null;
|
|
19867
19926
|
__name(withGuestCodeStats, "withGuestCodeStats");
|
|
19868
|
-
|
|
19927
|
+
useStepClosures = globalSingleton("@workflow/core//useStepClosures.fns", 1, () => ({
|
|
19928
|
+
fns: /* @__PURE__ */ new WeakSet()
|
|
19929
|
+
}));
|
|
19869
19930
|
__name(isUseStepClosureFn, "isUseStepClosureFn");
|
|
19870
19931
|
__name(recordGuestCode, "recordGuestCode");
|
|
19871
19932
|
__name(recordProxy, "recordProxy");
|
|
@@ -20160,7 +20221,7 @@ function getCommonReducers(_global = globalThis) {
|
|
|
20160
20221
|
return {
|
|
20161
20222
|
ArrayBuffer: /* @__PURE__ */ __name((value) => types2.isArrayBuffer(value) && arrayBufferToBase64(value, 0, arrayBufferByteLength(value)), "ArrayBuffer"),
|
|
20162
20223
|
BigInt: /* @__PURE__ */ __name((value) => (
|
|
20163
|
-
// String(bigint) is a spec-internal numeric conversion
|
|
20224
|
+
// String(bigint) is a spec-internal numeric conversion: unlike
|
|
20164
20225
|
// `value.toString()`, it never consults BigInt.prototype.
|
|
20165
20226
|
typeof value === "bigint" && String(value)
|
|
20166
20227
|
), "BigInt"),
|
|
@@ -20273,7 +20334,7 @@ function getCommonReducers(_global = globalThis) {
|
|
|
20273
20334
|
errors: readProperty(value, "errors")
|
|
20274
20335
|
};
|
|
20275
20336
|
}, "AggregateError"),
|
|
20276
|
-
// Base Error reducer
|
|
20337
|
+
// Base Error reducer: catch-all for any Error instance not matched by a
|
|
20277
20338
|
// specific subclass reducer above (including user Error subclasses without
|
|
20278
20339
|
// WORKFLOW_SERIALIZE). Preserves `name` so the error's identity is retained
|
|
20279
20340
|
// even though the exact class cannot be reconstructed.
|
|
@@ -20292,7 +20353,7 @@ function getCommonReducers(_global = globalThis) {
|
|
|
20292
20353
|
Float32Array: /* @__PURE__ */ __name((value) => types2.isFloat32Array(value) && viewToBase64(value), "Float32Array"),
|
|
20293
20354
|
Float64Array: /* @__PURE__ */ __name((value) => types2.isFloat64Array(value) && viewToBase64(value), "Float64Array"),
|
|
20294
20355
|
// Headers is a host class injected into the sandbox, so its (shared)
|
|
20295
|
-
// prototype is reachable from workflow code
|
|
20356
|
+
// prototype is reachable from workflow code; iterate through the
|
|
20296
20357
|
// boot-captured iterator instead of a live Symbol.iterator lookup.
|
|
20297
20358
|
Headers: /* @__PURE__ */ __name((value) => isInstanceOfPrototype(value, Headers.prototype) && headersToEntries(value), "Headers"),
|
|
20298
20359
|
Int8Array: /* @__PURE__ */ __name((value) => types2.isInt8Array(value) && viewToBase64(value), "Int8Array"),
|
|
@@ -20404,7 +20465,7 @@ function getCommonRevivers(global2 = globalThis) {
|
|
|
20404
20465
|
if (value.stack !== void 0) error48.stack = value.stack;
|
|
20405
20466
|
return error48;
|
|
20406
20467
|
}, "AggregateError"),
|
|
20407
|
-
// Base Error reviver
|
|
20468
|
+
// Base Error reviver: used for plain Error instances and unrecognized
|
|
20408
20469
|
// Error subclasses. Preserves `name` so the error's identity is retained.
|
|
20409
20470
|
Error: /* @__PURE__ */ __name((value) => {
|
|
20410
20471
|
const opts = "cause" in value ? {
|
|
@@ -21141,7 +21202,7 @@ function SemanticConvention(...names) {
|
|
|
21141
21202
|
value
|
|
21142
21203
|
]));
|
|
21143
21204
|
}
|
|
21144
|
-
var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowExecutionMode, WorkflowParkedEventsCount, WorkflowParkedEventId, WorkflowParkedEventType, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowVm, QuickJSOutcome, QuickJSEventsPreloaded, QuickJSEventsFetchedCount, QuickJSEventsFetchedPages, QuickJSPendingOpsCount, QuickJSInlineSteps, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowOwnedRecoverySteps, WorkflowBackstopWakesArmed, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, FaasInstance, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepTtfsMs, StepStsoMs, StepRsfsMs, StepFinalSchedulingReplayMs, StepLatencyOptimizations, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, QueueOverheadMs, DeploymentId, WorkflowRunPinnedDeploymentId, WorkflowDeploymentMismatchRetryCount, WorkflowDeploymentMismatchRecovered, HookToken, HookId, HookFound, HookResilientResume, HookResilientResumeMaterialized, HookResumeSetupSource, StepResilientDispatchRecovered, StepResilientDispatchMaterialized, ResumeTotalMs, ResumeProducerPrepMs, ResumeQueueDeliveryMs, ResumeSetupMs, ResumeReplayMs, ResumeStepDispatchMs, ResumeStepClaimMs, ResumeStepPrepareMs, ResumeTrigger, ResumeStrategy, ResumeSetupSource, ResumeStepExecution, WebhookHandlersTriggered, WorkflowSuspensionState, WorkflowSuspensionHookCount, WorkflowSuspensionStepCount, WorkflowSuspensionWaitCount, HttpRequestMethod, HttpRoute, UrlFull, ServerAddress, ServerPort, HttpResponseStatusCode, ErrorType, WorldParseFormat, WorkflowEventsPagesLoaded, QueueDeserializeTimeMs, QueueExecutionTimeMs, QueueSerializeTimeMs, SerializationOperation, SerializationCompressed, SerializationCodec, SerializationUncompressedBytes, SerializationStoredBytes, SerializationCompressionRatio, SerializationGuestCodeExecutions, SerializationGuestCodeDetails, PeerService, RpcSystem, RpcService, RpcMethod, ErrorRetryable, ErrorCategory;
|
|
21205
|
+
var WorkflowName, WorkflowOperation, WorkflowRunId, WorkflowRunStatus, WorkflowStartedAt, WorkflowEventsCount, WorkflowExecutionMode, WorkflowParkedEventsCount, WorkflowParkedEventId, WorkflowParkedEventType, WorkflowArgumentsCount, WorkflowResultType, WorkflowTracePropagated, WorkflowVm, QuickJSOutcome, QuickJSEventsPreloaded, QuickJSEventsFetchedCount, QuickJSEventsFetchedPages, QuickJSPendingOpsCount, QuickJSInlineSteps, WorkflowTraceMode, WorkflowTurbo, WorkflowErrorName, WorkflowErrorMessage, WorkflowErrorCode, WorkflowStepsCreated, WorkflowHooksCreated, WorkflowWaitsCreated, WorkflowStepsFailedSerialization, WorkflowOwnedRecoverySteps, WorkflowBackstopWakesArmed, WorkflowRouteType, WorkflowRouteHandlerCached, WorkflowRouteInvocationCount, WorkflowRouteEntrypointAgeMs, WorkflowRouteModuleBodyInitMs, FaasInstance, StepName, StepId, StepAttempt, StepStatus, StepMaxRetries, StepTracePropagated, StepTtfsMs, StepStsoMs, StepRsfsMs, StepFinalSchedulingReplayMs, StepLatencyOptimizations, StepSkipped, StepSkipReason, StepArgumentsCount, StepResultType, StepErrorName, StepErrorMessage, StepFatalError, StepRetryExhausted, StepRetryTimeoutSeconds, StepRetryWillRetry, MessagingSystem, MessagingDestinationName, MessagingMessageId, MessagingOperationType, QueueOverheadMs, DeploymentId, WorkflowRunPinnedDeploymentId, WorkflowDeploymentMismatchRetryCount, WorkflowDeploymentMismatchRecovered, HookToken, HookId, HookFound, HookResilientResume, HookResilientResumeMaterialized, HookResumeSetupSource, StepResilientDispatchRecovered, StepResilientDispatchMaterialized, ResumeTotalMs, ResumeProducerPrepMs, ResumeQueueDeliveryMs, ResumeSetupMs, ResumeReplayMs, ResumeStepDispatchMs, ResumeStepClaimMs, ResumeStepPrepareMs, ResumeTrigger, ResumeStrategy, ResumeSetupSource, ResumeStepExecution, WebhookHandlersTriggered, WorkflowSuspensionState, WorkflowSuspensionHookCount, WorkflowSuspensionStepCount, WorkflowSuspensionWaitCount, HttpRequestMethod, HttpRoute, UrlFull, ServerAddress, ServerPort, HttpResponseStatusCode, ErrorType, WorldParseFormat, WorkflowEventsPagesLoaded, QueueDeserializeTimeMs, QueueExecutionTimeMs, QueueSerializeTimeMs, SerializationOperation, SerializationCompressed, SerializationCodec, SerializationUncompressedBytes, SerializationStoredBytes, SerializationCompressionRatio, SerializationGuestCodeExecutions, SerializationGuestCodeDetails, PeerService, RpcSystem, RpcService, RpcMethod, ErrorRetryable, ErrorCategory;
|
|
21145
21206
|
var init_semantic_conventions = __esm({
|
|
21146
21207
|
"../core/dist/telemetry/semantic-conventions.js"() {
|
|
21147
21208
|
"use strict";
|
|
@@ -21174,6 +21235,7 @@ var init_semantic_conventions = __esm({
|
|
|
21174
21235
|
WorkflowStepsCreated = SemanticConvention("workflow.steps.created");
|
|
21175
21236
|
WorkflowHooksCreated = SemanticConvention("workflow.hooks.created");
|
|
21176
21237
|
WorkflowWaitsCreated = SemanticConvention("workflow.waits.created");
|
|
21238
|
+
WorkflowStepsFailedSerialization = SemanticConvention("workflow.steps.failed_serialization");
|
|
21177
21239
|
WorkflowOwnedRecoverySteps = SemanticConvention("workflow.inline_ownership.owned_recovery_steps");
|
|
21178
21240
|
WorkflowBackstopWakesArmed = SemanticConvention("workflow.inline_ownership.backstop_wakes_armed");
|
|
21179
21241
|
WorkflowRouteType = SemanticConvention("workflow.route.type");
|
|
@@ -23428,7 +23490,7 @@ async function linkToTraceCarrier(carrier) {
|
|
|
23428
23490
|
context
|
|
23429
23491
|
};
|
|
23430
23492
|
}
|
|
23431
|
-
var OtelApi, Tracer, otelDiagLogged;
|
|
23493
|
+
var traceModeWarnings, OtelApi, Tracer, StepExecutionDurationHistogram, otelDiagLogged;
|
|
23432
23494
|
var init_telemetry = __esm({
|
|
23433
23495
|
"../core/dist/telemetry.js"() {
|
|
23434
23496
|
"use strict";
|
|
@@ -23436,6 +23498,9 @@ var init_telemetry = __esm({
|
|
|
23436
23498
|
init_global();
|
|
23437
23499
|
init_logger();
|
|
23438
23500
|
init_semantic_conventions();
|
|
23501
|
+
traceModeWarnings = globalSingleton("@workflow/core//traceModeWarnings", 1, () => ({
|
|
23502
|
+
unrecognized: /* @__PURE__ */ new Set()
|
|
23503
|
+
}));
|
|
23439
23504
|
__name(serializeTraceCarrier, "serializeTraceCarrier");
|
|
23440
23505
|
__name(deserializeTraceCarrier, "deserializeTraceCarrier");
|
|
23441
23506
|
OtelApi = once(async () => {
|
|
@@ -23453,6 +23518,14 @@ var init_telemetry = __esm({
|
|
|
23453
23518
|
logOtelDiagnosticOnce(api, tracer);
|
|
23454
23519
|
return tracer;
|
|
23455
23520
|
});
|
|
23521
|
+
StepExecutionDurationHistogram = once(async () => {
|
|
23522
|
+
const otel = await OtelApi.value;
|
|
23523
|
+
if (!otel) return null;
|
|
23524
|
+
return otel.metrics.getMeter("workflow").createHistogram("workflow.step.execute.duration", {
|
|
23525
|
+
description: "Duration of user step execution",
|
|
23526
|
+
unit: "ms"
|
|
23527
|
+
});
|
|
23528
|
+
});
|
|
23456
23529
|
otelDiagLogged = false;
|
|
23457
23530
|
__name(logOtelDiagnosticOnce, "logOtelDiagnosticOnce");
|
|
23458
23531
|
__name(trace, "trace");
|
|
@@ -23722,7 +23795,6 @@ function getAbortStreamId(id) {
|
|
|
23722
23795
|
var init_util2 = __esm({
|
|
23723
23796
|
"../core/dist/util.js"() {
|
|
23724
23797
|
"use strict";
|
|
23725
|
-
init_dist();
|
|
23726
23798
|
__name(getWorkflowRunStreamId, "getWorkflowRunStreamId");
|
|
23727
23799
|
__name(getAbortStreamId, "getAbortStreamId");
|
|
23728
23800
|
}
|
|
@@ -23780,7 +23852,7 @@ var init_abort_controller = __esm({
|
|
|
23780
23852
|
/**
|
|
23781
23853
|
* @internal Sets aborted state and fires listeners.
|
|
23782
23854
|
* Called by abort() on first-run, or by the events consumer on replay.
|
|
23783
|
-
* Idempotent
|
|
23855
|
+
* Idempotent: second call is a no-op.
|
|
23784
23856
|
*/
|
|
23785
23857
|
_setAborted(reason) {
|
|
23786
23858
|
if (this.aborted) return;
|
|
@@ -25823,7 +25895,7 @@ var init_capabilities = __esm({
|
|
|
25823
25895
|
// bump to the next beta. A too-low cutoff makes new producers write
|
|
25824
25896
|
// compressed payloads to consumers that cannot decompress them; too-high
|
|
25825
25897
|
// merely delays the optimization (safe). gzip and zstd ship together, so
|
|
25826
|
-
// they share a min version
|
|
25898
|
+
// they share a min version: a run that can read one can read both.
|
|
25827
25899
|
{
|
|
25828
25900
|
format: SerializationFormat.GZIP,
|
|
25829
25901
|
minVersion: "5.0.0-beta.18"
|
|
@@ -25906,7 +25978,7 @@ var version2;
|
|
|
25906
25978
|
var init_version = __esm({
|
|
25907
25979
|
"../core/dist/version.js"() {
|
|
25908
25980
|
"use strict";
|
|
25909
|
-
version2 = "5.0.0-beta.
|
|
25981
|
+
version2 = "5.0.0-beta.44";
|
|
25910
25982
|
}
|
|
25911
25983
|
});
|
|
25912
25984
|
|
|
@@ -31668,6 +31740,16 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
31668
31740
|
reader = stream.getReader();
|
|
31669
31741
|
}
|
|
31670
31742
|
__name(connect, "connect");
|
|
31743
|
+
async function isVerifiedComplete() {
|
|
31744
|
+
try {
|
|
31745
|
+
const world = await getWorldLazy();
|
|
31746
|
+
const info = await world.streams.getInfo(runId, name);
|
|
31747
|
+
return info.done && currentStartIndex + consumedFrames > info.tailIndex;
|
|
31748
|
+
} catch {
|
|
31749
|
+
return true;
|
|
31750
|
+
}
|
|
31751
|
+
}
|
|
31752
|
+
__name(isVerifiedComplete, "isVerifiedComplete");
|
|
31671
31753
|
async function reconnect() {
|
|
31672
31754
|
if (reader) {
|
|
31673
31755
|
await reader.cancel().catch(() => {
|
|
@@ -31727,6 +31809,15 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
31727
31809
|
}
|
|
31728
31810
|
if (result.done || !result.value) {
|
|
31729
31811
|
reader = void 0;
|
|
31812
|
+
if (reconnectSupported && !await isVerifiedComplete()) {
|
|
31813
|
+
try {
|
|
31814
|
+
await reconnect();
|
|
31815
|
+
} catch (reconnectErr) {
|
|
31816
|
+
controller.error(reconnectErr);
|
|
31817
|
+
return;
|
|
31818
|
+
}
|
|
31819
|
+
continue;
|
|
31820
|
+
}
|
|
31730
31821
|
if (readStart !== void 0) {
|
|
31731
31822
|
recordStreamReadComplete(readStart, runId, name, chunksDelivered, bytesDelivered, totalReconnectCount);
|
|
31732
31823
|
}
|
|
@@ -31984,7 +32075,7 @@ function getWorkflowReducers(global2 = globalThis) {
|
|
|
31984
32075
|
return {
|
|
31985
32076
|
...getAllBaseReducers(global2),
|
|
31986
32077
|
// Readable/Writable streams from within the workflow execution environment
|
|
31987
|
-
// are
|
|
32078
|
+
// are "handles" that can be passed around to other steps.
|
|
31988
32079
|
ReadableStream: /* @__PURE__ */ __name((value) => {
|
|
31989
32080
|
if (!isInstanceOfPrototype(value, readableStreamPrototype.value)) return false;
|
|
31990
32081
|
const bodyInit = readProperty(value, BODY_INIT_SYMBOL);
|
|
@@ -32027,7 +32118,7 @@ function getWorkflowReducers(global2 = globalThis) {
|
|
|
32027
32118
|
}
|
|
32028
32119
|
return s;
|
|
32029
32120
|
}, "WritableStream"),
|
|
32030
|
-
// AbortController/AbortSignal in workflow context
|
|
32121
|
+
// AbortController/AbortSignal in workflow context: read only symbols (handles).
|
|
32031
32122
|
// In the workflow VM, global.AbortController is a class but global.AbortSignal
|
|
32032
32123
|
// is a plain object (not a class), so instanceof checks won't work for signals.
|
|
32033
32124
|
// Detect instances by the presence of the ABORT_STREAM_NAME symbol instead.
|
|
@@ -32384,7 +32475,7 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
|
|
|
32384
32475
|
// arrow steps). The wrapper invokes the body via
|
|
32385
32476
|
// `stepFn.apply(boundThis, args)` so the body sees the same
|
|
32386
32477
|
// `this` it would have had in the workflow bundle. Property
|
|
32387
|
-
// presence
|
|
32478
|
+
// presence, not truthiness, is significant because
|
|
32388
32479
|
// `bind(null)` and `bind(undefined)` are both legal and should
|
|
32389
32480
|
// round-trip faithfully.
|
|
32390
32481
|
// - `boundArgs`: prefilled args from
|
|
@@ -33172,6 +33263,7 @@ init_helpers();
|
|
|
33172
33263
|
|
|
33173
33264
|
// ../core/dist/runtime/start.js
|
|
33174
33265
|
init_dist2();
|
|
33266
|
+
init_dist();
|
|
33175
33267
|
init_parse_name();
|
|
33176
33268
|
init_dist4();
|
|
33177
33269
|
init_node();
|
|
@@ -33248,7 +33340,9 @@ function resolveLineageAttributes() {
|
|
|
33248
33340
|
};
|
|
33249
33341
|
}
|
|
33250
33342
|
__name(resolveLineageAttributes, "resolveLineageAttributes");
|
|
33251
|
-
var
|
|
33343
|
+
var latestNoOpWarning = globalSingleton("@workflow/core//latestNoOpWarning", 1, () => ({
|
|
33344
|
+
warned: false
|
|
33345
|
+
}));
|
|
33252
33346
|
async function start(workflow, argsOrOptions, options) {
|
|
33253
33347
|
return await waitedUntil(() => {
|
|
33254
33348
|
const workflowName = workflow?.workflowId;
|
|
@@ -33281,8 +33375,8 @@ async function start(workflow, argsOrOptions, options) {
|
|
|
33281
33375
|
if (world.resolveLatestDeploymentId) {
|
|
33282
33376
|
deploymentId = await world.resolveLatestDeploymentId();
|
|
33283
33377
|
} else {
|
|
33284
|
-
if (!
|
|
33285
|
-
|
|
33378
|
+
if (!latestNoOpWarning.warned) {
|
|
33379
|
+
latestNoOpWarning.warned = true;
|
|
33286
33380
|
runtimeLogger.warn("deploymentId: 'latest' has no effect in this world and was ignored. It is only supported by worlds with atomic deployments, such as Vercel. The run will target the current deployment.", {
|
|
33287
33381
|
currentDeploymentId
|
|
33288
33382
|
});
|
|
@@ -33383,7 +33477,7 @@ async function start(workflow, argsOrOptions, options) {
|
|
|
33383
33477
|
// resumeContext by the server) to decide whether the parallel fast
|
|
33384
33478
|
// path is safe. For a cross-deployment start the consumer is the
|
|
33385
33479
|
// target deployment, so we stamp the *target's* value carried back on
|
|
33386
|
-
// the health-check probe
|
|
33480
|
+
// the health-check probe, never the caller's. Omitted when we could
|
|
33387
33481
|
// not attest the target (older target, timeout, or no probe channel),
|
|
33388
33482
|
// which fails the resume gate closed to the sequential path.
|
|
33389
33483
|
...targetHookResumeInputVersion !== void 0 ? {
|
|
@@ -33492,7 +33586,7 @@ __name(start, "start");
|
|
|
33492
33586
|
value: "start",
|
|
33493
33587
|
configurable: true
|
|
33494
33588
|
});
|
|
33495
|
-
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.
|
|
33589
|
+
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.44//start");
|
|
33496
33590
|
|
|
33497
33591
|
// ../core/dist/runtime/runs.js
|
|
33498
33592
|
async function wakeUpRun(world, runId, options) {
|
|
@@ -33579,6 +33673,10 @@ __name(wakeUpRun, "wakeUpRun");
|
|
|
33579
33673
|
|
|
33580
33674
|
// ../core/dist/runtime/run.js
|
|
33581
33675
|
var RETURN_VALUE_POLL_INTERVAL_MS = 1e3;
|
|
33676
|
+
var PAYLOAD_TERMINAL_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
33677
|
+
"completed",
|
|
33678
|
+
"failed"
|
|
33679
|
+
]);
|
|
33582
33680
|
function getReturnValuePollIntervalMs() {
|
|
33583
33681
|
return envNumber("WORKFLOW_RETURN_VALUE_POLL_INTERVAL_MS", RETURN_VALUE_POLL_INTERVAL_MS, {
|
|
33584
33682
|
integer: true,
|
|
@@ -33586,6 +33684,28 @@ function getReturnValuePollIntervalMs() {
|
|
|
33586
33684
|
});
|
|
33587
33685
|
}
|
|
33588
33686
|
__name(getReturnValuePollIntervalMs, "getReturnValuePollIntervalMs");
|
|
33687
|
+
var RETURN_VALUE_WAIT_TIMEOUT_MS = 5e4;
|
|
33688
|
+
function getReturnValueWaitTimeoutMs() {
|
|
33689
|
+
return envNumber("WORKFLOW_RETURN_VALUE_WAIT_MS", RETURN_VALUE_WAIT_TIMEOUT_MS, {
|
|
33690
|
+
integer: true,
|
|
33691
|
+
min: 1
|
|
33692
|
+
});
|
|
33693
|
+
}
|
|
33694
|
+
__name(getReturnValueWaitTimeoutMs, "getReturnValueWaitTimeoutMs");
|
|
33695
|
+
var RETURN_VALUE_MAX_LONG_POLLS = 10;
|
|
33696
|
+
function getReturnValueMaxLongPolls() {
|
|
33697
|
+
return envNumber("WORKFLOW_RETURN_VALUE_MAX_LONG_POLLS", RETURN_VALUE_MAX_LONG_POLLS, {
|
|
33698
|
+
integer: true,
|
|
33699
|
+
min: 1
|
|
33700
|
+
});
|
|
33701
|
+
}
|
|
33702
|
+
__name(getReturnValueMaxLongPolls, "getReturnValueMaxLongPolls");
|
|
33703
|
+
function isReturnValueLongPollEnabled() {
|
|
33704
|
+
const raw = process.env.WORKFLOW_RETURN_VALUE_LONG_POLL;
|
|
33705
|
+
if (raw === void 0 || raw === "") return true;
|
|
33706
|
+
return !(raw === "0" || raw.toLowerCase() === "false");
|
|
33707
|
+
}
|
|
33708
|
+
__name(isReturnValueLongPollEnabled, "isReturnValueLongPollEnabled");
|
|
33589
33709
|
var Run = class _Run {
|
|
33590
33710
|
static {
|
|
33591
33711
|
__name(this, "Run");
|
|
@@ -33638,12 +33758,12 @@ var Run = class _Run {
|
|
|
33638
33758
|
* to be resolved once.
|
|
33639
33759
|
* @internal
|
|
33640
33760
|
*/
|
|
33641
|
-
#getEncryptionKey() {
|
|
33761
|
+
#getEncryptionKey(run2) {
|
|
33642
33762
|
if (!this.#encryptionKeyPromise) {
|
|
33643
33763
|
this.#encryptionKeyPromise = (async () => {
|
|
33644
33764
|
const world = await this.#lazyWorldPromise;
|
|
33645
|
-
const
|
|
33646
|
-
const rawKey = await world.getEncryptionKeyForRun?.(
|
|
33765
|
+
const runData = run2 ?? await world.runs.get(this.runId);
|
|
33766
|
+
const rawKey = await world.getEncryptionKeyForRun?.(runData);
|
|
33647
33767
|
return rawKey ? await deriveRunPayloadKeys(rawKey) : void 0;
|
|
33648
33768
|
})();
|
|
33649
33769
|
}
|
|
@@ -33704,11 +33824,13 @@ var Run = class _Run {
|
|
|
33704
33824
|
* The status of the workflow run.
|
|
33705
33825
|
*/
|
|
33706
33826
|
get status() {
|
|
33707
|
-
return this.#lazyWorldPromise.then((world) => world.runs.get(this.runId
|
|
33827
|
+
return this.#lazyWorldPromise.then((world) => world.runs.get(this.runId, {
|
|
33828
|
+
resolveData: "none"
|
|
33829
|
+
}).then((run2) => run2.status));
|
|
33708
33830
|
}
|
|
33709
33831
|
/**
|
|
33710
33832
|
* The return value of the workflow run.
|
|
33711
|
-
* Polls the workflow return value until
|
|
33833
|
+
* Polls the workflow return value until the workflow run completes.
|
|
33712
33834
|
*/
|
|
33713
33835
|
get returnValue() {
|
|
33714
33836
|
return this.#pollReturnValue();
|
|
@@ -33775,8 +33897,31 @@ var Run = class _Run {
|
|
|
33775
33897
|
}, "getTailIndex")
|
|
33776
33898
|
});
|
|
33777
33899
|
}
|
|
33900
|
+
/** @internal */
|
|
33901
|
+
async #resolveTerminalReturnValue(run2) {
|
|
33902
|
+
if (run2.status === "completed") {
|
|
33903
|
+
const encryptionKey = await this.#getEncryptionKey(run2);
|
|
33904
|
+
return await hydrateWorkflowReturnValue(run2.output, this.runId, encryptionKey);
|
|
33905
|
+
}
|
|
33906
|
+
if (run2.status === "cancelled") {
|
|
33907
|
+
throw new WorkflowRunCancelledError(this.runId);
|
|
33908
|
+
}
|
|
33909
|
+
if (run2.status === "failed") {
|
|
33910
|
+
const encryptionKey = await this.#getEncryptionKey(run2);
|
|
33911
|
+
let hydratedError;
|
|
33912
|
+
try {
|
|
33913
|
+
hydratedError = await hydrateRunError(run2.error, this.runId, encryptionKey);
|
|
33914
|
+
} catch {
|
|
33915
|
+
hydratedError = new Error("Failed to hydrate workflow run error");
|
|
33916
|
+
}
|
|
33917
|
+
throw new WorkflowRunFailedError(this.runId, hydratedError, {
|
|
33918
|
+
errorCode: run2.errorCode
|
|
33919
|
+
});
|
|
33920
|
+
}
|
|
33921
|
+
throw new WorkflowRunNotCompletedError(this.runId, run2.status);
|
|
33922
|
+
}
|
|
33778
33923
|
/**
|
|
33779
|
-
* Polls the workflow return value until
|
|
33924
|
+
* Polls the workflow return value until the workflow run completes.
|
|
33780
33925
|
* @internal
|
|
33781
33926
|
* @returns The workflow return value.
|
|
33782
33927
|
*/
|
|
@@ -33789,32 +33934,36 @@ var Run = class _Run {
|
|
|
33789
33934
|
3e3,
|
|
33790
33935
|
6e3
|
|
33791
33936
|
];
|
|
33937
|
+
const waitForTerminalStatus = isReturnValueLongPollEnabled() ? world.runs.waitForTerminalStatus?.bind(world.runs) : void 0;
|
|
33938
|
+
let longPolls = 0;
|
|
33939
|
+
const maxLongPolls = getReturnValueMaxLongPolls();
|
|
33792
33940
|
while (true) {
|
|
33941
|
+
const iterationStartedAt = Date.now();
|
|
33793
33942
|
try {
|
|
33794
|
-
const
|
|
33795
|
-
if (
|
|
33796
|
-
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
|
|
33943
|
+
const useLongPoll = waitForTerminalStatus && longPolls < maxLongPolls;
|
|
33944
|
+
if (useLongPoll) longPolls++;
|
|
33945
|
+
const runMetadata = useLongPoll ? await waitForTerminalStatus(this.runId, {
|
|
33946
|
+
timeoutMs: getReturnValueWaitTimeoutMs(),
|
|
33947
|
+
resolveData: "none"
|
|
33948
|
+
}) : await world.runs.get(this.runId, {
|
|
33949
|
+
resolveData: "none"
|
|
33950
|
+
});
|
|
33951
|
+
if (runMetadata.status === "cancelled") {
|
|
33800
33952
|
throw new WorkflowRunCancelledError(this.runId);
|
|
33801
33953
|
}
|
|
33802
|
-
if (
|
|
33803
|
-
const
|
|
33804
|
-
|
|
33805
|
-
try {
|
|
33806
|
-
hydratedError = await hydrateRunError(run2.error, this.runId, encryptionKey);
|
|
33807
|
-
} catch {
|
|
33808
|
-
hydratedError = new Error("Failed to hydrate workflow run error");
|
|
33809
|
-
}
|
|
33810
|
-
throw new WorkflowRunFailedError(this.runId, hydratedError, {
|
|
33811
|
-
errorCode: run2.errorCode
|
|
33954
|
+
if (PAYLOAD_TERMINAL_RUN_STATUSES.has(runMetadata.status)) {
|
|
33955
|
+
const run2 = await world.runs.get(this.runId, {
|
|
33956
|
+
resolveData: "all"
|
|
33812
33957
|
});
|
|
33958
|
+
return await this.#resolveTerminalReturnValue(run2);
|
|
33813
33959
|
}
|
|
33814
|
-
throw new WorkflowRunNotCompletedError(this.runId,
|
|
33960
|
+
throw new WorkflowRunNotCompletedError(this.runId, runMetadata.status);
|
|
33815
33961
|
} catch (error48) {
|
|
33816
33962
|
if (WorkflowRunNotCompletedError.is(error48)) {
|
|
33817
|
-
|
|
33963
|
+
const remainingIntervalMs = getReturnValuePollIntervalMs() - (Date.now() - iterationStartedAt);
|
|
33964
|
+
if (remainingIntervalMs > 0) {
|
|
33965
|
+
await new Promise((resolve) => setTimeout(resolve, remainingIntervalMs));
|
|
33966
|
+
}
|
|
33818
33967
|
continue;
|
|
33819
33968
|
}
|
|
33820
33969
|
if (WorkflowRunNotFoundError.is(error48) && notFoundRetries < NOT_FOUND_MAX_RETRIES) {
|
|
@@ -33836,7 +33985,7 @@ var Run = class _Run {
|
|
|
33836
33985
|
value: "wakeUp",
|
|
33837
33986
|
configurable: true
|
|
33838
33987
|
});
|
|
33839
|
-
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
33988
|
+
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#wakeUp");
|
|
33840
33989
|
(function(__wf_fn, __wf_id) {
|
|
33841
33990
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33842
33991
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33845,7 +33994,7 @@ var Run = class _Run {
|
|
|
33845
33994
|
value: "cancel",
|
|
33846
33995
|
configurable: true
|
|
33847
33996
|
});
|
|
33848
|
-
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
33997
|
+
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#cancel");
|
|
33849
33998
|
(function(__wf_fn, __wf_id) {
|
|
33850
33999
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33851
34000
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33854,7 +34003,7 @@ var Run = class _Run {
|
|
|
33854
34003
|
value: "getReadable",
|
|
33855
34004
|
configurable: true
|
|
33856
34005
|
});
|
|
33857
|
-
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34006
|
+
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#getReadable");
|
|
33858
34007
|
(function(__wf_fn, __wf_id) {
|
|
33859
34008
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33860
34009
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33863,7 +34012,7 @@ var Run = class _Run {
|
|
|
33863
34012
|
value: "exists",
|
|
33864
34013
|
configurable: true
|
|
33865
34014
|
});
|
|
33866
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34015
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#exists");
|
|
33867
34016
|
(function(__wf_fn, __wf_id) {
|
|
33868
34017
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33869
34018
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33872,7 +34021,7 @@ var Run = class _Run {
|
|
|
33872
34021
|
value: "status",
|
|
33873
34022
|
configurable: true
|
|
33874
34023
|
});
|
|
33875
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34024
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#status");
|
|
33876
34025
|
(function(__wf_fn, __wf_id) {
|
|
33877
34026
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33878
34027
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33881,7 +34030,7 @@ var Run = class _Run {
|
|
|
33881
34030
|
value: "returnValue",
|
|
33882
34031
|
configurable: true
|
|
33883
34032
|
});
|
|
33884
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34033
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#returnValue");
|
|
33885
34034
|
(function(__wf_fn, __wf_id) {
|
|
33886
34035
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33887
34036
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33890,7 +34039,7 @@ var Run = class _Run {
|
|
|
33890
34039
|
value: "workflowName",
|
|
33891
34040
|
configurable: true
|
|
33892
34041
|
});
|
|
33893
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34042
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#workflowName");
|
|
33894
34043
|
(function(__wf_fn, __wf_id) {
|
|
33895
34044
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33896
34045
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33899,7 +34048,7 @@ var Run = class _Run {
|
|
|
33899
34048
|
value: "createdAt",
|
|
33900
34049
|
configurable: true
|
|
33901
34050
|
});
|
|
33902
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34051
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#createdAt");
|
|
33903
34052
|
(function(__wf_fn, __wf_id) {
|
|
33904
34053
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33905
34054
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33908,7 +34057,7 @@ var Run = class _Run {
|
|
|
33908
34057
|
value: "startedAt",
|
|
33909
34058
|
configurable: true
|
|
33910
34059
|
});
|
|
33911
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34060
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#startedAt");
|
|
33912
34061
|
(function(__wf_fn, __wf_id) {
|
|
33913
34062
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33914
34063
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -33917,7 +34066,7 @@ var Run = class _Run {
|
|
|
33917
34066
|
value: "completedAt",
|
|
33918
34067
|
configurable: true
|
|
33919
34068
|
});
|
|
33920
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
34069
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.44//Run#completedAt");
|
|
33921
34070
|
(function(__wf_cls, __wf_id) {
|
|
33922
34071
|
var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
33923
34072
|
__wf_reg.set(__wf_id, __wf_cls);
|
|
@@ -33927,7 +34076,7 @@ var Run = class _Run {
|
|
|
33927
34076
|
enumerable: false,
|
|
33928
34077
|
configurable: false
|
|
33929
34078
|
});
|
|
33930
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
34079
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.44//Run");
|
|
33931
34080
|
|
|
33932
34081
|
// ../workflow/dist/stdlib.js
|
|
33933
34082
|
async function fetch2(...args) {
|
|
@@ -34050,7 +34199,7 @@ var ContextViolationError = class extends Error {
|
|
|
34050
34199
|
static {
|
|
34051
34200
|
__name(this, "ContextViolationError");
|
|
34052
34201
|
}
|
|
34053
|
-
/** Non-retryable
|
|
34202
|
+
/** Non-retryable, see class doc. */
|
|
34054
34203
|
fatal = true;
|
|
34055
34204
|
#content;
|
|
34056
34205
|
constructor(content) {
|