modality-ai 0.3.0 → 0.4.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.
@@ -2,7 +2,6 @@ import { type StreamableHTTPClientTransportOptions } from "@modelcontextprotocol
2
2
  import { type StdioServerParameters } from "@modelcontextprotocol/sdk/client/stdio.js";
3
3
  import { type SSEClientTransportOptions } from "@modelcontextprotocol/sdk/client/sse.js";
4
4
  import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
5
- export type TransportType = "http" | "stdio" | "sse";
6
5
  export interface HttpTransportConfig {
7
6
  type: "http";
8
7
  url: string;
@@ -22,7 +21,10 @@ declare class ModalityClientImpl {
22
21
  private client;
23
22
  private transportConfig;
24
23
  private timeout;
24
+ private transport;
25
+ private connected;
25
26
  constructor(config: TransportConfig, timeout?: number);
27
+ private getOrCreateTransport;
26
28
  private createTransport;
27
29
  private getTransportIdentifier;
28
30
  /**
@@ -31,6 +33,11 @@ declare class ModalityClientImpl {
31
33
  */
32
34
  private closeTransportAndKillProcess;
33
35
  call(method: string, params?: any, autoParse?: boolean): Promise<any>;
36
+ /**
37
+ * Internal method for one-off calls with cleanup
38
+ * @param killProcess - If true, forcefully kill subprocess (for stdio transports)
39
+ */
40
+ private callOnceInternal;
34
41
  callOnce(method: string, params?: any, autoParse?: boolean): Promise<any>;
35
42
  /**
36
43
  * Call a tool once and kill the subprocess (for stdio transports only)
@@ -40,7 +47,7 @@ declare class ModalityClientImpl {
40
47
  callStream(method: string, params?: any, callback?: (p: any) => void): ReadableStream;
41
48
  close(): void;
42
49
  listTools(): Promise<ListToolsResult>;
43
- parseContent(toolResult: any): any;
50
+ parseContent(toolResult: any): unknown;
44
51
  }
45
52
  export type ModalityClientInstance = ModalityClientImpl;
46
53
  declare function http(url: string, timeout?: number, options?: StreamableHTTPClientTransportOptions): ModalityClientInstance;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0",
2
+ "version": "0.4.0",
3
3
  "name": "modality-ai",
4
4
  "repository": {
5
5
  "type": "git",
@@ -15,12 +15,12 @@
15
15
  "modality-mcp-kit": "^1.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@ai-sdk/google": "^3.0.5",
19
- "ai": "^6.0.14",
18
+ "@ai-sdk/google": "^3.0.18",
19
+ "ai": "^6.0.64",
20
20
  "ollama-ai-provider": "^1.2.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/bun": "^1.3.5",
23
+ "@types/bun": "^1.3.8",
24
24
  "modality-bun-kit": "^0.0.2",
25
25
  "typescript": "^5.9.3"
26
26
  },