@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.
- package/CHANGELOG.md +9 -0
- package/dist/cli.cjs +13 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +13 -3
- package/dist/cli.js.map +1 -1
- package/dist/contracts/agentSpec.d.cts +30 -30
- package/dist/contracts/agentSpec.d.ts +30 -30
- package/dist/contracts/audit.d.cts +32 -32
- package/dist/contracts/audit.d.ts +32 -32
- package/dist/contracts/contextPolicy.d.cts +36 -36
- package/dist/contracts/contextPolicy.d.ts +36 -36
- package/dist/contracts/events.d.cts +1114 -1114
- package/dist/contracts/events.d.ts +1114 -1114
- package/dist/contracts/execution.d.cts +8 -8
- package/dist/contracts/execution.d.ts +8 -8
- package/dist/contracts/messages.d.cts +1178 -1178
- package/dist/contracts/messages.d.ts +1178 -1178
- package/dist/contracts/provider-continuation.d.cts +28 -28
- package/dist/contracts/provider-continuation.d.ts +28 -28
- package/dist/contracts/sse.d.cts +899 -899
- package/dist/contracts/sse.d.ts +899 -899
- package/dist/contracts/sub-run-trace-payload.d.cts +26 -26
- package/dist/contracts/sub-run-trace-payload.d.ts +26 -26
- package/dist/contracts/token-accounting.d.cts +46 -46
- package/dist/contracts/token-accounting.d.ts +46 -46
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/quickstart.cjs +13 -3
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +13 -3
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/events/agentEvents.d.cts +172 -172
- package/dist/runtime-kernel/events/agentEvents.d.ts +172 -172
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +3 -1
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +3 -1
- package/dist/runtime-kernel/run-supervisor/runSupervisor.d.cts +2 -2
- package/dist/runtime-kernel/run-supervisor/runSupervisor.d.ts +2 -2
- package/dist/runtime-kernel.cjs +13 -3
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.js +13 -3
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +13 -3
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.js +13 -3
- package/dist/testkit.js.map +1 -1
- package/docs/integration/run-supervisor.md +2 -0
- package/package.json +2 -2
package/dist/quickstart.cjs
CHANGED
|
@@ -12059,7 +12059,7 @@ function createAwaitingUserWatcher(options) {
|
|
|
12059
12059
|
const onClose = () => {
|
|
12060
12060
|
dispose();
|
|
12061
12061
|
};
|
|
12062
|
-
eventBus.on("event", onEvent);
|
|
12062
|
+
if (options.stateOwner !== "host") eventBus.on("event", onEvent);
|
|
12063
12063
|
eventBus.on("close", onClose);
|
|
12064
12064
|
return dispose;
|
|
12065
12065
|
}
|
|
@@ -12535,6 +12535,7 @@ var DefaultRunSupervisor = class {
|
|
|
12535
12535
|
this.runSlotLimiter = createRunSlotLimiter({ maxActiveRuns: options.maxActiveRuns });
|
|
12536
12536
|
this.runConcurrencyKeys = createRunConcurrencyKeyRegistry();
|
|
12537
12537
|
this.awaitingUserWatcher = createAwaitingUserWatcher({
|
|
12538
|
+
stateOwner: options.awaitingUserStateOwner,
|
|
12538
12539
|
markAwaitingUser: (runId, patch) => this.getHandle(runId).markAwaitingUser(patch),
|
|
12539
12540
|
onDisposed: (runId) => {
|
|
12540
12541
|
this.eventWatchDisposers.delete(runId);
|
|
@@ -12731,8 +12732,17 @@ var DefaultRunSupervisor = class {
|
|
|
12731
12732
|
canRestoreRun: this.canRestoreRun
|
|
12732
12733
|
});
|
|
12733
12734
|
}
|
|
12734
|
-
async pause(runId, reason) {
|
|
12735
|
-
await this.withRunControlLock(runId, () =>
|
|
12735
|
+
async pause(runId, reason, expectedExecutionId) {
|
|
12736
|
+
await this.withRunControlLock(runId, async () => {
|
|
12737
|
+
const handle = this.getHandle(runId);
|
|
12738
|
+
if (expectedExecutionId !== void 0) {
|
|
12739
|
+
const record = await this.registryStore.load(runId);
|
|
12740
|
+
if (record?.metadata?.executionId !== expectedExecutionId) {
|
|
12741
|
+
throw new RunInteractionConflictError(runId, "pause execution ownership has changed");
|
|
12742
|
+
}
|
|
12743
|
+
}
|
|
12744
|
+
await handle.pause(reason);
|
|
12745
|
+
});
|
|
12736
12746
|
}
|
|
12737
12747
|
async resumePausedRun(input) {
|
|
12738
12748
|
return this.withRunControlLock(input.runId, async () => {
|