@noetaris/harness 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.
package/dist/index.d.ts CHANGED
@@ -339,6 +339,22 @@ interface Observer {
339
339
  * `onObserverError` (hook name `'carry'`) and counts as `undefined`.
340
340
  */
341
341
  carry?: (ctx: RunContext) => Record<string, string> | undefined;
342
+ /**
343
+ * Called after a checkpoint was saved (`checkpoint: 'step'`): the session can now continue
344
+ * from `event.step` if this instance dies. Not called when a checkpoint was skipped or failed —
345
+ * those go to `onStoreError` with phase `'checkpoint'` (or `'claim'` when the run lost the
346
+ * session). Top-level runs only.
347
+ */
348
+ onCheckpoint?: (ctx: RunContext, event: CheckpointEvent) => void;
349
+ }
350
+ /** What {@link Observer.onCheckpoint} gets. */
351
+ interface CheckpointEvent {
352
+ /** The step the session continues from. */
353
+ readonly step: string;
354
+ /** The version of the saved row. */
355
+ readonly version: number;
356
+ /** Time spent on the checkpoint: snapshot, save and lease extension. */
357
+ readonly durationMs: number;
342
358
  }
343
359
  /**
344
360
  * The telemetry a resource needs to attribute an `invoke()` call to the correct
@@ -485,6 +501,24 @@ interface Lease {
485
501
  */
486
502
  readonly token: unknown;
487
503
  }
504
+ /**
505
+ * `'step'`: save the session after every finished top-level step, so a run whose instance dies
506
+ * continues from its last finished step. `'off'`: save only when a run settles.
507
+ */
508
+ type CheckpointMode = 'off' | 'step';
509
+ /** Options passed to {@link SessionStore.save}. */
510
+ interface SaveOptions {
511
+ /**
512
+ * The lease the caller holds on the session. When given, a store that supports claims
513
+ * must check — atomically with the version check — that the session's current claim is
514
+ * the one this lease was issued for (by the store's own claim identity, e.g. the nonce in
515
+ * `lease.token`; never by comparing times). If it is not, write nothing and throw an
516
+ * `Error` whose `name` is `'LeaseLostError'`, whatever the version: this check takes
517
+ * precedence over the version check, because the framework treats a version conflict on a
518
+ * run's last save as a failed write and carries on.
519
+ */
520
+ readonly lease?: Lease;
521
+ }
488
522
  /**
489
523
  * Operational metadata written by the framework into every {@link StoredRun}.
490
524
  *
@@ -534,8 +568,15 @@ interface SessionStore {
534
568
  * record and `run.version === 0`), the write succeeds.
535
569
  * - Otherwise, another writer committed a newer version concurrently — the
536
570
  * implementation must throw `ConcurrentModificationError`.
571
+ *
572
+ * The framework passes `options.lease` on every save it makes while holding a claim, and
573
+ * no `options` otherwise. A store that supports claims fences the write with it (see
574
+ * {@link SaveOptions.lease}), so an instance whose lease was taken over cannot overwrite
575
+ * the new owner's progress; the framework stops that run with `LeaseExpiredError`. A store
576
+ * without claims, or one that ignores `options`, keeps the version check only and gives no
577
+ * protection against such a stale owner.
537
578
  */
