@demlik/tea 0.11.0 → 0.13.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 (163) hide show
  1. package/dist/agent/index.d.ts +6 -5
  2. package/dist/agent/index.js +11 -11
  3. package/dist/authed-call/index.d.ts +3 -2
  4. package/dist/authed-call/index.js +7 -7
  5. package/dist/await-terminal/index.d.ts +3 -2
  6. package/dist/await-terminal/index.js +2 -2
  7. package/dist/batch-window/index.d.ts +4 -3
  8. package/dist/batch-window/index.js +3 -3
  9. package/dist/cache/index.d.ts +3 -2
  10. package/dist/cache/index.js +4 -4
  11. package/dist/chart/index.d.ts +4 -3
  12. package/dist/chart/index.js +2 -2
  13. package/dist/chart/inspect/index.d.ts +5 -4
  14. package/dist/chart/inspect/index.js +3 -3
  15. package/dist/chart/inspect/react.d.ts +6 -5
  16. package/dist/chart/inspect/react.js +5 -5
  17. package/dist/chart/lane/index.d.ts +7 -6
  18. package/dist/chart/lane/index.js +6 -6
  19. package/dist/chart/lane/react.d.ts +6 -5
  20. package/dist/chart/lane/react.js +7 -7
  21. package/dist/chart/lane/viewer/assets/{chunk-5RXB4S5H-IPzIfiJ6.js → chunk-5RXB4S5H-CcNtpUd7.js} +1 -1
  22. package/dist/chart/lane/viewer/assets/{classDiagram-v2-OCEON4UE-DnUXz1Pv.js → classDiagram-v2-OCEON4UE-D4uAiFr8.js} +1 -1
  23. package/dist/chart/lane/viewer/assets/{dagre-VZM6K2ZE-Og2UIoWg.js → dagre-VZM6K2ZE-831qZcA8.js} +1 -1
  24. package/dist/chart/lane/viewer/assets/{index-sP-6AD57.css → index-9SkH5NA3.css} +1 -1
  25. package/dist/chart/lane/viewer/assets/{index-Obj05Jex.js → index-Bgt4sXpW.js} +4 -4
  26. package/dist/chart/lane/viewer/assets/{kanban-definition-27J2QSJJ-CxkCxJUN.js → kanban-definition-27J2QSJJ-G7PaPzy-.js} +1 -1
  27. package/dist/chart/lane/viewer/assets/{mindmap-definition-FAOFIHXS-DvgvXZhp.js → mindmap-definition-FAOFIHXS-CGj9nrVk.js} +1 -1
  28. package/dist/chart/lane/viewer/assets/{stateDiagram-OKZ733FA-CIZQWK5X.js → stateDiagram-OKZ733FA-B_88AzBS.js} +1 -1
  29. package/dist/chart/lane/viewer/assets/{stateDiagram-v2-UEYNNEHI-Sm6p0NoR.js → stateDiagram-v2-UEYNNEHI-CR5gcgq6.js} +1 -1
  30. package/dist/chart/lane/viewer/assets/{timeline-definition-Z64GVDOM-CV3KwSb-.js → timeline-definition-Z64GVDOM-CCv52MfY.js} +1 -1
  31. package/dist/chart/lane/viewer/index.html +2 -2
  32. package/dist/chart/report/index.d.ts +5 -4
  33. package/dist/chart/report/index.js +4 -4
  34. package/dist/{chunk-ZF6WDK2D.js → chunk-3I52QZZ5.js} +7 -7
  35. package/dist/{chunk-ZF6WDK2D.js.map → chunk-3I52QZZ5.js.map} +1 -1
  36. package/dist/{chunk-ZD6PNZBK.js → chunk-3ZAFFRRB.js} +3 -3
  37. package/dist/{chunk-ZD6PNZBK.js.map → chunk-3ZAFFRRB.js.map} +1 -1
  38. package/dist/{chunk-4KTWLPL5.js → chunk-4EQZ76JC.js} +3 -3
  39. package/dist/{chunk-4KTWLPL5.js.map → chunk-4EQZ76JC.js.map} +1 -1
  40. package/dist/{chunk-EUF7XOEE.js → chunk-4KLG43GY.js} +6 -6
  41. package/dist/{chunk-EUF7XOEE.js.map → chunk-4KLG43GY.js.map} +1 -1
  42. package/dist/{chunk-JER5O7PQ.js → chunk-7FRZ2CT2.js} +15 -7
  43. package/dist/chunk-7FRZ2CT2.js.map +1 -0
  44. package/dist/{chunk-ZCL7SCBK.js → chunk-CIQG5L42.js} +5 -5
  45. package/dist/{chunk-ZCL7SCBK.js.map → chunk-CIQG5L42.js.map} +1 -1
  46. package/dist/{chunk-TP5UPGLY.js → chunk-CLM6ERNO.js} +3 -3
  47. package/dist/{chunk-TP5UPGLY.js.map → chunk-CLM6ERNO.js.map} +1 -1
  48. package/dist/{chunk-ND3DH6KM.js → chunk-COS5MSTO.js} +3 -3
  49. package/dist/{chunk-ND3DH6KM.js.map → chunk-COS5MSTO.js.map} +1 -1
  50. package/dist/{chunk-JP5D6GSL.js → chunk-CRPZJVD2.js} +4 -4
  51. package/dist/{chunk-JP5D6GSL.js.map → chunk-CRPZJVD2.js.map} +1 -1
  52. package/dist/{chunk-SUST46KO.js → chunk-D62FDQKE.js} +3 -3
  53. package/dist/{chunk-SUST46KO.js.map → chunk-D62FDQKE.js.map} +1 -1
  54. package/dist/{chunk-JGVL3WPL.js → chunk-DGE4PV4A.js} +3 -3
  55. package/dist/{chunk-JGVL3WPL.js.map → chunk-DGE4PV4A.js.map} +1 -1
  56. package/dist/{chunk-WLGO64WC.js → chunk-DMYGQB4O.js} +4 -4
  57. package/dist/{chunk-WLGO64WC.js.map → chunk-DMYGQB4O.js.map} +1 -1
  58. package/dist/{chunk-A56OR5RF.js → chunk-L57ZOT5K.js} +3 -3
  59. package/dist/{chunk-A56OR5RF.js.map → chunk-L57ZOT5K.js.map} +1 -1
  60. package/dist/{chunk-5KJKJOFC.js → chunk-NR7BU22N.js} +3 -3
  61. package/dist/{chunk-5KJKJOFC.js.map → chunk-NR7BU22N.js.map} +1 -1
  62. package/dist/{chunk-7V4EVLZA.js → chunk-O4MVQTEJ.js} +4 -4
  63. package/dist/{chunk-7V4EVLZA.js.map → chunk-O4MVQTEJ.js.map} +1 -1
  64. package/dist/{chunk-B5VXOFMZ.js → chunk-OOYD44JI.js} +54 -3
  65. package/dist/chunk-OOYD44JI.js.map +1 -0
  66. package/dist/{chunk-7SVIRMC6.js → chunk-RH5EFRVJ.js} +3 -3
  67. package/dist/{chunk-7SVIRMC6.js.map → chunk-RH5EFRVJ.js.map} +1 -1
  68. package/dist/{chunk-3JU6657S.js → chunk-VYFAZN3F.js} +3 -3
  69. package/dist/{chunk-3JU6657S.js.map → chunk-VYFAZN3F.js.map} +1 -1
  70. package/dist/chunk-XGELA764.js +163 -0
  71. package/dist/chunk-XGELA764.js.map +1 -0
  72. package/dist/{chunk-I5OV65MS.js → chunk-YUXP55T2.js} +3 -3
  73. package/dist/{chunk-I5OV65MS.js.map → chunk-YUXP55T2.js.map} +1 -1
  74. package/dist/{chunk-E6GEDSF4.js → chunk-YWIKDKHY.js} +3 -3
  75. package/dist/{chunk-E6GEDSF4.js.map → chunk-YWIKDKHY.js.map} +1 -1
  76. package/dist/{chunk-5EHLEUTL.js → chunk-ZSUUOEPL.js} +51 -6
  77. package/dist/chunk-ZSUUOEPL.js.map +1 -0
  78. package/dist/{core-Bjc0bS8j.d.ts → core-Co0LWkIA.d.ts} +190 -3
  79. package/dist/deadline/index.d.ts +3 -2
  80. package/dist/deadline/index.js +3 -3
  81. package/dist/do/index.d.ts +12 -8
  82. package/dist/do/index.js +11 -11
  83. package/dist/do/index.js.map +1 -1
  84. package/dist/{durable-effects-D8SqU_if.d.ts → durable-effects-C6uwzjb5.d.ts} +1 -1
  85. package/dist/extension/index.d.ts +3 -2
  86. package/dist/extension/index.js +3 -3
  87. package/dist/extension/react.js +3 -3
  88. package/dist/extension/subs/index.d.ts +3 -2
  89. package/dist/fan-out/index.d.ts +3 -2
  90. package/dist/{fold-Blbhru48.d.ts → fold-BJPdjc9w.d.ts} +1 -1
  91. package/dist/{graph-CcjWZVrd.d.ts → graph-B3L5e0N1.d.ts} +1 -1
  92. package/dist/idempotent-intake/index.d.ts +3 -2
  93. package/dist/index.d.ts +14 -6
  94. package/dist/index.js +2 -2
  95. package/dist/journal/index.d.ts +373 -0
  96. package/dist/journal/index.js +3 -0
  97. package/dist/journal/index.js.map +1 -0
  98. package/dist/llm-call/index.d.ts +3 -2
  99. package/dist/llm-call/index.js +8 -8
  100. package/dist/{machine-0OmPvsy_.d.ts → machine-BtFWQmmq.d.ts} +1 -1
  101. package/dist/machine-viz/index.d.ts +2 -1
  102. package/dist/machine-viz/index.js +2 -2
  103. package/dist/mem/index.d.ts +3 -2
  104. package/dist/monitored-run/index.d.ts +4 -3
  105. package/dist/monitored-run/index.js +5 -5
  106. package/dist/node/index.d.ts +31 -3
  107. package/dist/node/index.js +92 -3
  108. package/dist/node/index.js.map +1 -1
  109. package/dist/paginated-walk/index.d.ts +3 -2
  110. package/dist/paginated-walk/index.js +7 -7
  111. package/dist/parity/index.d.ts +3 -2
  112. package/dist/parity/index.js +3 -3
  113. package/dist/pbt/arbitraries/index.d.ts +2 -1
  114. package/dist/pbt/index.d.ts +2 -1
  115. package/dist/pbt/index.js +3 -3
  116. package/dist/pbt/runners/index.d.ts +2 -1
  117. package/dist/pbt/runners/index.js +3 -3
  118. package/dist/poller/index.d.ts +3 -2
  119. package/dist/poller/index.js +3 -3
  120. package/dist/prediction/index.d.ts +2 -1
  121. package/dist/prediction/index.js +2 -2
  122. package/dist/pure/index.d.ts +2 -1
  123. package/dist/pure/index.js +2 -2
  124. package/dist/react/index.d.ts +4 -3
  125. package/dist/react/index.js +2 -2
  126. package/dist/react/index.js.map +1 -1
  127. package/dist/reconciler/index.d.ts +3 -2
  128. package/dist/reconciler/index.js +7 -7
  129. package/dist/recorder/index.d.ts +3 -2
  130. package/dist/{reducer-BqyoVyBG.d.ts → reducer-4GNR6b8B.d.ts} +2 -2
  131. package/dist/resilient-call/index.d.ts +3 -2
  132. package/dist/resilient-call/index.js +6 -6
  133. package/dist/{run-BVeqJDBF.d.ts → run-pAcmBpah.d.ts} +3 -3
  134. package/dist/{runtime-types-Bxc637bp.d.ts → runtime-types-CNLmhWif.d.ts} +17 -2
  135. package/dist/saga/index.d.ts +3 -2
  136. package/dist/{samples-DCt6nF8H.d.ts → samples-B3My5oh2.d.ts} +1 -1
  137. package/dist/snapshot/index.d.ts +2 -1
  138. package/dist/snapshot/index.js +3 -3
  139. package/dist/subs/index.d.ts +4 -3
  140. package/dist/subs/index.js +3 -3
  141. package/dist/testing/index.d.ts +3 -2
  142. package/dist/testing/index.js +2 -2
  143. package/dist/throttled-input/index.d.ts +3 -2
  144. package/dist/throttled-input/index.js +6 -6
  145. package/dist/token-refresh/index.d.ts +2 -1
  146. package/dist/token-refresh/index.js +3 -3
  147. package/dist/trace-replay/index.d.ts +3 -2
  148. package/dist/trace-replay/index.js +3 -3
  149. package/dist/{types-D7u9DkH7.d.ts → types-XS_miRnB.d.ts} +1 -1
  150. package/dist/with-deadline/index.d.ts +2 -1
  151. package/dist/with-deadline/index.js +2 -2
  152. package/dist/with-resilience/index.d.ts +3 -2
  153. package/dist/with-resilience/index.js +6 -6
  154. package/dist/with-telemetry/index.d.ts +2 -1
  155. package/dist/with-telemetry/index.js +2 -2
  156. package/dist/work-queue/adapter.d.ts +3 -2
  157. package/dist/work-queue/index.d.ts +3 -2
  158. package/dist/work-queue/ops.d.ts +3 -2
  159. package/dist/workflow/index.d.ts +4 -3
  160. package/package.json +11 -4
  161. package/dist/chunk-5EHLEUTL.js.map +0 -1
  162. package/dist/chunk-B5VXOFMZ.js.map +0 -1
  163. package/dist/chunk-JER5O7PQ.js.map +0 -1
