@mastra/mcp-apps-components 0.1.0-alpha.4 → 0.1.0-alpha.6
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/README.md +90 -0
- package/dist/apps/observability-widget/tool.d.ts +9 -0
- package/dist/apps/observability-widget/tool.d.ts.map +1 -1
- package/dist/dashboard-views.d.ts +39 -0
- package/dist/dashboard-views.d.ts.map +1 -0
- package/dist/dashboards.cjs +60 -0
- package/dist/dashboards.cjs.map +1 -0
- package/dist/dashboards.d.ts +187 -0
- package/dist/dashboards.d.ts.map +1 -0
- package/dist/dashboards.js +52 -0
- package/dist/dashboards.js.map +1 -0
- package/dist/host.cjs +31 -17
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.ts +12 -4
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +30 -18
- package/dist/host.js.map +1 -1
- package/dist/index.cjs +12 -1063
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1059
- package/dist/index.js.map +1 -1
- package/dist/observability-dashboard-BH7Qi5Nh.js +1286 -0
- package/dist/observability-dashboard-BH7Qi5Nh.js.map +1 -0
- package/dist/observability-dashboard-D_iAY-Ff.cjs +1351 -0
- package/dist/observability-dashboard-D_iAY-Ff.cjs.map +1 -0
- package/dist/observability-dashboard.d.ts +44 -1
- package/dist/observability-dashboard.d.ts.map +1 -1
- package/dist/{tool-B9qpVU16.cjs → tool--nuX8qzb.cjs} +20 -1
- package/dist/tool--nuX8qzb.cjs.map +1 -0
- package/dist/{tool-HqUC6iks.js → tool-CKJgZfHk.js} +9 -2
- package/dist/tool-CKJgZfHk.js.map +1 -0
- package/package.json +17 -6
- package/dist/tool-B9qpVU16.cjs.map +0 -1
- package/dist/tool-HqUC6iks.js.map +0 -1
package/dist/host.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.cjs","names":["OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY","OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY","OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY"],"sources":["../src/host.ts"],"sourcesContent":["import {\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nimport type {\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\nexport {\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nexport type {\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\n/** The MCP App instance a host callback is about: one tool call's app. */\nexport type McpAppRef = { toolName: string; toolCallId: string; resourceUri: string };\n\n/**\n * What a chat host passes to `McpAppHostProvider` from `@mastra/playground-ui/domains/mcps`. Typed\n * here by shape, so this package doesn't depend on the host's UI package.\n */\nexport type McpAppHostValue = {\n hostContext?: (app: McpAppRef) => Record<string, unknown> | undefined;\n onModelContext?: (\n app: McpAppRef,\n params: { content?: unknown[]; structuredContent?: Record<string, unknown> },\n ) => void;\n};\n\nexport type ObservabilityWidgetPins = {\n /** The ids of the widgets the host has pinned. Pass new ids after `onPin`/`onUnpin` to answer. */\n pinnedIds: readonly string[];\n /**\n * The user pinned `pin.widget` over `pin.datePreset` (and `pin.customRange` when `custom`), under\n * `pin.filters` when it has them.\n */\n onPin: (pin: Omit<ObservabilityWidgetPin, 'pinned'>, app: McpAppRef) => void;\n /** The user unpinned the widget with this id. */\n onUnpin: (widgetId: string, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetHostOptions = Omit<ObservabilityWidgetView, 'customRange'> & {\n /** The window drawn when `datePreset` is `custom`: the Metrics page's `customRange` as is, or ISO strings. */\n customRange?: { from?: Date | string; to?: Date | string };\n /** The `ui://` URI the observability widget app is registered under; other apps are left alone. */\n resourceUri: string;\n /** Lets the user pin widgets. Left out, the widgets show no pin button. */\n pins?: ObservabilityWidgetPins;\n};\n\nexport type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & { resourceUri: string };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** The app
|
|
1
|
+
{"version":3,"file":"host.cjs","names":["OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY","OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY","OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY","OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY"],"sources":["../src/host.ts"],"sourcesContent":["import {\n OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nimport type {\n ObservabilityWidgetConfigure,\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\nexport {\n OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nexport type {\n ObservabilityWidgetConfigure,\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\n/** The MCP App instance a host callback is about: one tool call's app. */\nexport type McpAppRef = { toolName: string; toolCallId: string; resourceUri: string };\n\n/**\n * What a chat host passes to `McpAppHostProvider` from `@mastra/playground-ui/domains/mcps`. Typed\n * here by shape, so this package doesn't depend on the host's UI package.\n */\nexport type McpAppHostValue = {\n hostContext?: (app: McpAppRef) => Record<string, unknown> | undefined;\n onModelContext?: (\n app: McpAppRef,\n params: { content?: unknown[]; structuredContent?: Record<string, unknown> },\n ) => void;\n};\n\nexport type ObservabilityWidgetPins = {\n /** The ids of the widgets the host has pinned. Pass new ids after `onPin`/`onUnpin` to answer. */\n pinnedIds: readonly string[];\n /**\n * The user pinned `pin.widget` over `pin.datePreset` (and `pin.customRange` when `custom`), under\n * `pin.filters` when it has them.\n */\n onPin: (pin: Omit<ObservabilityWidgetPin, 'pinned'>, app: McpAppRef) => void;\n /** The user unpinned the widget with this id. */\n onUnpin: (widgetId: string, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetHostOptions = Omit<ObservabilityWidgetView, 'customRange'> & {\n /** The window drawn when `datePreset` is `custom`: the Metrics page's `customRange` as is, or ISO strings. */\n customRange?: { from?: Date | string; to?: Date | string };\n /** The `ui://` URI the observability widget app is registered under; other apps are left alone. */\n resourceUri: string;\n /** Lets the user pin widgets. Left out, the widgets show no pin button. */\n pins?: ObservabilityWidgetPins;\n /**\n * The user clicked the settings button of `configure.widget`, drawn over `configure.datePreset` (and\n * `configure.customRange` when `custom`) under `configure.filters` when it has them. Left out, the\n * widgets show no settings button.\n */\n onConfigure?: (configure: ObservabilityWidgetConfigure, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & { resourceUri: string };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** The widget the app sends with a pin or settings click, checked by shape only: the widget itself is validated when it's drawn. */\nfunction readDrawnWidget(value: unknown): ObservabilityWidgetConfigure | undefined {\n if (!isRecord(value) || typeof value.datePreset !== 'string') return undefined;\n if (!isRecord(value.widget) || typeof value.widget.id !== 'string') return undefined;\n if (value.filters !== undefined && !Array.isArray(value.filters)) return undefined;\n const range = isRecord(value.customRange) ? value.customRange : undefined;\n const customRange: ObservabilityWidgetDateRange | undefined = range && {\n ...(typeof range.from === 'string' ? { from: range.from } : {}),\n ...(typeof range.to === 'string' ? { to: range.to } : {}),\n };\n return {\n widget: { ...value.widget, id: value.widget.id },\n datePreset: value.datePreset,\n ...(customRange ? { customRange } : {}),\n ...(value.filters ? { filters: value.filters } : {}),\n };\n}\n\nfunction readPin(structuredContent: Record<string, unknown> | undefined): ObservabilityWidgetPin | undefined {\n const pin = structuredContent?.[OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY];\n if (!isRecord(pin) || typeof pin.pinned !== 'boolean') return undefined;\n const drawn = readDrawnWidget(pin);\n return drawn && { pinned: pin.pinned, ...drawn };\n}\n\nconst toIso = (date: Date | string | undefined) => (date instanceof Date ? date.toISOString() : date);\n\n/**\n * What the host passes down to the observability widget app: the host page's `datePreset` (with its\n * `customRange` when `custom`) and `filters`, drawn instead of the dashboard's own, and the `projectId` sent with every\n * `queryObservability` call. The app redraws when any of them changes.\n *\n * ```tsx\n * const host = useMemo(\n * () =>\n * observabilityWidgetHost({\n * resourceUri: 'ui://mastra/observability-widget',\n * datePreset,\n * customRange,\n * filters,\n * projectId,\n * }),\n * [datePreset, customRange, filters, projectId],\n * );\n * <McpAppHostProvider value={host}>{chat}</McpAppHostProvider>\n * ```\n *\n * Pass `pins` to let the user pin widgets too. A click shows on the button right away and holds\n * until the host's ids next change, so a host that turns a click down leaves it showing until then.\n *\n * Pass `onConfigure` to show a settings button on each widget, e.g. to open the host's own dialog for it.\n */\nexport function observabilityWidgetHost({\n resourceUri,\n datePreset,\n customRange,\n filters,\n projectId,\n pins,\n onConfigure,\n}: ObservabilityWidgetHostOptions): McpAppHostValue {\n const from = toIso(customRange?.from);\n const to = toIso(customRange?.to);\n // Always sent, even empty, so a field the host stops setting is cleared in the app too.\n const view: ObservabilityWidgetView = {\n ...(datePreset ? { datePreset } : {}),\n ...(datePreset === 'custom' && customRange\n ? { customRange: { ...(from ? { from } : {}), ...(to ? { to } : {}) } }\n : {}),\n ...(filters ? { filters } : {}),\n ...(projectId ? { projectId } : {}),\n };\n return {\n hostContext: app =>\n app.resourceUri === resourceUri\n ? {\n [OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY]: view,\n ...(pins ? { [OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY]: pins.pinnedIds } : {}),\n ...(onConfigure ? { [OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY]: true } : {}),\n }\n : undefined,\n onModelContext:\n pins || onConfigure\n ? (app, params) => {\n if (app.resourceUri !== resourceUri) return;\n const configure =\n onConfigure && readDrawnWidget(params.structuredContent?.[OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY]);\n if (configure) onConfigure(configure, app);\n const pin = pins && readPin(params.structuredContent);\n if (!pin) return;\n if (pin.pinned) {\n const { pinned: _pinned, ...pinned } = pin;\n pins.onPin(pinned, app);\n } else pins.onUnpin(pin.widget.id, app);\n }\n : undefined,\n };\n}\n\n/** Lets the user pin observability widgets from the chat: `observabilityWidgetHost` with only `pins`. */\nexport function observabilityWidgetPins({ resourceUri, ...pins }: ObservabilityWidgetPinsOptions): McpAppHostValue {\n return observabilityWidgetHost({ resourceUri, pins });\n}\n"],"mappings":";;;AAwEA,MAAM,YAAY,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;;AAGrE,SAAS,gBAAgB,OAA0D;CACjF,IAAI,CAAC,SAAS,KAAK,KAAK,OAAO,MAAM,eAAe,UAAU,OAAO,KAAA;CACrE,IAAI,CAAC,SAAS,MAAM,MAAM,KAAK,OAAO,MAAM,OAAO,OAAO,UAAU,OAAO,KAAA;CAC3E,IAAI,MAAM,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,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC;CACnC;CACA,OAAO;EACL,cAAa,QACX,IAAI,gBAAgB,cAChB;IACGC,aAAAA,wCAAwC;GACzC,GAAI,OAAO,GAAGC,aAAAA,0CAA0C,KAAK,UAAU,IAAI,CAAC;GAC5E,GAAI,cAAc,GAAGC,aAAAA,gDAAgD,KAAK,IAAI,CAAC;EACjF,IACA,KAAA;EACN,gBACE,QAAQ,eACH,KAAK,WAAW;GACf,IAAI,IAAI,gBAAgB,aAAa;GACrC,MAAM,YACJ,eAAe,gBAAgB,OAAO,oBAAA,2CAA+D;GACvG,IAAI,WAAW,YAAY,WAAW,GAAG;GACzC,MAAM,MAAM,QAAQ,QAAQ,OAAO,iBAAiB;GACpD,IAAI,CAAC,KAAK;GACV,IAAI,IAAI,QAAQ;IACd,MAAM,EAAE,QAAQ,SAAS,GAAG,WAAW;IACvC,KAAK,MAAM,QAAQ,GAAG;GACxB,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,GAAG;EACxC,IACA,KAAA;CACR;AACF;;AAGA,SAAgB,wBAAwB,EAAE,aAAa,GAAG,QAAyD;CACjH,OAAO,wBAAwB;EAAE;EAAa;CAAK,CAAC;AACtD"}
|
package/dist/host.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ObservabilityWidgetPin, ObservabilityWidgetView } from './apps/observability-widget/tool.js';
|
|
2
|
-
export { OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY, OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY, OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY, } from './apps/observability-widget/tool.js';
|
|
3
|
-
export type { ObservabilityWidgetDateRange, ObservabilityWidgetPin, ObservabilityWidgetView, } from './apps/observability-widget/tool.js';
|
|
1
|
+
import type { ObservabilityWidgetConfigure, ObservabilityWidgetPin, ObservabilityWidgetView } from './apps/observability-widget/tool.js';
|
|
2
|
+
export { OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY, OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY, OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY, OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY, OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY, } from './apps/observability-widget/tool.js';
|
|
3
|
+
export type { ObservabilityWidgetConfigure, ObservabilityWidgetDateRange, ObservabilityWidgetPin, ObservabilityWidgetView, } from './apps/observability-widget/tool.js';
|
|
4
4
|
/** The MCP App instance a host callback is about: one tool call's app. */
|
|
5
5
|
export type McpAppRef = {
|
|
6
6
|
toolName: string;
|
|
@@ -39,6 +39,12 @@ export type ObservabilityWidgetHostOptions = Omit<ObservabilityWidgetView, 'cust
|
|
|
39
39
|
resourceUri: string;
|
|
40
40
|
/** Lets the user pin widgets. Left out, the widgets show no pin button. */
|
|
41
41
|
pins?: ObservabilityWidgetPins;
|
|
42
|
+
/**
|
|
43
|
+
* The user clicked the settings button of `configure.widget`, drawn over `configure.datePreset` (and
|
|
44
|
+
* `configure.customRange` when `custom`) under `configure.filters` when it has them. Left out, the
|
|
45
|
+
* widgets show no settings button.
|
|
46
|
+
*/
|
|
47
|
+
onConfigure?: (configure: ObservabilityWidgetConfigure, app: McpAppRef) => void;
|
|
42
48
|
};
|
|
43
49
|
export type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & {
|
|
44
50
|
resourceUri: string;
|
|
@@ -65,8 +71,10 @@ export type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & {
|
|
|
65
71
|
*
|
|
66
72
|
* Pass `pins` to let the user pin widgets too. A click shows on the button right away and holds
|
|
67
73
|
* until the host's ids next change, so a host that turns a click down leaves it showing until then.
|
|
74
|
+
*
|
|
75
|
+
* Pass `onConfigure` to show a settings button on each widget, e.g. to open the host's own dialog for it.
|
|
68
76
|
*/
|
|
69
|
-
export declare function observabilityWidgetHost({ resourceUri, datePreset, customRange, filters, projectId, pins, }: ObservabilityWidgetHostOptions): McpAppHostValue;
|
|
77
|
+
export declare function observabilityWidgetHost({ resourceUri, datePreset, customRange, filters, projectId, pins, onConfigure, }: ObservabilityWidgetHostOptions): McpAppHostValue;
|
|
70
78
|
/** Lets the user pin observability widgets from the chat: `observabilityWidgetHost` with only `pins`. */
|
|
71
79
|
export declare function observabilityWidgetPins({ resourceUri, ...pins }: ObservabilityWidgetPinsOptions): McpAppHostValue;
|
|
72
80
|
//# sourceMappingURL=host.d.ts.map
|
package/dist/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,4BAA4B,EAE5B,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,6CAA6C,EAC7C,0CAA0C,EAC1C,oCAAoC,EACpC,uCAAuC,EACvC,qCAAqC,GACtC,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAE1C,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACtE,cAAc,CAAC,EAAE,CACf,GAAG,EAAE,SAAS,EACd,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EA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package/dist/host.js
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY, i as OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY, o as OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY, r as OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY, s as OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY } from "./tool-CKJgZfHk.js";
|
|
2
2
|
// src/host.ts
|
|
3
3
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
-
/** The app
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
if (!isRecord(
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
const range = isRecord(pin.customRange) ? pin.customRange : void 0;
|
|
4
|
+
/** The widget the app sends with a pin or settings click, checked by shape only: the widget itself is validated when it's drawn. */
|
|
5
|
+
function readDrawnWidget(value) {
|
|
6
|
+
if (!isRecord(value) || typeof value.datePreset !== "string") return void 0;
|
|
7
|
+
if (!isRecord(value.widget) || typeof value.widget.id !== "string") return void 0;
|
|
8
|
+
if (value.filters !== void 0 && !Array.isArray(value.filters)) return void 0;
|
|
9
|
+
const range = isRecord(value.customRange) ? value.customRange : void 0;
|
|
11
10
|
const customRange = range && {
|
|
12
11
|
...typeof range.from === "string" ? { from: range.from } : {},
|
|
13
12
|
...typeof range.to === "string" ? { to: range.to } : {}
|
|
14
13
|
};
|
|
15
14
|
return {
|
|
16
|
-
pinned: pin.pinned,
|
|
17
15
|
widget: {
|
|
18
|
-
...
|
|
19
|
-
id:
|
|
16
|
+
...value.widget,
|
|
17
|
+
id: value.widget.id
|
|
20
18
|
},
|
|
21
|
-
datePreset:
|
|
19
|
+
datePreset: value.datePreset,
|
|
22
20
|
...customRange ? { customRange } : {},
|
|
23
|
-
...
|
|
21
|
+
...value.filters ? { filters: value.filters } : {}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function readPin(structuredContent) {
|
|
25
|
+
const pin = structuredContent?.[OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY];
|
|
26
|
+
if (!isRecord(pin) || typeof pin.pinned !== "boolean") return void 0;
|
|
27
|
+
const drawn = readDrawnWidget(pin);
|
|
28
|
+
return drawn && {
|
|
29
|
+
pinned: pin.pinned,
|
|
30
|
+
...drawn
|
|
24
31
|
};
|
|
25
32
|
}
|
|
26
33
|
const toIso = (date) => date instanceof Date ? date.toISOString() : date;
|
|
@@ -46,8 +53,10 @@ const toIso = (date) => date instanceof Date ? date.toISOString() : date;
|
|
|
46
53
|
*
|
|
47
54
|
* Pass `pins` to let the user pin widgets too. A click shows on the button right away and holds
|
|
48
55
|
* until the host's ids next change, so a host that turns a click down leaves it showing until then.
|
|
56
|
+
*
|
|
57
|
+
* Pass `onConfigure` to show a settings button on each widget, e.g. to open the host's own dialog for it.
|
|
49
58
|
*/
|
|
50
|
-
function observabilityWidgetHost({ resourceUri, datePreset, customRange, filters, projectId, pins }) {
|
|
59
|
+
function observabilityWidgetHost({ resourceUri, datePreset, customRange, filters, projectId, pins, onConfigure }) {
|
|
51
60
|
const from = toIso(customRange?.from);
|
|
52
61
|
const to = toIso(customRange?.to);
|
|
53
62
|
const view = {
|
|
@@ -62,11 +71,14 @@ function observabilityWidgetHost({ resourceUri, datePreset, customRange, filters
|
|
|
62
71
|
return {
|
|
63
72
|
hostContext: (app) => app.resourceUri === resourceUri ? {
|
|
64
73
|
[OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY]: view,
|
|
65
|
-
...pins ? { [OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY]: pins.pinnedIds } : {}
|
|
74
|
+
...pins ? { [OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY]: pins.pinnedIds } : {},
|
|
75
|
+
...onConfigure ? { [OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY]: true } : {}
|
|
66
76
|
} : void 0,
|
|
67
|
-
onModelContext: pins ? (app, params) => {
|
|
77
|
+
onModelContext: pins || onConfigure ? (app, params) => {
|
|
68
78
|
if (app.resourceUri !== resourceUri) return;
|
|
69
|
-
const
|
|
79
|
+
const configure = onConfigure && readDrawnWidget(params.structuredContent?.["mastra.ai/observability-widget-configure"]);
|
|
80
|
+
if (configure) onConfigure(configure, app);
|
|
81
|
+
const pin = pins && readPin(params.structuredContent);
|
|
70
82
|
if (!pin) return;
|
|
71
83
|
if (pin.pinned) {
|
|
72
84
|
const { pinned: _pinned, ...pinned } = pin;
|
|
@@ -82,6 +94,6 @@ function observabilityWidgetPins({ resourceUri, ...pins }) {
|
|
|
82
94
|
pins
|
|
83
95
|
});
|
|
84
96
|
}
|
|
85
|
-
export { OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY, OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY, OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY, observabilityWidgetHost, observabilityWidgetPins };
|
|
97
|
+
export { OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY, OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY, OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY, OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY, OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY, observabilityWidgetHost, observabilityWidgetPins };
|
|
86
98
|
|
|
87
99
|
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["import {\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nimport type {\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\nexport {\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nexport type {\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\n/** The MCP App instance a host callback is about: one tool call's app. */\nexport type McpAppRef = { toolName: string; toolCallId: string; resourceUri: string };\n\n/**\n * What a chat host passes to `McpAppHostProvider` from `@mastra/playground-ui/domains/mcps`. Typed\n * here by shape, so this package doesn't depend on the host's UI package.\n */\nexport type McpAppHostValue = {\n hostContext?: (app: McpAppRef) => Record<string, unknown> | undefined;\n onModelContext?: (\n app: McpAppRef,\n params: { content?: unknown[]; structuredContent?: Record<string, unknown> },\n ) => void;\n};\n\nexport type ObservabilityWidgetPins = {\n /** The ids of the widgets the host has pinned. Pass new ids after `onPin`/`onUnpin` to answer. */\n pinnedIds: readonly string[];\n /**\n * The user pinned `pin.widget` over `pin.datePreset` (and `pin.customRange` when `custom`), under\n * `pin.filters` when it has them.\n */\n onPin: (pin: Omit<ObservabilityWidgetPin, 'pinned'>, app: McpAppRef) => void;\n /** The user unpinned the widget with this id. */\n onUnpin: (widgetId: string, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetHostOptions = Omit<ObservabilityWidgetView, 'customRange'> & {\n /** The window drawn when `datePreset` is `custom`: the Metrics page's `customRange` as is, or ISO strings. */\n customRange?: { from?: Date | string; to?: Date | string };\n /** The `ui://` URI the observability widget app is registered under; other apps are left alone. */\n resourceUri: string;\n /** Lets the user pin widgets. Left out, the widgets show no pin button. */\n pins?: ObservabilityWidgetPins;\n};\n\nexport type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & { resourceUri: string };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** The app
|
|
1
|
+
{"version":3,"file":"host.js","names":[],"sources":["../src/host.ts"],"sourcesContent":["import {\n OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nimport type {\n ObservabilityWidgetConfigure,\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\nexport {\n OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY,\n OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY,\n} from './apps/observability-widget/tool';\nexport type {\n ObservabilityWidgetConfigure,\n ObservabilityWidgetDateRange,\n ObservabilityWidgetPin,\n ObservabilityWidgetView,\n} from './apps/observability-widget/tool';\n\n/** The MCP App instance a host callback is about: one tool call's app. */\nexport type McpAppRef = { toolName: string; toolCallId: string; resourceUri: string };\n\n/**\n * What a chat host passes to `McpAppHostProvider` from `@mastra/playground-ui/domains/mcps`. Typed\n * here by shape, so this package doesn't depend on the host's UI package.\n */\nexport type McpAppHostValue = {\n hostContext?: (app: McpAppRef) => Record<string, unknown> | undefined;\n onModelContext?: (\n app: McpAppRef,\n params: { content?: unknown[]; structuredContent?: Record<string, unknown> },\n ) => void;\n};\n\nexport type ObservabilityWidgetPins = {\n /** The ids of the widgets the host has pinned. Pass new ids after `onPin`/`onUnpin` to answer. */\n pinnedIds: readonly string[];\n /**\n * The user pinned `pin.widget` over `pin.datePreset` (and `pin.customRange` when `custom`), under\n * `pin.filters` when it has them.\n */\n onPin: (pin: Omit<ObservabilityWidgetPin, 'pinned'>, app: McpAppRef) => void;\n /** The user unpinned the widget with this id. */\n onUnpin: (widgetId: string, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetHostOptions = Omit<ObservabilityWidgetView, 'customRange'> & {\n /** The window drawn when `datePreset` is `custom`: the Metrics page's `customRange` as is, or ISO strings. */\n customRange?: { from?: Date | string; to?: Date | string };\n /** The `ui://` URI the observability widget app is registered under; other apps are left alone. */\n resourceUri: string;\n /** Lets the user pin widgets. Left out, the widgets show no pin button. */\n pins?: ObservabilityWidgetPins;\n /**\n * The user clicked the settings button of `configure.widget`, drawn over `configure.datePreset` (and\n * `configure.customRange` when `custom`) under `configure.filters` when it has them. Left out, the\n * widgets show no settings button.\n */\n onConfigure?: (configure: ObservabilityWidgetConfigure, app: McpAppRef) => void;\n};\n\nexport type ObservabilityWidgetPinsOptions = ObservabilityWidgetPins & { resourceUri: string };\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/** The widget the app sends with a pin or settings click, checked by shape only: the widget itself is validated when it's drawn. */\nfunction readDrawnWidget(value: unknown): ObservabilityWidgetConfigure | undefined {\n if (!isRecord(value) || typeof value.datePreset !== 'string') return undefined;\n if (!isRecord(value.widget) || typeof value.widget.id !== 'string') return undefined;\n if (value.filters !== undefined && !Array.isArray(value.filters)) return undefined;\n const range = isRecord(value.customRange) ? value.customRange : undefined;\n const customRange: ObservabilityWidgetDateRange | undefined = range && {\n ...(typeof range.from === 'string' ? { from: range.from } : {}),\n ...(typeof range.to === 'string' ? { to: range.to } : {}),\n };\n return {\n widget: { ...value.widget, id: value.widget.id },\n datePreset: value.datePreset,\n ...(customRange ? { customRange } : {}),\n ...(value.filters ? { filters: value.filters } : {}),\n };\n}\n\nfunction readPin(structuredContent: Record<string, unknown> | undefined): ObservabilityWidgetPin | undefined {\n const pin = structuredContent?.[OBSERVABILITY_WIDGET_PIN_CONTEXT_KEY];\n if (!isRecord(pin) || typeof pin.pinned !== 'boolean') return undefined;\n const drawn = readDrawnWidget(pin);\n return drawn && { pinned: pin.pinned, ...drawn };\n}\n\nconst toIso = (date: Date | string | undefined) => (date instanceof Date ? date.toISOString() : date);\n\n/**\n * What the host passes down to the observability widget app: the host page's `datePreset` (with its\n * `customRange` when `custom`) and `filters`, drawn instead of the dashboard's own, and the `projectId` sent with every\n * `queryObservability` call. The app redraws when any of them changes.\n *\n * ```tsx\n * const host = useMemo(\n * () =>\n * observabilityWidgetHost({\n * resourceUri: 'ui://mastra/observability-widget',\n * datePreset,\n * customRange,\n * filters,\n * projectId,\n * }),\n * [datePreset, customRange, filters, projectId],\n * );\n * <McpAppHostProvider value={host}>{chat}</McpAppHostProvider>\n * ```\n *\n * Pass `pins` to let the user pin widgets too. A click shows on the button right away and holds\n * until the host's ids next change, so a host that turns a click down leaves it showing until then.\n *\n * Pass `onConfigure` to show a settings button on each widget, e.g. to open the host's own dialog for it.\n */\nexport function observabilityWidgetHost({\n resourceUri,\n datePreset,\n customRange,\n filters,\n projectId,\n pins,\n onConfigure,\n}: ObservabilityWidgetHostOptions): McpAppHostValue {\n const from = toIso(customRange?.from);\n const to = toIso(customRange?.to);\n // Always sent, even empty, so a field the host stops setting is cleared in the app too.\n const view: ObservabilityWidgetView = {\n ...(datePreset ? { datePreset } : {}),\n ...(datePreset === 'custom' && customRange\n ? { customRange: { ...(from ? { from } : {}), ...(to ? { to } : {}) } }\n : {}),\n ...(filters ? { filters } : {}),\n ...(projectId ? { projectId } : {}),\n };\n return {\n hostContext: app =>\n app.resourceUri === resourceUri\n ? {\n [OBSERVABILITY_WIDGET_VIEW_CONTEXT_KEY]: view,\n ...(pins ? { [OBSERVABILITY_WIDGET_PINNED_CONTEXT_KEY]: pins.pinnedIds } : {}),\n ...(onConfigure ? { [OBSERVABILITY_WIDGET_CONFIGURABLE_CONTEXT_KEY]: true } : {}),\n }\n : undefined,\n onModelContext:\n pins || onConfigure\n ? (app, params) => {\n if (app.resourceUri !== resourceUri) return;\n const configure =\n onConfigure && readDrawnWidget(params.structuredContent?.[OBSERVABILITY_WIDGET_CONFIGURE_CONTEXT_KEY]);\n if (configure) onConfigure(configure, app);\n const pin = pins && readPin(params.structuredContent);\n if (!pin) return;\n if (pin.pinned) {\n const { pinned: _pinned, ...pinned } = pin;\n pins.onPin(pinned, app);\n } else pins.onUnpin(pin.widget.id, app);\n }\n : undefined,\n };\n}\n\n/** Lets the user pin observability widgets from the chat: `observabilityWidgetHost` with only `pins`. */\nexport function observabilityWidgetPins({ resourceUri, ...pins }: ObservabilityWidgetPinsOptions): McpAppHostValue {\n return observabilityWidgetHost({ resourceUri, pins });\n}\n"],"mappings":";;AAwEA,MAAM,YAAY,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;;AAGrE,SAAS,gBAAgB,OAA0D;CACjF,IAAI,CAAC,SAAS,KAAK,KAAK,OAAO,MAAM,eAAe,UAAU,OAAO,KAAA;CACrE,IAAI,CAAC,SAAS,MAAM,MAAM,KAAK,OAAO,MAAM,OAAO,OAAO,UAAU,OAAO,KAAA;CAC3E,IAAI,MAAM,YAAY,KAAA,KAAa,CAAC,MAAM,QAAQ,MAAM,OAAO,GAAG,OAAO,KAAA;CACzE,MAAM,QAAQ,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,KAAA;CAChE,MAAM,cAAwD,SAAS;EACrE,GAAI,OAAO,MAAM,SAAS,WAAW,EAAE,MAAM,MAAM,KAAK,IAAI,CAAC;EAC7D,GAAI,OAAO,MAAM,OAAO,WAAW,EAAE,IAAI,MAAM,GAAG,IAAI,CAAC;CACzD;CACA,OAAO;EACL,QAAQ;GAAE,GAAG,MAAM;GAAQ,IAAI,MAAM,OAAO;EAAG;EAC/C,YAAY,MAAM;EAClB,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;EACrC,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,QAAQ,IAAI,CAAC;CACpD;AACF;AAEA,SAAS,QAAQ,mB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