toolcraft 0.0.713 → 0.0.714

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.
@@ -3612,22 +3612,8 @@ function getOwnEntry(record2, key2) {
3612
3612
  return Object.prototype.hasOwnProperty.call(record2, key2) ? record2[key2] : void 0;
3613
3613
  }
3614
3614
 
3615
- // ../mcp-oauth/dist/client/loopback-authorization.js
3615
+ // ../mcp-oauth/dist/client/authorization-error.js
3616
3616
  var authorizationErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
3617
- var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
3618
- function snapshotLoopbackAuthorizationOptions(options) {
3619
- return {
3620
- ...options,
3621
- openBrowser: options.openBrowser?.bind(options),
3622
- readLine: options.readLine?.bind(options),
3623
- createServer: options.createServer?.bind(options),
3624
- callbackPath: options.callbackPath,
3625
- redirectUri: options.redirectUri,
3626
- signal: options.signal,
3627
- timeoutMs: options.timeoutMs,
3628
- landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
3629
- };
3630
- }
3631
3617
  var OAuthAuthorizationError = class extends Error {
3632
3618
  error;
3633
3619
  errorDescription;
@@ -3643,6 +3629,22 @@ var OAuthAuthorizationError = class extends Error {
3643
3629
  Object.defineProperty(this, authorizationErrorBrand, { value: true });
3644
3630
  }
3645
3631
  };
3632
+
3633
+ // ../mcp-oauth/dist/client/loopback-authorization.js
3634
+ var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
3635
+ function snapshotLoopbackAuthorizationOptions(options) {
3636
+ return {
3637
+ ...options,
3638
+ openBrowser: options.openBrowser?.bind(options),
3639
+ readLine: options.readLine?.bind(options),
3640
+ createServer: options.createServer?.bind(options),
3641
+ callbackPath: options.callbackPath,
3642
+ redirectUri: options.redirectUri,
3643
+ signal: options.signal,
3644
+ timeoutMs: options.timeoutMs,
3645
+ landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
3646
+ };
3647
+ }
3646
3648
  async function createLoopbackAuthorizationSession(options = {}) {
3647
3649
  options = snapshotLoopbackAuthorizationOptions(options);
3648
3650
  options.signal?.throwIfAborted();
@@ -6355,7 +6357,6 @@ function createParameterHeaders(definitions, argumentsValue) {
6355
6357
  }
6356
6358
 
6357
6359
  // src/oauth-discovery.ts
6358
- import { isIP as isIP2 } from "node:net";
6359
6360
  var metadataErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.tiny-mcp-client.OAuthMetadataError");
6360
6361
  var OAuthMetadataError = class extends Error {
6361
6362
  constructor(phase, message, status) {
@@ -6385,7 +6386,7 @@ function normalizeHostname2(hostname2) {
6385
6386
  }
6386
6387
  function isLoopbackHostname2(hostname2) {
6387
6388
  const normalizedHostname = normalizeHostname2(hostname2);
6388
- return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" || isIP2(normalizedHostname) === 4 && normalizedHostname.startsWith("127.");
6389
+ 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);
6389
6390
  }
6390
6391
  function assertSecureUrl2(url, label) {
6391
6392
  if (url.username !== "" || url.password !== "" || url.href.includes("#")) {
@@ -27,5 +27,17 @@
27
27
  "mcp-oauth",
28
28
  "tiny-stdio-mcp-server"
29
29
  ]
30
+ },
31
+ "exports": {
32
+ ".": {
33
+ "types": {
34
+ "workerd": "./dist/index.browser.d.ts",
35
+ "browser": "./dist/index.browser.d.ts",
36
+ "default": "./dist/index.d.ts"
37
+ },
38
+ "workerd": "./dist/index.browser.js",
39
+ "browser": "./dist/index.browser.js",
40
+ "import": "./dist/index.js"
41
+ }
30
42
  }
31
43
  }
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.713",
11
+ "version": "0.0.714",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.713",
3
+ "version": "0.0.714",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.713",
3
+ "version": "0.0.714",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -162,7 +162,7 @@
162
162
  "yaml"
163
163
  ],
164
164
  "optionalDependencies": {
165
- "toolcraft-schema": "0.0.713",
165
+ "toolcraft-schema": "0.0.714",
166
166
  "toolcraft-design": "*",
167
167
  "@poe-code/frontmatter": "*",
168
168
  "@poe-code/agent-mcp-config": "*",