@open-wa/mcp 5.0.0-alpha.8 → 5.1.0

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.d.mts CHANGED
@@ -1,63 +1,19 @@
1
1
  import { HttpMethodDefinition } from "@open-wa/schema/http-manifest";
2
2
  import { Config, HttpMethodDefinition as HttpMethodDefinition$1 } from "@open-wa/schema";
3
3
  import { Hono } from "hono";
4
-
5
4
  //#region src/manifest.d.ts
6
- /**
7
- * MCP-specific projection of a method capability.
8
- */
9
- interface McpToolDefinition {
10
- /**
11
- * The canonical namespaced tool name for MCP.
12
- * @example 'messages.sendText'
13
- */
5
+ export interface McpToolDefinition {
14
6
  toolName: string;
15
- /**
16
- * The raw function name in the client.
17
- * @example 'sendText'
18
- */
19
7
  functionName: string;
20
- /**
21
- * The namespaced name (method part only).
22
- * @example 'sendText'
23
- */
24
8
  namespacedName: string;
25
- /**
26
- * The namespace this method belongs to.
27
- * @example 'messages'
28
- */
29
9
  namespace: string;
30
- /**
31
- * Human-readable description of the tool.
32
- */
33
10
  description: string;
34
- /**
35
- * Zod input schema.
36
- */
37
11
  inputSchema: HttpMethodDefinition['inputSchema'];
38
- /**
39
- * Zod output schema.
40
- */
41
12
  outputSchema: HttpMethodDefinition['outputSchema'];
42
- /**
43
- * Preserved parameter order for positional resolution.
44
- */
45
13
  parameterOrder: string[];
46
- /**
47
- * Known aliases for this method.
48
- */
49
14
  aliases: string[];
50
- /**
51
- * Deprecated aliases for this method.
52
- */
53
15
  deprecatedAliases: string[];
54
- /**
55
- * Map of payload key aliases to canonical keys.
56
- */
57
16
  keyAliasMap: Record<string, string>;
58
- /**
59
- * Optional metadata hints for AI clients.
60
- */
61
17
  annotations?: {
62
18
  title?: string;
63
19
  readOnlyHint?: boolean;
@@ -65,180 +21,70 @@ interface McpToolDefinition {
65
21
  idempotentHint?: boolean;
66
22
  };
67
23
  }
68
- /**
69
- * Projects the schema registry into a list of canonical MCP tool definitions.
70
- */
71
- declare function getMcpToolDefinitions(basePath?: string): McpToolDefinition[];
24
+ export declare function getMcpToolDefinitions(basePath?: string): McpToolDefinition[];
72
25
  //#endregion
73
26
  //#region src/tool-naming.d.ts
74
- /**
75
- * Logic for stable, namespaced MCP tool names.
76
- */
77
- /**
78
- * Returns the canonical namespaced tool name for MCP.
79
- * @example getCanonicalToolName('messages', 'sendText') -> 'messages.sendText'
80
- */
81
- declare function getCanonicalToolName(namespace: string, methodName: string): string;
27
+ export declare function getCanonicalToolName(namespace: string, methodName: string): string;
82
28
  //#endregion
83
29
  //#region src/execution/kernel.d.ts
84
- /**
85
- * Context required to execute an Open-WA capability via any transport.
86
- */
87
- interface ExecutionContext {
88
- /**
89
- * The active client instance or proxy.
90
- */
30
+ export interface ExecutionContext {
91
31
  client: Record<string, (...args: any[]) => Promise<any> | any> | undefined;
92
- /**
93
- * The metadata definition for the method being invoked.
94
- */
95
32
  definition: HttpMethodDefinition$1;
96
- /**
97
- * The raw input payload (merged query + body, or MCP arguments).
98
- */
99
33
  payload: Record<string, unknown>;
100
- /**
101
- * Optional diagnostic emitter for logging.
102
- */
103
34
  elasticEmitter?: {
104
35
  log: (data: any) => void;
105
36
  };
106
- /**
107
- * The unique session identifier.
108
- */
109
37
  sessionId: string;
110
38
  }
111
- /**
112
- * Standardized result of a capability execution.
113
- */
114
- interface ExecutionResult<T = any> {
39
+ export interface ExecutionResult<T = any> {
115
40
  success: boolean;
116
41
  data?: T;
117
42
  error?: string;
118
43
  details?: any;
119
44
  status: number;
120
45
  }
121
- /**
122
- * The shared execution kernel for Open-WA capabilities.
123
- * Ensures strict parity between HTTP API and MCP transport by centralizing
124
- * normalization, validation, and invocation logic.
125
- */
126
- declare function executeCapability(ctx: ExecutionContext): Promise<ExecutionResult>;
46
+ export declare function executeCapability(ctx: ExecutionContext): Promise<ExecutionResult>;
127
47
  //#endregion
128
48
  //#region src/execution/args.d.ts
129
- /**
130
- * Normalizes an input payload into a form suitable for schema validation.
131
- * Handles:
132
- * 1. Array-based positional arguments
133
- * 2. Mixed key aliases (legacy vs canonical)
134
- * 3. Wrapped 'args' or 'input' properties
135
- */
136
- declare function normalizeMethodPayload(def: HttpMethodDefinition$1, payload: unknown): any;
49
+ export declare function normalizeMethodPayload(def: HttpMethodDefinition$1, payload: unknown): any;
137
50
  //#endregion
138
51
  //#region src/execution/invoke.d.ts
139
- interface ClientMethodDefinitionLike {
52
+ export interface ClientMethodDefinitionLike {
140
53
  functionName: string;
141
54
  parameterOrder: string[];
142
55
  wapiOverride?: string;
143
56
  }
144
- /**
145
- * Invokes a client method by resolving its implementation from the client instance
146
- * and mapping the payload to positional arguments if necessary.
147
- */
148
- declare function invokeClientMethod(client: Record<string, (...args: any[]) => Promise<any> | any> | undefined, def: ClientMethodDefinitionLike, payload: unknown): Promise<any>;
57
+ export declare function invokeClientMethod(client: Record<string, (...args: any[]) => Promise<any> | any> | undefined, def: ClientMethodDefinitionLike, payload: unknown): Promise<any>;
149
58
  //#endregion
150
59
  //#region src/execution/errors.d.ts
151
- /**
152
- * MCP execution error types.
153
- *
154
- * Maintains the separation between protocol-level errors
155
- * (JSON-RPC envelope issues) and tool-level errors
156
- * (open-wa runtime invocation failures).
157
- */
158
- /**
159
- * A tool execution error from the open-wa runtime.
160
- * This should be surfaced as `isError: true` in MCP tool results,
161
- * NOT as a JSON-RPC protocol error.
162
- */
163
- declare class ToolExecutionError extends Error {
60
+ export declare class ToolExecutionError extends Error {
164
61
  readonly statusCode: number;
165
62
  readonly details?: unknown;
166
63
  constructor(message: string, statusCode?: number, details?: unknown);
167
64
  }
168
- /**
169
- * A validation error from Zod schema parsing.
170
- * This should be surfaced as `isError: true` in MCP tool results
171
- * with the validation details attached.
172
- */
173
- declare class ToolValidationError extends ToolExecutionError {
65
+ export declare class ToolValidationError extends ToolExecutionError {
174
66
  constructor(message: string, details?: unknown);
175
67
  }
176
- /**
177
- * Thrown when the client/session is not ready for execution.
178
- */
179
- declare class SessionNotReadyError extends ToolExecutionError {
68
+ export declare class SessionNotReadyError extends ToolExecutionError {
180
69
  constructor(message?: string);
181
70
  }
182
- /**
183
- * Thrown when authentication is missing or invalid.
184
- */
185
- declare class AuthenticationError extends ToolExecutionError {
71
+ export declare class AuthenticationError extends ToolExecutionError {
186
72
  constructor(message?: string);
187
73
  }
188
74
  //#endregion
189
75
  //#region src/adapter/hono-mcp.d.ts
190
- interface HonoMcpAdapterOptions {
76
+ export interface HonoMcpAdapterOptions {
191
77
  config: Config;
192
- /**
193
- * Getter for the active client instance.
194
- */
195
78
  clientSource: () => Record<string, any> | undefined;
196
- /**
197
- * Optional logging emitter.
198
- */
199
79
  elasticEmitter?: {
200
80
  log: (data: any) => void;
201
81
  };
202
- /**
203
- * Base path for tool documentation links.
204
- */
205
82
  basePath?: string;
206
- /**
207
- * Getter for session readiness state.
208
- * Used for lifecycle gating parity with HTTP transport.
209
- */
210
83
  isSessionConnected?: () => boolean;
211
84
  }
212
- /**
213
- * Creates an MCP adapter using the Streamable HTTP transport (single-endpoint).
214
- *
215
- * open-wa product decision:
216
- * hosted MCP is Easy API-only and unavailable through createClient()
217
- *
218
- * This adapter:
219
- * - Uses WebStandardStreamableHTTPServerTransport for a single-endpoint /mcp shape
220
- * - Enforces Easy API API-key auth on every request
221
- * - Gates tool execution on session readiness (parity with HTTP transport)
222
- * - Returns protocol errors for malformed protocol requests
223
- * - Returns tool-level errors for open-wa execution failures
224
- */
225
- declare function createHonoMcpAdapter(options: HonoMcpAdapterOptions): {
226
- /**
227
- * Mounts the MCP Streamable HTTP endpoint on the provided Hono app.
228
- *
229
- * This creates a single endpoint at `path` that handles:
230
- * - POST: JSON-RPC messages (initialize, tools/list, tools/call)
231
- * - GET: Server-initiated SSE stream
232
- * - DELETE: Session termination
233
- *
234
- * API-key auth is enforced on every request before delegation to MCP.
235
- */
85
+ export declare function createHonoMcpAdapter(options: HonoMcpAdapterOptions): {
236
86
  mount: (app: Hono, path: string) => void;
237
- /**
238
- * Cleanly shut down the MCP transport.
239
- */
240
87
  close: () => Promise<void>;
241
88
  };
242
89
  //#endregion
243
- export { AuthenticationError, ClientMethodDefinitionLike, ExecutionContext, ExecutionResult, HonoMcpAdapterOptions, McpToolDefinition, SessionNotReadyError, ToolExecutionError, ToolValidationError, createHonoMcpAdapter, executeCapability, getCanonicalToolName, getMcpToolDefinitions, invokeClientMethod, normalizeMethodPayload };
244
90
  //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":["HttpMethodDefinition","HttpMethodDefinition"],"sources":["../src/manifest.ts","../src/tool-naming.ts","../src/execution/kernel.ts","../src/execution/args.ts","../src/execution/invoke.ts","../src/execution/errors.ts","../src/adapter/hono-mcp.ts"],"mappings":";;;;iBAMiB;EAKf;EAKA;EAKA;EAKA;EAIA;EAIA,aAAa;EAIb,cAAc;EAId;EAIA;EAIA;EAIA,aAAa;EAIb;IACE;IACA;IACA;IACA;;;wBAOY,sBAAsB,oBAAoB;;;wBC7D1C,qBAAqB,mBAAmB;;;iBCDvC;EAIf,QAAQ,mBAAmB,gBAAgB;EAI3C,YAAYA;EAIZ,SAAS;EAIT;IACE,MAAM;;EAKR;;iBAMe,gBAAgB;EAC/B;EACA,OAAO;EACP;EACA;EACA;;wBAQoB,kBACpB,KAAK,mBACJ,QAAQ;;;wBC/BK,uBAAuB,KAAKC,wBAAsB;;;iBCnBjD;EACf;EACA;EACA;;wBAOoB,mBACpB,QAAQ,mBAAmB,gBAAgB,iCAC3C,KAAK,4BACL,mBACC;;;qBCDU,2BAA2B;WACtB;WACA;EAEhB,YAAY,iBAAiB,qBAAkB;;qBAapC,4BAA4B;EACvC,YAAY,iBAAiB;;qBASlB,6BAA6B;EACxC,YAAY;;qBASD,4BAA4B;EACvC,YAAY;;;;iBCvCG;EACf,QAAQ;EAIR,oBAAoB;EAIpB;IACE,MAAM;;EAKR;EAKA;;wBAgBc,qBAAqB,SAAS;EA6H1C,QAAK,KAAQ,MAAI;EA4BjB,aAAK"}
package/dist/index.mjs CHANGED
@@ -275,6 +275,16 @@ function createHonoMcpAdapter(options) {
275
275
  });
276
276
  server.connect(transport);
277
277
  return {
278
+ /**
279
+ * Mounts the MCP Streamable HTTP endpoint on the provided Hono app.
280
+ *
281
+ * This creates a single endpoint at `path` that handles:
282
+ * - POST: JSON-RPC messages (initialize, tools/list, tools/call)
283
+ * - GET: Server-initiated SSE stream
284
+ * - DELETE: Session termination
285
+ *
286
+ * API-key auth is enforced on every request before delegation to MCP.
287
+ */
278
288
  mount: (app, path) => {
279
289
  app.all(`${path}`, async (c) => {
280
290
  if (config.apiKey) {
@@ -287,6 +297,9 @@ function createHonoMcpAdapter(options) {
287
297
  return await transport.handleRequest(c.req.raw);
288
298
  });
289
299
  },
300
+ /**
301
+ * Cleanly shut down the MCP transport.
302
+ */
290
303
  close: async () => {
291
304
  await transport.close();
292
305
  await server.close();
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/tool-naming.ts","../src/manifest.ts","../src/execution/args.ts","../src/execution/invoke.ts","../src/execution/kernel.ts","../src/execution/errors.ts","../src/adapter/hono-mcp.ts"],"sourcesContent":["/**\n * Logic for stable, namespaced MCP tool names.\n */\n\n/**\n * Returns the canonical namespaced tool name for MCP.\n * @example getCanonicalToolName('messages', 'sendText') -> 'messages.sendText'\n */\nexport function getCanonicalToolName(namespace: string, methodName: string): string {\n return `${namespace}.${methodName}`;\n}\n","import { getHttpMethodDefinitions, type HttpMethodDefinition } from '@open-wa/schema/http-manifest';\nimport { getCanonicalToolName } from './tool-naming';\n\n/**\n * MCP-specific projection of a method capability.\n */\nexport interface McpToolDefinition {\n /**\n * The canonical namespaced tool name for MCP.\n * @example 'messages.sendText'\n */\n toolName: string;\n /**\n * The raw function name in the client.\n * @example 'sendText'\n */\n functionName: string;\n /**\n * The namespaced name (method part only).\n * @example 'sendText'\n */\n namespacedName: string;\n /**\n * The namespace this method belongs to.\n * @example 'messages'\n */\n namespace: string;\n /**\n * Human-readable description of the tool.\n */\n description: string;\n /**\n * Zod input schema.\n */\n inputSchema: HttpMethodDefinition['inputSchema'];\n /**\n * Zod output schema.\n */\n outputSchema: HttpMethodDefinition['outputSchema'];\n /**\n * Preserved parameter order for positional resolution.\n */\n parameterOrder: string[];\n /**\n * Known aliases for this method.\n */\n aliases: string[];\n /**\n * Deprecated aliases for this method.\n */\n deprecatedAliases: string[];\n /**\n * Map of payload key aliases to canonical keys.\n */\n keyAliasMap: Record<string, string>;\n /**\n * Optional metadata hints for AI clients.\n */\n annotations?: {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n };\n}\n\n/**\n * Projects the schema registry into a list of canonical MCP tool definitions.\n */\nexport function getMcpToolDefinitions(basePath = '/api'): McpToolDefinition[] {\n return getHttpMethodDefinitions(basePath).map((def) => {\n return {\n toolName: getCanonicalToolName(def.namespace, def.namespacedName),\n functionName: def.functionName,\n namespacedName: def.namespacedName,\n namespace: def.namespace,\n description: def.description,\n inputSchema: def.inputSchema,\n outputSchema: def.outputSchema,\n parameterOrder: def.parameterOrder,\n aliases: def.aliases,\n deprecatedAliases: def.deprecatedAliases,\n keyAliasMap: def.keyAliasMap,\n annotations: {\n title: def.functionName,\n // Hints can be derived from method names or hardcoded metadata in future\n readOnlyHint: def.functionName.startsWith('get') || def.functionName.startsWith('is'),\n },\n };\n });\n}\n","import { normalizeParameterKeys, z, type HttpMethodDefinition } from '@open-wa/schema';\n\nfunction mapArrayArgs(def: HttpMethodDefinition, args: unknown[]): Record<string, unknown> {\n return def.parameterOrder.reduce<Record<string, unknown>>((acc, key, index) => {\n if (index < args.length) {\n acc[key] = args[index];\n }\n\n return acc;\n }, {});\n}\n\n/**\n * Normalizes an input payload into a form suitable for schema validation.\n * Handles:\n * 1. Array-based positional arguments\n * 2. Mixed key aliases (legacy vs canonical)\n * 3. Wrapped 'args' or 'input' properties\n */\nexport function normalizeMethodPayload(def: HttpMethodDefinition, payload: unknown): any {\n if (Array.isArray(payload)) {\n return normalizeParameterKeys(mapArrayArgs(def, payload), def.keyAliasMap);\n }\n\n if (!payload || typeof payload !== 'object') {\n return {};\n }\n\n const record = payload as Record<string, unknown>;\n\n if ('args' in record) {\n const args = record.args;\n\n if (Array.isArray(args)) {\n return normalizeParameterKeys(mapArrayArgs(def, args), def.keyAliasMap);\n }\n\n if (args && typeof args === 'object') {\n return normalizeParameterKeys(args as Record<string, any>, def.keyAliasMap);\n }\n }\n\n if (record.input && typeof record.input === 'object' && !Array.isArray(record.input)) {\n return normalizeParameterKeys(record.input as Record<string, any>, def.keyAliasMap);\n }\n\n if (def.inputSchema instanceof z.ZodObject) {\n const knownKeys = new Set(Object.keys(def.inputSchema.shape));\n const filtered = Object.fromEntries(\n Object.entries(record).filter(([key]) => knownKeys.has(key))\n );\n\n if (Object.keys(filtered).length > 0) {\n return normalizeParameterKeys(filtered, def.keyAliasMap);\n }\n }\n\n return normalizeParameterKeys(record, def.keyAliasMap);\n}\n","export interface ClientMethodDefinitionLike {\n functionName: string;\n parameterOrder: string[];\n wapiOverride?: string;\n}\n\n/**\n * Invokes a client method by resolving its implementation from the client instance\n * and mapping the payload to positional arguments if necessary.\n */\nexport async function invokeClientMethod(\n client: Record<string, (...args: any[]) => Promise<any> | any> | undefined,\n def: ClientMethodDefinitionLike,\n payload: unknown\n): Promise<any> {\n if (!client) {\n throw new Error('Client not initialized');\n }\n\n const method = client[def.functionName] ?? (def.wapiOverride ? client[def.wapiOverride] : undefined);\n\n if (typeof method !== 'function') {\n throw new Error(`Method ${def.functionName} not implemented on Client`);\n }\n\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {\n return await method.call(client);\n }\n\n const resolvedArgs = def.parameterOrder.map((key) => (payload as Record<string, unknown>)[key]);\n return await method.call(client, ...resolvedArgs);\n}\n","import type { HttpMethodDefinition } from '@open-wa/schema';\nimport { normalizeMethodPayload } from './args';\nimport { invokeClientMethod } from './invoke';\n\n/**\n * Context required to execute an Open-WA capability via any transport.\n */\nexport interface ExecutionContext {\n /**\n * The active client instance or proxy.\n */\n client: Record<string, (...args: any[]) => Promise<any> | any> | undefined;\n /**\n * The metadata definition for the method being invoked.\n */\n definition: HttpMethodDefinition;\n /**\n * The raw input payload (merged query + body, or MCP arguments).\n */\n payload: Record<string, unknown>;\n /**\n * Optional diagnostic emitter for logging.\n */\n elasticEmitter?: {\n log: (data: any) => void;\n };\n /**\n * The unique session identifier.\n */\n sessionId: string;\n}\n\n/**\n * Standardized result of a capability execution.\n */\nexport interface ExecutionResult<T = any> {\n success: boolean;\n data?: T;\n error?: string;\n details?: any;\n status: number;\n}\n\n/**\n * The shared execution kernel for Open-WA capabilities.\n * Ensures strict parity between HTTP API and MCP transport by centralizing\n * normalization, validation, and invocation logic.\n */\nexport async function executeCapability(\n ctx: ExecutionContext\n): Promise<ExecutionResult> {\n const { client, definition, payload, elasticEmitter, sessionId } = ctx;\n const startTime = Date.now();\n const methodName = definition.functionName;\n\n try {\n // 1. Normalize aliases and legacy keys\n const normalizedPayload = normalizeMethodPayload(definition, payload);\n\n // 2. Validate against Zod schema (strict)\n const validated = await definition.inputSchema.parseAsync(normalizedPayload);\n\n // 3. Invoke the client method with positional argument resolution\n const result = await invokeClientMethod(client, definition, validated);\n\n // 4. Log successful execution to monitoring if available\n elasticEmitter?.log({\n level: 'info',\n component: 'api',\n method: methodName,\n sessionId,\n duration: Date.now() - startTime,\n statusCode: 200,\n message: `Successfully executed ${methodName}`,\n });\n\n return {\n success: true,\n data: result,\n status: 200,\n };\n } catch (error: any) {\n const isValidationError = error?.name === 'ZodError';\n const status = isValidationError ? 400 : 500;\n\n // Log failure to monitoring\n elasticEmitter?.log({\n level: 'error',\n component: 'api',\n method: methodName,\n sessionId,\n duration: Date.now() - startTime,\n statusCode: status,\n message: error?.message || 'Internal Server Error',\n });\n\n return {\n success: false,\n error: isValidationError ? 'Validation Error' : (error?.message || 'Internal Server Error'),\n details: isValidationError ? error.issues : undefined,\n status,\n };\n }\n}\n","/**\n * MCP execution error types.\n *\n * Maintains the separation between protocol-level errors\n * (JSON-RPC envelope issues) and tool-level errors\n * (open-wa runtime invocation failures).\n */\n\n/**\n * A tool execution error from the open-wa runtime.\n * This should be surfaced as `isError: true` in MCP tool results,\n * NOT as a JSON-RPC protocol error.\n */\nexport class ToolExecutionError extends Error {\n public readonly statusCode: number;\n public readonly details?: unknown;\n\n constructor(message: string, statusCode = 500, details?: unknown) {\n super(message);\n this.name = 'ToolExecutionError';\n this.statusCode = statusCode;\n this.details = details;\n }\n}\n\n/**\n * A validation error from Zod schema parsing.\n * This should be surfaced as `isError: true` in MCP tool results\n * with the validation details attached.\n */\nexport class ToolValidationError extends ToolExecutionError {\n constructor(message: string, details?: unknown) {\n super(message, 400, details);\n this.name = 'ToolValidationError';\n }\n}\n\n/**\n * Thrown when the client/session is not ready for execution.\n */\nexport class SessionNotReadyError extends ToolExecutionError {\n constructor(message = 'Session is not connected or ready for execution') {\n super(message, 503);\n this.name = 'SessionNotReadyError';\n }\n}\n\n/**\n * Thrown when authentication is missing or invalid.\n */\nexport class AuthenticationError extends ToolExecutionError {\n constructor(message = 'Authentication required. Provide a valid API key.') {\n super(message, 401);\n this.name = 'AuthenticationError';\n }\n}\n","import { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { WebStandardStreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js';\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n} from '@modelcontextprotocol/sdk/types.js';\nimport type { Hono, Context } from 'hono';\nimport { zodToJsonSchema } from 'zod-to-json-schema';\nimport type { Config } from '@open-wa/schema';\nimport { getMcpToolDefinitions } from '../manifest';\nimport { executeCapability } from '../execution/kernel';\n\nexport interface HonoMcpAdapterOptions {\n config: Config;\n /**\n * Getter for the active client instance.\n */\n clientSource: () => Record<string, any> | undefined;\n /**\n * Optional logging emitter.\n */\n elasticEmitter?: {\n log: (data: any) => void;\n };\n /**\n * Base path for tool documentation links.\n */\n basePath?: string;\n /**\n * Getter for session readiness state.\n * Used for lifecycle gating parity with HTTP transport.\n */\n isSessionConnected?: () => boolean;\n}\n\n/**\n * Creates an MCP adapter using the Streamable HTTP transport (single-endpoint).\n *\n * open-wa product decision:\n * hosted MCP is Easy API-only and unavailable through createClient()\n *\n * This adapter:\n * - Uses WebStandardStreamableHTTPServerTransport for a single-endpoint /mcp shape\n * - Enforces Easy API API-key auth on every request\n * - Gates tool execution on session readiness (parity with HTTP transport)\n * - Returns protocol errors for malformed protocol requests\n * - Returns tool-level errors for open-wa execution failures\n */\nexport function createHonoMcpAdapter(options: HonoMcpAdapterOptions) {\n const { config, clientSource, elasticEmitter, basePath = '/api', isSessionConnected } = options;\n const toolDefinitions = getMcpToolDefinitions(basePath);\n const toolMap = new Map(toolDefinitions.map((d) => [d.toolName, d]));\n\n const server = new Server(\n {\n name: 'open-wa',\n version: '5.0.0',\n },\n {\n capabilities: {\n tools: {},\n },\n }\n );\n\n // ── tools/list ──────────────────────────────────────────────────────\n server.setRequestHandler(ListToolsRequestSchema, async () => {\n return {\n tools: toolDefinitions.map((def) => ({\n name: def.toolName,\n description: def.description,\n inputSchema: zodToJsonSchema(def.inputSchema) as any,\n })),\n };\n });\n\n // ── tools/call ──────────────────────────────────────────────────────\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args } = request.params;\n const definition = toolMap.get(name);\n\n if (!definition) {\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: `Unknown tool: ${name}. Use tools/list to discover available tools.`,\n },\n ],\n };\n }\n\n // ── Lifecycle/readiness gate (parity with HTTP transport) ──────\n if (isSessionConnected && !isSessionConnected()) {\n if (config.apiLifecycle !== 'immediate') {\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: 'Session is not connected or ready. Tool execution is blocked until the session is fully ready.',\n },\n ],\n };\n }\n }\n\n const result = await executeCapability({\n client: clientSource(),\n definition: definition as any,\n payload: (args as Record<string, unknown>) || {},\n elasticEmitter,\n sessionId: config.sessionId,\n });\n\n if (result.success) {\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(result.data, null, 2),\n },\n ],\n };\n }\n\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: result.error || 'Internal Execution Error',\n },\n ],\n };\n });\n\n // ── Streamable HTTP transport ───────────────────────────────────────\n const transport = new WebStandardStreamableHTTPServerTransport({\n sessionIdGenerator: () => crypto.randomUUID(),\n onsessioninitialized: (sessionId: string) => {\n elasticEmitter?.log({\n level: 'info',\n component: 'mcp',\n message: `MCP session initialized: ${sessionId}`,\n sessionId: config.sessionId,\n });\n },\n onsessionclosed: (sessionId: string) => {\n elasticEmitter?.log({\n level: 'info',\n component: 'mcp',\n message: `MCP session closed: ${sessionId}`,\n sessionId: config.sessionId,\n });\n },\n });\n\n // Connect the server to the transport immediately\n server.connect(transport);\n\n return {\n /**\n * Mounts the MCP Streamable HTTP endpoint on the provided Hono app.\n *\n * This creates a single endpoint at `path` that handles:\n * - POST: JSON-RPC messages (initialize, tools/list, tools/call)\n * - GET: Server-initiated SSE stream\n * - DELETE: Session termination\n *\n * API-key auth is enforced on every request before delegation to MCP.\n */\n mount: (app: Hono, path: string) => {\n app.all(`${path}`, async (c: Context) => {\n // ── API-key auth enforcement ───────────────────────────────\n // MCP inherits Easy API auth boundary. No key = no access.\n if (config.apiKey) {\n const headerKey =\n c.req.header('X-API-Key') ||\n c.req.header('api_key') ||\n c.req.header('key');\n const resolvedKey = headerKey;\n\n if (!resolvedKey || resolvedKey !== config.apiKey) {\n return c.json(\n { error: 'Unauthorized', details: 'Invalid or missing API key for MCP endpoint' },\n 401,\n );\n }\n }\n\n // ── Delegate to Streamable HTTP transport ──────────────────\n const response = await transport.handleRequest(c.req.raw);\n return response;\n });\n },\n\n /**\n * Cleanly shut down the MCP transport.\n */\n close: async () => {\n await transport.close();\n await server.close();\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,SAAgB,qBAAqB,WAAmB,YAA4B;AAClF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QAAQ;KAKjB,MAAM,cAHJ,EAAE,IAAI,OAAO,YAAY,IACzB,EAAE,IAAI,OAAO,UAAU,IACvB,EAAE,IAAI,OAAO,MAAM;AAGrB,SAAI,CAAC,eAAe,gBAAgB,OAAO,OACzC,QAAO,EAAE,KACP;MAAE,OAAO;MAAgB,SAAS;MAA+C,EACjF,IACD;;AAML,WADiB,MAAM,UAAU,cAAc,EAAE,IAAI,IAAI;KAEzD;;EAMJ,OAAO,YAAY;AACjB,SAAM,UAAU,OAAO;AACvB,SAAM,OAAO,OAAO;;EAEvB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/tool-naming.ts","../src/manifest.ts","../src/execution/args.ts","../src/execution/invoke.ts","../src/execution/kernel.ts","../src/execution/errors.ts","../src/adapter/hono-mcp.ts"],"sourcesContent":["/**\n * Logic for stable, namespaced MCP tool names.\n */\n\n/**\n * Returns the canonical namespaced tool name for MCP.\n * @example getCanonicalToolName('messages', 'sendText') -> 'messages.sendText'\n */\nexport function getCanonicalToolName(namespace: string, methodName: string): string {\n return `${namespace}.${methodName}`;\n}\n","import { getHttpMethodDefinitions, type HttpMethodDefinition } from '@open-wa/schema/http-manifest';\nimport { getCanonicalToolName } from './tool-naming';\n\n/**\n * MCP-specific projection of a method capability.\n */\nexport interface McpToolDefinition {\n /**\n * The canonical namespaced tool name for MCP.\n * @example 'messages.sendText'\n */\n toolName: string;\n /**\n * The raw function name in the client.\n * @example 'sendText'\n */\n functionName: string;\n /**\n * The namespaced name (method part only).\n * @example 'sendText'\n */\n namespacedName: string;\n /**\n * The namespace this method belongs to.\n * @example 'messages'\n */\n namespace: string;\n /**\n * Human-readable description of the tool.\n */\n description: string;\n /**\n * Zod input schema.\n */\n inputSchema: HttpMethodDefinition['inputSchema'];\n /**\n * Zod output schema.\n */\n outputSchema: HttpMethodDefinition['outputSchema'];\n /**\n * Preserved parameter order for positional resolution.\n */\n parameterOrder: string[];\n /**\n * Known aliases for this method.\n */\n aliases: string[];\n /**\n * Deprecated aliases for this method.\n */\n deprecatedAliases: string[];\n /**\n * Map of payload key aliases to canonical keys.\n */\n keyAliasMap: Record<string, string>;\n /**\n * Optional metadata hints for AI clients.\n */\n annotations?: {\n title?: string;\n readOnlyHint?: boolean;\n destructiveHint?: boolean;\n idempotentHint?: boolean;\n };\n}\n\n/**\n * Projects the schema registry into a list of canonical MCP tool definitions.\n */\nexport function getMcpToolDefinitions(basePath = '/api'): McpToolDefinition[] {\n return getHttpMethodDefinitions(basePath).map((def) => {\n return {\n toolName: getCanonicalToolName(def.namespace, def.namespacedName),\n functionName: def.functionName,\n namespacedName: def.namespacedName,\n namespace: def.namespace,\n description: def.description,\n inputSchema: def.inputSchema,\n outputSchema: def.outputSchema,\n parameterOrder: def.parameterOrder,\n aliases: def.aliases,\n deprecatedAliases: def.deprecatedAliases,\n keyAliasMap: def.keyAliasMap,\n annotations: {\n title: def.functionName,\n // Hints can be derived from method names or hardcoded metadata in future\n readOnlyHint: def.functionName.startsWith('get') || def.functionName.startsWith('is'),\n },\n };\n });\n}\n","import { normalizeParameterKeys, z, type HttpMethodDefinition } from '@open-wa/schema';\n\nfunction mapArrayArgs(def: HttpMethodDefinition, args: unknown[]): Record<string, unknown> {\n return def.parameterOrder.reduce<Record<string, unknown>>((acc, key, index) => {\n if (index < args.length) {\n acc[key] = args[index];\n }\n\n return acc;\n }, {});\n}\n\n/**\n * Normalizes an input payload into a form suitable for schema validation.\n * Handles:\n * 1. Array-based positional arguments\n * 2. Mixed key aliases (legacy vs canonical)\n * 3. Wrapped 'args' or 'input' properties\n */\nexport function normalizeMethodPayload(def: HttpMethodDefinition, payload: unknown): any {\n if (Array.isArray(payload)) {\n return normalizeParameterKeys(mapArrayArgs(def, payload), def.keyAliasMap);\n }\n\n if (!payload || typeof payload !== 'object') {\n return {};\n }\n\n const record = payload as Record<string, unknown>;\n\n if ('args' in record) {\n const args = record.args;\n\n if (Array.isArray(args)) {\n return normalizeParameterKeys(mapArrayArgs(def, args), def.keyAliasMap);\n }\n\n if (args && typeof args === 'object') {\n return normalizeParameterKeys(args as Record<string, any>, def.keyAliasMap);\n }\n }\n\n if (record.input && typeof record.input === 'object' && !Array.isArray(record.input)) {\n return normalizeParameterKeys(record.input as Record<string, any>, def.keyAliasMap);\n }\n\n if (def.inputSchema instanceof z.ZodObject) {\n const knownKeys = new Set(Object.keys(def.inputSchema.shape));\n const filtered = Object.fromEntries(\n Object.entries(record).filter(([key]) => knownKeys.has(key))\n );\n\n if (Object.keys(filtered).length > 0) {\n return normalizeParameterKeys(filtered, def.keyAliasMap);\n }\n }\n\n return normalizeParameterKeys(record, def.keyAliasMap);\n}\n","export interface ClientMethodDefinitionLike {\n functionName: string;\n parameterOrder: string[];\n wapiOverride?: string;\n}\n\n/**\n * Invokes a client method by resolving its implementation from the client instance\n * and mapping the payload to positional arguments if necessary.\n */\nexport async function invokeClientMethod(\n client: Record<string, (...args: any[]) => Promise<any> | any> | undefined,\n def: ClientMethodDefinitionLike,\n payload: unknown\n): Promise<any> {\n if (!client) {\n throw new Error('Client not initialized');\n }\n\n const method = client[def.functionName] ?? (def.wapiOverride ? client[def.wapiOverride] : undefined);\n\n if (typeof method !== 'function') {\n throw new Error(`Method ${def.functionName} not implemented on Client`);\n }\n\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {\n return await method.call(client);\n }\n\n const resolvedArgs = def.parameterOrder.map((key) => (payload as Record<string, unknown>)[key]);\n return await method.call(client, ...resolvedArgs);\n}\n","import type { HttpMethodDefinition } from '@open-wa/schema';\nimport { normalizeMethodPayload } from './args';\nimport { invokeClientMethod } from './invoke';\n\n/**\n * Context required to execute an Open-WA capability via any transport.\n */\nexport interface ExecutionContext {\n /**\n * The active client instance or proxy.\n */\n client: Record<string, (...args: any[]) => Promise<any> | any> | undefined;\n /**\n * The metadata definition for the method being invoked.\n */\n definition: HttpMethodDefinition;\n /**\n * The raw input payload (merged query + body, or MCP arguments).\n */\n payload: Record<string, unknown>;\n /**\n * Optional diagnostic emitter for logging.\n */\n elasticEmitter?: {\n log: (data: any) => void;\n };\n /**\n * The unique session identifier.\n */\n sessionId: string;\n}\n\n/**\n * Standardized result of a capability execution.\n */\nexport interface ExecutionResult<T = any> {\n success: boolean;\n data?: T;\n error?: string;\n details?: any;\n status: number;\n}\n\n/**\n * The shared execution kernel for Open-WA capabilities.\n * Ensures strict parity between HTTP API and MCP transport by centralizing\n * normalization, validation, and invocation logic.\n */\nexport async function executeCapability(\n ctx: ExecutionContext\n): Promise<ExecutionResult> {\n const { client, definition, payload, elasticEmitter, sessionId } = ctx;\n const startTime = Date.now();\n const methodName = definition.functionName;\n\n try {\n // 1. Normalize aliases and legacy keys\n const normalizedPayload = normalizeMethodPayload(definition, payload);\n\n // 2. Validate against Zod schema (strict)\n const validated = await definition.inputSchema.parseAsync(normalizedPayload);\n\n // 3. Invoke the client method with positional argument resolution\n const result = await invokeClientMethod(client, definition, validated);\n\n // 4. Log successful execution to monitoring if available\n elasticEmitter?.log({\n level: 'info',\n component: 'api',\n method: methodName,\n sessionId,\n duration: Date.now() - startTime,\n statusCode: 200,\n message: `Successfully executed ${methodName}`,\n });\n\n return {\n success: true,\n data: result,\n status: 200,\n };\n } catch (error: any) {\n const isValidationError = error?.name === 'ZodError';\n const status = isValidationError ? 400 : 500;\n\n // Log failure to monitoring\n elasticEmitter?.log({\n level: 'error',\n component: 'api',\n method: methodName,\n sessionId,\n duration: Date.now() - startTime,\n statusCode: status,\n message: error?.message || 'Internal Server Error',\n });\n\n return {\n success: false,\n error: isValidationError ? 'Validation Error' : (error?.message || 'Internal Server Error'),\n details: isValidationError ? error.issues : undefined,\n status,\n };\n }\n}\n","/**\n * MCP execution error types.\n *\n * Maintains the separation between protocol-level errors\n * (JSON-RPC envelope issues) and tool-level errors\n * (open-wa runtime invocation failures).\n */\n\n/**\n * A tool execution error from the open-wa runtime.\n * This should be surfaced as `isError: true` in MCP tool results,\n * NOT as a JSON-RPC protocol error.\n */\nexport class ToolExecutionError extends Error {\n public readonly statusCode: number;\n public readonly details?: unknown;\n\n constructor(message: string, statusCode = 500, details?: unknown) {\n super(message);\n this.name = 'ToolExecutionError';\n this.statusCode = statusCode;\n this.details = details;\n }\n}\n\n/**\n * A validation error from Zod schema parsing.\n * This should be surfaced as `isError: true` in MCP tool results\n * with the validation details attached.\n */\nexport class ToolValidationError extends ToolExecutionError {\n constructor(message: string, details?: unknown) {\n super(message, 400, details);\n this.name = 'ToolValidationError';\n }\n}\n\n/**\n * Thrown when the client/session is not ready for execution.\n */\nexport class SessionNotReadyError extends ToolExecutionError {\n constructor(message = 'Session is not connected or ready for execution') {\n super(message, 503);\n this.name = 'SessionNotReadyError';\n }\n}\n\n/**\n * Thrown when authentication is missing or invalid.\n */\nexport class AuthenticationError extends ToolExecutionError {\n constructor(message = 'Authentication required. Provide a valid API key.') {\n super(message, 401);\n this.name = 'AuthenticationError';\n }\n}\n","import { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { WebStandardStreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js';\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n} from '@modelcontextprotocol/sdk/types.js';\nimport type { Hono, Context } from 'hono';\nimport { zodToJsonSchema } from 'zod-to-json-schema';\nimport type { Config } from '@open-wa/schema';\nimport { getMcpToolDefinitions } from '../manifest';\nimport { executeCapability } from '../execution/kernel';\n\nexport interface HonoMcpAdapterOptions {\n config: Config;\n /**\n * Getter for the active client instance.\n */\n clientSource: () => Record<string, any> | undefined;\n /**\n * Optional logging emitter.\n */\n elasticEmitter?: {\n log: (data: any) => void;\n };\n /**\n * Base path for tool documentation links.\n */\n basePath?: string;\n /**\n * Getter for session readiness state.\n * Used for lifecycle gating parity with HTTP transport.\n */\n isSessionConnected?: () => boolean;\n}\n\n/**\n * Creates an MCP adapter using the Streamable HTTP transport (single-endpoint).\n *\n * open-wa product decision:\n * hosted MCP is Easy API-only and unavailable through createClient()\n *\n * This adapter:\n * - Uses WebStandardStreamableHTTPServerTransport for a single-endpoint /mcp shape\n * - Enforces Easy API API-key auth on every request\n * - Gates tool execution on session readiness (parity with HTTP transport)\n * - Returns protocol errors for malformed protocol requests\n * - Returns tool-level errors for open-wa execution failures\n */\nexport function createHonoMcpAdapter(options: HonoMcpAdapterOptions) {\n const { config, clientSource, elasticEmitter, basePath = '/api', isSessionConnected } = options;\n const toolDefinitions = getMcpToolDefinitions(basePath);\n const toolMap = new Map(toolDefinitions.map((d) => [d.toolName, d]));\n\n const server = new Server(\n {\n name: 'open-wa',\n version: '5.0.0',\n },\n {\n capabilities: {\n tools: {},\n },\n }\n );\n\n // ── tools/list ──────────────────────────────────────────────────────\n server.setRequestHandler(ListToolsRequestSchema, async () => {\n return {\n tools: toolDefinitions.map((def) => ({\n name: def.toolName,\n description: def.description,\n inputSchema: zodToJsonSchema(def.inputSchema) as any,\n })),\n };\n });\n\n // ── tools/call ──────────────────────────────────────────────────────\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args } = request.params;\n const definition = toolMap.get(name);\n\n if (!definition) {\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: `Unknown tool: ${name}. Use tools/list to discover available tools.`,\n },\n ],\n };\n }\n\n // ── Lifecycle/readiness gate (parity with HTTP transport) ──────\n if (isSessionConnected && !isSessionConnected()) {\n if (config.apiLifecycle !== 'immediate') {\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: 'Session is not connected or ready. Tool execution is blocked until the session is fully ready.',\n },\n ],\n };\n }\n }\n\n const result = await executeCapability({\n client: clientSource(),\n definition: definition as any,\n payload: (args as Record<string, unknown>) || {},\n elasticEmitter,\n sessionId: config.sessionId,\n });\n\n if (result.success) {\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(result.data, null, 2),\n },\n ],\n };\n }\n\n return {\n isError: true,\n content: [\n {\n type: 'text' as const,\n text: result.error || 'Internal Execution Error',\n },\n ],\n };\n });\n\n // ── Streamable HTTP transport ───────────────────────────────────────\n const transport = new WebStandardStreamableHTTPServerTransport({\n sessionIdGenerator: () => crypto.randomUUID(),\n onsessioninitialized: (sessionId: string) => {\n elasticEmitter?.log({\n level: 'info',\n component: 'mcp',\n message: `MCP session initialized: ${sessionId}`,\n sessionId: config.sessionId,\n });\n },\n onsessionclosed: (sessionId: string) => {\n elasticEmitter?.log({\n level: 'info',\n component: 'mcp',\n message: `MCP session closed: ${sessionId}`,\n sessionId: config.sessionId,\n });\n },\n });\n\n // Connect the server to the transport immediately\n server.connect(transport);\n\n return {\n /**\n * Mounts the MCP Streamable HTTP endpoint on the provided Hono app.\n *\n * This creates a single endpoint at `path` that handles:\n * - POST: JSON-RPC messages (initialize, tools/list, tools/call)\n * - GET: Server-initiated SSE stream\n * - DELETE: Session termination\n *\n * API-key auth is enforced on every request before delegation to MCP.\n */\n mount: (app: Hono, path: string) => {\n app.all(`${path}`, async (c: Context) => {\n // ── API-key auth enforcement ───────────────────────────────\n // MCP inherits Easy API auth boundary. No key = no access.\n if (config.apiKey) {\n const headerKey =\n c.req.header('X-API-Key') ||\n c.req.header('api_key') ||\n c.req.header('key');\n const resolvedKey = headerKey;\n\n if (!resolvedKey || resolvedKey !== config.apiKey) {\n return c.json(\n { error: 'Unauthorized', details: 'Invalid or missing API key for MCP endpoint' },\n 401,\n );\n }\n }\n\n // ── Delegate to Streamable HTTP transport ──────────────────\n const response = await transport.handleRequest(c.req.raw);\n return response;\n });\n },\n\n /**\n * Cleanly shut down the MCP transport.\n */\n close: async () => {\n await transport.close();\n await server.close();\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,SAAgB,qBAAqB,WAAmB,YAA4B;CAClF,OAAO,GAAG,UAAU,GAAG;AACzB;;;;;;AC2DA,SAAgB,sBAAsB,WAAW,QAA6B;CAC5E,OAAO,yBAAyB,QAAQ,CAAC,CAAC,KAAK,QAAQ;EACrD,OAAO;GACL,UAAU,qBAAqB,IAAI,WAAW,IAAI,cAAc;GAChE,cAAc,IAAI;GAClB,g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,KACtB,EAAE,IAAI,OAAO,KAAK;KAGpB,IAAI,CAAC,eAAe,gBAAgB,OAAO,QACzC,OAAO,EAAE,KACP;MAAE,OAAO;MAAgB,SAAS;KAA8C,GAChF,GACF;IAEJ;IAIA,OAAO,MADgB,UAAU,cAAc,EAAE,IAAI,GAAG;GAE1D,CAAC;EACH;;;;EAKA,OAAO,YAAY;GACjB,MAAM,UAAU,MAAM;GACtB,MAAM,OAAO,MAAM;EACrB;CACF;AACF"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@open-wa/mcp",
3
- "version": "5.0.0-alpha.8",
3
+ "version": "5.1.0",
4
4
  "type": "module",
5
5
  "description": "MCP server integration for open-wa",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
8
+ "types": "./dist/index.d.mts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "require": {
@@ -19,18 +19,18 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "@modelcontextprotocol/sdk": "^1.0.1",
23
- "hono": "^4.12.9",
24
- "zod": "^4.2.1",
25
- "zod-to-json-schema": "^3.23.2",
26
- "@open-wa/config": "5.0.0-alpha.8",
27
- "@open-wa/schema": "5.0.0-alpha.8",
28
- "@open-wa/utils": "5.0.0-alpha.8"
22
+ "@modelcontextprotocol/sdk": "^1.30.1",
23
+ "@open-wa/config": "5.1.0",
24
+ "@open-wa/schema": "5.1.0",
25
+ "@open-wa/utils": "5.1.0",
26
+ "hono": "^4.13.9",
27
+ "zod": "^4.6.5",
28
+ "zod-to-json-schema": "^3.25.2"
29
29
  },
30
30
  "devDependencies": {
31
- "tsdown": "^0.21.7",
32
- "typescript": "^6.0.3",
33
- "vitest": "4.1.2"
31
+ "tsdown": "^0.23.0",
32
+ "typescript": "^7.0.2",
33
+ "vitest": "5.0.2"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
@@ -39,6 +39,10 @@
39
39
  "type": "git",
40
40
  "url": "https://github.com/open-wa/wa-automate-nodejs.git"
41
41
  },
42
+ "license": "SEE LICENSE IN LICENSE.md",
43
+ "files": [
44
+ "dist"
45
+ ],
42
46
  "scripts": {
43
47
  "build": "tsdown",
44
48
  "dev": "tsdown --watch",
@@ -1,26 +0,0 @@
1
- $ tsdown
2
- ℹ tsdown v0.21.7 powered by rolldown v1.0.0-rc.12
3
- ℹ config file: /home/runner/work/wa-automate-nodejs/wa-automate-nodejs/packages/mcp/tsdown.config.ts
4
- ℹ entry: ./src/index.ts
5
- ℹ tsconfig: ../../tsconfig.json
6
- ℹ Build start
7
- ℹ [CJS] dist/index.cjs 11.07 kB │ gzip: 3.51 kB
8
- ℹ [CJS] dist/index.cjs.map 22.30 kB │ gzip: 6.58 kB
9
- ℹ [CJS] 2 files, total: 33.38 kB
10
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `tsdown:deps`. See https://rolldown.rs/options/checks#plugintimings for more details.
11
-
12
- ℹ [CJS] dist/index.d.cts 7.29 kB │ gzip: 2.43 kB
13
- ℹ [CJS] 1 files, total: 7.29 kB
14
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
15
- - rolldown-plugin-dts:generate (65%)
16
- - tsdown:deps (30%)
17
- See https://rolldown.rs/options/checks#plugintimings for more details.
18
-
19
- ✔ Build complete in 5575ms
20
- ℹ [ESM] dist/index.mjs 10.29 kB │ gzip: 3.37 kB
21
- ℹ [ESM] dist/index.mjs.map 22.07 kB │ gzip: 6.50 kB
22
- ℹ [ESM] dist/index.d.mts  7.29 kB │ gzip: 2.43 kB
23
- ℹ [ESM] 3 files, total: 39.66 kB
24
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
25
-
26
- ✔ Build complete in 5581ms
package/CHANGELOG.md DELETED
@@ -1,88 +0,0 @@
1
- # @open-wa/mcp
2
-
3
- ## 5.0.0-alpha.8
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [[`6a55aef`](https://github.com/open-wa/wa-automate-nodejs/commit/6a55aef602b347bfffc8550e448585e7776baf18)]:
8
- - @open-wa/config@5.0.0-alpha.8
9
- - @open-wa/schema@5.0.0-alpha.8
10
- - @open-wa/utils@5.0.0-alpha.8
11
-
12
- ## 5.0.0-alpha.7
13
-
14
- ### Patch Changes
15
-
16
- - Updated dependencies []:
17
- - @open-wa/config@5.0.0-alpha.7
18
- - @open-wa/schema@5.0.0-alpha.7
19
- - @open-wa/utils@5.0.0-alpha.7
20
-
21
- ## 5.0.0-alpha.6
22
-
23
- ### Patch Changes
24
-
25
- - Updated dependencies []:
26
- - @open-wa/config@5.0.0-alpha.6
27
- - @open-wa/schema@5.0.0-alpha.6
28
- - @open-wa/utils@5.0.0-alpha.6
29
-
30
- ## 5.0.0-alpha.5
31
-
32
- ### Patch Changes
33
-
34
- - Updated dependencies []:
35
- - @open-wa/config@5.0.0-alpha.5
36
- - @open-wa/schema@5.0.0-alpha.5
37
- - @open-wa/utils@5.0.0-alpha.5
38
-
39
- ## 5.0.0-alpha.4
40
-
41
- ### Patch Changes
42
-
43
- - Updated dependencies []:
44
- - @open-wa/config@5.0.0-alpha.4
45
- - @open-wa/schema@5.0.0-alpha.4
46
- - @open-wa/utils@5.0.0-alpha.4
47
-
48
- ## 5.0.0-alpha.3
49
-
50
- ### Patch Changes
51
-
52
- - Updated dependencies []:
53
- - @open-wa/schema@5.0.0-alpha.3
54
- - @open-wa/config@5.0.0-alpha.3
55
- - @open-wa/utils@5.0.0-alpha.3
56
-
57
- ## 5.0.0-alpha.2
58
-
59
- ### Patch Changes
60
-
61
- - Updated dependencies []:
62
- - @open-wa/config@5.0.0-alpha.2
63
- - @open-wa/schema@5.0.0-alpha.2
64
- - @open-wa/utils@5.0.0-alpha.2
65
-
66
- ## 5.0.0-alpha.2
67
-
68
- ### Minor Changes
69
-
70
- - Dry run minor bump
71
-
72
- ### Patch Changes
73
-
74
- - Updated dependencies []:
75
- - @open-wa/config@6.0.0-alpha.2
76
- - @open-wa/schema@6.0.0-alpha.2
77
- - @open-wa/utils@6.0.0-alpha.2
78
-
79
- ## 5.0.1-alpha.2
80
-
81
- ### Patch Changes
82
-
83
- - Dry run patch bump
84
-
85
- - Updated dependencies []:
86
- - @open-wa/config@5.0.1-alpha.2
87
- - @open-wa/schema@5.0.1-alpha.2
88
- - @open-wa/utils@5.0.1-alpha.2