@@ -1,14 +1,14 @@
1
- export { createResilientCall, liftResilience } from '../chunk-EUF7XOEE.js';
1
+ export { createResilientCall, liftResilience } from '../chunk-4KLG43GY.js';
2
2
  import '../chunk-JELSZN25.js';
3
- export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
3
+ import '../chunk-RH5EFRVJ.js';
4
+ export { deadlineSub, subscribeDeadline } from '../chunk-DGE4PV4A.js';
4
5
  import '../chunk-Q2UM7BXU.js';
5
6
  import '../chunk-S2EGRPCM.js';
6
7
  import '../chunk-UF4MZSLT.js';
7
- import '../chunk-7SVIRMC6.js';
8
- import '../chunk-3JU6657S.js';
8
+ import '../chunk-VYFAZN3F.js';
9
9
  import '../chunk-2YFLOCWX.js';
10
10
  import '../chunk-ZJ5AOYBH.js';
11
- import '../chunk-5EHLEUTL.js';
12
- import '../chunk-B5VXOFMZ.js';
11
+ import '../chunk-ZSUUOEPL.js';
12
+ import '../chunk-OOYD44JI.js';
13
13
  //# sourceMappingURL=index.js.map
14
14
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- import { C as Cmd, R as Reducer } from './core-Bjc0bS8j.js';
1
+ import { C as Cmd, c as Reducer } from './core-Co0LWkIA.js';
2
2
  import { Parts } from './chart/index.js';
