@rowan-agent/agent 0.35.0 → 0.35.1
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/runtime.js +2 -5
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -5325,7 +5325,7 @@ var InMemoryStore = class _InMemoryStore {
|
|
|
5325
5325
|
interruptOwner(ownerEpoch, message = "The previous Runtime owner expired or closed.") {
|
|
5326
5326
|
this.ownerEpoch = Math.max(this.ownerEpoch, ownerEpoch);
|
|
5327
5327
|
for (const run of this.runs.values()) {
|
|
5328
|
-
if (run.state !== "running" || run.execution
|
|
5328
|
+
if (run.state !== "running" || !run.execution || run.execution.ownerEpoch > ownerEpoch) continue;
|
|
5329
5329
|
const activeToolCalls = [...this.toolCalls.values()].filter((toolCall) => toolCall.runId === run.id && toolCall.executionId === run.execution?.executionId && (toolCall.status === "pending" || toolCall.status === "in_progress" || toolCall.state === "pending" || toolCall.state === "in_progress"));
|
|
5330
5330
|
const indeterminateToolCallIds = [];
|
|
5331
5331
|
for (const toolCall of activeToolCalls) {
|
|
@@ -11896,10 +11896,6 @@ var SqliteStore = class {
|
|
|
11896
11896
|
}
|
|
11897
11897
|
const state = this.readState();
|
|
11898
11898
|
const memory = InMemoryStore.fromState(state);
|
|
11899
|
-
if (row.owner_id && row.owner_token && row.epoch > 0) {
|
|
11900
|
-
memory.attachOwner(ownerLease(row));
|
|
11901
|
-
memory.interruptOwner(row.epoch);
|
|
11902
|
-
}
|
|
11903
11899
|
const epoch = row.epoch + 1;
|
|
11904
11900
|
const token = `${state.incarnation}:${epoch}:${input.ownerId}`;
|
|
11905
11901
|
const next = {
|
|
@@ -11921,6 +11917,7 @@ var SqliteStore = class {
|
|
|
11921
11917
|
const tracker = new ChangeTracker();
|
|
11922
11918
|
memory.setChangeRecorder(tracker);
|
|
11923
11919
|
try {
|
|
11920
|
+
if (row.epoch > 0) memory.interruptOwner(row.epoch);
|
|
11924
11921
|
memory.dropSettledClaimReceipts();
|
|
11925
11922
|
memory.compactTerminalReceipts();
|
|
11926
11923
|
} finally {
|