@demlik/tea 0.6.0 → 0.7.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 (119) hide show
  1. package/dist/agent/index.d.ts +6 -5
  2. package/dist/agent/index.js +10 -10
  3. package/dist/authed-call/index.d.ts +2 -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 +2 -2
  10. package/dist/cache/index.js +4 -4
  11. package/dist/chart/index.d.ts +934 -0
  12. package/dist/chart/index.js +244 -0
  13. package/dist/chart/index.js.map +1 -0
  14. package/dist/{chunk-2UGTDYOK.js → chunk-3JU6657S.js} +3 -3
  15. package/dist/{chunk-2UGTDYOK.js.map → chunk-3JU6657S.js.map} +1 -1
  16. package/dist/{chunk-AZ3NHUPD.js → chunk-4KTWLPL5.js} +3 -3
  17. package/dist/{chunk-AZ3NHUPD.js.map → chunk-4KTWLPL5.js.map} +1 -1
  18. package/dist/{chunk-ZH454CR5.js → chunk-5EHLEUTL.js} +24 -4
  19. package/dist/chunk-5EHLEUTL.js.map +1 -0
  20. package/dist/{chunk-WF46FABO.js → chunk-7SVIRMC6.js} +3 -3
  21. package/dist/{chunk-WF46FABO.js.map → chunk-7SVIRMC6.js.map} +1 -1
  22. package/dist/{chunk-XMHZ44QC.js → chunk-7V4EVLZA.js} +4 -4
  23. package/dist/{chunk-XMHZ44QC.js.map → chunk-7V4EVLZA.js.map} +1 -1
  24. package/dist/{chunk-IVHQCVFX.js → chunk-A56OR5RF.js} +3 -3
  25. package/dist/{chunk-IVHQCVFX.js.map → chunk-A56OR5RF.js.map} +1 -1
  26. package/dist/{chunk-O7ED34JH.js → chunk-B5VXOFMZ.js} +47 -15
  27. package/dist/chunk-B5VXOFMZ.js.map +1 -0
  28. package/dist/{chunk-EC6FO42Q.js → chunk-EUF7XOEE.js} +6 -6
  29. package/dist/{chunk-EC6FO42Q.js.map → chunk-EUF7XOEE.js.map} +1 -1
  30. package/dist/{chunk-XOAP3LOT.js → chunk-I5OV65MS.js} +3 -3
  31. package/dist/{chunk-XOAP3LOT.js.map → chunk-I5OV65MS.js.map} +1 -1
  32. package/dist/{chunk-ASX7PL2K.js → chunk-JGVL3WPL.js} +3 -3
  33. package/dist/{chunk-ASX7PL2K.js.map → chunk-JGVL3WPL.js.map} +1 -1
  34. package/dist/{chunk-S6Y3RNX4.js → chunk-JP5D6GSL.js} +4 -4
  35. package/dist/{chunk-S6Y3RNX4.js.map → chunk-JP5D6GSL.js.map} +1 -1
  36. package/dist/{chunk-ERYY5P6W.js → chunk-ND3DH6KM.js} +3 -3
  37. package/dist/{chunk-ERYY5P6W.js.map → chunk-ND3DH6KM.js.map} +1 -1
  38. package/dist/{chunk-A7USKARI.js → chunk-SUST46KO.js} +3 -3
  39. package/dist/{chunk-A7USKARI.js.map → chunk-SUST46KO.js.map} +1 -1
  40. package/dist/{chunk-2KBEIGYP.js → chunk-TP5UPGLY.js} +3 -3
  41. package/dist/{chunk-2KBEIGYP.js.map → chunk-TP5UPGLY.js.map} +1 -1
  42. package/dist/{chunk-66S2KEQQ.js → chunk-WLGO64WC.js} +4 -4
  43. package/dist/{chunk-66S2KEQQ.js.map → chunk-WLGO64WC.js.map} +1 -1
  44. package/dist/{chunk-UV7VCTNC.js → chunk-ZF6WDK2D.js} +7 -7
  45. package/dist/{chunk-UV7VCTNC.js.map → chunk-ZF6WDK2D.js.map} +1 -1
  46. package/dist/{core-CUN5HDKL.d.ts → core-Bjc0bS8j.d.ts} +22 -1
  47. package/dist/deadline/index.d.ts +2 -2
  48. package/dist/deadline/index.js +3 -3
  49. package/dist/do/index.d.ts +7 -6
  50. package/dist/do/index.js +10 -10
  51. package/dist/{durable-effects-CXMOi-sp.d.ts → durable-effects-D8SqU_if.d.ts} +1 -1
  52. package/dist/extension/index.d.ts +3 -2
  53. package/dist/extension/index.js +3 -3
  54. package/dist/extension/react.js +3 -3
  55. package/dist/extension/subs/index.d.ts +2 -2
  56. package/dist/fan-out/index.d.ts +3 -2
  57. package/dist/idempotent-intake/index.d.ts +3 -2
  58. package/dist/index.d.ts +5 -4
  59. package/dist/index.js +2 -2
  60. package/dist/llm-call/index.d.ts +2 -2
  61. package/dist/llm-call/index.js +7 -7
  62. package/dist/{machine-CoWpvp8x.d.ts → machine-0OmPvsy_.d.ts} +1 -1
  63. package/dist/machine-viz/index.d.ts +1 -1
  64. package/dist/machine-viz/index.js +2 -2
  65. package/dist/mem/index.d.ts +3 -2
  66. package/dist/monitored-run/index.d.ts +4 -3
  67. package/dist/monitored-run/index.js +5 -5
  68. package/dist/node/index.d.ts +3 -2
  69. package/dist/paginated-walk/index.d.ts +2 -2
  70. package/dist/paginated-walk/index.js +7 -7
  71. package/dist/parity/index.d.ts +3 -2
  72. package/dist/parity/index.js +3 -3
  73. package/dist/pbt/arbitraries/index.d.ts +1 -1
  74. package/dist/pbt/index.d.ts +1 -1
  75. package/dist/pbt/index.js +3 -3
  76. package/dist/pbt/runners/index.d.ts +1 -1
  77. package/dist/pbt/runners/index.js +3 -3
  78. package/dist/poller/index.d.ts +28 -7
  79. package/dist/poller/index.js +3 -3
  80. package/dist/poller/index.js.map +1 -1
  81. package/dist/prediction/index.d.ts +1 -1
  82. package/dist/prediction/index.js +2 -2
  83. package/dist/pure/index.d.ts +1 -1
  84. package/dist/pure/index.js +2 -2
  85. package/dist/react/index.d.ts +3 -2
  86. package/dist/react/index.js +2 -2
  87. package/dist/reconciler/index.d.ts +2 -2
  88. package/dist/reconciler/index.js +7 -7
  89. package/dist/recorder/index.d.ts +3 -2
  90. package/dist/resilient-call/index.d.ts +2 -2
  91. package/dist/resilient-call/index.js +6 -6
  92. package/dist/{runtime-types-BD3ZFfdw.d.ts → runtime-types-Bxc637bp.d.ts} +53 -2
  93. package/dist/saga/index.d.ts +3 -2
  94. package/dist/snapshot/index.d.ts +1 -1
  95. package/dist/snapshot/index.js +3 -3
  96. package/dist/subs/index.d.ts +4 -3
  97. package/dist/subs/index.js +3 -3
  98. package/dist/testing/index.d.ts +3 -2
  99. package/dist/testing/index.js +2 -2
  100. package/dist/throttled-input/index.d.ts +2 -2
  101. package/dist/throttled-input/index.js +6 -6
  102. package/dist/token-refresh/index.d.ts +1 -1
  103. package/dist/token-refresh/index.js +3 -3
  104. package/dist/trace-replay/index.d.ts +3 -2
  105. package/dist/trace-replay/index.js +3 -3
  106. package/dist/{types-CjAkI83U.d.ts → types-D7u9DkH7.d.ts} +1 -1
  107. package/dist/with-deadline/index.d.ts +1 -1
  108. package/dist/with-deadline/index.js +2 -2
  109. package/dist/with-resilience/index.d.ts +2 -2
  110. package/dist/with-resilience/index.js +6 -6
  111. package/dist/with-telemetry/index.d.ts +1 -1
  112. package/dist/with-telemetry/index.js +2 -2
  113. package/dist/work-queue/adapter.d.ts +3 -2
  114. package/dist/work-queue/index.d.ts +3 -2
  115. package/dist/work-queue/ops.d.ts +3 -2
  116. package/dist/workflow/index.d.ts +3 -3
  117. package/package.json +8 -1
  118. package/dist/chunk-O7ED34JH.js.map +0 -1
  119. package/dist/chunk-ZH454CR5.js.map +0 -1
