eve 0.48.0 → 0.49.0

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 (189) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/src/channel/channel-address.js +1 -1
  3. package/dist/src/channel/types.d.ts +10 -0
  4. package/dist/src/cli/commands/registry-metadata.d.ts +30 -0
  5. package/dist/src/cli/commands/registry-metadata.js +1 -1
  6. package/dist/src/cli/commands/registry-package.d.ts +6 -0
  7. package/dist/src/cli/commands/registry-package.js +1 -1
  8. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +30 -0
  9. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -0
  10. package/dist/src/cli/commands/registry-pnpm-build-policy.d.ts +12 -0
  11. package/dist/src/cli/commands/registry-pnpm-build-policy.js +6 -0
  12. package/dist/src/cli/commands/registry-recovery.d.ts +4 -0
  13. package/dist/src/cli/commands/registry-recovery.js +1 -1
  14. package/dist/src/cli/commands/registry.d.ts +1 -1
  15. package/dist/src/cli/commands/registry.js +1 -1
  16. package/dist/src/cli/dev/tui/setup-commands.js +2 -2
  17. package/dist/src/compiled/.vendor-stamp.json +7 -7
  18. package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -4
  19. package/dist/src/compiled/@workflow/core/capabilities.d.ts +10 -9
  20. package/dist/src/compiled/@workflow/core/capture-stack.d.ts +1 -1
  21. package/dist/src/compiled/@workflow/core/class-serialization.d.ts +8 -8
  22. package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +5 -5
  23. package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
  24. package/dist/src/compiled/@workflow/core/describe-error.d.ts +7 -7
  25. package/dist/src/compiled/@workflow/core/encryption.d.ts +5 -5
  26. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +49 -14
  27. package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +4 -4
  28. package/dist/src/compiled/@workflow/core/global.d.ts +4 -2
  29. package/dist/src/compiled/@workflow/core/index.d.ts +1 -1
  30. package/dist/src/compiled/@workflow/core/index.js +2 -2
  31. package/dist/src/compiled/@workflow/core/log-format.d.ts +2 -2
  32. package/dist/src/compiled/@workflow/core/private.d.ts +40 -78
  33. package/dist/src/compiled/@workflow/core/private.js +1 -1
  34. package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +13 -17
  35. package/dist/src/compiled/@workflow/core/runtime/compute-instance.d.ts +4 -3
  36. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +27 -27
  37. package/dist/src/compiled/@workflow/core/runtime/count-step-started-events.d.ts +7 -7
  38. package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +7 -7
  39. package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +2 -2
  40. package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +2 -2
  41. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +30 -49
  42. package/dist/src/compiled/@workflow/core/runtime/quickjs-entrypoint.d.ts +21 -10
  43. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +31 -15
  44. package/dist/src/compiled/@workflow/core/runtime/quickjs-serde.d.ts +10 -10
  45. package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +4 -4
  46. package/dist/src/compiled/@workflow/core/runtime/replay-recovery-reporter.d.ts +1 -1
  47. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +20 -12
  48. package/dist/src/compiled/@workflow/core/runtime/resume-latency.d.ts +37 -30
  49. package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +2 -2
  50. package/dist/src/compiled/@workflow/core/runtime/run.d.ts +22 -5
  51. package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +4 -4
  52. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +3 -3
  53. package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +14 -14
  54. package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +42 -25
  55. package/dist/src/compiled/@workflow/core/runtime/step-ownership.d.ts +6 -6
  56. package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
  57. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +38 -24
  58. package/dist/src/compiled/@workflow/core/runtime/unserializable-step.d.ts +34 -0
  59. package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +2 -2
  60. package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +31 -9
  61. package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +1 -1
  62. package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +20 -9
  63. package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +5 -5
  64. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  65. package/dist/src/compiled/@workflow/core/sealed-box.d.ts +7 -7
  66. package/dist/src/compiled/@workflow/core/serialization/codec-devalue-vm.d.ts +1 -1
  67. package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +1 -1
  68. package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +4 -4
  69. package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +12 -11
  70. package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +7 -7
  71. package/dist/src/compiled/@workflow/core/serialization/format.d.ts +6 -6
  72. package/dist/src/compiled/@workflow/core/serialization/hardened.d.ts +23 -22
  73. package/dist/src/compiled/@workflow/core/serialization/index.d.ts +1 -1
  74. package/dist/src/compiled/@workflow/core/serialization/reducers/class-vm.d.ts +1 -1
  75. package/dist/src/compiled/@workflow/core/serialization/reducers/step-function-vm.d.ts +1 -1
  76. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +5 -5
  77. package/dist/src/compiled/@workflow/core/serialization/workflow-vm.d.ts +1 -1
  78. package/dist/src/compiled/@workflow/core/serialization-format.d.ts +11 -11
  79. package/dist/src/compiled/@workflow/core/serialization.d.ts +18 -19
  80. package/dist/src/compiled/@workflow/core/source-map.d.ts +1 -1
  81. package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +5 -5
  82. package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +3 -3
  83. package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -2
  84. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +71 -20
  85. package/dist/src/compiled/@workflow/core/telemetry.d.ts +15 -3
  86. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  87. package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +9 -11
  88. package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +1 -1
  89. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +1 -1
  90. package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +1 -1
  91. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  92. package/dist/src/compiled/@workflow/errors/index.d.ts +18 -18
  93. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  94. package/dist/src/compiled/@workflow/world/analytics.d.ts +3 -2
  95. package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +28 -0
  96. package/dist/src/compiled/@workflow/world/attributes.d.ts +8 -107
  97. package/dist/src/compiled/@workflow/world/env-config.d.ts +5 -5
  98. package/dist/src/compiled/@workflow/world/event-metadata.d.ts +132 -0
  99. package/dist/src/compiled/@workflow/world/events.d.ts +42 -96
  100. package/dist/src/compiled/@workflow/world/hooks.d.ts +12 -11
  101. package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
  102. package/dist/src/compiled/@workflow/world/interfaces.d.ts +94 -39
  103. package/dist/src/compiled/@workflow/world/queue.d.ts +29 -22
  104. package/dist/src/compiled/@workflow/world/runs.d.ts +20 -0
  105. package/dist/src/compiled/@workflow/world/slot-identity.d.ts +3 -3
  106. package/dist/src/compiled/@workflow/world/spec-version.d.ts +82 -15
  107. package/dist/src/compiled/@workflow/world/ulid.d.ts +2 -2
  108. package/dist/src/compiled/@workflow/world-local/index.js +5 -5
  109. package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
  110. package/dist/src/compiled/_chunks/workflow/{attribute-changes-DXbpwBdw.js → attribute-changes-BwAadFfB.js} +3 -3
  111. package/dist/src/compiled/_chunks/workflow/debug-log-CVPstO1D.js +1 -0
  112. package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +40 -0
  113. package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +3 -0
  114. package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +3 -0
  115. package/dist/src/compiled/_chunks/workflow/global-singleton-BNinwFrL.js +1 -0
  116. package/dist/src/compiled/_chunks/workflow/private-CZFMABEf.js +1 -0
  117. package/dist/src/compiled/_chunks/workflow/resume-hook-BToMtPbH.js +1 -0
  118. package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +1 -0
  119. package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +1 -0
  120. package/dist/src/compiled/_chunks/workflow/undici-DfxNX5og.js +95 -0
  121. package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +15 -0
  122. package/dist/src/compiled/_chunks/workflow/ws-transport-PnVVxT0R.js +1 -0
  123. package/dist/src/eve-channel/index.js +1 -1
  124. package/dist/src/execution/agent-handle-dispatch.js +1 -1
  125. package/dist/src/execution/continuation-conflict-step.d.ts +10 -0
  126. package/dist/src/execution/continuation-conflict-step.js +1 -0
  127. package/dist/src/execution/delegated-parent-notification.js +1 -1
  128. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +7 -29
  129. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
  130. package/dist/src/execution/dispatch-runtime-actions-start.d.ts +33 -0
  131. package/dist/src/execution/dispatch-runtime-actions-start.js +1 -0
  132. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  133. package/dist/src/execution/dispatch-turn-step.js +1 -1
  134. package/dist/src/execution/dynamic-connections.js +1 -1
  135. package/dist/src/execution/inline-turn.js +1 -1
  136. package/dist/src/execution/next-driver-action.d.ts +5 -4
  137. package/dist/src/execution/proxied-deliver-step.js +1 -1
  138. package/dist/src/execution/runtime-errors.d.ts +0 -12
  139. package/dist/src/execution/runtime-errors.js +1 -1
  140. package/dist/src/execution/session-timeout-steps.js +1 -1
  141. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  142. package/dist/src/execution/stable-workflow-names.d.ts +2 -2
  143. package/dist/src/execution/subagent-start-local.js +1 -1
  144. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
  145. package/dist/src/execution/tasks/parent/run-parent.js +1 -1
  146. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  147. package/dist/src/execution/tool-run/start.js +1 -1
  148. package/dist/src/execution/tools/subagent/local.js +1 -1
  149. package/dist/src/execution/turn-workflow.js +1 -1
  150. package/dist/src/execution/workflow-entry.d.ts +5 -1
  151. package/dist/src/execution/workflow-entry.js +1 -1
  152. package/dist/src/execution/workflow-runtime.d.ts +12 -12
  153. package/dist/src/execution/workflow-runtime.js +1 -1
  154. package/dist/src/execution/workflow-steps.js +1 -1
  155. package/dist/src/harness/tool-loop.js +1 -1
  156. package/dist/src/internal/application/package.js +1 -1
  157. package/dist/src/internal/workflow/development-world-client.js +1 -1
  158. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  159. package/dist/src/public/channels/slack/slackChannel.d.ts +7 -1
  160. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  161. package/dist/src/setup/flows/registry.js +1 -1
  162. package/dist/src/setup/scaffold/connections/catalog.js +1 -1
  163. package/dist/src/setup/scaffold/create/project.js +1 -1
  164. package/docs/channels/custom.mdx +4 -0
  165. package/docs/channels/eve.mdx +12 -8
  166. package/docs/channels/mcp.mdx +4 -1
  167. package/docs/guides/instrumentation.md +1 -1
  168. package/docs/install-integrations.mdx +2 -0
  169. package/docs/instructions.mdx +1 -1
  170. package/docs/memory/custom-provider.md +214 -0
  171. package/docs/memory/file.md +129 -0
  172. package/docs/memory/meta.json +5 -0
  173. package/docs/memory/overview.mdx +282 -0
  174. package/docs/patterns/multi-tenant-memory.md +12 -20
  175. package/package.json +8 -8
  176. package/dist/src/compiled/_chunks/workflow/dist-CqvWKNQv.js +0 -3
  177. package/dist/src/compiled/_chunks/workflow/dist-Dk0aQqFO.js +0 -40
  178. package/dist/src/compiled/_chunks/workflow/dist-DpYyXbJv.js +0 -1
  179. package/dist/src/compiled/_chunks/workflow/env-config-L94XftKz.js +0 -1
  180. package/dist/src/compiled/_chunks/workflow/frames-Dl2Hcma4.js +0 -3
  181. package/dist/src/compiled/_chunks/workflow/private-CuQ4HTFC.js +0 -1
  182. package/dist/src/compiled/_chunks/workflow/resume-hook-E-Nkx8q_.js +0 -1
  183. package/dist/src/compiled/_chunks/workflow/run-cIeex2KF.js +0 -1
  184. package/dist/src/compiled/_chunks/workflow/sleep-CxFsdxB_.js +0 -1
  185. package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +0 -1
  186. package/dist/src/compiled/_chunks/workflow/undici-DznrXKcM.js +0 -95
  187. package/dist/src/compiled/_chunks/workflow/wait-until-BZHmJCAW.js +0 -15
  188. package/dist/src/compiled/_chunks/workflow/ws-transport-Ct6yyRWZ.js +0 -1
  189. package/docs/memory.md +0 -408
