@wingman-ai/gateway 0.3.1 → 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.
Files changed (59) hide show
  1. package/dist/agent/config/mcpClientManager.cjs +48 -9
  2. package/dist/agent/config/mcpClientManager.d.ts +12 -0
  3. package/dist/agent/config/mcpClientManager.js +48 -9
  4. package/dist/agent/tests/internet_search.test.cjs +22 -28
  5. package/dist/agent/tests/internet_search.test.js +22 -28
  6. package/dist/agent/tests/mcpClientManager.test.cjs +50 -0
  7. package/dist/agent/tests/mcpClientManager.test.js +50 -0
  8. package/dist/agent/tools/internet_search.cjs +9 -5
  9. package/dist/agent/tools/internet_search.js +9 -5
  10. package/dist/cli/commands/skill.cjs +12 -4
  11. package/dist/cli/commands/skill.js +12 -4
  12. package/dist/cli/config/jsonSchema.cjs +55 -0
  13. package/dist/cli/config/jsonSchema.d.ts +2 -0
  14. package/dist/cli/config/jsonSchema.js +18 -0
  15. package/dist/cli/config/loader.cjs +33 -1
  16. package/dist/cli/config/loader.js +33 -1
  17. package/dist/cli/config/schema.cjs +119 -2
  18. package/dist/cli/config/schema.d.ts +40 -0
  19. package/dist/cli/config/schema.js +119 -2
  20. package/dist/cli/core/agentInvoker.cjs +4 -1
  21. package/dist/cli/core/agentInvoker.d.ts +3 -0
  22. package/dist/cli/core/agentInvoker.js +4 -1
  23. package/dist/cli/services/skillRepository.cjs +138 -20
  24. package/dist/cli/services/skillRepository.d.ts +10 -2
  25. package/dist/cli/services/skillRepository.js +138 -20
  26. package/dist/cli/services/skillSecurityScanner.cjs +158 -0
  27. package/dist/cli/services/skillSecurityScanner.d.ts +28 -0
  28. package/dist/cli/services/skillSecurityScanner.js +121 -0
  29. package/dist/cli/services/skillService.cjs +44 -12
  30. package/dist/cli/services/skillService.d.ts +2 -0
  31. package/dist/cli/services/skillService.js +46 -14
  32. package/dist/cli/types/skill.d.ts +9 -0
  33. package/dist/gateway/server.cjs +5 -1
  34. package/dist/gateway/server.js +5 -1
  35. package/dist/gateway/types.d.ts +9 -0
  36. package/dist/tests/cli-config-loader.test.cjs +33 -1
  37. package/dist/tests/cli-config-loader.test.js +33 -1
  38. package/dist/tests/config-json-schema.test.cjs +25 -0
  39. package/dist/tests/config-json-schema.test.d.ts +1 -0
  40. package/dist/tests/config-json-schema.test.js +19 -0
  41. package/dist/tests/skill-repository.test.cjs +106 -0
  42. package/dist/tests/skill-repository.test.d.ts +1 -0
  43. package/dist/tests/skill-repository.test.js +100 -0
  44. package/dist/tests/skill-security-scanner.test.cjs +126 -0
  45. package/dist/tests/skill-security-scanner.test.d.ts +1 -0
  46. package/dist/tests/skill-security-scanner.test.js +120 -0
  47. package/dist/tests/uv.test.cjs +47 -0
  48. package/dist/tests/uv.test.d.ts +1 -0
  49. package/dist/tests/uv.test.js +41 -0
  50. package/dist/utils/uv.cjs +64 -0
  51. package/dist/utils/uv.d.ts +3 -0
  52. package/dist/utils/uv.js +24 -0
  53. package/dist/webui/assets/index-Cwkg4DKj.css +11 -0
  54. package/dist/webui/assets/{index-C8-oboEC.js → index-DHbfLOUR.js} +21 -19
  55. package/dist/webui/index.html +2 -2
  56. package/package.json +2 -3
  57. package/skills/gog/SKILL.md +36 -0
  58. package/skills/weather/SKILL.md +49 -0
  59. package/dist/webui/assets/index-BW9nM0J2.css +0 -11
