@apollo/client-ai-apps 0.6.0 → 0.6.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/CHANGELOG.md +123 -0
- package/dist/core/typeRegistration.d.ts +33 -0
- package/dist/core/typeRegistration.d.ts.map +1 -0
- package/dist/core/typeRegistration.js +2 -0
- package/dist/core/typeRegistration.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/react/hooks/useToolInfo.d.ts +3 -0
- package/dist/mcp/react/hooks/useToolInfo.d.ts.map +1 -0
- package/dist/mcp/react/hooks/useToolInfo.js +10 -0
- package/dist/mcp/react/hooks/useToolInfo.js.map +1 -0
- package/dist/mcp/react/hooks/useToolInput.d.ts +6 -1
- package/dist/mcp/react/hooks/useToolInput.d.ts.map +1 -1
- package/dist/mcp/react/hooks/useToolInput.js +4 -0
- package/dist/mcp/react/hooks/useToolInput.js.map +1 -1
- package/dist/mcp/react/hooks/useToolName.d.ts +6 -1
- package/dist/mcp/react/hooks/useToolName.d.ts.map +1 -1
- package/dist/mcp/react/hooks/useToolName.js +4 -0
- package/dist/mcp/react/hooks/useToolName.js.map +1 -1
- package/dist/mcp/react/index.d.ts +1 -0
- package/dist/mcp/react/index.d.ts.map +1 -1
- package/dist/mcp/react/index.js +1 -0
- package/dist/mcp/react/index.js.map +1 -1
- package/dist/openai/react/hooks/useToolInfo.d.ts +3 -0
- package/dist/openai/react/hooks/useToolInfo.d.ts.map +1 -0
- package/dist/openai/react/hooks/useToolInfo.js +10 -0
- package/dist/openai/react/hooks/useToolInfo.js.map +1 -0
- package/dist/openai/react/hooks/useToolInput.d.ts +6 -1
- package/dist/openai/react/hooks/useToolInput.d.ts.map +1 -1
- package/dist/openai/react/hooks/useToolInput.js +4 -0
- package/dist/openai/react/hooks/useToolInput.js.map +1 -1
- package/dist/openai/react/hooks/useToolName.d.ts +6 -1
- package/dist/openai/react/hooks/useToolName.d.ts.map +1 -1
- package/dist/openai/react/hooks/useToolName.js +4 -0
- package/dist/openai/react/hooks/useToolName.js.map +1 -1
- package/dist/openai/react/index.d.ts +1 -0
- package/dist/openai/react/index.d.ts.map +1 -1
- package/dist/openai/react/index.js +1 -0
- package/dist/openai/react/index.js.map +1 -1
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +9 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mcp.d.ts +1 -1
- package/dist/react/index.mcp.d.ts.map +1 -1
- package/dist/react/index.mcp.js +1 -1
- package/dist/react/index.mcp.js.map +1 -1
- package/dist/react/index.openai.d.ts +1 -1
- package/dist/react/index.openai.d.ts.map +1 -1
- package/dist/react/index.openai.js +1 -1
- package/dist/react/index.openai.js.map +1 -1
- package/dist/tsconfig/core/tsconfig.json +2 -0
- package/dist/tsconfig/mcp/tsconfig.json +2 -0
- package/dist/tsconfig/openai/tsconfig.json +2 -0
- package/dist/vite/apolloClientAiApps.d.ts +1 -0
- package/dist/vite/apolloClientAiApps.d.ts.map +1 -1
- package/dist/vite/apolloClientAiApps.js +337 -41
- package/dist/vite/apolloClientAiApps.js.map +1 -1
- package/dist/vite/utilities/recast.d.ts +54 -0
- package/dist/vite/utilities/recast.d.ts.map +1 -0
- package/dist/vite/utilities/recast.js +71 -0
- package/dist/vite/utilities/recast.js.map +1 -0
- package/package.json +7 -3
- package/src/core/typeRegistration.ts +32 -0
- package/src/index.ts +7 -0
- package/src/mcp/react/hooks/__tests__/useToolInfo.test.tsx +53 -0
- package/src/mcp/react/hooks/useToolInfo.ts +13 -0
- package/src/mcp/react/hooks/useToolInput.ts +6 -1
- package/src/mcp/react/hooks/useToolName.ts +6 -1
- package/src/mcp/react/index.ts +1 -0
- package/src/openai/react/hooks/__tests__/useToolInfo.test.tsx +92 -0
- package/src/openai/react/hooks/useToolInfo.ts +13 -0
- package/src/openai/react/hooks/useToolInput.ts +6 -1
- package/src/openai/react/hooks/useToolName.ts +6 -1
- package/src/openai/react/index.ts +1 -0
- package/src/react/index.mcp.ts +1 -0
- package/src/react/index.openai.ts +1 -0
- package/src/react/index.ts +11 -0
- package/src/tsconfig/core/tsconfig.json +2 -0
- package/src/tsconfig/mcp/tsconfig.json +2 -0
- package/src/tsconfig/openai/tsconfig.json +2 -0
- package/src/vite/__tests__/apolloClientAiApps.test.ts +744 -6
- package/src/vite/apolloClientAiApps.ts +552 -66
- package/src/vite/utilities/recast.ts +100 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,126 @@
|
|
|
1
|
+
## 0.6.1 (2026-03-11)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
#### Add `useToolInfo` hook
|
|
6
|
+
|
|
7
|
+
A new `useToolInfo()` hook is now available that combines `useToolName()` and `useToolInput()` into a single hook. `useToolInfo` is more type-safe and automatically narrows the `toolInput` type based on the `toolName`.
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
// With toolInputs registered for "CreateTodo" and "DeleteTodo":
|
|
11
|
+
const info = useToolInfo();
|
|
12
|
+
// info: { toolName: "CreateTodo"; toolInput: CreateTodoInput }
|
|
13
|
+
// | { toolName: "DeleteTodo"; toolInput: DeleteTodoInput }
|
|
14
|
+
// | undefined
|
|
15
|
+
|
|
16
|
+
if (info?.toolName === "CreateTodo") {
|
|
17
|
+
// info.toolInput is narrowed to `CreateTodoInput`
|
|
18
|
+
doSomething(info.toolInput.title);
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
As a result, `useToolName()` and `useToolInput()` are now deprecated in favor of `useToolInfo()`. These hooks will be removed with the next major version.
|
|
23
|
+
|
|
24
|
+
#### Generate a TypeScript definition file for `.application-manifest.json`
|
|
25
|
+
|
|
26
|
+
The Vite plugin now generates a `.application-manifest.json.d.ts` TypeScript declaration file next to `.application-manifest.json`. This file declares the manifest as `ApplicationManifest`, so TypeScript infers the correct type automatically when you import it.
|
|
27
|
+
|
|
28
|
+
This removes the need to type cast the `manifest` when initializing `ApolloClient`:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// before
|
|
32
|
+
import manifest from "./.application-manifest.json";
|
|
33
|
+
|
|
34
|
+
const client = new ApolloClient({
|
|
35
|
+
manifest: manifest as ApplicationManifest, // cast required
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// after
|
|
39
|
+
import manifest from "./.application-manifest.json";
|
|
40
|
+
|
|
41
|
+
const client = new ApolloClient({
|
|
42
|
+
manifest, // type is inferred as ApplicationManifest
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
> [!NOTE]
|
|
47
|
+
> This requires the TypeScript `allowArbitraryExtensions` option. Please ensure your `tsconfig.json` extends one of the provided `tsconfig`, or add these compiler options manually:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"compilerOptions": {
|
|
52
|
+
"allowArbitraryExtensions": true,
|
|
53
|
+
"resolveJsonModule": true
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Add type-safe tool names
|
|
59
|
+
|
|
60
|
+
The Vite plugin now generates a `.apollo-client-ai-apps/types/register.d.ts` TypeScript declaration file. This file contains a union of all tool names found in your app's `@tool` directives.
|
|
61
|
+
|
|
62
|
+
This means the `useToolName()` hook now provides the precise union of tool names instead of `string | undefined`:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
// before
|
|
66
|
+
const toolName = useToolName(); // string | undefined
|
|
67
|
+
|
|
68
|
+
// after (with @tool directives on "CreateTodo", "DeleteTodo", "UpdateTodo")
|
|
69
|
+
const toolName = useToolName(); // "CreateTodo" | "DeleteTodo" | "UpdateTodo" | undefined
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The generated file is written to `.apollo-client-ai-apps/types/register.d.ts` and is kept up to date as you edit your operations. Add this path to your `tsconfig.json` `include` to ensure these types are included:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"include": ["src", ".apollo-client-ai-apps/types"]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You might also consider adding `.apollo-client-ai-apps/` to your `.gitignore` since it is fully generated.
|
|
81
|
+
|
|
82
|
+
The `ToolName` type is exported from `@apollo/client-ai-apps` if you need access to the available tool names for your own utilities.
|
|
83
|
+
|
|
84
|
+
#### `@tool` `name` and `description` arguments are now optional
|
|
85
|
+
|
|
86
|
+
The `name` and `description` arguments on the `@tool` directive are now optional. When omitted, they fall back to the operation name and description respectively.
|
|
87
|
+
|
|
88
|
+
```graphql
|
|
89
|
+
## name defaults to "HelloWorldQuery", description defaults to the operation description
|
|
90
|
+
"""
|
|
91
|
+
Say hello to the world.
|
|
92
|
+
"""
|
|
93
|
+
query HelloWorldQuery @tool {
|
|
94
|
+
helloWorld
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Tool `name` and `description` are still enforced and must be set either by the operation or the `@tool` arguments. An anonymous operation or an operation that omits the description while using a bare `@tool` directive fails validation.
|
|
99
|
+
|
|
100
|
+
When an operation has multiple `@tool` directives, `name` and `description` must still be provided explicitly on each directive to avoid ambiguity.
|
|
101
|
+
|
|
102
|
+
```graphql
|
|
103
|
+
## ✅ Valid — each @tool has an explicit name and description
|
|
104
|
+
query ProductsQuery
|
|
105
|
+
@tool(name: "list-products", description: "List all products")
|
|
106
|
+
@tool(name: "search-products", description: "Search products by keyword") {
|
|
107
|
+
products {
|
|
108
|
+
id
|
|
109
|
+
title
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
## ❌ Error — missing name on second @tool when multiple are present
|
|
114
|
+
query ProductsQuery
|
|
115
|
+
@tool(name: "list-products", description: "List all products")
|
|
116
|
+
@tool(description: "Search products") {
|
|
117
|
+
products {
|
|
118
|
+
id
|
|
119
|
+
title
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
1
124
|
## 0.6.0 (2026-03-06)
|
|
2
125
|
|
|
3
126
|
### Breaking Changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface Register {
|
|
2
|
+
}
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Please use the `ToolInfo` type instead. `ToolName` will be
|
|
5
|
+
* removed in the next major version.
|
|
6
|
+
*/
|
|
7
|
+
export type ToolName = Register extends {
|
|
8
|
+
toolName: infer T extends string;
|
|
9
|
+
} ? T : string;
|
|
10
|
+
type RegisteredToolInputs = Register extends {
|
|
11
|
+
toolInputs: infer T extends Record<string, unknown>;
|
|
12
|
+
} ? T : never;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Please use the `ToolInfo` type instead. `ToolInput` will be
|
|
15
|
+
* removed in the next major version.
|
|
16
|
+
*/
|
|
17
|
+
export type ToolInput = [
|
|
18
|
+
RegisteredToolInputs
|
|
19
|
+
] extends [never] ? Record<string, unknown> : RegisteredToolInputs[keyof RegisteredToolInputs];
|
|
20
|
+
type ToolInfoFromInputs<T extends Record<string, unknown>> = {
|
|
21
|
+
[K in keyof T]: {
|
|
22
|
+
toolName: K;
|
|
23
|
+
toolInput: T[K] extends Record<string, never> ? T[K] | undefined : T[K];
|
|
24
|
+
};
|
|
25
|
+
}[keyof T];
|
|
26
|
+
export type ToolInfo = [
|
|
27
|
+
RegisteredToolInputs
|
|
28
|
+
] extends [never] ? {
|
|
29
|
+
toolName: string;
|
|
30
|
+
toolInput: Record<string, unknown> | undefined;
|
|
31
|
+
} : ToolInfoFromInputs<RegisteredToolInputs>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=typeRegistration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeRegistration.d.ts","sourceRoot":"","sources":["../../src/core/typeRegistration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;CAAG;AAE5B;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAClB,QAAQ,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,MAAM,CAAA;CAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AAErE,KAAK,oBAAoB,GACvB,QAAQ,SAAS;IAAE,UAAU,EAAE,MAAM,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,CAAC,GAC1E,KAAK,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,SAAS,GACnB;IAAC,oBAAoB;CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9D,oBAAoB,CAAC,MAAM,oBAAoB,CAAC,CAAC;AAErD,KAAK,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;KAC1D,CAAC,IAAI,MAAM,CAAC,GAAG;QACd,QAAQ,EAAE,CAAC,CAAC;QACZ,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;KACzE;CACF,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,QAAQ,GAClB;IAAC,oBAAoB;CAAC,SAAS,CAAC,KAAK,CAAC,GACpC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAAE,GACpE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeRegistration.js","sourceRoot":"","sources":["../../src/core/typeRegistration.ts"],"names":[],"mappings":"","sourcesContent":["export interface Register {}\n\n/**\n * @deprecated Please use the `ToolInfo` type instead. `ToolName` will be\n * removed in the next major version.\n */\nexport type ToolName =\n Register extends { toolName: infer T extends string } ? T : string;\n\ntype RegisteredToolInputs =\n Register extends { toolInputs: infer T extends Record<string, unknown> } ? T\n : never;\n\n/**\n * @deprecated Please use the `ToolInfo` type instead. `ToolInput` will be\n * removed in the next major version.\n */\nexport type ToolInput =\n [RegisteredToolInputs] extends [never] ? Record<string, unknown>\n : RegisteredToolInputs[keyof RegisteredToolInputs];\n\ntype ToolInfoFromInputs<T extends Record<string, unknown>> = {\n [K in keyof T]: {\n toolName: K;\n toolInput: T[K] extends Record<string, never> ? T[K] | undefined : T[K];\n };\n}[keyof T];\n\nexport type ToolInfo =\n [RegisteredToolInputs] extends [never] ?\n { toolName: string; toolInput: Record<string, unknown> | undefined }\n : ToolInfoFromInputs<RegisteredToolInputs>;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { ApplicationManifest, ManifestOperation, ManifestTool, ManifestExtraInput, ManifestCsp, ManifestLabels, ManifestWidgetSettings, } from "./types/application-manifest.js";
|
|
2
|
+
export type { Register, ToolInfo, ToolInput, ToolName, } from "./core/typeRegistration.js";
|
|
2
3
|
export { ApolloClient } from "./core/ApolloClient.js";
|
|
3
4
|
export { ToolCallLink } from "./link/ToolCallLink.js";
|
|
4
5
|
export { Platform } from "./core/Platform.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export type {\n ApplicationManifest,\n ManifestOperation,\n ManifestTool,\n ManifestExtraInput,\n ManifestCsp,\n ManifestLabels,\n ManifestWidgetSettings,\n} from \"./types/application-manifest.js\";\n\nexport type {\n Register,\n ToolInfo,\n ToolInput,\n ToolName,\n} from \"./core/typeRegistration.js\";\n\nexport { ApolloClient } from \"./core/ApolloClient.js\";\nexport { ToolCallLink } from \"./link/ToolCallLink.js\";\n\nexport { Platform } from \"./core/Platform.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolInfo.d.ts","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAGlE,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CASlD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
export function useToolInfo() {
|
|
3
|
+
const appManager = useApolloClient()["appManager"];
|
|
4
|
+
const toolName = appManager.toolName;
|
|
5
|
+
if (!toolName) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
return { toolName, toolInput: appManager.toolInput };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=useToolInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolInfo.js","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,UAAU,WAAW;IACzB,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IAErC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO;IACT,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC;AACvD,CAAC","sourcesContent":["import type { ToolInfo } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\nexport function useToolInfo(): ToolInfo | undefined {\n const appManager = useApolloClient()[\"appManager\"];\n const toolName = appManager.toolName;\n\n if (!toolName) {\n return;\n }\n\n return { toolName, toolInput: appManager.toolInput };\n}\n"]}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ToolInput } from "../../../core/typeRegistration.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useToolInput(): ToolInput | undefined;
|
|
2
7
|
//# sourceMappingURL=useToolInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolInput.d.ts","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolInput.d.ts","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGnE;;;GAGG;AACH,wBAAgB,YAAY,IAAI,SAAS,GAAG,SAAS,CAEpD"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
2
6
|
export function useToolInput() {
|
|
3
7
|
return useApolloClient()["appManager"].toolInput;
|
|
4
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolInput.js","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolInput.js","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolInput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC;AACnD,CAAC","sourcesContent":["import type { ToolInput } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed\n * in the next major version.\n */\nexport function useToolInput(): ToolInput | undefined {\n return useApolloClient()[\"appManager\"].toolInput;\n}\n"]}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ToolName } from "../../../core/typeRegistration.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useToolName(): ToolName | undefined;
|
|
2
7
|
//# sourceMappingURL=useToolName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolName.d.ts","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolName.d.ts","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAGlE;;;GAGG;AACH,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CAElD"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
2
6
|
export function useToolName() {
|
|
3
7
|
return useApolloClient()["appManager"].toolName;
|
|
4
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolName.js","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolName.js","sourceRoot":"","sources":["../../../../src/mcp/react/hooks/useToolName.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC;AAClD,CAAC","sourcesContent":["import type { ToolName } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed\n * in the next major version.\n */\nexport function useToolName(): ToolName | undefined {\n return useApolloClient()[\"appManager\"].toolName;\n}\n"]}
|
|
@@ -3,5 +3,6 @@ export { useHostContext } from "./hooks/useHostContext.js";
|
|
|
3
3
|
export { useToolName } from "./hooks/useToolName.js";
|
|
4
4
|
export { useToolMetadata } from "./hooks/useToolMetadata.js";
|
|
5
5
|
export { useToolInput } from "./hooks/useToolInput.js";
|
|
6
|
+
export { useToolInfo } from "./hooks/useToolInfo.js";
|
|
6
7
|
export { createHydrationUtils } from "./hooks/createHydrationUtils.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
|
package/dist/mcp/react/index.js
CHANGED
|
@@ -3,5 +3,6 @@ export { useHostContext } from "./hooks/useHostContext.js";
|
|
|
3
3
|
export { useToolName } from "./hooks/useToolName.js";
|
|
4
4
|
export { useToolMetadata } from "./hooks/useToolMetadata.js";
|
|
5
5
|
export { useToolInput } from "./hooks/useToolInput.js";
|
|
6
|
+
export { useToolInfo } from "./hooks/useToolInfo.js";
|
|
6
7
|
export { createHydrationUtils } from "./hooks/createHydrationUtils.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { useApp } from \"./hooks/useApp.js\";\nexport { useHostContext } from \"./hooks/useHostContext.js\";\nexport { useToolName } from \"./hooks/useToolName.js\";\nexport { useToolMetadata } from \"./hooks/useToolMetadata.js\";\nexport { useToolInput } from \"./hooks/useToolInput.js\";\nexport { createHydrationUtils } from \"./hooks/createHydrationUtils.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { useApp } from \"./hooks/useApp.js\";\nexport { useHostContext } from \"./hooks/useHostContext.js\";\nexport { useToolName } from \"./hooks/useToolName.js\";\nexport { useToolMetadata } from \"./hooks/useToolMetadata.js\";\nexport { useToolInput } from \"./hooks/useToolInput.js\";\nexport { useToolInfo } from \"./hooks/useToolInfo.js\";\nexport { createHydrationUtils } from \"./hooks/createHydrationUtils.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolInfo.d.ts","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAGlE,wBAAgB,WAAW,IAAI,QAAQ,GAAG,SAAS,CASlD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
export function useToolInfo() {
|
|
3
|
+
const appManager = useApolloClient()["appManager"];
|
|
4
|
+
const toolName = appManager.toolName;
|
|
5
|
+
if (!toolName) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
return { toolName, toolInput: appManager.toolInput };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=useToolInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolInfo.js","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,UAAU,WAAW;IACzB,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IAErC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO;IACT,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC;AACvD,CAAC","sourcesContent":["import type { ToolInfo } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\nexport function useToolInfo(): ToolInfo | undefined {\n const appManager = useApolloClient()[\"appManager\"];\n const toolName = appManager.toolName;\n\n if (!toolName) {\n return;\n }\n\n return { toolName, toolInput: appManager.toolInput };\n}\n"]}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ToolInput } from "../../../core/typeRegistration.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useToolInput(): ToolInput | undefined;
|
|
2
7
|
//# sourceMappingURL=useToolInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolInput.d.ts","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolInput.d.ts","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGnE;;;GAGG;AACH,wBAAgB,YAAY,IAAI,SAAS,GAAG,SAAS,CAEpD"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
2
6
|
export function useToolInput() {
|
|
3
7
|
return useApolloClient()["appManager"].toolInput;
|
|
4
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolInput.js","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolInput.js","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolInput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC;AACnD,CAAC","sourcesContent":["import type { ToolInput } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed\n * in the next major version.\n */\nexport function useToolInput(): ToolInput | undefined {\n return useApolloClient()[\"appManager\"].toolInput;\n}\n"]}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ToolName } from "../../../core/typeRegistration.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useToolName: () => ToolName | undefined;
|
|
2
7
|
//# sourceMappingURL=useToolName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolName.d.ts","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolName.d.ts","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAO,QAAQ,GAAG,SAEzC,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { useApolloClient } from "./useApolloClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
4
|
+
* in the next major version.
|
|
5
|
+
*/
|
|
2
6
|
export const useToolName = () => {
|
|
3
7
|
return useApolloClient()["appManager"].toolName;
|
|
4
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolName.js","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToolName.js","sourceRoot":"","sources":["../../../../src/openai/react/hooks/useToolName.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAyB,EAAE;IACpD,OAAO,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import type { ToolName } from \"../../../core/typeRegistration.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed\n * in the next major version.\n */\nexport const useToolName = (): ToolName | undefined => {\n return useApolloClient()[\"appManager\"].toolName;\n};\n"]}
|
|
@@ -3,6 +3,7 @@ export { useHostContext } from "./hooks/useHostContext.js";
|
|
|
3
3
|
export { useToolName } from "./hooks/useToolName.js";
|
|
4
4
|
export { useToolMetadata } from "./hooks/useToolMetadata.js";
|
|
5
5
|
export { useToolInput } from "./hooks/useToolInput.js";
|
|
6
|
+
export { useToolInfo } from "./hooks/useToolInfo.js";
|
|
6
7
|
export { createHydrationUtils } from "./hooks/createHydrationUtils.js";
|
|
7
8
|
export { useWidgetState } from "./hooks/useWidgetState.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/openai/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/openai/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -3,6 +3,7 @@ export { useHostContext } from "./hooks/useHostContext.js";
|
|
|
3
3
|
export { useToolName } from "./hooks/useToolName.js";
|
|
4
4
|
export { useToolMetadata } from "./hooks/useToolMetadata.js";
|
|
5
5
|
export { useToolInput } from "./hooks/useToolInput.js";
|
|
6
|
+
export { useToolInfo } from "./hooks/useToolInfo.js";
|
|
6
7
|
export { createHydrationUtils } from "./hooks/createHydrationUtils.js";
|
|
7
8
|
export { useWidgetState } from "./hooks/useWidgetState.js";
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/openai/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { useApp } from \"./hooks/useApp.js\";\nexport { useHostContext } from \"./hooks/useHostContext.js\";\nexport { useToolName } from \"./hooks/useToolName.js\";\nexport { useToolMetadata } from \"./hooks/useToolMetadata.js\";\nexport { useToolInput } from \"./hooks/useToolInput.js\";\nexport { createHydrationUtils } from \"./hooks/createHydrationUtils.js\";\nexport { useWidgetState } from \"./hooks/useWidgetState.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/openai/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { useApp } from \"./hooks/useApp.js\";\nexport { useHostContext } from \"./hooks/useHostContext.js\";\nexport { useToolName } from \"./hooks/useToolName.js\";\nexport { useToolMetadata } from \"./hooks/useToolMetadata.js\";\nexport { useToolInput } from \"./hooks/useToolInput.js\";\nexport { useToolInfo } from \"./hooks/useToolInfo.js\";\nexport { createHydrationUtils } from \"./hooks/createHydrationUtils.js\";\nexport { useWidgetState } from \"./hooks/useWidgetState.js\";\n"]}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -3,9 +3,18 @@ export { reactive } from "./reactive.js";
|
|
|
3
3
|
export type { Reactive } from "./reactive.js";
|
|
4
4
|
export declare const useApp: typeof import("./index.mcp.js").useApp;
|
|
5
5
|
export declare const useHostContext: typeof import("./index.mcp.js").useHostContext;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
8
|
+
* in the next major version.
|
|
9
|
+
*/
|
|
6
10
|
export declare const useToolInput: typeof import("./index.mcp.js").useToolInput;
|
|
7
11
|
export declare const useToolMetadata: typeof import("./index.mcp.js").useToolMetadata;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
14
|
+
* in the next major version.
|
|
15
|
+
*/
|
|
8
16
|
export declare const useToolName: typeof import("./index.mcp.js").useToolName;
|
|
17
|
+
export declare const useToolInfo: typeof import("./index.mcp.js").useToolInfo;
|
|
9
18
|
/** @experimental */
|
|
10
19
|
export declare const createHydrationUtils: typeof import("./index.mcp.js").createHydrationUtils;
|
|
11
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,eAAO,MAAM,MAAM,wCAC4C,CAAC;AAEhE,eAAO,MAAM,cAAc,gDACoD,CAAC;AAEhF,eAAO,MAAM,YAAY,8CACkD,CAAC;AAE5E,eAAO,MAAM,eAAe,iDAGzB,CAAC;AAEJ,eAAO,MAAM,WAAW,6CACiD,CAAC;AAE1E,oBAAoB;AACpB,eAAO,MAAM,oBAAoB,sDAER,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,eAAO,MAAM,MAAM,wCAC4C,CAAC;AAEhE,eAAO,MAAM,cAAc,gDACoD,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,8CACkD,CAAC;AAE5E,eAAO,MAAM,eAAe,iDAGzB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,WAAW,6CACiD,CAAC;AAE1E,eAAO,MAAM,WAAW,6CACiD,CAAC;AAE1E,oBAAoB;AACpB,eAAO,MAAM,oBAAoB,sDAER,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -5,9 +5,18 @@ export { reactive } from "./reactive.js";
|
|
|
5
5
|
// targets
|
|
6
6
|
export const useApp = missingHook("useApp");
|
|
7
7
|
export const useHostContext = missingHook("useHostContext");
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed
|
|
10
|
+
* in the next major version.
|
|
11
|
+
*/
|
|
8
12
|
export const useToolInput = missingHook("useToolInput");
|
|
9
13
|
export const useToolMetadata = missingHook("useToolMetadata");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed
|
|
16
|
+
* in the next major version.
|
|
17
|
+
*/
|
|
10
18
|
export const useToolName = missingHook("useToolName");
|
|
19
|
+
export const useToolInfo = missingHook("useToolInfo");
|
|
11
20
|
/** @experimental */
|
|
12
21
|
export const createHydrationUtils = missingHook("createHydrationUtils");
|
|
13
22
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,0EAA0E;AAC1E,UAAU;AACV,MAAM,CAAC,MAAM,MAAM,GACjB,WAAW,CAAyC,QAAQ,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GACzB,WAAW,CAAiD,gBAAgB,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,YAAY,GACvB,WAAW,CAA+C,cAAc,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,eAAe,GAC1B,WAAW,CACT,iBAAiB,CAClB,CAAC;AAEJ,MAAM,CAAC,MAAM,WAAW,GACtB,WAAW,CAA8C,aAAa,CAAC,CAAC;AAE1E,oBAAoB;AACpB,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAE7C,sBAAsB,CAAC,CAAC","sourcesContent":["import { missingHook } from \"./missingHook.js\";\n\nexport { ApolloProvider } from \"./ApolloProvider.js\";\nexport { reactive } from \"./reactive.js\";\nexport type { Reactive } from \"./reactive.js\";\n\n// Use `mcp` related types since these are the most common between the two\n// targets\nexport const useApp =\n missingHook<typeof import(\"./index.mcp.js\").useApp>(\"useApp\");\n\nexport const useHostContext =\n missingHook<typeof import(\"./index.mcp.js\").useHostContext>(\"useHostContext\");\n\nexport const useToolInput =\n missingHook<typeof import(\"./index.mcp.js\").useToolInput>(\"useToolInput\");\n\nexport const useToolMetadata =\n missingHook<typeof import(\"./index.mcp.js\").useToolMetadata>(\n \"useToolMetadata\"\n );\n\nexport const useToolName =\n missingHook<typeof import(\"./index.mcp.js\").useToolName>(\"useToolName\");\n\n/** @experimental */\nexport const createHydrationUtils = missingHook<\n typeof import(\"./index.mcp.js\").createHydrationUtils\n>(\"createHydrationUtils\");\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,0EAA0E;AAC1E,UAAU;AACV,MAAM,CAAC,MAAM,MAAM,GACjB,WAAW,CAAyC,QAAQ,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GACzB,WAAW,CAAiD,gBAAgB,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GACvB,WAAW,CAA+C,cAAc,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,eAAe,GAC1B,WAAW,CACT,iBAAiB,CAClB,CAAC;AAEJ;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,WAAW,CAA8C,aAAa,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,WAAW,GACtB,WAAW,CAA8C,aAAa,CAAC,CAAC;AAE1E,oBAAoB;AACpB,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAE7C,sBAAsB,CAAC,CAAC","sourcesContent":["import { missingHook } from \"./missingHook.js\";\n\nexport { ApolloProvider } from \"./ApolloProvider.js\";\nexport { reactive } from \"./reactive.js\";\nexport type { Reactive } from \"./reactive.js\";\n\n// Use `mcp` related types since these are the most common between the two\n// targets\nexport const useApp =\n missingHook<typeof import(\"./index.mcp.js\").useApp>(\"useApp\");\n\nexport const useHostContext =\n missingHook<typeof import(\"./index.mcp.js\").useHostContext>(\"useHostContext\");\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolInput` will be removed\n * in the next major version.\n */\nexport const useToolInput =\n missingHook<typeof import(\"./index.mcp.js\").useToolInput>(\"useToolInput\");\n\nexport const useToolMetadata =\n missingHook<typeof import(\"./index.mcp.js\").useToolMetadata>(\n \"useToolMetadata\"\n );\n\n/**\n * @deprecated Please use the `useToolInfo` hook. `useToolName` will be removed\n * in the next major version.\n */\nexport const useToolName =\n missingHook<typeof import(\"./index.mcp.js\").useToolName>(\"useToolName\");\n\nexport const useToolInfo =\n missingHook<typeof import(\"./index.mcp.js\").useToolInfo>(\"useToolInfo\");\n\n/** @experimental */\nexport const createHydrationUtils = missingHook<\n typeof import(\"./index.mcp.js\").createHydrationUtils\n>(\"createHydrationUtils\");\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./index.js";
|
|
2
|
-
export { useApp, useHostContext, useToolInput, createHydrationUtils, useToolMetadata, useToolName, } from "../mcp/react/index.js";
|
|
2
|
+
export { useApp, useHostContext, useToolInput, useToolInfo, createHydrationUtils, useToolMetadata, useToolName, } from "../mcp/react/index.js";
|
|
3
3
|
//# sourceMappingURL=index.mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mcp.d.ts","sourceRoot":"","sources":["../../src/react/index.mcp.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mcp.d.ts","sourceRoot":"","sources":["../../src/react/index.mcp.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,uBAAuB,CAAC"}
|
package/dist/react/index.mcp.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./index.js";
|
|
2
|
-
export { useApp, useHostContext, useToolInput, createHydrationUtils, useToolMetadata, useToolName, } from "../mcp/react/index.js";
|
|
2
|
+
export { useApp, useHostContext, useToolInput, useToolInfo, createHydrationUtils, useToolMetadata, useToolName, } from "../mcp/react/index.js";
|
|
3
3
|
//# sourceMappingURL=index.mcp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mcp.js","sourceRoot":"","sources":["../../src/react/index.mcp.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,uBAAuB,CAAC","sourcesContent":["export * from \"./index.js\";\nexport {\n useApp,\n useHostContext,\n useToolInput,\n createHydrationUtils,\n useToolMetadata,\n useToolName,\n} from \"../mcp/react/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.mcp.js","sourceRoot":"","sources":["../../src/react/index.mcp.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,uBAAuB,CAAC","sourcesContent":["export * from \"./index.js\";\nexport {\n useApp,\n useHostContext,\n useToolInput,\n useToolInfo,\n createHydrationUtils,\n useToolMetadata,\n useToolName,\n} from \"../mcp/react/index.js\";\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./index.js";
|
|
2
|
-
export { useApp, useHostContext, useToolInput, createHydrationUtils, useToolMetadata, useToolName, } from "../openai/react/index.js";
|
|
2
|
+
export { useApp, useHostContext, useToolInput, useToolInfo, createHydrationUtils, useToolMetadata, useToolName, } from "../openai/react/index.js";
|
|
3
3
|
//# sourceMappingURL=index.openai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.openai.d.ts","sourceRoot":"","sources":["../../src/react/index.openai.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.openai.d.ts","sourceRoot":"","sources":["../../src/react/index.openai.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./index.js";
|
|
2
|
-
export { useApp, useHostContext, useToolInput, createHydrationUtils, useToolMetadata, useToolName, } from "../openai/react/index.js";
|
|
2
|
+
export { useApp, useHostContext, useToolInput, useToolInfo, createHydrationUtils, useToolMetadata, useToolName, } from "../openai/react/index.js";
|
|
3
3
|
//# sourceMappingURL=index.openai.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.openai.js","sourceRoot":"","sources":["../../src/react/index.openai.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,0BAA0B,CAAC","sourcesContent":["export * from \"./index.js\";\nexport {\n useApp,\n useHostContext,\n useToolInput,\n createHydrationUtils,\n useToolMetadata,\n useToolName,\n} from \"../openai/react/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.openai.js","sourceRoot":"","sources":["../../src/react/index.openai.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,MAAM,EACN,cAAc,EACd,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,0BAA0B,CAAC","sourcesContent":["export * from \"./index.js\";\nexport {\n useApp,\n useHostContext,\n useToolInput,\n useToolInfo,\n createHydrationUtils,\n useToolMetadata,\n useToolName,\n} from \"../openai/react/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apolloClientAiApps.d.ts","sourceRoot":"","sources":["../../src/vite/apolloClientAiApps.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"apolloClientAiApps.d.ts","sourceRoot":"","sources":["../../src/vite/apolloClientAiApps.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,MAAM,EAEZ,MAAM,MAAM,CAAC;AAMd,OAAO,EAA4B,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAqB7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAenE,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,KAAY,MAAM,GAAG,wBAAwB,CAAC,SAAS,CAAC;IAExD,UAAiB,OAAO;QACtB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B;CACF;AAgBD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,gCAOnD;AA+TD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,kBAAkB,CAAC,OAAO,GAClC,MAAM,CAoZR;AA0GD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CA2CzE"}
|