@phake/mcp 0.0.3 → 0.0.5

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/dist/index.js CHANGED
@@ -43,7 +43,6 @@ import {
43
43
  encrypt,
44
44
  ensureFreshToken,
45
45
  executeSharedTool,
46
- exports_external,
47
46
  fetchClientMetadata,
48
47
  generateKey,
49
48
  generateOpaqueToken,
@@ -83,7 +82,7 @@ import {
83
82
  withCancellation,
84
83
  withCors,
85
84
  workerDiscoveryStrategy
86
- } from "./index-1zv84kf7.js";
85
+ } from "./index-zhw318hb.js";
87
86
  // src/shared/config/env.ts
88
87
  function parseBoolean(value) {
89
88
  return String(value || "false").toLowerCase() === "true";
@@ -445,12 +444,13 @@ function createHttpClient(options = {}) {
445
444
  };
446
445
  }
447
446
  // src/shared/utils/elicitation.ts
447
+ import { z } from "zod";
448
448
  function getLowLevelServer2(server) {
449
449
  return server.server;
450
450
  }
451
- var ElicitResultSchema = exports_external.object({
452
- action: exports_external.enum(["accept", "decline", "cancel"]),
453
- content: exports_external.record(exports_external.string(), exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean(), exports_external.array(exports_external.string())])).optional()
451
+ var ElicitResultSchema = z.object({
452
+ action: z.enum(["accept", "decline", "cancel"]),
453
+ content: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.array(z.string())])).optional()
454
454
  });
455
455
  function validateElicitationSchema(schema) {
456
456
  if (schema.type !== "object") {
@@ -14,5 +14,9 @@ export interface MCPServer {
14
14
  }
15
15
  /**
16
16
  * Create an MCP server instance.
17
+ * @param {MCPServerOptions} options - Configuration options
18
+ * @param {string} options.adapter - Runtime adapter: 'worker' (Cloudflare Workers) or 'node' (Hono/Node.js)
19
+ * @param {SharedToolDefinition<any>[]} [options.tools] - Array of tools to register
20
+ * @returns {MCPServer} - MCP server instance
17
21
  */
18
22
  export declare function createMCPServer(options: MCPServerOptions): MCPServer;
@@ -2,7 +2,7 @@ import {
2
2
  createWorkerRouter,
3
3
  initializeWorkerStorage,
4
4
  shimProcessEnv
5
- } from "../../index-1zv84kf7.js";
5
+ } from "../../index-zhw318hb.js";
6
6
  export {
7
7
  shimProcessEnv,
8
8
  initializeWorkerStorage,
@@ -108,8 +108,8 @@ export interface ElicitResult {
108
108
  }
109
109
  export declare const ElicitResultSchema: z.ZodObject<{
110
110
  action: z.ZodEnum<{
111
- cancel: "cancel";
112
111
  accept: "accept";
112
+ cancel: "cancel";
113
113
  decline: "decline";
114
114
  }>;
115
115
  content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phake/mcp",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fuongz/phake-mcp"
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "scripts": {
29
- "build": "bun build src/index.ts src/runtime/worker/index.ts --outdir dist --target browser --splitting && bun build src/runtime/node/index.ts --outdir dist/runtime/node --target bun && tsc -p tsconfig.build.json",
29
+ "build": "bun build src/index.ts src/runtime/worker/index.ts --outdir dist --target browser --splitting --packages external && bun build src/runtime/node/index.ts --outdir dist/runtime/node --target bun && tsc -p tsconfig.build.json",
30
30
  "typecheck": "tsc --noEmit",
31
31
  "version:major": "bun scripts/version.ts major",
32
32
  "version:minor": "bun scripts/version.ts minor",
@@ -37,8 +37,7 @@
37
37
  "itty-router": "^5.0.23",
38
38
  "jose": "^6.2.2",
39
39
  "oauth4webapi": "^3.8.5",
40
- "zod": "^4.3.6",
41
- "zod-to-json-schema": "^3.25.2"
40
+ "zod": "^4.3.6"
42
41
  },
43
42
  "optionalDependencies": {
44
43
  "@hono/node-server": "^1.19.12",
@@ -47,7 +46,6 @@
47
46
  "hono": "^4.12.9"
48
47
  },
49
48
  "devDependencies": {
50
- "@cloudflare/workers-types": "^4.20260401.1",
51
49
  "@types/better-sqlite3": "^7.6.13",
52
50
  "bun-types": "^1.3.11",
53
51
  "typescript": "^6.0.2"