@poe-platform/safe-js 0.1.37 → 0.1.39

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-LBJGHXII.js";
30
+ } from "./chunk-BW4SYRDC.js";
31
31
 
32
32
  // packages/safe-js/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8245,4 +8245,4 @@ export {
8245
8245
  parseMcpConfig,
8246
8246
  makeMcpModule
8247
8247
  };
8248
- //# sourceMappingURL=chunk-ARXBI427.js.map
8248
+ //# sourceMappingURL=chunk-S64MC6ZD.js.map
@@ -22,7 +22,7 @@ import {
22
22
  resolveFsConfig,
23
23
  splitFrontmatter,
24
24
  withBrokenPipeGuard
25
- } from "./chunks/chunk-ARXBI427.js";
25
+ } from "./chunks/chunk-S64MC6ZD.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-LBJGHXII.js";
37
+ } from "./chunks/chunk-BW4SYRDC.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-LBJGHXII.js";
8
+ } from "./chunks/chunk-BW4SYRDC.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-ARXBI427.js";
29
+ } from "./chunks/chunk-S64MC6ZD.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-LBJGHXII.js";
53
+ } from "./chunks/chunk-BW4SYRDC.js";
54
54
  import "./chunks/chunk-4YIDX44G.js";
55
55
 
56
56
  // packages/safe-js/src/parse.ts
@@ -30,6 +30,8 @@ export type HostObjectDefinition = {
30
30
  export type HostObjectNamedDefinition = {
31
31
  keys(): readonly string[];
32
32
  get(name: string): unknown;
33
+ set?(name: string, value: unknown): void;
34
+ delete?(name: string): boolean;
33
35
  maxKeys: number;
34
36
  maxKeyCodeUnits: number;
35
37
  enumerable?: boolean;
@@ -39,6 +41,7 @@ export type HostObjectController = {
39
41
  assertActive(): void;
40
42
  chargeWork(units?: number): void;
41
43
  checkLength(length: number): void;
44
+ checkString(value: string): void;
42
45
  checkTemporaryDataSize(size: number): void;
43
46
  read(operation: () => unknown, validate?: (value: unknown) => unknown): SandboxValue;
44
47
  write(operation: (value: unknown) => void, value: SandboxValue): void;
@@ -63,6 +66,7 @@ export declare function revokeGuestCallback(callback: object, owner: object): vo
63
66
  export declare function revokeHostObject(value: HostObject, owner: object): void;
64
67
  export declare function getHostObjectMember(value: SandboxObject, key: string): SandboxValue;
65
68
  export declare function setHostObjectMember(value: SandboxObject, key: string, entry: SandboxValue): void;
69
+ export declare function deleteHostObjectMember(value: SandboxObject, key: string): boolean;
66
70
  export declare function getHostObjectKeys(value: SandboxObject): string[];
67
71
  export declare function hasHostObjectMember(value: SandboxObject, key: string, enumerableOnly?: boolean): boolean;
68
72
  export declare function measureHostObjectData(value: SandboxObject): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
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.37",
61
+ "@poe-platform/safe-fs": "0.1.39",
62
62
  "yaml": "^2.8.2",
63
63
  "jose": "^6.1.3",
64
64
  "@types/node": "^25.2.2"