@cotal-ai/runtime 0.0.1 → 0.25.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.
@@ -0,0 +1,310 @@
1
+ import { type CheckpointRef, type CheckpointSettleFact } from "@cotal-ai/core";
2
+ import type { JetStreamClient, JetStreamManager } from "@nats-io/jetstream";
3
+ import type { KV } from "@nats-io/kv";
4
+ import { type WaitRequest, type CheckpointRaw, type CheckpointRequest, type EffectContext, type JournalEntry, type NotifyRequest, type SleepRequest } from "@cotal-ai/lang";
5
+ /** Who this handler acts as, and where. All of it is the DRIVER's identity, not the program's. */
6
+ export interface MeshHandlerBinding {
7
+ readonly space: string;
8
+ /** The endpoint hosting the driver — the manager daemon. */
9
+ readonly endpoint: string;
10
+ /**
11
+ * WHICH RUN this handler performs for.
12
+ *
13
+ * It is here rather than on `EffectContext` because the effect context deliberately
14
+ * carries the step's identity and nothing about the run: `requestId` already folds the run
15
+ * in, and a handler that needed to name the run for recovery would be recovering by something
16
+ * other than the recorded identity. A NOTICE is keyed by its run, though — it is filed onto the
17
+ * run — so the run is part of what this handler is bound to. A drive is already shaped that way:
18
+ * the caller hands `drive()` a run id and a handler together.
19
+ */
20
+ readonly runId: string;
21
+ readonly instanceId: string;
22
+ readonly epoch: number;
23
+ /**
24
+ * MANDATORY, and the reason is worth keeping next to it: a checkpoint's resume is holder-bound,
25
+ * so an omitted holder would make the token a BEARER credential resumable by anyone who learns
26
+ * it (SPEC 13.6/13.10).
27
+ */
28
+ readonly holder: {
29
+ readonly id: string;
30
+ readonly lifecycleUid: string;
31
+ };
32
+ /**
33
+ * The deadline a `checkpoint` gets when the program names no `timeout`.
34
+ *
35
+ * MANDATORY, because `mintCheckpoint` requires a future deadline and there is no such thing as a
36
+ * checkpoint that waits forever on this plane: an unbounded pause is a run that can never be
37
+ * reconciled, and picking a silent constant here would be this file deciding a pin. It is read
38
+ * ONLY at the first mint — a resume finds the checkpoint already minted, and the recorded
39
+ * deadline is the authority from then on, so changing this never moves a pause already taken.
40
+ */
41
+ readonly defaultCheckpointTimeout: string;
42
+ }
43
+ /**
44
+ * A checkpoint resumed with no answer to read.
45
+ *
46
+ * The settle fact is the arbiter and it NAMES the answer it accepted, so a `resumed` settlement
47
+ * with no id — or with an id no record answers to — means the token was presented by something
48
+ * other than the run driver's own `resolveCheckpoint`. There is no honest value to return for it:
49
+ * the program asked a question, something released the pause, and what was answered is not
50
+ * recoverable. Returning `resolved` with an empty value would invent one.
51
+ */
52
+ export declare class CheckpointAnswerMissing extends Error {
53
+ readonly token: string;
54
+ readonly answerId: string | undefined;
55
+ constructor(token: string, answerId: string | undefined);
56
+ }
57
+ /** How the handler learns that a checkpoint settled. Injected so a test can drive it directly. */
58
+ export interface SettleWatcher {
59
+ /**
60
+ * Resolve when this ref's one-use settle fact exists. Called AFTER the mint, so a fact that
61
+ * already landed — the ordinary case for a run resuming across a crash — must resolve at once
62
+ * rather than wait for an event that has already happened.
63
+ */
64
+ awaitSettle(ref: CheckpointRef): Promise<CheckpointSettleFact>;
65
+ }
66
+ export declare class MeshHandler {
67
+ private readonly kv;
68
+ private readonly js;
69
+ private readonly jsm;
70
+ private readonly binding;
71
+ private readonly watcher;
72
+ private readonly clock;
73
+ constructor(kv: KV, js: JetStreamClient, jsm: JetStreamManager, binding: MeshHandlerBinding, watcher: SettleWatcher, clock?: () => number);
74
+ now(): number;
75
+ /**
76
+ * WHAT to repair when this process takes a run over. The driver decides WHEN and calls this.
77
+ *
78
+ * It is a method rather than an optional hook the host wires: an adopted run whose timers stay
79
+ * armed at the predecessor's coordinates fires where nobody listens, and the object that knows how
80
+ * to re-arm is the one the driver already holds.
81
+ *
82
+ * Failures are raised, not swallowed: a driver holding a run whose pauses it could not re-arm
83
+ * cannot advance it.
84
+ */
85
+ adopted(entries: readonly JournalEntry[]): Promise<string[]>;
86
+ /**
87
+ * `sleep` is a checkpoint nobody answers.
88
+ *
89
+ * There is no separate timer plane and there should not be one: a durable pause with a deadline,
90
+ * a token that survives a crash, and a one-use settle is exactly what the checkpoint plane is,
91
+ * and a second mechanism would be a second thing to get wrong. The difference is only that no
92
+ * `resolveCheckpoint` will ever arrive for this token, so the timer's expiry is the whole story
93
+ * and `null` is the whole answer.
94
+ */
95
+ sleep(req: SleepRequest, ctx: EffectContext): Promise<null>;
96
+ /**
97
+ * `checkpoint` is the same durable pause with somebody expected to answer it.
98
+ *
99
+ * The mint is identical to `sleep`'s — one token, one deadline, one settle fact — and everything
100
+ * that differs is on the ANSWER side, which is deliberately not this handler's to arrange: the
101
+ * run driver's `resolveCheckpoint` writes the answer record and presents the token, because the
102
+ * checkpoint's holder is the driver and a resume is holder-bound. So this waits, and then reads
103
+ * what the arbiter says was accepted.
104
+ *
105
+ * It returns the RAW outcome and never the program's result. Whether an expiry throws or returns
106
+ * is `onExpiry`, which is computed from today's source on the live path and the replay path
107
+ * alike; deciding it here would bake one answer into the journal.
108
+ */
109
+ checkpoint(req: CheckpointRequest, ctx: EffectContext): Promise<CheckpointRaw>;
110
+ /**
111
+ * `wait` — an event await that survives the process waiting for it.
112
+ *
113
+ * A DURABLE consumer named from `ctx.requestId` holds the run's position on the channel, so an
114
+ * event published while the host was down is still there when the run re-attaches under the same
115
+ * derived name. An ephemeral consumer, or one created on resume, starts from "now" and the event
116
+ * never happened.
117
+ *
118
+ * The TIMEOUT rides the checkpoint plane and is minted once with an absolute deadline, so a
119
+ * resumed 20-minute wait with 30 seconds left has 30 seconds left. A timeout resolves `null` and
120
+ * never throws: `??` is `otherwise`.
121
+ *
122
+ * `replied(agent)` and `down(agent)` are not here. They address an agent handle, which only
123
+ * `spawn` produces, so they refuse through the same named seam as the durable actions.
124
+ */
125
+ wait(req: WaitRequest, ctx: EffectContext): Promise<unknown | null>;
126
+ /**
127
+ * `notify` writes one bounded decision record per addressee, onto the run.
128
+ *
129
+ * NOT a channel post, and that is the whole point of the primitive: a post would put the program
130
+ * into the conversation as a participant, where conversation is the data plane and
131
+ * the program is the control plane. A notice is data filed on the run and rendered ahead of the
132
+ * addressee's next turn.
133
+ *
134
+ * **One call to N agents is N records, and a retry lands on its own.** The id is derived from the
135
+ * step's request id and the addressee, so a crash between the second and third write is repaired
136
+ * by re-running the call: the first two creates find their own bytes and return, the third
137
+ * happens. Nothing is written twice and nothing needs a memo of how far it got.
138
+ *
139
+ * The fact's bound is the language's and is enforced BEFORE this is reached (L3043 at the effect
140
+ * boundary), so a fact that could not be rendered as one table row cannot arrive here.
141
+ */
142
+ notify(req: NotifyRequest, ctx: EffectContext): Promise<null>;
143
+ spawn(_req: unknown, _ctx: EffectContext): Promise<never>;
144
+ turn(_req: unknown, _ctx: EffectContext): Promise<never>;
145
+ ask(_req: unknown, _ctx: EffectContext): Promise<never>;
146
+ monitor(_req: unknown, _ctx: EffectContext): Promise<never>;
147
+ /**
148
+ * A conclave, refused with the rest — and this one is an OVER-refusal, stated rather than hidden.
149
+ *
150
+ * A conclave's members are agent handles, so the ordinary case is gated exactly like the others.
151
+ * `conclave([], …)` is not: a sub-team with nobody in it is a channel, and the channel plane is
152
+ * here. It is refused anyway, because shipping the empty case alone would put half a primitive on
153
+ * the durable plane — a program that works with no members and refuses with one is a worse thing
154
+ * to explain than a primitive that is not here yet.
155
+ */
156
+ openConclave(_req: unknown, _ctx: EffectContext): Promise<never>;
157
+ closeConclave(_req: unknown, _ctx: EffectContext): Promise<never>;
158
+ /**
159
+ * Arm this pause, or ATTACH to the one already recorded under the same token.
160
+ *
161
+ * A mint is idempotent only if the whole spec is identical, so the recorded deadline is the
162
+ * authority and a resume may not recompute one: `now() + duration` is a different deadline a
163
+ * second later, and the plane reads a different deadline as a different intent. The pause holds
164
+ * it; a second copy anywhere else is a second thing to disagree.
165
+ *
166
+ * An already-passed deadline cannot be minted at all, correctly, because a due pause is not being
167
+ * armed. It needs its schedule re-emitted at the status's current generation, which is the
168
+ * reconciler's job. A spec with no status and an elapsed deadline is unrepairable from here, so it
169
+ * is raised rather than waited on.
170
+ */
171
+ private arm;
172
+ /** Push a live deadline out — the idle window restarting. The heartbeat CAS-advances the
173
+ * generation before replacing the timer, so a fire from the old one no-ops rather than racing. */
174
+ private push;
175
+ /**
176
+ * Take the broker's `.fire` for this deadline, if it has published one, and let the checkpoint
177
+ * plane judge it. Answers whether the fire SETTLED the pause.
178
+ *
179
+ * A fire is a MESSAGE and a settlement is a FACT; `handleCheckpointFire` is what turns one into
180
+ * the other, and a pause nobody answers ends no other way.
181
+ *
182
+ * READ BY SUBJECT rather than by a subscription, because the fire is a record of a deadline
183
+ * passing and callers here are already polling: `last_by_subj` gives the current one whether it
184
+ * arrived a moment ago or while this host was down, and a resume lands in the second case.
185
+ *
186
+ * IDEMPOTENT BY THE PLANE rather than by bookkeeping here: a fire handed over twice finds the
187
+ * pause settled and declines. The one repeated verdict with a side effect is `re-armed` under
188
+ * owner-behind clock skew, and over-emission is idempotent at the timer writer.
189
+ */
190
+ private takeFire;
191
+ /** Has this deadline settled? `undefined` for "no deadline" and for "not yet".
192
+ *
193
+ * A `wait` observes its deadlines by polling this, so the fire is taken on the same poll: the
194
+ * settle fact a `wait` is reading for is one this process has to produce, and reading for it
195
+ * without ever producing it is how a `wait` with a timeout waited past its timeout forever. */
196
+ private expired;
197
+ /** End a deadline that is no longer waited on, by claiming its one-use settlement with no answer.
198
+ * A timer left armed would fire into a run that has moved on; claiming it is how the plane says
199
+ * "this pause is over" without a second mechanism for cancellation. */
200
+ private cancelTimer;
201
+ /** The message at a recorded stream sequence — the re-bind path after a crash. */
202
+ private messageAt;
203
+ /**
204
+ * Wait for this token's one-use settlement.
205
+ *
206
+ * A settle that ALREADY landed is the ordinary case on a resume: the run crashed while paused and
207
+ * the timer fired, or somebody answered, without it. Reading before waiting is not an
208
+ * optimization, it is the difference between resuming and waiting forever for an event that is
209
+ * already in the past.
210
+ */
211
+ private settle;
212
+ /** Take this deadline's fire for as long as somebody is waiting on it. */
213
+ private pumpFires;
214
+ }
215
+ /** The durable that holds one wait's position on a channel. Derived from the step's own request id,
216
+ * which is why a resumed run finds the consumer its earlier attempt created rather than starting
217
+ * again from "now" — and why nothing about the wait has to be remembered across a crash. */
218
+ export declare function waitConsumerName(requestId: string): string;
219
+ /**
220
+ * The one definition of a wait's consumer, shared by the handler and by anything that has to
221
+ * recreate it — so the name a resume looks for and the name a wait creates cannot drift apart.
222
+ *
223
+ * `deliver_policy: "new"` applies only to the FIRST create: an existing durable keeps its own
224
+ * position, which is exactly what a resume needs, and events from before the program asked are not
225
+ * this wait's to see.
226
+ */
227
+ export declare function waitConsumerConfig(space: string, requestId: string, channel: string): Record<string, unknown>;
228
+ /**
229
+ * An effect whose durable substrate has not landed on this host.
230
+ *
231
+ * An honest two-exit, and deliberately not a fake success: the simulator implements these, so a
232
+ * program that uses them can be written, validated and dry-run today — but a DURABLE run refuses
233
+ * rather than performing them on a plane that could not recover them. A run that "succeeded" at an
234
+ * effect nothing can replay would be a lie the journal then carries forever.
235
+ */
236
+ export declare class NotYetDurable extends Error {
237
+ readonly effect: string;
238
+ readonly needs: string;
239
+ /**
240
+ * L5016, and it is load-bearing rather than decorative.
241
+ *
242
+ * The interpreter wraps a handler's fault into an `EffectError` and SETTLES the entry with it, so
243
+ * the class does not survive the boundary — a caller of `run()` sees an `EffectError`, and the
244
+ * journal keeps whatever code was on it. Without this the entry would read `L4000 handler-fault`:
245
+ * "the handler broke", written durably about a step nothing ever attempted. The interpreter
246
+ * honours an L-code a handler raises, so the recorded fact says what actually happened.
247
+ */
248
+ readonly code = "L5016";
249
+ constructor(effect: string, needs: string);
250
+ }
251
+ /**
252
+ * RE-ARM the timers of every pause this run is still holding, under THIS driver's coordinates.
253
+ *
254
+ * A checkpoint's armed schedule fires onto `ept.<space>.<e>.<instanceId>.<epoch>.<token>.fire`,
255
+ * derived from the coordinates of the instance that armed it. A run adopted by another host — or by
256
+ * the same host at a new epoch — therefore has live timers firing at a subject nobody is reading,
257
+ * and its pauses would sit until something else swept them. Nothing about that is repaired by
258
+ * resuming the program: the effect is a replayed pending step that goes straight back to waiting.
259
+ *
260
+ * So the driver re-emits a schedule request for each outstanding token at the CURRENT generation,
261
+ * which the timer writer arms onto this instance's own fire subject. Over-emission is harmless by
262
+ * construction (same `(timerId, generation)` re-derives the same `.armed`, a no-op replacement), so
263
+ * this is safe to run on every takeover and needs no record of what it did last time.
264
+ *
265
+ * Called AFTER the barrier activated, never before: arming timers for a run this process turned out
266
+ * not to hold would point another driver's fires at this one.
267
+ */
268
+ export declare function rearmOutstandingPauses(deps: {
269
+ kv: KV;
270
+ js: JetStreamClient;
271
+ jsm: JetStreamManager;
272
+ }, binding: Pick<MeshHandlerBinding, "space" | "endpoint" | "instanceId" | "epoch">, entries: readonly JournalEntry[]): Promise<string[]>;
273
+ /**
274
+ * The checkpoint tokens a replayed prefix leaves open.
275
+ *
276
+ * An entry is open when its LAST record is `pending`, so the map is built in append order and the
277
+ * later record wins — a step that settled has a settled entry after its pending one, and reading
278
+ * only the first would re-arm timers for pauses that are already over.
279
+ *
280
+ * THE KINDS ARE THE THREE THAT ARM A TIMER, and `wait` is one of them. It mints no pause of its own
281
+ * so it does not look like one, but its idle window and its timeout are mediated deadlines exactly
282
+ * as `sleep`'s is, and a `wait` adopted at a new epoch would otherwise wait on a deadline no live
283
+ * epoch fires.
284
+ *
285
+ * An idle wait with a timeout arms TWO, and the second is DERIVED rather than recorded, so it is
286
+ * re-derived here for the same reason the live path derives it: a resume that had to remember it
287
+ * would be carrying state the key already determines. Emitting it for a wait that never minted one
288
+ * is harmless by construction — the reconciler reads the checkpoint's status first and re-emits
289
+ * nothing when there is none — and the alternative, reading the request shape back out of the
290
+ * entry to decide, would make the repair depend on a field a replay is not guaranteed to carry.
291
+ */
292
+ export declare function outstandingPauseTokens(entries: readonly JournalEntry[]): string[];
293
+ /**
294
+ * The settle watcher over EPF, which is where the one-use settle fact lives.
295
+ *
296
+ * An EPHEMERAL consumer filtered to this token's settle subject, created for one wait and removed
297
+ * after it: the fact is written once and read once, so a durable would be a name to collide on and
298
+ * a thing to clean up, for a subscription that outlives nothing. `deliver_policy: all` because the
299
+ * fact may already be there — a settle is a record, not a notification, and a watcher that only saw
300
+ * new messages would wait forever for one that already happened.
301
+ */
302
+ export declare class EpfSettleWatcher implements SettleWatcher {
303
+ private readonly js;
304
+ private readonly jsm;
305
+ private readonly space;
306
+ private readonly pollMs;
307
+ constructor(js: JetStreamClient, jsm: JetStreamManager, space: string, pollMs?: number);
308
+ awaitSettle(ref: CheckpointRef): Promise<CheckpointSettleFact>;
309
+ }
310
+ //# sourceMappingURL=mesh-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh-handler.d.ts","sourceRoot":"","sources":["../src/mesh-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,EAoBL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAE1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAGlB,MAAM,gBAAgB,CAAC;AAExB,kGAAkG;AAClG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,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