538
- save(agentId: string, sessionId: string, run: StoredRun): Promise<void>;
579
+ save(agentId: string, sessionId: string, run: StoredRun, options?: SaveOptions): Promise<void>;
539
580
  /**
540
581
  * Return the full ordered run history for a session, oldest first.
541
582
  * Optional — omit if your store does not support history.
@@ -543,7 +584,8 @@ interface SessionStore {
543
584
  loadHistory?(agentId: string, sessionId: string): Promise<StoredRun[]>;
544
585
  /**
545
586
  * Fork the session at the state captured by `runId`, returning a new session ID
546
- * whose initial state equals the forked run's `finalState`.
587
+ * whose initial state equals the forked run's `finalState`. When a run has several records,
588
+ * use its last one.
547
589
  * Optional — omit if your store does not support branching.
548
590
  *
549
591
  * Save the new session's version-0 record as a seed the next run continues: `phase: 'paused'`,
@@ -610,6 +652,9 @@ interface SessionStore {
610
652
  * existed is still a valid `Cursor`, so old rows load and resume unchanged.
611
653
  * - `phase: 'completed'` — the loop exited normally; `signal` holds the exit
612
654
  * signal (or is absent when the loop ended without emitting a signal).
655
+ * - `phase: 'running'` — a checkpoint, written after a finished step when checkpoints are on
656
+ * (`checkpoint: 'step'`); `step` is the step to run next, always a plain step name, and there
657
+ * is no `signal`. The run has not settled since: it is still running, or its instance died.
613
658
  */
