eve 0.54.2 → 0.54.4
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/CHANGELOG.md +22 -0
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init-project.d.ts +46 -0
- package/dist/src/cli/commands/init-project.js +1 -0
- package/dist/src/cli/commands/init-self-modification.d.ts +7 -0
- package/dist/src/cli/commands/init-self-modification.js +1 -0
- package/dist/src/cli/commands/init-target.js +2 -2
- package/dist/src/cli/commands/init-telemetry.d.ts +6 -0
- package/dist/src/cli/commands/init-telemetry.js +1 -0
- package/dist/src/cli/commands/init.d.ts +3 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/telemetry/index.d.ts +1 -1
- package/dist/src/compiled/.vendor-stamp.json +8 -6
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +4 -4
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +26 -0
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +41 -0
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/replay-divergence.d.ts +25 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +75 -1
- package/dist/src/compiled/@workflow/core/runtime/quickjs-entrypoint.d.ts +30 -8
- package/dist/src/compiled/@workflow/core/runtime/quickjs-log-view.d.ts +129 -0
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +2 -21
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +0 -22
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/serialization.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +36 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +23 -23
- package/dist/src/compiled/@workflow/world/events.d.ts +4 -2
- package/dist/src/compiled/@workflow/world/queue.d.ts +84 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +18 -13
- package/dist/src/compiled/_chunks/workflow/attribute-changes-BAcgmlXp.js +20 -0
- package/dist/src/compiled/_chunks/workflow/coerce-ro2dOxbr.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-KPieTJHT.js +25 -0
- package/dist/src/compiled/_chunks/workflow/dist-PLkAQ-U7.js +2 -0
- package/dist/src/compiled/_chunks/workflow/frames-BvATzM2t.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{functions-C02-JHBK.js → functions-wMCGZAVk.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BEHe0Uut.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-ChHLjaCt.js +1 -0
- package/dist/src/compiled/_chunks/workflow/schemas-DR7NTzNe.js +50 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BB2HuVie.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wrapper-BxECO5nh.js → wrapper-CKui_eTd.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/ws-transport-CVezyWwZ.js +1 -0
- package/dist/src/compiled/just-secrets/LICENSE +21 -0
- package/dist/src/compiled/just-secrets/index.d.ts +20 -0
- package/dist/src/compiled/just-secrets/index.js +2 -0
- package/dist/src/compiled/just-secrets/windows.ps1 +138 -0
- package/dist/src/compiler/extension-compatibility.d.ts +12 -12
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +2 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/resolve-workspace-subagent.d.ts +13 -0
- package/dist/src/compiler/resolve-workspace-subagent.js +1 -0
- package/dist/src/context/dynamic-model-lifecycle.d.ts +0 -6
- package/dist/src/context/dynamic-model-lifecycle.js +1 -1
- package/dist/src/context/dynamic-resolve-context.js +1 -1
- package/dist/src/context/effective-model.d.ts +5 -0
- package/dist/src/context/effective-model.js +1 -0
- package/dist/src/context/keys.d.ts +2 -0
- package/dist/src/context/keys.js +1 -1
- package/dist/src/dynamic/definition.d.ts +4 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +9 -7
- package/dist/src/execution/durable-session-migrations/snapshot.d.ts +0 -16
- package/dist/src/execution/durable-session-migrations/snapshot.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +1 -1
- package/dist/src/execution/run-session-limits.js +1 -1
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/messages.d.ts +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +16 -10
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/instrumentation/parent-lineage.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/nitro/routes/index.d.ts +6 -0
- package/dist/src/internal/nitro/routes/index.js +7 -7
- package/dist/src/internal/vercel/assemble-eve-services.js +1 -1
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/internal/vercel/build-multi-agent-landing-page.d.ts +3 -0
- package/dist/src/internal/vercel/build-multi-agent-landing-page.js +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +4 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/vercel-services-config.js +1 -1
- package/dist/src/protocol/baggage.d.ts +6 -0
- package/dist/src/protocol/baggage.js +1 -1
- package/dist/src/protocol/traceparent.d.ts +13 -0
- package/dist/src/protocol/traceparent.js +1 -1
- package/dist/src/public/definitions/workspace-agent.d.ts +25 -0
- package/dist/src/public/definitions/workspace-agent.js +1 -0
- package/dist/src/public/index.d.ts +1 -0
- package/dist/src/public/index.js +1 -1
- package/dist/src/public/models/openai/chatgpt/codex-app-server.d.ts +41 -0
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +1 -0
- package/dist/src/public/models/openai/chatgpt/credential-store.d.ts +26 -4
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -1
- package/dist/src/public/models/openai/chatgpt/oauth.d.ts +6 -4
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +7 -7
- package/dist/src/public/models/openai/chatgpt/token-broker.js +1 -1
- package/dist/src/public/models/openai/chatgpt/token.d.ts +13 -0
- package/dist/src/public/models/openai/chatgpt/token.js +1 -0
- package/dist/src/public/models/openai/chatgpt/transport.d.ts +2 -1
- package/dist/src/public/models/openai/index.d.ts +3 -2
- package/dist/src/public/vercel/index.d.ts +50 -0
- package/dist/src/public/vercel/index.js +1 -0
- package/dist/src/self-modification/setup.js +7 -2
- package/dist/src/setup/flows/chatgpt-auth.d.ts +2 -1
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/model.d.ts +0 -2
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/subagents/remote-dispatch.d.ts +3 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/docs/agent-config.md +3 -3
- package/docs/guides/deployment/vercel.mdx +52 -1
- package/docs/guides/dynamic-capabilities.md +19 -7
- package/docs/guides/instrumentation-providers.md +1 -1
- package/docs/guides/instrumentation.md +25 -6
- package/docs/guides/remote-agents.md +5 -5
- package/docs/reference/cli.md +2 -2
- package/docs/reference/telemetry.md +1 -1
- package/docs/reference/typescript-api.md +14 -7
- package/docs/subagents/index.mdx +31 -0
- package/package.json +13 -6
- package/dist/src/compiled/_chunks/workflow/attribute-changes-C6H-fRVP.js +0 -20
- package/dist/src/compiled/_chunks/workflow/dist-DDeH-1ER.js +0 -40
- package/dist/src/compiled/_chunks/workflow/dist-DhncQSl7.js +0 -74
- package/dist/src/compiled/_chunks/workflow/frames-DsEqSDes.js +0 -3
- package/dist/src/compiled/_chunks/workflow/resume-hook-BRDLAb67.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-BM2OFphk.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-6cG0F99-.js +0 -1
- package/dist/src/compiled/_chunks/workflow/ws-transport-DuK82LLz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createFlushableState } from './flushable-stream.js';
|
|
1
|
+
import { createFlushableState, type FlushableStreamState } from './flushable-stream.js';
|
|
2
2
|
import { compress, decompress } from './serialization/compression.js';
|
|
3
3
|
import { aesKeyOf, decrypt, deriveRunPayloadKeys, type EncryptionKeyParam, encrypt, isRunPayloadKeys, isSealTarget, type PayloadKey, type RunPayloadKeys, runPayloadKeys, type SealTarget, sealTo } from './serialization/encryption.js';
|
|
4
4
|
import { decodeFormatPrefix, encodeWithFormatPrefix, isEncrypted, peekFormatPrefix } from './serialization/format.js';
|
|
@@ -465,7 +465,7 @@ guestCodeStatsOut?: GuestCodeStats): Promise<Uint8Array | unknown>;
|
|
|
465
465
|
* Called from the step executor to hydrate the arguments of a step
|
|
466
466
|
* from the database at the start of the step execution.
|
|
467
467
|
*/
|
|
468
|
-
export declare function hydrateStepArguments(value: Uint8Array | unknown, runId: string, key: PayloadKey | undefined, ops?: Promise<any>[], global?: Record<string, any>, extraRevivers?: Record<string, (value: any) => any>, deploymentId?: string): Promise<any>;
|
|
468
|
+
export declare function hydrateStepArguments(value: Uint8Array | unknown, runId: string, key: PayloadKey | undefined, ops?: Promise<any>[], global?: Record<string, any>, extraRevivers?: Record<string, (value: any) => any>, deploymentId?: string, streamStates?: FlushableStreamState[]): Promise<any>;
|
|
469
469
|
/**
|
|
470
470
|
* Called from the step executor when a step has completed.
|
|
471
471
|
* Dehydrates values from within the step execution environment
|
|
@@ -57,6 +57,8 @@ export type StepContext = {
|
|
|
57
57
|
closureVars?: Record<string, any>;
|
|
58
58
|
encryptionKey?: PayloadKey;
|
|
59
59
|
writables?: Map<string, CachedWritable>;
|
|
60
|
+
/** Server-bound stream pipes whose current frames must drain at step end. */
|
|
61
|
+
streamStates?: FlushableStreamState[];
|
|
60
62
|
/**
|
|
61
63
|
* Turbo mode only: a promise that resolves once the backgrounded
|
|
62
64
|
* `run_started` has landed (the run exists). Set when the step body runs
|
|
@@ -192,6 +192,15 @@ export declare const WorkflowOwnedRecoverySteps: (value: number) => {
|
|
|
192
192
|
export declare const WorkflowBackstopWakesArmed: (value: number) => {
|
|
193
193
|
[k: string]: number;
|
|
194
194
|
};
|
|
195
|
+
/**
|
|
196
|
+
* Number of pending steps whose immediate step-execution enqueue this replay
|
|
197
|
+
* pass skipped because THIS invocation already published that step's message
|
|
198
|
+
* on an earlier pass (a fan-out that ran inline steps and replayed again).
|
|
199
|
+
* Invocation-local knowledge only: a fresh delivery never skips.
|
|
200
|
+
*/
|
|
201
|
+
export declare const WorkflowDispatchRepublishSkipped: (value: number) => {
|
|
202
|
+
[k: string]: number;
|
|
203
|
+
};
|
|
195
204
|
/** The workflow runtime route being handled */
|
|
196
205
|
export declare const WorkflowRouteType: (value: "flow") => {
|
|
197
206
|
[k: string]: "flow";
|
|
@@ -294,6 +303,15 @@ export declare const StepFinalSchedulingReplayMs: (value: number) => {
|
|
|
294
303
|
export declare const StepLatencyOptimizations: (value: string[]) => {
|
|
295
304
|
[k: string]: string[];
|
|
296
305
|
};
|
|
306
|
+
/**
|
|
307
|
+
* How the step's initial `step_started` claim was made. Only present for
|
|
308
|
+
* inline create claims; ordinary background starts and owned recovery remain
|
|
309
|
+
* unlabeled.
|
|
310
|
+
*/
|
|
311
|
+
export type StepStartStrategy = 'awaited' | 'optimistic' | 'batch_preclaimed';
|
|
312
|
+
export declare const StepStartStrategy: (value: StepStartStrategy) => {
|
|
313
|
+
[k: string]: StepStartStrategy;
|
|
314
|
+
};
|
|
297
315
|
/** Whether the step was skipped during execution */
|
|
298
316
|
export declare const StepSkipped: (value: boolean) => {
|
|
299
317
|
[k: string]: boolean;
|
|
@@ -350,6 +368,14 @@ export declare const MessagingMessageId: (value: string & import("zod").$brand<"
|
|
|
350
368
|
export declare const MessagingOperationType: (value: "publish" | "receive" | "process") => {
|
|
351
369
|
[k: string]: "publish" | "receive" | "process";
|
|
352
370
|
};
|
|
371
|
+
/**
|
|
372
|
+
* Messages carried by one batched publish (standard OTEL:
|
|
373
|
+
* messaging.batch.message_count). Set only on the batch send, so a span
|
|
374
|
+
* without it is a single-message publish.
|
|
375
|
+
*/
|
|
376
|
+
export declare const MessagingBatchMessageCount: (value: number) => {
|
|
377
|
+
[k: string]: number;
|
|
378
|
+
};
|
|
353
379
|
/** Time taken to enqueue the message in milliseconds (workflow-specific) */
|
|
354
380
|
export declare const QueueOverheadMs: (value: number) => {
|
|
355
381
|
[k: string]: number;
|
|
@@ -482,6 +508,16 @@ export declare const StepResilientDispatchRecovered: (value: number) => {
|
|
|
482
508
|
export declare const StepResilientDispatchMaterialized: (value: boolean) => {
|
|
483
509
|
[k: string]: boolean;
|
|
484
510
|
};
|
|
511
|
+
/**
|
|
512
|
+
* How the queued-step consumer resolved the run identity for this execution:
|
|
513
|
+
* `run_context` — carried on the dispatch message, no `runs.get` before the
|
|
514
|
+
* step (the fetch-free prologue); `runs_get` — the legacy blocking fetch
|
|
515
|
+
* (message from an older producer). Distinguishes the two paths during
|
|
516
|
+
* version-skew windows and makes the saved round trip directly measurable.
|
|
517
|
+
*/
|
|
518
|
+
export declare const StepDispatchPrologue: (value: "run_context" | "runs_get") => {
|
|
519
|
+
[k: string]: "run_context" | "runs_get";
|
|
520
|
+
};
|
|
485
521
|
/** Total TTR: entry into `resumeHook()` → immediately before `stepFn.apply()`. */
|
|
486
522
|
export declare const ResumeTotalMs: (value: number) => {
|
|
487
523
|
[k: string]: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "5.0.0-beta.
|
|
1
|
+
export declare const version = "5.0.0-beta.51";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Br as e,Fr as t,Gr as n,Nr as r,Or as i,Pr as a,Ur as o,Vr as s,dr as c,fr as l,t as u}from"../../_chunks/workflow/attribute-changes-BAcgmlXp.js";import{i as d,u as f}from"../../_chunks/workflow/dist-xTushGCp.js";import{i as p}from"../../_chunks/workflow/workflow-routes-CwqB063q.js";import{t as m}from"../../_chunks/workflow/sleep-BB2HuVie.js";import{t as h}from"../../_chunks/workflow/run-ChHLjaCt.js";l(c,h);function g(e){let t=globalThis[r];return t||s(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,g),t(e)}function _(e){let{respondWith:t,token:r,...i}=e??{};if(r!==void 0)throw Error("`createWebhook()` does not accept a `token` option. Webhook tokens are always generated for you. Use `createHook()` with `resumeHook()` for deterministic token patterns.");let a;t!==void 0&&(a={respondWith:t});let o=g({...i,metadata:a,isWebhook:!0}),{url:s}=n();return o.url=p(s,{type:`webhook`,token:o.token}),o}function v(){function e(t,n){o(`defineHook().resume()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,e)}return{create(e){return g(e)},resume:e}}async function y(e,n={}){let r=u(e,n);if(r.length===0)return;let i=n.allowReservedAttributes===!0,a=globalThis[t];if(!a)throw new d("setAttributes() called outside a workflow runtime context. It must be called from within a workflow body (`use workflow`).");await a(r,i?{allowReservedAttributes:!0}:{})}function b(e={}){let{namespace:t}=e,n=globalThis[a](t);return Object.create(globalThis.WritableStream.prototype,{[i]:{value:n,writable:!1}})}function x(){e(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,x)}function S(){o(`resumeHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,S)}export{d as FatalError,f as RetryableError,g as createHook,_ as createWebhook,v as defineHook,x as getStepMetadata,n as getWorkflowMetadata,b as getWritable,S as resumeHook,y as setAttributes,m as sleep};
|
|
@@ -13,10 +13,10 @@ export declare const AnalyticsRunSchema: z.ZodObject<{
|
|
|
13
13
|
workflowName: z.ZodString;
|
|
14
14
|
specVersion: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
15
15
|
attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
-
createdAt: z.
|
|
17
|
-
updatedAt: z.
|
|
18
|
-
startedAt: z.ZodOptional<z.ZodNullable<z.
|
|
19
|
-
completedAt: z.ZodOptional<z.ZodNullable<z.
|
|
16
|
+
createdAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
17
|
+
updatedAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
18
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
19
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
20
20
|
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
21
|
workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
22
|
workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -33,11 +33,11 @@ export declare const AnalyticsStepSchema: z.ZodObject<{
|
|
|
33
33
|
cancelled: "cancelled";
|
|
34
34
|
}>;
|
|
35
35
|
attempt: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
createdAt: z.
|
|
37
|
-
updatedAt: z.
|
|
38
|
-
startedAt: z.ZodOptional<z.ZodNullable<z.
|
|
39
|
-
completedAt: z.ZodOptional<z.ZodNullable<z.
|
|
40
|
-
retryAfter: z.ZodOptional<z.ZodNullable<z.
|
|
36
|
+
createdAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
37
|
+
updatedAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
38
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
39
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
40
|
+
retryAfter: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
41
41
|
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
42
|
workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
43
|
workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -72,14 +72,14 @@ export declare const AnalyticsEventSchema: z.ZodObject<{
|
|
|
72
72
|
workflowName: z.ZodString;
|
|
73
73
|
deploymentId: z.ZodString;
|
|
74
74
|
specVersion: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
75
|
-
runCreatedAt: z.
|
|
76
|
-
createdAt: z.
|
|
75
|
+
runCreatedAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
76
|
+
createdAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
77
77
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
78
|
vercelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
79
|
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
80
|
computeInstanceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
-
resumeAt: z.ZodOptional<z.ZodNullable<z.
|
|
82
|
-
retryAfter: z.ZodOptional<z.ZodNullable<z.
|
|
81
|
+
resumeAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
82
|
+
retryAfter: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
83
83
|
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
84
|
workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
85
|
isWebhook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -95,10 +95,10 @@ export declare const AnalyticsHookSchema: z.ZodObject<{
|
|
|
95
95
|
disposed: "disposed";
|
|
96
96
|
conflict: "conflict";
|
|
97
97
|
}>;
|
|
98
|
-
createdAt: z.
|
|
99
|
-
updatedAt: z.
|
|
100
|
-
receivedAt: z.ZodOptional<z.ZodNullable<z.
|
|
101
|
-
disposedAt: z.ZodOptional<z.ZodNullable<z.
|
|
98
|
+
createdAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
99
|
+
updatedAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
100
|
+
receivedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
101
|
+
disposedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
102
102
|
isWebhook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
103
103
|
isSystem: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
104
104
|
workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -111,18 +111,18 @@ export declare const AnalyticsWaitSchema: z.ZodObject<{
|
|
|
111
111
|
completed: "completed";
|
|
112
112
|
waiting: "waiting";
|
|
113
113
|
}>;
|
|
114
|
-
resumeAt: z.ZodOptional<z.ZodNullable<z.
|
|
115
|
-
createdAt: z.
|
|
116
|
-
updatedAt: z.
|
|
117
|
-
completedAt: z.ZodOptional<z.ZodNullable<z.
|
|
114
|
+
resumeAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
115
|
+
createdAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
116
|
+
updatedAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
117
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>>>;
|
|
118
118
|
workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
119
|
workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
120
120
|
}, z.core.$strip>;
|
|
121
121
|
export declare const AnalyticsAttributeKeySchema: z.ZodObject<{
|
|
122
122
|
key: z.ZodString;
|
|
123
123
|
runCount: z.ZodCoercedNumber<unknown>;
|
|
124
|
-
firstSeenAt: z.
|
|
125
|
-
lastSeenAt: z.
|
|
124
|
+
firstSeenAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
125
|
+
lastSeenAt: z.ZodPreprocess<z.ZodCoercedDate<unknown>, unknown>;
|
|
126
126
|
}, z.core.$strip>;
|
|
127
127
|
export type AnalyticsRun = z.infer<typeof AnalyticsRunSchema>;
|
|
128
128
|
export type AnalyticsStep = z.infer<typeof AnalyticsStepSchema>;
|
|
@@ -622,8 +622,10 @@ export interface CreateEventParams {
|
|
|
622
622
|
/**
|
|
623
623
|
* How many events the writer held in its loaded log when it decided to write
|
|
624
624
|
* this one: equivalently, the slot it expects to land on minus one. Sent by
|
|
625
|
-
*
|
|
626
|
-
*
|
|
625
|
+
* the replay loop and the suspension handler, which merge the report below
|
|
626
|
+
* back into their loaded log. Omitted by callers with no loaded log to be
|
|
627
|
+
* stale against, the step executor included: for those the report would be
|
|
628
|
+
* a read the World does for no one.
|
|
627
629
|
*
|
|
628
630
|
* A World's slots are dense and 1-based (see `Storage.events`), so a count
|
|
629
631
|
* and a position are the same number. An id that is not a position does not
|
|
@@ -89,6 +89,25 @@ export declare const StepDispatchInputSchema: z.ZodObject<{
|
|
|
89
89
|
input: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
90
90
|
}, z.core.$strip>;
|
|
91
91
|
export type StepDispatchInput = z.infer<typeof StepDispatchInputSchema>;
|
|
92
|
+
/**
|
|
93
|
+
* Immutable run identity carried on a step-execution message so the consumer
|
|
94
|
+
* can start the step without a blocking `runs.get` round trip. Every field is
|
|
95
|
+
* fixed for the life of a run (runs are pinned to their deployment), and the
|
|
96
|
+
* producer holds the run row at dispatch time, so the copy can never go
|
|
97
|
+
* stale. Run *status* is deliberately NOT carried: liveness is enforced by
|
|
98
|
+
* the `step_started` claim itself, which the World rejects on a terminal run.
|
|
99
|
+
*
|
|
100
|
+
* Consumers that need the full run row for inline replay
|
|
101
|
+
* still fetch it lazily; messages without this field (older producers) take
|
|
102
|
+
* the legacy `runs.get` prologue.
|
|
103
|
+
*/
|
|
104
|
+
export declare const RunDispatchContextSchema: z.ZodObject<{
|
|
105
|
+
deploymentId: z.ZodString;
|
|
106
|
+
specVersion: z.ZodNumber;
|
|
107
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
rootRunId: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type RunDispatchContext = z.infer<typeof RunDispatchContextSchema>;
|
|
92
111
|
export declare const HookResumeInputSchema: z.ZodObject<{
|
|
93
112
|
resumeId: z.ZodString;
|
|
94
113
|
hookId: z.ZodString;
|
|
@@ -144,6 +163,7 @@ export declare const WorkflowInvokePayloadSchema: z.ZodObject<{
|
|
|
144
163
|
replayDivergence: z.ZodOptional<z.ZodObject<{
|
|
145
164
|
eventId: z.ZodString;
|
|
146
165
|
count: z.ZodNumber;
|
|
166
|
+
eventIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
147
167
|
}, z.core.$strip>>;
|
|
148
168
|
preconditionReinvocations: z.ZodOptional<z.ZodNumber>;
|
|
149
169
|
serverErrorRetryCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -175,6 +195,12 @@ export declare const WorkflowInvokePayloadSchema: z.ZodObject<{
|
|
|
175
195
|
stepInput: z.ZodOptional<z.ZodObject<{
|
|
176
196
|
input: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
177
197
|
}, z.core.$strip>>;
|
|
198
|
+
runContext: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
deploymentId: z.ZodString;
|
|
200
|
+
specVersion: z.ZodNumber;
|
|
201
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
rootRunId: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
178
204
|
hookResumeTiming: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
179
205
|
resumeRequestedAtMs: z.ZodNumber;
|
|
180
206
|
queuePublishRequestedAtMs: z.ZodNumber;
|
|
@@ -224,6 +250,7 @@ export declare const QueuePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
224
250
|
replayDivergence: z.ZodOptional<z.ZodObject<{
|
|
225
251
|
eventId: z.ZodString;
|
|
226
252
|
count: z.ZodNumber;
|
|
253
|
+
eventIds: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
227
254
|
}, z.core.$strip>>;
|
|
228
255
|
preconditionReinvocations: z.ZodOptional<z.ZodNumber>;
|
|
229
256
|
serverErrorRetryCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -255,6 +282,12 @@ export declare const QueuePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
255
282
|
stepInput: z.ZodOptional<z.ZodObject<{
|
|
256
283
|
input: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
257
284
|
}, z.core.$strip>>;
|
|
285
|
+
runContext: z.ZodOptional<z.ZodObject<{
|
|
286
|
+
deploymentId: z.ZodString;
|
|
287
|
+
specVersion: z.ZodNumber;
|
|
288
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
rootRunId: z.ZodOptional<z.ZodString>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
258
291
|
hookResumeTiming: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
259
292
|
resumeRequestedAtMs: z.ZodNumber;
|
|
260
293
|
queuePublishRequestedAtMs: z.ZodNumber;
|
|
@@ -287,6 +320,23 @@ export interface QueueOptions {
|
|
|
287
320
|
*/
|
|
288
321
|
region?: string;
|
|
289
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Outcome of one message in a {@link Queue.queueBatch} call, in input order.
|
|
325
|
+
*
|
|
326
|
+
* `messageId: null` with no `error` means accepted for deferred processing
|
|
327
|
+
* (the same "accepted, no ID yet" case {@link Queue.queue} reports), so
|
|
328
|
+
* `error === undefined` is the success test, not a non-null `messageId`.
|
|
329
|
+
*/
|
|
330
|
+
export type QueueBatchResult = {
|
|
331
|
+
messageId: MessageId | null;
|
|
332
|
+
error?: undefined;
|
|
333
|
+
} | {
|
|
334
|
+
messageId: null;
|
|
335
|
+
/** Human-readable failure description for this message. */
|
|
336
|
+
error: string;
|
|
337
|
+
/** Republishing the batch may succeed. */
|
|
338
|
+
retryable: boolean;
|
|
339
|
+
};
|
|
290
340
|
export interface Queue {
|
|
291
341
|
getDeploymentId(): Promise<string>;
|
|
292
342
|
/**
|
|
@@ -305,6 +355,40 @@ export interface Queue {
|
|
|
305
355
|
queue(queueName: ValidQueueName, message: QueuePayload, opts?: QueueOptions): Promise<{
|
|
306
356
|
messageId: MessageId | null;
|
|
307
357
|
}>;
|
|
358
|
+
/**
|
|
359
|
+
* Enqueues several messages to the SAME logical queue in as few round trips
|
|
360
|
+
* as the backing transport allows. Optional: callers MUST fall back to
|
|
361
|
+
* per-message {@link Queue.queue} when a World does not implement it.
|
|
362
|
+
*
|
|
363
|
+
* Exists for wide fan-outs. Publishing an N-branch `Promise.all` one message
|
|
364
|
+
* at a time costs N round trips through a bounded connection pool, and that
|
|
365
|
+
* cost is paid before the fan-out's first step body runs, so it lands
|
|
366
|
+
* directly on time-to-first-step.
|
|
367
|
+
*
|
|
368
|
+
* Contract:
|
|
369
|
+
*
|
|
370
|
+
* - Results are returned in input order, one per input message. Returning
|
|
371
|
+
* a different number of results than there were messages is a contract
|
|
372
|
+
* violation the runtime rejects the whole batch on: an omitted result is
|
|
373
|
+
* indistinguishable from a message that was never published, and reading
|
|
374
|
+
* it as success would strand that step with no error anywhere.
|
|
375
|
+
* - Partial failure is normal. A rejected entry reports `error`; a
|
|
376
|
+
* `retryable` entry may succeed if the whole batch is published again.
|
|
377
|
+
* Implementations MUST NOT throw for a per-entry failure — reserve
|
|
378
|
+
* rejection for request-level failures where no entry outcome is known.
|
|
379
|
+
* - Callers are expected to pass `opts.idempotencyKey` per message, because
|
|
380
|
+
* the recovery for both a request-level failure and a retryable entry is
|
|
381
|
+
* to republish the batch: without keys that redelivers the entries that
|
|
382
|
+
* already succeeded.
|
|
383
|
+
* - Every message must target one logical `queueName`. Implementations are
|
|
384
|
+
* free to split the batch (by transport cap, or by any per-message routing
|
|
385
|
+
* dimension they derive from the payload, such as region or physical
|
|
386
|
+
* topic); the split must not be observable in the returned order.
|
|
387
|
+
*/
|
|
388
|
+
queueBatch?(queueName: ValidQueueName, messages: readonly {
|
|
389
|
+
message: QueuePayload;
|
|
390
|
+
opts?: QueueOptions;
|
|
391
|
+
}[]): Promise<QueueBatchResult[]>;
|
|
308
392
|
/**
|
|
309
393
|
* Creates an HTTP queue handler for processing messages from a specific queue.
|
|
310
394
|
* A rejected handler must retry the same message with an incremented attempt.
|