poe-code 11.0.20 → 11.0.21
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/index.js +3 -4
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-JFP4YVY2.js → chunk-JLAZPLMH.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-7IOZFASL.js → chunk-KWRLKWB3.js} +3 -4
- package/packages/safejs/dist/chunks/{chunk-7IOZFASL.js.map → chunk-KWRLKWB3.js.map} +2 -2
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/host-bridge.js +5 -4
- /package/packages/safejs/dist/chunks/{chunk-JFP4YVY2.js.map → chunk-JLAZPLMH.js.map} +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
parseMcpConfig,
|
|
21
21
|
splitFrontmatter,
|
|
22
22
|
withBrokenPipeGuard
|
|
23
|
-
} from "./chunks/chunk-
|
|
23
|
+
} from "./chunks/chunk-JLAZPLMH.js";
|
|
24
24
|
import {
|
|
25
25
|
Budget,
|
|
26
26
|
SandboxError,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
replaceErrorStack,
|
|
33
33
|
restore,
|
|
34
34
|
run
|
|
35
|
-
} from "./chunks/chunk-
|
|
35
|
+
} from "./chunks/chunk-KWRLKWB3.js";
|
|
36
36
|
import "./chunks/chunk-4YIDX44G.js";
|
|
37
37
|
|
|
38
38
|
// packages/safejs/src/cli.ts
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
runWithSpawnUsageAccumulator,
|
|
28
28
|
splitFrontmatter,
|
|
29
29
|
supportsSpawnMode
|
|
30
|
-
} from "./chunks/chunk-
|
|
30
|
+
} from "./chunks/chunk-JLAZPLMH.js";
|
|
31
31
|
import {
|
|
32
32
|
Budget,
|
|
33
33
|
FileSnapshotBackend,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
registerPendingHostCallPolicy,
|
|
50
50
|
restore,
|
|
51
51
|
run
|
|
52
|
-
} from "./chunks/chunk-
|
|
52
|
+
} from "./chunks/chunk-KWRLKWB3.js";
|
|
53
53
|
import "./chunks/chunk-4YIDX44G.js";
|
|
54
54
|
|
|
55
55
|
// packages/safejs/src/runner/run-harness.ts
|
|
@@ -61,7 +61,6 @@ function wrapCallerInjectedFunction(name, value, options, state) {
|
|
|
61
61
|
sourceFunctions: new Map(),
|
|
62
62
|
active: new Set(),
|
|
63
63
|
seen: new WeakMap(),
|
|
64
|
-
nextInvocation: 0,
|
|
65
64
|
restored: []
|
|
66
65
|
};
|
|
67
66
|
const hostArgs = deepCopyFromSandbox([...args], {
|
|
@@ -221,8 +220,6 @@ function executeHostCall(record, restored, invoke, stackFrames, options, span, c
|
|
|
221
220
|
throw new HostCallResumabilityError(record, "reset", `Host call ${record.id} was cancelled; reset is required.`);
|
|
222
221
|
}
|
|
223
222
|
if (restored && record.policy === "read-side-effect" && record.lifecycle !== "created") {
|
|
224
|
-
if (callbacks !== undefined)
|
|
225
|
-
callbacks.nextInvocation = callbacks.restored.length;
|
|
226
223
|
const context = callbacks === undefined
|
|
227
224
|
? undefined
|
|
228
225
|
: {
|
|
@@ -238,6 +235,8 @@ function executeHostCall(record, restored, invoke, stackFrames, options, span, c
|
|
|
238
235
|
};
|
|
239
236
|
return createHostCallPromise(record, hostCalls.reconcile(record, context), hostCalls);
|
|
240
237
|
}
|
|
238
|
+
if (restored && callbacks !== undefined)
|
|
239
|
+
callbacks.nextReissuedInvocation = 0;
|
|
241
240
|
hostCalls.start(record);
|
|
242
241
|
let result;
|
|
243
242
|
try {
|
|
@@ -430,7 +429,9 @@ function wrapSandboxClosureForHost(closure, stackFrames, budget, callbacks) {
|
|
|
430
429
|
budget,
|
|
431
430
|
hostCalls: callbacks?.journal
|
|
432
431
|
}, { seen: new WeakMap() }, "<callback>");
|
|
433
|
-
const restored = callbacks === undefined
|
|
432
|
+
const restored = callbacks?.nextReissuedInvocation === undefined
|
|
433
|
+
? undefined
|
|
434
|
+
: callbacks.restored[callbacks.nextReissuedInvocation++];
|
|
434
435
|
if (restored !== undefined) {
|
|
435
436
|
if (restored.id !== id ||
|
|
436
437
|
JSON.stringify(encodeReplayData(sandboxArgs, {
|
|
File without changes
|