3
- import { E as EventName, c as StateName, C as Chart, d as Strict, T as Total, e as CellEdgeKey, f as InitialState, g as Ty, h as SuccessFinal, i as ErrorFinal, S as StateOf, a as CmdOf, M as MsgOf, j as MsgIn } from './graph-CcjWZVrd.js';
4
- import { I as ImportedLane, a as ImportedChart, P as PhaseStanding } from './fold-Blbhru48.js';
3
+ import { E as EventName, c as StateName, C as Chart, d as Strict, T as Total, e as CellEdgeKey, f as InitialState, g as Ty, h as SuccessFinal, i as ErrorFinal, S as StateOf, a as CmdOf, M as MsgOf, j as MsgIn } from './graph-B3L5e0N1.js';
4
+ import { I as ImportedLane, a as ImportedChart, P as PhaseStanding } from './fold-BJPdjc9w.js';
5
5
 
6
6
  /** The shape a lane task's chart has at EITHER door. */
7
7
  interface LaneRegion {
@@ -1,5 +1,5 @@
1
1
  import { Result } from 'better-result';
2
- import { a as Port, N as NoCellError, C as Cmd, R as Reducer, S as Sub, M as Machine, T as Transitions, U as UpdateForm, c as InterpretDetached, P as PortEmitter } from './core-Bjc0bS8j.js';
2
+ import { a as Port, N as NoCellError, C as Cmd, c as Reducer, A as AnyCmdDef, S as Sub, M as Machine, d as Settled, e as CmdOf, T as Transitions, f as NeedsOf, P as PortEmitter, O as OkOf, E as ErrOf, U as UpdateForm, g as InterpretDetached } from './core-Co0LWkIA.js';
3
3
 
4
4
  /**
5
5
  * @demlik/tea runtime interface surface + pure helpers — the public types,
@@ -409,6 +409,20 @@ interface Runtime<S, M extends {
409
409
  */
410
410
  done(): Promise<S>;
411
411
  }