@@ -13,14 +13,17 @@ async function executeSkillCommand(args, options = {}) {
13
13
  const config = configLoader.loadConfig();
14
14
  try {
15
15
  const repository = new SkillRepository({
16
+ provider: config.skills?.provider,
16
17
  repositoryOwner: config.skills?.repositoryOwner,
17
18
  repositoryName: config.skills?.repositoryName,
18
- githubToken: config.skills?.githubToken
19
+ githubToken: config.skills?.githubToken,
20
+ clawhubBaseUrl: config.skills?.clawhubBaseUrl
19
21
  });
20
22
  const service = new SkillService(repository, outputManager, logger, {
21
23
  workspace,
22
24
  skillsDirectory: config.skills?.skillsDirectory,
23
- outputMode: args.outputMode
25
+ outputMode: args.outputMode,
26
+ security: config.skills?.security
24
27
  });
25
28
  const subcommand = args.subcommand;
26
29
  const subcommandArgs = args.args;
@@ -72,7 +75,7 @@ async function executeSkillCommand(args, options = {}) {
72
75
  }
73
76
  function showSkillHelp(outputManager) {
74
77
  if ("interactive" === outputManager.getMode()) console.log(`
75
- Wingman Skill Manager - Install skills from the Anthropic skills repository
78
+ Wingman Skill Manager - Install skills from configured registries
76
79
 
77
80
  Usage:
78
81
  wingman skill browse Browse available skills
@@ -95,10 +98,15 @@ Configuration:
95
98
  Skills can be configured in .wingman/wingman.config.json:
96
99
  {
97
100
  "skills": {
101
+ "provider": "github",
98
102
  "repositoryOwner": "anthropics",
99
103
  "repositoryName": "skills",
100
104
  "githubToken": "optional-token",
101
- "skillsDirectory": "skills"
105
+ "clawhubBaseUrl": "https://clawhub.ai",
106
+ "skillsDirectory": "skills",
107
+ "security": {
108
+ "scanOnInstall": true
109
+ }
102
110
  }
103
111
  }
104
112
  `);
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ buildWingmanConfigJsonSchema: ()=>buildWingmanConfigJsonSchema,
28
+ WINGMAN_CONFIG_JSON_SCHEMA_ID: ()=>WINGMAN_CONFIG_JSON_SCHEMA_ID
29
+ });
30
+ const external_zod_namespaceObject = require("zod");
31
+ const external_schema_cjs_namespaceObject = require("./schema.cjs");
32
+ const WINGMAN_CONFIG_JSON_SCHEMA_ID = "https://getwingmanai.com/schemas/wingman.config.schema.json";
33
+ function buildWingmanConfigJsonSchema() {
34
+ const schema = external_zod_namespaceObject.toJSONSchema(external_schema_cjs_namespaceObject.WingmanConfigSchema, {
35
+ target: "draft-2020-12",
36
+ unrepresentable: "any"
37
+ });
38
+ const { $schema: _ignored, ...schemaWithoutMeta } = schema;
39
+ return {
40
+ $schema: "https://json-schema.org/draft/2020-12/schema",
41
+ $id: WINGMAN_CONFIG_JSON_SCHEMA_ID,
42
+ title: "Wingman Config",
43
+ description: "Schema for .wingman/wingman.config.json",
44
+ ...schemaWithoutMeta
45
+ };
46
+ }
47
+ exports.WINGMAN_CONFIG_JSON_SCHEMA_ID = __webpack_exports__.WINGMAN_CONFIG_JSON_SCHEMA_ID;
48
+ exports.buildWingmanConfigJsonSchema = __webpack_exports__.buildWingmanConfigJsonSchema;
49
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
50
+ "WINGMAN_CONFIG_JSON_SCHEMA_ID",
51
+ "buildWingmanConfigJsonSchema"
52
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
53
+ Object.defineProperty(exports, '__esModule', {
54
+ value: true
55
+ });
@@ -0,0 +1,2 @@
1
+ export declare const WINGMAN_CONFIG_JSON_SCHEMA_ID = "https://getwingmanai.com/schemas/wingman.config.schema.json";
2
+ export declare function buildWingmanConfigJsonSchema(): Record<string, unknown>;
@@ -0,0 +1,18 @@
1
+ import { toJSONSchema } from "zod";
2
+ import { WingmanConfigSchema } from "./schema.js";
3
+ const WINGMAN_CONFIG_JSON_SCHEMA_ID = "https://getwingmanai.com/schemas/wingman.config.schema.json";
4
+ function buildWingmanConfigJsonSchema() {
5
+ const schema = toJSONSchema(WingmanConfigSchema, {
6
+ target: "draft-2020-12",
7
+ unrepresentable: "any"
8
+ });
9
+ const { $schema: _ignored, ...schemaWithoutMeta } = schema;
10
+ return {
11
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12
+ $id: WINGMAN_CONFIG_JSON_SCHEMA_ID,
13
+ title: "Wingman Config",
14
+ description: "Schema for .wingman/wingman.config.json",
15
+ ...schemaWithoutMeta
16
+ };
17
+ }
18
+ export { WINGMAN_CONFIG_JSON_SCHEMA_ID, buildWingmanConfigJsonSchema };
@@ -133,9 +133,31 @@ class WingmanConfigLoader {
133
133
  outputMode: "auto"
134
134
  },
135
135
  skills: {
136
+ provider: "github",
136
137
  repositoryOwner: "anthropics",
137
138
  repositoryName: "skills",
138
- skillsDirectory: "skills"
139
+ clawhubBaseUrl: "https://clawhub.ai",
140
+ skillsDirectory: "skills",
141
+ security: {
142
+ scanOnInstall: true,
143
+ scannerCommand: "uvx",
144
+ scannerArgs: [
145
+ "--from",
146
+ "mcp-scan>=0.4,<0.5",
147
+ "mcp-scan",
148
+ "--json",
149
+ "--skills"
150
+ ],
151
+ blockIssueCodes: [
152
+ "MCP501",
153
+ "MCP506",
154
+ "MCP507",
155
+ "MCP508",
156
+ "MCP509",
157
+ "MCP510",
158
+ "MCP511"
159
+ ]
160
+ }
139
161
  },
140
162
  browser: {
141
163
  profilesDir: ".wingman/browser-profiles",
@@ -167,6 +189,16 @@ class WingmanConfigLoader {
167
189
  allowInsecureAuth: false
168
190
  },
169
191
  dynamicUiEnabled: true,
192
+ mcpProxy: {
193
+ enabled: false,
194
+ command: "uvx",
195
+ baseArgs: [
196
+ "invariant-gateway@latest",
197
+ "mcp"
198
+ ],
199
+ projectName: "wingman-gateway",
200
+ pushExplorer: false
201
+ },
170
202
  adapters: {}
171
203
  },
172
204
  agents: {
@@ -105,9 +105,31 @@ class WingmanConfigLoader {
105
105
  outputMode: "auto"
106
106
  },
107
107
  skills: {
108
+ provider: "github",
108
109
  repositoryOwner: "anthropics",
109
110
  repositoryName: "skills",
110
- skillsDirectory: "skills"
111
+ clawhubBaseUrl: "https://clawhub.ai",
112
+ skillsDirectory: "skills",
113
+ security: {
114
+ scanOnInstall: true,
115
+ scannerCommand: "uvx",
116
+ scannerArgs: [
117
+ "--from",
118
+ "mcp-scan>=0.4,<0.5",
119
+ "mcp-scan",
120
+ "--json",
121
+ "--skills"
122
+ ],
123
+ blockIssueCodes: [
124
+ "MCP501",
125
+ "MCP506",
126
+ "MCP507",
127
+ "MCP508",
128
+ "MCP509",
129
+ "MCP510",
130
+ "MCP511"
131
+ ]
132
+ }
111
133
  },
112
134
  browser: {
113
135
  profilesDir: ".wingman/browser-profiles",
@@ -139,6 +161,16 @@ class WingmanConfigLoader {
139
161
  allowInsecureAuth: false
140
162
  },
141
163
  dynamicUiEnabled: true,
164
+ mcpProxy: {
165
+ enabled: false,
166
+ command: "uvx",
167
+ baseArgs: [
168
+ "invariant-gateway@latest",
169
+ "mcp"
170
+ ],
171
+ projectName: "wingman-gateway",
172
+ pushExplorer: false
173
+ },
142
174
  adapters: {}
143
175
  },
144
176
  agents: {
@@ -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
- skillsDirectory: external_zod_namespaceObject.string().default("skills").describe("Directory to install skills in")
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
- skillsDirectory: "skills"
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
- skillsDirectory: string().default("skills").describe("Directory to install skills in")
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
- skillsDirectory: "skills"
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);