@linnlabs/linnkit 0.35.1 → 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.
Files changed (49) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cli.cjs +13 -3
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +13 -3
  5. package/dist/cli.js.map +1 -1
  6. package/dist/contracts/agentSpec.d.cts +30 -30
  7. package/dist/contracts/agentSpec.d.ts +30 -30
  8. package/dist/contracts/audit.d.cts +32 -32
  9. package/dist/contracts/audit.d.ts +32 -32
  10. package/dist/contracts/contextPolicy.d.cts +36 -36
  11. package/dist/contracts/contextPolicy.d.ts +36 -36
  12. package/dist/contracts/events.d.cts +1114 -1114
  13. package/dist/contracts/events.d.ts +1114 -1114
  14. package/dist/contracts/execution.d.cts +8 -8
  15. package/dist/contracts/execution.d.ts +8 -8
  16. package/dist/contracts/messages.d.cts +1178 -1178
  17. package/dist/contracts/messages.d.ts +1178 -1178
  18. package/dist/contracts/provider-continuation.d.cts +28 -28
  19. package/dist/contracts/provider-continuation.d.ts +28 -28
  20. package/dist/contracts/sse.d.cts +899 -899
  21. package/dist/contracts/sse.d.ts +899 -899
  22. package/dist/contracts/sub-run-trace-payload.d.cts +26 -26
  23. package/dist/contracts/sub-run-trace-payload.d.ts +26 -26
  24. package/dist/contracts/token-accounting.d.cts +46 -46
  25. package/dist/contracts/token-accounting.d.ts +46 -46
  26. package/dist/index.cjs +13 -3
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +13 -3
  29. package/dist/index.js.map +1 -1
  30. package/dist/quickstart.cjs +13 -3
  31. package/dist/quickstart.cjs.map +1 -1
  32. package/dist/quickstart.js +13 -3
  33. package/dist/quickstart.js.map +1 -1
  34. package/dist/runtime-kernel/events/agentEvents.d.cts +172 -172
  35. package/dist/runtime-kernel/events/agentEvents.d.ts +172 -172
  36. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +3 -1
  37. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +3 -1
  38. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.cts +2 -2
  39. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.ts +2 -2
  40. package/dist/runtime-kernel.cjs +13 -3
  41. package/dist/runtime-kernel.cjs.map +1 -1
  42. package/dist/runtime-kernel.js +13 -3
  43. package/dist/runtime-kernel.js.map +1 -1
  44. package/dist/testkit.cjs +13 -3
  45. package/dist/testkit.cjs.map +1 -1
  46. package/dist/testkit.js +13 -3
  47. package/dist/testkit.js.map +1 -1
  48. package/docs/integration/run-supervisor.md +2 -0
  49. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -14,6 +14,15 @@ 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
+
17
26
  ## [0.35.1] - 2026-09-11
18
27
 
19
28
  ### Fixed
package/dist/cli.cjs CHANGED
@@ -11946,7 +11946,7 @@ function createAwaitingUserWatcher(options) {
11946
11946
  const onClose = () => {
11947
11947
  dispose();
11948
11948
  };
11949
- eventBus.on("event", onEvent);
11949
+ if (options.stateOwner !== "host") eventBus.on("event", onEvent);
11950
11950
  eventBus.on("close", onClose);
11951
11951
  return dispose;
11952
11952
  }
@@ -12422,6 +12422,7 @@ var DefaultRunSupervisor = class {
12422
12422
  this.runSlotLimiter = createRunSlotLimiter({ maxActiveRuns: options.maxActiveRuns });
12423
12423
  this.runConcurrencyKeys = createRunConcurrencyKeyRegistry();
12424
12424
  this.awaitingUserWatcher = createAwaitingUserWatcher({
12425
+ stateOwner: options.awaitingUserStateOwner,
12425
12426
  markAwaitingUser: (runId, patch) => this.getHandle(runId).markAwaitingUser(patch),
12426
12427
  onDisposed: (runId) => {
12427
12428
  this.eventWatchDisposers.delete(runId);
@@ -12618,8 +12619,17 @@ var DefaultRunSupervisor = class {
12618
12619
  canRestoreRun: this.canRestoreRun
12619
12620
  });
12620
12621
  }
12621
- async pause(runId, reason) {
12622
- 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
+ });
12623
12633
  }
12624
12634
  async resumePausedRun(input) {
12625
12635
  return this.withRunControlLock(input.runId, async () => {