412
+ declare function defineMachine<S, M extends {
413
+ type: string;
414
+ }, D extends AnyCmdDef, U extends Sub, Ctx>(m: Omit<Machine<S, M | Settled<D>, CmdOf<D>, U, Ctx>, "update" | "cmds"> & {
415
+ readonly cmds: readonly D[];
416
+ update: [S] extends [{
417
+ type: string;
418
+ }] ? Transitions<S, M | Settled<D>, CmdOf<D>> : never;
419
+ }): Machine<S, M | Settled<D>, CmdOf<D>, U, Ctx>;
420
+ declare function defineMachine<S, M extends {
421
+ type: string;
422
+ }, D extends AnyCmdDef, U extends Sub, Ctx>(m: Omit<Machine<S, M | Settled<D>, CmdOf<D>, U, Ctx>, "update" | "cmds"> & {
423
+ readonly cmds: readonly D[];
424
+ update: Reducer<S, M | Settled<D>, CmdOf<D>>;
425
+ }): Machine<S, M | Settled<D>, CmdOf<D>, U, Ctx>;
412
426
  declare function defineMachine<S, M extends {
413
427
  type: string;
414
428
  }, C extends Cmd, U extends Sub, Ctx>(m: Omit<Machine<S, M, C, U, Ctx>, "update"> & {
@@ -497,6 +511,7 @@ declare function tryFoldMsgs<S, M extends {
497
511
  update: object;
498
512
  __form?: UpdateForm;
499
513
  }, base: S, msgs: readonly M[]): Result<S, FoldRefusal<M>>;
514
+ declare function settle<D extends AnyCmdDef, Ctx>(def: D, work: (cmd: CmdOf<D>, ctx: Ctx & NeedsOf<CmdOf<D>> & PortEmitter) => Promise<Result<OkOf<D>, ErrOf<D>>>): (cmd: CmdOf<D>, ctx: Ctx & NeedsOf<CmdOf<D>> & PortEmitter) => Promise<Settled<D>>;
500
515
  declare function tryInterpret<C extends Cmd, Ok, M, Ctx>(work: (cmd: C, ctx: Ctx) => Promise<Ok>, onOk: (value: Ok, cmd: C) => M, onErr: (error: unknown, cmd: C) => M): (cmd: C, ctx: Ctx) => Promise<M>;
501
516
 
502
- export { type BootingRuntime as B, type CtxArg as C, DispatchDiscardedError as D, type FoldRefusal as F, IdentityDropNotice as I, type OnError as O, PortNameCollisionError as P, QuiescenceTimeoutError as Q, type Runtime as R, type Store as S, __resetPortRegistry as _, type Supervision as a, type Branded as b, type DispatchSettle as c, DisposeTimeoutNotice as d, RuntimeDiscardNotice as e, RuntimeDiscardedError as f, type RuntimeErrorContext as g, type RuntimeErrorPhase as h, type RuntimeRef as i, type Schema as j, SubIdCollisionError as k, type SupervisionStrategy as l, absurd as m, asReducer as n, defineMachine as o, definePort as p, noop as q, replay as r, schemaMigrate as s, tryApplyCell as t, tryFoldMsgs as u, tryInterpret as v, wrapDetached as w };
517
+ export { type BootingRuntime as B, type CtxArg as C, DispatchDiscardedError as D, type FoldRefusal as F, IdentityDropNotice as I, type OnError as O, PortNameCollisionError as P, QuiescenceTimeoutError as Q, type Runtime as R, type Store as S, __resetPortRegistry as _, type Supervision as a, type Branded as b, type DispatchSettle as c, DisposeTimeoutNotice as d, RuntimeDiscardNotice as e, RuntimeDiscardedError as f, type RuntimeErrorContext as g, type RuntimeErrorPhase as h, type RuntimeRef as i, type Schema as j, SubIdCollisionError as k, type SupervisionStrategy as l, absurd as m, asReducer as n, defineMachine as o, definePort as p, noop as q, replay as r, schemaMigrate as s, settle as t, tryApplyCell as u, tryFoldMsgs as v, tryInterpret as w, wrapDetached as x };
@@ -1,6 +1,7 @@
1
- import { C as Cmd } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd } from '../core-Co0LWkIA.js';
2
2
  import { QueueItem } from '../work-queue/index.js';
