mcp-use 1.0.0 → 1.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/connectors/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAGjE,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,cAAc,CAAA;CACvC;AAED;;GAEG;AACH,8BAAsB,aAAa;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAO;IACtC,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAO;IACjE,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,IAAI,CAAO;IAC1C,SAAS,CAAC,SAAS,UAAQ;IAC3B,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAA;gBAEjC,IAAI,GAAE,oBAAyB;IAI3C,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC,4CAA4C;IAC5C,QAAQ,KAAK,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAEvD,wCAAwC;IAClC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAYjC,uCAAuC;IACvC,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED;;;;;;OAMG;IACG,UAAU,CA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G,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAI1E,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC;IAK7B,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAK9E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAItF,IAAI,KAAK,IAAI,IAAI,EAAE,CAIlB;cAEe,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBjD,IAAI,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK7C;CACF"}
@@ -53,7 +53,7 @@ var BrowserOAuthClientProvider = class {
53
53
  this.serverUrl = serverUrl;
54
54
  this.storageKeyPrefix = options.storageKeyPrefix || "mcp:auth";
55
55
  this.serverUrlHash = this.hashString(serverUrl);
56
- this.clientName = options.clientName || "MCP Browser Client";
56
+ this.clientName = options.clientName || "mcp-use";
57
57
  this.clientUri = options.clientUri || (typeof window !== "undefined" ? window.location.origin : "");
58
58
  this.callbackUrl = (0, import_strict_url_sanitise.sanitizeUrl)(
59
59
  options.callbackUrl || (typeof window !== "undefined" ? new URL("/oauth/callback", window.location.origin).toString() : "/oauth/callback")
@@ -374,7 +374,7 @@ function useMcp(options) {
374
374
  }
375
375
  if (!clientRef.current) {
376
376
  clientRef.current = new import_client.Client(
377
- { name: clientConfig.name || "use-mcp-react-client", version: clientConfig.version || "0.1.0" },
377
+ { name: clientConfig.name || "mcp-use", version: clientConfig.version || "0.1.0" },
378
378
  { capabilities: {} }
379
379
  );
380
380
  addLog("debug", "MCP Client initialized in connect.");
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useMcp
3
- } from "../../chunk-4DEFXVWT.js";
3
+ } from "../../chunk-CWWNPIJZ.js";
4
4
  import {
5
5
  onMcpAuthorization
6
- } from "../../chunk-YUSC6R6V.js";
6
+ } from "../../chunk-TJXUCAST.js";
7
7
  import "../../chunk-SHUYVCID.js";
8
8
  export {
9
9
  onMcpAuthorization,
@@ -31,7 +31,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/server/index.ts
32
32
  var server_exports = {};
33
33
  __export(server_exports, {
34
- McpServer: () => McpServer,
35
34
  createMCPServer: () => createMCPServer
36
35
  });
37
36
  module.exports = __toCommonJS(server_exports);
@@ -101,6 +100,7 @@ var McpServer = class {
101
100
  version: config.version
102
101
  });
103
102
  this.app = (0, import_express.default)();
