@poe-platform/safe-js 0.1.406 → 0.1.408

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-XY5ZPK3G.js";
30
+ } from "./chunk-6GFX7QAK.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-WHJV4CR7.js.map
8252
+ //# sourceMappingURL=chunk-IP5BHXCD.js.map
@@ -22,7 +22,7 @@ import {
22
22
  resolveFsConfig,
23
23
  splitFrontmatter,
24
24
  withBrokenPipeGuard
25
- } from "./chunks/chunk-WHJV4CR7.js";
25
+ } from "./chunks/chunk-IP5BHXCD.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-XY5ZPK3G.js";
37
+ } from "./chunks/chunk-6GFX7QAK.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-XY5ZPK3G.js";
8
+ } from "./chunks/chunk-6GFX7QAK.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-WHJV4CR7.js";
29
+ } from "./chunks/chunk-IP5BHXCD.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-XY5ZPK3G.js";
53
+ } from "./chunks/chunk-6GFX7QAK.js";
54
54
  import "./chunks/chunk-4YIDX44G.js";
55
55
 
56
56
  // packages/safe-js/src/parse.ts
@@ -1,4 +1,20 @@
1
1
  import type { SandboxClosure, SandboxObject, SandboxPromise, SandboxValue } from "./values.js";
2
+ export type ThenableContinuation = {
3
+ source: SandboxValue;
4
+ owner: SandboxPromise | undefined;
5
+ settlement: {
6
+ state: "fulfilled" | "rejected";
7
+ value: SandboxValue;
8
+ } | undefined;
9
+ completed: boolean;
10
+ invocationPending: boolean;
11
+ };
12
+ export declare const thenableContinuations: WeakMap<SandboxPromise, ThenableContinuation>;
13
+ export declare const thenableStates: WeakMap<object, ThenableContinuation>;
14
+ export declare const thenableResolvers: WeakMap<SandboxClosure, {
15
+ continuation: ThenableContinuation;
16
+ action: "fulfilled" | "rejected";
17
+ }>;
2
18
  export type PromiseCapabilityExecutorState = {
3
19
  resolve: SandboxValue;
4
20
  reject: SandboxValue;
@@ -29,6 +29,20 @@ export type PrivateElementData<T> = {
29
29
  set: T;
30
30
  });
31
31
  export type GuestHeapNode<T> = {
32
+ kind: "thenable-state";
33
+ source: T;
34
+ owner: T;
35
+ completed: boolean;
36
+ settlement?: {
37
+ state: "fulfilled" | "rejected";
38
+ value: T;
39
+ };
40
+ } | {
41
+ kind: "thenable-resolver";
42
+ continuation: T;
43
+ action: "fulfilled" | "rejected";
44
+ state: GuestObjectState<T>;
45
+ } | {
32
46
  kind: "construction-environment";
33
47
  constructor: T;
34
48
  newTarget: T;
@@ -83,6 +97,7 @@ export type GuestHeapNode<T> = {
83
97
  } | {
84
98
  kind: "pending-promise";
85
99
  adoption?: T;
100
+ thenable?: T;
86
101
  reactions: T[];
87
102
  producers?: T[];
88
103
  state: GuestObjectState<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.406",
3
+ "version": "0.1.408",
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.406",
61
+ "@poe-platform/safe-fs": "0.1.408",
62
62
  "@petamoriken/float16": "^3.9.3",
63
63
  "yaml": "^2.8.2",
64
64
  "jose": "^6.1.3",