@mastra/mcp-apps-components 0.0.0 → 0.1.0-alpha.1
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/LICENSE.md +32 -0
- package/README.md +138 -3
- package/dist/apps/observability-widget/tool.d.ts +20 -0
- package/dist/apps/observability-widget/tool.d.ts.map +1 -0
- package/dist/host.cjs +53 -0
- package/dist/host.cjs.map +1 -0
- package/dist/host.js +50 -0
- package/dist/host.js.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/tool-BD-7EJf2.js +13 -0
- package/dist/tool-BD-7EJf2.js.map +1 -0
- package/dist/tool-C6_-nIOM.cjs +30 -0
- package/dist/tool-C6_-nIOM.cjs.map +1 -0
- package/package.json +76 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/apps/observability-widget/tool.ts
|
|
2
|
+
/** The app-only tool the observability widget calls, on the server that opened it, for every read. */
|
|
3
|
+
const QUERY_OBSERVABILITY_TOOL = "queryObservability";
|
|
4
|
+
/**
|
|
5
|
+
* Host context key holding the ids of the widgets the host has pinned (`string[]`). The pin button
|
|
6
|
+
* only shows when the host sends it and supports `updateModelContext.structuredContent`.
|
|
7
|
+
*/
|
|
8
|
+
const OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY = "mastra.ai/observability-widget-pinned";
|
|
9
|
+
/** `structuredContent` key of the model context update the app sends when the user (un)pins. */
|
|
10
|
+
const OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY = "mastra.ai/observability-widget-pin";
|
|
11
|
+
export { OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY as n, QUERY_OBSERVABILITY_TOOL as r, OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY as t };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=tool-BD-7EJf2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-BD-7EJf2.js","names":[],"sources":["../src/apps/observability-widget/tool.ts"],"sourcesContent":["/** The app-only tool the observability widget calls, on the server that opened it, for every read. */\nexport const QUERY_OBSERVABILITY_TOOL = 'queryObservability';\n\n/**\n * Host context key holding the ids of the widgets the host has pinned (`string[]`). The pin button\n * only shows when the host sends it and supports `updateModelContext.structuredContent`.\n */\nexport const OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY = 'mastra.ai/observability-widget-pinned';\n\n/** `structuredContent` key of the model context update the app sends when the user (un)pins. */\nexport const OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY = 'mastra.ai/observability-widget-pin';\n\n/** What the app sends under `OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY`: the state the user asked for. */\nexport type ObservabilityWidgetPin = {\n pinned: boolean;\n /** The stored dashboard widget, as the opening tool returned it. */\n widget: { id: string; [key: string]: unknown };\n datePreset: string;\n};\n"],"mappings":";;AACA,MAAa,2BAA2B;;;;;AAMxC,MAAa,0CAA0C;;AAGvD,MAAa,uCAAuC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/apps/observability-widget/tool.ts
|
|
2
|
+
/** The app-only tool the observability widget calls, on the server that opened it, for every read. */
|
|
3
|
+
const QUERY_OBSERVABILITY_TOOL = "queryObservability";
|
|
4
|
+
/**
|
|
5
|
+
* Host context key holding the ids of the widgets the host has pinned (`string[]`). The pin button
|
|
6
|
+
* only shows when the host sends it and supports `updateModelContext.structuredContent`.
|
|
7
|
+
*/
|
|
8
|
+
const OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY = "mastra.ai/observability-widget-pinned";
|
|
9
|
+
/** `structuredContent` key of the model context update the app sends when the user (un)pins. */
|
|
10
|
+
const OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY = "mastra.ai/observability-widget-pin";
|
|
11
|
+
Object.defineProperty(exports, "OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "QUERY_OBSERVABILITY_TOOL", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return QUERY_OBSERVABILITY_TOOL;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=tool-C6_-nIOM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-C6_-nIOM.cjs","names":[],"sources":["../src/apps/observability-widget/tool.ts"],"sourcesContent":["/** The app-only tool the observability widget calls, on the server that opened it, for every read. */\nexport const QUERY_OBSERVABILITY_TOOL = 'queryObservability';\n\n/**\n * Host context key holding the ids of the widgets the host has pinned (`string[]`). The pin button\n * only shows when the host sends it and supports `updateModelContext.structuredContent`.\n */\nexport const OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY = 'mastra.ai/observability-widget-pinned';\n\n/** `structuredContent` key of the model context update the app sends when the user (un)pins. */\nexport const OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY = 'mastra.ai/observability-widget-pin';\n\n/** What the app sends under `OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY`: the state the user asked for. */\nexport type ObservabilityWidgetPin = {\n pinned: boolean;\n /** The stored dashboard widget, as the opening tool returned it. */\n widget: { id: string; [key: string]: unknown };\n datePreset: string;\n};\n"],"mappings":";;AACA,MAAa,2BAA2B;;;;;AAMxC,MAAa,0CAA0C;;AAGvD,MAAa,uCAAuC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-apps-components",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Prebuilt MCP Apps, ready to register as MCP server app resources",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"./host": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/host.d.ts",
|
|
21
|
+
"default": "./dist/host.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/host.d.ts",
|
|
25
|
+
"default": "./dist/host.cjs"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"homepage": "https://mastra.ai",
|
|
6
34
|
"repository": {
|
|
7
35
|
"type": "git",
|
|
8
36
|
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
9
37
|
"directory": "packages/mcp-apps-components"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@modelcontextprotocol/client": "2.4.0",
|
|
44
|
+
"@modelcontextprotocol/core": "2.4.0",
|
|
45
|
+
"@modelcontextprotocol/ext-apps": "^2.0.3",
|
|
46
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
47
|
+
"@tailwindcss/vite": "4.3.3",
|
|
48
|
+
"@tanstack/react-query": "^5.104.5",
|
|
49
|
+
"@testing-library/react": "^16.3.3",
|
|
50
|
+
"@types/node": "22.19.15",
|
|
51
|
+
"@types/react": "^19.3.0",
|
|
52
|
+
"@types/react-dom": "^19.3.0",
|
|
53
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
54
|
+
"jsdom": "^30.1.3",
|
|
55
|
+
"react": "^19.3.1",
|
|
56
|
+
"react-dom": "^19.3.1",
|
|
57
|
+
"tailwindcss": "4.3.3",
|
|
58
|
+
"tsdown": "0.23.1",
|
|
59
|
+
"tsx": "^4.23.15",
|
|
60
|
+
"typescript": "^7.0.2",
|
|
61
|
+
"vite": "^8.3.5",
|
|
62
|
+
"vite-plugin-singlefile": "^2.3.4",
|
|
63
|
+
"vitest": "5.1.0",
|
|
64
|
+
"zod": "^4.6.7",
|
|
65
|
+
"@internal/lint": "0.0.148",
|
|
66
|
+
"@internal/types-builder": "0.0.123",
|
|
67
|
+
"@mastra/client-js": "1.60.0-alpha.1",
|
|
68
|
+
"@mastra/core": "1.83.0-alpha.1",
|
|
69
|
+
"@mastra/mcp": "2.9.0-alpha.1",
|
|
70
|
+
"@mastra/playground-ui": "69.0.0-alpha.1",
|
|
71
|
+
"@mastra/react": "1.15.0-alpha.1"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=22.13.0"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"build": "tsx scripts/build-apps.ts && tsdown --silent --config tsdown.config.ts",
|
|
78
|
+
"pretest": "pnpm turbo build --filter @mastra/mcp-apps-components",
|
|
79
|
+
"test": "vitest run --project 'unit:packages/mcp-apps-components'",
|
|
80
|
+
"typecheck": "tsc --noEmit",
|
|
81
|
+
"lint": "oxlint --type-aware .",
|
|
82
|
+
"lint:fix": "oxlint --type-aware --fix ."
|
|
10
83
|
}
|
|
11
|
-
}
|
|
84
|
+
}
|