@@ -30,6 +30,27 @@ declare function msgKeysOf(machine: {
30
30
  update: object;
31
31
  __form?: UpdateForm;
32
32
  }): readonly string[];
33
+ type MachineShape = {
34
+ readonly form: "reducer";
35
+ /** Every `Msg.type` the flat reducer has a cell for. */
36
+ readonly msgs: readonly string[];
37
+ } | {
38
+ readonly form: "transitions";
39
+ /** The union of every row's `Msg.type` keys (see `msgKeysOf`). */
40
+ readonly msgs: readonly string[];
41
+ /** Every `state.type` the table has a row for, in table order. */
42
+ readonly states: readonly string[];
43
+ /** `state.type` → the `Msg.type`s that state has a cell for. */
44
+ readonly accepts: Readonly<Record<string, readonly string[]>>;
45
+ };
46
+ declare function describeMachine(machine: {
47
+ update: object;
48
+ __form?: UpdateForm;
49
+ }): MachineShape;
50
+ declare function acceptsOf(machine: {
51
+ update: object;
52
+ __form?: UpdateForm;
53
+ }, stateType: string): readonly string[];
33
54
  type Reducer<S, M extends {
34
55
  type: string;
35
56
  }, C extends Cmd> = {
@@ -302,4 +323,4 @@ declare function foldMsgs<S, M extends {
302
323
  type: string;
303
324
  }, C extends Cmd, U extends Sub, Ctx>(machine: Machine<S, M, C, U, Ctx>, base: S, msgs: readonly M[]): S;
304
325
 
305
- export { Cmd as C, type DepKeyedSub as D, type Interpret as I, type Machine as M, NoCellError as N, type PortEmitter as P, type Reducer as R, type Sub as S, type Transitions as T, type UpdateForm as U, type Port as a, type SubId as b, type InterpretDetached as c, type ContextFree as d, type Dispose as e, type Identity as f, type NoCtx as g, type Subscribe as h, type SyncReturn as i, applyCell as j, applyCellChecked as k, detectUpdateForm as l, foldMsgs as m, foldUpdates as n, formOf as o, msgKeysOf as p, subId as q, structuralHash as s };
326
+ export { Cmd as C, type DepKeyedSub as D, type Interpret as I, type Machine as M, NoCellError as N, type PortEmitter as P, type Reducer as R, type Sub as S, type Transitions as T, type UpdateForm as U, type Port as a, type SubId as b, type InterpretDetached as c, type ContextFree as d, type Dispose as e, type Identity as f, type MachineShape as g, type NoCtx as h, type Subscribe as i, type SyncReturn as j, acceptsOf as k, applyCell as l, applyCellChecked as m, describeMachine as n, detectUpdateForm as o, foldMsgs as p, foldUpdates as q, formOf as r, msgKeysOf as s, structuralHash as t, subId as u };
@@ -1,5 +1,5 @@
1
- import { S as Sub, b as SubId } from '../core-CUN5HDKL.js';
2
- import { S as SubscribeHandler } from '../types-CjAkI83U.js';
1
+ import { S as Sub, b as SubId } from '../core-Bjc0bS8j.js';
2
+ import { S as SubscribeHandler } from '../types-D7u9DkH7.js';
3
3
 
4
4
  /**
5
5
  * @demlik/tea/deadline — a one-shot Sub that fires when an ABSOLUTE wall-clock
@@ -1,6 +1,6 @@
1
- export { deadlineExceeded, deadlineSub, setTimeoutArmTimer, subscribeDeadline, subscribeWith } from '../chunk-ASX7PL2K.js';
1
+ export { deadlineExceeded, deadlineSub, setTimeoutArmTimer, subscribeDeadline, subscribeWith } from '../chunk-JGVL3WPL.js';
2
2
  import '../chunk-2YFLOCWX.js';
3
- import '../chunk-ZH454CR5.js';
4
- import '../chunk-O7ED34JH.js';
3
+ import '../chunk-5EHLEUTL.js';
4
+ import '../chunk-B5VXOFMZ.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,14 @@
1
- import { S as Store, R as Runtime, B as BootingRuntime } from '../runtime-types-BD3ZFfdw.js';
2
- import { P as PendingEffectsRecorder, b as EffectOwed, a as EffectConfirmed } from '../durable-effects-CXMOi-sp.js';
3
- export { D as DeliveryId, E as EffectLedgerEvent, O as OwedEffect, c as PendingEffectsLedger, d as applyEffectEvent, e as emptyLedger, f as foldLedger, i as isOwed, p as pendingEffectsLedger, s as survivingEffects } from '../durable-effects-CXMOi-sp.js';
1
+ import { S as Store, R as Runtime, B as BootingRuntime } from '../runtime-types-Bxc637bp.js';
2
+ import { P as PendingEffectsRecorder, b as EffectOwed, a as EffectConfirmed } from '../durable-effects-D8SqU_if.js';
3
+ export { D as DeliveryId, E as EffectLedgerEvent, O as OwedEffect, c as PendingEffectsLedger, d as applyEffectEvent, e as emptyLedger, f as foldLedger, i as isOwed, p as pendingEffectsLedger, s as survivingEffects } from '../durable-effects-D8SqU_if.js';
4
4
  import { RetryPolicy, Rng } from '../retry-backoff/index.js';
5
- import { C as Cmd, S as Sub, M as Machine } from '../core-CUN5HDKL.js';
6
- import { k as AgentEvent, A as AgentTurn, s as AgentState, p as AgentMachineMsg, t as AgentStatus } from '../machine-CoWpvp8x.js';
5
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
6
+ import { k as AgentEvent, A as AgentTurn, s as AgentState, p as AgentMachineMsg, t as AgentStatus } from '../machine-0OmPvsy_.js';
7
+ import 'better-result';
7
8
  import '../llm-call/index.js';
8
9
  import '../resilient-call/index.js';
9
10
  import '../cache/index.js';
10
- import '../types-CjAkI83U.js';
11
+ import '../types-D7u9DkH7.js';
11
12
  import '../circuit-breaker/index.js';
12
13
  import '../deadline/index.js';
13
14
  import '../protocol-B5YmJr0d.js';
package/dist/do/index.js CHANGED
@@ -1,27 +1,27 @@
1
- import { status, agentBootMsg, agentEvents } from '../chunk-UV7VCTNC.js';
1
+ import { status, agentBootMsg, agentEvents } from '../chunk-ZF6WDK2D.js';
2
2
  export { applyEffectEvent, emptyLedger, foldLedger, isOwed, pendingEffectsLedger, survivingEffects } from '../chunk-25LBDCBC.js';
3
- import '../chunk-66S2KEQQ.js';
4
- import '../chunk-ERYY5P6W.js';
5
- import '../chunk-XMHZ44QC.js';
6
- import '../chunk-EC6FO42Q.js';
3
+ import '../chunk-WLGO64WC.js';
4
+ import '../chunk-ND3DH6KM.js';
5
+ import '../chunk-7V4EVLZA.js';
6
+ import '../chunk-EUF7XOEE.js';
7
7
  import '../chunk-JELSZN25.js';
8
8
  import '../chunk-D736QUGF.js';
9
9
  import { createIntake } from '../chunk-ZVJZ72HY.js';
10
- import '../chunk-ASX7PL2K.js';
10
+ import '../chunk-JGVL3WPL.js';
11
11
  import { defaultRetryPolicy, initRetry, recordFailure, shouldRetry, nextDelayMs } from '../chunk-Q2UM7BXU.js';
12
12
  import '../chunk-S2EGRPCM.js';
13
13
  import '../chunk-BYQUGDD3.js';
14
14
  import '../chunk-K575PT4S.js';
15
15
  import '../chunk-UF4MZSLT.js';
16
- import '../chunk-WF46FABO.js';
16
+ import '../chunk-7SVIRMC6.js';
17
17
  import '../chunk-MU6MCIAC.js';
18
18
  import '../chunk-FV3Z5MBE.js';
19
- import '../chunk-2UGTDYOK.js';
19
+ import '../chunk-3JU6657S.js';
20
20
  import '../chunk-2YFLOCWX.js';
21
21
  import '../chunk-ZJ5AOYBH.js';
22
22
  import '../chunk-G5E74IJB.js';
23
- import { replay, run } from '../chunk-ZH454CR5.js';
24
- import '../chunk-O7ED34JH.js';
23
+ import { replay, run } from '../chunk-5EHLEUTL.js';
24
+ import '../chunk-B5VXOFMZ.js';
25
25
 
26
26
  // src/do/durable-timer.ts
27
27
  function durableTimer(config) {
@@ -1,4 +1,4 @@
1
- import { C as Cmd } from './core-CUN5HDKL.js';
1
+ import { C as Cmd } from './core-Bjc0bS8j.js';
2
2
 
3
3
  /**
4
4
  * @demlik/tea/do — the durable pending-effects ledger (substrate primitive #1).
@@ -1,5 +1,6 @@
1
- import { R as Runtime, S as Store } from '../runtime-types-BD3ZFfdw.js';
2
- import '../core-CUN5HDKL.js';
1
+ import { R as Runtime, S as Store } from '../runtime-types-Bxc637bp.js';
2
+ import 'better-result';
3
+ import '../core-Bjc0bS8j.js';
3
4
 
4
5
  /**
5
6
  * Runtime bridge — expose a `@demlik/tea` runtime running in one chrome context
@@ -1,7 +1,7 @@
1
- export { bridgeClient, bridgeRuntime, bridgeTabClient, passThroughMsg } from '../chunk-IVHQCVFX.js';
1
+ export { bridgeClient, bridgeRuntime, bridgeTabClient, passThroughMsg } from '../chunk-A56OR5RF.js';
2
2
  import '../chunk-G5E74IJB.js';
3
- import '../chunk-ZH454CR5.js';
4
- import '../chunk-O7ED34JH.js';
3
+ import '../chunk-5EHLEUTL.js';
4
+ import '../chunk-B5VXOFMZ.js';
5
5
 
6
6
  // src/extension/index.ts
7
7
  var MALFORMED = "chromeStorageStore: stored value is not a string";
@@ -1,7 +1,7 @@
1
- import { bridgeClient, passThroughMsg } from '../chunk-IVHQCVFX.js';
1
+ import { bridgeClient, passThroughMsg } from '../chunk-A56OR5RF.js';
2
2
  import '../chunk-G5E74IJB.js';
3
- import '../chunk-ZH454CR5.js';
4
- import '../chunk-O7ED34JH.js';
3
+ import '../chunk-5EHLEUTL.js';
4
+ import '../chunk-B5VXOFMZ.js';
5
5
  import { useRef, useSyncExternalStore, useEffect, useCallback, createContext, useMemo, useContext } from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
@@ -1,5 +1,5 @@
1
- import { S as Sub } from '../../core-CUN5HDKL.js';
2
- import { S as SubscribeHandler } from '../../types-CjAkI83U.js';
1
+ import { S as Sub } from '../../core-Bjc0bS8j.js';
2
+ import { S as SubscribeHandler } from '../../types-D7u9DkH7.js';
3
3
 
4
4
  type AlarmSubData = {
5
5
  alarmName: string;
@@ -1,6 +1,7 @@
1
- import { C as Cmd, a as Port } from '../core-CUN5HDKL.js';
1
+ import { C as Cmd, a as Port } from '../core-Bjc0bS8j.js';
2
2
  import { QueueItem } from '../work-queue/index.js';
3
- import '../runtime-types-BD3ZFfdw.js';
3
+ import '../runtime-types-Bxc637bp.js';
4
+ import 'better-result';
4
5
 
5
6
  /**
6
7
  * @demlik/tea/fan-out — scatter-gather over a bounded-concurrency work list.
@@ -1,7 +1,8 @@
1
1
  import { IdempotencyStore } from '../idempotency/index.js';
2
- import { C as Cmd } from '../core-CUN5HDKL.js';
2
+ import { C as Cmd } from '../core-Bjc0bS8j.js';
3
3
  import { QueueItem } from '../work-queue/index.js';
4
- import '../runtime-types-BD3ZFfdw.js';
4
+ import '../runtime-types-Bxc637bp.js';
5
+ import 'better-result';
5
6
 
6
7
  /**
7
8
  * @demlik/tea/idempotent-intake — receive-once intake for webhooks / queue
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { B as BootingRuntime, C as CtxArg, S as Store, O as OnError, a as Supervision } from './runtime-types-BD3ZFfdw.js';
2
- export { b as Branded, D as DispatchDiscardedError, c as DispatchSettle, d as DisposeTimeoutNotice, I as IdentityDropNotice, P as PortNameCollisionError, Q as QuiescenceTimeoutError, R as Runtime, e as RuntimeDiscardNotice, f as RuntimeDiscardedError, g as RuntimeErrorContext, h as RuntimeErrorPhase, i as RuntimeRef, j as Schema, k as SubIdCollisionError, l as SupervisionStrategy, _ as __resetPortRegistry, m as absurd, n as asReducer, o as defineMachine, p as definePort, q as noop, r as replay, s as schemaMigrate, t as tryInterpret, w as wrapDetached } from './runtime-types-BD3ZFfdw.js';
3
- import { C as Cmd, S as Sub, M as Machine } from './core-CUN5HDKL.js';
4
- export { d as ContextFree, D as DepKeyedSub, e as Dispose, f as Identity, I as Interpret, c as InterpretDetached, N as NoCellError, g as NoCtx, a as Port, P as PortEmitter, R as Reducer, b as SubId, h as Subscribe, i as SyncReturn, T as Transitions, U as UpdateForm, j as applyCell, k as applyCellChecked, l as detectUpdateForm, m as foldMsgs, n as foldUpdates, o as formOf, p as msgKeysOf, s as structuralHash, q as subId } from './core-CUN5HDKL.js';
1
+ import { B as BootingRuntime, C as CtxArg, S as Store, O as OnError, a as Supervision } from './runtime-types-Bxc637bp.js';
2
+ export { b as Branded, D as DispatchDiscardedError, c as DispatchSettle, d as DisposeTimeoutNotice, F as FoldRefusal, I as IdentityDropNotice, P as PortNameCollisionError, Q as QuiescenceTimeoutError, R as Runtime, e as RuntimeDiscardNotice, f as RuntimeDiscardedError, g as RuntimeErrorContext, h as RuntimeErrorPhase, i as RuntimeRef, j as Schema, k as SubIdCollisionError, l as SupervisionStrategy, _ as __resetPortRegistry, m as absurd, n as asReducer, o as defineMachine, p as definePort, q as noop, r as replay, s as schemaMigrate, t as tryApplyCell, u as tryFoldMsgs, v as tryInterpret, w as wrapDetached } from './runtime-types-Bxc637bp.js';
3
+ import { C as Cmd, S as Sub, M as Machine } from './core-Bjc0bS8j.js';
4
+ export { d as ContextFree, D as DepKeyedSub, e as Dispose, f as Identity, I as Interpret, c as InterpretDetached, g as MachineShape, N as NoCellError, h as NoCtx, a as Port, P as PortEmitter, R as Reducer, b as SubId, i as Subscribe, j as SyncReturn, T as Transitions, U as UpdateForm, k as acceptsOf, l as applyCell, m as applyCellChecked, n as describeMachine, o as detectUpdateForm, p as foldMsgs, q as foldUpdates, r as formOf, s as msgKeysOf, t as structuralHash, u as subId } from './core-Bjc0bS8j.js';
5
+ import 'better-result';
5
6
 
6
7
  interface HistoryTracker<S, M extends {
7
8
  type: string;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { DispatchDiscardedError, DisposeTimeoutNotice, IdentityDropNotice, PortNameCollisionError, QuiescenceTimeoutError, RuntimeDiscardNotice, RuntimeDiscardedError, SubIdCollisionError, __resetPortRegistry, absurd, asReducer, defineMachine, definePort, historyTracker, noop, replay, run, schemaMigrate, tryInterpret, wrapDetached } from './chunk-ZH454CR5.js';
2
- export { Cmd, NoCellError, applyCell, applyCellChecked, detectUpdateForm, foldMsgs, foldUpdates, formOf, msgKeysOf, structuralHash, subId } from './chunk-O7ED34JH.js';
1
+ export { DispatchDiscardedError, DisposeTimeoutNotice, IdentityDropNotice, PortNameCollisionError, QuiescenceTimeoutError, RuntimeDiscardNotice, RuntimeDiscardedError, SubIdCollisionError, __resetPortRegistry, absurd, asReducer, defineMachine, definePort, historyTracker, noop, replay, run, schemaMigrate, tryApplyCell, tryFoldMsgs, tryInterpret, wrapDetached } from './chunk-5EHLEUTL.js';
2
+ export { Cmd, NoCellError, acceptsOf, applyCell, applyCellChecked, describeMachine, detectUpdateForm, foldMsgs, foldUpdates, formOf, msgKeysOf, structuralHash, subId } from './chunk-B5VXOFMZ.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,10 @@
1
- import { C as Cmd } from '../core-CUN5HDKL.js';
1
+ import { C as Cmd } from '../core-Bjc0bS8j.js';
2
2
  import { RunCmd, SucceedMsg, FailMsg, ResilientState } from '../resilient-call/index.js';
3
3
  import { RetryPolicy } from '../retry-backoff/index.js';
4
4
  import { DeadlineExceeded, DeadlineSub } from '../deadline/index.js';
5
5
  export { deadlineSub, subscribeDeadline } from '../deadline/index.js';
6
6
  import '../cache/index.js';
7
- import '../types-CjAkI83U.js';
7
+ import '../types-D7u9DkH7.js';
8
8
  import '../circuit-breaker/index.js';
9
9
  import '../protocol-B5YmJr0d.js';
10
10
  import '../rate-limit/index.js';
@@ -1,16 +1,16 @@
1
- export { createLlmCall, liftLlmCall } from '../chunk-ERYY5P6W.js';
2
- import '../chunk-EC6FO42Q.js';
1
+ export { createLlmCall, liftLlmCall } from '../chunk-ND3DH6KM.js';
2
+ import '../chunk-EUF7XOEE.js';
3
3
  import '../chunk-JELSZN25.js';
4
- export { deadlineSub, subscribeDeadline } from '../chunk-ASX7PL2K.js';
4
+ export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
5
5
  import '../chunk-Q2UM7BXU.js';
6
6
  import '../chunk-S2EGRPCM.js';
7
7
  import '../chunk-UF4MZSLT.js';
8
- import '../chunk-WF46FABO.js';
9
- import '../chunk-2UGTDYOK.js';
8
+ import '../chunk-7SVIRMC6.js';
9
+ import '../chunk-3JU6657S.js';
10
10
  import '../chunk-2YFLOCWX.js';
11
11
  import '../chunk-ZJ5AOYBH.js';
12
12
  import '../chunk-G5E74IJB.js';
13
- import '../chunk-ZH454CR5.js';
14
- import '../chunk-O7ED34JH.js';
13
+ import '../chunk-5EHLEUTL.js';
14
+ import '../chunk-B5VXOFMZ.js';
15
15
  //# sourceMappingURL=index.js.map
16
16
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { C as Cmd, I as Interpret, M as Machine } from './core-CUN5HDKL.js';
1
+ import { C as Cmd, I as Interpret, M as Machine } from './core-Bjc0bS8j.js';
2
2
  import { ModelFactory, Schema, MessageLoader, LlmCall, LlmOk, LlmErr, LlmRunCmd, LlmSucceedMsg, LlmFailMsg, LlmTimerMsg, LlmCallPorts } from './llm-call/index.js';
3
3
  import { MonitoredRunState, RunFailure, MonitoredRunCmd } from './monitored-run/index.js';
4
4
  import { M as MsgType } from './protocol-B5YmJr0d.js';
@@ -1,4 +1,4 @@
1
- import { C as Cmd, S as Sub, M as Machine } from '../core-CUN5HDKL.js';
1
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
2
2
 
3
3
  /**
4
4
  * @demlik/tea/machine-viz — turn a `Machine` into a Mermaid diagram string.
@@ -1,5 +1,5 @@
1
- import '../chunk-ZH454CR5.js';
2
- import { formOf } from '../chunk-O7ED34JH.js';
1
+ import '../chunk-5EHLEUTL.js';
2
+ import { formOf } from '../chunk-B5VXOFMZ.js';
3
3
 
4
4
  // src/machine-viz/index.ts
5
5
  function safeId(raw) {
@@ -1,5 +1,6 @@
1
- import { S as Store } from '../runtime-types-BD3ZFfdw.js';
2
- import '../core-CUN5HDKL.js';
1
+ import { S as Store } from '../runtime-types-Bxc637bp.js';
2
+ import 'better-result';
3
+ import '../core-Bjc0bS8j.js';
3
4
 
4
5
  /**
5
6
  * @packageDocumentation
@@ -1,10 +1,11 @@
1
1
  import { DeadlineExceeded, DeadlineSub } from '../deadline/index.js';
2
2
  export { deadlineSub, subscribeDeadline } from '../deadline/index.js';
3
- import { I as Interpret, C as Cmd } from '../core-CUN5HDKL.js';
3
+ import { I as Interpret, C as Cmd } from '../core-Bjc0bS8j.js';
4
4
  import { SnapshotWriteCmd, SnapshotState, SnapshotStore, SnapshotSavedMsg, SnapshotFailedMsg, SnapshotLoadedMsg, SnapshotLoadFailedMsg, SnapshotLoadCmd } from '../snapshot/index.js';
5
5
  import { QueueItem } from '../work-queue/index.js';
6
- import '../types-CjAkI83U.js';
7
- import '../runtime-types-BD3ZFfdw.js';
6
+ import '../types-D7u9DkH7.js';
7
+ import '../runtime-types-Bxc637bp.js';
8
+ import 'better-result';
8
9
 
9
10
  /**
10
11
  * @demlik/tea/monitored-run — a long-running operation that is BOTH staged and
@@ -1,10 +1,10 @@
1
- export { createMonitoredRun, liftRun } from '../chunk-66S2KEQQ.js';
2
- import '../chunk-XMHZ44QC.js';
3
- export { deadlineSub, subscribeDeadline } from '../chunk-ASX7PL2K.js';
1
+ export { createMonitoredRun, liftRun } from '../chunk-WLGO64WC.js';
2
+ import '../chunk-7V4EVLZA.js';
3
+ export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
4
4
  import '../chunk-MU6MCIAC.js';
5
5
  import '../chunk-FV3Z5MBE.js';
6
6
  import '../chunk-2YFLOCWX.js';
7
- import '../chunk-ZH454CR5.js';
8
- import '../chunk-O7ED34JH.js';
7
+ import '../chunk-5EHLEUTL.js';
8
+ import '../chunk-B5VXOFMZ.js';
9
9
  //# sourceMappingURL=index.js.map
10
10
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
1
  import WebSocket from 'ws';
2
- import { S as Store } from '../runtime-types-BD3ZFfdw.js';
3
- import { S as Sub, b as SubId } from '../core-CUN5HDKL.js';
2
+ import { S as Store } from '../runtime-types-Bxc637bp.js';
3
+ import { S as Sub, b as SubId } from '../core-Bjc0bS8j.js';
4
+ import 'better-result';
4
5
 
5
6
  /**
6
7
  * @packageDocumentation
@@ -1,11 +1,11 @@
1
- import { C as Cmd } from '../core-CUN5HDKL.js';
1
+ import { C as Cmd } from '../core-Bjc0bS8j.js';
2
2
  import { PaginatorState } from '../paginator/index.js';
3
3
  import { RunCmd, FailMsg, SucceedMsg, CircuitConfig, RateLimitConfig, DeadlineConfig, ResilientPorts, ResilientState, ResilientTimerMsg } from '../resilient-call/index.js';
4
4
  import { RetryPolicy } from '../retry-backoff/index.js';
5
5
  import { DeadlineSub } from '../deadline/index.js';
6
6
  export { deadlineSub, subscribeDeadline } from '../deadline/index.js';
7
7
  import '../cache/index.js';
8
- import '../types-CjAkI83U.js';
8
+ import '../types-D7u9DkH7.js';
9
9
  import '../circuit-breaker/index.js';
10
10
  import '../protocol-B5YmJr0d.js';
11
11
  import '../rate-limit/index.js';
@@ -1,16 +1,16 @@
1
- export { PAGE_KEY, createPaginatedWalk, liftWalk } from '../chunk-XOAP3LOT.js';
1
+ export { PAGE_KEY, createPaginatedWalk, liftWalk } from '../chunk-I5OV65MS.js';
2
2
  import '../chunk-SINXE47Y.js';
3
- import '../chunk-EC6FO42Q.js';
3
+ import '../chunk-EUF7XOEE.js';
4
4
  import '../chunk-JELSZN25.js';
5
- export { deadlineSub, subscribeDeadline } from '../chunk-ASX7PL2K.js';
5
+ export { deadlineSub, subscribeDeadline } from '../chunk-JGVL3WPL.js';
6
6
  import '../chunk-Q2UM7BXU.js';
7
7
  import '../chunk-S2EGRPCM.js';
8
8
  import '../chunk-UF4MZSLT.js';
9
- import '../chunk-WF46FABO.js';
10
- import '../chunk-2UGTDYOK.js';
9
+ import '../chunk-7SVIRMC6.js';
10
+ import '../chunk-3JU6657S.js';
11
11
  import '../chunk-2YFLOCWX.js';
12
12
  import '../chunk-ZJ5AOYBH.js';
13
- import '../chunk-ZH454CR5.js';
14
- import '../chunk-O7ED34JH.js';
13
+ import '../chunk-5EHLEUTL.js';
14
+ import '../chunk-B5VXOFMZ.js';
15
15
  //# sourceMappingURL=index.js.map
16
16
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- import { B as BootingRuntime } from '../runtime-types-BD3ZFfdw.js';
2
- import { C as Cmd, S as Sub, M as Machine } from '../core-CUN5HDKL.js';
1
+ import { B as BootingRuntime } from '../runtime-types-Bxc637bp.js';
2
+ import { C as Cmd, S as Sub, M as Machine } from '../core-Bjc0bS8j.js';
3
3
  import { Trace, RecorderOptions } from '../recorder/index.js';
4
+ import 'better-result';
4
5
 
5
6
  /**
6
7
  * the record → replay → normalized-diff go/no-go gate.
@@ -1,8 +1,8 @@
1
1
  import { recorder } from '../chunk-MUUROGIH.js';
2
- import { deepEqual } from '../chunk-A7USKARI.js';
2
+ import { deepEqual } from '../chunk-SUST46KO.js';
3
3
  import '../chunk-EWJP3YYP.js';
4
- import { replay } from '../chunk-ZH454CR5.js';
5
- import '../chunk-O7ED34JH.js';
4
+ import { replay } from '../chunk-5EHLEUTL.js';
5
+ import '../chunk-B5VXOFMZ.js';
6
6
 
7
7
  // src/parity/index.ts
8
8
  function recordRun(runtime, opts) {
@@ -1,5 +1,5 @@
1
1
  import * as fc from 'fast-check';
2
- import { C as Cmd, S as Sub, M as Machine } from '../../core-CUN5HDKL.js';
2
+ import { C as Cmd, S as Sub, M as Machine } from '../../core-Bjc0bS8j.js';
3
3
 
4
4
  /**
5
5
  * Build a Ctx value whose every property access throws. Use as the `ctx`
@@ -1,6 +1,6 @@
1
1
  export { MsgArbitraryTable, arbConstantMsg, arbGuidedSequence, arbMsg, arbMsgSequence, arbRecordMsg, stubCtxThrowingProxy } from './arbitraries/index.js';
2
2
  export { Step, foldEvents, propertyInvariant, propertyTerminates, propertyTrace } from './runners/index.js';
3
- import { C as Cmd, R as Reducer, T as Transitions, U as UpdateForm } from '../core-CUN5HDKL.js';
3
+ import { C as Cmd, R as Reducer, T as Transitions, U as UpdateForm } from '../core-Bjc0bS8j.js';
4
4
  import 'fast-check';
5
5
 
6
6
  /**
package/dist/pbt/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { arbConstantMsg, arbGuidedSequence, arbMsg, arbMsgSequence, arbRecordMsg, stubCtxThrowingProxy } from '../chunk-AZZLE7XR.js';
2
- export { foldEvents, propertyInvariant, propertyTerminates, propertyTrace } from '../chunk-S6Y3RNX4.js';
3
- import '../chunk-ZH454CR5.js';
4
- import { msgKeysOf } from '../chunk-O7ED34JH.js';
2
+ export { foldEvents, propertyInvariant, propertyTerminates, propertyTrace } from '../chunk-JP5D6GSL.js';
3
+ import '../chunk-5EHLEUTL.js';
4
+ import { msgKeysOf } from '../chunk-B5VXOFMZ.js';
5
5
 
6
6
  // src/pbt/util/msg-keys.ts
7
7
  function msgTypeKeys(machine) {
@@ -1,5 +1,5 @@
1
1
  import * as fc from 'fast-check';
2
- import { C as Cmd, S as Sub, M as Machine } from '../../core-CUN5HDKL.js';
2
+ import { C as Cmd, S as Sub, M as Machine } from '../../core-Bjc0bS8j.js';
3
3
 
4
4
  /**
5
5
  * One unit in a fold trace — the four pieces of data a property
@@ -1,5 +1,5 @@
1
- export { foldEvents, propertyInvariant, propertyTerminates, propertyTrace } from '../../chunk-S6Y3RNX4.js';
2
- import '../../chunk-ZH454CR5.js';
3
- import '../../chunk-O7ED34JH.js';
1
+ export { foldEvents, propertyInvariant, propertyTerminates, propertyTrace } from '../../chunk-JP5D6GSL.js';
2
+ import '../../chunk-5EHLEUTL.js';
3
+ import '../../chunk-B5VXOFMZ.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
1
  import { DeadlineSub } from '../deadline/index.js';
2
2
  import { IdempotencyStore } from '../idempotency/index.js';
3
- import { C as Cmd, S as Sub } from '../core-CUN5HDKL.js';
3
+ import { C as Cmd, S as Sub } from '../core-Bjc0bS8j.js';
4
4
  import { RetryState, AnyRetryPolicy } from '../retry-backoff/index.js';
5
- import '../types-CjAkI83U.js';
5
+ import '../types-D7u9DkH7.js';
6
6
 
7
7
  /**
8
8
  * @demlik/tea/poller — "poll a source every N ms until a predicate holds, with
@@ -203,6 +203,27 @@ type PollerState<R> = (PollerCore<R> & {
203
203
  }) | (PollerCore<R> & {
204
204
  readonly phase: "gave_up";
205
205
  });
206
+ /**
207
+ * The three arms, named — so a verb can DECLARE the phases it can actually
208
+ * reach instead of the whole union.
209
+ *
210
+ * A verb whose return type is the full `PollerState<R>` tells a caller nothing
211
+ * about where the poller went, and a caller that needs to know (a chart
212
+ * declaring an edge's fan-out; an exhaustive `switch`) has to re-derive it by
213
+ * reading the verb's body. Every one of these narrowings is already true of the
214
+ * implementation — `start` only ever builds a `polling` arm, `tickResult` never
215
+ * builds `gave_up`, `tickErr` never builds `done` — so naming them costs
216
+ * nothing at runtime and moves a fact out of the source and into the signature.
217
+ */
218
+ type PollerPolling<R> = Extract<PollerState<R>, {
219
+ phase: "polling";
220
+ }>;
221
+ type PollerDone<R> = Extract<PollerState<R>, {
222
+ phase: "done";
223
+ }>;
224
+ type PollerGaveUp<R> = Extract<PollerState<R>, {
225
+ phase: "gave_up";
226
+ }>;
206
227
  /**
207
228
  * The poller Sub type — a `../deadline` Sub under a fixed id family. One id per
208
229
  * knob instance keeps the reconcile pass from churning the timer: the same id
@@ -223,7 +244,7 @@ type PollerSub = DeadlineSub;
223
244
  */
224
245
  interface Poller<State, R> {
225
246
  /** Seed the Model slice. Idle until `start(...)` arms the first tick. */
226
- init(): PollerState<R>;
247
+ init(): PollerPolling<R>;
227
248
  /**
228
249
  * Arm the first tick. `at` is the current clock (carried in from the Msg /
229
250
  * runtime that kicks the poller off — never read inside the verb). Returns
@@ -234,7 +255,7 @@ interface Poller<State, R> {
234
255
  * fires when the deadline crosses `at + everyMs` and the consumer routes
235
256
  * `deadline_exceeded` → `tick`.
236
257
  */
237
- start(state: PollerState<R>, at: number): readonly [PollerState<R>, readonly Cmd[]];
258
+ start(state: PollerState<R>, at: number): readonly [PollerPolling<R>, readonly Cmd[]];
238
259
  /**
239
260
  * Perform one observation — the cadence verb. The consumer routes the
240
261
  * deadline Sub's `deadline_exceeded` Msg here; `tick` emits the single
@@ -274,7 +295,7 @@ interface Poller<State, R> {
274
295
  * passes the boolean. (`subs` re-checks `phase` to decide arming, so a
275
296
  * mis-passed `untilHeld` cannot leave a "done" poller arming timers.)
276
297
  */
277
- tickResult(state: PollerState<R>, result: R, at: number, untilHeld: boolean): readonly [PollerState<R>, readonly Cmd[]];
298
+ tickResult(state: PollerState<R>, result: R, at: number, untilHeld: boolean): readonly [PollerPolling<R> | PollerDone<R>, readonly Cmd[]];
278
299
  /**
279
300
  * Record a FAILED tick at clock `at`. Backs off instead of holding the
280
301
  * steady cadence:
@@ -300,7 +321,7 @@ interface Poller<State, R> {
300
321
  * body never names the global RNG, so a poller built with a fixed `rng`
301
322
  * replays a failure-and-backoff run bit-for-bit.
302
323
  */
303
- tickErr(state: PollerState<R>, error: unknown, at: number): readonly [PollerState<R>, readonly Cmd[]];
324
+ tickErr(state: PollerState<R>, error: unknown, at: number): readonly [PollerPolling<R> | PollerGaveUp<R>, readonly Cmd[]];
304
325
  /**
305
326
  * The pre-wired subscriptions cell. Returns the single tick-deadline Sub
306
327
  * while the poller is `"polling"` with an armed `nextAtMs`; returns `[]`
@@ -327,4 +348,4 @@ interface Poller<State, R> {
327
348
  */
328
349
  declare function createPoller<State, R>(config: PollerConfig<State, R>, rng?: () => number): Poller<State, R>;
329
350
 
330
- export { type Poller, type PollerConfig, type PollerState, type PollerSub, createPoller };
351
+ export { type Poller, type PollerConfig, type PollerDone, type PollerGaveUp, type PollerPolling, type PollerState, type PollerSub, createPoller };
@@ -1,10 +1,10 @@
1
- import { deadlineSub } from '../chunk-ASX7PL2K.js';
1
+ import { deadlineSub } from '../chunk-JGVL3WPL.js';
2
2
  import { asRng, defaultRetryPolicy, initRetry, recordFailure, shouldRetry, nextDelayMs } from '../chunk-Q2UM7BXU.js';
3
3
  import { idempotencyMemory } from '../chunk-BYQUGDD3.js';
4
4
  import '../chunk-K575PT4S.js';
5
5
  import '../chunk-2YFLOCWX.js';
6
- import '../chunk-ZH454CR5.js';
7
- import '../chunk-O7ED34JH.js';
6
+ import '../chunk-5EHLEUTL.js';
7
+ import '../chunk-B5VXOFMZ.js';
8
8
 
9
9
  // src/poller/index.ts
10
10
  function pollerSubId(atMs) {