@seed-ship/mcp-ui-solid 1.0.43 → 1.2.0
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 +356 -142
- package/README.md +362 -21
- package/dist/components/FooterRenderer.cjs +75 -0
- package/dist/components/FooterRenderer.cjs.map +1 -0
- package/dist/components/FooterRenderer.js +75 -0
- package/dist/components/FooterRenderer.js.map +1 -0
- package/dist/components/GridRenderer.cjs +82 -0
- package/dist/components/GridRenderer.cjs.map +1 -0
- package/dist/components/GridRenderer.d.ts +49 -0
- package/dist/components/GridRenderer.d.ts.map +1 -0
- package/dist/components/GridRenderer.js +82 -0
- package/dist/components/GridRenderer.js.map +1 -0
- package/dist/components/UIResourceRenderer.cjs +88 -36
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +90 -38
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/context/MCPActionContext.cjs +149 -0
- package/dist/context/MCPActionContext.cjs.map +1 -0
- package/dist/context/MCPActionContext.d.ts +158 -0
- package/dist/context/MCPActionContext.d.ts.map +1 -0
- package/dist/context/MCPActionContext.js +149 -0
- package/dist/context/MCPActionContext.js.map +1 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useAction.cjs +49 -0
- package/dist/hooks/useAction.cjs.map +1 -0
- package/dist/hooks/useAction.d.ts +79 -0
- package/dist/hooks/useAction.d.ts.map +1 -0
- package/dist/hooks/useAction.js +49 -0
- package/dist/hooks/useAction.js.map +1 -0
- package/dist/hooks.cjs +3 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +4 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +41 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types.d.ts +41 -2
- package/package.json +1 -1
- package/src/components/GridRenderer.tsx +140 -0
- package/src/components/UIResourceRenderer.tsx +65 -25
- package/src/context/MCPActionContext.tsx +350 -0
- package/src/context/index.ts +19 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useAction.ts +138 -0
- package/src/index.ts +14 -1
- package/src/types/index.ts +48 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { createComponent } from "solid-js/web";
|
|
2
|
+
import { createContext, createSignal, useContext } from "solid-js";
|
|
3
|
+
const MCPActionContext = createContext();
|
|
4
|
+
const defaultExecutor = async (request) => {
|
|
5
|
+
return new Promise((resolve) => {
|
|
6
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
7
|
+
if (typeof window !== "undefined") {
|
|
8
|
+
const event = new CustomEvent("mcp-action", {
|
|
9
|
+
detail: {
|
|
10
|
+
toolName: request.toolName,
|
|
11
|
+
params: request.params || {},
|
|
12
|
+
spaceIds: request.spaceIds,
|
|
13
|
+
macroId: request.macroId
|
|
14
|
+
},
|
|
15
|
+
bubbles: true
|
|
16
|
+
});
|
|
17
|
+
const responseHandler = (e) => {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const customEvent = e;
|
|
20
|
+
window.removeEventListener("mcp-action-response", responseHandler);
|
|
21
|
+
resolve({
|
|
22
|
+
success: ((_a = customEvent.detail) == null ? void 0 : _a.success) ?? true,
|
|
23
|
+
data: (_b = customEvent.detail) == null ? void 0 : _b.data,
|
|
24
|
+
error: (_c = customEvent.detail) == null ? void 0 : _c.error,
|
|
25
|
+
timestamp,
|
|
26
|
+
toolName: request.toolName
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
window.addEventListener("mcp-action-response", responseHandler);
|
|
30
|
+
window.dispatchEvent(event);
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
window.removeEventListener("mcp-action-response", responseHandler);
|
|
33
|
+
resolve({
|
|
34
|
+
success: true,
|
|
35
|
+
data: {
|
|
36
|
+
dispatched: true
|
|
37
|
+
},
|
|
38
|
+
timestamp,
|
|
39
|
+
toolName: request.toolName
|
|
40
|
+
});
|
|
41
|
+
}, 100);
|
|
42
|
+
} else {
|
|
43
|
+
resolve({
|
|
44
|
+
success: false,
|
|
45
|
+
error: "Actions not available server-side",
|
|
46
|
+
timestamp,
|
|
47
|
+
toolName: request.toolName
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const MCPActionProvider = (props) => {
|
|
53
|
+
const [isExecuting, setIsExecuting] = createSignal(false);
|
|
54
|
+
const [lastResult, setLastResult] = createSignal();
|
|
55
|
+
const [spaceIds, setSpaceIds] = createSignal(props.spaceIds || []);
|
|
56
|
+
const [macroId, setMacroId] = createSignal(props.macroId);
|
|
57
|
+
const [availableTools, setAvailableTools] = createSignal(props.availableTools || []);
|
|
58
|
+
const executeAction = async (request) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
setIsExecuting(true);
|
|
61
|
+
try {
|
|
62
|
+
const enrichedRequest = {
|
|
63
|
+
...request,
|
|
64
|
+
spaceIds: request.spaceIds || spaceIds(),
|
|
65
|
+
macroId: request.macroId || macroId()
|
|
66
|
+
};
|
|
67
|
+
const executor = props.executor || defaultExecutor;
|
|
68
|
+
const result = await executor(enrichedRequest);
|
|
69
|
+
setLastResult(result);
|
|
70
|
+
(_a = props.onAction) == null ? void 0 : _a.call(props, enrichedRequest, result);
|
|
71
|
+
if (result.success && props.onWebhook) {
|
|
72
|
+
props.onWebhook({
|
|
73
|
+
type: "action-completed",
|
|
74
|
+
payload: {
|
|
75
|
+
request: enrichedRequest,
|
|
76
|
+
result
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
const errorResult = {
|
|
83
|
+
success: false,
|
|
84
|
+
error: error instanceof Error ? error.message : "Unknown error",
|
|
85
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
86
|
+
toolName: request.toolName
|
|
87
|
+
};
|
|
88
|
+
setLastResult(errorResult);
|
|
89
|
+
(_b = props.onAction) == null ? void 0 : _b.call(props, request, errorResult);
|
|
90
|
+
return errorResult;
|
|
91
|
+
} finally {
|
|
92
|
+
setIsExecuting(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const contextValue = {
|
|
96
|
+
executeAction,
|
|
97
|
+
availableTools,
|
|
98
|
+
spaceIds,
|
|
99
|
+
macroId,
|
|
100
|
+
isExecuting,
|
|
101
|
+
lastResult
|
|
102
|
+
};
|
|
103
|
+
return createComponent(MCPActionContext.Provider, {
|
|
104
|
+
value: contextValue,
|
|
105
|
+
get children() {
|
|
106
|
+
return props.children;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
function useMCPAction() {
|
|
111
|
+
const context = useContext(MCPActionContext);
|
|
112
|
+
if (!context) {
|
|
113
|
+
throw new Error("useMCPAction must be used within an MCPActionProvider");
|
|
114
|
+
}
|
|
115
|
+
return context;
|
|
116
|
+
}
|
|
117
|
+
function useMCPActionSafe() {
|
|
118
|
+
const context = useContext(MCPActionContext);
|
|
119
|
+
if (context) {
|
|
120
|
+
return context;
|
|
121
|
+
}
|
|
122
|
+
const [isExecuting, setIsExecuting] = createSignal(false);
|
|
123
|
+
const [lastResult, setLastResult] = createSignal();
|
|
124
|
+
const executeAction = async (request) => {
|
|
125
|
+
setIsExecuting(true);
|
|
126
|
+
try {
|
|
127
|
+
const result = await defaultExecutor(request);
|
|
128
|
+
setLastResult(result);
|
|
129
|
+
return result;
|
|
130
|
+
} finally {
|
|
131
|
+
setIsExecuting(false);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
return {
|
|
135
|
+
executeAction,
|
|
136
|
+
availableTools: () => [],
|
|
137
|
+
spaceIds: () => [],
|
|
138
|
+
macroId: () => void 0,
|
|
139
|
+
isExecuting,
|
|
140
|
+
lastResult
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export {
|
|
144
|
+
MCPActionContext,
|
|
145
|
+
MCPActionProvider,
|
|
146
|
+
useMCPAction,
|
|
147
|
+
useMCPActionSafe
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=MCPActionContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MCPActionContext.js","sources":["../../src/context/MCPActionContext.tsx"],"sourcesContent":["/**\n * MCPActionContext - Context provider for MCP action execution\n * Phase 5.0: Quick Wins - Replaces CustomEvent with typed context for Mastra integration\n */\n\nimport { createContext, createSignal, useContext, ParentComponent, Accessor } from 'solid-js'\n\n/**\n * Action request payload\n */\nexport interface ActionRequest {\n /**\n * MCP tool name to execute\n */\n toolName: string\n\n /**\n * Tool parameters\n */\n params?: Record<string, any>\n\n /**\n * Optional space IDs for multi-space context\n */\n spaceIds?: string[]\n\n /**\n * Optional macro ID for template execution\n */\n macroId?: string\n}\n\n/**\n * Action result from execution\n */\nexport interface ActionResult {\n /**\n * Whether the action was successful\n */\n success: boolean\n\n /**\n * Result data (if successful)\n */\n data?: any\n\n /**\n * Error message (if failed)\n */\n error?: string\n\n /**\n * Execution timestamp\n */\n timestamp: string\n\n /**\n * Tool that was executed\n */\n toolName: string\n}\n\n/**\n * Context value interface\n */\nexport interface MCPActionContextValue {\n /**\n * Execute an MCP action\n */\n executeAction: (request: ActionRequest) => Promise<ActionResult>\n\n /**\n * Currently available tools (from MCP server)\n */\n availableTools: Accessor<string[]>\n\n /**\n * Space IDs in current context\n */\n spaceIds: Accessor<string[]>\n\n /**\n * Current macro ID (if executing within a template)\n */\n macroId: Accessor<string | undefined>\n\n /**\n * Whether an action is currently executing\n */\n isExecuting: Accessor<boolean>\n\n /**\n * Last action result\n */\n lastResult: Accessor<ActionResult | undefined>\n}\n\n/**\n * Props for MCPActionProvider\n */\nexport interface MCPActionProviderProps {\n /**\n * Space IDs for multi-space queries\n */\n spaceIds?: string[]\n\n /**\n * Macro ID when executing within a template\n */\n macroId?: string\n\n /**\n * Available MCP tools\n */\n availableTools?: string[]\n\n /**\n * Callback for action execution (for audit logging)\n */\n onAction?: (request: ActionRequest, result: ActionResult) => void\n\n /**\n * Callback for webhook events (n8n, Zapier integration)\n */\n onWebhook?: (event: { type: string; payload: any }) => void\n\n /**\n * Custom action executor (override default)\n */\n executor?: (request: ActionRequest) => Promise<ActionResult>\n}\n\n// Create the context with undefined default\nconst MCPActionContext = createContext<MCPActionContextValue>()\n\n/**\n * Default action executor using CustomEvent fallback\n * This maintains backward compatibility while allowing Context-based usage\n */\nconst defaultExecutor = async (request: ActionRequest): Promise<ActionResult> => {\n return new Promise((resolve) => {\n const timestamp = new Date().toISOString()\n\n // Dispatch CustomEvent for backward compatibility with existing listeners\n if (typeof window !== 'undefined') {\n const event = new CustomEvent('mcp-action', {\n detail: {\n toolName: request.toolName,\n params: request.params || {},\n spaceIds: request.spaceIds,\n macroId: request.macroId,\n },\n bubbles: true,\n })\n\n // Listen for response event\n const responseHandler = (e: Event) => {\n const customEvent = e as CustomEvent\n window.removeEventListener('mcp-action-response', responseHandler)\n resolve({\n success: customEvent.detail?.success ?? true,\n data: customEvent.detail?.data,\n error: customEvent.detail?.error,\n timestamp,\n toolName: request.toolName,\n })\n }\n\n window.addEventListener('mcp-action-response', responseHandler)\n window.dispatchEvent(event)\n\n // Timeout fallback - resolve as success if no response in 100ms\n // (indicates no listener, action was dispatched)\n setTimeout(() => {\n window.removeEventListener('mcp-action-response', responseHandler)\n resolve({\n success: true,\n data: { dispatched: true },\n timestamp,\n toolName: request.toolName,\n })\n }, 100)\n } else {\n // Server-side: return immediately\n resolve({\n success: false,\n error: 'Actions not available server-side',\n timestamp,\n toolName: request.toolName,\n })\n }\n })\n}\n\n/**\n * MCPActionProvider - Provides action execution context to child components\n *\n * @example\n * ```tsx\n * <MCPActionProvider\n * spaceIds={['space-123']}\n * macroId=\"sales_overview\"\n * onAction={(req, res) => audit(req, res)}\n * >\n * <UIResourceRenderer layout={layout} />\n * </MCPActionProvider>\n * ```\n */\nexport const MCPActionProvider: ParentComponent<MCPActionProviderProps> = (props) => {\n const [isExecuting, setIsExecuting] = createSignal(false)\n const [lastResult, setLastResult] = createSignal<ActionResult>()\n const [spaceIds, setSpaceIds] = createSignal<string[]>(props.spaceIds || [])\n const [macroId, setMacroId] = createSignal<string | undefined>(props.macroId)\n const [availableTools, setAvailableTools] = createSignal<string[]>(props.availableTools || [])\n\n // Update signals when props change\n // Note: This is a simple approach; for more complex scenarios, consider createEffect\n\n const executeAction = async (request: ActionRequest): Promise<ActionResult> => {\n setIsExecuting(true)\n\n try {\n // Enrich request with context\n const enrichedRequest: ActionRequest = {\n ...request,\n spaceIds: request.spaceIds || spaceIds(),\n macroId: request.macroId || macroId(),\n }\n\n // Execute using custom executor or default\n const executor = props.executor || defaultExecutor\n const result = await executor(enrichedRequest)\n\n setLastResult(result)\n\n // Call audit callback if provided\n props.onAction?.(enrichedRequest, result)\n\n // Trigger webhook if provided and action was successful\n if (result.success && props.onWebhook) {\n props.onWebhook({\n type: 'action-completed',\n payload: {\n request: enrichedRequest,\n result,\n },\n })\n }\n\n return result\n } catch (error) {\n const errorResult: ActionResult = {\n success: false,\n error: error instanceof Error ? error.message : 'Unknown error',\n timestamp: new Date().toISOString(),\n toolName: request.toolName,\n }\n\n setLastResult(errorResult)\n props.onAction?.(request, errorResult)\n\n return errorResult\n } finally {\n setIsExecuting(false)\n }\n }\n\n const contextValue: MCPActionContextValue = {\n executeAction,\n availableTools,\n spaceIds,\n macroId,\n isExecuting,\n lastResult,\n }\n\n return (\n <MCPActionContext.Provider value={contextValue}>\n {props.children}\n </MCPActionContext.Provider>\n )\n}\n\n/**\n * Hook to access MCP action context\n * Throws if used outside of MCPActionProvider\n *\n * @example\n * ```tsx\n * const { executeAction, isExecuting } = useMCPAction()\n *\n * const handleClick = async () => {\n * const result = await executeAction({\n * toolName: 'search.hub',\n * params: { query: 'revenue Q4' },\n * })\n * }\n * ```\n */\nexport function useMCPAction(): MCPActionContextValue {\n const context = useContext(MCPActionContext)\n if (!context) {\n throw new Error('useMCPAction must be used within an MCPActionProvider')\n }\n return context\n}\n\n/**\n * Hook to access MCP action context with fallback for components\n * outside of provider (uses CustomEvent fallback)\n *\n * @example\n * ```tsx\n * const { executeAction, isExecuting } = useMCPActionSafe()\n * // Works even without MCPActionProvider\n * ```\n */\nexport function useMCPActionSafe(): MCPActionContextValue {\n const context = useContext(MCPActionContext)\n\n if (context) {\n return context\n }\n\n // Fallback implementation for components outside provider\n const [isExecuting, setIsExecuting] = createSignal(false)\n const [lastResult, setLastResult] = createSignal<ActionResult>()\n\n const executeAction = async (request: ActionRequest): Promise<ActionResult> => {\n setIsExecuting(true)\n try {\n const result = await defaultExecutor(request)\n setLastResult(result)\n return result\n } finally {\n setIsExecuting(false)\n }\n }\n\n return {\n executeAction,\n availableTools: () => [],\n spaceIds: () => [],\n macroId: () => undefined,\n isExecuting,\n lastResult,\n }\n}\n\nexport { MCPActionContext }\n"],"names":["MCPActionContext","createContext","defaultExecutor","request","Promise","resolve","timestamp","Date","toISOString","window","event","CustomEvent","detail","toolName","params","spaceIds","macroId","bubbles","responseHandler","e","customEvent","removeEventListener","success","data","error","addEventListener","dispatchEvent","setTimeout","dispatched","MCPActionProvider","props","isExecuting","setIsExecuting","createSignal","lastResult","setLastResult","setSpaceIds","setMacroId","availableTools","setAvailableTools","executeAction","enrichedRequest","executor","result","onAction","onWebhook","type","payload","errorResult","Error","message","contextValue","_$createComponent","Provider","value","children","useMCPAction","context","useContext","useMCPActionSafe","undefined"],"mappings":";;AAqIA,MAAMA,mBAAmBC,cAAAA;AAMzB,MAAMC,kBAAkB,OAAOC,Y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AAAA,IACAvB;AAAAA,IACAC;AAAAA,IACAe;AAAAA,IACAG;AAAAA,EAAAA;AAGF,SAAAkB,gBACGpD,iBAAiBqD,UAAQ;AAAA,IAACC,OAAOH;AAAAA,IAAY,IAAAI,WAAA;AAAA,aAC3CzB,MAAMyB;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB;AAkBO,SAASC,eAAsC;AACpD,QAAMC,UAAUC,WAAW1D,gBAAgB;AAC3C,MAAI,CAACyD,SAAS;AACZ,UAAM,IAAIR,MAAM,uDAAuD;AAAA,EACzE;AACA,SAAOQ;AACT;AAYO,SAASE,mBAA0C;AACxD,QAAMF,UAAUC,WAAW1D,gBAAgB;AAE3C,MAAIyD,SAAS;AACX,WAAOA;AAAAA,EACT;AAGA,QAAM,CAAC1B,aAAaC,cAAc,IAAIC,aAAa,KAAK;AACxD,QAAM,CAACC,YAAYC,aAAa,IAAIF,aAAAA;AAEpC,QAAMO,gBAAgB,OAAOrC,YAAkD;AAC7E6B,mBAAe,IAAI;AACnB,QAAI;AACF,YAAMW,SAAS,MAAMzC,gBAAgBC,OAAO;AAC5CgC,oBAAcQ,MAAM;AACpB,aAAOA;AAAAA,IACT,UAAA;AACEX,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF;AAEA,SAAO;AAAA,IACLQ;AAAAA,IACAF,gBAAgBA,MAAM,CAAA;AAAA,IACtBvB,UAAUA,MAAM,CAAA;AAAA,IAChBC,SAASA,MAAM4C;AAAAA,IACf7B;AAAAA,IACAG;AAAAA,EAAAA;AAEJ;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP UI Solid - Context Providers
|
|
3
|
+
*
|
|
4
|
+
* Context providers for action execution and state management
|
|
5
|
+
*/
|
|
6
|
+
export { MCPActionProvider, MCPActionContext, useMCPAction, useMCPActionSafe, } from './MCPActionContext';
|
|
7
|
+
export type { MCPActionContextValue, MCPActionProviderProps, ActionRequest, ActionResult, } from './MCPActionContext';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,GACb,MAAM,oBAAoB,CAAA"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { useStreamingUI } from './useStreamingUI';
|
|
7
7
|
export type { UseStreamingUIOptions, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from './useStreamingUI';
|
|
8
|
+
export { useAction, useToolAction } from './useAction';
|
|
9
|
+
export type { UseActionReturn, ActionRequest, ActionResult } from './useAction';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const solidJs = require("solid-js");
|
|
4
|
+
const MCPActionContext = require("../context/MCPActionContext.cjs");
|
|
5
|
+
function useAction() {
|
|
6
|
+
const context = MCPActionContext.useMCPActionSafe();
|
|
7
|
+
const [lastError, setLastError] = solidJs.createSignal();
|
|
8
|
+
const execute = async (toolName, params) => {
|
|
9
|
+
setLastError(void 0);
|
|
10
|
+
const result = await context.executeAction({
|
|
11
|
+
toolName,
|
|
12
|
+
params
|
|
13
|
+
});
|
|
14
|
+
if (!result.success && result.error) {
|
|
15
|
+
setLastError(result.error);
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const executeAction = async (request) => {
|
|
20
|
+
setLastError(void 0);
|
|
21
|
+
const result = await context.executeAction(request);
|
|
22
|
+
if (!result.success && result.error) {
|
|
23
|
+
setLastError(result.error);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
execute,
|
|
29
|
+
executeAction,
|
|
30
|
+
isExecuting: context.isExecuting,
|
|
31
|
+
lastResult: context.lastResult,
|
|
32
|
+
lastError
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function useToolAction(toolName) {
|
|
36
|
+
const { execute: baseExecute, isExecuting, lastResult, lastError } = useAction();
|
|
37
|
+
const execute = async (params) => {
|
|
38
|
+
return baseExecute(toolName, params);
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
execute,
|
|
42
|
+
isExecuting,
|
|
43
|
+
lastResult,
|
|
44
|
+
lastError
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
exports.useAction = useAction;
|
|
48
|
+
exports.useToolAction = useToolAction;
|
|
49
|
+
//# sourceMappingURL=useAction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAction.cjs","sources":["../../src/hooks/useAction.ts"],"sourcesContent":["/**\n * useAction - Hook for executing MCP actions from components\n * Phase 5.0: Quick Wins - Simplified API for ActionRenderer and custom components\n */\n\nimport { createSignal, Accessor } from 'solid-js'\nimport { useMCPActionSafe, ActionRequest, ActionResult } from '../context/MCPActionContext'\n\n/**\n * Return type for useAction hook\n */\nexport interface UseActionReturn {\n /**\n * Execute a tool action\n */\n execute: (toolName: string, params?: Record<string, any>) => Promise<ActionResult>\n\n /**\n * Full execute with ActionRequest\n */\n executeAction: (request: ActionRequest) => Promise<ActionResult>\n\n /**\n * Whether an action is currently executing\n */\n isExecuting: Accessor<boolean>\n\n /**\n * Last result from action execution\n */\n lastResult: Accessor<ActionResult | undefined>\n\n /**\n * Last error (if any)\n */\n lastError: Accessor<string | undefined>\n}\n\n/**\n * Hook for executing MCP actions\n *\n * @example\n * ```tsx\n * function MyButton() {\n * const { execute, isExecuting, lastError } = useAction()\n *\n * const handleClick = async () => {\n * const result = await execute('search.hub', { query: 'test' })\n * if (result.success) {\n * console.log('Data:', result.data)\n * }\n * }\n *\n * return (\n * <button onClick={handleClick} disabled={isExecuting()}>\n * {isExecuting() ? 'Loading...' : 'Search'}\n * </button>\n * )\n * }\n * ```\n */\nexport function useAction(): UseActionReturn {\n const context = useMCPActionSafe()\n const [lastError, setLastError] = createSignal<string>()\n\n const execute = async (toolName: string, params?: Record<string, any>): Promise<ActionResult> => {\n setLastError(undefined)\n\n const result = await context.executeAction({\n toolName,\n params,\n })\n\n if (!result.success && result.error) {\n setLastError(result.error)\n }\n\n return result\n }\n\n const executeAction = async (request: ActionRequest): Promise<ActionResult> => {\n setLastError(undefined)\n\n const result = await context.executeAction(request)\n\n if (!result.success && result.error) {\n setLastError(result.error)\n }\n\n return result\n }\n\n return {\n execute,\n executeAction,\n isExecuting: context.isExecuting,\n lastResult: context.lastResult,\n lastError,\n }\n}\n\n/**\n * Hook for binding action to a specific tool\n *\n * @example\n * ```tsx\n * function SearchButton() {\n * const { execute, isExecuting } = useToolAction('search.hub')\n *\n * return (\n * <button onClick={() => execute({ query: 'test' })} disabled={isExecuting()}>\n * Search\n * </button>\n * )\n * }\n * ```\n */\nexport function useToolAction(toolName: string): {\n execute: (params?: Record<string, any>) => Promise<ActionResult>\n isExecuting: Accessor<boolean>\n lastResult: Accessor<ActionResult | undefined>\n lastError: Accessor<string | undefined>\n} {\n const { execute: baseExecute, isExecuting, lastResult, lastError } = useAction()\n\n const execute = async (params?: Record<string, any>): Promise<ActionResult> => {\n return baseExecute(toolName, params)\n }\n\n return {\n execute,\n isExecuting,\n lastResult,\n lastError,\n }\n}\n\nexport type { ActionRequest, ActionResult }\n"],"names":["useMCPActionSafe","createSignal"],"mappings":";;;;AA6DO,SAAS,YAA6B;AAC3C,QAAM,UAAUA,iBAAAA,iBAAA;AAChB,QAAM,CAAC,WAAW,YAAY,IAAIC,qBAAA;AAElC,QAAM,UAAU,OAAO,UAAkB,WAAwD;AAC/F,iBAAa,MAAS;AAEtB,UAAM,SAAS,MAAM,QAAQ,cAAc;AAAA,MACzC;AAAA,MACA;AAAA,IAAA,CACD;AAED,QAAI,CAAC,OAAO,WAAW,OAAO,OAAO;AACnC,mBAAa,OAAO,KAAK;AAAA,IAC3B;AAEA,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,OAAO,YAAkD;AAC7E,iBAAa,MAAS;AAEtB,UAAM,SAAS,MAAM,QAAQ,cAAc,OAAO;AAElD,QAAI,CAAC,OAAO,WAAW,OAAO,OAAO;AACnC,mBAAa,OAAO,KAAK;AAAA,IAC3B;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,aAAa,QAAQ;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB;AAAA,EAAA;AAEJ;AAkBO,SAAS,cAAc,UAK5B;AACA,QAAM,EAAE,SAAS,aAAa,aAAa,YAAY,UAAA,IAAc,UAAA;AAErE,QAAM,UAAU,OAAO,WAAwD;AAC7E,WAAO,YAAY,UAAU,MAAM;AAAA,EACrC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;;;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useAction - Hook for executing MCP actions from components
|
|
3
|
+
* Phase 5.0: Quick Wins - Simplified API for ActionRenderer and custom components
|
|
4
|
+
*/
|
|
5
|
+
import { Accessor } from 'solid-js';
|
|
6
|
+
import { ActionRequest, ActionResult } from '../context/MCPActionContext';
|
|
7
|
+
/**
|
|
8
|
+
* Return type for useAction hook
|
|
9
|
+
*/
|
|
10
|
+
export interface UseActionReturn {
|
|
11
|
+
/**
|
|
12
|
+
* Execute a tool action
|
|
13
|
+
*/
|
|
14
|
+
execute: (toolName: string, params?: Record<string, any>) => Promise<ActionResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Full execute with ActionRequest
|
|
17
|
+
*/
|
|
18
|
+
executeAction: (request: ActionRequest) => Promise<ActionResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether an action is currently executing
|
|
21
|
+
*/
|
|
22
|
+
isExecuting: Accessor<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Last result from action execution
|
|
25
|
+
*/
|
|
26
|
+
lastResult: Accessor<ActionResult | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Last error (if any)
|
|
29
|
+
*/
|
|
30
|
+
lastError: Accessor<string | undefined>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Hook for executing MCP actions
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* function MyButton() {
|
|
38
|
+
* const { execute, isExecuting, lastError } = useAction()
|
|
39
|
+
*
|
|
40
|
+
* const handleClick = async () => {
|
|
41
|
+
* const result = await execute('search.hub', { query: 'test' })
|
|
42
|
+
* if (result.success) {
|
|
43
|
+
* console.log('Data:', result.data)
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* return (
|
|
48
|
+
* <button onClick={handleClick} disabled={isExecuting()}>
|
|
49
|
+
* {isExecuting() ? 'Loading...' : 'Search'}
|
|
50
|
+
* </button>
|
|
51
|
+
* )
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function useAction(): UseActionReturn;
|
|
56
|
+
/**
|
|
57
|
+
* Hook for binding action to a specific tool
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* function SearchButton() {
|
|
62
|
+
* const { execute, isExecuting } = useToolAction('search.hub')
|
|
63
|
+
*
|
|
64
|
+
* return (
|
|
65
|
+
* <button onClick={() => execute({ query: 'test' })} disabled={isExecuting()}>
|
|
66
|
+
* Search
|
|
67
|
+
* </button>
|
|
68
|
+
* )
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function useToolAction(toolName: string): {
|
|
73
|
+
execute: (params?: Record<string, any>) => Promise<ActionResult>;
|
|
74
|
+
isExecuting: Accessor<boolean>;
|
|
75
|
+
lastResult: Accessor<ActionResult | undefined>;
|
|
76
|
+
lastError: Accessor<string | undefined>;
|
|
77
|
+
};
|
|
78
|
+
export type { ActionRequest, ActionResult };
|
|
79
|
+
//# sourceMappingURL=useAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAction.d.ts","sourceRoot":"","sources":["../../src/hooks/useAction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAoB,aAAa,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE3F;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;IAElF;;OAEG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;IAEhE;;OAEG;IACH,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;IAE9C;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,IAAI,eAAe,CAsC3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC/C,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;IAChE,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9B,UAAU,EAAE,QAAQ,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;IAC9C,SAAS,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACxC,CAaA;AAED,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createSignal } from "solid-js";
|
|
2
|
+
import { useMCPActionSafe } from "../context/MCPActionContext.js";
|
|
3
|
+
function useAction() {
|
|
4
|
+
const context = useMCPActionSafe();
|
|
5
|
+
const [lastError, setLastError] = createSignal();
|
|
6
|
+
const execute = async (toolName, params) => {
|
|
7
|
+
setLastError(void 0);
|
|
8
|
+
const result = await context.executeAction({
|
|
9
|
+
toolName,
|
|
10
|
+
params
|
|
11
|
+
});
|
|
12
|
+
if (!result.success && result.error) {
|
|
13
|
+
setLastError(result.error);
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
const executeAction = async (request) => {
|
|
18
|
+
setLastError(void 0);
|
|
19
|
+
const result = await context.executeAction(request);
|
|
20
|
+
if (!result.success && result.error) {
|
|
21
|
+
setLastError(result.error);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
execute,
|
|
27
|
+
executeAction,
|
|
28
|
+
isExecuting: context.isExecuting,
|
|
29
|
+
lastResult: context.lastResult,
|
|
30
|
+
lastError
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function useToolAction(toolName) {
|
|
34
|
+
const { execute: baseExecute, isExecuting, lastResult, lastError } = useAction();
|
|
35
|
+
const execute = async (params) => {
|
|
36
|
+
return baseExecute(toolName, params);
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
execute,
|
|
40
|
+
isExecuting,
|
|
41
|
+
lastResult,
|
|
42
|
+
lastError
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
useAction,
|
|
47
|
+
useToolAction
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=useAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAction.js","sources":["../../src/hooks/useAction.ts"],"sourcesContent":["/**\n * useAction - Hook for executing MCP actions from components\n * Phase 5.0: Quick Wins - Simplified API for ActionRenderer and custom components\n */\n\nimport { createSignal, Accessor } from 'solid-js'\nimport { useMCPActionSafe, ActionRequest, ActionResult } from '../context/MCPActionContext'\n\n/**\n * Return type for useAction hook\n */\nexport interface UseActionReturn {\n /**\n * Execute a tool action\n */\n execute: (toolName: string, params?: Record<string, any>) => Promise<ActionResult>\n\n /**\n * Full execute with ActionRequest\n */\n executeAction: (request: ActionRequest) => Promise<ActionResult>\n\n /**\n * Whether an action is currently executing\n */\n isExecuting: Accessor<boolean>\n\n /**\n * Last result from action execution\n */\n lastResult: Accessor<ActionResult | undefined>\n\n /**\n * Last error (if any)\n */\n lastError: Accessor<string | undefined>\n}\n\n/**\n * Hook for executing MCP actions\n *\n * @example\n * ```tsx\n * function MyButton() {\n * const { execute, isExecuting, lastError } = useAction()\n *\n * const handleClick = async () => {\n * const result = await execute('search.hub', { query: 'test' })\n * if (result.success) {\n * console.log('Data:', result.data)\n * }\n * }\n *\n * return (\n * <button onClick={handleClick} disabled={isExecuting()}>\n * {isExecuting() ? 'Loading...' : 'Search'}\n * </button>\n * )\n * }\n * ```\n */\nexport function useAction(): UseActionReturn {\n const context = useMCPActionSafe()\n const [lastError, setLastError] = createSignal<string>()\n\n const execute = async (toolName: string, params?: Record<string, any>): Promise<ActionResult> => {\n setLastError(undefined)\n\n const result = await context.executeAction({\n toolName,\n params,\n })\n\n if (!result.success && result.error) {\n setLastError(result.error)\n }\n\n return result\n }\n\n const executeAction = async (request: ActionRequest): Promise<ActionResult> => {\n setLastError(undefined)\n\n const result = await context.executeAction(request)\n\n if (!result.success && result.error) {\n setLastError(result.error)\n }\n\n return result\n }\n\n return {\n execute,\n executeAction,\n isExecuting: context.isExecuting,\n lastResult: context.lastResult,\n lastError,\n }\n}\n\n/**\n * Hook for binding action to a specific tool\n *\n * @example\n * ```tsx\n * function SearchButton() {\n * const { execute, isExecuting } = useToolAction('search.hub')\n *\n * return (\n * <button onClick={() => execute({ query: 'test' })} disabled={isExecuting()}>\n * Search\n * </button>\n * )\n * }\n * ```\n */\nexport function useToolAction(toolName: string): {\n execute: (params?: Record<string, any>) => Promise<ActionResult>\n isExecuting: Accessor<boolean>\n lastResult: Accessor<ActionResult | undefined>\n lastError: Accessor<string | undefined>\n} {\n const { execute: baseExecute, isExecuting, lastResult, lastError } = useAction()\n\n const execute = async (params?: Record<string, any>): Promise<ActionResult> => {\n return baseExecute(toolName, params)\n }\n\n return {\n execute,\n isExecuting,\n lastResult,\n lastError,\n }\n}\n\nexport type { ActionRequest, ActionResult }\n"],"names":[],"mappings":";;AA6DO,SAAS,YAA6B;AAC3C,QAAM,UAAU,iBAAA;AAChB,QAAM,CAAC,WAAW,YAAY,IAAI,aAAA;AAElC,QAAM,UAAU,OAAO,UAAkB,WAAwD;AAC/F,iBAAa,MAAS;AAEtB,UAAM,SAAS,MAAM,QAAQ,cAAc;AAAA,MACzC;AAAA,MACA;AAAA,IAAA,CACD;AAED,QAAI,CAAC,OAAO,WAAW,OAAO,OAAO;AACnC,mBAAa,OAAO,KAAK;AAAA,IAC3B;AAEA,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,OAAO,YAAkD;AAC7E,iBAAa,MAAS;AAEtB,UAAM,SAAS,MAAM,QAAQ,cAAc,OAAO;AAElD,QAAI,CAAC,OAAO,WAAW,OAAO,OAAO;AACnC,mBAAa,OAAO,KAAK;AAAA,IAC3B;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,aAAa,QAAQ;AAAA,IACrB,YAAY,QAAQ;AAAA,IACpB;AAAA,EAAA;AAEJ;AAkBO,SAAS,cAAc,UAK5B;AACA,QAAM,EAAE,SAAS,aAAa,aAAa,YAAY,UAAA,IAAc,UAAA;AAErE,QAAM,UAAU,OAAO,WAAwD;AAC7E,WAAO,YAAY,UAAU,MAAM;AAAA,EACrC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
package/dist/hooks.cjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const useStreamingUI = require("./hooks/useStreamingUI.cjs");
|
|
4
|
+
const useAction = require("./hooks/useAction.cjs");
|
|
4
5
|
exports.useStreamingUI = useStreamingUI.useStreamingUI;
|
|
6
|
+
exports.useAction = useAction.useAction;
|
|
7
|
+
exports.useToolAction = useAction.useToolAction;
|
|
5
8
|
//# sourceMappingURL=hooks.cjs.map
|
package/dist/hooks.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/hooks.d.ts
CHANGED
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { useStreamingUI } from './useStreamingUI';
|
|
7
7
|
export type { UseStreamingUIOptions, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from './useStreamingUI';
|
|
8
|
+
export { useAction, useToolAction } from './useAction';
|
|
9
|
+
export type { UseActionReturn, ActionRequest, ActionResult } from './useAction';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/hooks.js
CHANGED
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.cjs
CHANGED
|
@@ -4,12 +4,20 @@ const UIResourceRenderer = require("./components/UIResourceRenderer.cjs");
|
|
|
4
4
|
const StreamingUIRenderer = require("./components/StreamingUIRenderer.cjs");
|
|
5
5
|
const GenerativeUIErrorBoundary = require("./components/GenerativeUIErrorBoundary.cjs");
|
|
6
6
|
const useStreamingUI = require("./hooks/useStreamingUI.cjs");
|
|
7
|
+
const useAction = require("./hooks/useAction.cjs");
|
|
8
|
+
const MCPActionContext = require("./context/MCPActionContext.cjs");
|
|
7
9
|
const validation = require("./services/validation.cjs");
|
|
8
10
|
const componentRegistry = require("./services/component-registry.cjs");
|
|
9
11
|
exports.UIResourceRenderer = UIResourceRenderer.UIResourceRenderer;
|
|
10
12
|
exports.StreamingUIRenderer = StreamingUIRenderer.StreamingUIRenderer;
|
|
11
13
|
exports.GenerativeUIErrorBoundary = GenerativeUIErrorBoundary.GenerativeUIErrorBoundary;
|
|
12
14
|
exports.useStreamingUI = useStreamingUI.useStreamingUI;
|
|
15
|
+
exports.useAction = useAction.useAction;
|
|
16
|
+
exports.useToolAction = useAction.useToolAction;
|
|
17
|
+
exports.MCPActionContext = MCPActionContext.MCPActionContext;
|
|
18
|
+
exports.MCPActionProvider = MCPActionContext.MCPActionProvider;
|
|
19
|
+
exports.useMCPAction = MCPActionContext.useMCPAction;
|
|
20
|
+
exports.useMCPActionSafe = MCPActionContext.useMCPActionSafe;
|
|
13
21
|
exports.DEFAULT_RESOURCE_LIMITS = validation.DEFAULT_RESOURCE_LIMITS;
|
|
14
22
|
exports.validateComponent = validation.validateComponent;
|
|
15
23
|
exports.validateLayout = validation.validateLayout;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
*/
|
|
30
30
|
export { UIResourceRenderer, StreamingUIRenderer, GenerativeUIErrorBoundary } from './components';
|
|
31
31
|
export type { UIResourceRendererProps, StreamingUIRendererProps, GenerativeUIErrorBoundaryProps, } from './components';
|
|
32
|
-
export { useStreamingUI } from './hooks';
|
|
33
|
-
export type { UseStreamingUIOptions, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, } from './hooks';
|
|
34
|
-
export
|
|
32
|
+
export { useStreamingUI, useAction, useToolAction } from './hooks';
|
|
33
|
+
export type { UseStreamingUIOptions, StreamingUIState, StreamProgress, StreamError, CompleteMetadata, UseActionReturn, } from './hooks';
|
|
34
|
+
export { MCPActionProvider, MCPActionContext, useMCPAction, useMCPActionSafe } from './context';
|
|
35
|
+
export type { MCPActionContextValue, MCPActionProviderProps, ActionRequest, ActionResult, } from './context';
|
|
36
|
+
export type { UIComponent, UILayout, GridPosition, ComponentType, RendererError, ChartComponentParams, TableComponentParams, MetricComponentParams, TextComponentParams, ActionComponentParams, GridComponentParams, } from './types';
|
|
35
37
|
export { validateComponent, validateLayout, DEFAULT_RESOURCE_LIMITS, ComponentRegistry, } from './services';
|
|
36
38
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAEjG,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAEjG,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAElE,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE/F,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAA;AAGlB,YAAY,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2,15 +2,23 @@ import { UIResourceRenderer } from "./components/UIResourceRenderer.js";
|
|
|
2
2
|
import { StreamingUIRenderer } from "./components/StreamingUIRenderer.js";
|
|
3
3
|
import { GenerativeUIErrorBoundary } from "./components/GenerativeUIErrorBoundary.js";
|
|
4
4
|
import { useStreamingUI } from "./hooks/useStreamingUI.js";
|
|
5
|
+
import { useAction, useToolAction } from "./hooks/useAction.js";
|
|
6
|
+
import { MCPActionContext, MCPActionProvider, useMCPAction, useMCPActionSafe } from "./context/MCPActionContext.js";
|
|
5
7
|
import { DEFAULT_RESOURCE_LIMITS, validateComponent, validateLayout } from "./services/validation.js";
|
|
6
8
|
import { ComponentRegistry } from "./services/component-registry.js";
|
|
7
9
|
export {
|
|
8
10
|
ComponentRegistry,
|
|
9
11
|
DEFAULT_RESOURCE_LIMITS,
|
|
10
12
|
GenerativeUIErrorBoundary,
|
|
13
|
+
MCPActionContext,
|
|
14
|
+
MCPActionProvider,
|
|
11
15
|
StreamingUIRenderer,
|
|
12
16
|
UIResourceRenderer,
|
|
17
|
+
useAction,
|
|
18
|
+
useMCPAction,
|
|
19
|
+
useMCPActionSafe,
|
|
13
20
|
useStreamingUI,
|
|
21
|
+
useToolAction,
|
|
14
22
|
validateComponent,
|
|
15
23
|
validateLayout
|
|
16
24
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Component types supported by the renderer
|
|
9
9
|
*/
|
|
10
|
-
export type ComponentType = 'chart' | 'table' | 'metric' | 'text' | 'grid' | 'iframe' | 'image' | 'link' | 'action';
|
|
10
|
+
export type ComponentType = 'chart' | 'table' | 'metric' | 'text' | 'grid' | 'iframe' | 'image' | 'link' | 'action' | 'footer' | 'carousel' | 'artifact';
|
|
11
11
|
/**
|
|
12
12
|
* Chart types (powered by Quickchart)
|
|
13
13
|
*/
|
|
@@ -133,6 +133,33 @@ export interface ActionComponentParams {
|
|
|
133
133
|
icon?: string;
|
|
134
134
|
disabled?: boolean;
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Grid component parameters (Phase 5.0)
|
|
138
|
+
* Enables nested CSS Grid layouts for template builder
|
|
139
|
+
*/
|
|
140
|
+
export interface GridComponentParams {
|
|
141
|
+
/**
|
|
142
|
+
* Number of columns (default: 12)
|
|
143
|
+
*/
|
|
144
|
+
columns?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Gap between grid items (default: '1rem')
|
|
147
|
+
*/
|
|
148
|
+
gap?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Minimum row height (optional)
|
|
151
|
+
*/
|
|
152
|
+
minRowHeight?: string;
|
|
153
|
+
/**
|
|
154
|
+
* CSS Grid template areas for named regions
|
|
155
|
+
* Example: [['header', 'header'], ['sidebar', 'main'], ['footer', 'footer']]
|
|
156
|
+
*/
|
|
157
|
+
areas?: string[][];
|
|
158
|
+
/**
|
|
159
|
+
* Child components to render within the grid
|
|
160
|
+
*/
|
|
161
|
+
children: UIComponent[];
|
|
162
|
+
}
|
|
136
163
|
/**
|
|
137
164
|
* UI Component definition (generated by LLM)
|
|
138
165
|
*/
|
|
@@ -152,7 +179,7 @@ export interface UIComponent {
|
|
|
152
179
|
/**
|
|
153
180
|
* Component parameters (type-specific)
|
|
154
181
|
*/
|
|
155
|
-
params: ChartComponentParams | TableComponentParams | MetricComponentParams | TextComponentParams | ActionComponentParams;
|
|
182
|
+
params: ChartComponentParams | TableComponentParams | MetricComponentParams | TextComponentParams | ActionComponentParams | GridComponentParams;
|
|
156
183
|
/**
|
|
157
184
|
* Metadata for observability
|
|
158
185
|
*/
|
|
@@ -191,6 +218,18 @@ export interface UILayout {
|
|
|
191
218
|
generatedAt: string;
|
|
192
219
|
llmModel?: string;
|
|
193
220
|
totalComponents: number;
|
|
221
|
+
/**
|
|
222
|
+
* Execution time in milliseconds (Phase 5.0)
|
|
223
|
+
*/
|
|
224
|
+
executionTime?: number;
|
|
225
|
+
/**
|
|
226
|
+
* Number of sources used (Phase 5.0)
|
|
227
|
+
*/
|
|
228
|
+
sourceCount?: number;
|
|
229
|
+
/**
|
|
230
|
+
* Hide auto-injected footer (Phase 5.0)
|
|
231
|
+
*/
|
|
232
|
+
hideFooter?: boolean;
|
|
194
233
|
};
|
|
195
234
|
}
|
|
196
235
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,OAAO,GACP,MAAM,GAC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