@@ -3,18 +3,29 @@ type WorldSpecVersionMetadata = Pick<World, 'specVersion'>;
3
3
  /**
4
4
  * Rejects a World this runtime cannot speak to.
5
5
  *
6
- * The accepted range is `[SPEC_VERSION_CURRENT, SPEC_VERSION_MAX_SUPPORTED]`.
7
- * Below the current version means an old World package paired with a new
8
- * runtime, which cannot serve the protocol this runtime speaks. Above the
6
+ * The accepted range is
7
+ * `[SPEC_VERSION_SUPPORTS_SLOT_IDENTITY, SPEC_VERSION_MAX_SUPPORTED]`. Below
8
+ * the floor means an old World package paired with a new runtime, which cannot
9
+ * serve the protocol this runtime speaks. A World that does not number events
10
+ * by position allocates ids the runtime cannot read positions out of. Above the
9
11
  * ceiling means a World built against a newer spec than this runtime knows how
10
12
  * to read.
11
13
  *
12
- * Both bounds are the same version today, so this currently admits exactly one.
13
- * It stays written as a range because the two constants answer different
14
- * questions and come apart while a spec bump is staged: the ceiling rises when
15
- * this runtime learns to read the next version, the floor when that version
16
- * becomes the one Worlds stamp. An equality check against either constant alone
17
- * would reject a World during that window.
14
+ * The floor is deliberately the slot-identity version rather than
15
+ * `SPEC_VERSION_CURRENT`, which now sits one above it at the sealed log. Two
16
+ * reasons, and both are about the window a spec bump is staged over:
17
+ *
18
+ * - `WORKFLOW_SEALED_LOG=0` puts a deployment back on slot identity, so its
19
+ * World declares the lower version. Flooring at the version we stamp by
20
+ * default would make that kill switch reject the very World it selects,
21
+ * turning a rollback into a startup failure.
22
+ * - A World package one version behind the runtime it ships alongside is the
23
+ * normal state mid-bump, and it can still serve the protocol: slot identity
24
+ * is what the runtime actually requires, and sealed logs are a capability on
25
+ * top of it that only the backend implements.
26
+ *
27
+ * The range narrows again when the sealed log becomes mandatory and the flag
28
+ * goes away, exactly as slot identity's own floor did.
18
29
  */
