poe-code 12.0.1 → 12.0.3

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 (57) hide show
  1. package/README.md +24 -0
  2. package/dist/index.js +46 -2
  3. package/dist/index.js.map +2 -2
  4. package/dist/metafile.json +1 -1
  5. package/package.json +8 -2
  6. package/packages/package-lint/dist/bundle-policy.d.ts +45 -0
  7. package/packages/package-lint/dist/bundle-policy.js +169 -0
  8. package/packages/package-lint/dist/model.d.ts +4 -10
  9. package/packages/package-lint/dist/model.js +4 -2
  10. package/packages/package-lint/dist/packlist.js +5 -1
  11. package/packages/package-lint/dist/rules/bundle-self-contained.js +11 -25
  12. package/packages/safe-fs/dist/contracts/abort.d.ts +5 -0
  13. package/packages/safe-fs/dist/contracts/cleanup.d.ts +1 -0
  14. package/packages/safe-fs/dist/contracts/errors.d.ts +49 -0
  15. package/packages/safe-fs/dist/contracts/filesystem.d.ts +96 -0
  16. package/packages/safe-fs/dist/contracts/index.d.ts +4 -0
  17. package/packages/safe-fs/dist/contracts/io.d.ts +8 -0
  18. package/packages/safe-fs/dist/contracts/path.d.ts +13 -0
  19. package/packages/safe-fs/dist/fs/memory/index.d.ts +58 -0
  20. package/packages/safe-fs/dist/fs/mount/comparison.d.ts +18 -0
  21. package/packages/safe-fs/dist/fs/mount/identity.d.ts +2 -0
  22. package/packages/safe-fs/dist/fs/mount/index.d.ts +44 -0
  23. package/packages/safe-fs/dist/fs/overlay/index.d.ts +72 -0
  24. package/packages/safe-fs/dist/fs/readonly/index.d.ts +30 -0
  25. package/packages/safe-fs/dist/fs/real/allocation.d.ts +1 -0
  26. package/packages/safe-fs/dist/fs/real/index.d.ts +76 -0
  27. package/packages/safe-fs/dist/fs/s3/authority.d.ts +13 -0
  28. package/packages/safe-fs/dist/fs/s3/filesystem.d.ts +93 -0
  29. package/packages/safe-fs/dist/fs/s3/http/index.d.ts +2 -0
  30. package/packages/safe-fs/dist/fs/s3/http/request.d.ts +16 -0
  31. package/packages/safe-fs/dist/fs/s3/http/signature.d.ts +20 -0
  32. package/packages/safe-fs/dist/fs/s3/http/transport.d.ts +3 -0
  33. package/packages/safe-fs/dist/fs/s3/http/types.d.ts +30 -0
  34. package/packages/safe-fs/dist/fs/s3/http/xml.d.ts +11 -0
  35. package/packages/safe-fs/dist/fs/s3/index.d.ts +6 -0
  36. package/packages/safe-fs/dist/fs/s3/mock.d.ts +48 -0
  37. package/packages/safe-fs/dist/fs/s3/transport.d.ts +103 -0
  38. package/packages/safe-fs/dist/fs/webdav/index.d.ts +2 -0
  39. package/packages/safe-fs/dist/fs/webdav/resource-id.d.ts +18 -0
  40. package/packages/safe-fs/dist/fs/webdav/webdav.d.ts +98 -0
  41. package/packages/safe-fs/dist/fs/webdav/xml.d.ts +15 -0
  42. package/packages/safe-fs/dist/index.d.ts +11 -0
  43. package/packages/safe-fs/dist/node/filesystem.d.ts +11 -0
  44. package/packages/safe-fs/dist/node/index.d.ts +2 -0
  45. package/packages/safe-fs/dist/node/stats.d.ts +4 -0
  46. package/packages/safe-fs/dist/node/values.d.ts +6 -0
  47. package/packages/safejs/dist/chunks/{chunk-73RTIWRH.js → chunk-T55OILHA.js} +2 -2
  48. package/packages/safejs/dist/chunks/{chunk-HD7TQKZ7.js → chunk-Z3ZMLYCK.js} +39 -1
  49. package/packages/safejs/dist/chunks/{chunk-HD7TQKZ7.js.map → chunk-Z3ZMLYCK.js.map} +2 -2
  50. package/packages/safejs/dist/cli.js +2 -2
  51. package/packages/safejs/dist/core.js +1 -1
  52. package/packages/safejs/dist/index.js +2 -2
  53. package/packages/safejs/dist/interp/methods/string.d.ts +1 -1
  54. package/packages/safejs/dist/interp/methods/string.js +43 -1
  55. package/packages/safejs/dist/safe-fs.js +6476 -0
  56. package/packages/safejs/dist/safe-fs.js.map +7 -0
  57. /package/packages/safejs/dist/chunks/{chunk-73RTIWRH.js.map → chunk-T55OILHA.js.map} +0 -0
package/README.md CHANGED
@@ -261,6 +261,30 @@ console.log(identity.name, identity.handle);
261
261
 
262
262
  Uses `POE_API_KEY` or the stored credential and honors `POE_BASE_URL`. Throws an API error when Poe rejects the credential.
263
263
 
