toolcraft 0.0.713 → 0.0.715

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.
package/composition.json CHANGED
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.108",
101
+ "version": "0.1.109",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.713",
116
+ "version": "0.0.715",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.713",
126
+ "version": "0.0.715",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.108",
101
+ "version": "0.1.109",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.713",
116
+ "version": "0.0.715",
117
117
  "license": "MIT"
118
118
  },
119
119
  {
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "toolcraft-schema",
126
- "version": "0.0.713",
126
+ "version": "0.0.715",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "name": "tiny-http-mcp-server",
21
- "version": "0.1.108",
21
+ "version": "0.1.109",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -0,0 +1,7 @@
1
+ export declare class OAuthAuthorizationError extends Error {
2
+ readonly error: string;
3
+ readonly errorDescription: string;
4
+ /** Recognize errors from separately bundled copies of this package. */
5
+ static is(value: unknown): value is OAuthAuthorizationError;
6
+ constructor(error: string, errorDescription: string);
7
+ }
@@ -0,0 +1,16 @@
1
+ const authorizationErrorBrand = Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
2
+ export class OAuthAuthorizationError extends Error {
3
+ error;
4
+ errorDescription;
5
+ /** Recognize errors from separately bundled copies of this package. */
6
+ static is(value) {
7
+ return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
8
+ }
9
+ constructor(error, errorDescription) {
10
+ super(`OAuth authorization failed: ${error} — ${errorDescription}`);
11
+ this.error = error;
12
+ this.errorDescription = errorDescription;
13
+ this.name = "OAuthAuthorizationError";
14
+ Object.defineProperty(this, authorizationErrorBrand, { value: true });
15
+ }
16
+ }
@@ -1,4 +1,5 @@
1
1
  import http from "node:http";
2
+ export { OAuthAuthorizationError } from "./authorization-error.js";
2
3
  export interface OAuthLandingPage {
3
4
  title: string;
4
5
  body: string;
@@ -23,13 +24,6 @@ export interface LoopbackAuthorizationSession {
23
24
  /** Capture declared configuration regardless of property enumerability. */
24
25
  export declare function snapshotLoopbackAuthorizationOptions(options: LoopbackAuthorizationOptions): LoopbackAuthorizationOptions;
25
26
  /** Authorization callback denial, retaining the provider diagnostic for host observers. */
26
- export declare class OAuthAuthorizationError extends Error {
27
- readonly error: string;
28
- readonly errorDescription: string;
29
- /** Recognize errors from separately bundled copies of this package. */
30
- static is(value: unknown): value is OAuthAuthorizationError;
31
- constructor(error: string, errorDescription: string);
32
- }
33
27
  export declare function createLoopbackAuthorizationSession(options?: LoopbackAuthorizationOptions): Promise<LoopbackAuthorizationSession>;
34
28
  export declare function loopbackTarget(options: LoopbackAuthorizationOptions): {
35
29
  port: number;
@@ -1,6 +1,7 @@
1
1
  import http from "node:http";
2
2
  import { parseAuthorizationState } from "./authorization-state.js";
3
- const authorizationErrorBrand = Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
3
+ import { OAuthAuthorizationError } from "./authorization-error.js";
4
+ export { OAuthAuthorizationError } from "./authorization-error.js";
4
5
  const oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
5
6
  /** Capture declared configuration regardless of property enumerability. */
6
7
  export function snapshotLoopbackAuthorizationOptions(options) {
@@ -9,21 +10,6 @@ export function snapshotLoopbackAuthorizationOptions(options) {
9
10
  landingPage: options.landingPage === undefined ? undefined : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body } };
10
11
  }
11
12
  /** Authorization callback denial, retaining the provider diagnostic for host observers. */
12
- export class OAuthAuthorizationError extends Error {
13
- error;
14
- errorDescription;
15
- /** Recognize errors from separately bundled copies of this package. */
16
- static is(value) {
17
- return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
18
- }
19
- constructor(error, errorDescription) {
20
- super(`OAuth authorization failed: ${error} — ${errorDescription}`);
21
- this.error = error;
22
- this.errorDescription = errorDescription;
23
- this.name = "OAuthAuthorizationError";
24
- Object.defineProperty(this, authorizationErrorBrand, { value: true });
25
- }
26
- }
27
13
  export async function createLoopbackAuthorizationSession(options = {}) {
28
14
  options = snapshotLoopbackAuthorizationOptions(options);
29
15
  options.signal?.throwIfAborted();
@@ -0,0 +1,12 @@
1
+ export { snapshotOAuthPersistenceOptions } from "./client/persistence-options.js";
2
+ export { OAuthAuthorizationError } from "./client/authorization-error.js";
3
+ export { OAuthError } from "./client/token-endpoint.js";
4
+ export { canonicalizeResourceIndicator } from "./resource-indicator.js";
5
+ export { readBoundedResponseText } from "./http-response.js";
6
+ export { fetchMcpResponse } from "./http-fetch.js";
7
+ export type * from "./client/types.js";
8
+ import type { OAuthClientProvider, OAuthClientProviderOptions } from "./client/types.js";
9
+ /** Remote hosts own credentials and authorization; desktop defaults are unavailable. */
10
+ export declare function createOAuthClientProvider(options: OAuthClientProviderOptions): OAuthClientProvider;
11
+ export declare function createDefaultOAuthClientProvider(): never;
12
+ export declare function createAuthStoreSessionStore(): never;
@@ -0,0 +1,18 @@
1
+ export { snapshotOAuthPersistenceOptions } from "./client/persistence-options.js";
2
+ export { OAuthAuthorizationError } from "./client/authorization-error.js";
3
+ export { OAuthError } from "./client/token-endpoint.js";
4
+ export { canonicalizeResourceIndicator } from "./resource-indicator.js";
5
+ export { readBoundedResponseText } from "./http-response.js";
6
+ export { fetchMcpResponse } from "./http-fetch.js";
7
+ /** Remote hosts own credentials and authorization; desktop defaults are unavailable. */
8
+ export function createOAuthClientProvider(options) {
9
+ if ("provider" in options && options.provider !== undefined)
10
+ return options.provider;
11
+ throw new Error("Worker MCP requires a host-owned OAuth provider or authenticated fetch; desktop OAuth is unavailable");
12
+ }
13
+ export function createDefaultOAuthClientProvider() {
14
+ throw new Error("Desktop OAuth is unavailable in Worker MCP");
15
+ }
16
+ export function createAuthStoreSessionStore() {
17
+ throw new Error("Desktop OAuth persistence is unavailable in Worker MCP");
18
+ }
@@ -6,7 +6,13 @@
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/index.d.ts",
9
+ "types": {
10
+ "workerd": "./dist/index.browser.d.ts",
11
+ "browser": "./dist/index.browser.d.ts",
12
+ "default": "./dist/index.d.ts"
13
+ },
14
+ "workerd": "./dist/index.browser.js",
15
+ "browser": "./dist/index.browser.js",
10
16
  "import": "./dist/index.js"
11
17
  }
12
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.108",
3
+ "version": "0.1.109",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",