@poe-platform/safe-js 0.1.787 → 0.1.789

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.
@@ -3728,22 +3728,8 @@ function getOwnEntry(record2, key2) {
3728
3728
  return Object.prototype.hasOwnProperty.call(record2, key2) ? record2[key2] : void 0;
3729
3729
  }
3730
3730
 
3731
- // packages/mcp-oauth/src/client/loopback-authorization.ts
3731
+ // packages/mcp-oauth/src/client/authorization-error.ts
3732
3732
  var authorizationErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
3733
- var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
3734
- function snapshotLoopbackAuthorizationOptions(options) {
3735
- return {
3736
- ...options,
3737
- openBrowser: options.openBrowser?.bind(options),
3738
- readLine: options.readLine?.bind(options),
3739
- createServer: options.createServer?.bind(options),
3740
- callbackPath: options.callbackPath,
3741
- redirectUri: options.redirectUri,
3742
- signal: options.signal,
3743
- timeoutMs: options.timeoutMs,
3744
- landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
3745
- };
3746
- }
3747
3733
  var OAuthAuthorizationError = class extends Error {
3748
3734
  constructor(error, errorDescription) {
3749
3735
  super(`OAuth authorization failed: ${error} \u2014 ${errorDescription}`);
@@ -3759,6 +3745,22 @@ var OAuthAuthorizationError = class extends Error {
3759
3745
  return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
3760
3746
  }
3761
3747
  };
3748
+
3749
+ // packages/mcp-oauth/src/client/loopback-authorization.ts
3750
+ var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
3751
+ function snapshotLoopbackAuthorizationOptions(options) {
3752
+ return {
3753
+ ...options,
3754
+ openBrowser: options.openBrowser?.bind(options),
3755
+ readLine: options.readLine?.bind(options),
3756
+ createServer: options.createServer?.bind(options),
3757
+ callbackPath: options.callbackPath,
3758
+ redirectUri: options.redirectUri,
3759
+ signal: options.signal,
3760
+ timeoutMs: options.timeoutMs,
3761
+ landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
3762
+ };
3763
+ }
3762
3764
  async function createLoopbackAuthorizationSession(options = {}) {
3763
3765
  options = snapshotLoopbackAuthorizationOptions(options);
3764
3766
  options.signal?.throwIfAborted();
@@ -6465,7 +6467,6 @@ function createParameterHeaders(definitions, argumentsValue) {
6465
6467
  }
6466
6468
 
6467
6469
  // packages/tiny-mcp-client/src/oauth-discovery.ts
6468
- import { isIP as isIP2 } from "node:net";
6469
6470
  var metadataErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.tiny-mcp-client.OAuthMetadataError");
6470
6471
  var OAuthMetadataError = class extends Error {
6471
6472
  constructor(phase, message, status) {
@@ -6495,7 +6496,7 @@ function normalizeHostname2(hostname2) {
6495
6496
  }
6496
6497
  function isLoopbackHostname2(hostname2) {
6497
6498
  const normalizedHostname = normalizeHostname2(hostname2);
6498
- return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" || isIP2(normalizedHostname) === 4 && normalizedHostname.startsWith("127.");
6499
+ return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" || normalizedHostname.startsWith("127.") && normalizedHostname.split(".").length === 4 && normalizedHostname.split(".").every((part) => part.length > 0 && [...part].every((char) => char >= "0" && char <= "9") && Number(part) <= 255);
6499
6500
  }
6500
6501
  function assertSecureUrl2(url, label) {
6501
6502
  if (url.username !== "" || url.password !== "" || url.href.includes("#")) {
@@ -2,7 +2,7 @@ import {
2
2
  McpError,
3
3
  connectMcpTransport,
4
4
  normalizeMcpOptions
5
- } from "./chunk-DYUX6CBF.js";
5
+ } from "./chunk-MCFRB5X3.js";
6
6
  import {
7
7
  declareHostOperation,
8
8
  runResources
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KULEMOAE.js";
16
16
  import {
17
17
  parseMcpConfig
18
- } from "./chunk-DYUX6CBF.js";
18
+ } from "./chunk-MCFRB5X3.js";
19
19
  import {
20
20
  lint
21
21
  } from "./chunk-OPYN6N5M.js";
@@ -296,7 +296,7 @@ async function runScriptFile(filepath, parsed, options) {
296
296
  import("./dump-XDJEF2LG.js"),
297
297
  import("./runtime-modules-SL5D6LAJ.js"),
298
298
  import("../modules/fs.js"),
299
- import("./mcp-R3VLCRHJ.js")
299
+ import("./mcp-PTCA53MN.js")
300
300
  ]);
301
301
  const loaded = loadExecutableSource(filepath, await options.readFile(filepath, "utf8"));
302
302
  const meta = {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeMcpModule
3
- } from "./chunk-VVUKH2DQ.js";
4
- import "./chunk-DYUX6CBF.js";
3
+ } from "./chunk-W6C3Q6U4.js";
4
+ import "./chunk-MCFRB5X3.js";
5
5
  import "./chunk-ULPZIHB5.js";
6
6
  import "./chunk-A3LXCGMJ.js";
7
7
  import "./chunk-JCHJGIQA.js";
@@ -13,7 +13,7 @@ import path from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  async function runCli(argv, options = {}) {
15
15
  if (!argv.includes("--help") && !argv.includes("-h")) {
16
- const runtime = await import("./chunks/cli-runtime-S5WKJ7FW.js");
16
+ const runtime = await import("./chunks/cli-runtime-DYXJZCGV.js");
17
17
  return runtime.runCli(argv, options, createUsage());
18
18
  }
19
19
  const brokenPipe = createBrokenPipeState();
@@ -32,7 +32,7 @@ async function runCli(argv, options = {}) {
32
32
  stderr.write(`${error instanceof Error ? error.message : String(error)}
33
33
  `);
34
34
  if (brokenPipe.closed) return 0;
35
- const { exitCodeForError } = await import("./chunks/cli-runtime-S5WKJ7FW.js");
35
+ const { exitCodeForError } = await import("./chunks/cli-runtime-DYXJZCGV.js");
36
36
  return exitCodeForError(error);
37
37
  }
38
38
  }
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunks/chunk-UU4T2KIT.js";
12
12
  import {
13
13
  makeMcpModule
14
- } from "./chunks/chunk-VVUKH2DQ.js";
14
+ } from "./chunks/chunk-W6C3Q6U4.js";
15
15
  import {
16
16
  AgentSpawnError,
17
17
  EnvAccessError,
@@ -35,7 +35,7 @@ import {
35
35
  } from "./chunks/chunk-KULEMOAE.js";
36
36
  import {
37
37
  parseMcpConfig
38
- } from "./chunks/chunk-DYUX6CBF.js";
38
+ } from "./chunks/chunk-MCFRB5X3.js";
39
39
  import {
40
40
  lint
41
41
  } from "./chunks/chunk-OPYN6N5M.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-js",
3
- "version": "0.1.787",
3
+ "version": "0.1.789",
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.787",
61
+ "@poe-platform/safe-fs": "0.1.789",
62
62
  "@petamoriken/float16": "^3.9.3",
63
63
  "@noble/hashes": "2.4.0",
64
64
  "@formatjs/intl-localematcher": "0.8.13",