264
+ ### Shared filesystem foundation (planned release)
265
+
266
+ The next foundation-only release is intended to expose `poe-code/safe-fs`.
267
+ Public packaging is still under validation; this import is not yet part of a
268
+ verified release. `@poe-code/safe-fs` is the private workspace name, not a public
269
+ npm import.
270
+
271
+ The implemented foundation contains memory, host-directory, S3 and WebDAV
272
+ adapters; mount, read-only and overlay wrappers; and the shared `FileSystem`,
273
+ `FsError` and `createNodeFsBridge` APIs. The intended public usage after release is:
274
+
275
+ ```typescript
276
+ import { MemoryFileSystem } from "poe-code/safe-fs";
277
+
278
+ const filesystem = new MemoryFileSystem();
279
+ await filesystem.writeFile("/note", new TextEncoder().encode("hello"));
280
+ ```
281
+
282
+ The public entry targets Node.js. Browser support, SafeJS/safe-bash runtime
283
+ migration, CLI adapter configuration and the `safe-js` rename are not complete.
284
+ The host-directory adapter is not race-proof OS isolation. See the
285
+ [foundation documentation](packages/safe-fs/README.md) for configuration,
286
+ capabilities and backend limitations.
287
+
264
288
  ## Building from Source
265
289
 
266
290
  Run `npm run build` to compile the workspace and generate the published bundles.
package/dist/index.js CHANGED
@@ -144324,6 +144324,7 @@ function getStringMember(value, property, budget) {
144324
144324
  return createSandboxClosure({
144325
144325
  sandbox: true,
144326
144326
  name: `String#${property}`,
144327
+ ...property === "localeCompare" ? { length: 1 } : {},
144327
144328
  call: (args) => callStringMethod(value, property, args, budget)
144328
144329
  });
144329
144330
  }
@@ -144349,6 +144350,42 @@ function callStringMethod(value, methodName, args, budget, callClosure = async (
144349
144350
  if (methodName === "match" || methodName === "matchAll" || methodName === "search") {
144350
144351
  return callMatchLikeMethod(value, methodName, args);
144351
144352
  }
144353
+ if (methodName === "localeCompare") {
144354
+ if (isSandboxClosure(args[0])) {
144355
+ throw new TypeError("String#localeCompare does not support function comparison values.");
144356
+ }
144357
+ const comparison = budget.allocateString(String(deepCopyFromSandbox(args[0])));
144358
+ const locales = Reflect.apply(Intl.getCanonicalLocales, Intl, [
144359
+ deepCopyFromSandbox(args[1])
144360
+ ]);
144361
+ const options = args[2];
144362
+ const nativeOptions = options === void 0 || options === null ? options : Object.fromEntries(
144363
+ [
144364
+ "usage",
144365
+ "localeMatcher",
144366
+ "collation",
144367
+ "numeric",
144368
+ "caseFirst",
144369
+ "sensitivity",
144370
+ "ignorePunctuation"
144371
+ ].map((property) => {
144372
+ const descriptor = Object.getOwnPropertyDescriptor(options, property);
144373
+ if (descriptor !== void 0 && !("value" in descriptor)) {
144374
+ throw new TypeError("String#localeCompare only supports data option properties.");
144375
+ }
144376
+ const option = descriptor?.value;
144377
+ return [
144378
+ property,
144379
+ option === void 0 ? void 0 : property === "numeric" || property === "ignorePunctuation" ? Boolean(option) : deepCopyFromSandbox(option)
144380
+ ];
144381
+ })
144382
+ );
144383
+ return Reflect.apply(String.prototype.localeCompare, value, [
144384
+ comparison,
144385
+ locales,
144386
+ nativeOptions
144387
+ ]);
144388
+ }
144352
144389
  if (args.some(isSandboxClosure)) {
144353
144390
  throw new TypeError(`String#${methodName} does not support function arguments.`);
144354
144391
  }
@@ -144624,6 +144661,7 @@ var init_string = __esm({
144624
144661
  "includes",
144625
144662
  "indexOf",
144626
144663
  "lastIndexOf",
144664
+ "localeCompare",
144627
144665
  "match",
144628
144666
  "matchAll",
144629
144667
  "normalize",
@@ -155754,7 +155792,7 @@ var init_package2 = __esm({
155754
155792
  "package.json"() {
155755
155793
  package_default2 = {
155756
155794
  name: "poe-code",
155757
- version: "12.0.1",
155795
+ version: "12.0.3",
155758
155796
  description: "CLI tool to configure Poe API for developer workflows.",
155759
155797
  license: "MIT",
155760
155798
  type: "module",
@@ -155800,6 +155838,10 @@ var init_package2 = __esm({
155800
155838
  "./skills": {
155801
155839
  types: "./dist/skills.d.ts",
155802
155840
  import: "./dist/skills.js"
155841
+ },
155842
+ "./safe-fs": {
155843
+ types: "./packages/safe-fs/dist/index.d.ts",
155844
+ import: "./packages/safejs/dist/safe-fs.js"
155803
155845
  }
155804
155846
  },
155805
155847
  workspaces: [
@@ -155948,7 +155990,8 @@ var init_package2 = __esm({
155948
155990
  "packages/toolcraft-openapi/dist",
155949
155991
  "packages/toolcraft-schema/dist",
155950
155992
  "packages/workspace-resolver/dist",
155951
- "packages/worktree/dist"
155993
+ "packages/worktree/dist",
155994
+ "packages/safe-fs/dist/**/*.d.ts"
155952
155995
  ],
155953
155996
  engines: {
155954
155997
  node: ">=18.18"
@@ -156024,6 +156067,7 @@ var init_package2 = __esm({
156024
156067
  "@poe-code/providers": "*",
156025
156068
  "@poe-code/py-poe-spawn": "*",
156026
156069
  "@poe-code/ralph": "*",
156070
+ "@poe-code/safe-fs": "*",
156027
156071
  "@poe-code/safejs": "*",
156028
156072
  "@poe-code/superintendent": "*",
156029
156073
  "@poe-code/task-list": "*",