@frontmcp/react 0.0.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 +201 -0
- package/README.md +263 -0
- package/ai/createToolHandler.d.ts +10 -0
- package/ai/createToolHandler.d.ts.map +1 -0
- package/ai/index.d.ts +7 -0
- package/ai/index.d.ts.map +1 -0
- package/ai/index.js +416 -0
- package/ai/types.d.ts +52 -0
- package/ai/types.d.ts.map +1 -0
- package/ai/useAITools.d.ts +17 -0
- package/ai/useAITools.d.ts.map +1 -0
- package/ai/useTools.d.ts +19 -0
- package/ai/useTools.d.ts.map +1 -0
- package/api/api.types.d.ts +61 -0
- package/api/api.types.d.ts.map +1 -0
- package/api/createFetchClient.d.ts +9 -0
- package/api/createFetchClient.d.ts.map +1 -0
- package/api/index.d.ts +12 -0
- package/api/index.d.ts.map +1 -0
- package/api/index.js +402 -0
- package/api/parseOpenApiSpec.d.ts +9 -0
- package/api/parseOpenApiSpec.d.ts.map +1 -0
- package/api/useApiClient.d.ts +9 -0
- package/api/useApiClient.d.ts.map +1 -0
- package/components/AgentContent.d.ts +30 -0
- package/components/AgentContent.d.ts.map +1 -0
- package/components/AgentSearch.d.ts +35 -0
- package/components/AgentSearch.d.ts.map +1 -0
- package/components/ComponentRegistry.d.ts +36 -0
- package/components/ComponentRegistry.d.ts.map +1 -0
- package/components/DomResources.d.ts +16 -0
- package/components/DomResources.d.ts.map +1 -0
- package/components/DynamicRenderer.d.ts +19 -0
- package/components/DynamicRenderer.d.ts.map +1 -0
- package/components/OutputDisplay.d.ts +11 -0
- package/components/OutputDisplay.d.ts.map +1 -0
- package/components/PromptForm.d.ts +13 -0
- package/components/PromptForm.d.ts.map +1 -0
- package/components/ResourceViewer.d.ts +18 -0
- package/components/ResourceViewer.d.ts.map +1 -0
- package/components/ToolForm.d.ts +16 -0
- package/components/ToolForm.d.ts.map +1 -0
- package/components/index.d.ts +21 -0
- package/components/index.d.ts.map +1 -0
- package/components/mcpComponent.d.ts +48 -0
- package/components/mcpComponent.d.ts.map +1 -0
- package/esm/ai/index.mjs +393 -0
- package/esm/api/index.mjs +379 -0
- package/esm/index.mjs +1814 -0
- package/esm/package.json +111 -0
- package/esm/router/index.mjs +157 -0
- package/esm/state/index.mjs +450 -0
- package/hooks/index.d.ts +21 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/useCallTool.d.ts +9 -0
- package/hooks/useCallTool.d.ts.map +1 -0
- package/hooks/useComponentTree.d.ts +21 -0
- package/hooks/useComponentTree.d.ts.map +1 -0
- package/hooks/useDynamicResource.d.ts +20 -0
- package/hooks/useDynamicResource.d.ts.map +1 -0
- package/hooks/useDynamicTool.d.ts +39 -0
- package/hooks/useDynamicTool.d.ts.map +1 -0
- package/hooks/useFrontMcp.d.ts +8 -0
- package/hooks/useFrontMcp.d.ts.map +1 -0
- package/hooks/useGetPrompt.d.ts +13 -0
- package/hooks/useGetPrompt.d.ts.map +1 -0
- package/hooks/useListPrompts.d.ts +10 -0
- package/hooks/useListPrompts.d.ts.map +1 -0
- package/hooks/useListResources.d.ts +14 -0
- package/hooks/useListResources.d.ts.map +1 -0
- package/hooks/useListTools.d.ts +10 -0
- package/hooks/useListTools.d.ts.map +1 -0
- package/hooks/useReadResource.d.ts +23 -0
- package/hooks/useReadResource.d.ts.map +1 -0
- package/hooks/useResolvedServer.d.ts +16 -0
- package/hooks/useResolvedServer.d.ts.map +1 -0
- package/hooks/useServer.d.ts +17 -0
- package/hooks/useServer.d.ts.map +1 -0
- package/hooks/useStoreResource.d.ts +22 -0
- package/hooks/useStoreResource.d.ts.map +1 -0
- package/index.d.ts +33 -0
- package/index.d.ts.map +1 -0
- package/index.js +1821 -0
- package/package.json +111 -0
- package/provider/FrontMcpContext.d.ts +6 -0
- package/provider/FrontMcpContext.d.ts.map +1 -0
- package/provider/FrontMcpProvider.d.ts +34 -0
- package/provider/FrontMcpProvider.d.ts.map +1 -0
- package/provider/index.d.ts +4 -0
- package/provider/index.d.ts.map +1 -0
- package/registry/DynamicRegistry.d.ts +55 -0
- package/registry/DynamicRegistry.d.ts.map +1 -0
- package/registry/ServerRegistry.d.ts +43 -0
- package/registry/ServerRegistry.d.ts.map +1 -0
- package/registry/createWrappedServer.d.ts +14 -0
- package/registry/createWrappedServer.d.ts.map +1 -0
- package/registry/index.d.ts +5 -0
- package/registry/index.d.ts.map +1 -0
- package/router/current-route.resource.d.ts +11 -0
- package/router/current-route.resource.d.ts.map +1 -0
- package/router/go-back.tool.d.ts +18 -0
- package/router/go-back.tool.d.ts.map +1 -0
- package/router/index.d.ts +9 -0
- package/router/index.d.ts.map +1 -0
- package/router/index.js +180 -0
- package/router/navigate.tool.d.ts +35 -0
- package/router/navigate.tool.d.ts.map +1 -0
- package/router/router-bridge.d.ts +20 -0
- package/router/router-bridge.d.ts.map +1 -0
- package/router/router.entries.d.ts +23 -0
- package/router/router.entries.d.ts.map +1 -0
- package/router/useRouterBridge.d.ts +7 -0
- package/router/useRouterBridge.d.ts.map +1 -0
- package/state/adapters/createStore.d.ts +15 -0
- package/state/adapters/createStore.d.ts.map +1 -0
- package/state/adapters/index.d.ts +7 -0
- package/state/adapters/index.d.ts.map +1 -0
- package/state/adapters/reduxAdapter.d.ts +21 -0
- package/state/adapters/reduxAdapter.d.ts.map +1 -0
- package/state/adapters/valtioAdapter.d.ts +19 -0
- package/state/adapters/valtioAdapter.d.ts.map +1 -0
- package/state/index.d.ts +15 -0
- package/state/index.d.ts.map +1 -0
- package/state/index.js +473 -0
- package/state/state.types.d.ts +48 -0
- package/state/state.types.d.ts.map +1 -0
- package/state/useReduxResource.d.ts +8 -0
- package/state/useReduxResource.d.ts.map +1 -0
- package/state/useStoreRegistration.d.ts +14 -0
- package/state/useStoreRegistration.d.ts.map +1 -0
- package/state/useStoreResource.d.ts +10 -0
- package/state/useStoreResource.d.ts.map +1 -0
- package/state/useValtioResource.d.ts +9 -0
- package/state/useValtioResource.d.ts.map +1 -0
- package/types.d.ts +127 -0
- package/types.d.ts.map +1 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/zodToJsonSchema.d.ts +9 -0
- package/utils/zodToJsonSchema.d.ts.map +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useValtioResource — thin wrapper around useStoreResource for Valtio proxies.
|
|
3
|
+
*
|
|
4
|
+
* The user must pass valtio's `subscribe` function since it's an optional peer dep.
|
|
5
|
+
* Deep path selectors use dot notation (e.g., 'user.profile.name').
|
|
6
|
+
*/
|
|
7
|
+
import type { ValtioResourceOptions } from './state.types';
|
|
8
|
+
export declare function useValtioResource(options: ValtioResourceOptions): void;
|
|
9
|
+
//# sourceMappingURL=useValtioResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValtioResource.d.ts","sourceRoot":"","sources":["../../src/state/useValtioResource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAY3D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAqCtE"}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types for @frontmcp/react
|
|
3
|
+
*/
|
|
4
|
+
import type React from 'react';
|
|
5
|
+
import type { DirectMcpServer, DirectClient, CallToolResult, ReadResourceResult } from '@frontmcp/sdk';
|
|
6
|
+
import type { ComponentRegistry } from './components/ComponentRegistry';
|
|
7
|
+
import type { DynamicRegistry } from './registry/DynamicRegistry';
|
|
8
|
+
export interface ToolInfo {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
inputSchema?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface ResourceInfo {
|
|
14
|
+
uri: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
mimeType?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ResourceTemplateInfo {
|
|
20
|
+
uriTemplate: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
mimeType?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PromptInfo {
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
arguments?: Array<{
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
export type FrontMcpStatus = 'idle' | 'connecting' | 'connected' | 'error';
|
|
35
|
+
export interface FrontMcpContextValue {
|
|
36
|
+
name: string;
|
|
37
|
+
registry: ComponentRegistry;
|
|
38
|
+
dynamicRegistry: DynamicRegistry;
|
|
39
|
+
getDynamicRegistry: (server?: string) => DynamicRegistry;
|
|
40
|
+
connect: () => Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export interface DynamicToolDef {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
inputSchema: Record<string, unknown>;
|
|
46
|
+
execute: (args: Record<string, unknown>) => Promise<CallToolResult>;
|
|
47
|
+
}
|
|
48
|
+
export interface DynamicResourceDef {
|
|
49
|
+
uri: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
mimeType?: string;
|
|
53
|
+
read: () => Promise<ReadResourceResult>;
|
|
54
|
+
}
|
|
55
|
+
export interface ResolvedServer {
|
|
56
|
+
name: string;
|
|
57
|
+
server: DirectMcpServer | null;
|
|
58
|
+
client: DirectClient | null;
|
|
59
|
+
status: FrontMcpStatus;
|
|
60
|
+
error: Error | null;
|
|
61
|
+
tools: ToolInfo[];
|
|
62
|
+
resources: ResourceInfo[];
|
|
63
|
+
resourceTemplates: ResourceTemplateInfo[];
|
|
64
|
+
prompts: PromptInfo[];
|
|
65
|
+
registry: ComponentRegistry;
|
|
66
|
+
connect: () => Promise<void>;
|
|
67
|
+
}
|
|
68
|
+
export interface ToolState<T = unknown> {
|
|
69
|
+
data: T | null;
|
|
70
|
+
loading: boolean;
|
|
71
|
+
error: Error | null;
|
|
72
|
+
called: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface ResourceState<T = unknown> {
|
|
75
|
+
data: T | null;
|
|
76
|
+
loading: boolean;
|
|
77
|
+
error: Error | null;
|
|
78
|
+
}
|
|
79
|
+
export interface PromptState<T = unknown> {
|
|
80
|
+
data: T | null;
|
|
81
|
+
loading: boolean;
|
|
82
|
+
error: Error | null;
|
|
83
|
+
}
|
|
84
|
+
export interface UseCallToolOptions {
|
|
85
|
+
resetOnToolChange?: boolean;
|
|
86
|
+
onSuccess?: (data: unknown) => void;
|
|
87
|
+
onError?: (error: Error) => void;
|
|
88
|
+
/** Target a specific named server from the ServerRegistry */
|
|
89
|
+
server?: string;
|
|
90
|
+
}
|
|
91
|
+
export type UseCallToolReturn<TInput extends object, TOutput> = [
|
|
92
|
+
(args: TInput) => Promise<TOutput | null>,
|
|
93
|
+
ToolState<TOutput>,
|
|
94
|
+
() => void
|
|
95
|
+
];
|
|
96
|
+
export interface ComponentNode {
|
|
97
|
+
type: string;
|
|
98
|
+
props?: Record<string, unknown>;
|
|
99
|
+
children?: string | ComponentNode | ComponentNode[];
|
|
100
|
+
}
|
|
101
|
+
export interface FieldRenderProps {
|
|
102
|
+
name: string;
|
|
103
|
+
type: string;
|
|
104
|
+
required: boolean;
|
|
105
|
+
description?: string;
|
|
106
|
+
enumValues?: string[];
|
|
107
|
+
value: string;
|
|
108
|
+
onChange: (value: string) => void;
|
|
109
|
+
}
|
|
110
|
+
export interface StoreAdapter {
|
|
111
|
+
/** Logical name for this store (e.g., 'redux', 'valtio'). */
|
|
112
|
+
name: string;
|
|
113
|
+
/** Returns the current state snapshot. */
|
|
114
|
+
getState: () => unknown;
|
|
115
|
+
/** Subscribes to state changes. Returns an unsubscribe function. */
|
|
116
|
+
subscribe: (cb: () => void) => () => void;
|
|
117
|
+
/** Named selectors — each becomes a sub-resource state://{name}/{key}. */
|
|
118
|
+
selectors?: Record<string, (state: unknown) => unknown>;
|
|
119
|
+
/** Named actions — each becomes a dynamic tool {name}_{key}. */
|
|
120
|
+
actions?: Record<string, (...args: unknown[]) => unknown>;
|
|
121
|
+
}
|
|
122
|
+
export interface McpColumnDef<T = unknown> {
|
|
123
|
+
key: string;
|
|
124
|
+
header: string;
|
|
125
|
+
render?: (value: T) => React.ReactNode;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=types.d.ts.map
|
package/types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAMlE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,I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","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zodToJsonSchema — thin centralized wrapper around zod/v4's toJSONSchema.
|
|
3
|
+
*
|
|
4
|
+
* Keeps the zod dependency isolated so the rest of the React SDK only
|
|
5
|
+
* deals with plain JSON Schema objects.
|
|
6
|
+
*/
|
|
7
|
+
import type { z } from 'zod';
|
|
8
|
+
export declare function zodToJsonSchema(schema: z.ZodType): Record<string, unknown>;
|
|
9
|
+
//# sourceMappingURL=zodToJsonSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zodToJsonSchema.d.ts","sourceRoot":"","sources":["../../src/utils/zodToJsonSchema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,wBAAgB,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E"}
|