eve 0.22.0 → 0.22.2

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 (118) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/src/channel/types.d.ts +18 -1
  3. package/dist/src/cli/commands/init-repl.d.ts +6 -5
  4. package/dist/src/compiled/.vendor-stamp.json +6 -4
  5. package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
  6. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +1 -1
  7. package/dist/src/compiled/@workflow/core/index.js +2 -2
  8. package/dist/src/compiled/@workflow/core/private.js +1 -1
  9. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +14 -0
  10. package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +3 -12
  11. package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +2 -2
  12. package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +5 -0
  13. package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +16 -41
  14. package/dist/src/compiled/@workflow/core/runtime/world-target.d.ts +11 -0
  15. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +21 -9
  16. package/dist/src/compiled/@workflow/core/runtime.d.ts +2 -1
  17. package/dist/src/compiled/@workflow/core/runtime.js +3 -141
  18. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  19. package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +2 -2
  20. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  21. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  22. package/dist/src/compiled/@workflow/world/analytics.d.ts +182 -0
  23. package/dist/src/compiled/@workflow/world/env-config.d.ts +39 -0
  24. package/dist/src/compiled/@workflow/world/events.d.ts +25 -0
  25. package/dist/src/compiled/@workflow/world/index.d.ts +6 -3
  26. package/dist/src/compiled/@workflow/world/interfaces.d.ts +14 -7
  27. package/dist/src/compiled/@workflow/world/runs.d.ts +9 -1
  28. package/dist/src/compiled/@workflow/world/shared.d.ts +15 -0
  29. package/dist/src/compiled/@workflow/world/steps.d.ts +8 -0
  30. package/dist/src/compiled/@workflow/world-local/LICENSE.md +201 -0
  31. package/dist/src/compiled/@workflow/world-local/index.js +4 -0
  32. package/dist/src/compiled/@workflow/world-vercel/LICENSE.md +201 -0
  33. package/dist/src/compiled/@workflow/world-vercel/index.js +42 -0
  34. package/dist/src/compiled/_chunks/workflow/attribute-changes-BnKD8Y3m.js +20 -0
  35. package/dist/src/compiled/_chunks/workflow/{dist-FLIfyJ4Y.js → dist-CttsoN4D.js} +1 -1
  36. package/dist/src/compiled/_chunks/workflow/dist-DJU_7R9s.js +40 -0
  37. package/dist/src/compiled/_chunks/workflow/dist-DpDDcpTl.js +3 -0
  38. package/dist/src/compiled/_chunks/workflow/resume-hook-DjPY9VGg.js +1 -0
  39. package/dist/src/compiled/_chunks/workflow/run-BSANnUPR.js +1 -0
  40. package/dist/src/compiled/_chunks/workflow/sleep-phozDCW8.js +1 -0
  41. package/dist/src/compiled/_chunks/workflow/token-CaY0nA5J.js +1 -0
  42. package/dist/src/compiled/_chunks/workflow/token-D4VIwGlD.js +1 -0
  43. package/dist/src/compiled/_chunks/workflow/undici-fb54XL8i.js +95 -0
  44. package/dist/src/execution/reconcile-session-continuation-token.d.ts +4 -0
  45. package/dist/src/execution/reconcile-session-continuation-token.js +1 -0
  46. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  47. package/dist/src/execution/sandbox/ensure.js +1 -1
  48. package/dist/src/execution/subagent-adapter.js +1 -1
  49. package/dist/src/execution/subagent-event-proxy-step.d.ts +23 -0
  50. package/dist/src/execution/subagent-event-proxy-step.js +1 -0
  51. package/dist/src/execution/turn-workflow.js +1 -1
  52. package/dist/src/execution/workflow-steps.d.ts +1 -22
  53. package/dist/src/execution/workflow-steps.js +1 -1
  54. package/dist/src/harness/emission.js +1 -1
  55. package/dist/src/harness/model-call-error.d.ts +5 -0
  56. package/dist/src/harness/model-call-error.js +1 -1
  57. package/dist/src/harness/prompt-cache.d.ts +18 -9
  58. package/dist/src/harness/prompt-cache.js +1 -1
  59. package/dist/src/harness/tool-loop.js +1 -1
  60. package/dist/src/internal/application/compiled-artifacts.d.ts +4 -0
  61. package/dist/src/internal/application/compiled-artifacts.js +5 -4
  62. package/dist/src/internal/application/package.d.ts +9 -5
  63. package/dist/src/internal/application/package.js +1 -1
  64. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  65. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  66. package/dist/src/internal/nitro/routes/health.d.ts +3 -3
  67. package/dist/src/internal/workflow/runtime.js +1 -1
  68. package/dist/src/internal/workflow/validate-world.d.ts +16 -0
  69. package/dist/src/internal/workflow/validate-world.js +1 -0
  70. package/dist/src/internal/workflow/world-compatibility.d.ts +1 -12
  71. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/index.js +1 -0
  72. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/parse-name.js +1 -0
  73. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/pluralize.js +1 -0
  74. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/promise.js +1 -0
  75. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/time.js +1 -0
  76. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/workflow-routes.js +1 -0
  77. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/world-target.js +1 -0
  78. package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +1 -0
  79. package/dist/src/public/channels/slack/action-status.d.ts +19 -0
  80. package/dist/src/public/channels/slack/action-status.js +1 -0
  81. package/dist/src/public/channels/slack/defaults.js +2 -2
  82. package/dist/src/public/channels/slack/hitl.d.ts +3 -2
  83. package/dist/src/public/channels/slack/hitl.js +3 -3
  84. package/dist/src/public/channels/slack/index.d.ts +2 -1
  85. package/dist/src/public/channels/slack/index.js +1 -1
  86. package/dist/src/public/channels/slack/interactions.js +1 -1
  87. package/dist/src/public/channels/slack/limits.d.ts +18 -0
  88. package/dist/src/public/channels/slack/limits.js +1 -1
  89. package/dist/src/public/channels/slack/slackChannel.d.ts +1 -1
  90. package/dist/src/public/next/index.d.ts +9 -9
  91. package/dist/src/public/next/index.js +1 -1
  92. package/dist/src/public/next/vercel-output-config.js +1 -1
  93. package/dist/src/runtime/sandbox/keys.d.ts +4 -0
  94. package/dist/src/runtime/sandbox/keys.js +1 -1
  95. package/dist/src/runtime/sandbox/template-plan.d.ts +0 -2
  96. package/dist/src/setup/scaffold/create/project.js +2 -2
  97. package/dist/src/shared/vercel-project.d.ts +25 -0
  98. package/dist/src/shared/vercel-project.js +1 -0
  99. package/docs/agent-config.md +1 -1
  100. package/docs/channels/github.mdx +35 -2
  101. package/docs/channels/linear.mdx +35 -5
  102. package/docs/channels/slack.mdx +30 -3
  103. package/docs/concepts/execution-model-and-durability.md +1 -1
  104. package/docs/connections/overview.mdx +2 -0
  105. package/docs/guides/deployment.md +1 -1
  106. package/docs/guides/frontend/nextjs.mdx +7 -7
  107. package/docs/sandbox.mdx +3 -1
  108. package/docs/subagents.mdx +3 -1
  109. package/package.json +7 -5
  110. package/dist/src/compiled/_chunks/workflow/attribute-changes-zAifvEhb.js +0 -59
  111. package/dist/src/compiled/_chunks/workflow/dist-Dxrjttr2.js +0 -3
  112. package/dist/src/compiled/_chunks/workflow/resume-hook-C15uJ2ik.js +0 -1
  113. package/dist/src/compiled/_chunks/workflow/run-BJUPZ0Ni.js +0 -1
  114. package/dist/src/compiled/_chunks/workflow/sleep-C8B-TYir.js +0 -1
  115. package/dist/src/compiled/_chunks/workflow/token-Bm-WLAUB.js +0 -1
  116. package/dist/src/compiled/_chunks/workflow/token-J7YP0s9a.js +0 -1
  117. package/dist/src/internal/workflow/configure-world.d.ts +0 -18
  118. package/dist/src/internal/workflow/configure-world.js +0 -1
