@mastra/mcp 1.18.1-alpha.1 → 1.18.1-alpha.2
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/_types/hono/dist/types/client/types.d.ts +1 -1
- package/dist/_types/hono/dist/types/context.d.ts +2 -6
- package/dist/_types/hono/dist/types/hono-base.d.ts +3 -4
- package/dist/_types/hono/dist/types/router.d.ts +1 -1
- package/dist/_types/hono/dist/types/utils/headers.d.ts +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +8 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -18
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts +18 -2
- package/dist/server/server.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -10,7 +10,7 @@ import type { HasRequiredKeys } from '../utils/types';
|
|
|
10
10
|
type MethodNameAll = `$${typeof METHOD_NAME_ALL_LOWERCASE}`;
|
|
11
11
|
/**
|
|
12
12
|
* Type representing all standard HTTP methods prefixed with '$'
|
|
13
|
-
* e.g., '$get' | '$post' | '$put' | '$delete' | '$options' | '$patch'
|
|
13
|
+
* e.g., '$get' | '$post' | '$put' | '$delete' | '$options' | '$patch'
|
|
14
14
|
*/
|
|
15
15
|
type StandardMethods = `$${(typeof METHODS)[number]}`;
|
|
16
16
|
/**
|
|
@@ -323,10 +323,6 @@ export declare class Context<E extends Env = any, P extends string = any, I exte
|
|
|
323
323
|
* c.header('X-Message', 'Hello!')
|
|
324
324
|
* c.header('Content-Type', 'text/plain')
|
|
325
325
|
*
|
|
326
|
-
* // Append multiple headers using the append option (e.g. Vary)
|
|
327
|
-
* c.header('Vary', 'Accept-Encoding', { append: true })
|
|
328
|
-
* c.header('Vary', 'User-Agent', { append: true })
|
|
329
|
-
*
|
|
330
326
|
* return c.body('Thank you for coming')
|
|
331
327
|
* })
|
|
332
328
|
* ```
|
|
@@ -347,7 +343,7 @@ export declare class Context<E extends Env = any, P extends string = any, I exte
|
|
|
347
343
|
* ```
|
|
348
344
|
*/
|
|
349
345
|
set: Set<IsAny<E> extends true ? {
|
|
350
|
-
Variables: ContextVariableMap & Record<
|
|
346
|
+
Variables: ContextVariableMap & Record<string, any>;
|
|
351
347
|
} : E>;
|
|
352
348
|
/**
|
|
353
349
|
* `.get()` can use the value specified by the key.
|
|
@@ -363,7 +359,7 @@ export declare class Context<E extends Env = any, P extends string = any, I exte
|
|
|
363
359
|
* ```
|
|
364
360
|
*/
|
|
365
361
|
get: Get<IsAny<E> extends true ? {
|
|
366
|
-
Variables: ContextVariableMap & Record<
|
|
362
|
+
Variables: ContextVariableMap & Record<string, any>;
|
|
367
363
|
} : E>;
|
|
368
364
|
/**
|
|
369
365
|
* `.var` can access the value of a variable.
|
|
@@ -65,7 +65,6 @@ declare class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends
|
|
|
65
65
|
delete: HandlerInterface<E, 'delete', S, BasePath, CurrentPath>;
|
|
66
66
|
options: HandlerInterface<E, 'options', S, BasePath, CurrentPath>;
|
|
67
67
|
patch: HandlerInterface<E, 'patch', S, BasePath, CurrentPath>;
|
|
68
|
-
query: HandlerInterface<E, 'query', S, BasePath, CurrentPath>;
|
|
69
68
|
all: HandlerInterface<E, 'all', S, BasePath, CurrentPath>;
|
|
70
69
|
on: OnHandlerInterface<E, S, BasePath>;
|
|
71
70
|
use: MiddlewareHandlerInterface<E, S, BasePath>;
|
|
@@ -180,12 +179,12 @@ declare class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends
|
|
|
180
179
|
* @see {@link https://hono.dev/docs/api/hono#fetch}
|
|
181
180
|
*
|
|
182
181
|
* @param {Request} request - request Object of request
|
|
183
|
-
* @param {Env}
|
|
184
|
-
* @param {ExecutionContext}
|
|
182
|
+
* @param {Env} Env - env Object
|
|
183
|
+
* @param {ExecutionContext} - context of execution
|
|
185
184
|
* @returns {Response | Promise<Response>} response of request
|
|
186
185
|
*
|
|
187
186
|
*/
|
|
188
|
-
fetch: (request: Request,
|
|
187
|
+
fetch: (request: Request, Env?: E['Bindings'] | {}, executionCtx?: ExecutionContext) => Response | Promise<Response>;
|
|
189
188
|
/**
|
|
190
189
|
* `.request()` is a useful method for testing.
|
|
191
190
|
* You can pass a URL or pathname to send a GET request.
|
|
@@ -13,7 +13,7 @@ export declare const METHOD_NAME_ALL_LOWERCASE: "all";
|
|
|
13
13
|
/**
|
|
14
14
|
* Array of supported HTTP methods.
|
|
15
15
|
*/
|
|
16
|
-
export declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch"
|
|
16
|
+
export declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch"];
|
|
17
17
|
/**
|
|
18
18
|
* Error message indicating that a route cannot be added because the matcher is already built.
|
|
19
19
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module
|
|
3
3
|
* HTTP Headers utility.
|
|
4
4
|
*/
|
|
5
|
-
export type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-
|
|
6
|
-
export type ResponseHeader = '
|
|
5
|
+
export type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Accept-Signature' | 'Access-Control' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'ALPN' | 'Alt-Svc' | 'Alt-Used' | 'Alternates' | 'AMP-Cache-Transform' | 'Apply-To-Redirect-Ref' | 'Authentication-Control' | 'Authentication-Info' | 'Authorization' | 'Available-Dictionary' | 'C-Ext' | 'C-Man' | 'C-Opt' | 'C-PEP' | 'C-PEP-Info' | 'Cache-Control' | 'Cache-Status' | 'Cal-Managed-ID' | 'CalDAV-Timezones' | 'Capsule-Protocol' | 'CDN-Cache-Control' | 'CDN-Loop' | 'Cert-Not-After' | 'Cert-Not-Before' | 'Clear-Site-Data' | 'Client-Cert' | 'Client-Cert-Chain' | 'Close' | 'CMCD-Object' | 'CMCD-Request' | 'CMCD-Session' | 'CMCD-Status' | 'CMSD-Dynamic' | 'CMSD-Static' | 'Concealed-Auth-Export' | 'Configuration-Context' | 'Connection' | 'Content-Base' | 'Content-Digest' | 'Content-Disposition' | 'Content-Encoding' | 'Content-ID' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-MD5' | 'Content-Range' | 'Content-Script-Type' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Style-Type' | 'Content-Type' | 'Content-Version' | 'Cookie' | 'Cookie2' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Embedder-Policy-Report-Only' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Opener-Policy-Report-Only' | 'Cross-Origin-Resource-Policy' | 'CTA-Common-Access-Token' | 'DASL' | 'Date' | 'DAV' | 'Default-Style' | 'Delta-Base' | 'Deprecation' | 'Depth' | 'Derived-From' | 'Destination' | 'Differential-ID' | 'Dictionary-ID' | 'Digest' | 'DPoP' | 'DPoP-Nonce' | 'Early-Data' | 'EDIINT-Features' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Ext' | 'Forwarded' | 'From' | 'GetProfile' | 'Hobareg' | 'Host' | 'HTTP2-Settings' | 'If' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Schedule-Tag-Match' | 'If-Unmodified-Since' | 'IM' | 'Include-Referred-Token-Binding-ID' | 'Isolation' | 'Keep-Alive' | 'Label' | 'Last-Event-ID' | 'Last-Modified' | 'Link' | 'Link-Template' | 'Location' | 'Lock-Token' | 'Man' | 'Max-Forwards' | 'Memento-Datetime' | 'Meter' | 'Method-Check' | 'Method-Check-Expires' | 'MIME-Version' | 'Negotiate' | 'NEL' | 'OData-EntityId' | 'OData-Isolation' | 'OData-MaxVersion' | 'OData-Version' | 'Opt' | 'Optional-WWW-Authenticate' | 'Ordering-Type' | 'Origin' | 'Origin-Agent-Cluster' | 'OSCORE' | 'OSLC-Core-Version' | 'Overwrite' | 'P3P' | 'PEP' | 'PEP-Info' | 'Permissions-Policy' | 'PICS-Label' | 'Ping-From' | 'Ping-To' | 'Position' | 'Pragma' | 'Prefer' | 'Preference-Applied' | 'Priority' | 'ProfileObject' | 'Protocol' | 'Protocol-Info' | 'Protocol-Query' | 'Protocol-Request' | 'Proxy-Authenticate' | 'Proxy-Authentication-Info' | 'Proxy-Authorization' | 'Proxy-Features' | 'Proxy-Instruction' | 'Proxy-Status' | 'Public' | 'Public-Key-Pins' | 'Public-Key-Pins-Report-Only' | 'Range' | 'Redirect-Ref' | 'Referer' | 'Referer-Root' | 'Referrer-Policy' | 'Refresh' | 'Repeatability-Client-ID' | 'Repeatability-First-Sent' | 'Repeatability-Request-ID' | 'Repeatability-Result' | 'Replay-Nonce' | 'Reporting-Endpoints' | 'Repr-Digest' | 'Retry-After' | 'Safe' | 'Schedule-Reply' | 'Schedule-Tag' | 'Sec-GPC' | 'Sec-Purpose' | 'Sec-Token-Binding' | 'Sec-WebSocket-Accept' | 'Sec-WebSocket-Extensions' | 'Sec-WebSocket-Key' | 'Sec-WebSocket-Protocol' | 'Sec-WebSocket-Version' | 'Security-Scheme' | 'Server' | 'Server-Timing' | 'Set-Cookie' | 'Set-Cookie2' | 'SetProfile' | 'Signature' | 'Signature-Input' | 'SLUG' | 'SoapAction' | 'Status-URI' | 'Strict-Transport-Security' | 'Sunset' | 'Surrogate-Capability' | 'Surrogate-Control' | 'TCN' | 'TE' | 'Timeout' | 'Timing-Allow-Origin' | 'Topic' | 'Traceparent' | 'Tracestate' | 'Trailer' | 'Transfer-Encoding' | 'TTL' | 'Upgrade' | 'Urgency' | 'URI' | 'Use-As-Dictionary' | 'User-Agent' | 'Variant-Vary' | 'Vary' | 'Via' | 'Want-Content-Digest' | 'Want-Digest' | 'Want-Repr-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options';
|
|
6
|
+
export type ResponseHeader = 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Age' | 'Allow' | 'Cache-Control' | 'Clear-Site-Data' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'ETag' | 'Expires' | 'Last-Modified' | 'Location' | 'Permissions-Policy' | 'Pragma' | 'Retry-After' | 'Save-Data' | 'Sec-CH-Prefers-Color-Scheme' | 'Sec-CH-Prefers-Reduced-Motion' | 'Sec-CH-UA' | 'Sec-CH-UA-Arch' | 'Sec-CH-UA-Bitness' | 'Sec-CH-UA-Form-Factor' | 'Sec-CH-UA-Full-Version' | 'Sec-CH-UA-Full-Version-List' | 'Sec-CH-UA-Mobile' | 'Sec-CH-UA-Model' | 'Sec-CH-UA-Platform' | 'Sec-CH-UA-Platform-Version' | 'Sec-CH-UA-WoW64' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'Strict-Transport-Security' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Vary' | 'WWW-Authenticate' | 'Warning' | 'X-Content-Type-Options' | 'X-DNS-Prefetch-Control' | 'X-Frame-Options' | 'X-Permitted-Cross-Domain-Policies' | 'X-Powered-By' | 'X-Robots-Tag' | 'X-XSS-Protection';
|
|
7
7
|
export type AcceptHeader = 'Accept' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges';
|
|
8
8
|
export type CustomHeader = string & {};
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -25908,7 +25908,7 @@ onListChanged: async (serverName, handler) => {
|
|
|
25908
25908
|
}
|
|
25909
25909
|
};
|
|
25910
25910
|
//#endregion
|
|
25911
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.
|
|
25911
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.12.34/86d7f25c35c79da0f9cccb7fef43100dfeaf7989a3b5712a780063b91be3ae59/node_modules/hono/dist/utils/stream.js
|
|
25912
25912
|
var StreamingApi = class {
|
|
25913
25913
|
writer;
|
|
25914
25914
|
encoder;
|
|
@@ -25963,14 +25963,8 @@ var StreamingApi = class {
|
|
|
25963
25963
|
}
|
|
25964
25964
|
async pipe(body) {
|
|
25965
25965
|
this.writer.releaseLock();
|
|
25966
|
-
|
|
25967
|
-
|
|
25968
|
-
preventClose: true,
|
|
25969
|
-
preventAbort: true
|
|
25970
|
-
});
|
|
25971
|
-
} finally {
|
|
25972
|
-
this.writer = this.writable.getWriter();
|
|
25973
|
-
}
|
|
25966
|
+
await body.pipeTo(this.writable, { preventClose: true });
|
|
25967
|
+
this.writer = this.writable.getWriter();
|
|
25974
25968
|
}
|
|
25975
25969
|
onAbort(listener) {
|
|
25976
25970
|
this.abortSubscribers.push(listener);
|
|
@@ -25982,16 +25976,12 @@ var StreamingApi = class {
|
|
|
25982
25976
|
abort() {
|
|
25983
25977
|
if (!this.aborted) {
|
|
25984
25978
|
this.aborted = true;
|
|
25985
|
-
this.abortSubscribers.forEach((subscriber) =>
|
|
25986
|
-
try {
|
|
25987
|
-
Promise.resolve(subscriber()).catch(() => {});
|
|
25988
|
-
} catch {}
|
|
25989
|
-
});
|
|
25979
|
+
this.abortSubscribers.forEach((subscriber) => subscriber());
|
|
25990
25980
|
}
|
|
25991
25981
|
}
|
|
25992
25982
|
};
|
|
25993
25983
|
//#endregion
|
|
25994
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.
|
|
25984
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.12.34/86d7f25c35c79da0f9cccb7fef43100dfeaf7989a3b5712a780063b91be3ae59/node_modules/hono/dist/helper/streaming/utils.js
|
|
25995
25985
|
var isOldBunVersion = () => {
|
|
25996
25986
|
const version = typeof Bun !== "undefined" ? Bun.version : void 0;
|
|
25997
25987
|
if (version === void 0) return false;
|
|
@@ -26000,7 +25990,7 @@ var isOldBunVersion = () => {
|
|
|
26000
25990
|
return result;
|
|
26001
25991
|
};
|
|
26002
25992
|
//#endregion
|
|
26003
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.
|
|
25993
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.12.34/86d7f25c35c79da0f9cccb7fef43100dfeaf7989a3b5712a780063b91be3ae59/node_modules/hono/dist/utils/html.js
|
|
26004
25994
|
var HtmlEscapedCallbackPhase = {
|
|
26005
25995
|
Stringify: 1,
|
|
26006
25996
|
BeforeStream: 2,
|
|
@@ -26030,7 +26020,7 @@ var resolveCallback = async (str, phase, preserveCallbacks, context, buffer) =>
|
|
|
26030
26020
|
else return resStr;
|
|
26031
26021
|
};
|
|
26032
26022
|
//#endregion
|
|
26033
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.
|
|
26023
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono/4.12.34/86d7f25c35c79da0f9cccb7fef43100dfeaf7989a3b5712a780063b91be3ae59/node_modules/hono/dist/helper/streaming/sse.js
|
|
26034
26024
|
var SSEStreamingApi = class extends StreamingApi {
|
|
26035
26025
|
constructor(writable, readable) {
|
|
26036
26026
|
super(writable, readable);
|
|
@@ -26083,7 +26073,7 @@ var streamSSE = (c, cb, onError) => {
|
|
|
26083
26073
|
return c.newResponse(stream.responseReadable);
|
|
26084
26074
|
};
|
|
26085
26075
|
//#endregion
|
|
26086
|
-
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono-mcp-server-sse-transport/0.0.7/
|
|
26076
|
+
//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono-mcp-server-sse-transport/0.0.7/77cb993510b4dd1d9c8bf87f5375b9a3a33086c9f52f5b16d58cb9c95462e6dc/node_modules/hono-mcp-server-sse-transport/build/sse.js
|
|
26087
26077
|
const MAXIMUM_MESSAGE_SIZE = 4 * 1024 * 1024;
|
|
26088
26078
|
var SSETransport = class {
|
|
26089
26079
|
messageUrl;
|