3
- import '../runtime-types-Bxc637bp.js';
3
+ import 'zod';
4
+ import '../runtime-types-CNLmhWif.js';
4
5
  import 'better-result';
5
6
 
6
7
  /**
@@ -1,4 +1,4 @@
1
- import { M as MsgOf, E as EventName } from './graph-CcjWZVrd.js';
1
+ import { M as MsgOf, E as EventName } from './graph-B3L5e0N1.js';
2
2
 
3
3
  type Narrow<U, K> = Extract<U, {
4
4
  type: K;
@@ -1,4 +1,5 @@
1
- import { C as Cmd, I as Interpret } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, I as Interpret } from '../core-Co0LWkIA.js';
2
+ import 'zod';
2
3
 
3
4
  /**
4
5
  * @demlik/tea/snapshot — periodic state checkpoint to a host store (R2/KV-shaped).
@@ -1,5 +1,5 @@
1
- export { createSnapshot, snapshotFailed, snapshotLoadFailed, snapshotLoaded, snapshotSaved } from '../chunk-7V4EVLZA.js';
2
- import '../chunk-5EHLEUTL.js';
3
- import '../chunk-B5VXOFMZ.js';
1
+ export { createSnapshot, snapshotFailed, snapshotLoadFailed, snapshotLoaded, snapshotSaved } from '../chunk-O4MVQTEJ.js';
2
+ import '../chunk-ZSUUOEPL.js';
3
+ import '../chunk-OOYD44JI.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- import { S as Sub, a as Port, e as Dispose, D as DepKeyedSub, b as SubId } from '../core-Bjc0bS8j.js';
2
- import { S as SubscribeHandler } from '../types-D7u9DkH7.js';
3
- import { R as Runtime } from '../runtime-types-Bxc637bp.js';
1
+ import { S as Sub, a as Port, l as Dispose, D as DepKeyedSub, b as SubId } from '../core-Co0LWkIA.js';
2
+ import { S as SubscribeHandler } from '../types-XS_miRnB.js';
3
+ import { R as Runtime } from '../runtime-types-CNLmhWif.js';
4
+ import 'zod';
4
5
  import 'better-result';
5
6
 
6
7
  /**
@@ -1,7 +1,7 @@
1
- export { combineManagedResources, defineListener, defineManagedResource, fromBroadcastChannel, fromEventSource, fromEventTarget, fromInterval, fromPort, fromReconnectingWebSocket, fromTransport, fromWebSocket } from '../chunk-3JU6657S.js';
1
+ export { combineManagedResources, defineListener, defineManagedResource, fromBroadcastChannel, fromEventSource, fromEventTarget, fromInterval, fromPort, fromReconnectingWebSocket, fromTransport, fromWebSocket } from '../chunk-VYFAZN3F.js';
2
2
  export { fromTimeout } from '../chunk-2YFLOCWX.js';
3
3
  import '../chunk-ZJ5AOYBH.js';
4
- import '../chunk-5EHLEUTL.js';
5
- import '../chunk-B5VXOFMZ.js';
4
+ import '../chunk-ZSUUOEPL.js';
5
+ import '../chunk-OOYD44JI.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,6 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
2
- import { R as Runtime } from '../runtime-types-Bxc637bp.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
2
+ import { R as Runtime } from '../runtime-types-CNLmhWif.js';
3
+ import 'zod';
3
4
  import 'better-result';
4
5
 
5
6
  /**
@@ -1,5 +1,5 @@
1
- import { replay } from '../chunk-5EHLEUTL.js';
2
- import '../chunk-B5VXOFMZ.js';
1
+ import { replay } from '../chunk-ZSUUOEPL.js';
2
+ import '../chunk-OOYD44JI.js';
3
3
  import { expect, vi } from 'vitest';
4
4
 
5
5
  function assertWrapperFaithful(base, makeWrapped, opts) {
@@ -1,10 +1,11 @@
1
1
  import { TtlCache } from '../cache/index.js';
2
2
  import { DeadlineSub } from '../deadline/index.js';
3
3
  export { DeadlineExceeded as ThrottledInputSettled, subscribeDeadline as subscribeThrottledInput, deadlineExceeded as throttledInputSettled } from '../deadline/index.js';
4
- import { C as Cmd, S as Sub } from '../core-Bjc0bS8j.js';
4
+ import { C as Cmd, S as Sub } from '../core-Co0LWkIA.js';
5
5
  export { Debounced, debounce } from '../debounce/index.js';
6
6
  export { Throttled, throttle } from '../throttle/index.js';
7
- import '../types-D7u9DkH7.js';
7
+ import '../types-XS_miRnB.js';
8
+ import 'zod';
8
9
 
9
10
  /**
10
11
  * @demlik/tea/throttled-input — gate a high-frequency input stream into a
@@ -1,13 +1,13 @@
1
1
  export { debounce } from '../chunk-J6527VRQ.js';
2
2
  export { throttle } from '../chunk-HCEVHFJ7.js';
3
- import { deadlineSub } from '../chunk-JGVL3WPL.js';
4
- export { subscribeDeadline as subscribeThrottledInput, deadlineExceeded as throttledInputSettled } from '../chunk-JGVL3WPL.js';
5
- import { initCache, get, set } from '../chunk-7SVIRMC6.js';
6
- import '../chunk-3JU6657S.js';
3
+ import { initCache, get, set } from '../chunk-RH5EFRVJ.js';
4
+ import { deadlineSub } from '../chunk-DGE4PV4A.js';
5
+ export { subscribeDeadline as subscribeThrottledInput, deadlineExceeded as throttledInputSettled } from '../chunk-DGE4PV4A.js';
6
+ import '../chunk-VYFAZN3F.js';
7
7
  import '../chunk-2YFLOCWX.js';
8
8
  import '../chunk-ZJ5AOYBH.js';
9
- import '../chunk-5EHLEUTL.js';
10
- import '../chunk-B5VXOFMZ.js';
9
+ import '../chunk-ZSUUOEPL.js';
10
+ import '../chunk-OOYD44JI.js';
11
11
 
12
12
  // src/throttled-input/index.ts
13
13
  var DEFAULT_SUB_ID = "throttled-input:settle";
@@ -1,5 +1,6 @@
1
- import { C as Cmd, I as Interpret } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, I as Interpret } from '../core-Co0LWkIA.js';
2
2
  import { M as MsgType } from '../protocol-B5YmJr0d.js';
3
+ import 'zod';
3
4
 
4
5
  /**
5
6
  * @demlik/tea/token-refresh — a credential's lifecycle as pure state + verbs,
@@ -1,6 +1,6 @@
1
- export { createTokenRefresh, initTokenRefresh, refreshTokenCmd, tokenRefreshFailedMsg, tokenRefreshedMsg } from '../chunk-TP5UPGLY.js';
1
+ export { createTokenRefresh, initTokenRefresh, refreshTokenCmd, tokenRefreshFailedMsg, tokenRefreshedMsg } from '../chunk-CLM6ERNO.js';
2
2
  import '../chunk-JELSZN25.js';
3
- import '../chunk-5EHLEUTL.js';
4
- import '../chunk-B5VXOFMZ.js';
3
+ import '../chunk-ZSUUOEPL.js';
4
+ import '../chunk-OOYD44JI.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
2
2
  import { Trace } from '../recorder/index.js';
3
- import '../runtime-types-Bxc637bp.js';
3
+ import 'zod';
4
+ import '../runtime-types-CNLmhWif.js';
4
5
  import 'better-result';
5
6
 
6
7
  /**
@@ -1,6 +1,6 @@
1
- export { deepEqual, replayTrace } from '../chunk-SUST46KO.js';
1
+ export { deepEqual, replayTrace } from '../chunk-D62FDQKE.js';
2
+ import '../chunk-ZSUUOEPL.js';
3
+ import '../chunk-OOYD44JI.js';
2
4
  import '../chunk-EWJP3YYP.js';
3
- import '../chunk-5EHLEUTL.js';
4
- import '../chunk-B5VXOFMZ.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { S as Sub } from './core-Bjc0bS8j.js';
1
+ import { S as Sub } from './core-Co0LWkIA.js';
2
2
 
3
3
  type SubscribeHandler<S extends Sub, M, Ctx> = (sub: S, ctx: Ctx, dispatch: (msg: M) => void) => () => void;
4
4
 
@@ -1,4 +1,5 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
2
+ import 'zod';
2
3
 
3
4
  /**
4
5
  * @demlik/tea/with-deadline — auto-fail a wrapped machine at T+N, re-arm on
@@ -1,6 +1,6 @@
1
1
  import { fromTimeout } from '../chunk-2YFLOCWX.js';
2
- import '../chunk-5EHLEUTL.js';
3
- import { msgKeysOf, applyCell, subId } from '../chunk-B5VXOFMZ.js';
2
+ import '../chunk-ZSUUOEPL.js';
3
+ import { msgKeysOf, applyCell, subId } from '../chunk-OOYD44JI.js';
4
4
 
5
5
  // src/with-deadline/index.ts
6
6
  function deadlineExceededMsg(seq) {
@@ -1,7 +1,8 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
2
2
  import { ResilientConfig, ResilientState } from '../resilient-call/index.js';
3
+ import 'zod';
3
4
  import '../cache/index.js';
4
- import '../types-D7u9DkH7.js';
5
+ import '../types-XS_miRnB.js';
5
6
  import '../circuit-breaker/index.js';
6
7
  import '../deadline/index.js';
7
8
  import '../protocol-B5YmJr0d.js';
@@ -1,15 +1,15 @@
1
- import { createResilientCall } from '../chunk-EUF7XOEE.js';
1
+ import { createResilientCall } from '../chunk-4KLG43GY.js';
2
2
  import { MsgType } from '../chunk-JELSZN25.js';
3
- import { subscribeDeadline } from '../chunk-JGVL3WPL.js';
3
+ import '../chunk-RH5EFRVJ.js';
4
+ import { subscribeDeadline } from '../chunk-DGE4PV4A.js';
4
5
  import '../chunk-Q2UM7BXU.js';
5
6
  import '../chunk-S2EGRPCM.js';
6
7
  import '../chunk-UF4MZSLT.js';
7
- import '../chunk-7SVIRMC6.js';
8
- import '../chunk-3JU6657S.js';
8
+ import '../chunk-VYFAZN3F.js';
9
9
  import '../chunk-2YFLOCWX.js';
10
10
  import '../chunk-ZJ5AOYBH.js';
11
- import { tryInterpret } from '../chunk-5EHLEUTL.js';
12
- import { msgKeysOf, applyCell, subId, formOf } from '../chunk-B5VXOFMZ.js';
11
+ import { tryInterpret } from '../chunk-ZSUUOEPL.js';
12
+ import { msgKeysOf, applyCell, subId, formOf } from '../chunk-OOYD44JI.js';
13
13
 
14
14
  // src/with-resilience/index.ts
15
15
  var RC_RETRY_PREFIX = "resilient:retry:";
@@ -1,4 +1,5 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Co0LWkIA.js';
2
+ import 'zod';
2
3
 
3
4
  /**
4
5
  * @demlik/tea/with-telemetry — the pattern-setting wrapper of the wrapper tier.
@@ -1,5 +1,5 @@
1
- import '../chunk-5EHLEUTL.js';
2
- import { msgKeysOf, applyCell } from '../chunk-B5VXOFMZ.js';
1
+ import '../chunk-ZSUUOEPL.js';
2
+ import { msgKeysOf, applyCell } from '../chunk-OOYD44JI.js';
3
3
 
4
4
  // src/with-telemetry/index.ts
5
5
  function withTelemetry(base, config = {}) {
@@ -1,7 +1,8 @@
1
1
  import { QueueItem } from './index.js';
2
- import '../runtime-types-Bxc637bp.js';
2
+ import '../runtime-types-CNLmhWif.js';
3
3
  import 'better-result';
4
- import '../core-Bjc0bS8j.js';
4
+ import '../core-Co0LWkIA.js';
5
+ import 'zod';
5
6
 
6
7
  /**
7
8
  * @demlik/tea/work-queue/adapter — the verb seam over the pure queue ops.
@@ -1,6 +1,7 @@
1
- import { S as Store } from '../runtime-types-Bxc637bp.js';
1
+ import { S as Store } from '../runtime-types-CNLmhWif.js';
2
2
  import 'better-result';
3
- import '../core-Bjc0bS8j.js';
3
+ import '../core-Co0LWkIA.js';
4
+ import 'zod';
4
5
 
5
6
  /**
6
7
  * @packageDocumentation
@@ -1,7 +1,8 @@
1
1
  import { QueueItem } from './index.js';
2
- import '../runtime-types-Bxc637bp.js';
2
+ import '../runtime-types-CNLmhWif.js';
3
3
  import 'better-result';
4
- import '../core-Bjc0bS8j.js';
4
+ import '../core-Co0LWkIA.js';
5
+ import 'zod';
5
6
 
6
7
  /**
7
8
  * Pure queue-lifecycle ops over `QueueItem<I>[]` — the BLESSED delegation
@@ -1,6 +1,7 @@
1
- import { D as DeliveryId, E as EffectLedgerEvent } from '../durable-effects-D8SqU_if.js';
2
- export { a as EffectConfirmed, b as EffectOwed, e as emptyLedger } from '../durable-effects-D8SqU_if.js';
3
- import { C as Cmd } from '../core-Bjc0bS8j.js';
1
+ import { D as DeliveryId, E as EffectLedgerEvent } from '../durable-effects-C6uwzjb5.js';
2
+ export { a as EffectConfirmed, b as EffectOwed, e as emptyLedger } from '../durable-effects-C6uwzjb5.js';
3
+ import { C as Cmd } from '../core-Co0LWkIA.js';
4
+ import 'zod';
4
5
 
5
6
  declare function routeWorkflowMsg<A, R, F>(wf: Workflow<A, R, F>, state: WorkflowState<A, R, F>, msg: WorkflowMsg<R, F>): WorkflowReducerStep<A, R, F>;
6
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demlik/tea",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "TEA-faithful state machine substrate — one package, every host adapter. Core + subs + testing, plus React, Durable Object, Chrome extension, Node, in-memory, work-queue, devtools, and property-testing modules as subpaths.",
5
5
  "keywords": [
6
6
  "tea",
@@ -47,6 +47,10 @@
47
47
  "types": "./dist/mem/index.d.ts",
48
48
  "import": "./dist/mem/index.js"
49
49
  },
50
+ "./journal": {
51
+ "types": "./dist/journal/index.d.ts",
52
+ "import": "./dist/journal/index.js"
53
+ },
50
54
  "./react": {
51
55
  "types": "./dist/react/index.d.ts",
52
56
  "import": "./dist/react/index.js"
@@ -281,7 +285,8 @@
281
285
  "./package.json": "./package.json"
282
286
  },
283
287
  "dependencies": {
284
- "better-result": "^2.5.2"
288
+ "better-result": "^2.5.2",
289
+ "zod": "^4.5.4"
285
290
  },
286
291
  "peerDependencies": {
287
292
  "fast-check": "^3 || ^4",
@@ -311,7 +316,7 @@
311
316
  "@biomejs/biome": "2.3.14",
312
317
  "@changesets/cli": "^2.27.11",
313
318
  "@cloudflare/workers-types": "4.20260312.1",
314
- "@kampus/fabrika-cli": "0.3.0",
319
+ "@kampus/fabrika-cli": "0.5.0",
315
320
  "@types/chrome": "^0.1.42",
316
321
  "@types/node": "^22",
317
322
  "@types/react": "19.0.8",
@@ -342,12 +347,14 @@
342
347
  "scripts": {
343
348
  "build": "NODE_OPTIONS=--max-old-space-size=8192 tsup && node build-viewer.mjs",
344
349
  "lint": "biome check src package.json",
350
+ "lint:worktree": "biome check src package.json",
345
351
  "test": "vitest run",
346
352
  "demo:saga": "vitest run src/workflow/demo.test.ts",
347
353
  "lane:view": "vite --config demo/lane-view/vite.config.ts",
354
+ "lane:watch": "node --experimental-strip-types --disable-warning=ExperimentalWarning scripts/lane-watch.ts",
348
355
  "typecheck": "tsc --noEmit",
349
356
  "typecheck:test": "tsc --noEmit -p tsconfig.test.json",
350
- "typecheck:examples": "tsc -p examples/tsconfig.json",
357
+ "typecheck:consumers": "tsc -p tsconfig.consumers.json",
351
358
  "docs:reference": "TEA_DOCS_WRITE=1 vitest run src/docs/reference/generate-reference.test.ts",
352
359
  "docs:reference:check": "pnpm run docs:reference && git diff --exit-code -- docs/reference",
353
360
  "verify-exports": "node scripts/verify-exports.mjs",