@@ -1,2 +1,2 @@
1
- export declare const version = "5.0.0-beta.26";
1
+ export declare const version = "5.0.0-beta.28";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -5,8 +5,8 @@
5
5
  * is responsible for loading `world.ts` and populating the globalThis
6
6
  * world cache before any VM or step code executes. Including this module
7
7
  * (rather than letting the resolver fall through to the host file) keeps
8
- * `world.ts` and its server-only deps (`@workflow/world-vercel`,
9
- * `@workflow/world-local`, `cbor-x`, …) out of the workflow sandbox.
8
+ * `world.ts` and the configured server-only world package out of the
9
+ * workflow sandbox.
10
10
  *
11
11
  * See `../runtime/world-init.ts` for the host-side implementation and the
12
12
  * full rationale.
@@ -1 +1 @@
1
- import{c as e,i as t}from"../../_chunks/workflow/dist-Dxrjttr2.js";import{dn as n,fn as r,fr as i,lr as a,mr as o,nn as s,on as c,t as l,tn as u,un as d,ur as f}from"../../_chunks/workflow/attribute-changes-zAifvEhb.js";import{t as p}from"../../_chunks/workflow/sleep-C8B-TYir.js";import{t as m}from"../../_chunks/workflow/run-BJUPZ0Ni.js";async function h(e,n={}){let i=l(e,n);if(i.length===0)return;let a=n.allowReservedAttributes===!0,o=globalThis[r];if(!o)throw new t("experimental_setAttributes() called outside a workflow runtime context. It must be called from within a workflow body (`use workflow`).");await o(i,a?{allowReservedAttributes:!0}:{})}s(u,m);function g(e){let t=globalThis[d];return t||f(`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){i(`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,r=globalThis[n](t);return Object.create(globalThis.WritableStream.prototype,{[c]:{value:r,writable:!1}})}function b(){a(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,b)}function x(){i(`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{i as e}from"../../_chunks/workflow/dist-CttsoN4D.js";import{c as t,i as n}from"../../_chunks/workflow/dist-DpDDcpTl.js";import{An as r,En as i,On as a,Tn as o,dn as s,fn as c,nn as l,pn as u,rn as d,sn as f,t as p}from"../../_chunks/workflow/attribute-changes-BnKD8Y3m.js";import{t as m}from"../../_chunks/workflow/sleep-phozDCW8.js";import{t as h}from"../../_chunks/workflow/run-BSANnUPR.js";async function g(e,t={}){let r=p(e,t);if(r.length===0)return;let i=t.allowReservedAttributes===!0,a=globalThis[u];if(!a)throw new n("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}:{})}d(l,h);function _(e){let t=globalThis[s];return t||i(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,_),t(e)}function v(t){let{respondWith:n,token:i,...a}=t??{};if(i!==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 o;n!==void 0&&(o={respondWith:n});let s=_({...a,metadata:o,isWebhook:!0}),{url:c}=r();return s.url=e(c,{type:`webhook`,token:s.token}),s}function y(){function e(t,n){a(`defineHook().resume()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,e)}return{create(e){return _(e)},resume:e}}function b(e={}){let{namespace:t}=e,n=globalThis[c](t);return Object.create(globalThis.WritableStream.prototype,{[f]:{value:n,writable:!1}})}function x(){o(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,x)}function S(){a(`resumeHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow-api/resume-hook`,S)}export{n as FatalError,t as RetryableError,_ as createHook,v as createWebhook,y as defineHook,g as experimental_setAttributes,x as getStepMetadata,r as getWorkflowMetadata,b as getWritable,S as resumeHook,m 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-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};
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-DpDDcpTl.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};
@@ -0,0 +1,182 @@
1
+ import { z } from '#compiled/zod/index.js';
2
+ import type { PaginatedResponse, PaginationOptions } from './shared.js';
3
+ export declare const AnalyticsRunSchema: z.ZodObject<{
4
+ runId: z.ZodString;
5
+ status: z.ZodEnum<{
6
+ pending: "pending";
7
+ running: "running";
8
+ completed: "completed";
9
+ failed: "failed";
10
+ cancelled: "cancelled";
11
+ }>;
12
+ deploymentId: z.ZodString;
13
+ workflowName: z.ZodString;
14
+ specVersion: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
15
+ attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
16
+ createdAt: z.ZodCoercedDate<unknown>;
17
+ updatedAt: z.ZodCoercedDate<unknown>;
18
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
19
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
20
+ errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
23
+ }, z.core.$strip>;
24
+ export declare const AnalyticsStepSchema: z.ZodObject<{
25
+ runId: z.ZodString;
26
+ stepId: z.ZodString;
27
+ stepName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ status: z.ZodEnum<{
29
+ pending: "pending";
30
+ running: "running";
31
+ completed: "completed";
32
+ failed: "failed";
33
+ cancelled: "cancelled";
34
+ }>;
35
+ attempt: z.ZodOptional<z.ZodNumber>;
36
+ createdAt: z.ZodCoercedDate<unknown>;
37
+ updatedAt: z.ZodCoercedDate<unknown>;
38
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
39
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
40
+ retryAfter: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
41
+ errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
44
+ }, z.core.$strip>;
45
+ export declare const AnalyticsEventSchema: z.ZodObject<{
46
+ runId: z.ZodString;
47
+ eventId: z.ZodString;
48
+ eventType: z.ZodEnum<{
49
+ run_created: "run_created";
50
+ run_completed: "run_completed";
51
+ run_failed: "run_failed";
52
+ step_created: "step_created";
53
+ step_completed: "step_completed";
54
+ step_failed: "step_failed";
55
+ step_retrying: "step_retrying";
56
+ hook_created: "hook_created";
57
+ hook_received: "hook_received";
58
+ run_started: "run_started";
59
+ run_cancelled: "run_cancelled";
60
+ attr_set: "attr_set";
61
+ step_started: "step_started";
62
+ hook_disposed: "hook_disposed";
63
+ hook_conflict: "hook_conflict";
64
+ wait_created: "wait_created";
65
+ wait_completed: "wait_completed";
66
+ }>;
67
+ correlationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ entityId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ stepName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ workflowName: z.ZodString;
71
+ deploymentId: z.ZodString;
72
+ specVersion: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
73
+ runCreatedAt: z.ZodCoercedDate<unknown>;
74
+ createdAt: z.ZodCoercedDate<unknown>;
75
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ vercelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ resumeAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
79
+ retryAfter: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
80
+ errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ isWebhook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
83
+ isSystem: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
84
+ workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
85
+ }, z.core.$strip>;
86
+ export declare const AnalyticsHookSchema: z.ZodObject<{
87
+ runId: z.ZodString;
88
+ hookId: z.ZodString;
89
+ status: z.ZodEnum<{
90
+ created: "created";
91
+ received: "received";
92
+ disposed: "disposed";
93
+ conflict: "conflict";
94
+ }>;
95
+ createdAt: z.ZodCoercedDate<unknown>;
96
+ updatedAt: z.ZodCoercedDate<unknown>;
97
+ receivedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
98
+ disposedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
99
+ isWebhook: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
100
+ isSystem: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
101
+ workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
103
+ }, z.core.$strip>;
104
+ export declare const AnalyticsWaitSchema: z.ZodObject<{
105
+ runId: z.ZodString;
106
+ waitId: z.ZodString;
107
+ status: z.ZodEnum<{
108
+ completed: "completed";
109
+ waiting: "waiting";
110
+ }>;
111
+ resumeAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
112
+ createdAt: z.ZodCoercedDate<unknown>;
113
+ updatedAt: z.ZodCoercedDate<unknown>;
114
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
115
+ workflowCoreVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
+ workflowEncryptionEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
117
+ }, z.core.$strip>;
118
+ export type AnalyticsRun = z.infer<typeof AnalyticsRunSchema>;
119
+ export type AnalyticsStep = z.infer<typeof AnalyticsStepSchema>;
120
+ export type AnalyticsEvent = z.infer<typeof AnalyticsEventSchema>;
121
+ export type AnalyticsHook = z.infer<typeof AnalyticsHookSchema>;
122
+ export type AnalyticsWait = z.infer<typeof AnalyticsWaitSchema>;
123
+ export interface AnalyticsListRunsParams {
124
+ workflowName?: string;
125
+ status?: AnalyticsRun['status'];
126
+ /**
127
+ * Bound the listing to runs active between `startTime` and `endTime`
128
+ * (ISO 8601 timestamps). Both must be provided together. A bounded window
129
+ * lets the backend prune its scan — the ClickHouse-backed Vercel
130
+ * implementation is significantly faster with one. Requesting a window
131
+ * older than the plan's observability lookback fails with
132
+ * `observability-upgrade-required`.
133
+ */
134
+ startTime?: string;
135
+ endTime?: string;
136
+ pagination?: PaginationOptions;
137
+ }
138
+ export interface AnalyticsListRunScopedParams {
139
+ runId: string;
140
+ pagination?: PaginationOptions;
141
+ }
142
+ export interface AnalyticsListEventsParams extends AnalyticsListRunScopedParams {
143
+ eventType?: AnalyticsEvent['eventType'];
144
+ correlationId?: string;
145
+ }
146
+ export interface AnalyticsListEventsByCorrelationIdParams {
147
+ correlationId: string;
148
+ pagination?: PaginationOptions;
149
+ }
150
+ export interface AnalyticsListHooksParams {
151
+ runId: string;
152
+ pagination?: PaginationOptions;
153
+ }
154
+ export interface AnalyticsListWaitsParams extends AnalyticsListRunScopedParams {
155
+ status?: AnalyticsWait['status'];
156
+ }
157
+ export interface Analytics {
158
+ runs: {
159
+ get(runId: string): Promise<AnalyticsRun>;
160
+ list(params?: AnalyticsListRunsParams): Promise<PaginatedResponse<AnalyticsRun>>;
161
+ };
162
+ steps: {
163
+ get(runId: string, stepId: string): Promise<AnalyticsStep>;
164
+ list(params: AnalyticsListRunScopedParams): Promise<PaginatedResponse<AnalyticsStep>>;
165
+ };
166
+ events: {
167
+ get(runId: string, eventId: string): Promise<AnalyticsEvent>;
168
+ list(params: AnalyticsListEventsParams): Promise<PaginatedResponse<AnalyticsEvent>>;
169
+ listByCorrelationId(params: AnalyticsListEventsByCorrelationIdParams): Promise<PaginatedResponse<AnalyticsEvent>>;
170
+ };
171
+ hooks: {
172
+ get(hookId: string, params?: {
173
+ runId?: string;
174
+ }): Promise<AnalyticsHook>;
175
+ list(params: AnalyticsListHooksParams): Promise<PaginatedResponse<AnalyticsHook>>;
176
+ };
177
+ waits: {
178
+ get(runId: string, waitId: string): Promise<AnalyticsWait>;
179
+ list(params: AnalyticsListWaitsParams): Promise<PaginatedResponse<AnalyticsWait>>;
180
+ };
181
+ }
182
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Helpers for resolving numeric runtime-tuning constants from environment
3
+ * variables.
4
+ *
5
+ * Several SDK constants (timeouts, retry counts, stream buffering, …) are
6
+ * useful to tune per-deployment — most notably to dial them down on a
7
+ * dedicated e2e deployment so the test suite exercises edge paths (reconnects,
8
+ * batch splitting, retries) that otherwise only trigger after long durations
9
+ * or large payloads.
10
+ *
11
+ * `envNumber` reads `process.env[name]` lazily (so tests and deployments can
12
+ * override per invocation), clamps to an optional `[min, max]` range, and
13
+ * never throws — an env override is an escape hatch, not a hard requirement,
14
+ * so an invalid value falls back to the constant's compiled-in default. A
15
+ * misconfigured value warns once per process so the mistake is observable
16
+ * without spamming logs.
17
+ */
18
+ export interface EnvNumberOptions {
19
+ /** Inclusive lower bound; values below are clamped up to it. Default 0. */
20
+ min?: number;
21
+ /** Inclusive upper bound; values above are clamped down to it. */
22
+ max?: number;
23
+ /** Require an integer; fractional values fall back to the default. */
24
+ integer?: boolean;
25
+ }
26
+ /**
27
+ * Resolve a numeric tuning constant from `process.env[name]`, falling back to
28
+ * `fallback` when the variable is unset, empty, or invalid. Clamps to
29
+ * `[min, max]` when provided.
30
+ */
31
+ export declare function envNumber(name: string, fallback: number, options?: EnvNumberOptions): number;
32
+ /**
33
+ * Reset the warn-once cache. Test-only — exported so unit tests can exercise
34
+ * the warning path repeatedly without sharing state across cases.
35
+ *
36
+ * @internal
37
+ */
38
+ export declare function _resetEnvWarnCacheForTests(): void;
39
+ //# sourceMappingURL=env-config.d.ts.map
@@ -31,6 +31,15 @@ export declare const EventTypeSchema: z.ZodEnum<{
31
31
  wait_created: "wait_created";
32
32
  wait_completed: "wait_completed";
33
33
  }>;