614
659
  interface StoredRun {
615
660
  readonly agentId: string;
@@ -618,7 +663,7 @@ interface StoredRun {
618
663
  readonly version: number;
619
664
  readonly startedAt: string;
620
665
  readonly settledAt: string;
621
- readonly phase: 'paused' | 'completed';
666
+ readonly phase: 'paused' | 'completed' | 'running';
622
667
  readonly initialState: Record<string, unknown>;
623
668
  readonly finalState: Record<string, unknown>;
624
669
  readonly signal?: string;
@@ -661,6 +706,9 @@ interface StoredRun {
661
706
  * step that issued the interrupt. When the run paused inside a fork, `step` is
662
707
  * the fork's own name (not the richer per-branch detail — see `pendingInterrupts`).
663
708
  * - `'completed'` — the last run exited the loop; `signal` is the exit signal.
709
+ * - `'running'` — the last run saved a checkpoint and has not settled since: it is still
710
+ * running, or its instance died. Running the session again continues it from `step`
711
+ * (another instance gets `SessionBusyError` while the owner's claim is alive).
664
712
  */
665
713
  type SessionPhase = {
666
714
  readonly phase: 'fresh';
@@ -677,13 +725,21 @@ type SessionPhase = {
677
725
  * caller discover and resolve each one — via `Agent.resume(response, sessionId, id)` —
678
726
  * independently; the session stays `'paused'` until every entry is resolved.
679
727
  */
680
- readonly pendingInterrupts: readonly PendingInterrupt[];
728
+ readonly pendingInterrupts: readonly PendingInterrupt$1[];
681
729
  } | {
682
730
  readonly phase: 'completed';
683
731
  readonly signal?: string;
732
+ } | {
733
+ readonly phase: 'running';
734
+ /** The step the session continues from. */
735
+ readonly step: string;
736
+ /** The `instanceId` of the instance that saved the checkpoint, when it had one. */
737
+ readonly instanceId?: string;
738
+ /** When the checkpoint was saved (ISO 8601). */
739
+ readonly checkpointedAt: string;
684
740
  };
685
741
  /** One outstanding `ctx.interrupt()` call awaiting a response. See {@link SessionPhase}. */
686
- interface PendingInterrupt {
742
+ interface PendingInterrupt$1 {
687
743
  readonly interruptId: string;
688
744
  readonly prompt: unknown;
689
745
  /**
@@ -1061,6 +1117,169 @@ interface RunHandle extends PromiseLike<RunOutcome> {
1061
1117
  readonly currentStep: string | null;
1062
1118
  }
1063
1119
 
1120
+ /**
1121
+ * A copy of a state (or update) object taken when a debug stop was made. Each top-level key is
1122
+ * copied with `structuredClone`; a key whose value can't be cloned (a function, for example) keeps
1123
+ * its reference and is listed in `shared`, so its value may have changed since.
1124
+ */
1125
+ interface Snapshot {
1126
+ readonly values: Readonly<Record<string, unknown>>;
1127
+ readonly shared: readonly string[];
1128
+ }
1129
+ /** A step that has settled, as a debug stop reports it: what `onStepSettled` knows, plus state. */
1130
+ interface SettledStep {
1131
+ readonly name: string;
1132
+ readonly outcome: StepSettledEvent['outcome'];
1133
+ /** The step's return value, copied; absent when it did not return one (see {@link StepSettledEvent}). */
1134
+ readonly update?: Snapshot;
1135
+ readonly signal?: string;
1136
+ readonly next: StepSettledNext;
1137
+ readonly error?: Error;
1138
+ /** The state just before this step ran. The state after it is the stop's own `state` (or `outcome.state`). */
1139
+ readonly before: Snapshot;
1140
+ readonly durationMs: number;
1141
+ readonly fork?: StepSettledEvent['fork'];
1142
+ }
1143
+ /** A branch frame that ended, as a `branch-end` stop reports it. */
1144
+ interface EndedFrame {
1145
+ readonly frame: readonly string[];
1146
+ readonly outcome: 'done' | 'interrupt' | 'error' | 'stopped';
1147
+ readonly last?: SettledStep;
1148
+ }
1149
+ /** An interrupt the paused run is waiting on, and the frame that raised it. */
1150
+ interface PendingInterrupt {
1151
+ readonly interruptId: string;
1152
+ readonly prompt: unknown;
1153
+ readonly frame: readonly string[];
1154
+ }
1155
+ /**
1156
+ * Where a debug session stopped. `frame` is the frame the stop belongs to: `[]` for the top-level run,
1157
+ * the branch path for a fork branch.
1158
+ * - `step`: held at a step boundary of `frame`, before `next` runs. `last` is the step that just settled
1159
+ * in that frame (absent on its first stop). `reason` says why it stopped here; `branch-end` means the
1160
+ * frame the command was driving ended (see `ended`) and focus moved here.
1161
+ * - `interrupt`: the run paused on `ctx.interrupt()`; `pending` lists every interrupt it waits on
1162
+ * (depth-first, declaration order), the first one also in `interruptId` / `prompt` / `frame`.
1163
+ * Answer with {@link DebugSession.answer}.
1164
+ * - `end`: the session is over — the run completed, paused on an error, or was stopped.
1165
+ */
1166
+ type DebugStop = {
1167
+ readonly kind: 'step';
1168
+ readonly frame: readonly string[];
1169
+ readonly reason: 'start' | 'step' | 'breakpoint' | 'resume' | 'fork-entry' | 'branch-end';
1170
+ readonly runId: string;
1171
+ readonly next: string;
1172
+ readonly last?: SettledStep;
1173
+ readonly state: Snapshot;
1174
+ /** What a breakpoint condition threw, when that is why the session stopped here. */
1175
+ readonly conditionError?: unknown;
1176
+ /** With `reason: 'branch-end'`: the frame that ended. */
1177
+ readonly ended?: EndedFrame;
1178
+ } | {
1179
+ readonly kind: 'interrupt';
1180
+ readonly frame: readonly string[];
1181
+ readonly runId: string;
1182
+ readonly last: SettledStep;
1183
+ readonly interruptId: string;
1184
+ readonly prompt: unknown;
1185
+ readonly pending: readonly PendingInterrupt[];
1186
+ readonly state: Snapshot;
1187
+ } | {
1188
+ readonly kind: 'end';
1189
+ readonly runId: string;
1190
+ readonly last?: SettledStep;
1191
+ readonly outcome: RunOutcome;
1192
+ };
1193
+ /** A frame of a debug session, as {@link DebugSession.frames} lists it. */
1194
+ interface DebugFrame {
1195
+ readonly frame: readonly string[];
1196
+ /** `in-fork`: waiting for a fork it started to join. `ended`: a branch that has finished (listed until the join). */
1197
+ readonly status: 'held' | 'running' | 'in-fork' | 'ended';
1198
+ /** The step it is held before, when `held`. */
1199
+ readonly next?: string;
1200
+ }
1201
+ /** A breakpoint: stop before `step` runs, when `when` (if given) returns a truthy value. */
1202
+ interface DebugBreakpoint {
1203
+ readonly step: string;
1204
+ /** Gets the live state of the frame about to run the step, not a copy: it must not change it. */
1205
+ readonly when?: (state: Readonly<Record<string, unknown>>) => unknown;
1206
+ }
1207
+ /** Thrown (or rejected) by a {@link DebugSession} command that can't run in the session's current state. */
1208
+ declare class DebugCommandError extends Error {
1209
+ /**
1210
+ * - `busy`: another command is still running
1211
+ * - `not-held`: the focused frame is not held at a step stop (or, for `answer`, the session is not at
1212
+ * an interrupt stop; for `focus`, the frame is not held)
1213
+ * - `not-a-fork`: `stepInto` where the next step is not a fork node
1214
+ * - `reserved-key`: `setState` was given a framework key (`$…`)
1215
+ * - `ended`: the session is over
1216
+ */
1217
+ readonly reason: 'busy' | 'not-held' | 'not-a-fork' | 'reserved-key' | 'ended';
1218
+ /** The command that was refused. */
1219
+ readonly command: string;
1220
+ constructor(reason: DebugCommandError['reason'], command: string, detail?: string);
1221
+ }
1222
+ /**
1223
+ * A run of an agent driven step by step, returned by `agent.debug()`. The session starts held before
1224
+ * the first step; each command returns the next stop. It spans the whole run chain: a run that pauses
1225
+ * on an interrupt is answered with {@link answer} and stepping continues in the resumed run.
1226
+ *
1227
+ * Fork branches are frames. Stepping into a fork ({@link stepInto}) holds every branch at its first
1228
+ * step; only the focused frame runs, the others wait until focused or released with
1229
+ * {@link continueAll}. When the frame a command drives ends, focus moves to the next held frame.
1230
+ *
1231
+ * One command at a time: `next()`, `continue()`, `stepInto()`, `continueAll()` and `answer()` reject
1232
+ * with a `busy` {@link DebugCommandError} while another is running. `stop()` is valid at any time.
1233
+ *
1234
+ * While a frame is held, the session renews the run's claim (if the store can extend claims). Call
1235
+ * `stop()`, or abort the `signal` resource, to end a session you no longer drive: a held session
1236
+ * otherwise keeps the session fenced in this process.
1237
+ */
1238
+ interface DebugSession {
1239
+ readonly sessionId: string;
1240
+ /** The id of the current run; changes when an interrupt is answered. */
1241
+ readonly runId: string;
1242
+ /**
1243
+ * The focused frame's latest stop. At first, the start stop (`reason: 'start'`, `next` = the entry
1244
+ * step). While no frame is held, a promise of the next stop.
1245
+ */
1246
+ readonly current: Promise<DebugStop>;
1247
+ /** The final outcome of the last run, as `await handle` would give it. */
1248
+ readonly done: Promise<RunOutcome>;
1249
+ readonly breakpoints: ReadonlyArray<DebugBreakpoint>;
1250
+ /** The frames of the current run, depth-first in declaration order. */
1251
+ readonly frames: ReadonlyArray<DebugFrame>;
1252
+ /** Focus a held frame; returns its current stop. */
1253
+ focus(frame: readonly string[]): DebugStop;
1254
+ /** Run exactly one step of the focused frame (a whole fork, stepping over it). Ignores breakpoints at its own boundary. */
1255
+ next(): Promise<DebugStop>;
1256
+ /** At a fork: start every branch and hold each at its first step; focus the first branch. */
1257
+ stepInto(): Promise<DebugStop>;
1258
+ /** Run the focused frame until a breakpoint hits or the frame ends; other frames stay held. */
1259
+ continue(): Promise<DebugStop>;
1260
+ /** Release every held frame; resolves with the first stop any frame makes. */
1261
+ continueAll(): Promise<DebugStop>;
1262
+ /** At an `interrupt` stop: answer it (by default the stop's own interrupt) and hold before the resumed run's first step. */
1263
+ answer(response: unknown, interruptId?: string): Promise<DebugStop>;
1264
+ /**
1265
+ * While the focused frame is held at a `step` stop: set state keys of that frame, overwriting them as
1266
+ * given (no reducers). Values are copied. In a branch the keys count as written by the branch, so the
1267
+ * join keeps them (a key also written by a sibling then needs a reducer, as for any write). Reported to
1268
+ * the observer as event `debug.setState` with `{ patch }` before the frame's next step.
1269
+ */
1270
+ setState(patch: Record<string, unknown>): Snapshot;
1271
+ /** Stop before `step` when `when` returns a truthy value (always, without `when`). Replaces that step's breakpoint. */
1272
+ setBreakpoint(step: string, when?: DebugBreakpoint['when']): void;
1273
+ clearBreakpoint(step: string): void;
1274
+ /**
1275
+ * End the session. Held frames end (stopped) where they are; running steps are stopped like
1276
+ * `handle.stop()` and their frames end at the next boundary. At an interrupt stop: the session ends
1277
+ * and the interrupt stays pending as saved. Resolves with the `end` stop — the same one a pending
1278
+ * command resolves with, and again on every later call.
1279
+ */
1280
+ stop(): Promise<DebugStop>;
1281
+ }
1282
+
1064
1283
  /** Options passed to createAgent(). */
1065
1284
  interface AgentOptions {
1066
1285
  /**
@@ -1080,6 +1299,26 @@ interface AgentOptions {
1080
1299
  * `ttlMs` must be a finite number greater than 0; otherwise `createAgent` throws `InvalidClaimOptionsError`.
1081
1300
  */
1082
1301
  readonly claimOptions?: ClaimOptions;
1302
+ /**
1303
+ * Observer for every run of this agent: `agent.run()`, `handle.resume()` and `agent.resume()`.
1304
+ * A per-call `observer` is composed on top of it (this one first: its hooks fire first, its `wrap`
1305
+ * is outermost, and on a shared `carry` key the per-call value wins); it never replaces it. The
1306
+ * same object passed per call is used once. One object serves every run, concurrent runs included.
1307
+ * Must be an object; otherwise `createAgent` throws `InvalidAgentOptionError`.
1308
+ */
1309
+ readonly observer?: Observer;
1310
+ /**
1311
+ * Default sink for observer-hook errors, used when a call passes no `onObserverError`.
1312
+ * Must be a function; otherwise `createAgent` throws `InvalidAgentOptionError`.
1313
+ */
1314
+ readonly onObserverError?: ObserverErrorSink;
1315
+ /**
1316
+ * Save the session after every finished top-level step, so a run whose instance dies continues
1317
+ * from its last finished step instead of re-running the turn: `'step'`. `'off'` (the default)
1318
+ * saves only when a run settles. Ignored without a session store. A per-call `checkpoint`
1319
+ * resource overrides it. Any other value makes `createAgent` throw `InvalidAgentOptionError`.
1320
+ */
1321
+ readonly checkpoint?: CheckpointMode;
1083
1322
  }
1084
1323
  interface Agent {
1085
1324
  /** The agent's unique identifier, as provided to createAgent(). */
@@ -1101,7 +1340,8 @@ interface Agent {
1101
1340
  * Returns a RunHandle synchronously; the execution promise performs the resume.
1102
1341
  *
1103
1342
  * The optional fourth argument `resources` accepts:
1104
- * - `observer?: Observer` — structured telemetry for the resumed run (see Observability)
1343
+ * - `observer?: Observer` — structured telemetry for the resumed run, composed on top of `AgentOptions.observer` (see Observability)
1344
+ * - `onObserverError?: ObserverErrorSink` — sink for observer-hook errors; falls back to `AgentOptions.onObserverError`
1105
1345
  * - `parentRunId?: string` — the caller's run id, as for `run()`; set on this resumed run's
1106
1346
  * `RunContext` only (a later `handle.resume()` on the returned handle does not inherit it)
1107
1347
  * - `events?.onStoreError?` — raw store-error callback (unchanged from prior shape)
@@ -1110,18 +1350,53 @@ interface Agent {
1110
1350
  * on the returned handle reuses it
1111
1351
  */
1112
1352
  resume(response: unknown, sessionId: string, interruptId: string, resources?: Record<string, unknown>): RunHandle;
1353
+ /**
1354
+ * Start a run held before its first step, to drive it step by step. Takes the same `initialState`
1355
+ * and `resources` as {@link run} and returns a {@link DebugSession}, whose `current` resolves to
1356
+ * the start stop. While the session lasts, `run()`, `resume()` and `debug()` on its session throw
1357
+ * `SessionInDebugError` (in this process only). The `signal` resource, when given, ends the session
1358
+ * when aborted, in any state.
1359
+ *
1360
+ * Step durations exclude the time held; a run's duration (`onRunEnd`) includes it.
1361
+ */
1362
+ debug(initialState: Record<string, unknown>, resources: Record<string, unknown>): DebugSession;
1113
1363
  /**
1114
1364
  * Query the session store for the current phase of a session.
1115
1365
  */
1116
1366
  status(sessionId: string): Promise<SessionPhase>;
1117
1367
  }
1118
- /** Thrown by `agent.run()` when `sessionId` or `requestId` is given but is not a non-empty string. */
1368
+ /** Thrown by {@link createAgent} when `agentOptions.claimOptions.ttlMs` is not a finite number greater than 0. */
1369
+ declare class InvalidClaimOptionsError extends Error {
1370
+ /** The rejected `ttlMs` value, as given. */
1371
+ readonly ttlMs: unknown;
1372
+ constructor(ttlMs: unknown);
1373
+ }
1374
+ declare const AGENT_OPTION_EXPECTED: {
1375
+ readonly observer: "an object";
1376
+ readonly onObserverError: "a function";
1377
+ readonly checkpoint: "'off' or 'step'";
1378
+ };
1379
+ /**
1380
+ * Thrown by {@link createAgent} when `agentOptions.observer` is not an object, `agentOptions.onObserverError`
1381
+ * is not a function, or `agentOptions.checkpoint` is not `'off'` or `'step'`.
1382
+ */
1383
+ declare class InvalidAgentOptionError extends Error {
1384
+ /** The option that was rejected. */
1385
+ readonly key: keyof typeof AGENT_OPTION_EXPECTED;
1386
+ /** The rejected value, as given. */
1387
+ readonly value: unknown;
1388
+ constructor(key: keyof typeof AGENT_OPTION_EXPECTED, value: unknown);
1389
+ }
1390
+ /**
1391
+ * Thrown by `agent.run()` when `sessionId` or `requestId` is given but is not a non-empty string, and by
1392
+ * `agent.run()`, `agent.debug()` and `agent.resume()` when `checkpoint` is given but is not `'off'` or `'step'`.
1393
+ */
1119
1394
  declare class InvalidRunResourceError extends Error {
1120
1395
  /** The resource key that was rejected. */
1121
- readonly key: 'sessionId' | 'requestId';
1396
+ readonly key: 'sessionId' | 'requestId' | 'checkpoint';
1122
1397
  /** The rejected value, as given. */
1123
1398
  readonly value: unknown;
1124
- constructor(key: 'sessionId' | 'requestId', value: unknown);
1399
+ constructor(key: 'sessionId' | 'requestId' | 'checkpoint', value: unknown);
1125
1400
  }
1126
1401
  /**
1127
1402
  * Instantiate an agent from a fully-configured {@link Harness}.
@@ -1160,6 +1435,17 @@ declare class SessionInFlightError extends Error {
1160
1435
  readonly sessionId: string;
1161
1436
  constructor(sessionId: string);
1162
1437
  }
1438
+ /**
1439
+ * Thrown by {@link Agent.run}, {@link Agent.resume} or {@link Agent.debug} when the given session is
1440
+ * being debugged by a debug session of the same agent instance. The fence is in-process only.
1441
+ *
1442
+ * Stop the debug session (`stop()`) or let it end before running the session normally.
1443
+ */
1444
+ declare class SessionInDebugError extends Error {
1445
+ /** The session being debugged. */
1446
+ readonly sessionId: string;
1447
+ constructor(sessionId: string);
1448
+ }
1163
1449
  /**
1164
1450
  * Thrown by {@link Agent.run} when the session is paused on an unanswered
1165
1451
  * interrupt. Call {@link Agent.resume} (or `handle.resume()`) instead.
@@ -1205,7 +1491,13 @@ declare class SessionBusyError extends Error {
1205
1491
  declare class LeaseExpiredError extends Error {
1206
1492
  /** The session whose lease expired. */
1207
1493
  readonly sessionId: string;
1208
- constructor(sessionId: string);
1494
+ /**
1495
+ * The store's error when the store rejected a save: its `LeaseLostError` (the session's
1496
+ * claim is no longer this run's lease), or, on a checkpoint, its `ConcurrentModificationError`
1497
+ * (another writer saved first). Absent when the expiry was seen on the local clock.
1498
+ */
1499
+ readonly cause?: unknown;
1500
+ constructor(sessionId: string, cause?: unknown);
1209
1501
  }
1210
1502
 
1211
1503
  /**
@@ -1219,4 +1511,4 @@ declare class NoInterruptError extends Error {
1219
1511
  constructor();
1220
1512
  }
1221
1513
 
1222
- export { type Agent, type AgentOptions, type BranchCursor, type BranchDef, type ClaimOptions, type Cursor, type DeepWithMarkers, type FieldDefinition, type ForkCursor, type ForkDef, type FrameworkState, type Harness, InvalidRunResourceError, type Lease, LeaseExpiredError, type LoopDefinition, type LoopNode, LoopNotDefinedError, NoInterruptError, type Observer, type ObserverAware, type ObserverErrorContext, type ObserverErrorSink, REQUIRED_TAG, RUNTIME_TAG, type RequiredMarker, type RouteFn, type RunCarrier, type RunContext, type RunFn, type RunRef, type RuntimeMarker, SessionBusyError, SessionInFlightError, SessionPendingInterruptError, type SessionStore, type SignalTransition, type StateFromSchema, type StepContext, type StepDef, type StepSettledEvent, type StepSettledNext, type StepState, StoreLoadError, type StoredRun, type StoredRunMetadata, type TelemetryContext, type TransitionTarget, type WrapScope, composeObservers, createAgent, createHarness, field, isForkCursor, isForkDef, isRequiredMarker, isRuntimeMarker, required, runtime };
1514
+ export { type Agent, type AgentOptions, type BranchCursor, type BranchDef, type CheckpointEvent, type CheckpointMode, type ClaimOptions, type Cursor, type DebugBreakpoint, DebugCommandError, type DebugFrame, type DebugSession, type DebugStop, type DeepWithMarkers, type EndedFrame, type FieldDefinition, type ForkCursor, type ForkDef, type FrameworkState, type Harness, InvalidAgentOptionError, InvalidClaimOptionsError, InvalidRunResourceError, type Lease, LeaseExpiredError, type LoopDefinition, type LoopNode, LoopNotDefinedError, NoInterruptError, type Observer, type ObserverAware, type ObserverErrorContext, type ObserverErrorSink, type PendingInterrupt, REQUIRED_TAG, RUNTIME_TAG, type RequiredMarker, type RouteFn, type RunCarrier, type RunContext, type RunFn, type RunRef, type RuntimeMarker, type SaveOptions, SessionBusyError, SessionInDebugError, SessionInFlightError, SessionPendingInterruptError, type SessionStore, type SettledStep, type SignalTransition, type Snapshot, type StateFromSchema, type StepContext, type StepDef, type StepSettledEvent, type StepSettledNext, type StepState, StoreLoadError, type StoredRun, type StoredRunMetadata, type TelemetryContext, type TransitionTarget, type WrapScope, composeObservers, createAgent, createHarness, field, isForkCursor, isForkDef, isRequiredMarker, isRuntimeMarker, required, runtime };