keystone-cli 0.4.2 → 0.4.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/package.json
CHANGED
|
@@ -42,28 +42,24 @@ export const ConfigSchema = z.object({
|
|
|
42
42
|
workflows_directory: z.string().default('workflows'),
|
|
43
43
|
mcp_servers: z
|
|
44
44
|
.record(
|
|
45
|
-
z.
|
|
45
|
+
z.union([
|
|
46
|
+
// Local MCP server (command-based) - type is optional, defaults to 'local'
|
|
46
47
|
z.object({
|
|
47
|
-
type: z.literal('local').default('local'),
|
|
48
|
+
type: z.literal('local').optional().default('local'),
|
|
48
49
|
command: z.string(),
|
|
49
50
|
args: z.array(z.string()).optional(),
|
|
50
51
|
env: z.record(z.string()).optional(),
|
|
51
52
|
url: z.string().url().optional(),
|
|
52
|
-
oauth: z
|
|
53
|
-
|
|
54
|
-
scope: z.string().optional(),
|
|
55
|
-
})
|
|
56
|
-
.optional(),
|
|
53
|
+
oauth: z.union([z.object({ scope: z.string().optional() }), z.literal(false)]).optional(),
|
|
54
|
+
timeout: z.number().optional().default(60000),
|
|
57
55
|
}),
|
|
56
|
+
// Remote MCP server (URL-based)
|
|
58
57
|
z.object({
|
|
59
58
|
type: z.literal('remote'),
|
|
60
59
|
url: z.string().url(),
|
|
61
60
|
headers: z.record(z.string()).optional(),
|
|
62
|
-
oauth: z
|
|
63
|
-
|
|
64
|
-
scope: z.string().optional(),
|
|
65
|
-
})
|
|
66
|
-
.optional(),
|
|
61
|
+
oauth: z.union([z.object({ scope: z.string().optional() }), z.literal(false)]).optional(),
|
|
62
|
+
timeout: z.number().optional().default(60000),
|
|
67
63
|
}),
|
|
68
64
|
])
|
|
69
65
|
)
|
package/src/runner/mcp-client.ts
CHANGED
|
@@ -354,7 +354,7 @@ export class MCPClient {
|
|
|
354
354
|
this.timeout = timeout;
|
|
355
355
|
} else {
|
|
356
356
|
this.transport = transportOrCommand;
|
|
357
|
-
this.timeout =
|
|
357
|
+
this.timeout = timeoutOrArgs as number;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
this.transport.onMessage((response) => {
|
|
@@ -13,6 +13,7 @@ export interface MCPServerConfig {
|
|
|
13
13
|
oauth?: {
|
|
14
14
|
scope?: string;
|
|
15
15
|
};
|
|
16
|
+
timeout?: number;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export class MCPManager {
|
|
@@ -90,7 +91,7 @@ export class MCPManager {
|
|
|
90
91
|
headers.Authorization = `Bearer ${token}`;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
client = await MCPClient.createRemote(config.url, headers);
|
|
94
|
+
client = await MCPClient.createRemote(config.url, headers, config.timeout);
|
|
94
95
|
} else {
|
|
95
96
|
if (!config.command) throw new Error('Local MCP server missing command');
|
|
96
97
|
|
|
@@ -113,7 +114,12 @@ export class MCPManager {
|
|
|
113
114
|
env.MCP_TOKEN = token;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
client = await MCPClient.createLocal(
|
|
117
|
+
client = await MCPClient.createLocal(
|
|
118
|
+
config.command,
|
|
119
|
+
config.args || [],
|
|
120
|
+
env,
|
|
121
|
+
config.timeout
|
|
122
|
+
);
|
|
117
123
|
}
|
|
118
124
|
|
|
119
125
|
await client.initialize();
|