poe-code 13.0.0 → 13.0.2

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.
Files changed (134) hide show
  1. package/README.md +26 -5
  2. package/dist/index.js +96 -7
  3. package/dist/index.js.map +4 -4
  4. package/dist/metafile.json +1 -1
  5. package/node_modules/esprima/LICENSE.BSD +21 -0
  6. package/node_modules/esprima/README.md +46 -0
  7. package/node_modules/esprima/bin/esparse.js +139 -0
  8. package/node_modules/esprima/bin/esvalidate.js +236 -0
  9. package/node_modules/esprima/dist/esprima.js +6709 -0
  10. package/node_modules/esprima/package.json +112 -0
  11. package/node_modules/extend-shallow/LICENSE +21 -0
  12. package/node_modules/extend-shallow/README.md +61 -0
  13. package/node_modules/extend-shallow/index.js +33 -0
  14. package/node_modules/extend-shallow/package.json +56 -0
  15. package/node_modules/gray-matter/LICENSE +21 -0
  16. package/node_modules/gray-matter/README.md +565 -0
  17. package/node_modules/gray-matter/gray-matter.d.ts +114 -0
  18. package/node_modules/gray-matter/index.js +228 -0
  19. package/node_modules/gray-matter/lib/defaults.js +18 -0
  20. package/node_modules/gray-matter/lib/engine.js +30 -0
  21. package/node_modules/gray-matter/lib/engines.js +54 -0
  22. package/node_modules/gray-matter/lib/excerpt.js +32 -0
  23. package/node_modules/gray-matter/lib/parse.js +13 -0
  24. package/node_modules/gray-matter/lib/stringify.js +56 -0
  25. package/node_modules/gray-matter/lib/to-file.js +43 -0
  26. package/node_modules/gray-matter/lib/utils.js +66 -0
  27. package/node_modules/gray-matter/node_modules/argparse/LICENSE +21 -0
  28. package/node_modules/gray-matter/node_modules/argparse/README.md +257 -0
  29. package/node_modules/gray-matter/node_modules/argparse/index.js +3 -0
  30. package/node_modules/gray-matter/node_modules/argparse/lib/action/append/constant.js +47 -0
  31. package/node_modules/gray-matter/node_modules/argparse/lib/action/append.js +53 -0
  32. package/node_modules/gray-matter/node_modules/argparse/lib/action/count.js +40 -0
  33. package/node_modules/gray-matter/node_modules/argparse/lib/action/help.js +47 -0
  34. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/constant.js +43 -0
  35. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/false.js +27 -0
  36. package/node_modules/gray-matter/node_modules/argparse/lib/action/store/true.js +26 -0
  37. package/node_modules/gray-matter/node_modules/argparse/lib/action/store.js +50 -0
  38. package/node_modules/gray-matter/node_modules/argparse/lib/action/subparsers.js +149 -0
  39. package/node_modules/gray-matter/node_modules/argparse/lib/action/version.js +47 -0
  40. package/node_modules/gray-matter/node_modules/argparse/lib/action.js +146 -0
  41. package/node_modules/gray-matter/node_modules/argparse/lib/action_container.js +482 -0
  42. package/node_modules/gray-matter/node_modules/argparse/lib/argparse.js +14 -0
  43. package/node_modules/gray-matter/node_modules/argparse/lib/argument/error.js +50 -0
  44. package/node_modules/gray-matter/node_modules/argparse/lib/argument/exclusive.js +54 -0
  45. package/node_modules/gray-matter/node_modules/argparse/lib/argument/group.js +75 -0
  46. package/node_modules/gray-matter/node_modules/argparse/lib/argument_parser.js +1161 -0
  47. package/node_modules/gray-matter/node_modules/argparse/lib/const.js +21 -0
  48. package/node_modules/gray-matter/node_modules/argparse/lib/help/added_formatters.js +87 -0
  49. package/node_modules/gray-matter/node_modules/argparse/lib/help/formatter.js +795 -0
  50. package/node_modules/gray-matter/node_modules/argparse/lib/namespace.js +76 -0
  51. package/node_modules/gray-matter/node_modules/argparse/lib/utils.js +57 -0
  52. package/node_modules/gray-matter/node_modules/argparse/package.json +34 -0
  53. package/node_modules/gray-matter/node_modules/js-yaml/LICENSE +21 -0
  54. package/node_modules/gray-matter/node_modules/js-yaml/README.md +302 -0
  55. package/node_modules/gray-matter/node_modules/js-yaml/bin/js-yaml.js +132 -0
  56. package/node_modules/gray-matter/node_modules/js-yaml/dist/js-yaml.js +4011 -0
  57. package/node_modules/gray-matter/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
  58. package/node_modules/gray-matter/node_modules/js-yaml/index.js +7 -0
  59. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
  60. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
  61. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
  62. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/loader.js +1666 -0
  63. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
  64. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  65. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  66. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  67. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  68. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  69. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
  70. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
  71. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
  72. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
  73. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
  74. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
  75. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
  76. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  77. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  78. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  79. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
  80. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
  81. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
  82. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  83. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
  84. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  85. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
  86. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  87. package/node_modules/gray-matter/node_modules/js-yaml/lib/js-yaml.js +39 -0
  88. package/node_modules/gray-matter/node_modules/js-yaml/package.json +52 -0
  89. package/node_modules/gray-matter/package.json +127 -0
  90. package/node_modules/is-extendable/LICENSE +21 -0
  91. package/node_modules/is-extendable/README.md +72 -0
  92. package/node_modules/is-extendable/index.js +13 -0
  93. package/node_modules/is-extendable/package.json +51 -0
  94. package/node_modules/kind-of/LICENSE +21 -0
  95. package/node_modules/kind-of/README.md +367 -0
  96. package/node_modules/kind-of/index.js +129 -0
  97. package/node_modules/kind-of/package.json +88 -0
  98. package/node_modules/section-matter/LICENSE +21 -0
  99. package/node_modules/section-matter/README.md +236 -0
  100. package/node_modules/section-matter/index.js +136 -0
  101. package/node_modules/section-matter/package.json +55 -0
  102. package/node_modules/sprintf-js/.npmignore +1 -0
  103. package/node_modules/sprintf-js/LICENSE +24 -0
  104. package/node_modules/sprintf-js/README.md +88 -0
  105. package/node_modules/sprintf-js/bower.json +14 -0
  106. package/node_modules/sprintf-js/demo/angular.html +20 -0
  107. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
  108. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
  109. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
  110. package/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
  111. package/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
  112. package/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
  113. package/node_modules/sprintf-js/gruntfile.js +36 -0
  114. package/node_modules/sprintf-js/package.json +22 -0
  115. package/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
  116. package/node_modules/sprintf-js/src/sprintf.js +208 -0
  117. package/node_modules/sprintf-js/test/test.js +82 -0
  118. package/node_modules/strip-bom-string/LICENSE +21 -0
  119. package/node_modules/strip-bom-string/README.md +66 -0
  120. package/node_modules/strip-bom-string/index.js +15 -0
  121. package/node_modules/strip-bom-string/package.json +60 -0
  122. package/package.json +6 -3
  123. package/packages/safe-js/dist/chunks/{chunk-EL23VF23.js → chunk-JP474LP7.js} +2 -2
  124. package/packages/safe-js/dist/chunks/{chunk-DALBPQDZ.js → chunk-RIQRHKCB.js} +82 -4
  125. package/packages/safe-js/dist/chunks/{chunk-DALBPQDZ.js.map → chunk-RIQRHKCB.js.map} +4 -4
  126. package/packages/safe-js/dist/cli.js +2 -2
  127. package/packages/safe-js/dist/core.js +1 -1
  128. package/packages/safe-js/dist/index.js +2 -2
  129. package/packages/safe-js/dist/interp/globals/object-array.js +2 -7
  130. package/packages/safe-js/dist/interp/interpreter.js +1 -0
  131. package/packages/safe-js/dist/interp/string-coercion.d.ts +3 -0
  132. package/packages/safe-js/dist/interp/string-coercion.js +89 -0
  133. package/packages/safe-js/dist/interp/values.d.ts +1 -0
  134. /package/packages/safe-js/dist/chunks/{chunk-EL23VF23.js.map → chunk-JP474LP7.js.map} +0 -0
