poe-code 11.0.24 → 11.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-code",
3
- "version": "11.0.24",
3
+ "version": "11.0.25",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-CGS4H4L3.js";
30
+ } from "./chunk-DXJLYASS.js";
31
31
 
32
32
  // packages/safejs/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8055,4 +8055,4 @@ export {
8055
8055
  parseMcpConfig,
8056
8056
  makeMcpModule
8057
8057
  };
8058
- //# sourceMappingURL=chunk-I5FH3SKL.js.map
8058
+ //# sourceMappingURL=chunk-BGO2B5YI.js.map
@@ -16961,7 +16961,7 @@ function serializeArray(value, serializeValue) {
16961
16961
 
16962
16962
  // packages/safejs/src/snapshot/dump-format.ts
16963
16963
  var DUMP_FORMAT_VERSION = 1;
16964
- var EXECUTION_SEMANTICS = "jobs-v6";
16964
+ var EXECUTION_SEMANTICS = "jobs-v7";
16965
16965
  var SKIP_VALUE = /* @__PURE__ */ Symbol("SafeJS.skip-dump-value");
16966
16966
  function serializeSafeJSSnapshot(snapshot) {
16967
16967
  const replayError = Object.getOwnPropertyDescriptor(snapshot, "replayError");
@@ -21309,9 +21309,11 @@ function shouldIncludeTemplateRaw(record2, key, includeTemplateRaw) {
21309
21309
 
21310
21310
  // packages/safejs/src/snapshot/migration.ts
21311
21311
  function validateMigrationSemantics(value) {
21312
- if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5", "jobs-v6"].includes(value))
21312
+ if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5", "jobs-v6", "jobs-v7"].includes(
21313
+ value
21314
+ ))
21313
21315
  throw new TypeError(
21314
- "Migration requires a supported execution-semantics marker (jobs-v1 through jobs-v6)."
21316
+ "Migration requires a supported execution-semantics marker (jobs-v1 through jobs-v7)."
21315
21317
  );
21316
21318
  }
21317
21319
  function validateMigrationJournal(sourceHash, replay, hostCalls = []) {
@@ -21408,7 +21410,7 @@ function restore(snapshot, options) {
21408
21410
  assertSnapshotInactive(snapshot);
21409
21411
  validateDumpEnvelope(snapshot);
21410
21412
  validateSnapshotMigration(snapshot.migration, snapshot.sourceHash);
21411
- if (snapshot.executionSemantics !== EXECUTION_SEMANTICS && (snapshot.executionSemantics !== void 0 || snapshot.promiseReplay !== void 0 || snapshot.replay !== void 0 || snapshot.initialInputs !== void 0)) {
21413
+ if (snapshot.executionSemantics !== EXECUTION_SEMANTICS && snapshot.executionSemantics !== "jobs-v6" && (snapshot.executionSemantics !== void 0 || snapshot.promiseReplay !== void 0 || snapshot.replay !== void 0 || snapshot.initialInputs !== void 0)) {
21412
21414
  throw new SnapshotValidationError(
21413
21415
  "unsupportedVersion",
21414
21416
  "$.executionSemantics",
@@ -28651,6 +28653,8 @@ function run(source, options = {}) {
28651
28653
  options.signal?.addEventListener("abort", captureCancellationSnapshot, { once: true });
28652
28654
  try {
28653
28655
  const restoredSnapshot = options.snapshot === void 0 ? void 0 : restore(options.snapshot, { source });
28656
+ const executionSemantics = restoredSnapshot?.executionSemantics === "jobs-v6" ? "jobs-v6" : EXECUTION_SEMANTICS;
28657
+ const convertInitialInput = (convert) => executionSemantics === "jobs-v6" ? convert() : promiseReplayContext.exit(convert);
28654
28658
  if (restoredSnapshot !== void 0) {
28655
28659
  leaveSnapshotRun = enterSnapshotRun(restoredSnapshot);
28656
28660
  }
@@ -28676,13 +28680,15 @@ function run(source, options = {}) {
28676
28680
  ...restoredSnapshot,
28677
28681
  resumeNodeId: restoredSnapshot.pendingAwaits?.[0]?.nodeId
28678
28682
  } : void 0;
28679
- const callerBindings = options.bindings === void 0 ? {} : wrapCallerInjectedBindings(options.bindings, {
28680
- budget,
28681
- hostCalls,
28682
- moduleId: "<bindings>",
28683
- signal: options.signal,
28684
- lifecycle
28685
- });
28683
+ const callerBindings = convertInitialInput(
28684
+ () => options.bindings === void 0 ? {} : wrapCallerInjectedBindings(options.bindings, {
28685
+ budget,
28686
+ hostCalls,
28687
+ moduleId: "<bindings>",
28688
+ signal: options.signal,
28689
+ lifecycle
28690
+ })
28691
+ );
28686
28692
  const builtinBindings = {
28687
28693
  ...createConsoleJsonGlobals({
28688
28694
  budget,
@@ -28707,7 +28713,9 @@ function run(source, options = {}) {
28707
28713
  }),
28708
28714
  ...createRegexGlobals()
28709
28715
  };
28710
- const importMeta = deepCopyToSandbox(options.importMeta ?? {});
28716
+ const importMeta = convertInitialInput(
28717
+ () => deepCopyToSandbox(options.importMeta ?? {})
28718
+ );
28711
28719
  if (restoredSnapshot?.migration !== void 0) {
28712
28720
  if (Object.hasOwn(importMeta, "migration"))
28713
28721
  throw new TypeError("import.meta.migration is reserved for migrated checkpoint state.");
@@ -28721,13 +28729,17 @@ function run(source, options = {}) {
28721
28729
  const initialInputs = prepareReplayInputs(
28722
28730
  {
28723
28731
  bindings: callerBindings,
28724
- imports: resolveModuleImports(module, options.modules, {
28725
- budget,
28726
- hostCalls,
28727
- signal: options.signal,
28728
- allowMissing: restoredSnapshot?.initialInputs !== void 0
28729
- }),
28730
- entryPointArgs: options.entryPointArgs === void 0 ? void 0 : deepCopyToSandbox([...options.entryPointArgs]),
28732
+ imports: convertInitialInput(
28733
+ () => resolveModuleImports(module, options.modules, {
28734
+ budget,
28735
+ hostCalls,
28736
+ signal: options.signal,
28737
+ allowMissing: restoredSnapshot?.initialInputs !== void 0
28738
+ })
28739
+ ),
28740
+ entryPointArgs: convertInitialInput(
28741
+ () => options.entryPointArgs === void 0 ? void 0 : deepCopyToSandbox([...options.entryPointArgs])
28742
+ ),
28731
28743
  importMeta
28732
28744
  },
28733
28745
  restoredSnapshot?.initialInputs,
@@ -28793,6 +28805,7 @@ function run(source, options = {}) {
28793
28805
  });
28794
28806
  snapshotScheduler = activeSnapshotScheduler;
28795
28807
  createFailureSnapshot = () => createRunSnapshot({
28808
+ executionSemantics,
28796
28809
  migration: restoredSnapshot?.migration,
28797
28810
  bindings: executionScope.snapshot().bindings,
28798
28811
  clock: options.clock,
@@ -28819,6 +28832,7 @@ function run(source, options = {}) {
28819
28832
  }
28820
28833
  const interpreterSnapshot2 = yieldPoint.snapshot();
28821
28834
  snapshot2 = createRunSnapshot({
28835
+ executionSemantics,
28822
28836
  migration: restoredSnapshot?.migration,
28823
28837
  bindings: interpreterSnapshot2.bindings,
28824
28838
  clock: options.clock,
@@ -28861,6 +28875,7 @@ function run(source, options = {}) {
28861
28875
  }
28862
28876
  const interpreterSnapshot2 = yieldPoint.snapshot();
28863
28877
  snapshot2 = createRunSnapshot({
28878
+ executionSemantics,
28864
28879
  migration: restoredSnapshot?.migration,
28865
28880
  bindings: interpreterSnapshot2.bindings,
28866
28881
  clock: options.clock,
@@ -28895,6 +28910,7 @@ function run(source, options = {}) {
28895
28910
  replayError = error.message;
28896
28911
  }
28897
28912
  const snapshot = createRunSnapshot({
28913
+ executionSemantics,
28898
28914
  migration: restoredSnapshot?.migration,
28899
28915
  bindings: executionScope.snapshot().bindings,
28900
28916
  clock: options.clock,
@@ -29064,7 +29080,7 @@ function createExecutableNode(module) {
29064
29080
  function createRunSnapshot(input) {
29065
29081
  return {
29066
29082
  version: DUMP_FORMAT_VERSION,
29067
- executionSemantics: EXECUTION_SEMANTICS,
29083
+ executionSemantics: input.executionSemantics,
29068
29084
  sourceHash: input.sourceHash,
29069
29085
  ...input.migration === void 0 ? {} : { migration: structuredClone(input.migration) },
29070
29086
  bindings: input.bindings,
@@ -29177,4 +29193,4 @@ export {
29177
29193
  FileSnapshotBackend,
29178
29194
  run
29179
29195
  };
29180
- //# sourceMappingURL=chunk-CGS4H4L3.js.map
29196
+ //# sourceMappingURL=chunk-DXJLYASS.js.map