@poe-platform/safe-js 0.1.152 → 0.1.154

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.
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-6NQIMBX3.js";
30
+ } from "./chunk-KHKBLB42.js";
31
31
 
32
32
  // packages/safe-js/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8249,4 +8249,4 @@ export {
8249
8249
  parseMcpConfig,
8250
8250
  makeMcpModule
8251
8251
  };
8252
- //# sourceMappingURL=chunk-FSNNBDWP.js.map
8252
+ //# sourceMappingURL=chunk-OKUSX6EN.js.map
@@ -22,7 +22,7 @@ import {
22
22
  resolveFsConfig,
23
23
  splitFrontmatter,
24
24
  withBrokenPipeGuard
25
- } from "./chunks/chunk-FSNNBDWP.js";
25
+ } from "./chunks/chunk-OKUSX6EN.js";
26
26
  import {
27
27
  Budget,
28
28
  SandboxError,
@@ -34,7 +34,7 @@ import {
34
34
  replaceErrorStack,
35
35
  restore,
36
36
  run
37
- } from "./chunks/chunk-6NQIMBX3.js";
37
+ } from "./chunks/chunk-KHKBLB42.js";
38
38
  import "./chunks/chunk-4YIDX44G.js";
39
39
 
40
40
  // packages/safe-js/src/cli.ts
@@ -5,7 +5,7 @@ import {
5
5
  defineExtension,
6
6
  lint,
7
7
  run
8
- } from "./chunks/chunk-6NQIMBX3.js";
8
+ } from "./chunks/chunk-KHKBLB42.js";
9
9
  import "./chunks/chunk-4YIDX44G.js";
10
10
  export {
11
11
  Budget,
@@ -26,7 +26,7 @@ import {
26
26
  runWithSpawnUsageAccumulator,
27
27
  splitFrontmatter,
28
28
  supportsSpawnMode
29
- } from "./chunks/chunk-FSNNBDWP.js";
29
+ } from "./chunks/chunk-OKUSX6EN.js";
30
30
  import {
31
31
  Budget,
32
32
  FileSnapshotBackend,
@@ -50,7 +50,7 @@ import {
50
50
  registerPendingHostCallPolicy,
51
51
  restore,
52
52
  run
53
- } from "./chunks/chunk-6NQIMBX3.js";
53
+ } from "./chunks/chunk-KHKBLB42.js";
54
54
  import "./chunks/chunk-4YIDX44G.js";
55
55
 
56
56
  // packages/safe-js/src/parse.ts
@@ -52,6 +52,7 @@ export type AsyncEvaluationContext = {
52
52
  peakDataSize: number;
53
53
  };
54
54
  generatorYield?: (value?: SandboxValue, yieldNodeId?: number) => Promise<GeneratorCompletion>;
55
+ asyncGenerator?: boolean;
55
56
  generatorResume?: {
56
57
  sent: GeneratorCompletion[];
57
58
  yieldNodeId: number;
@@ -59,6 +59,7 @@ export type InterpretOptions = {
59
59
  surfaceUnhandledThrows?: boolean;
60
60
  useScopeDirectly?: boolean;
61
61
  generatorYield?: (value?: SandboxValue, yieldNodeId?: number) => Promise<GeneratorCompletion>;
62
+ asyncGenerator?: boolean;
62
63
  generatorResume?: {
63
64
  sent: GeneratorCompletion[];
64
65
  yieldNodeId: number;
@@ -1,4 +1,4 @@
1
- import { type SandboxCallContext, type SandboxValue } from "./values.js";
1
+ import { type SandboxGenerator, type SandboxCallContext, type SandboxValue } from "./values.js";
2
2
  import { Budget } from "./budget.js";
3
3
  export type SandboxIterator = {
4
4
  readonly generator?: true;
@@ -10,3 +10,4 @@ export type SandboxIterator = {
10
10
  throw?(error?: SandboxValue): IteratorResult<SandboxValue> | Promise<IteratorResult<SandboxValue>>;
11
11
  };
12
12
  export declare function getSandboxIterator(value: SandboxValue, budget?: Budget, context?: SandboxCallContext): SandboxIterator | undefined;
13
+ export declare function generatorIterator(generator: SandboxGenerator, budget?: Budget): SandboxIterator;
@@ -85,6 +85,7 @@ export type SandboxPromise = {
85
85
  };
86
86
  export type SandboxGenerator = {
87
87
  readonly kind: "generator";
88
+ readonly async?: boolean;
88
89
  state: "start" | "running" | "suspended" | "done";
89
90
  readonly channel: GeneratorChannel;
90
91
  readonly astNodeId?: number;
@@ -121,8 +122,9 @@ export declare function createSandboxPromise(promise: Promise<SandboxValue>, met
121
122
  span?: SandboxCallContext["span"];
122
123
  }): SandboxPromise;
123
124
  export declare function createSandboxGenerator(channel: GeneratorChannel, metadata?: {
124
- astNodeId: number;
125
- capturedScopeId: number | string;
125
+ astNodeId?: number;
126
+ capturedScopeId?: number | string;
127
+ async?: boolean;
126
128
  } | undefined): SandboxGenerator;
127
129
  export declare function createSandboxMap(entries?: Iterable<readonly [SandboxValue, SandboxValue]>): SandboxMap;
128
130
  export declare function createSandboxSet(values?: Iterable<SandboxValue>): SandboxSet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.152",
3
+ "version": "0.1.154",
4
4
  "description": "Budgeted JavaScript interpreter with explicit host capabilities and resumable execution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@poe-platform/safe-fs": "0.1.152",
61
+ "@poe-platform/safe-fs": "0.1.154",
62
62
  "yaml": "^2.8.2",
63
63
  "jose": "^6.1.3",
64
64
  "@types/node": "^25.2.2"