modality-ai 0.0.0 → 0.0.2
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 +110259 -31229
- package/dist/types/ModalityClient.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/schemas/schemas_modality.d.ts +2 -2
- package/dist/types/setupStdioToHttpTools.d.ts +14 -0
- package/package.json +5 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type StreamableHTTPClientTransportOptions } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
2
2
|
import { type StdioServerParameters } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
3
|
import { type SSEClientTransportOptions } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
4
|
+
import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
|
|
4
5
|
export type TransportType = "http" | "stdio" | "sse";
|
|
5
6
|
export interface HttpTransportConfig {
|
|
6
7
|
type: "http";
|
|
@@ -28,7 +29,7 @@ declare class ModalityClientImpl {
|
|
|
28
29
|
callOnce(method: string, params?: any, autoParse?: boolean): Promise<any>;
|
|
29
30
|
callStream(method: string, params?: any, callback?: (p: any) => void): ReadableStream;
|
|
30
31
|
close(): void;
|
|
31
|
-
listTools(): Promise<
|
|
32
|
+
listTools(): Promise<ListToolsResult>;
|
|
32
33
|
parseContent(toolResult: any): any;
|
|
33
34
|
}
|
|
34
35
|
declare function http(url: string, timeout?: number, options?: StreamableHTTPClientTransportOptions): ModalityClientImpl;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { createAIChat, mergeToolCallsAndResults, OllamaProvider, } from "./util_ai_model";
|
|
2
2
|
export { ModalityClient } from "./ModalityClient";
|
|
3
|
+
export { setupStdioToHttpTools } from "./setupStdioToHttpTools";
|
|
3
4
|
export type { ModalityClientInstance } from "./ModalityClient";
|
|
@@ -38,9 +38,9 @@ declare const chatOptionsSchema: z.ZodObject<{
|
|
|
38
38
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
39
39
|
topP: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
toolChoice: z.ZodOptional<z.ZodEnum<{
|
|
41
|
+
required: "required";
|
|
41
42
|
auto: "auto";
|
|
42
43
|
none: "none";
|
|
43
|
-
required: "required";
|
|
44
44
|
}>>;
|
|
45
45
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
46
46
|
}, z.core.$strip>;
|
|
@@ -84,9 +84,9 @@ export declare const modalityAnswerSchema: z.ZodObject<{
|
|
|
84
84
|
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
85
85
|
topP: z.ZodOptional<z.ZodNumber>;
|
|
86
86
|
toolChoice: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
required: "required";
|
|
87
88
|
auto: "auto";
|
|
88
89
|
none: "none";
|
|
89
|
-
required: "required";
|
|
90
90
|
}>>;
|
|
91
91
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
92
92
|
}, z.core.$strip>>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModalityFastMCP, type AITools } from "modality-mcp-kit";
|
|
2
|
+
interface StdioToHttpOptions {
|
|
3
|
+
command?: string;
|
|
4
|
+
args?: string[];
|
|
5
|
+
env?: Record<string, string>;
|
|
6
|
+
pkg?: string;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Setup Chrome DevTools MCP tools
|
|
11
|
+
* Dynamically loads all tools from chrome-devtools-mcp@latest and exposes them as AITools
|
|
12
|
+
*/
|
|
13
|
+
export declare const setupStdioToHttpTools: (mcpServer?: ModalityFastMCP, options?: StdioToHttpOptions) => Promise<AITools>;
|
|
14
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.2",
|
|
3
3
|
"name": "modality-ai",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@ai-sdk/google": "^3.0.2",
|
|
18
|
+
"@valibot/to-json-schema": "^1.5.0",
|
|
18
19
|
"ai": "^6.0.5",
|
|
20
|
+
"effect": "^3.19.14",
|
|
19
21
|
"modality-mcp-kit": "^0.4.0",
|
|
20
|
-
"ollama-ai-provider": "^1.2.0"
|
|
22
|
+
"ollama-ai-provider": "^1.2.0",
|
|
23
|
+
"sury": "^11.0.0-alpha.4"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"@types/bun": "^1.3.5",
|