@linnlabs/linnkit 0.35.0 → 0.36.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/CHANGELOG.md CHANGED
@@ -14,6 +14,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.36.0] - 2026-09-11
18
+
19
+ ### Added
20
+
21
+ - Explicit Host ownership of awaiting-user lifecycle for atomic checkpoint integrations.
22
+ Provisional interaction events no longer have to change execution ownership before commit.
23
+ - Pause commands can fence the expected execution identity inside the Supervisor control
24
+ lock, so a queued stale pause cannot interrupt a newly continued execution.
25
+
26
+ ## [0.35.1] - 2026-09-11
27
+
28
+ ### Fixed
29
+
30
+ - Initialize durable graph budgets before the first checkpoint, including child runs
31
+ with execution policies. Every initial checkpoint now passes the public storage parser.
32
+
17
33
  ## [0.35.0] - 2026-09-11
18
34
 
19
35
  ### Added
package/dist/cli.cjs CHANGED
@@ -3088,13 +3088,21 @@ var GraphExecutor = class {
3088
3088
  if (existing) {
3089
3089
  throw new Error(`Graph checkpoint already exists: ${checkpointKey}`);
3090
3090
  }
3091
- this.ephemeralLocals.set(checkpointKey, { ...local });
3091
+ const initialLocal = this.executionCheckpointPort ? {
3092
+ ...local,
3093
+ executorLocal: {
3094
+ ...isRecord4(local.executorLocal) ? local.executorLocal : {},
3095
+ stepCount: 0,
3096
+ maxSteps: options.maxSteps ?? this.config.maxSteps
3097
+ }
3098
+ } : local;
3099
+ this.ephemeralLocals.set(checkpointKey, { ...initialLocal });
3092
3100
  await this.commitCheckpoint(checkpointKey, {
3093
3101
  nodeId,
3094
3102
  ...this.executionCheckpointPort ? { executionStatus: "ready" } : {},
3095
3103
  revision: 1,
3096
3104
  schemaVersion: ENGINE_STATE_SCHEMA_VERSION,
3097
- local: sanitizeCheckpointLocal(local)
3105
+ local: sanitizeCheckpointLocal(initialLocal)
3098
3106
  });
3099
3107
  return this.runUntilYieldQueued(
3100
3108
  checkpointKey,
@@ -11938,7 +11946,7 @@ function createAwaitingUserWatcher(options) {
11938
11946
  const onClose = () => {
11939
11947
  dispose();
11940
11948
  };
11941
- eventBus.on("event", onEvent);
11949
+ if (options.stateOwner !== "host") eventBus.on("event", onEvent);
11942
11950
  eventBus.on("close", onClose);
11943
11951
  return dispose;
11944
11952
  }
@@ -12414,6 +12422,7 @@ var DefaultRunSupervisor = class {
12414
12422
  this.runSlotLimiter = createRunSlotLimiter({ maxActiveRuns: options.maxActiveRuns });
12415
12423
  this.runConcurrencyKeys = createRunConcurrencyKeyRegistry();
12416
12424
  this.awaitingUserWatcher = createAwaitingUserWatcher({
12425
+ stateOwner: options.awaitingUserStateOwner,
12417
12426
  markAwaitingUser: (runId, patch) => this.getHandle(runId).markAwaitingUser(patch),
12418
12427
  onDisposed: (runId) => {
12419
12428
  this.eventWatchDisposers.delete(runId);
@@ -12610,8 +12619,17 @@ var DefaultRunSupervisor = class {
12610
12619
  canRestoreRun: this.canRestoreRun
12611
12620
  });
12612
12621
  }
12613
- async pause(runId, reason) {
12614
- await this.withRunControlLock(runId, () => this.getHandle(runId).pause(reason));
12622
+ async pause(runId, reason, expectedExecutionId) {
12623
+ await this.withRunControlLock(runId, async () => {
12624
+ const handle = this.getHandle(runId);
12625
+ if (expectedExecutionId !== void 0) {
12626
+ const record = await this.registryStore.load(runId);
12627
+ if (record?.metadata?.executionId !== expectedExecutionId) {
12628
+ throw new RunInteractionConflictError(runId, "pause execution ownership has changed");
12629
+ }
12630
+ }
12631
+ await handle.pause(reason);
12632
+ });
12615
12633
  }
12616
12634
  async resumePausedRun(input) {
12617
12635
  return this.withRunControlLock(input.runId, async () => {