eve 0.11.4 → 0.11.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +1 -1
  3. package/dist/src/cli/banner.d.ts +0 -1
  4. package/dist/src/cli/banner.js +1 -1
  5. package/dist/src/cli/commands/init.js +1 -1
  6. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  7. package/dist/src/compiled/.vendor-stamp.json +1 -1
  8. package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -1
  9. package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
  10. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  11. package/dist/src/compiled/@ai-sdk/openai/index.js +1 -1
  12. package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
  13. package/dist/src/compiled/@workflow/core/capabilities.d.ts +3 -0
  14. package/dist/src/compiled/@workflow/core/index.js +2 -2
  15. package/dist/src/compiled/@workflow/core/private.js +1 -1
  16. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +11 -1
  17. package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +6 -0
  18. package/dist/src/compiled/@workflow/core/runtime.js +19 -19
  19. package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +16 -0
  20. package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +104 -0
  21. package/dist/src/compiled/@workflow/core/serialization/index.d.ts +7 -6
  22. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +4 -0
  23. package/dist/src/compiled/@workflow/core/serialization-format.d.ts +15 -0
  24. package/dist/src/compiled/@workflow/core/serialization.d.ts +8 -7
  25. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +24 -0
  26. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  27. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  28. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  29. package/dist/src/compiled/_chunks/workflow/{attribute-changes-Db-CKuLh.js → attribute-changes-Bi5DLT8S.js} +11 -11
  30. package/dist/src/compiled/_chunks/workflow/chunk-BHKSVoKr.js +1 -0
  31. package/dist/src/compiled/_chunks/workflow/coerce-B-Ro4Nfe.js +1 -0
  32. package/dist/src/compiled/_chunks/workflow/{compat-CG1hDp-3.js → compat-DLpWymPP.js} +1 -1
  33. package/dist/src/compiled/_chunks/workflow/{core-5Woff_dW.js → core-CXJbIkCL.js} +1 -1
  34. package/dist/src/compiled/_chunks/workflow/{dist-DhA2lbtB.js → dist-DTchiX0N.js} +1 -1
  35. package/dist/src/compiled/_chunks/workflow/{dist-DvHFhSJM.js → dist-Dxrjttr2.js} +1 -1
  36. package/dist/src/compiled/_chunks/workflow/{dist-aOKD_2KN.js → dist-FLIfyJ4Y.js} +1 -1
  37. package/dist/src/compiled/_chunks/workflow/{functions-DuPjIvMH.js → functions-CnVBREsg.js} +1 -1
  38. package/dist/src/compiled/_chunks/workflow/resume-hook-CKTw-lb5.js +1 -0
  39. package/dist/src/compiled/_chunks/workflow/run-XM8dTRAo.js +1 -0
  40. package/dist/src/compiled/_chunks/workflow/{schemas-DWOIBELG.js → schemas-iG9Z4s4o.js} +1 -1
  41. package/dist/src/compiled/_chunks/workflow/{sleep-BG6X2Bli.js → sleep-DPjVkRY-.js} +1 -1
  42. package/dist/src/compiled/_chunks/workflow/{src-B54rYDvB.js → src-CQuMexnO.js} +1 -1
  43. package/dist/src/compiled/_chunks/workflow/{token-CcaAeZHd.js → token-Bm-WLAUB.js} +1 -1
  44. package/dist/src/compiled/_chunks/workflow/{token-nK4u-N7w.js → token-J7YP0s9a.js} +1 -1
  45. package/dist/src/compiled/_chunks/workflow/wrapper-CQmdlFyy.js +6 -0
  46. package/dist/src/compiled/jose/index.js +1 -1
  47. package/dist/src/compiled/zod/index.js +1 -1
  48. package/dist/src/compiled/zod-validation-error/index.js +1 -1
  49. package/dist/src/execution/workflow-entry.js +1 -1
  50. package/dist/src/internal/application/package.js +1 -1
  51. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  52. package/dist/src/internal/nitro/host/vercel-build-prewarm.js +1 -1
  53. package/dist/src/public/channels/slack/defaults.js +1 -1
  54. package/dist/src/public/channels/slack/slackChannel.d.ts +9 -0
  55. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  56. package/dist/src/public/definitions/defineChannel.d.ts +2 -0
  57. package/dist/src/public/definitions/defineChannel.js +1 -1
  58. package/dist/src/setup/package-manager.d.ts +1 -1
  59. package/dist/src/setup/package-manager.js +1 -1
  60. package/dist/src/setup/scaffold/create/project.js +1 -1
  61. package/docs/agent-config.md +7 -1
  62. package/docs/channels/eve.mdx +1 -1
  63. package/docs/channels/slack.mdx +1 -1
  64. package/docs/concepts/execution-model-and-durability.md +6 -0
  65. package/docs/getting-started.mdx +2 -2
  66. package/docs/guides/auth-and-route-protection.md +5 -1
  67. package/docs/guides/deployment.md +84 -14
  68. package/docs/guides/instrumentation.md +7 -7
  69. package/docs/reference/cli.md +1 -1
  70. package/docs/sandbox.mdx +1 -1
  71. package/docs/schedules.mdx +7 -1
  72. package/docs/tutorial/first-agent.mdx +1 -1
  73. package/package.json +3 -3
  74. package/dist/src/compiled/_chunks/workflow/chunk-DSjMdhoD.js +0 -1
  75. package/dist/src/compiled/_chunks/workflow/coerce-BTuSKQr5.js +0 -1
  76. package/dist/src/compiled/_chunks/workflow/resume-hook-Uk1RAmYo.js +0 -1
  77. package/dist/src/compiled/_chunks/workflow/run-AA-FTD_U.js +0 -1