19
30
  export declare function assertWorldSupportsRuntimeProtocol(world: WorldSpecVersionMetadata): void;
20
31
  export {};
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Server-only side-effect module that ensures `world.ts` is loaded so its
3
- * module-load side effect — `globalThis[GetWorldFnKey] ??= getWorld` —
3
+ * module-load side effect (`globalThis[GetWorldFnKey] ??= getWorld`)
4
4
  * fires in host bundles.
5
5
  *
6
6
  * # Why this exists
7
7
  *
8
8
  * `getWorldLazy()` in `./get-world-lazy.ts` checks the globalThis cache
9
9
  * populated by `world.ts`'s module-load side effect. When a server route
10
- * only consumes a helper that goes through `getWorldLazy` — for example
11
- * `start` from `workflow/api`, or `defineHook().resume()` from `workflow`
12
- * — webpack/turbopack can tree-shake the named import `{ getWorld }` out
10
+ * only consumes a helper that goes through `getWorldLazy` (for example
11
+ * `start` from `workflow/api`, or `defineHook().resume()` from `workflow`),
12
+ * webpack/turbopack can tree-shake the named import `{ getWorld }` out
13
13
  * of `runtime.ts`, taking `world.ts`'s module evaluation with it. The
14
14
  * globalThis registration never fires.
15
15
  *
@@ -41,7 +41,7 @@
41
41
  *
42
42
  * If you add another `getWorldLazy()` consumer that's reachable from a
43
43
  * host route without going through `workflow` or `workflow/api`, make
44
- * sure that entry also imports this module — or that it transitively
44
+ * sure that entry also imports this module, or that it transitively
45
45
  * reaches `world.ts` via a non-tree-shakeable path. Adding a regression
46
46
  * test in `world-init.test.ts` is preferred to relying on careful manual
47
47
  * tracing.