@mastra/mcp 0.11.3-alpha.0 → 0.11.3-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/CHANGELOG.md +18 -0
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/package.json +19 -6
- package/.turbo/turbo-build.log +0 -4
- package/eslint.config.js +0 -11
- package/integration-tests/node_modules/.bin/tsc +0 -21
- package/integration-tests/node_modules/.bin/tsserver +0 -21
- package/integration-tests/node_modules/.bin/vitest +0 -21
- package/integration-tests/package.json +0 -29
- package/integration-tests/src/mastra/agents/weather.ts +0 -34
- package/integration-tests/src/mastra/index.ts +0 -15
- package/integration-tests/src/mastra/mcp/index.ts +0 -46
- package/integration-tests/src/mastra/tools/weather.ts +0 -13
- package/integration-tests/src/server.test.ts +0 -238
- package/integration-tests/tsconfig.json +0 -13
- package/integration-tests/vitest.config.ts +0 -14
- package/src/__fixtures__/fire-crawl-complex-schema.ts +0 -1013
- package/src/__fixtures__/server-weather.ts +0 -16
- package/src/__fixtures__/stock-price.ts +0 -128
- package/src/__fixtures__/tools.ts +0 -94
- package/src/__fixtures__/weather.ts +0 -269
- package/src/client/client.test.ts +0 -585
- package/src/client/client.ts +0 -628
- package/src/client/configuration.test.ts +0 -856
- package/src/client/configuration.ts +0 -468
- package/src/client/elicitationActions.ts +0 -26
- package/src/client/index.ts +0 -3
- package/src/client/promptActions.ts +0 -70
- package/src/client/resourceActions.ts +0 -119
- package/src/index.ts +0 -2
- package/src/server/index.ts +0 -2
- package/src/server/promptActions.ts +0 -48
- package/src/server/resourceActions.ts +0 -90
- package/src/server/server-logging.test.ts +0 -181
- package/src/server/server.test.ts +0 -2142
- package/src/server/server.ts +0 -1442
- package/src/server/types.ts +0 -59
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -5
- package/tsup.config.ts +0 -17
- package/vitest.config.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -1855,12 +1855,12 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
1855
1855
|
inputSchema: z.object({
|
|
1856
1856
|
message: z.string().describe("The question or input for the agent.")
|
|
1857
1857
|
}),
|
|
1858
|
-
execute: async ({ context, runtimeContext }) => {
|
|
1858
|
+
execute: async ({ context, runtimeContext, tracingContext }) => {
|
|
1859
1859
|
this.logger.debug(
|
|
1860
1860
|
`Executing agent tool '${agentToolName}' for agent '${agent.name}' with message: "${context.message}"`
|
|
1861
1861
|
);
|
|
1862
1862
|
try {
|
|
1863
|
-
const response = await agent.generate(context.message, { runtimeContext });
|
|
1863
|
+
const response = await agent.generate(context.message, { runtimeContext, tracingContext });
|
|
1864
1864
|
return response;
|
|
1865
1865
|
} catch (error) {
|
|
1866
1866
|
this.logger.error(`Error executing agent tool '${agentToolName}' for agent '${agent.name}':`, error);
|
|
@@ -1873,6 +1873,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
1873
1873
|
logger: this.logger,
|
|
1874
1874
|
mastra: this.mastra,
|
|
1875
1875
|
runtimeContext: new RuntimeContext(),
|
|
1876
|
+
tracingContext: {},
|
|
1876
1877
|
description: agentToolDefinition.description
|
|
1877
1878
|
};
|
|
1878
1879
|
const coreTool = makeCoreTool(agentToolDefinition, options);
|
|
@@ -1917,14 +1918,14 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
1917
1918
|
id: workflowToolName,
|
|
1918
1919
|
description: `Run workflow '${workflowKey}'. Workflow description: ${workflowDescription}`,
|
|
1919
1920
|
inputSchema: workflow.inputSchema,
|
|
1920
|
-
execute: async ({ context, runtimeContext }) => {
|
|
1921
|
+
execute: async ({ context, runtimeContext, tracingContext }) => {
|
|
1921
1922
|
this.logger.debug(
|
|
1922
1923
|
`Executing workflow tool '${workflowToolName}' for workflow '${workflow.id}' with input:`,
|
|
1923
1924
|
context
|
|
1924
1925
|
);
|
|
1925
1926
|
try {
|
|
1926
1927
|
const run2 = workflow.createRun({ runId: runtimeContext?.get("runId") });
|
|
1927
|
-
const response = await run2.start({ inputData: context, runtimeContext });
|
|
1928
|
+
const response = await run2.start({ inputData: context, runtimeContext, tracingContext });
|
|
1928
1929
|
return response;
|
|
1929
1930
|
} catch (error) {
|
|
1930
1931
|
this.logger.error(
|
|
@@ -1940,6 +1941,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
1940
1941
|
logger: this.logger,
|
|
1941
1942
|
mastra: this.mastra,
|
|
1942
1943
|
runtimeContext: new RuntimeContext(),
|
|
1944
|
+
tracingContext: {},
|
|
1943
1945
|
description: workflowToolDefinition.description
|
|
1944
1946
|
};
|
|
1945
1947
|
const coreTool = makeCoreTool(workflowToolDefinition, options);
|
|
@@ -1978,6 +1980,7 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
1978
1980
|
const options = {
|
|
1979
1981
|
name: toolName,
|
|
1980
1982
|
runtimeContext: new RuntimeContext(),
|
|
1983
|
+
tracingContext: {},
|
|
1981
1984
|
mastra: this.mastra,
|
|
1982
1985
|
logger: this.logger,
|
|
1983
1986
|
description: toolInstance?.description
|