poe-code 11.0.32 → 12.0.1

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.
@@ -20,7 +20,7 @@ import {
20
20
  parseMcpConfig,
21
21
  splitFrontmatter,
22
22
  withBrokenPipeGuard
23
- } from "./chunks/chunk-6EXLQKE5.js";
23
+ } from "./chunks/chunk-73RTIWRH.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-YE6I5W6O.js";
35
+ } from "./chunks/chunk-HD7TQKZ7.js";
36
36
  import "./chunks/chunk-4YIDX44G.js";
37
37
 
38
38
  // packages/safejs/src/cli.ts
@@ -3,7 +3,7 @@ import {
3
3
  createReplayableRandom,
4
4
  lint,
5
5
  run
6
- } from "./chunks/chunk-YE6I5W6O.js";
6
+ } from "./chunks/chunk-HD7TQKZ7.js";
7
7
  import "./chunks/chunk-4YIDX44G.js";
8
8
  export {
9
9
  Budget,
@@ -27,7 +27,7 @@ import {
27
27
  runWithSpawnUsageAccumulator,
28
28
  splitFrontmatter,
29
29
  supportsSpawnMode
30
- } from "./chunks/chunk-6EXLQKE5.js";
30
+ } from "./chunks/chunk-73RTIWRH.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-YE6I5W6O.js";
52
+ } from "./chunks/chunk-HD7TQKZ7.js";
53
53
  import "./chunks/chunk-4YIDX44G.js";
54
54
 
55
55
  // packages/safejs/src/runner/run-harness.ts
@@ -1,3 +1,4 @@
1
+ import { sandboxErrorTypes } from "../../error/shape.js";
1
2
  import { getSandboxIterator } from "../iteration.js";
2
3
  import { allocateProducedSandboxValue, createSandboxClosure, deepCopyToSandbox, isSandboxClosure, isSandboxMap, isSandboxPromise, isSandboxRegex, isSandboxSet } from "../values.js";
3
4
  export function createObjectArrayGlobals(options) {
@@ -88,7 +89,12 @@ export function createObjectArrayGlobals(options) {
88
89
  }),
89
90
  String: createSandboxClosure({
90
91
  sandbox: true,
91
- call: ([value]) => options.budget.allocateString(String(value)),
92
+ call: ([value]) => options.budget.allocateString(typeof value === "object" &&
93
+ value !== null &&
94
+ sandboxErrorTypes.has(value) &&
95
+ !Object.hasOwn(value, "toString")
96
+ ? Error.prototype.toString.call(value)
97
+ : String(value)),
92
98
  name: "String",
93
99
  properties: {
94
100
  raw: createSandboxClosure({