omnius 1.0.982 → 1.0.983
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.
|
@@ -196,6 +196,21 @@ export declare class InterruptionLifecycle {
|
|
|
196
196
|
evidenceId: string;
|
|
197
197
|
} | undefined;
|
|
198
198
|
}): number;
|
|
199
|
+
/** Settle an interrupted `agent` (sub-agent) call from its children's own
|
|
200
|
+
* interruption journals. Only "absent" is accepted: the caller must prove
|
|
201
|
+
* every child admitted nothing but effect-free work, so retrying the call
|
|
202
|
+
* cannot repeat an external effect. Anything else keeps the fence. */
|
|
203
|
+
reconcileInterruptedSubAgent(input: {
|
|
204
|
+
expected: Pick<InterruptionRunIdentity, "sessionId" | "runId" | "taskEpoch" | "owner">;
|
|
205
|
+
outcome: (effect: {
|
|
206
|
+
operationId: string;
|
|
207
|
+
admittedAt: string;
|
|
208
|
+
endedAt: string;
|
|
209
|
+
}) => {
|
|
210
|
+
state: "absent";
|
|
211
|
+
evidenceId: string;
|
|
212
|
+
} | undefined;
|
|
213
|
+
}): number;
|
|
199
214
|
/** Settle interrupted shell calls whose exact admitted command the current
|
|
200
215
|
* registered native classifier proves read-only. A read-only command has no
|
|
201
216
|
* external effect to be absent or applied, so this never authorizes replay
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/index.js
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 43219990 bytes
|
|
4
|
+
sha256: 5f5f8f7e2c372e2fe65c78b1c104c2dc609c5fac0ad485332f5d1bb68a0e5f9e
|
package/dist/library.js
CHANGED
|
@@ -384093,6 +384093,49 @@ var InterruptionLifecycle = class {
|
|
|
384093
384093
|
}
|
|
384094
384094
|
return matches.length;
|
|
384095
384095
|
}
|
|
384096
|
+
/** Settle an interrupted `agent` (sub-agent) call from its children's own
|
|
384097
|
+
* interruption journals. Only "absent" is accepted: the caller must prove
|
|
384098
|
+
* every child admitted nothing but effect-free work, so retrying the call
|
|
384099
|
+
* cannot repeat an external effect. Anything else keeps the fence. */
|
|
384100
|
+
reconcileInterruptedSubAgent(input2) {
|
|
384101
|
+
if (this.durabilityUncertain || !this.persistEnabled || !this.state.recovered || !["paused", "stopped", "failed"].includes(this.state.phase))
|
|
384102
|
+
return 0;
|
|
384103
|
+
const expected = input2.expected;
|
|
384104
|
+
if (this.state.sessionId !== expected.sessionId || this.state.runId !== expected.runId || this.state.taskEpoch !== expected.taskEpoch || this.state.owner.kind !== expected.owner.kind || this.state.owner.id !== expected.owner.id || this.state.owner.generation !== expected.owner.generation)
|
|
384105
|
+
return 0;
|
|
384106
|
+
const matches = this.state.ambiguousEffects.flatMap((effect) => {
|
|
384107
|
+
if (effect.state !== "unknown_after_interrupt" || effect.ownerId !== "tool:agent" || effect.kind !== "mutating_tool" || effect.generation > this.state.owner.generation)
|
|
384108
|
+
return [];
|
|
384109
|
+
const acknowledgement = this.state.pendingAcknowledgements.find((item) => item.id === effect.operationId && item.ownerId === effect.ownerId && item.generation === effect.generation && item.kind === effect.kind && item.effect === "external_effect" && item.status !== "pending" && item.acknowledgedAt);
|
|
384110
|
+
if (!acknowledgement)
|
|
384111
|
+
return [];
|
|
384112
|
+
let verdict3;
|
|
384113
|
+
try {
|
|
384114
|
+
verdict3 = input2.outcome({ operationId: effect.operationId, admittedAt: acknowledgement.admittedAt, endedAt: acknowledgement.acknowledgedAt });
|
|
384115
|
+
} catch {
|
|
384116
|
+
return [];
|
|
384117
|
+
}
|
|
384118
|
+
if (!verdict3 || verdict3.state !== "absent" || !verdict3.evidenceId.trim())
|
|
384119
|
+
return [];
|
|
384120
|
+
return [{ effect, verdict: verdict3 }];
|
|
384121
|
+
});
|
|
384122
|
+
if (!matches.length)
|
|
384123
|
+
return 0;
|
|
384124
|
+
const previousState = cloneSnapshot(this.state), at = this.timestamp();
|
|
384125
|
+
try {
|
|
384126
|
+
for (const { effect, verdict: verdict3 } of matches) {
|
|
384127
|
+
effect.state = "confirmed_absent";
|
|
384128
|
+
effect.resolvedAt = at;
|
|
384129
|
+
effect.evidenceId = verdict3.evidenceId;
|
|
384130
|
+
}
|
|
384131
|
+
this.persist();
|
|
384132
|
+
} catch (error) {
|
|
384133
|
+
if (!persistenceMayHaveCommitted(error))
|
|
384134
|
+
this.state = previousState;
|
|
384135
|
+
throw error;
|
|
384136
|
+
}
|
|
384137
|
+
return matches.length;
|
|
384138
|
+
}
|
|
384096
384139
|
/** Settle interrupted shell calls whose exact admitted command the current
|
|
384097
384140
|
* registered native classifier proves read-only. A read-only command has no
|
|
384098
384141
|
* external effect to be absent or applied, so this never authorizes replay
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.983",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.983",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -5452,9 +5452,9 @@
|
|
|
5452
5452
|
"license": "Apache-2.0 OR MIT"
|
|
5453
5453
|
},
|
|
5454
5454
|
"node_modules/bmp-ts": {
|
|
5455
|
-
"version": "1.1.
|
|
5456
|
-
"resolved": "https://registry.npmjs.org/bmp-ts/-/bmp-ts-1.1.
|
|
5457
|
-
"integrity": "sha512-
|
|
5455
|
+
"version": "1.1.2",
|
|
5456
|
+
"resolved": "https://registry.npmjs.org/bmp-ts/-/bmp-ts-1.1.2.tgz",
|
|
5457
|
+
"integrity": "sha512-Vp8AwUAkbfkwboW/GrXEX4krLFUMwCAK7Nx3acx2cGK/JFv98wo8sNYXWwecGJTkNH5EAKZz0rzomX37A4ai9g==",
|
|
5458
5458
|
"license": "MIT"
|
|
5459
5459
|
},
|
|
5460
5460
|
"node_modules/brace-expansion": {
|
|
@@ -8438,9 +8438,9 @@
|
|
|
8438
8438
|
}
|
|
8439
8439
|
},
|
|
8440
8440
|
"node_modules/node-forge": {
|
|
8441
|
-
"version": "1.4.
|
|
8442
|
-
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.
|
|
8443
|
-
"integrity": "sha512-
|
|
8441
|
+
"version": "1.4.4",
|
|
8442
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.4.tgz",
|
|
8443
|
+
"integrity": "sha512-T6VRRpF3+czIGcXW/LOeoD7Ej28d8CF1UMEAbJyJRUtYMvyXAgxUPW2kbUibumvV9LiUQAznJOFyeYclzSJMMg==",
|
|
8444
8444
|
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
8445
8445
|
"engines": {
|
|
8446
8446
|
"node": ">= 6.13.0"
|
package/package.json
CHANGED