@wingman-ai/gateway 0.3.2 → 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.
- package/dist/agent/config/mcpClientManager.cjs +48 -9
- package/dist/agent/config/mcpClientManager.d.ts +12 -0
- package/dist/agent/config/mcpClientManager.js +48 -9
- package/dist/agent/tests/mcpClientManager.test.cjs +50 -0
- package/dist/agent/tests/mcpClientManager.test.js +50 -0
- package/dist/cli/commands/skill.cjs +12 -4
- package/dist/cli/commands/skill.js +12 -4
- package/dist/cli/config/jsonSchema.cjs +55 -0
- package/dist/cli/config/jsonSchema.d.ts +2 -0
- package/dist/cli/config/jsonSchema.js +18 -0
- package/dist/cli/config/loader.cjs +33 -1
- package/dist/cli/config/loader.js +33 -1
- package/dist/cli/config/schema.cjs +119 -2
- package/dist/cli/config/schema.d.ts +40 -0
- package/dist/cli/config/schema.js +119 -2
- package/dist/cli/core/agentInvoker.cjs +4 -1
- package/dist/cli/core/agentInvoker.d.ts +3 -0
- package/dist/cli/core/agentInvoker.js +4 -1
- package/dist/cli/services/skillRepository.cjs +138 -20
- package/dist/cli/services/skillRepository.d.ts +10 -2
- package/dist/cli/services/skillRepository.js +138 -20
- package/dist/cli/services/skillSecurityScanner.cjs +158 -0
- package/dist/cli/services/skillSecurityScanner.d.ts +28 -0
- package/dist/cli/services/skillSecurityScanner.js +121 -0
- package/dist/cli/services/skillService.cjs +44 -12
- package/dist/cli/services/skillService.d.ts +2 -0
- package/dist/cli/services/skillService.js +46 -14
- package/dist/cli/types/skill.d.ts +9 -0
- package/dist/gateway/server.cjs +5 -1
- package/dist/gateway/server.js +5 -1
- package/dist/gateway/types.d.ts +9 -0
- package/dist/tests/cli-config-loader.test.cjs +33 -1
- package/dist/tests/cli-config-loader.test.js +33 -1
- package/dist/tests/config-json-schema.test.cjs +25 -0
- package/dist/tests/config-json-schema.test.d.ts +1 -0
- package/dist/tests/config-json-schema.test.js +19 -0
- package/dist/tests/skill-repository.test.cjs +106 -0
- package/dist/tests/skill-repository.test.d.ts +1 -0
- package/dist/tests/skill-repository.test.js +100 -0
- package/dist/tests/skill-security-scanner.test.cjs +126 -0
- package/dist/tests/skill-security-scanner.test.d.ts +1 -0
- package/dist/tests/skill-security-scanner.test.js +120 -0
- package/dist/tests/uv.test.cjs +47 -0
- package/dist/tests/uv.test.d.ts +1 -0
- package/dist/tests/uv.test.js +41 -0
- package/dist/utils/uv.cjs +64 -0
- package/dist/utils/uv.d.ts +3 -0
- package/dist/utils/uv.js +24 -0
- package/package.json +2 -1
- package/skills/gog/SKILL.md +36 -0
- package/skills/weather/SKILL.md +49 -0
|
@@ -50,10 +50,54 @@ const SearchConfigSchema = external_zod_namespaceObject.object({
|
|
|
50
50
|
maxResults: external_zod_namespaceObject.number().min(1).max(20).optional().default(5).describe("Maximum number of search results to return")
|
|
51
51
|
});
|
|
52
52
|
const SkillsConfigSchema = external_zod_namespaceObject.object({
|
|
53
|
+
provider: external_zod_namespaceObject["enum"]([
|
|
54
|
+
"github",
|
|
55
|
+
"clawhub"
|
|
56
|
+
]).default("github").describe("Skill source provider"),
|
|
53
57
|
repositoryOwner: external_zod_namespaceObject.string().default("anthropics").describe("GitHub repository owner for skills"),
|
|
54
58
|
repositoryName: external_zod_namespaceObject.string().default("skills").describe("GitHub repository name for skills"),
|
|
55
59
|
githubToken: external_zod_namespaceObject.string().optional().describe("GitHub personal access token for higher API rate limits"),
|
|
56
|
-
|
|
60
|
+
clawhubBaseUrl: external_zod_namespaceObject.string().default("https://clawhub.ai").describe("Base URL for ClawHub skill API"),
|
|
61
|
+
skillsDirectory: external_zod_namespaceObject.string().default("skills").describe("Directory to install skills in"),
|
|
62
|
+
security: external_zod_namespaceObject.object({
|
|
63
|
+
scanOnInstall: external_zod_namespaceObject.boolean().optional().default(true).describe("Run a security scan for downloaded skills before installation"),
|
|
64
|
+
scannerCommand: external_zod_namespaceObject.string().optional().default("uvx").describe("Scanner runner command"),
|
|
65
|
+
scannerArgs: external_zod_namespaceObject.array(external_zod_namespaceObject.string().min(1)).optional().default([
|
|
66
|
+
"--from",
|
|
67
|
+
"mcp-scan>=0.4,<0.5",
|
|
68
|
+
"mcp-scan",
|
|
69
|
+
"--json",
|
|
70
|
+
"--skills"
|
|
71
|
+
]).describe("Arguments prepended before the skill path for scanner execution"),
|
|
72
|
+
blockIssueCodes: external_zod_namespaceObject.array(external_zod_namespaceObject.string().min(1)).optional().default([
|
|
73
|
+
"MCP501",
|
|
74
|
+
"MCP506",
|
|
75
|
+
"MCP507",
|
|
76
|
+
"MCP508",
|
|
77
|
+
"MCP509",
|
|
78
|
+
"MCP510",
|
|
79
|
+
"MCP511"
|
|
80
|
+
]).describe("Scanner issue codes that block installation")
|
|
81
|
+
}).optional().default({
|
|
82
|
+
scanOnInstall: true,
|
|
83
|
+
scannerCommand: "uvx",
|
|
84
|
+
scannerArgs: [
|
|
85
|
+
"--from",
|
|
86
|
+
"mcp-scan>=0.4,<0.5",
|
|
87
|
+
"mcp-scan",
|
|
88
|
+
"--json",
|
|
89
|
+
"--skills"
|
|
90
|
+
],
|
|
91
|
+
blockIssueCodes: [
|
|
92
|
+
"MCP501",
|
|
93
|
+
"MCP506",
|
|
94
|
+
"MCP507",
|
|
95
|
+
"MCP508",
|
|
96
|
+
"MCP509",
|
|
97
|
+
"MCP510",
|
|
98
|
+
"MCP511"
|
|
99
|
+
]
|
|
100
|
+
})
|
|
57
101
|
});
|
|
58
102
|
const BrowserTransportSchema = external_zod_namespaceObject["enum"]([
|
|
59
103
|
"auto",
|
|
@@ -172,6 +216,27 @@ const DiscordAdapterSchema = external_zod_namespaceObject.object({
|
|
|
172
216
|
const GatewayAdaptersSchema = external_zod_namespaceObject.object({
|
|
173
217
|
discord: DiscordAdapterSchema.optional()
|
|
174
218
|
}).default({});
|
|
219
|
+
const GatewayMcpProxySchema = external_zod_namespaceObject.object({
|
|
220
|
+
enabled: external_zod_namespaceObject.boolean().optional().default(false).describe("Enable MCP stdio proxy wrapper for gateway agent execution"),
|
|
221
|
+
command: external_zod_namespaceObject.string().optional().default("uvx").describe("Proxy runner command"),
|
|
222
|
+
baseArgs: external_zod_namespaceObject.array(external_zod_namespaceObject.string().min(1)).optional().default([
|
|
223
|
+
"invariant-gateway@latest",
|
|
224
|
+
"mcp"
|
|
225
|
+
]).describe("Base arguments used before gateway proxy flags"),
|
|
226
|
+
projectName: external_zod_namespaceObject.string().optional().default("wingman-gateway").describe("Project name passed to the proxy runtime"),
|
|
227
|
+
pushExplorer: external_zod_namespaceObject.boolean().optional().default(false).describe("Enable remote trace push in proxy runtime"),
|
|
228
|
+
apiKey: external_zod_namespaceObject.string().optional().describe("Optional proxy API key"),
|
|
229
|
+
apiUrl: external_zod_namespaceObject.string().optional().describe("Optional proxy API URL")
|
|
230
|
+
}).default({
|
|
231
|
+
enabled: false,
|
|
232
|
+
command: "uvx",
|
|
233
|
+
baseArgs: [
|
|
234
|
+
"invariant-gateway@latest",
|
|
235
|
+
"mcp"
|
|
236
|
+
],
|
|
237
|
+
projectName: "wingman-gateway",
|
|
238
|
+
pushExplorer: false
|
|
239
|
+
});
|
|
175
240
|
const GatewayConfigSchema = external_zod_namespaceObject.object({
|
|
176
241
|
host: external_zod_namespaceObject.string().default("127.0.0.1"),
|
|
177
242
|
port: external_zod_namespaceObject.number().min(1).max(65535).default(18789),
|
|
@@ -188,6 +253,16 @@ const GatewayConfigSchema = external_zod_namespaceObject.object({
|
|
|
188
253
|
allowInsecureAuth: false
|
|
189
254
|
}),
|
|
190
255
|
dynamicUiEnabled: external_zod_namespaceObject.boolean().optional().default(true),
|
|
256
|
+
mcpProxy: GatewayMcpProxySchema.optional().default({
|
|
257
|
+
enabled: false,
|
|
258
|
+
command: "uvx",
|
|
259
|
+
baseArgs: [
|
|
260
|
+
"invariant-gateway@latest",
|
|
261
|
+
"mcp"
|
|
262
|
+
],
|
|
263
|
+
projectName: "wingman-gateway",
|
|
264
|
+
pushExplorer: false
|
|
265
|
+
}),
|
|
191
266
|
adapters: GatewayAdaptersSchema.optional().default({})
|
|
192
267
|
}).default({
|
|
193
268
|
host: "127.0.0.1",
|
|
@@ -204,6 +279,16 @@ const GatewayConfigSchema = external_zod_namespaceObject.object({
|
|
|
204
279
|
allowInsecureAuth: false
|
|
205
280
|
},
|
|
206
281
|
dynamicUiEnabled: true,
|
|
282
|
+
mcpProxy: {
|
|
283
|
+
enabled: false,
|
|
284
|
+
command: "uvx",
|
|
285
|
+
baseArgs: [
|
|
286
|
+
"invariant-gateway@latest",
|
|
287
|
+
"mcp"
|
|
288
|
+
],
|
|
289
|
+
projectName: "wingman-gateway",
|
|
290
|
+
pushExplorer: false
|
|
291
|
+
},
|
|
207
292
|
adapters: {}
|
|
208
293
|
});
|
|
209
294
|
const AgentListItemSchema = external_zod_namespaceObject.object({
|
|
@@ -301,9 +386,31 @@ const WingmanConfigSchema = external_zod_namespaceObject.object({
|
|
|
301
386
|
outputMode: "auto"
|
|
302
387
|
}),
|
|
303
388
|
skills: SkillsConfigSchema.optional().default({
|
|
389
|
+
provider: "github",
|
|
304
390
|
repositoryOwner: "anthropics",
|
|
305
391
|
repositoryName: "skills",
|
|
306
|
-
|
|
392
|
+
clawhubBaseUrl: "https://clawhub.ai",
|
|
393
|
+
skillsDirectory: "skills",
|
|
394
|
+
security: {
|
|
395
|
+
scanOnInstall: true,
|
|
396
|
+
scannerCommand: "uvx",
|
|
397
|
+
scannerArgs: [
|
|
398
|
+
"--from",
|
|
399
|
+
"mcp-scan>=0.4,<0.5",
|
|
400
|
+
"mcp-scan",
|
|
401
|
+
"--json",
|
|
402
|
+
"--skills"
|
|
403
|
+
],
|
|
404
|
+
blockIssueCodes: [
|
|
405
|
+
"MCP501",
|
|
406
|
+
"MCP506",
|
|
407
|
+
"MCP507",
|
|
408
|
+
"MCP508",
|
|
409
|
+
"MCP509",
|
|
410
|
+
"MCP510",
|
|
411
|
+
"MCP511"
|
|
412
|
+
]
|
|
413
|
+
}
|
|
307
414
|
}),
|
|
308
415
|
browser: BrowserConfigSchema.optional().default({
|
|
309
416
|
profilesDir: ".wingman/browser-profiles",
|
|
@@ -335,6 +442,16 @@ const WingmanConfigSchema = external_zod_namespaceObject.object({
|
|
|
335
442
|
allowInsecureAuth: false
|
|
336
443
|
},
|
|
337
444
|
dynamicUiEnabled: true,
|
|
445
|
+
mcpProxy: {
|
|
446
|
+
enabled: false,
|
|
447
|
+
command: "uvx",
|
|
448
|
+
baseArgs: [
|
|
449
|
+
"invariant-gateway@latest",
|
|
450
|
+
"mcp"
|
|
451
|
+
],
|
|
452
|
+
projectName: "wingman-gateway",
|
|
453
|
+
pushExplorer: false
|
|
454
|
+
},
|
|
338
455
|
adapters: {}
|
|
339
456
|
}),
|
|
340
457
|
agents: AgentsConfigSchema.optional().default({
|
|
@@ -8,10 +8,21 @@ export declare const SearchConfigSchema: z.ZodObject<{
|
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export type SearchConfig = z.infer<typeof SearchConfigSchema>;
|
|
10
10
|
export declare const SkillsConfigSchema: z.ZodObject<{
|
|
11
|
+
provider: z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
github: "github";
|
|
13
|
+
clawhub: "clawhub";
|
|
14
|
+
}>>;
|
|
11
15
|
repositoryOwner: z.ZodDefault<z.ZodString>;
|
|
12
16
|
repositoryName: z.ZodDefault<z.ZodString>;
|
|
13
17
|
githubToken: z.ZodOptional<z.ZodString>;
|
|
18
|
+
clawhubBaseUrl: z.ZodDefault<z.ZodString>;
|
|
14
19
|
skillsDirectory: z.ZodDefault<z.ZodString>;
|
|
20
|
+
security: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
21
|
+
scanOnInstall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
22
|
+
scannerCommand: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
scannerArgs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
24
|
+
blockIssueCodes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
25
|
+
}, z.core.$strip>>>;
|
|
15
26
|
}, z.core.$strip>;
|
|
16
27
|
export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
|
|
17
28
|
export declare const BrowserTransportSchema: z.ZodEnum<{
|
|
@@ -110,6 +121,15 @@ export declare const GatewayConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
110
121
|
allowInsecureAuth: z.ZodDefault<z.ZodBoolean>;
|
|
111
122
|
}, z.core.$strip>>>>;
|
|
112
123
|
dynamicUiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
124
|
+
mcpProxy: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
125
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
126
|
+
command: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
127
|
+
baseArgs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
128
|
+
projectName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
129
|
+
pushExplorer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
130
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
131
|
+
apiUrl: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>>>>;
|
|
113
133
|
adapters: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
114
134
|
discord: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
115
135
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -292,10 +312,21 @@ export declare const WingmanConfigSchema: z.ZodObject<{
|
|
|
292
312
|
}>>;
|
|
293
313
|
}, z.core.$strip>>;
|
|
294
314
|
skills: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
315
|
+
provider: z.ZodDefault<z.ZodEnum<{
|
|
316
|
+
github: "github";
|
|
317
|
+
clawhub: "clawhub";
|
|
318
|
+
}>>;
|
|
295
319
|
repositoryOwner: z.ZodDefault<z.ZodString>;
|
|
296
320
|
repositoryName: z.ZodDefault<z.ZodString>;
|
|
297
321
|
githubToken: z.ZodOptional<z.ZodString>;
|
|
322
|
+
clawhubBaseUrl: z.ZodDefault<z.ZodString>;
|
|
298
323
|
skillsDirectory: z.ZodDefault<z.ZodString>;
|
|
324
|
+
security: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
325
|
+
scanOnInstall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
326
|
+
scannerCommand: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
327
|
+
scannerArgs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
328
|
+
blockIssueCodes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
329
|
+
}, z.core.$strip>>>;
|
|
299
330
|
}, z.core.$strip>>>;
|
|
300
331
|
browser: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
301
332
|
profilesDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -340,6 +371,15 @@ export declare const WingmanConfigSchema: z.ZodObject<{
|
|
|
340
371
|
allowInsecureAuth: z.ZodDefault<z.ZodBoolean>;
|
|
341
372
|
}, z.core.$strip>>>>;
|
|
342
373
|
dynamicUiEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
374
|
+
mcpProxy: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
375
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
376
|
+
command: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
377
|
+
baseArgs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
378
|
+
projectName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
379
|
+
pushExplorer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
380
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
381
|
+
apiUrl: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, z.core.$strip>>>>;
|
|
343
383
|
adapters: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
344
384
|
discord: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
345
385
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -11,10 +11,54 @@ const SearchConfigSchema = object({
|
|
|
11
11
|
maxResults: number().min(1).max(20).optional().default(5).describe("Maximum number of search results to return")
|
|
12
12
|
});
|
|
13
13
|
const SkillsConfigSchema = object({
|
|
14
|
+
provider: external_zod_enum([
|
|
15
|
+
"github",
|
|
16
|
+
"clawhub"
|
|
17
|
+
]).default("github").describe("Skill source provider"),
|
|
14
18
|
repositoryOwner: string().default("anthropics").describe("GitHub repository owner for skills"),
|
|
15
19
|
repositoryName: string().default("skills").describe("GitHub repository name for skills"),
|
|
16
20
|
githubToken: string().optional().describe("GitHub personal access token for higher API rate limits"),
|
|
17
|
-
|
|
21
|
+
clawhubBaseUrl: string().default("https://clawhub.ai").describe("Base URL for ClawHub skill API"),
|
|
22
|
+
skillsDirectory: string().default("skills").describe("Directory to install skills in"),
|
|
23
|
+
security: object({
|
|
24
|
+
scanOnInstall: external_zod_boolean().optional().default(true).describe("Run a security scan for downloaded skills before installation"),
|
|
25
|
+
scannerCommand: string().optional().default("uvx").describe("Scanner runner command"),
|
|
26
|
+
scannerArgs: array(string().min(1)).optional().default([
|
|
27
|
+
"--from",
|
|
28
|
+
"mcp-scan>=0.4,<0.5",
|
|
29
|
+
"mcp-scan",
|
|
30
|
+
"--json",
|
|
31
|
+
"--skills"
|
|
32
|
+
]).describe("Arguments prepended before the skill path for scanner execution"),
|
|
33
|
+
blockIssueCodes: array(string().min(1)).optional().default([
|
|
34
|
+
"MCP501",
|
|
35
|
+
"MCP506",
|
|
36
|
+
"MCP507",
|
|
37
|
+
"MCP508",
|
|
38
|
+
"MCP509",
|
|
39
|
+
"MCP510",
|
|
40
|
+
"MCP511"
|
|
41
|
+
]).describe("Scanner issue codes that block installation")
|
|
42
|
+
}).optional().default({
|
|
43
|
+
scanOnInstall: true,
|
|
44
|
+
scannerCommand: "uvx",
|
|
45
|
+
scannerArgs: [
|
|
46
|
+
"--from",
|
|
47
|
+
"mcp-scan>=0.4,<0.5",
|
|
48
|
+
"mcp-scan",
|
|
49
|
+
"--json",
|
|
50
|
+
"--skills"
|
|
51
|
+
],
|
|
52
|
+
blockIssueCodes: [
|
|
53
|
+
"MCP501",
|
|
54
|
+
"MCP506",
|
|
55
|
+
"MCP507",
|
|
56
|
+
"MCP508",
|
|
57
|
+
"MCP509",
|
|
58
|
+
"MCP510",
|
|
59
|
+
"MCP511"
|
|
60
|
+
]
|
|
61
|
+
})
|
|
18
62
|
});
|
|
19
63
|
const BrowserTransportSchema = external_zod_enum([
|
|
20
64
|
"auto",
|
|
@@ -133,6 +177,27 @@ const DiscordAdapterSchema = object({
|
|
|
133
177
|
const GatewayAdaptersSchema = object({
|
|
134
178
|
discord: DiscordAdapterSchema.optional()
|
|
135
179
|
}).default({});
|
|
180
|
+
const GatewayMcpProxySchema = object({
|
|
181
|
+
enabled: external_zod_boolean().optional().default(false).describe("Enable MCP stdio proxy wrapper for gateway agent execution"),
|
|
182
|
+
command: string().optional().default("uvx").describe("Proxy runner command"),
|
|
183
|
+
baseArgs: array(string().min(1)).optional().default([
|
|
184
|
+
"invariant-gateway@latest",
|
|
185
|
+
"mcp"
|
|
186
|
+
]).describe("Base arguments used before gateway proxy flags"),
|
|
187
|
+
projectName: string().optional().default("wingman-gateway").describe("Project name passed to the proxy runtime"),
|
|
188
|
+
pushExplorer: external_zod_boolean().optional().default(false).describe("Enable remote trace push in proxy runtime"),
|
|
189
|
+
apiKey: string().optional().describe("Optional proxy API key"),
|
|
190
|
+
apiUrl: string().optional().describe("Optional proxy API URL")
|
|
191
|
+
}).default({
|
|
192
|
+
enabled: false,
|
|
193
|
+
command: "uvx",
|
|
194
|
+
baseArgs: [
|
|
195
|
+
"invariant-gateway@latest",
|
|
196
|
+
"mcp"
|
|
197
|
+
],
|
|
198
|
+
projectName: "wingman-gateway",
|
|
199
|
+
pushExplorer: false
|
|
200
|
+
});
|
|
136
201
|
const GatewayConfigSchema = object({
|
|
137
202
|
host: string().default("127.0.0.1"),
|
|
138
203
|
port: number().min(1).max(65535).default(18789),
|
|
@@ -149,6 +214,16 @@ const GatewayConfigSchema = object({
|
|
|
149
214
|
allowInsecureAuth: false
|
|
150
215
|
}),
|
|
151
216
|
dynamicUiEnabled: external_zod_boolean().optional().default(true),
|
|
217
|
+
mcpProxy: GatewayMcpProxySchema.optional().default({
|
|
218
|
+
enabled: false,
|
|
219
|
+
command: "uvx",
|
|
220
|
+
baseArgs: [
|
|
221
|
+
"invariant-gateway@latest",
|
|
222
|
+
"mcp"
|
|
223
|
+
],
|
|
224
|
+
projectName: "wingman-gateway",
|
|
225
|
+
pushExplorer: false
|
|
226
|
+
}),
|
|
152
227
|
adapters: GatewayAdaptersSchema.optional().default({})
|
|
153
228
|
}).default({
|
|
154
229
|
host: "127.0.0.1",
|
|
@@ -165,6 +240,16 @@ const GatewayConfigSchema = object({
|
|
|
165
240
|
allowInsecureAuth: false
|
|
166
241
|
},
|
|
167
242
|
dynamicUiEnabled: true,
|
|
243
|
+
mcpProxy: {
|
|
244
|
+
enabled: false,
|
|
245
|
+
command: "uvx",
|
|
246
|
+
baseArgs: [
|
|
247
|
+
"invariant-gateway@latest",
|
|
248
|
+
"mcp"
|
|
249
|
+
],
|
|
250
|
+
projectName: "wingman-gateway",
|
|
251
|
+
pushExplorer: false
|
|
252
|
+
},
|
|
168
253
|
adapters: {}
|
|
169
254
|
});
|
|
170
255
|
const AgentListItemSchema = object({
|
|
@@ -262,9 +347,31 @@ const WingmanConfigSchema = object({
|
|
|
262
347
|
outputMode: "auto"
|
|
263
348
|
}),
|
|
264
349
|
skills: SkillsConfigSchema.optional().default({
|
|
350
|
+
provider: "github",
|
|
265
351
|
repositoryOwner: "anthropics",
|
|
266
352
|
repositoryName: "skills",
|
|
267
|
-
|
|
353
|
+
clawhubBaseUrl: "https://clawhub.ai",
|
|
354
|
+
skillsDirectory: "skills",
|
|
355
|
+
security: {
|
|
356
|
+
scanOnInstall: true,
|
|
357
|
+
scannerCommand: "uvx",
|
|
358
|
+
scannerArgs: [
|
|
359
|
+
"--from",
|
|
360
|
+
"mcp-scan>=0.4,<0.5",
|
|
361
|
+
"mcp-scan",
|
|
362
|
+
"--json",
|
|
363
|
+
"--skills"
|
|
364
|
+
],
|
|
365
|
+
blockIssueCodes: [
|
|
366
|
+
"MCP501",
|
|
367
|
+
"MCP506",
|
|
368
|
+
"MCP507",
|
|
369
|
+
"MCP508",
|
|
370
|
+
"MCP509",
|
|
371
|
+
"MCP510",
|
|
372
|
+
"MCP511"
|
|
373
|
+
]
|
|
374
|
+
}
|
|
268
375
|
}),
|
|
269
376
|
browser: BrowserConfigSchema.optional().default({
|
|
270
377
|
profilesDir: ".wingman/browser-profiles",
|
|
@@ -296,6 +403,16 @@ const WingmanConfigSchema = object({
|
|
|
296
403
|
allowInsecureAuth: false
|
|
297
404
|
},
|
|
298
405
|
dynamicUiEnabled: true,
|
|
406
|
+
mcpProxy: {
|
|
407
|
+
enabled: false,
|
|
408
|
+
command: "uvx",
|
|
409
|
+
baseArgs: [
|
|
410
|
+
"invariant-gateway@latest",
|
|
411
|
+
"mcp"
|
|
412
|
+
],
|
|
413
|
+
projectName: "wingman-gateway",
|
|
414
|
+
pushExplorer: false
|
|
415
|
+
},
|
|
299
416
|
adapters: {}
|
|
300
417
|
}),
|
|
301
418
|
agents: AgentsConfigSchema.optional().default({
|
|
@@ -345,7 +345,8 @@ class AgentInvoker {
|
|
|
345
345
|
if (mcpConfigs.length > 0) {
|
|
346
346
|
this.logger.debug("Initializing MCP client for agent invocation");
|
|
347
347
|
this.mcpManager = new mcpClientManager_cjs_namespaceObject.MCPClientManager(mcpConfigs, this.logger, {
|
|
348
|
-
executionWorkspace
|
|
348
|
+
executionWorkspace,
|
|
349
|
+
proxyConfig: this.mcpProxyConfig
|
|
349
350
|
});
|
|
350
351
|
await this.mcpManager.initialize();
|
|
351
352
|
const mcpTools = await this.mcpManager.getTools();
|
|
@@ -600,6 +601,7 @@ class AgentInvoker {
|
|
|
600
601
|
_define_property(this, "terminalSessionManager", void 0);
|
|
601
602
|
_define_property(this, "workdir", null);
|
|
602
603
|
_define_property(this, "defaultOutputDir", null);
|
|
604
|
+
_define_property(this, "mcpProxyConfig", void 0);
|
|
603
605
|
this.outputManager = options.outputManager;
|
|
604
606
|
this.logger = options.logger;
|
|
605
607
|
this.workspace = options.workspace || process.cwd();
|
|
@@ -608,6 +610,7 @@ class AgentInvoker {
|
|
|
608
610
|
this.terminalSessionManager = options.terminalSessionManager || (0, terminal_session_manager_cjs_namespaceObject.getSharedTerminalSessionManager)();
|
|
609
611
|
this.workdir = options.workdir || null;
|
|
610
612
|
this.defaultOutputDir = options.defaultOutputDir || null;
|
|
613
|
+
this.mcpProxyConfig = options.mcpProxyConfig;
|
|
611
614
|
const configLoader = new loader_cjs_namespaceObject.WingmanConfigLoader(this.configDir, this.workspace);
|
|
612
615
|
this.wingmanConfig = configLoader.loadConfig();
|
|
613
616
|
this.loader = new agentLoader_cjs_namespaceObject.AgentLoader(this.configDir, this.workspace, this.wingmanConfig);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WingmanAgentConfig } from "@/agent/config/agentConfig.js";
|
|
2
|
+
import { type MCPProxyConfig } from "@/agent/config/mcpClientManager.js";
|
|
2
3
|
import { type TerminalSessionManager } from "@/agent/tools/terminal_session_manager.js";
|
|
3
4
|
import type { WingmanAgent } from "@/types/agents.js";
|
|
4
5
|
import type { Logger } from "../../logger.js";
|
|
@@ -14,6 +15,7 @@ export interface AgentInvokerOptions {
|
|
|
14
15
|
terminalSessionManager?: TerminalSessionManager;
|
|
15
16
|
workdir?: string | null;
|
|
16
17
|
defaultOutputDir?: string | null;
|
|
18
|
+
mcpProxyConfig?: MCPProxyConfig;
|
|
17
19
|
}
|
|
18
20
|
export interface InvokeAgentOptions {
|
|
19
21
|
signal?: AbortSignal;
|
|
@@ -149,6 +151,7 @@ export declare class AgentInvoker {
|
|
|
149
151
|
private terminalSessionManager;
|
|
150
152
|
private workdir;
|
|
151
153
|
private defaultOutputDir;
|
|
154
|
+
private mcpProxyConfig;
|
|
152
155
|
constructor(options: AgentInvokerOptions);
|
|
153
156
|
findAllAgents(): WingmanAgentConfig[];
|
|
154
157
|
/**
|
|
@@ -296,7 +296,8 @@ class AgentInvoker {
|
|
|
296
296
|
if (mcpConfigs.length > 0) {
|
|
297
297
|
this.logger.debug("Initializing MCP client for agent invocation");
|
|
298
298
|
this.mcpManager = new MCPClientManager(mcpConfigs, this.logger, {
|
|
299
|
-
executionWorkspace
|
|
299
|
+
executionWorkspace,
|
|
300
|
+
proxyConfig: this.mcpProxyConfig
|
|
300
301
|
});
|
|
301
302
|
await this.mcpManager.initialize();
|
|
302
303
|
const mcpTools = await this.mcpManager.getTools();
|
|
@@ -551,6 +552,7 @@ class AgentInvoker {
|
|
|
551
552
|
_define_property(this, "terminalSessionManager", void 0);
|
|
552
553
|
_define_property(this, "workdir", null);
|
|
553
554
|
_define_property(this, "defaultOutputDir", null);
|
|
555
|
+
_define_property(this, "mcpProxyConfig", void 0);
|
|
554
556
|
this.outputManager = options.outputManager;
|
|
555
557
|
this.logger = options.logger;
|
|
556
558
|
this.workspace = options.workspace || process.cwd();
|
|
@@ -559,6 +561,7 @@ class AgentInvoker {
|
|
|
559
561
|
this.terminalSessionManager = options.terminalSessionManager || getSharedTerminalSessionManager();
|
|
560
562
|
this.workdir = options.workdir || null;
|
|
561
563
|
this.defaultOutputDir = options.defaultOutputDir || null;
|
|
564
|
+
this.mcpProxyConfig = options.mcpProxyConfig;
|
|
562
565
|
const configLoader = new WingmanConfigLoader(this.configDir, this.workspace);
|
|
563
566
|
this.wingmanConfig = configLoader.loadConfig();
|
|
564
567
|
this.loader = new AgentLoader(this.configDir, this.workspace, this.wingmanConfig);
|