eve 0.9.2 → 0.9.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 +15 -0
- package/bin/eve.d.ts +9 -0
- package/bin/eve.js +78 -7
- package/dist/src/compiled/.vendor-stamp.json +9 -9
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +6 -6
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +2 -2
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +13 -0
- package/dist/src/compiled/@workflow/core/runtime.js +28 -28
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +57 -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/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/queue.d.ts +3 -0
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DGVGRGfw.js → attribute-changes-Db-CKuLh.js} +10 -10
- package/dist/src/compiled/_chunks/workflow/dist-DhA2lbtB.js +14 -0
- package/dist/src/compiled/_chunks/workflow/{dist-6a3viBXZ.js → dist-DvHFhSJM.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-aOKD_2KN.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-Uk1RAmYo.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-AA-FTD_U.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BG6X2Bli.js +1 -0
- package/dist/src/execution/sandbox/logging-session.js +2 -2
- package/dist/src/execution/sandbox/read-file-tool.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/package.json +15 -15
- package/dist/src/compiled/_chunks/workflow/dist-CkMRLaRV.js +0 -14
- package/dist/src/compiled/_chunks/workflow/dist-D0jyrm7a.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-DMSadN9o.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-BRdn7zy_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CpXfoXLF.js +0 -1
|
@@ -72,6 +72,10 @@ export declare const WorkflowResultType: (value: string) => {
|
|
|
72
72
|
export declare const WorkflowTracePropagated: (value: boolean) => {
|
|
73
73
|
[k: string]: boolean;
|
|
74
74
|
};
|
|
75
|
+
/** Active trace-correlation mode for this invocation (linked or continuous) */
|
|
76
|
+
export declare const WorkflowTraceMode: (value: "linked" | "continuous") => {
|
|
77
|
+
[k: string]: "linked" | "continuous";
|
|
78
|
+
};
|
|
75
79
|
/** Name of the error that caused workflow failure */
|
|
76
80
|
export declare const WorkflowErrorName: (value: string) => {
|
|
77
81
|
[k: string]: string;
|
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
import type * as api from '#compiled/@opentelemetry/api/index.js';
|
|
2
2
|
import type { Span, SpanKind, SpanOptions } from '#compiled/@opentelemetry/api/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Controls how workflow/step queue-handler spans relate to the run-origin
|
|
5
|
+
* trace context carried in queue messages:
|
|
6
|
+
*
|
|
7
|
+
* - `'linked'` (default): each invocation starts a NEW root trace; the
|
|
8
|
+
* run-origin context (and the incoming delivery context) are attached as
|
|
9
|
+
* span links. This keeps traces bounded per invocation instead of
|
|
10
|
+
* stitching a long-lived run into one giant trace.
|
|
11
|
+
* - `'continuous'`: the restored run-origin context becomes the parent of
|
|
12
|
+
* the invocation span (legacy behavior), producing a single trace that
|
|
13
|
+
* spans the entire run.
|
|
14
|
+
*/
|
|
15
|
+
export type WorkflowTraceMode = 'linked' | 'continuous';
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the active trace mode from the `WORKFLOW_TRACE_MODE` env var.
|
|
18
|
+
* Defaults to `'linked'`; any value other than `'continuous'` selects it.
|
|
19
|
+
* Unrecognized non-empty values (e.g. typos like `continous`) emit a
|
|
20
|
+
* one-time warning so silent fallback to `linked` is at least visible.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getWorkflowTraceMode(): WorkflowTraceMode;
|
|
23
|
+
/**
|
|
24
|
+
* Returns whether a serialized trace carrier is usable, i.e. present and
|
|
25
|
+
* non-empty. `serializeTraceCarrier()` returns `{}` when no OTEL SDK is
|
|
26
|
+
* registered or no span is active, and `start()` always attaches the
|
|
27
|
+
* carrier to the first queue message — so an empty carrier must be treated
|
|
28
|
+
* the same as an absent one wherever the trace-mode logic branches.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isUsableTraceCarrier(carrier: Record<string, string> | undefined): carrier is Record<string, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the trace carrier to attach to messages the current invocation
|
|
33
|
+
* enqueues. In `linked` mode the ORIGINAL run-origin carrier is forwarded
|
|
34
|
+
* unchanged (when usable) so every future invocation links back to the same
|
|
35
|
+
* origin; otherwise — `continuous` mode, or no usable incoming carrier —
|
|
36
|
+
* the current (active) context is serialized, so the trace keeps chaining
|
|
37
|
+
* (continuous) or the first instrumented invocation becomes the de-facto
|
|
38
|
+
* origin (linked).
|
|
39
|
+
*/
|
|
40
|
+
export declare function getNextTraceCarrier(traceMode: WorkflowTraceMode, incomingCarrier: Record<string, string> | undefined): Promise<Record<string, string>>;
|
|
41
|
+
/**
|
|
42
|
+
* Builds the span links for a queue-delivered invocation span
|
|
43
|
+
* (`workflow.execute` / `step.execute`):
|
|
44
|
+
*
|
|
45
|
+
* - a link to the incoming delivery context (the active span extracted from
|
|
46
|
+
* the queue delivery request, i.e. the enqueue site once the queue
|
|
47
|
+
* propagates producer context), and
|
|
48
|
+
* - in `linked` mode, a link to the run-origin context from the message's
|
|
49
|
+
* trace carrier (skipped when absent, empty, invalid, or identical to the
|
|
50
|
+
* delivery context).
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildInvocationSpanLinks(traceMode: WorkflowTraceMode, incomingCarrier: Record<string, string> | undefined): Promise<api.Link[] | undefined>;
|
|
3
53
|
/**
|
|
4
54
|
* Serializes the current trace context into a format that can be passed through queues
|
|
5
55
|
* @returns A record of strings representing the trace context
|
|
@@ -31,6 +81,13 @@ export declare function instrumentObject<T extends object>(prefix: string, o: T)
|
|
|
31
81
|
export declare function getSpanKind(field: keyof typeof SpanKind): Promise<api.SpanKind | undefined>;
|
|
32
82
|
export declare function withOtel<T>(fn: (otel: typeof api) => T): Promise<Awaited<T> | undefined>;
|
|
33
83
|
export declare function linkToCurrentContext(): Promise<[api.Link] | undefined>;
|
|
84
|
+
/**
|
|
85
|
+
* Builds a span link pointing at the span context embedded in a serialized
|
|
86
|
+
* trace carrier (e.g. the run-origin context flowing through queue
|
|
87
|
+
* messages). Returns `undefined` when OTEL is unavailable, the carrier is
|
|
88
|
+
* absent, or it does not contain a valid span context.
|
|
89
|
+
*/
|
|
90
|
+
export declare function linkToTraceCarrier(carrier: Record<string, string> | undefined): Promise<api.Link | undefined>;
|
|
34
91
|
/**
|
|
35
92
|
* Workflow context to propagate via baggage
|
|
36
93
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "5.0.0-beta.
|
|
1
|
+
export declare const version = "5.0.0-beta.17";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t}from"../../_chunks/workflow/dist-
|
|
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 +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-
|
|
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};
|
|
@@ -49,6 +49,7 @@ export declare const RunInputSchema: z.ZodObject<{
|
|
|
49
49
|
specVersion: z.ZodNumber;
|
|
50
50
|
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
51
51
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52
|
+
allowReservedAttributes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
52
53
|
}, z.core.$strip>;
|
|
53
54
|
export type RunInput = z.infer<typeof RunInputSchema>;
|
|
54
55
|
export declare const WorkflowInvokePayloadSchema: z.ZodObject<{
|
|
@@ -69,6 +70,7 @@ export declare const WorkflowInvokePayloadSchema: z.ZodObject<{
|
|
|
69
70
|
specVersion: z.ZodNumber;
|
|
70
71
|
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
71
72
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
73
|
+
allowReservedAttributes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
72
74
|
}, z.core.$strip>>;
|
|
73
75
|
}, z.core.$strip>;
|
|
74
76
|
export declare const StepInvokePayloadSchema: z.ZodObject<{
|
|
@@ -108,6 +110,7 @@ export declare const QueuePayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
108
110
|
specVersion: z.ZodNumber;
|
|
109
111
|
executionContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
110
112
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
113
|
+
allowReservedAttributes: z.ZodOptional<z.ZodLiteral<true>>;
|
|
111
114
|
}, z.core.$strip>>;
|
|
112
115
|
}, z.core.$strip>, z.ZodObject<{
|
|
113
116
|
workflowName: z.ZodString;
|