103
+ this.app.use(import_express.default.json());
104
104
  this.app.use((req, res, next) => {
105
105
  res.header("Access-Control-Allow-Origin", "*");
106
106
  res.header("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS");
@@ -129,7 +129,10 @@ var McpServer = class {
129
129
  * @param resourceDefinition - Configuration object containing resource metadata and handler function
130
130
  * @param resourceDefinition.name - Unique identifier for the resource
131
131
  * @param resourceDefinition.uri - URI pattern for accessing the resource
132
- * @param resourceDefinition.resource - Resource metadata (mime type, description, etc.)
132
+ * @param resourceDefinition.title - Optional human-readable title for the resource
133
+ * @param resourceDefinition.description - Optional description of the resource
134
+ * @param resourceDefinition.mimeType - MIME type of the resource content
135
+ * @param resourceDefinition.annotations - Optional annotations (audience, priority, lastModified)
133
136
  * @param resourceDefinition.fn - Async function that returns the resource content
134
137
  * @returns The server instance for method chaining
135
138
  *
@@ -138,8 +141,20 @@ var McpServer = class {
138
141
  * server.resource({
139
142
  * name: 'config',
140
143
  * uri: 'config://app-settings',
141
- * resource: { mimeType: 'application/json' },
142
- * fn: async () => ({ theme: 'dark', language: 'en' })
144
+ * title: 'Application Settings',
145
+ * mimeType: 'application/json',
146
+ * description: 'Current application configuration',
147
+ * annotations: {
148
+ * audience: ['user'],
149
+ * priority: 0.8
150
+ * },
151
+ * fn: async () => ({
152
+ * contents: [{
153
+ * uri: 'config://app-settings',
154
+ * mimeType: 'application/json',
155
+ * text: JSON.stringify({ theme: 'dark', language: 'en' })
156
+ * }]
157
+ * })
143
158
  * })
144
159
  * ```
145
160
  */
@@ -147,7 +162,13 @@ var McpServer = class {
147
162
  this.server.resource(
148
163
  resourceDefinition.name,
149
164
  resourceDefinition.uri,
150
- resourceDefinition.resource,
165
+ {
166
+ name: resourceDefinition.name,
167
+ title: resourceDefinition.title,
168
+ description: resourceDefinition.description,
169
+ mimeType: resourceDefinition.mimeType,
170
+ annotations: resourceDefinition.annotations
171
+ },
151
172
  async () => {
152
173
  return await resourceDefinition.fn();
153
174
  }
@@ -156,18 +177,76 @@ var McpServer = class {
156
177
  }
157
178
  /**
158
179
  * Define a dynamic resource template with parameters
180
+ *
181
+ * Registers a parameterized resource template with the MCP server. Templates use URI
182
+ * patterns with placeholders that can be filled in at request time, allowing dynamic
183
+ * resource generation based on parameters.
184
+ *
185
+ * @param resourceTemplateDefinition - Configuration object for the resource template
186
+ * @param resourceTemplateDefinition.name - Unique identifier for the template
187
+ * @param resourceTemplateDefinition.resourceTemplate - ResourceTemplate object with uriTemplate and metadata
188
+ * @param resourceTemplateDefinition.fn - Async function that generates resource content from URI and params
189
+ * @returns The server instance for method chaining
190
+ *
191
+ * @example
192
+ * ```typescript
193
+ * server.resourceTemplate({
194
+ * name: 'user-profile',
195
+ * resourceTemplate: {
196
+ * uriTemplate: 'user://{userId}/profile',
197
+ * name: 'User Profile',
198
+ * mimeType: 'application/json'
199
+ * },
200
+ * fn: async (uri, params) => ({
201
+ * contents: [{
202
+ * uri: uri.toString(),
203
+ * mimeType: 'application/json',
204
+ * text: JSON.stringify({ userId: params.userId, name: 'John Doe' })
205
+ * }]
206
+ * })
207
+ * })
208
+ * ```
159
209
  */
160
- // TODO implement, for some freaky reason this give errors
161
- // resourceTemplate(resourceTemplateDefinition: ResourceTemplateDefinition): this {
162
- // this.server.resource(
163
- // resourceTemplateDefinition.name,
164
- // resourceTemplateDefinition.resourceTemplate,
165
- // async (uri, params) => {
166
- // return await resourceTemplateDefinition.fn(uri, params)
167
- // },
168
- // )
169
- // return this
170
- // }
210
+ resourceTemplate(resourceTemplateDefinition) {
211
+ const template = new import_mcp.ResourceTemplate(
212
+ resourceTemplateDefinition.resourceTemplate.uriTemplate,
213
+ {
214
+ list: void 0,
215
+ // Optional: callback to list all matching resources
216
+ complete: void 0
217
+ // Optional: callback for auto-completion
218
+ }
219
+ );
220
+ const metadata = {};
221
+ if (resourceTemplateDefinition.resourceTemplate.name) {
222
+ metadata.name = resourceTemplateDefinition.resourceTemplate.name;
223
+ }
224
+ if (resourceTemplateDefinition.title) {
225
+ metadata.title = resourceTemplateDefinition.title;
226
+ }
227
+ if (resourceTemplateDefinition.description || resourceTemplateDefinition.resourceTemplate.description) {
228
+ metadata.description = resourceTemplateDefinition.description || resourceTemplateDefinition.resourceTemplate.description;
229
+ }
230
+ if (resourceTemplateDefinition.resourceTemplate.mimeType) {
231
+ metadata.mimeType = resourceTemplateDefinition.resourceTemplate.mimeType;
232
+ }
233
+ if (resourceTemplateDefinition.annotations) {
234
+ metadata.annotations = resourceTemplateDefinition.annotations;
235
+ }
236
+ this.server.resource(
237
+ resourceTemplateDefinition.name,
238
+ template,
239
+ metadata,
240
+ async (uri) => {
241
+ const params = this.parseTemplateUri(
242
+ resourceTemplateDefinition.resourceTemplate.uriTemplate,
243
+ uri.toString()
244
+ );
245
+ return await resourceTemplateDefinition.fn(uri, params);
246
+ }
247
+ );
248
+ return this;
249
+ }
171
250
  /**
172
251
  * Define a tool that can be called by clients
173
252
  *
@@ -549,6 +628,39 @@ var McpServer = class {
549
628
  const matches = uriTemplate.match(/\{([^}]+)\}/g);
550
629
  return matches ? matches.map((match) => match.slice(1, -1)) : [];
551
630
  }
631
+ /**
632
+ * Parse parameter values from a URI based on a template
633
+ *
634
+ * Extracts parameter values from an actual URI by matching it against a URI template.
635
+ * The template contains placeholders like {param} which are extracted as key-value pairs.
636
+ *
637
+ * @param template - URI template with placeholders (e.g., "user://{userId}/posts/{postId}")
638
+ * @param uri - Actual URI to parse (e.g., "user://123/posts/456")
639
+ * @returns Object mapping parameter names to their values
640
+ *
641
+ * @example
642
+ * ```typescript
643
+ * const params = this.parseTemplateUri("user://{userId}/posts/{postId}", "user://123/posts/456")
644
+ * // Returns: { userId: "123", postId: "456" }
645
+ * ```
646
+ */
647
+ parseTemplateUri(template, uri) {
648
+ const params = {};
649
+ let regexPattern = template.replace(/[.*+?^$()[\]\\|]/g, "\\$&");
650
+ const paramNames = [];
651
+ regexPattern = regexPattern.replace(/\\\{([^}]+)\\\}/g, (_, paramName) => {
652
+ paramNames.push(paramName);
653
+ return "([^/]+)";
654
+ });
655
+ const regex = new RegExp(`^${regexPattern}$`);
656
+ const match = uri.match(regex);
657
+ if (match) {
658
+ paramNames.forEach((paramName, index) => {
659
+ params[paramName] = match[index + 1];
660
+ });
661
+ }
662
+ return params;
663
+ }
552
664
  };
553
665
  function createMCPServer(name, config = {}) {
554
666
  const instance = new McpServer({
@@ -561,6 +673,5 @@ function createMCPServer(name, config = {}) {
561
673
  __name(createMCPServer, "createMCPServer");
562
674
  // Annotate the CommonJS export names for ESM import in node:
563
675
  0 && (module.exports = {
564
- McpServer,
565
676
  createMCPServer
566
677
  });
@@ -1,3 +1,3 @@
1
- export { createMCPServer, McpServer } from './mcp-server.js';
1
+ export { createMCPServer } from './mcp-server.js';
2
2
  export type { InputDefinition, PromptDefinition, PromptHandler, ResourceDefinition, ResourceHandler, ServerConfig, ToolDefinition, ToolHandler, } from './types.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC5D,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAChB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAA"}
@@ -1,9 +1,7 @@
1
1
  import {
2
- McpServer,
3
2
  createMCPServer
4
- } from "../../chunk-JXLQRAW2.js";
3
+ } from "../../chunk-MZPKOZE4.js";
5
4
  import "../../chunk-SHUYVCID.js";
6
5
  export {
7
- McpServer,
8
6
  createMCPServer
9
7
  };
@@ -1,4 +1,4 @@
1
- import type { PromptDefinition, ResourceDefinition, ServerConfig, ToolDefinition } from './types.js';
1
+ import type { PromptDefinition, ResourceDefinition, ResourceTemplateDefinition, ServerConfig, ToolDefinition } from './types.js';
2
2
  import { type Express } from 'express';
3
3
  export declare class McpServer {
4
4
  private server;
@@ -28,7 +28,10 @@ export declare class McpServer {
28
28
  * @param resourceDefinition - Configuration object containing resource metadata and handler function
29
29
  * @param resourceDefinition.name - Unique identifier for the resource
30
30
  * @param resourceDefinition.uri - URI pattern for accessing the resource
31
- * @param resourceDefinition.resource - Resource metadata (mime type, description, etc.)
31
+ * @param resourceDefinition.title - Optional human-readable title for the resource
32
+ * @param resourceDefinition.description - Optional description of the resource
33
+ * @param resourceDefinition.mimeType - MIME type of the resource content
34
+ * @param resourceDefinition.annotations - Optional annotations (audience, priority, lastModified)
32
35
  * @param resourceDefinition.fn - Async function that returns the resource content
33
36
  * @returns The server instance for method chaining
34
37
  *
@@ -37,15 +40,57 @@ export declare class McpServer {
37
40
  * server.resource({
38
41
  * name: 'config',
39
42
  * uri: 'config://app-settings',
40
- * resource: { mimeType: 'application/json' },
41
- * fn: async () => ({ theme: 'dark', language: 'en' })
43
+ * title: 'Application Settings',
44
+ * mimeType: 'application/json',
45
+ * description: 'Current application configuration',
46
+ * annotations: {
47
+ * audience: ['user'],
48
+ * priority: 0.8
49
+ * },
50
+ * fn: async () => ({
51
+ * contents: [{
52
+ * uri: 'config://app-settings',
53
+ * mimeType: 'application/json',
54
+ * text: JSON.stringify({ theme: 'dark', language: 'en' })
55
+ * }]
56
+ * })
42
57
  * })
43
58
  * ```
44
59
  */
45
60
  resource(resourceDefinition: ResourceDefinition): this;
46
61
  /**
47
62
  * Define a dynamic resource template with parameters
63
+ *
64
+ * Registers a parameterized resource template with the MCP server. Templates use URI
65
+ * patterns with placeholders that can be filled in at request time, allowing dynamic
66
+ * resource generation based on parameters.
67
+ *
68
+ * @param resourceTemplateDefinition - Configuration object for the resource template
69
+ * @param resourceTemplateDefinition.name - Unique identifier for the template
70
+ * @param resourceTemplateDefinition.resourceTemplate - ResourceTemplate object with uriTemplate and metadata
71
+ * @param resourceTemplateDefinition.fn - Async function that generates resource content from URI and params
72
+ * @returns The server instance for method chaining
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * server.resourceTemplate({
77
+ * name: 'user-profile',
78
+ * resourceTemplate: {
79
+ * uriTemplate: 'user://{userId}/profile',
80
+ * name: 'User Profile',
81
+ * mimeType: 'application/json'
82
+ * },
83
+ * fn: async (uri, params) => ({
84
+ * contents: [{
85
+ * uri: uri.toString(),
86
+ * mimeType: 'application/json',
87
+ * text: JSON.stringify({ userId: params.userId, name: 'John Doe' })
88
+ * }]
89
+ * })
90
+ * })
91
+ * ```
48
92
  */
93
+ resourceTemplate(resourceTemplateDefinition: ResourceTemplateDefinition): this;
49
94
  /**
50
95
  * Define a tool that can be called by clients
51
96
  *
@@ -273,6 +318,23 @@ export declare class McpServer {
273
318
  * ```
274
319
  */
275
320
  private extractTemplateParams;
321
+ /**
322
+ * Parse parameter values from a URI based on a template
323
+ *
324
+ * Extracts parameter values from an actual URI by matching it against a URI template.
325
+ * The template contains placeholders like {param} which are extracted as key-value pairs.
326
+ *
327
+ * @param template - URI template with placeholders (e.g., "user://{userId}/posts/{postId}")
328
+ * @param uri - Actual URI to parse (e.g., "user://123/posts/456")
329
+ * @returns Object mapping parameter names to their values
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * const params = this.parseTemplateUri("user://{userId}/posts/{postId}", "user://123/posts/456")
334
+ * // Returns: { userId: "123", postId: "456" }
335
+ * ```
336
+ */
337
+ private parseTemplateUri;
276
338
  }
277
339
  export type McpServerInstance = Omit<McpServer, keyof Express> & Express;
278
340
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../../src/server/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACf,MAAM,YAAY,CAAA;AAGnB,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAA;AAK/C,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,UAAU,CAAC,CAAQ;IAE3B;;;;;;;;;OASG;gBACS,MAAM,EAAE,YAAY;IAmChC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,IAAI;IAYtD;;OAEG;IAaH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAa1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAahD;;;;;;;;;;;;;;;;;;OAkBG;YACW,QAAQ;IAkCtB;;;;;;;;;;;;;;;;;;;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/types.js';
1
+ import type { CallToolResult, GetPromptResult, ReadResourceResult } from '@modelcontextprotocol/sdk/types.js';
2
2
  export interface ServerConfig {
3
3
  name: string;
4
4
  version: string;
@@ -11,21 +11,53 @@ export interface InputDefinition {
11
11
  required?: boolean;
12
12
  default?: any;
13
13
  }
14
+ /**
15
+ * Annotations provide hints to clients about how to use or display resources
16
+ */
17
+ export interface ResourceAnnotations {
18
+ /** Intended audience(s) for this resource */
19
+ audience?: ('user' | 'assistant')[];
20
+ /** Priority from 0.0 (least important) to 1.0 (most important) */
21
+ priority?: number;
22
+ /** ISO 8601 formatted timestamp of last modification */
23
+ lastModified?: string;
24
+ }
25
+ /**
26
+ * Configuration for a resource template
27
+ */
28
+ export interface ResourceTemplateConfig {
29
+ /** URI template with {param} placeholders (e.g., "user://{userId}/profile") */
30
+ uriTemplate: string;
31
+ /** Name of the resource */
32
+ name?: string;
33
+ /** MIME type of the resource content */
34
+ mimeType?: string;
35
+ /** Description of the resource */
36
+ description?: string;
37
+ }
14
38
  export interface ResourceTemplateDefinition {
15
39
  name: string;
16
- resourceTemplate: ResourceTemplate;
40
+ resourceTemplate: ResourceTemplateConfig;
17
41
  title?: string;
18
42
  description?: string;
43
+ annotations?: ResourceAnnotations;
19
44
  fn: ResourceTemplateHandler;
20
45
  }
21
46
  export interface ResourceDefinition {
47
+ /** Unique identifier for the resource */
22
48
  name: string;
49
+ /** URI pattern for accessing the resource (e.g., 'config://app-settings') */
23
50
  uri: string;
24
- resource: {
25
- title?: string;
26
- description?: string;
27
- mimeType: string;
28
- };
51
+ /** Resource metadata including MIME type and description */
52
+ /** Optional title for the resource */
53
+ title?: string;
54
+ /** Optional description of the resource */
55
+ description?: string;
56
+ /** MIME type of the resource content (required) */
57
+ mimeType: string;
58
+ /** Optional annotations for the resource */
59
+ annotations?: ResourceAnnotations;
60
+ /** Async function that returns the resource content */
29
61
  fn: ResourceHandler;
30
62
  }
31
63
  export interface ToolDefinition {
@@ -1 +1 @@
1
- {"version":3,"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,eAAe,EAAE,CAAA;IACxB,EAAE,EAAE,aAAa,CAAA;CAClB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAC/D,MAAM,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAC5G,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA"}
@@ -1,4 +1,5 @@
1
- export { BaseTelemetryEvent, MCPAgentExecutionEvent, MCPAgentExecutionEventData } from './events.js';
1
+ export { BaseTelemetryEvent, MCPAgentExecutionEvent } from './events.js';
2
+ export type { MCPAgentExecutionEventData } from './events.js';
2
3
  export { Telemetry } from './telemetry.js';
3
4
  export { extractModelInfo, getModelName, getModelProvider, getPackageVersion } from './utils.js';
4
5
  export declare function setTelemetrySource(source: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGhG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACxE,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGhG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvD"}