package/README.md CHANGED
@@ -263,9 +263,9 @@ Uses `POE_API_KEY` or the stored credential and honors `POE_BASE_URL`. Throws an
263
263
 
264
264
  ### Shared filesystem foundation
265
265
 
266
- `poe-code@12.0.7` publishes the Node.js foundation at `poe-code/safe-fs`
266
+ `poe-code@13.0.0` publishes the Node.js foundation at `poe-code/safe-fs`
267
267
  and shared filesystem integration for the SafeJS SDK and both CLIs.
268
- The installed release was verified on Node 18.18.2, 18.20.8, 20.20.0,
268
+ The installed release was verified on Node 18.18.2, 18.20.8, 20.19.2, 20.20.0,
269
269
  22.22.2 and 24.14.0, including public runtime and TypeScript consumers.
270
270
  `@poe-code/safe-fs` is the private workspace name, not a public npm import.
271
271
 
@@ -280,8 +280,8 @@ const filesystem = new MemoryFileSystem();
280
280
  await filesystem.writeFile("/note", new TextEncoder().encode("hello"));
281
281
  ```
282
282
 
283
- The current source uses canonical SafeJS names; the versioned C verification
284
- above predates that rename. SafeJS accepts these adapters through
283
+ Canonical SafeJS names shipped in `poe-code@12.0.8` and were reverified in
284
+ `13.0.0`. SafeJS accepts these adapters through
285
285
  `makeFsModule({ adapter, root?, cwd?, signal? })`
286
286
  from `poe-code/safe-js`. The legacy `poe-code/safejs` routes and `poe-safejs` binary
287
287
  remain aliases to the identical canonical artifacts. Both `poe-safe-js` and `poe-code harness run` accept
@@ -290,7 +290,7 @@ legacy `--fs` and `--fs-root` options retain their Node-backed behavior.
290
290
 
291
291
  The default public entries target Node.js. Full browser runtime support,
292
292
  safe-bash runtime migration and removal of legacy adapter copies remain pending. Canonical and legacy
293
- SafeJS names share artifacts; publication is tracked in the rename plan.
293
+ SafeJS names share the same published artifacts.
294
294
  The host-directory adapter is not race-proof OS isolation. See the
295
295
  [foundation documentation](packages/safe-fs/README.md) for configuration,
296
296
  capabilities and backend limitations.
@@ -318,6 +318,27 @@ in both pages and module workers on Chromium 149.0.7827.55, Firefox 150.0.2 and
318
318
  Playwright WebKit 26.4: 102 checks total, plus 11 negative browser-graph cases
319
319
  and 20 strict browser type profiles. This is FS-only coverage, not Safari
320
320
  certification, browser SafeJS execution or coverage of unreleased guest codecs.
321
+ Those earlier checks did not establish WebDAV request-stream transport support.
322
+
323
+ #### WebDAV streaming migration in 13.0.0
324
+
325
+ Custom or bound Fetch functions must now declare `requestStreamSupport`:
326
+ `"native"` for faithful current-realm native delegation, `true` for a trusted
327
+ custom transport that preserves and consumes stream bodies, or `false` to
328
+ disable streaming. Exact `globalThis.fetch` is probed automatically. Unknown
329
+ transports reject with `ENOTSUP` before source acquisition or any DAV I/O;
330
+ ordinary byte writes are unchanged. This is a programmatic adapter option,
331
+ not a new environment variable, CLI flag or JSON configuration field. `true`
332
+ is a host assertion, not protection against a dishonest transport.
333
+
334
+ The actual `13.0.0` registry artifact passed 50 native Node HTTP controls and
335
+ 390 browser assertions across Chromium, Firefox and WebKit pages and workers,
336
+ including 134 zero-source/no-I/O cases. Native Firefox/WebKit streaming safely
337
+ rejects; genuine Chromium HTTP/2 streaming passes in the exercised deployment.
338
+ Native Chromium HTTP/1 streaming remains unsupported. These are bounded FS
339
+ transport results, not certification of every server or a browser SafeJS SDK.
340
+ See the [WebDAV contract](packages/safe-fs/README.md#breaking-change-declare-custom-request-stream-support)
341
+ and [release record](docs/plans/webdav-stream-capability-fix.md#verified-1300-publication--august-30-2026).
321
342
 
322
343
  Full browser SafeJS SDK/runtime support remains pending. Guest codec integration,
323
344
  portable SDK declaration closure and shared host-call policy/replay metadata
package/dist/index.js CHANGED
@@ -143225,6 +143225,93 @@ var init_misc = __esm({
143225
143225
  }
143226
143226
  });
143227
143227
 
143228
+ // packages/safe-js/src/interp/string-coercion.ts
143229
+ function sandboxString(value, budget, context, joining = /* @__PURE__ */ new Set()) {
143230
+ if (value === null || typeof value !== "object") {
143231
+ if (typeof value === "function") throw new TypeError("Expected a sandbox value.");
143232
+ return budget.allocateString(String(value));
143233
+ }
143234
+ return stringifyObject2(value, budget, context, joining);
143235
+ }
143236
+ async function stringifyObject2(value, budget, context, joining) {
143237
+ const leaveCall = budget.enterCall();
143238
+ try {
143239
+ budget.visitNode();
143240
+ for (const name of ["toString", "valueOf"]) {
143241
+ const descriptor = Object.getOwnPropertyDescriptor(value, name);
143242
+ let result;
143243
+ if (descriptor === void 0) {
143244
+ if (name === "valueOf") continue;
143245
+ result = await defaultToString(value, budget, context, joining);
143246
+ } else {
143247
+ const hook = ownDataValue(value, name);
143248
+ if (!isSandboxClosure(hook)) continue;
143249
+ if (context?.invokeClosure === void 0) {
143250
+ throw new TypeError("String hooks require a sandbox call context.");
143251
+ }
143252
+ result = await context.invokeClosure(hook, [], value);
143253
+ }
143254
+ if (result === null || typeof result !== "object") {
143255
+ return sandboxString(result, budget, context, joining);
143256
+ }
143257
+ }
143258
+ throw new TypeError("Cannot convert object to primitive value");
143259
+ } finally {
143260
+ leaveCall();
143261
+ }
143262
+ }
143263
+ async function defaultToString(value, budget, context, joining) {
143264
+ if (Array.isArray(value) || isFloat32Array(value)) {
143265
+ if (Object.hasOwn(value, "join")) {
143266
+ const join21 = ownDataValue(value, "join");
143267
+ if (!isSandboxClosure(join21))
143268
+ return isFloat32Array(value) ? "[object Float32Array]" : "[object Array]";
143269
+ if (context?.invokeClosure === void 0) {
143270
+ throw new TypeError("String hooks require a sandbox call context.");
143271
+ }
143272
+ return context.invokeClosure(join21, [], value);
143273
+ }
143274
+ if (joining.has(value)) return "";
143275
+ joining.add(value);
143276
+ try {
143277
+ const length = isFloat32Array(value) ? float32Storage(value).length : value.length;
143278
+ let text5 = "";
143279
+ for (let index = 0; index < length; index++) {
143280
+ budget.visitNode();
143281
+ const element = ownDataValue(value, String(index));
143282
+ const part = element === null || element === void 0 ? "" : await sandboxString(element, budget, context, joining);
143283
+ text5 = budget.allocateString(text5 + (index === 0 ? "" : ",") + part);
143284
+ }
143285
+ return text5;
143286
+ } finally {
143287
+ joining.delete(value);
143288
+ }
143289
+ }
143290
+ if (sandboxErrorTypes.has(value)) {
143291
+ const nameValue = ownDataValue(value, "name");
143292
+ const name = nameValue === void 0 ? "Error" : await sandboxString(nameValue, budget, context, joining);
143293
+ const messageValue2 = ownDataValue(value, "message");
143294
+ const message2 = messageValue2 === void 0 ? "" : await sandboxString(messageValue2, budget, context, joining);
143295
+ return name === "" ? message2 : message2 === "" ? name : `${name}: ${message2}`;
143296
+ }
143297
+ return isSandboxPromise(value) ? "[object Promise]" : "[object Object]";
143298
+ }
143299
+ function ownDataValue(value, name) {
143300
+ const descriptor = Object.getOwnPropertyDescriptor(value, name);
143301
+ if (descriptor !== void 0 && !Object.hasOwn(descriptor, "value")) {
143302
+ throw new TypeError("String conversion requires sandbox data properties.");
143303
+ }
143304
+ return descriptor?.value;
143305
+ }
143306
+ var init_string_coercion = __esm({
143307
+ "packages/safe-js/src/interp/string-coercion.ts"() {
143308
+ "use strict";
143309
+ init_shape();
143310
+ init_float32();
143311
+ init_values();
143312
+ }
143313
+ });
143314
+
143228
143315
  // packages/safe-js/src/interp/globals/object-array.ts
143229
143316
  function createObjectArrayGlobals(options) {
143230
143317
  return {
@@ -143320,9 +143407,7 @@ function createObjectArrayGlobals(options) {
143320
143407
  }),
143321
143408
  String: createSandboxClosure({
143322
143409
  sandbox: true,
143323
- call: ([value]) => options.budget.allocateString(
143324
- typeof value === "object" && value !== null && sandboxErrorTypes.has(value) && !Object.hasOwn(value, "toString") ? Error.prototype.toString.call(value) : String(value)
143325
- ),
143410
+ call: (args, context) => sandboxString(args.length === 0 ? "" : args[0], options.budget, context),
143326
143411
  name: "String",
143327
143412
  properties: {
143328
143413
  raw: createSandboxClosure({
@@ -143538,10 +143623,10 @@ function getTemplateRawParts(template2) {
143538
143623
  var init_object_array = __esm({
143539
143624
  "packages/safe-js/src/interp/globals/object-array.ts"() {
143540
143625
  "use strict";
143541
- init_shape();
143542
143626
  init_float32();
143543
143627
  init_float32array2();
143544
143628
  init_iteration();
143629
+ init_string_coercion();
143545
143630
  init_values();
143546
143631
  }
143547
143632
  });
@@ -147823,6 +147908,7 @@ async function invokeSandboxClosure(callee, args, context, stack, span, thisValu
147823
147908
  {
147824
147909
  stack,
147825
147910
  thisValue,
147911
+ invokeClosure: (closure, argumentsList, receiver) => invokeSandboxClosure(closure, argumentsList, context, stack, span, receiver),
147826
147912
  ...span === void 0 ? {} : { span }
147827
147913
  }
147828
147914
  ]);
@@ -156468,7 +156554,7 @@ var init_package2 = __esm({
156468
156554
  "package.json"() {
156469
156555
  package_default2 = {
156470
156556
  name: "poe-code",
156471
- version: "13.0.0",
156557
+ version: "13.0.2",
156472
156558
  description: "CLI tool to configure Poe API for developer workflows.",
156473
156559
  license: "MIT",
156474
156560
  type: "module",
@@ -156747,7 +156833,7 @@ var init_package2 = __esm({
156747
156833
  openai: "^6.34.0",
156748
156834
  "parse-duration": "^2.1.5",
156749
156835
  semver: "^7.7.4",
156750
- "shell-quote": "^1.8.4",
156836
+ "shell-quote": "^1.9.0",
156751
156837
  "simple-git": "^3.36.0",
156752
156838
  "smol-toml": "^1.6.0",
156753
156839
  tiktoken: "^1.0.22",
@@ -156872,7 +156958,10 @@ var init_package2 = __esm({
156872
156958
  },
156873
156959
  default: null
156874
156960
  }
156875
- }
156961
+ },
156962
+ bundleDependencies: [
156963
+ "gray-matter"
156964
+ ]
156876
156965
  };
156877
156966
  }
156878
156967
  });