muxed 0.1.1 → 0.2.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.
@@ -6,6 +6,7 @@ type StdioServerConfig = {
6
6
  args?: string[];
7
7
  env?: Record<string, string>;
8
8
  cwd?: string;
9
+ timeout?: number;
9
10
  };
10
11
  type ClientCredentialsAuth = {
11
12
  type: 'client_credentials';
@@ -33,6 +34,7 @@ type HttpServerConfig = {
33
34
  maxRetries?: number;
34
35
  };
35
36
  auth?: OAuthConfig;
37
+ timeout?: number;
36
38
  };
37
39
  type ServerConfig = StdioServerConfig | HttpServerConfig;
38
40
  type DaemonConfig = {
@@ -82,7 +84,8 @@ type CreateClientOptions = {
82
84
  autoStart?: boolean;
83
85
  };
84
86
  type CallOptions = {
85
- /** Request timeout in milliseconds. */timeout?: number;
87
+ /** Request timeout in milliseconds. */timeout?: number; /** Dot-notation field paths to extract from the response. */
88
+ fields?: string[];
86
89
  };
87
90
  type CallResult = {
88
91
  content: Array<{
@@ -117,6 +120,16 @@ type ReloadResult = {
117
120
  removed: string[];
118
121
  changed: string[];
119
122
  };
123
+ type ValidationResult = {
124
+ valid: boolean;
125
+ errors: string[];
126
+ warnings: string[]; /** True when the tool's schema uses features not supported by dry-run validation. */
127
+ unsupported?: boolean;
128
+ tool?: {
129
+ name: string;
130
+ annotations?: Record<string, unknown>;
131
+ };
132
+ };
120
133
  type TaskStatus = Record<string, unknown>;
121
134
  type TaskResult = Record<string, unknown>;
122
135
  type TaskCancelResult = Record<string, unknown>;
@@ -135,6 +148,7 @@ declare class MuxedClient {
135
148
  tool: Tool$1;
136
149
  }>>;
137
150
  call<K extends string>(name: HasTools extends true ? (K extends keyof MuxedToolMap ? K : K & {}) : string, args?: K extends keyof MuxedToolMap ? MuxedToolMap[K]['input'] : Record<string, unknown>, options?: CallOptions): Promise<K extends keyof MuxedToolMap ? MuxedToolMap[K]['output'] : CallResult>;
151
+ validate(name: string, args?: Record<string, unknown>): Promise<ValidationResult>;
138
152
  callAsync(name: string, args?: Record<string, unknown>): Promise<TaskHandle>;
139
153
  resources(server?: string): Promise<Array<{
140
154
  server: string;
@@ -168,4 +182,4 @@ declare class MuxedClient {
168
182
  }
169
183
  declare function createClient(options?: CreateClientOptions): Promise<MuxedClient>;
170
184
  //#endregion
171
- export { CallOptions, CallResult, CreateClientOptions, type DaemonConfig, DaemonStatus, type HttpServerConfig, MuxedClient, MuxedError, MuxedToolMap, type Prompt, ReloadResult, type Resource, type ServerConfig, type ServerState, type StdioServerConfig, TaskCancelResult, TaskHandle, TaskResult, TaskStatus, type Tool, createClient };
185
+ export { CallOptions, CallResult, CreateClientOptions, type DaemonConfig, DaemonStatus, type HttpServerConfig, MuxedClient, MuxedError, MuxedToolMap, type Prompt, ReloadResult, type Resource, type ServerConfig, type ServerState, type StdioServerConfig, TaskCancelResult, TaskHandle, TaskResult, TaskStatus, type Tool, ValidationResult, createClient };
@@ -276,7 +276,14 @@ var MuxedClient = class {
276
276
  return await this.#send("tools/call", {
277
277
  name,
278
278
  arguments: args ?? {},
279
- ...options?.timeout ? { timeout: options.timeout } : {}
279
+ ...options?.timeout ? { timeout: options.timeout } : {},
280
+ ...options?.fields ? { fields: options.fields } : {}
281
+ });
282
+ }
283
+ async validate(name, args) {
284
+ return await this.#send("tools/validate", {
285
+ name,
286
+ arguments: args ?? {}
280
287
  });
281
288
  }
282
289
  async callAsync(name, args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muxed",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server daemon and aggregator CLI – aggregate all your Model Context Protocol servers behind a single background daemon with lazy start, auto-reconnect, and idle shutdown",
5
5
  "type": "module",
6
6
  "exports": {
@@ -67,6 +67,7 @@
67
67
  "@modelcontextprotocol/sdk": "^1.26.0",
68
68
  "commander": "^14.0.0",
69
69
  "json-schema-to-typescript": "^15.0.4",
70
+ "posthog-node": "^4.18.0",
70
71
  "zod": "^4.3.6"
71
72
  },
72
73
  "devDependencies": {