34
+ export type EventType = z.infer<typeof EventTypeSchema>;
35
+ export declare const TerminalRunEventTypeSchema: z.ZodEnum<{
36
+ run_completed: "run_completed";
37
+ run_failed: "run_failed";
38
+ run_cancelled: "run_cancelled";
39
+ }>;
40
+ export type TerminalRunEventType = z.infer<typeof TerminalRunEventTypeSchema>;
41
+ export declare const TERMINAL_RUN_EVENT_TYPES: ("run_completed" | "run_failed" | "run_cancelled")[];
42
+ export declare function isTerminalRunEventType(eventType: string): eventType is TerminalRunEventType;
34
43
  export declare const BaseEventSchema: z.ZodObject<{
35
44
  eventType: z.ZodEnum<{
36
45
  run_created: "run_created";
@@ -54,6 +63,21 @@ export declare const BaseEventSchema: z.ZodObject<{
54
63
  correlationId: z.ZodOptional<z.ZodString>;
55
64
  specVersion: z.ZodOptional<z.ZodNumber>;
56
65
  }, z.core.$strip>;
66
+ /**
67
+ * Event created when a hook is first invoked. The World implementation
68
+ * atomically creates both the event and the hook entity.
69
+ */
70
+ export declare const HookCreatedEventSchema: z.ZodObject<{
71
+ specVersion: z.ZodOptional<z.ZodNumber>;
72
+ eventType: z.ZodLiteral<"hook_created">;
73
+ correlationId: z.ZodString;
74
+ eventData: z.ZodObject<{
75
+ token: z.ZodString;
76
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
77
+ isWebhook: z.ZodOptional<z.ZodBoolean>;
78
+ isSystem: z.ZodOptional<z.ZodBoolean>;
79
+ }, z.core.$strip>;
80
+ }, z.core.$strip>;
57
81
  declare const HookReceivedEventSchema: z.ZodObject<{
58
82
  specVersion: z.ZodOptional<z.ZodNumber>;
59
83
  eventType: z.ZodLiteral<"hook_received">;
@@ -404,6 +428,7 @@ export declare const EventSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.Z
404
428
  specVersion: z.ZodOptional<z.ZodNumber>;
405
429
  }, z.core.$strip>>;
406
430
  export type Event = z.infer<typeof EventSchema>;
431
+ export type HookCreatedEvent = z.infer<typeof HookCreatedEventSchema>;
407
432
  export type HookReceivedEvent = z.infer<typeof HookReceivedEventSchema>;
408
433
  export type HookConflictEvent = z.infer<typeof HookConflictEventSchema>;
409
434
  /**
@@ -1,7 +1,10 @@
1
+ export type * from './analytics.js';
2
+ export { AnalyticsEventSchema, AnalyticsHookSchema, AnalyticsRunSchema, AnalyticsStepSchema, AnalyticsWaitSchema, } from './analytics.js';
1
3
  export type * from './attributes.js';
2
4
  export { ATTRIBUTE_KEY_MAX_LENGTH, ATTRIBUTE_MAX_PER_RUN, ATTRIBUTE_VALUE_MAX_BYTES, AttributeChangeSchema, AttributeChangesSchema, AttributeValidationError, applyAttributeChanges, RESERVED_ATTRIBUTE_KEY_PREFIX, validateAttributeChanges, validateAttributeKey, validateAttributeValue, } from './attributes.js';
5
+ export { _resetEnvWarnCacheForTests, type EnvNumberOptions, envNumber, } from './env-config.js';
3
6
  export type * from './events.js';
4
- export { BaseEventSchema, CreateEventSchema, EVENT_DATA_REF_FIELDS, EventSchema, EventTypeSchema, stripEventDataRefs, } from './events.js';
7
+ export { BaseEventSchema, CreateEventSchema, EVENT_DATA_REF_FIELDS, EventSchema, EventTypeSchema, HookCreatedEventSchema, isTerminalRunEventType, stripEventDataRefs, TERMINAL_RUN_EVENT_TYPES, TerminalRunEventTypeSchema, } from './events.js';
5
8
  export type * from './hooks.js';
6
9
  export { HookSchema } from './hooks.js';
7
10
  export type * from './interfaces.js';
@@ -9,7 +12,7 @@ export type * from './queue.js';
9
12
  export { getQueuePrefixKind, getQueueTopicPrefix, HealthCheckPayloadSchema, MessageId, parseQueueName, QueuePayloadSchema, QueuePrefix, RunInputSchema, resolveQueueNamespace, StepInvokePayloadSchema, ValidQueueName, WorkflowInvokePayloadSchema, } from './queue.js';
10
13
  export { reenqueueActiveRuns } from './recovery.js';
11
14
  export type * from './runs.js';
12
- export { WorkflowRunBaseSchema, WorkflowRunSchema, WorkflowRunStatusSchema, } from './runs.js';
15
+ export { isTerminalWorkflowRunStatus, TERMINAL_WORKFLOW_RUN_STATUSES, TerminalWorkflowRunStatusSchema, WorkflowRunBaseSchema, WorkflowRunSchema, WorkflowRunStatusSchema, } from './runs.js';
13
16
  export type { SerializedData } from './serialization.js';
14
17
  export { LegacySerializedDataSchemaV1, SerializedDataSchema, } from './serialization.js';
15
18
  export type * from './shared.js';
@@ -18,7 +21,7 @@ export { PaginatedResponseSchema, StructuredErrorSchema, } from './shared.js';
18
21
  export type { SpecVersion } from './spec-version.js';
19
22
  export { isLegacySpecVersion, requiresNewerWorld, SPEC_VERSION_CURRENT, SPEC_VERSION_LEGACY, SPEC_VERSION_SUPPORTS_ATTRIBUTES, SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT, SPEC_VERSION_SUPPORTS_COMPRESSION, SPEC_VERSION_SUPPORTS_EVENT_SOURCING, } from './spec-version.js';
20
23
  export type * from './steps.js';
21
- export { StepSchema, StepStatusSchema } from './steps.js';
24
+ export { isTerminalStepStatus, StepSchema, StepStatusSchema, TERMINAL_STEP_STATUSES, TerminalStepStatusSchema, } from './steps.js';
22
25
  export { DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS, DEFAULT_TIMESTAMP_THRESHOLD_MS, DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS, ulidToDate, validateUlidTimestamp, } from './ulid.js';
23
26
  export type * from './waits.js';
24
27
  export { WaitSchema, WaitStatusSchema } from './waits.js';
@@ -1,3 +1,4 @@
1
+ import type { Analytics } from './analytics.js';
1
2
  import type { AttributeChange, ExperimentalSetAttributesResult } from './attributes.js';
2
3
  import type { CreateEventParams, CreateEventRequest, Event, EventResult, GetEventParams, ListEventsByCorrelationIdParams, ListEventsParams, RunCreatedEventRequest } from './events.js';
3
4
  import type { GetHookParams, Hook, ListHooksParams } from './hooks.js';
@@ -180,15 +181,21 @@ export interface Storage {
180
181
  */
181
182
  export interface World extends Queue, Streamer, Storage {
182
183
  /**
183
- * The highest spec version this World supports.
184
+ * Optional analytics read namespace for observability surfaces.
184
185
  *
185
- * When set, `start()` creates runs at this version so world-specific
186
- * features (e.g., CBOR queue transport) are enabled automatically.
187
- * When omitted, runs default to `SPEC_VERSION_SUPPORTS_EVENT_SOURCING` (2),
188
- * the safe baseline that all worlds — including community worlds on
189
- * older @workflow/world versions — are expected to handle.
186
+ * These APIs return metadata-only rows intended for UI/CLI listing and
187
+ * trace views. Payload-bearing fields remain on the canonical runtime
188
+ * storage APIs (`runs`, `steps`, `events`, `hooks`) and their RemoteRef
189
+ * resolution path.
190
190
  */
191
- specVersion?: number;
191
+ analytics?: Analytics;
192
+ /**
193
+ * The Workflow protocol spec version this World implements.
194
+ *
195
+ * Current runtimes require this to exactly match their
196
+ * `SPEC_VERSION_CURRENT` before they create or replay runs.
197
+ */
198
+ specVersion: number;
192
199
  /**
193
200
  * Whether calling `process.exit(1)` from a queue handler is observed by
194
201
  * the World as a delivery failure that will be retried.
@@ -8,6 +8,15 @@ export declare const WorkflowRunStatusSchema: z.ZodEnum<{
8
8
  failed: "failed";
9
9
  cancelled: "cancelled";
10
10
  }>;
11
+ export type WorkflowRunStatus = z.infer<typeof WorkflowRunStatusSchema>;
12
+ export declare const TerminalWorkflowRunStatusSchema: z.ZodEnum<{
13
+ completed: "completed";
14
+ failed: "failed";
15
+ cancelled: "cancelled";
16
+ }>;
17
+ export type TerminalWorkflowRunStatus = z.infer<typeof TerminalWorkflowRunStatusSchema>;
18
+ export declare const TERMINAL_WORKFLOW_RUN_STATUSES: ("completed" | "failed" | "cancelled")[];
19
+ export declare function isTerminalWorkflowRunStatus(status: string): status is TerminalWorkflowRunStatus;
11
20
  /**
12
21
  * Base schema for the Workflow runs. Prefer using WorkflowRunSchema
13
22
  * which implements a discriminatedUnion for various states.
@@ -112,7 +121,6 @@ export declare const WorkflowRunSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
112
121
  error: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>;
113
122
  completedAt: z.ZodCoercedDate<unknown>;
114
123
  }, z.core.$strip>], "status">;
115
- export type WorkflowRunStatus = z.infer<typeof WorkflowRunStatusSchema>;
116
124
  export type WorkflowRun = z.infer<typeof WorkflowRunSchema>;
117
125
  /**
118
126
  * WorkflowRun with input/output fields excluded (when resolveData='none').
@@ -11,10 +11,25 @@ export interface PaginationOptions {
11
11
  cursor?: string;
12
12
  sortOrder?: 'asc' | 'desc';
13
13
  }
14
+ export declare const PageInfoSchema: z.ZodObject<{
15
+ currentLookbackDays: z.ZodNumber;
16
+ maxLookbackDays: z.ZodNumber;
17
+ currentWindowStart: z.ZodCoercedDate<unknown>;
18
+ maxWindowStart: z.ZodCoercedDate<unknown>;
19
+ upgradeAvailable: z.ZodBoolean;
20
+ }, z.core.$strip>;
21
+ export type PageInfo = z.infer<typeof PageInfoSchema>;
14
22
  export declare const PaginatedResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
15
23
  data: z.ZodArray<T>;
16
24
  cursor: z.ZodNullable<z.ZodString>;
17
25
  hasMore: z.ZodBoolean;
26
+ pageInfo: z.ZodOptional<z.ZodObject<{
27
+ currentLookbackDays: z.ZodNumber;
28
+ maxLookbackDays: z.ZodNumber;
29
+ currentWindowStart: z.ZodCoercedDate<unknown>;
30
+ maxWindowStart: z.ZodCoercedDate<unknown>;
31
+ upgradeAvailable: z.ZodBoolean;
32
+ }, z.core.$strip>>;
18
33
  }, z.core.$strip>;
19
34
  export type PaginatedResponse<T> = z.infer<ReturnType<typeof PaginatedResponseSchema<z.ZodType<T>>>>;
20
35
  /**
@@ -38,6 +38,14 @@ export declare const StepSchema: z.ZodObject<{
38
38
  specVersion: z.ZodOptional<z.ZodNumber>;
39
39
  }, z.core.$strip>;
40
40
  export type StepStatus = z.infer<typeof StepStatusSchema>;
41
+ export declare const TerminalStepStatusSchema: z.ZodEnum<{
42
+ completed: "completed";
43
+ failed: "failed";
44
+ cancelled: "cancelled";
45
+ }>;
46
+ export type TerminalStepStatus = z.infer<typeof TerminalStepStatusSchema>;
47
+ export declare const TERMINAL_STEP_STATUSES: ("completed" | "failed" | "cancelled")[];
48
+ export declare function isTerminalStepStatus(status: string): status is TerminalStepStatus;
41
49
  export type Step = z.infer<typeof StepSchema>;
42
50
  /**
43
51
  * Step with input/output fields excluded (when resolveData='none').
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ <http://www.apache.org/licenses/>
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Vercel Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.