@@ -13,6 +13,7 @@
13
13
  * - **json**: Would only support standard JSON types (primitives, arrays,
14
14
  * plain objects). No Date, Map, Set, typed arrays, etc.
15
15
  */
16
+ import type { CompressionStats } from './compression.js';
16
17
  import type { FormatPrefix } from './types.js';
17
18
  /**
18
19
  * The serialization mode determines which types are supported and how
@@ -49,6 +50,21 @@ export interface CodecOptions {
49
50
  * or other mode-specific type revivers.
50
51
  */
51
52
  extraRevivers?: Record<string, (value: any) => any>;
53
+ /**
54
+ * Whether to gzip-compress the serialized payload (write side only;
55
+ * reads always handle both compressed and uncompressed data). Must
56
+ * only be enabled when the target run supports compressed payloads:
57
+ * run specVersion >= SPEC_VERSION_SUPPORTS_COMPRESSION, and for
58
+ * cross-deployment writes the target deployment's capabilities (see
59
+ * `getRunCapabilities` in capabilities.ts). Defaults to `false`.
60
+ */
61
+ compression?: boolean;
62
+ /**
63
+ * Optional telemetry sink populated by the compression layer with what
64
+ * it did to the payload (whether it compressed, logical vs stored size).
65
+ * Used by the dehydrate/hydrate wrappers to emit OTel span attributes.
66
+ */
67
+ compressionStats?: CompressionStats;
52
68
  }
