modality-ai 0.1.3 → 0.1.4
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/dist/index.js
CHANGED
|
@@ -126584,7 +126584,7 @@ function jsonSchemaToZod(schema2) {
|
|
|
126584
126584
|
return exports_external.any();
|
|
126585
126585
|
}
|
|
126586
126586
|
}
|
|
126587
|
-
var
|
|
126587
|
+
var createStdioToHttpClient = (options) => {
|
|
126588
126588
|
const {
|
|
126589
126589
|
command = "bunx",
|
|
126590
126590
|
args: optionArgs = [],
|
|
@@ -126602,6 +126602,10 @@ var setupStdioToHttpTools = async (mcpServer, options) => {
|
|
|
126602
126602
|
args: args2,
|
|
126603
126603
|
env
|
|
126604
126604
|
}, timeout6);
|
|
126605
|
+
return client;
|
|
126606
|
+
};
|
|
126607
|
+
var setupStdioToHttpTools = async (mcpServer, options) => {
|
|
126608
|
+
const client = createStdioToHttpClient(options);
|
|
126605
126609
|
const tools = await client.listTools();
|
|
126606
126610
|
const aiTools = {};
|
|
126607
126611
|
for (const tool2 of tools.tools) {
|
|
@@ -126624,6 +126628,7 @@ var setupStdioToHttpTools = async (mcpServer, options) => {
|
|
|
126624
126628
|
export {
|
|
126625
126629
|
setupStdioToHttpTools,
|
|
126626
126630
|
mergeToolCallsAndResults,
|
|
126631
|
+
createStdioToHttpClient,
|
|
126627
126632
|
createAIChat,
|
|
126628
126633
|
OllamaProvider,
|
|
126629
126634
|
ModalityClient
|
|
@@ -32,13 +32,13 @@ declare class ModalityClientImpl {
|
|
|
32
32
|
listTools(): Promise<ListToolsResult>;
|
|
33
33
|
parseContent(toolResult: any): any;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
declare function
|
|
37
|
-
declare function
|
|
35
|
+
export type ModalityClientInstance = ModalityClientImpl;
|
|
36
|
+
declare function http(url: string, timeout?: number, options?: StreamableHTTPClientTransportOptions): ModalityClientInstance;
|
|
37
|
+
declare function stdio(serverParams: StdioServerParameters, timeout?: number): ModalityClientInstance;
|
|
38
|
+
declare function sse(url: string, timeout?: number, options?: SSEClientTransportOptions): ModalityClientInstance;
|
|
38
39
|
export declare const ModalityClient: {
|
|
39
40
|
http: typeof http;
|
|
40
41
|
stdio: typeof stdio;
|
|
41
42
|
sse: typeof sse;
|
|
42
43
|
};
|
|
43
|
-
export type ModalityClientInstance = ModalityClientImpl;
|
|
44
44
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAIChat, mergeToolCallsAndResults, OllamaProvider, } from "./util_ai_model";
|
|
2
2
|
export { ModalityClient } from "./ModalityClient";
|
|
3
|
-
export { setupStdioToHttpTools } from "./setupStdioToHttpTools";
|
|
3
|
+
export { setupStdioToHttpTools, createStdioToHttpClient, } from "./setupStdioToHttpTools";
|
|
4
4
|
export type { ModalityClientInstance } from "./ModalityClient";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ModalityFastMCP, type AITools } from "modality-mcp-kit";
|
|
2
|
+
import { type ModalityClientInstance } from "./ModalityClient";
|
|
2
3
|
interface StdioToHttpOptions {
|
|
3
4
|
command?: string;
|
|
4
5
|
args?: string[];
|
|
@@ -6,6 +7,7 @@ interface StdioToHttpOptions {
|
|
|
6
7
|
pkg?: string;
|
|
7
8
|
timeout?: number;
|
|
8
9
|
}
|
|
10
|
+
export declare const createStdioToHttpClient: (options?: StdioToHttpOptions) => ModalityClientInstance;
|
|
9
11
|
/**
|
|
10
12
|
* Setup Chrome DevTools MCP tools
|
|
11
13
|
* Dynamically loads all tools from chrome-devtools-mcp@latest and exposes them as AITools
|
package/package.json
CHANGED