@workflow/web 5.0.0-beta.4 → 5.0.0-beta.6
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/build/client/assets/{encryption-80GMP4r0.js → encryption-DU49MAQV.js} +4 -2
- package/build/client/assets/{entry.client-BWsSsWQm.js → entry.client-DtOpLtMQ.js} +1 -1
- package/build/client/assets/{highlighted-body-B3W2YXNL-B7T9pqeb.js → highlighted-body-B3W2YXNL-BZLzBNxn.js} +2 -2
- package/build/client/assets/{home-BIQJMe_Q.js → home-DmK2qlF4.js} +4 -3
- package/build/client/assets/{index-DQa-BExo.js → index-BsV8i_Jn.js} +20 -20
- package/build/client/assets/index-Byi8AWfe.js +280 -0
- package/build/client/assets/manifest-f8f46e3c.js +1 -0
- package/build/client/assets/{mermaid-3ZIDBTTL-w46Kr90n.js → mermaid-3ZIDBTTL-D3hhpLut.js} +230 -47
- package/build/client/assets/{root-C0Tu5TVN.css → root-5XHFuftH.css} +1 -1
- package/build/client/assets/{root-sXuXrryl.js → root-DCSDR-Tx.js} +2 -2
- package/build/client/assets/{run-detail-7Pj2mQLs.js → run-detail-qu2t8u4x.js} +36 -11
- package/build/client/assets/{server-build-DqaxIrF0.css → server-build-olrGumlh.css} +1 -1
- package/build/client/assets/{workflow-graph-viewer-De9JQkZc.js → workflow-graph-viewer-Bl8eU-PY.js} +3 -3
- package/build/server/assets/{app-CtOg8_v5.js → app-C_Lhht8k.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-uaucauLI.js → highlighted-body-B3W2YXNL-DOOlKIMb.js} +6 -7
- package/build/server/assets/{index-D02biwxV.js → index-CRYPN_tt.js} +18 -20
- package/build/server/assets/{mermaid-3ZIDBTTL-DrZ5V6uv.js → mermaid-3ZIDBTTL-CglyhPap.js} +6 -7
- package/build/server/assets/{server-build-DT0Hg0Yf.js → server-build-CeQwCbX_.js} +34536 -33794
- package/build/server/assets/{token-D7_Lld85.js → token-CZpVopko.js} +2 -2
- package/build/server/assets/{token-util-CfY4anoc.js → token-util-DUvMx9Gj.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +8 -7
- package/build/client/assets/manifest-77894282.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-DU49MAQV.js","assets/index-Byi8AWfe.js","assets/index-BsV8i_Jn.js","assets/highlighted-body-B3W2YXNL-BZLzBNxn.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
var _a2;
|
|
6
|
-
import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports,
|
|
6
|
+
import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, I as React, R as ReactExports, D as ReactDOM, g as getDefaultExportFromCjs } from "./index-BsV8i_Jn.js";
|
|
7
7
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
8
8
|
return function handleEvent(event) {
|
|
9
9
|
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
@@ -10359,9 +10359,9 @@ function hydrateData(value, revivers) {
|
|
|
10359
10359
|
async function hydrateDataWithKey(value, revivers, key) {
|
|
10360
10360
|
if (value instanceof Uint8Array && isEncryptedData(value) && key) {
|
|
10361
10361
|
const { decrypt } = await __vitePreload(async () => {
|
|
10362
|
-
const { decrypt: decrypt2 } = await import("./encryption-
|
|
10362
|
+
const { decrypt: decrypt2 } = await import("./encryption-DU49MAQV.js");
|
|
10363
10363
|
return { decrypt: decrypt2 };
|
|
10364
|
-
}, true ? [] : void 0);
|
|
10364
|
+
}, true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
10365
10365
|
const { payload } = decodeFormatPrefix(value);
|
|
10366
10366
|
const decrypted = await decrypt(key, payload);
|
|
10367
10367
|
return hydrateData(decrypted, revivers);
|
|
@@ -10441,6 +10441,34 @@ const observabilityRevivers = {
|
|
|
10441
10441
|
ReadableStream: streamToStreamRef,
|
|
10442
10442
|
WritableStream: streamToStreamRef,
|
|
10443
10443
|
TransformStream: streamToStreamRef,
|
|
10444
|
+
AbortController: (value) => `<AbortController(aborted: ${value.aborted})>`,
|
|
10445
|
+
AbortSignal: (value) => `<AbortSignal(aborted: ${value.aborted})>`,
|
|
10446
|
+
// DOMException needs an explicit reviver: without one, devalue.parse
|
|
10447
|
+
// throws on the `["DOMException", ...]` tag and `hydrateStepIO`'s
|
|
10448
|
+
// try/catch leaves the raw flat-encoded string in the UI. AbortController
|
|
10449
|
+
// synthesizes a DOMException as the default `signal.reason` when abort()
|
|
10450
|
+
// is called with no arg — so any abort that round-trips through a step
|
|
10451
|
+
// boundary surfaces here. Reconstruct as a real DOMException when the
|
|
10452
|
+
// global is available (modern browsers + Node 18+), else fall back to
|
|
10453
|
+
// an Error preserving name/message/stack/cause for display.
|
|
10454
|
+
DOMException: (value) => {
|
|
10455
|
+
const G2 = globalThis;
|
|
10456
|
+
if (typeof G2.DOMException === "function") {
|
|
10457
|
+
const e2 = new G2.DOMException(value.message, value.name);
|
|
10458
|
+
if (value.stack !== void 0)
|
|
10459
|
+
e2.stack = value.stack;
|
|
10460
|
+
if ("cause" in value)
|
|
10461
|
+
e2.cause = value.cause;
|
|
10462
|
+
return e2;
|
|
10463
|
+
}
|
|
10464
|
+
const e = new Error(value.message);
|
|
10465
|
+
e.name = value.name;
|
|
10466
|
+
if (value.stack !== void 0)
|
|
10467
|
+
e.stack = value.stack;
|
|
10468
|
+
if ("cause" in value)
|
|
10469
|
+
e.cause = value.cause;
|
|
10470
|
+
return e;
|
|
10471
|
+
},
|
|
10444
10472
|
StepFunction: serializedStepFunctionToString,
|
|
10445
10473
|
WorkflowFunction: (value) => `<workflow:${value.workflowId}>`,
|
|
10446
10474
|
Instance: serializedInstanceToRef,
|
|
@@ -10449,6 +10477,7 @@ const observabilityRevivers = {
|
|
|
10449
10477
|
function hydrateStepIO(resource, revivers) {
|
|
10450
10478
|
let hydratedInput = resource.input;
|
|
10451
10479
|
let hydratedOutput = resource.output;
|
|
10480
|
+
let hydratedError = resource.error;
|
|
10452
10481
|
if (resource.input != null) {
|
|
10453
10482
|
try {
|
|
10454
10483
|
hydratedInput = hydrateData(resource.input, revivers);
|
|
@@ -10461,11 +10490,23 @@ function hydrateStepIO(resource, revivers) {
|
|
|
10461
10490
|
} catch {
|
|
10462
10491
|
}
|
|
10463
10492
|
}
|
|
10464
|
-
|
|
10493
|
+
if (resource.error != null) {
|
|
10494
|
+
try {
|
|
10495
|
+
hydratedError = hydrateData(resource.error, revivers);
|
|
10496
|
+
} catch {
|
|
10497
|
+
}
|
|
10498
|
+
}
|
|
10499
|
+
return {
|
|
10500
|
+
...resource,
|
|
10501
|
+
input: hydratedInput,
|
|
10502
|
+
output: hydratedOutput,
|
|
10503
|
+
error: hydratedError
|
|
10504
|
+
};
|
|
10465
10505
|
}
|
|
10466
10506
|
function hydrateWorkflowIO(resource, revivers) {
|
|
10467
10507
|
let hydratedInput = resource.input;
|
|
10468
10508
|
let hydratedOutput = resource.output;
|
|
10509
|
+
let hydratedError = resource.error;
|
|
10469
10510
|
if (resource.input != null) {
|
|
10470
10511
|
try {
|
|
10471
10512
|
hydratedInput = hydrateData(resource.input, revivers);
|
|
@@ -10478,7 +10519,18 @@ function hydrateWorkflowIO(resource, revivers) {
|
|
|
10478
10519
|
} catch {
|
|
10479
10520
|
}
|
|
10480
10521
|
}
|
|
10481
|
-
|
|
10522
|
+
if (resource.error != null) {
|
|
10523
|
+
try {
|
|
10524
|
+
hydratedError = hydrateData(resource.error, revivers);
|
|
10525
|
+
} catch {
|
|
10526
|
+
}
|
|
10527
|
+
}
|
|
10528
|
+
return {
|
|
10529
|
+
...resource,
|
|
10530
|
+
input: hydratedInput,
|
|
10531
|
+
output: hydratedOutput,
|
|
10532
|
+
error: hydratedError
|
|
10533
|
+
};
|
|
10482
10534
|
}
|
|
10483
10535
|
function hydrateEventData(resource, revivers) {
|
|
10484
10536
|
if (!resource.eventData)
|
|
@@ -10514,6 +10566,12 @@ function hydrateEventData(resource, revivers) {
|
|
|
10514
10566
|
} catch {
|
|
10515
10567
|
}
|
|
10516
10568
|
}
|
|
10569
|
+
if ("error" in eventData && eventData.error != null) {
|
|
10570
|
+
try {
|
|
10571
|
+
eventData.error = hydrateData(eventData.error, revivers);
|
|
10572
|
+
} catch {
|
|
10573
|
+
}
|
|
10574
|
+
}
|
|
10517
10575
|
return { ...resource, eventData };
|
|
10518
10576
|
}
|
|
10519
10577
|
function hydrateHookMetadata(resource, revivers) {
|
|
@@ -15309,16 +15367,18 @@ const StepFailedEventSchema = BaseEventSchema.extend({
|
|
|
15309
15367
|
eventType: literal("step_failed"),
|
|
15310
15368
|
correlationId: string$2(),
|
|
15311
15369
|
eventData: object({
|
|
15312
|
-
|
|
15313
|
-
|
|
15370
|
+
// The thrown value, serialized via the workflow serialization pipeline.
|
|
15371
|
+
// Can be any JavaScript value (string, number, object, Error, etc.)
|
|
15372
|
+
error: SerializedDataSchema
|
|
15314
15373
|
})
|
|
15315
15374
|
});
|
|
15316
15375
|
const StepRetryingEventSchema = BaseEventSchema.extend({
|
|
15317
15376
|
eventType: literal("step_retrying"),
|
|
15318
15377
|
correlationId: string$2(),
|
|
15319
15378
|
eventData: object({
|
|
15320
|
-
|
|
15321
|
-
|
|
15379
|
+
// The thrown value, serialized via the workflow serialization pipeline.
|
|
15380
|
+
// Can be any JavaScript value (string, number, object, Error, etc.)
|
|
15381
|
+
error: SerializedDataSchema,
|
|
15322
15382
|
retryAfter: date().optional()
|
|
15323
15383
|
})
|
|
15324
15384
|
});
|
|
@@ -15342,7 +15402,9 @@ const HookCreatedEventSchema = BaseEventSchema.extend({
|
|
|
15342
15402
|
correlationId: string$2(),
|
|
15343
15403
|
eventData: object({
|
|
15344
15404
|
token: string$2(),
|
|
15345
|
-
metadata: SerializedDataSchema.optional()
|
|
15405
|
+
metadata: SerializedDataSchema.optional(),
|
|
15406
|
+
isWebhook: boolean$2().optional(),
|
|
15407
|
+
isSystem: boolean$2().optional()
|
|
15346
15408
|
})
|
|
15347
15409
|
});
|
|
15348
15410
|
const HookReceivedEventSchema = BaseEventSchema.extend({
|
|
@@ -15360,7 +15422,10 @@ const HookConflictEventSchema = BaseEventSchema.extend({
|
|
|
15360
15422
|
eventType: literal("hook_conflict"),
|
|
15361
15423
|
correlationId: string$2(),
|
|
15362
15424
|
eventData: object({
|
|
15363
|
-
token: string$2()
|
|
15425
|
+
token: string$2(),
|
|
15426
|
+
// TODO: Make this required once all persisted hook_conflict events and
|
|
15427
|
+
// remote World implementations always include the active hook owner's run ID.
|
|
15428
|
+
conflictingRunId: string$2().optional()
|
|
15364
15429
|
})
|
|
15365
15430
|
});
|
|
15366
15431
|
const WaitCreatedEventSchema = BaseEventSchema.extend({
|
|
@@ -15401,7 +15466,13 @@ const RunCompletedEventSchema = BaseEventSchema.extend({
|
|
|
15401
15466
|
const RunFailedEventSchema = BaseEventSchema.extend({
|
|
15402
15467
|
eventType: literal("run_failed"),
|
|
15403
15468
|
eventData: object({
|
|
15404
|
-
|
|
15469
|
+
// The thrown value, serialized via the workflow serialization pipeline.
|
|
15470
|
+
// Can be any JavaScript value (string, number, object, Error, etc.)
|
|
15471
|
+
error: SerializedDataSchema,
|
|
15472
|
+
// The high-level error category (USER_ERROR, RUNTIME_ERROR, etc.) used
|
|
15473
|
+
// for routing and classification. Kept as plaintext metadata so
|
|
15474
|
+
// observability tools can filter/categorize without needing to decrypt
|
|
15475
|
+
// the full error payload.
|
|
15405
15476
|
errorCode: string$2().optional()
|
|
15406
15477
|
})
|
|
15407
15478
|
});
|
|
@@ -15469,7 +15540,8 @@ object({
|
|
|
15469
15540
|
createdAt: date(),
|
|
15470
15541
|
// Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
|
|
15471
15542
|
specVersion: number$2().optional(),
|
|
15472
|
-
isWebhook: boolean$2().optional()
|
|
15543
|
+
isWebhook: boolean$2().optional(),
|
|
15544
|
+
isSystem: boolean$2().optional()
|
|
15473
15545
|
});
|
|
15474
15546
|
const QueuePrefix = union([
|
|
15475
15547
|
literal("__wkf_step_"),
|
|
@@ -15491,6 +15563,11 @@ const WorkflowInvokePayloadSchema = object({
|
|
|
15491
15563
|
requestedAt: date().optional(),
|
|
15492
15564
|
/** Number of times this message has been re-enqueued due to server errors (5xx) */
|
|
15493
15565
|
serverErrorRetryCount: number$2().int().optional(),
|
|
15566
|
+
/** Step ID for inline step execution in combined handler. If provided, the flow execution
|
|
15567
|
+
* will jump directly to execute the step with the given ID before doing an event replay. */
|
|
15568
|
+
stepId: string$2().optional(),
|
|
15569
|
+
/** Step name, sent alongside stepId to avoid loading the event log just to resolve the name. */
|
|
15570
|
+
stepName: string$2().optional(),
|
|
15494
15571
|
/** Run creation data, only present on the first queue delivery from start() */
|
|
15495
15572
|
runInput: RunInputSchema.optional()
|
|
15496
15573
|
});
|
|
@@ -15511,22 +15588,6 @@ union([
|
|
|
15511
15588
|
StepInvokePayloadSchema,
|
|
15512
15589
|
HealthCheckPayloadSchema
|
|
15513
15590
|
]);
|
|
15514
|
-
const zodJsonSchema = lazy(() => {
|
|
15515
|
-
return union([
|
|
15516
|
-
string$2(),
|
|
15517
|
-
number$2(),
|
|
15518
|
-
boolean$2(),
|
|
15519
|
-
_null(),
|
|
15520
|
-
array(zodJsonSchema),
|
|
15521
|
-
record(string$2(), zodJsonSchema)
|
|
15522
|
-
]);
|
|
15523
|
-
});
|
|
15524
|
-
const StructuredErrorSchema = object({
|
|
15525
|
-
message: string$2(),
|
|
15526
|
-
stack: string$2().optional(),
|
|
15527
|
-
code: string$2().optional()
|
|
15528
|
-
// Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR) for run_failed events
|
|
15529
|
-
});
|
|
15530
15591
|
const WorkflowRunStatusSchema = _enum([
|
|
15531
15592
|
"pending",
|
|
15532
15593
|
"running",
|
|
@@ -15564,7 +15625,20 @@ const WorkflowRunBaseSchema = object({
|
|
|
15564
15625
|
executionContext: record(string$2(), any()).optional(),
|
|
15565
15626
|
input: SerializedDataSchema,
|
|
15566
15627
|
output: SerializedDataSchema.optional(),
|
|
15567
|
-
|
|
15628
|
+
/**
|
|
15629
|
+
* The thrown value from a run_failed event, serialized via the workflow
|
|
15630
|
+
* serialization pipeline. To display the error to a user, hydrate it via
|
|
15631
|
+
* `hydrateRunError` (with the encryption key if encryption is enabled).
|
|
15632
|
+
* Observability tools cannot view the error without going through the
|
|
15633
|
+
* decryption + hydration pipeline.
|
|
15634
|
+
*/
|
|
15635
|
+
error: SerializedDataSchema.optional(),
|
|
15636
|
+
/**
|
|
15637
|
+
* The high-level error category (USER_ERROR, RUNTIME_ERROR, etc.) from a
|
|
15638
|
+
* run_failed event. Kept as plaintext metadata for routing and filtering
|
|
15639
|
+
* without needing to decrypt the full error payload.
|
|
15640
|
+
*/
|
|
15641
|
+
errorCode: string$2().optional(),
|
|
15568
15642
|
expiredAt: date().optional(),
|
|
15569
15643
|
startedAt: date().optional(),
|
|
15570
15644
|
completedAt: date().optional(),
|
|
@@ -15575,32 +15649,48 @@ discriminatedUnion("status", [
|
|
|
15575
15649
|
// Non-final states
|
|
15576
15650
|
WorkflowRunBaseSchema.extend({
|
|
15577
15651
|
status: _enum(["pending", "running"]),
|
|
15578
|
-
output: _undefined(),
|
|
15579
|
-
error: _undefined(),
|
|
15580
|
-
completedAt: _undefined()
|
|
15652
|
+
output: _undefined().optional(),
|
|
15653
|
+
error: _undefined().optional(),
|
|
15654
|
+
completedAt: _undefined().optional()
|
|
15581
15655
|
}),
|
|
15582
15656
|
// Cancelled state
|
|
15583
15657
|
WorkflowRunBaseSchema.extend({
|
|
15584
15658
|
status: literal("cancelled"),
|
|
15585
|
-
output: _undefined(),
|
|
15586
|
-
error: _undefined(),
|
|
15659
|
+
output: _undefined().optional(),
|
|
15660
|
+
error: _undefined().optional(),
|
|
15587
15661
|
completedAt: date()
|
|
15588
15662
|
}),
|
|
15589
15663
|
// Completed state - output can be v1 or v2 format
|
|
15590
15664
|
WorkflowRunBaseSchema.extend({
|
|
15591
15665
|
status: literal("completed"),
|
|
15592
15666
|
output: SerializedDataSchema,
|
|
15593
|
-
error: _undefined(),
|
|
15667
|
+
error: _undefined().optional(),
|
|
15594
15668
|
completedAt: date()
|
|
15595
15669
|
}),
|
|
15596
15670
|
// Failed state
|
|
15597
15671
|
WorkflowRunBaseSchema.extend({
|
|
15598
15672
|
status: literal("failed"),
|
|
15599
|
-
output: _undefined(),
|
|
15600
|
-
error:
|
|
15673
|
+
output: _undefined().optional(),
|
|
15674
|
+
error: SerializedDataSchema,
|
|
15601
15675
|
completedAt: date()
|
|
15602
15676
|
})
|
|
15603
15677
|
]);
|
|
15678
|
+
const zodJsonSchema = lazy(() => {
|
|
15679
|
+
return union([
|
|
15680
|
+
string$2(),
|
|
15681
|
+
number$2(),
|
|
15682
|
+
boolean$2(),
|
|
15683
|
+
_null(),
|
|
15684
|
+
array(zodJsonSchema),
|
|
15685
|
+
record(string$2(), zodJsonSchema)
|
|
15686
|
+
]);
|
|
15687
|
+
});
|
|
15688
|
+
object({
|
|
15689
|
+
message: string$2(),
|
|
15690
|
+
stack: string$2().optional(),
|
|
15691
|
+
code: string$2().optional()
|
|
15692
|
+
// Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR) for run_failed events
|
|
15693
|
+
});
|
|
15604
15694
|
const StepStatusSchema = _enum([
|
|
15605
15695
|
"pending",
|
|
15606
15696
|
"running",
|
|
@@ -15636,11 +15726,16 @@ object({
|
|
|
15636
15726
|
input: SerializedDataSchema,
|
|
15637
15727
|
output: SerializedDataSchema.optional(),
|
|
15638
15728
|
/**
|
|
15639
|
-
* The
|
|
15640
|
-
*
|
|
15641
|
-
* be from a retry attempt (step_retrying)
|
|
15729
|
+
* The thrown value from a step_retrying or step_failed event, serialized
|
|
15730
|
+
* via the workflow serialization pipeline. Tracks the most recent error
|
|
15731
|
+
* the step encountered, which may be from a retry attempt (step_retrying)
|
|
15732
|
+
* or the final failure (step_failed).
|
|
15733
|
+
*
|
|
15734
|
+
* To display the error to a user, hydrate it via `hydrateStepError` (with
|
|
15735
|
+
* the encryption key if encryption is enabled). Observability tools cannot
|
|
15736
|
+
* view the error without going through the decryption + hydration pipeline.
|
|
15642
15737
|
*/
|
|
15643
|
-
error:
|
|
15738
|
+
error: SerializedDataSchema.optional(),
|
|
15644
15739
|
attempt: number$2(),
|
|
15645
15740
|
/**
|
|
15646
15741
|
* When the step first started executing. Set by the first step_started event
|
|
@@ -15677,6 +15772,21 @@ function base64ToArrayBuffer(base642) {
|
|
|
15677
15772
|
}
|
|
15678
15773
|
return bytes.buffer;
|
|
15679
15774
|
}
|
|
15775
|
+
function makeWebErrorSubclassReviver(name2) {
|
|
15776
|
+
return (value) => {
|
|
15777
|
+
const opts = "cause" in value ? { cause: value.cause } : void 0;
|
|
15778
|
+
const Ctor = globalThis[name2];
|
|
15779
|
+
let error;
|
|
15780
|
+
if (typeof Ctor === "function") {
|
|
15781
|
+
error = new Ctor(value.message, opts);
|
|
15782
|
+
} else {
|
|
15783
|
+
error = Object.assign(new Error(value.message, opts), { name: name2 });
|
|
15784
|
+
}
|
|
15785
|
+
if (value.stack !== void 0)
|
|
15786
|
+
error.stack = value.stack;
|
|
15787
|
+
return error;
|
|
15788
|
+
};
|
|
15789
|
+
}
|
|
15680
15790
|
function getWebRevivers() {
|
|
15681
15791
|
function reviveArrayBuffer(value) {
|
|
15682
15792
|
return base64ToArrayBuffer(value);
|
|
@@ -15691,10 +15801,83 @@ function getWebRevivers() {
|
|
|
15691
15801
|
BigInt64Array: (value) => new BigInt64Array(reviveArrayBuffer(value)),
|
|
15692
15802
|
BigUint64Array: (value) => new BigUint64Array(reviveArrayBuffer(value)),
|
|
15693
15803
|
Date: (value) => new Date(value),
|
|
15804
|
+
// Error family. The reducer side (see
|
|
15805
|
+
// `packages/core/src/serialization/reducers/common.ts`) emits a tagged
|
|
15806
|
+
// entry for each built-in Error subclass plus the workflow-specific
|
|
15807
|
+
// `FatalError` / `RetryableError` and `AggregateError`. Without
|
|
15808
|
+
// matching revivers here, `devalue.unflatten` throws "Unknown type X"
|
|
15809
|
+
// — which surfaces in the web o11y UI as "Failed to load resource
|
|
15810
|
+
// details: Unknown type FatalError".
|
|
15694
15811
|
Error: (value) => {
|
|
15812
|
+
const opts = "cause" in value ? { cause: value.cause } : void 0;
|
|
15813
|
+
const error = new Error(value.message, opts);
|
|
15814
|
+
error.name = value.name;
|
|
15815
|
+
if (value.stack !== void 0)
|
|
15816
|
+
error.stack = value.stack;
|
|
15817
|
+
return error;
|
|
15818
|
+
},
|
|
15819
|
+
EvalError: makeWebErrorSubclassReviver("EvalError"),
|
|
15820
|
+
RangeError: makeWebErrorSubclassReviver("RangeError"),
|
|
15821
|
+
ReferenceError: makeWebErrorSubclassReviver("ReferenceError"),
|
|
15822
|
+
SyntaxError: makeWebErrorSubclassReviver("SyntaxError"),
|
|
15823
|
+
TypeError: makeWebErrorSubclassReviver("TypeError"),
|
|
15824
|
+
URIError: makeWebErrorSubclassReviver("URIError"),
|
|
15825
|
+
AggregateError: (value) => {
|
|
15826
|
+
const opts = "cause" in value ? { cause: value.cause } : void 0;
|
|
15827
|
+
const Ctor = globalThis.AggregateError;
|
|
15828
|
+
const error = typeof Ctor === "function" ? new Ctor(value.errors, value.message, opts) : Object.assign(new Error(value.message, opts), {
|
|
15829
|
+
name: "AggregateError",
|
|
15830
|
+
errors: value.errors
|
|
15831
|
+
});
|
|
15832
|
+
if (value.stack !== void 0)
|
|
15833
|
+
error.stack = value.stack;
|
|
15834
|
+
return error;
|
|
15835
|
+
},
|
|
15836
|
+
// `FatalError` and `RetryableError` are not built-in browser globals,
|
|
15837
|
+
// so we can't resolve a constructor from globalThis. The web o11y UI
|
|
15838
|
+
// doesn't need `instanceof FatalError` to pass (no user code runs
|
|
15839
|
+
// here) — it just needs `name`, `message`, `stack`, and any extra
|
|
15840
|
+
// enumerable fields to render. Construct a plain `Error` with `name`
|
|
15841
|
+
// set; ObjectInspector reads `constructor.name` for the displayed
|
|
15842
|
+
// class label, but we don't have the real class, so we emit a tagged
|
|
15843
|
+
// Error whose `name` field carries the class identity. This matches
|
|
15844
|
+
// how the existing base `Error` reviver presents unknown subclasses.
|
|
15845
|
+
FatalError: (value) => {
|
|
15846
|
+
const opts = "cause" in value ? { cause: value.cause } : void 0;
|
|
15847
|
+
const error = new Error(value.message, opts);
|
|
15848
|
+
error.name = "FatalError";
|
|
15849
|
+
if (value.stack !== void 0)
|
|
15850
|
+
error.stack = value.stack;
|
|
15851
|
+
return error;
|
|
15852
|
+
},
|
|
15853
|
+
RetryableError: (value) => {
|
|
15854
|
+
const opts = "cause" in value ? { cause: value.cause } : void 0;
|
|
15855
|
+
const error = new Error(value.message, opts);
|
|
15856
|
+
error.name = "RetryableError";
|
|
15857
|
+
if (value.stack !== void 0)
|
|
15858
|
+
error.stack = value.stack;
|
|
15859
|
+
if (value.retryAfter != null) {
|
|
15860
|
+
error.retryAfter = new Date(value.retryAfter);
|
|
15861
|
+
}
|
|
15862
|
+
return error;
|
|
15863
|
+
},
|
|
15864
|
+
DOMException: (value) => {
|
|
15865
|
+
const G2 = globalThis;
|
|
15866
|
+
if (typeof G2.DOMException === "function") {
|
|
15867
|
+
const e = new G2.DOMException(value.message, value.name);
|
|
15868
|
+
if (value.stack !== void 0)
|
|
15869
|
+
e.stack = value.stack;
|
|
15870
|
+
if ("cause" in value)
|
|
15871
|
+
e.cause = value.cause;
|
|
15872
|
+
return e;
|
|
15873
|
+
}
|
|
15695
15874
|
const error = new Error(value.message);
|
|
15696
15875
|
error.name = value.name;
|
|
15697
|
-
|
|
15876
|
+
if (value.stack !== void 0)
|
|
15877
|
+
error.stack = value.stack;
|
|
15878
|
+
if ("cause" in value) {
|
|
15879
|
+
error.cause = value.cause;
|
|
15880
|
+
}
|
|
15698
15881
|
return error;
|
|
15699
15882
|
},
|
|
15700
15883
|
Float32Array: (value) => new Float32Array(reviveArrayBuffer(value)),
|
|
@@ -15832,9 +16015,9 @@ async function hydrateResourceIOWithKey(resource, key) {
|
|
|
15832
16015
|
return { hydrateDataWithKey: hydrateDataWithKey3 };
|
|
15833
16016
|
}, true ? void 0 : void 0);
|
|
15834
16017
|
const { importKey } = await __vitePreload(async () => {
|
|
15835
|
-
const { importKey: importKey2 } = await import("./encryption-
|
|
16018
|
+
const { importKey: importKey2 } = await import("./encryption-DU49MAQV.js");
|
|
15836
16019
|
return { importKey: importKey2 };
|
|
15837
|
-
}, true ? [] : void 0);
|
|
16020
|
+
}, true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
15838
16021
|
const cryptoKey = await importKey(key);
|
|
15839
16022
|
const revivers = getRevivers();
|
|
15840
16023
|
async function decryptField(value, rev, k2) {
|
|
@@ -42964,7 +43147,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
42964
43147
|
var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
|
|
42965
43148
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
42966
43149
|
var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
|
|
42967
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-
|
|
43150
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-BZLzBNxn.js"), true ? __vite__mapDeps([3,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
42968
43151
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
42969
43152
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
42970
43153
|
return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
|