53
69
  export interface Codec {
54
70
  /** The 4-character format prefix identifier (e.g. "devl", "cbor", "json") */
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Composable compression layer for serialized data.
3
+ *
4
+ * Wraps/unwraps serialized payloads with a compression codec, using the
5
+ * format prefix system to mark compressed data (e.g. 'zstd' or 'gzip'
6
+ * wrapping the inner format: 'zstd' + zstd('devl' + payload)).
7
+ *
8
+ * Codec selection (write side): zstd is preferred — it is markedly faster
9
+ * than gzip at a comparable-or-better ratio (see scripts/README.md), and
10
+ * compression runs at every step boundary so the write CPU is a per-step
11
+ * tax. zstd requires `node:zlib` >= 22.15 (Web `CompressionStream` has no
12
+ * zstd), so on a runtime without it we fall back to gzip via the portable
13
+ * `CompressionStream`. `WORKFLOW_COMPRESSION_CODEC=gzip` forces the
14
+ * portable codec.
15
+ *
16
+ * Read side: dispatch on the format prefix, so both 'zstd' and 'gzip'
17
+ * payloads are always decodable regardless of which codec wrote them.
18
+ * (The browser o11y read path decodes zstd via a registered WASM decoder —
19
+ * see `serialization-format.ts`; this module's `decompress` is the Node
20
+ * runtime/replay path and uses `node:zlib`.)
21
+ *
22
+ * Layering order with encryption: compression is applied BEFORE
23
+ * encryption (encr(zstd(devl))) — encrypted bytes are high-entropy and
24
+ * do not compress, so the reverse order would be a no-op.
25
+ *
26
+ * Compression is conditional:
27
+ * - Payloads smaller than {@link COMPRESSION_MIN_BYTES} are passed
28
+ * through unchanged (codec overhead isn't worth it).
29
+ * - If the compressed result isn't meaningfully smaller than the
30
+ * original (see {@link COMPRESSION_MIN_SAVINGS_RATIO}), the original
31
+ * is kept. This protects already-compressed binary payloads (images,
32
+ * archives, etc.) from wasted CPU and size inflation.
33
+ */
34
+ /**
35
+ * Payloads below this size are never compressed. The 4-byte format
36
+ * prefix + codec header/trailer overhead means small payloads gain
37
+ * nothing, and tiny ones would grow.
38
+ */
39
+ export declare const COMPRESSION_MIN_BYTES = 1024;
40
+ /**
41
+ * Compression must shave off at least this fraction of the payload
42
+ * size to be kept; otherwise the uncompressed original is stored.
43
+ * Guards against incompressible (already-compressed / high-entropy)
44
+ * data paying a permanent decompression tax for a negligible win.
45
+ */
46
+ export declare const COMPRESSION_MIN_SAVINGS_RATIO = 0.05;
47
+ /** Which codec compressed a payload (or `none` when stored uncompressed). */
48
+ export type CompressionCodec = 'zstd' | 'gzip' | 'none';
49
+ /**
50
+ * Telemetry sink describing what the compression layer did to a payload.
51
+ * Populated by {@link compress} (write) and {@link decompress} (read) when
52
+ * a `stats` object is passed. Sizes are measured at the compression
53
+ * boundary — i.e. before encryption is layered on the write side and after
54
+ * decryption on the read side — so they reflect compression's effect, not
55
+ * the at-rest size (which also includes the `encr` envelope and, on some
56
+ * backends, base64 expansion).
57
+ *
58
+ * Field meanings are identical for both directions:
59
+ * - `uncompressedBytes`: the logical (devalue-prefixed) payload size.
60
+ * - `storedBytes`: the size handed to / read from storage (compressed when
61
+ * a codec applied, otherwise equal to `uncompressedBytes`).
62
+ * - `codec`: which codec applied (`none` when stored uncompressed).
63
+ */
64
+ export interface CompressionStats {
65
+ /** True once the compression layer ran (i.e. saw binary data). */
66
+ recorded?: boolean;
67
+ /** Whether a codec was applied (write) or present (read). */
68
+ compressed?: boolean;
69
+ /** Which codec applied / was present. */
70
+ codec?: CompressionCodec;
71
+ /** Logical, uncompressed payload size in bytes. */
72
+ uncompressedBytes?: number;
73
+ /** Stored (post-compression) payload size in bytes. */
74
+ storedBytes?: number;
75
+ }
76
+ /**
77
+ * Compress a format-prefixed payload if compression is enabled for the
78
+ * target run and the payload is worth compressing.
79
+ *
80
+ * @param data - The format-prefixed serialized data (e.g. 'devl' + bytes)
81
+ * @param enabled - Whether the target run supports compressed payloads
82
+ * (run specVersion >= SPEC_VERSION_SUPPORTS_COMPRESSION, and for
83
+ * cross-deployment writes, the target deployment's capabilities —
84
+ * see `getRunCapabilities` in capabilities.ts). zstd and gzip read
85
+ * support co-ship, so a single boolean is sufficient.
86
+ * @param stats - Optional telemetry sink; populated when `data` is binary.
87
+ * @returns The compressed data with a codec prefix, or the original data
88
+ * when compression is disabled, unavailable, or not worthwhile.
89
+ */
90
+ export declare function compress(data: Uint8Array | unknown, enabled: boolean, stats?: CompressionStats): Promise<Uint8Array | unknown>;
91
+ /**
92
+ * Decompress a format-prefixed payload if it's compressed.
93
+ * Dispatches on the prefix ('zstd' or 'gzip') and inflates the inner
94
+ * payload (which carries its own format prefix, e.g. 'devl').
95
+ *
96
+ * Non-compressed data (including non-binary legacy data) is returned
97
+ * unchanged, so this is safe to apply unconditionally on read paths.
98
+ */
99
+ export declare function decompress(data: Uint8Array | unknown, stats?: CompressionStats): Promise<Uint8Array | unknown>;
100
+ /**
101
+ * Check if data is compressed (has a 'zstd' or 'gzip' format prefix).
102
+ */
103
+ export declare function isCompressed(data: Uint8Array | unknown): boolean;
104
+ //# sourceMappingURL=compression.d.ts.map
@@ -4,15 +4,16 @@
4
4
  * Re-exports the mode-specific serialize/deserialize functions and
5
5
  * the codec/format/encryption abstractions.
6
6
  */
7
- export type { FormatPrefix, SerializableSpecial, Reducers, Revivers, } from './types.js';
8
- export { SerializationFormat, isFormatPrefix } from './types.js';
9
7
  export type { Codec, SerializationMode } from './codec.js';
10
8
  export { devalueCodec } from './codec-devalue.js';
11
- export { encodeWithFormatPrefix, decodeFormatPrefix, peekFormatPrefix, isEncrypted, } from './format.js';
12
- export { encrypt, decrypt, type CryptoKey, type EncryptionKeyParam, } from './encryption.js';
13
- import * as workflow from './workflow.js';
14
- import * as step from './step.js';
9
+ export { COMPRESSION_MIN_BYTES, type CompressionCodec, type CompressionStats, compress, decompress, isCompressed, } from './compression.js';
10
+ export { type CryptoKey, decrypt, type EncryptionKeyParam, encrypt, } from './encryption.js';
11
+ export { decodeFormatPrefix, encodeWithFormatPrefix, isEncrypted, peekFormatPrefix, } from './format.js';
12
+ export type { FormatPrefix, Reducers, Revivers, SerializableSpecial, } from './types.js';
13
+ export { isFormatPrefix, SerializationFormat } from './types.js';
15
14
  import * as client from './client.js';
15
+ import * as step from './step.js';
16
+ import * as workflow from './workflow.js';
16
17
  export { workflow, step, client };
17
18
  export { revive } from './reducers/common.js';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -26,6 +26,10 @@ export declare const SerializationFormat: {
26
26
  readonly DEVALUE_V1: FormatPrefix;
27
27
  /** Encrypted payload (inner payload has its own format prefix) */
28
28
  readonly ENCRYPTED: FormatPrefix;
29
+ /** Gzip-compressed payload (inner payload has its own format prefix) */
30
+ readonly GZIP: FormatPrefix;
31
+ /** Zstandard-compressed payload (inner payload has its own format prefix) */
32
+ readonly ZSTD: FormatPrefix;
29
33
  };
30
34
  /**
31
35
  * Wire-framing format identifier carried in the serialized
@@ -10,6 +10,10 @@ export declare const SerializationFormat: {
10
10
  readonly DEVALUE_V1: "devl";
11
11
  /** Encrypted payload (inner payload has its own format prefix after decryption) */
12
12
  readonly ENCRYPTED: "encr";
13
+ /** Gzip-compressed payload (inner payload has its own format prefix after decompression) */
14
+ readonly GZIP: "gzip";
15
+ /** Zstandard-compressed payload (inner payload has its own format prefix after decompression) */
16
+ readonly ZSTD: "zstd";
13
17
  };
14
18
  export type SerializationFormatType = (typeof SerializationFormat)[keyof typeof SerializationFormat];
15
19
  /**
@@ -42,6 +46,17 @@ export declare function isExpiredStub(data: unknown): boolean;
42
46
  * Browser-safe — does not depend on the full serialization module.
43
47
  */
44
48
  export declare function isEncryptedData(data: unknown): boolean;
49
+ /**
50
+ * Check if a binary value has a compression format prefix ('gzip' or 'zstd').
51
+ * Browser-safe — does not depend on the full serialization module.
52
+ */
53
+ export declare function isCompressedData(data: unknown): boolean;
54
+ /**
55
+ * Register a browser zstd decoder (e.g. a WASM-backed one). The web o11y UI
56
+ * calls this at init so `hydrateDataWithKey` can inflate zstd payloads after
57
+ * client-side decryption. Node readers use `node:zlib` and ignore this.
58
+ */
59
+ export declare function registerZstdDecoder(decoder: (payload: Uint8Array) => Promise<Uint8Array>): void;
45
60
  /**
46
61
  * A map of type name → reviver function, used by devalue's `parse`/`unflatten`.
47
62
  * Each environment (runtime, web, CLI) provides its own set.
@@ -1,8 +1,9 @@
1
1
  import { type CryptoKey } from './encryption.js';
2
+ import { compress, decompress } from './serialization/compression.js';
2
3
  import { decrypt, type EncryptionKeyParam, encrypt } from './serialization/encryption.js';
3
4
  import { decodeFormatPrefix, encodeWithFormatPrefix, isEncrypted, peekFormatPrefix } from './serialization/format.js';
4
5
  import { type FormatPrefix, isFormatPrefix, SerializationFormat } from './serialization/types.js';
5
- export { SerializationFormat, type FormatPrefix, isFormatPrefix, encodeWithFormatPrefix, decodeFormatPrefix, peekFormatPrefix, isEncrypted, encrypt, decrypt, type EncryptionKeyParam, };
6
+ export { SerializationFormat, type FormatPrefix, isFormatPrefix, encodeWithFormatPrefix, decodeFormatPrefix, peekFormatPrefix, isEncrypted, encrypt, decrypt, compress, decompress, type EncryptionKeyParam, };
6
7
  export type SerializationFormatType = (typeof SerializationFormat)[keyof typeof SerializationFormat];
7
8
  /**
8
9
  * Detect if a readable stream is a byte stream.
@@ -337,7 +338,7 @@ export declare function maybeDecrypt(data: Uint8Array | unknown, key: CryptoKey
337
338
  * backwards compatibility with older runs.
338
339
  * @returns The dehydrated value as binary data (Uint8Array) with format prefix
339
340
  */
340
- export declare function dehydrateWorkflowArguments(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<void>[], global?: Record<string, any>, v1Compat?: boolean, framedByteStreams?: boolean): Promise<Uint8Array | unknown>;
341
+ export declare function dehydrateWorkflowArguments(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<void>[], global?: Record<string, any>, v1Compat?: boolean, framedByteStreams?: boolean, compression?: boolean): Promise<Uint8Array | unknown>;
341
342
  /**
342
343
  * Called from workflow execution environment to hydrate the workflow
343
344
  * arguments from the database at the start of workflow execution.
@@ -346,7 +347,7 @@ export declare function hydrateWorkflowArguments(value: Uint8Array | unknown, _r
346
347
  /**
347
348
  * Dehydrate workflow return value for storage.
348
349
  */
349
- export declare function dehydrateWorkflowReturnValue(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>, v1Compat?: boolean): Promise<Uint8Array | unknown>;
350
+ export declare function dehydrateWorkflowReturnValue(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>, v1Compat?: boolean, compression?: boolean): Promise<Uint8Array | unknown>;
350
351
  /**
351
352
  * Called from the client side to hydrate the workflow return value
352
353
  * of a completed workflow run.
@@ -356,7 +357,7 @@ export declare function hydrateWorkflowReturnValue(value: Uint8Array | unknown,
356
357
  * Called from the workflow handler when a step is being created.
357
358
  * Dehydrates values from within the workflow execution environment.
358
359
  */
359
- export declare function dehydrateStepArguments(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>, v1Compat?: boolean): Promise<Uint8Array | unknown>;
360
+ export declare function dehydrateStepArguments(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>, v1Compat?: boolean, compression?: boolean): Promise<Uint8Array | unknown>;
360
361
  /**
361
362
  * Called from the step handler to hydrate the arguments of a step
362
363
  * from the database at the start of the step execution.
@@ -379,7 +380,7 @@ export declare function hydrateStepArguments(value: Uint8Array | unknown, runId:
379
380
  * backwards compatibility with older runs.
380
381
  * @returns The dehydrated value as binary data (Uint8Array) with format prefix
381
382
  */
382
- export declare function dehydrateStepReturnValue(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<any>[], global?: Record<string, any>, v1Compat?: boolean, framedByteStreams?: boolean): Promise<Uint8Array | unknown>;
383
+ export declare function dehydrateStepReturnValue(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<any>[], global?: Record<string, any>, v1Compat?: boolean, framedByteStreams?: boolean, compression?: boolean): Promise<Uint8Array | unknown>;
383
384
  /**
384
385
  * Called from the step handler when a step throws. Dehydrates the thrown
385
386
  * value from within the step execution environment into a format that can
@@ -396,7 +397,7 @@ export declare function dehydrateStepReturnValue(value: unknown, runId: string,
396
397
  * @param global - Global object for serialization context
397
398
  * @returns The dehydrated value as binary data (Uint8Array) with format prefix
398
399
  */
399
- export declare function dehydrateStepError(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<any>[], global?: Record<string, any>): Promise<Uint8Array>;
400
+ export declare function dehydrateStepError(value: unknown, runId: string, key: CryptoKey | undefined, ops?: Promise<any>[], global?: Record<string, any>, compression?: boolean): Promise<Uint8Array>;
400
401
  /**
401
402
  * Called from the workflow handler when replaying the event log of a
402
403
  * `step_failed` or `step_retrying` event. Hydrates the thrown value from
@@ -421,7 +422,7 @@ export declare function hydrateStepError(value: Uint8Array | unknown, _runId: st
421
422
  * @param global - Global object for serialization context
422
423
  * @returns The dehydrated value as binary data (Uint8Array) with format prefix
423
424
  */
424
- export declare function dehydrateRunError(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>): Promise<Uint8Array>;
425
+ export declare function dehydrateRunError(value: unknown, _runId: string, key: CryptoKey | undefined, global?: Record<string, any>, compression?: boolean): Promise<Uint8Array>;
425
426
  /**
426
427
  * Called from the client side (or observability tools) to hydrate the run
427
428
  * error value of a failed workflow run.
@@ -260,6 +260,30 @@ export declare const QueueExecutionTimeMs: (value: number) => {
260
260
  export declare const QueueSerializeTimeMs: (value: number) => {
261
261
  [k: string]: number;
262
262
  };
263
+ /** Whether this serialize/deserialize was a write or read. */
264
+ export declare const SerializationOperation: (value: "serialize" | "deserialize") => {
265
+ [k: string]: "serialize" | "deserialize";
266
+ };
267
+ /** Whether a compression codec was applied (write) / present (read). */
268
+ export declare const SerializationCompressed: (value: boolean) => {
269
+ [k: string]: boolean;
270
+ };
271
+ /** Which compression codec applied / was present (`zstd`, `gzip`, or `none`). */
272
+ export declare const SerializationCodec: (value: "zstd" | "gzip" | "none") => {
273
+ [k: string]: "zstd" | "gzip" | "none";
274
+ };
275
+ /** Logical (uncompressed, devalue-prefixed) payload size in bytes. */
276
+ export declare const SerializationUncompressedBytes: (value: number) => {
277
+ [k: string]: number;
278
+ };
279
+ /** Stored (post-compression, pre-encryption) payload size in bytes. */
280
+ export declare const SerializationStoredBytes: (value: number) => {
281
+ [k: string]: number;
282
+ };
283
+ /** Fraction of bytes saved by compression (0..1); set only when compressed. */
284
+ export declare const SerializationCompressionRatio: (value: number) => {
285
+ [k: string]: number;
286
+ };
263
287
  /** The remote service name for Datadog service maps (Datadog-specific: peer.service) */
264
288
  export declare const PeerService: (value: string) => {
265
289
  [k: string]: string;
@@ -1,2 +1,2 @@
1
- export declare const version = "5.0.0-beta.17";
1
+ export declare const version = "5.0.0-beta.19";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- import{c as e,i as t}from"../../_chunks/workflow/dist-DvHFhSJM.js";import{$n as n,Kt as r,Zt as i,er as a,ir as o,nn as s,nr as c,qt as l,rn as u,t as d,tn as f}from"../../_chunks/workflow/attribute-changes-Db-CKuLh.js";import{t as p}from"../../_chunks/workflow/sleep-BG6X2Bli.js";import{t as m}from"../../_chunks/workflow/run-AA-FTD_U.js";async function h(e,n={}){let r=d(e,n);if(r.length===0)return;let i=n.allowReservedAttributes===!0,a=globalThis[u];if(!a)throw new t("experimental_setAttributes() called outside a workflow runtime context. It must be called from within a workflow body (`use workflow`).");await a(r,i?{allowReservedAttributes:!0}:{})}l(r,m);function g(e){let t=globalThis[f];return t||a(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,g),t(e)}function _(e){let{respondWith:t,token:n,...r}=e??{};if(n!==void 0)throw Error("`createWebhook()` does not accept a `token` option. Webhook tokens are always randomly generated. Use `createHook()` with `resumeHook()` for deterministic token patterns.");let i;t!==void 0&&(i={respondWith:t});let a=g({...r,metadata:i,isWebhook:!0}),{url:s}=o();return a.url=`${s}/.well-known/workflow/v1/webhook/${encodeURIComponent(a.token)}`,a}function v(){function e(t,n){c(`defineHook().resume()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,e)}return{create(e){return g(e)},resume:e}}function y(e={}){let{namespace:t}=e,n=globalThis[s](t);return Object.create(globalThis.WritableStream.prototype,{[i]:{value:n,writable:!1}})}function b(){n(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,b)}function x(){c(`resumeHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,x)}export{t as FatalError,e as RetryableError,g as createHook,_ as createWebhook,v as defineHook,h as experimental_setAttributes,b as getStepMetadata,o as getWorkflowMetadata,y as getWritable,x as resumeHook,p as sleep};
1
+ import{c as e,i as t}from"../../_chunks/workflow/dist-Dxrjttr2.js";import{$n as n,Kt as r,Zt as i,er as a,ir as o,nn as s,nr as c,qt as l,rn as u,t as d,tn as f}from"../../_chunks/workflow/attribute-changes-Bi5DLT8S.js";import{t as p}from"../../_chunks/workflow/sleep-DPjVkRY-.js";import{t as m}from"../../_chunks/workflow/run-XM8dTRAo.js";async function h(e,n={}){let r=d(e,n);if(r.length===0)return;let i=n.allowReservedAttributes===!0,a=globalThis[u];if(!a)throw new t("experimental_setAttributes() called outside a workflow runtime context. It must be called from within a workflow body (`use workflow`).");await a(r,i?{allowReservedAttributes:!0}:{})}l(r,m);function g(e){let t=globalThis[f];return t||a(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,g),t(e)}function _(e){let{respondWith:t,token:n,...r}=e??{};if(n!==void 0)throw Error("`createWebhook()` does not accept a `token` option. Webhook tokens are always randomly generated. Use `createHook()` with `resumeHook()` for deterministic token patterns.");let i;t!==void 0&&(i={respondWith:t});let a=g({...r,metadata:i,isWebhook:!0}),{url:s}=o();return a.url=`${s}/.well-known/workflow/v1/webhook/${encodeURIComponent(a.token)}`,a}function v(){function e(t,n){c(`defineHook().resume()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,e)}return{create(e){return g(e)},resume:e}}function y(e={}){let{namespace:t}=e,n=globalThis[s](t);return Object.create(globalThis.WritableStream.prototype,{[i]:{value:n,writable:!1}})}function b(){n(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,b)}function x(){c(`resumeHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,x)}export{t as FatalError,e as RetryableError,g as createHook,_ as createWebhook,v as defineHook,h as experimental_setAttributes,b as getStepMetadata,o as getWorkflowMetadata,y as getWritable,x as resumeHook,p as sleep};
@@ -1 +1 @@
1
- import{C as e,E as t,S as n,T as r,_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,w as C,x as w,y as T}from"../../_chunks/workflow/dist-DvHFhSJM.js";export{b as CorruptedEventLogError,h as ERROR_SLUGS,v as EntityConflictError,f as FatalError,a as HookConflictError,g as HookNotFoundError,t as RUN_ERROR_CODES,y as ReplayDivergenceError,s as RetryableError,p as RunExpiredError,x as RunNotSupportedError,c as RuntimeDecryptionError,l as SerializationError,_ as StepNotRegisteredError,m as ThrottleError,d as TooEarlyError,u as VERCEL_403_ERROR_MESSAGE,i as WorkflowBuildError,S as WorkflowError,T as WorkflowNotRegisteredError,o as WorkflowRunCancelledError,w as WorkflowRunFailedError,n as WorkflowRunNotCompletedError,e as WorkflowRunNotFoundError,C as WorkflowRuntimeError,r as WorkflowWorldError};
1
+ import{C as e,E as t,S as n,T as r,_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,w as C,x as w,y as T}from"../../_chunks/workflow/dist-Dxrjttr2.js";export{b as CorruptedEventLogError,h as ERROR_SLUGS,v as EntityConflictError,f as FatalError,a as HookConflictError,g as HookNotFoundError,t as RUN_ERROR_CODES,y as ReplayDivergenceError,s as RetryableError,p as RunExpiredError,x as RunNotSupportedError,c as RuntimeDecryptionError,l as SerializationError,_ as StepNotRegisteredError,m as ThrottleError,d as TooEarlyError,u as VERCEL_403_ERROR_MESSAGE,i as WorkflowBuildError,S as WorkflowError,T as WorkflowNotRegisteredError,o as WorkflowRunCancelledError,w as WorkflowRunFailedError,n as WorkflowRunNotCompletedError,e as WorkflowRunNotFoundError,C as WorkflowRuntimeError,r as WorkflowWorldError};