agent-switchboard 0.1.5 → 0.1.9

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 (62) hide show
  1. package/README.md +2 -2
  2. package/dist/config/paths.d.ts +4 -0
  3. package/dist/config/paths.js +6 -0
  4. package/dist/config/paths.js.map +1 -1
  5. package/dist/config/schemas.d.ts +92 -0
  6. package/dist/config/schemas.js +17 -0
  7. package/dist/config/schemas.js.map +1 -1
  8. package/dist/index.js +228 -8
  9. package/dist/index.js.map +1 -1
  10. package/dist/library/distribute-bundle.d.ts +39 -0
  11. package/dist/library/distribute-bundle.js +106 -0
  12. package/dist/library/distribute-bundle.js.map +1 -0
  13. package/dist/library/distribute.d.ts +2 -1
  14. package/dist/library/distribute.js +1 -1
  15. package/dist/library/distribute.js.map +1 -1
  16. package/dist/library/fs.js +0 -1
  17. package/dist/library/fs.js.map +1 -1
  18. package/dist/library/state.d.ts +4 -3
  19. package/dist/library/state.js +9 -1
  20. package/dist/library/state.js.map +1 -1
  21. package/dist/rules/distribution.js +7 -23
  22. package/dist/rules/distribution.js.map +1 -1
  23. package/dist/skills/distribution.d.ts +23 -0
  24. package/dist/skills/distribution.js +76 -0
  25. package/dist/skills/distribution.js.map +1 -0
  26. package/dist/skills/importer.d.ts +41 -0
  27. package/dist/skills/importer.js +159 -0
  28. package/dist/skills/importer.js.map +1 -0
  29. package/dist/skills/inventory.d.ts +15 -0
  30. package/dist/skills/inventory.js +55 -0
  31. package/dist/skills/inventory.js.map +1 -0
  32. package/dist/skills/library.d.ts +30 -0
  33. package/dist/skills/library.js +80 -0
  34. package/dist/skills/library.js.map +1 -0
  35. package/dist/skills/parser.d.ts +7 -0
  36. package/dist/skills/parser.js +11 -0
  37. package/dist/skills/parser.js.map +1 -0
  38. package/dist/skills/schema.d.ts +23 -0
  39. package/dist/skills/schema.js +14 -0
  40. package/dist/skills/schema.js.map +1 -0
  41. package/dist/ui/command-ui.d.ts +5 -1
  42. package/dist/ui/command-ui.js +3 -2
  43. package/dist/ui/command-ui.js.map +1 -1
  44. package/dist/ui/fuzzy-multi-select.d.ts +2 -0
  45. package/dist/ui/fuzzy-multi-select.js +13 -1
  46. package/dist/ui/fuzzy-multi-select.js.map +1 -1
  47. package/dist/ui/library-selector.d.ts +3 -1
  48. package/dist/ui/library-selector.js +7 -1
  49. package/dist/ui/library-selector.js.map +1 -1
  50. package/dist/ui/mcp-ui.d.ts +4 -1
  51. package/dist/ui/mcp-ui.js +3 -2
  52. package/dist/ui/mcp-ui.js.map +1 -1
  53. package/dist/ui/rule-ui.d.ts +5 -1
  54. package/dist/ui/rule-ui.js +4 -2
  55. package/dist/ui/rule-ui.js.map +1 -1
  56. package/dist/ui/skill-ui.d.ts +10 -0
  57. package/dist/ui/skill-ui.js +20 -0
  58. package/dist/ui/skill-ui.js.map +1 -0
  59. package/dist/ui/subagent-ui.d.ts +5 -1
  60. package/dist/ui/subagent-ui.js +3 -2
  61. package/dist/ui/subagent-ui.js.map +1 -1
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -84,7 +84,7 @@ agent-switchboard subagent -p team --project /path/to/repo
84
84
  `ASB_HOME` still defaults to `~/.agent-switchboard` but can be overridden through the environment variable.
85
85
 
86
86
  Project-aware outputs (when using `--project <path>`):
87
- - Rules: Codex writes `<project>/AGENTS.md`. Gemini writes `<project>/GEMINI.md` (or `<project>/AGENTS.md` if you configured Gemini CLI to read it). OpenCode writes `<project>/AGENTS.md`.
87
+ - Rules: Codex writes `<project>/AGENTS.md`. Gemini writes `<project>/AGENTS.md`. OpenCode writes `<project>/AGENTS.md`.
88
88
  - Commands (project-level supported):
89
89
  - Claude Code → `<project>/.claude/commands/`
90
90
  - Gemini → `<project>/.gemini/commands/`
@@ -120,7 +120,7 @@ agent-switchboard rule [-p <profile>] [--project <path>]
120
120
  The selected order is saved back to the highest-priority layer (project, profile, then user) before distribution. Once confirmed, Agent Switchboard composes the merged Markdown, stores the active order, and writes the document to:
121
121
  - `~/.claude/CLAUDE.md`
122
122
  - `~/.codex/AGENTS.md` (or `<project>/AGENTS.md` with `--project`)
123
- - `~/.gemini/GEMINI.md`
123
+ - `~/.gemini/AGENTS.md`
124
124
  - `~/.config/opencode/AGENTS.md` (or `%APPDATA%/opencode/AGENTS.md` on Windows)
125
125
 
126
126
  Unsupportive agents such as Claude Desktop and Cursor are reported and left untouched. If you rerun the selector without changing the order, the tool refreshes the destination files to overwrite any manual edits.
@@ -47,6 +47,10 @@ export declare function getCommandsDir(): string;
47
47
  * Returns the absolute path to the subagents library directory
48
48
  */
49
49
  export declare function getSubagentsDir(): string;
50
+ /**
51
+ * Returns the absolute path to the skills library directory
52
+ */
53
+ export declare function getSkillsDir(): string;
50
54
  /**
51
55
  * Returns the home directory for installed agent apps (Claude Code, OpenCode, etc.)
52
56
  * Can be overridden via `ASB_AGENTS_HOME`; falls back to the OS user home.
@@ -75,6 +75,12 @@ export function getCommandsDir() {
75
75
  export function getSubagentsDir() {
76
76
  return path.join(getConfigDir(), 'subagents');
77
77
  }
78
+ /**
79
+ * Returns the absolute path to the skills library directory
80
+ */
81
+ export function getSkillsDir() {
82
+ return path.join(getConfigDir(), 'skills');
83
+ }
78
84
  /**
79
85
  * Returns the home directory for installed agent apps (Claude Code, OpenCode, etc.)
80
86
  * Can be overridden via `ASB_AGENTS_HOME`; falls back to the OS user home.
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY;IAC1B,wBAAwB;IACxB,2GAA2G;IAC3G,2DAA2D;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC7C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,C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,aAAa,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,EACJ,SAAS,EACT,qBAAqB,EACrB,QAAQ,EACR,4BAA4B,CAC7B,CAAC;QACJ,KAAK,OAAO;YACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC;QACvF,KAAK,OAAO;YACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC;QAC5E;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
@@ -91,6 +91,13 @@ export declare const rulesSectionSchema: z.ZodObject<{} & {
91
91
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
92
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
93
93
  }, z.ZodTypeAny, "passthrough">>;
94
+ export declare const uiSectionSchema: z.ZodObject<{} & {
95
+ page_size: z.ZodDefault<z.ZodNumber>;
96
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
97
+ page_size: z.ZodDefault<z.ZodNumber>;
98
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
99
+ page_size: z.ZodDefault<z.ZodNumber>;
100
+ }, z.ZodTypeAny, "passthrough">>;
94
101
  /**
95
102
  * Schema for Agent Switchboard configuration file (~/.agent-switchboard/config.toml)
96
103
  */
@@ -117,6 +124,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
117
124
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
118
125
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
119
126
  }, z.ZodTypeAny, "passthrough">>>;
127
+ skills: z.ZodDefault<z.ZodObject<{} & {
128
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
129
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
130
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
131
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
132
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
133
+ }, z.ZodTypeAny, "passthrough">>>;
120
134
  rules: z.ZodDefault<z.ZodObject<{} & {
121
135
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
122
136
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
@@ -127,6 +141,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
127
141
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
128
142
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
129
143
  }, z.ZodTypeAny, "passthrough">>>;
144
+ ui: z.ZodDefault<z.ZodObject<{} & {
145
+ page_size: z.ZodDefault<z.ZodNumber>;
146
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
147
+ page_size: z.ZodDefault<z.ZodNumber>;
148
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
149
+ page_size: z.ZodDefault<z.ZodNumber>;
150
+ }, z.ZodTypeAny, "passthrough">>>;
130
151
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
131
152
  agents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
132
153
  mcp: z.ZodDefault<z.ZodObject<{} & {
@@ -150,6 +171,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
150
171
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
151
172
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
152
173
  }, z.ZodTypeAny, "passthrough">>>;
174
+ skills: z.ZodDefault<z.ZodObject<{} & {
175
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
176
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
177
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
178
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
179
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
180
+ }, z.ZodTypeAny, "passthrough">>>;
153
181
  rules: z.ZodDefault<z.ZodObject<{} & {
154
182
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
155
183
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
@@ -160,6 +188,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
160
188
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
161
189
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
162
190
  }, z.ZodTypeAny, "passthrough">>>;
191
+ ui: z.ZodDefault<z.ZodObject<{} & {
192
+ page_size: z.ZodDefault<z.ZodNumber>;
193
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
194
+ page_size: z.ZodDefault<z.ZodNumber>;
195
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
196
+ page_size: z.ZodDefault<z.ZodNumber>;
197
+ }, z.ZodTypeAny, "passthrough">>>;
163
198
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
164
199
  agents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
165
200
  mcp: z.ZodDefault<z.ZodObject<{} & {
@@ -183,6 +218,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
183
218
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
184
219
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
185
220
  }, z.ZodTypeAny, "passthrough">>>;
221
+ skills: z.ZodDefault<z.ZodObject<{} & {
222
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
223
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
224
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
225
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
226
+ active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
227
+ }, z.ZodTypeAny, "passthrough">>>;
186
228
  rules: z.ZodDefault<z.ZodObject<{} & {
187
229
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
188
230
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
@@ -193,6 +235,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
193
235
  active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
194
236
  includeDelimiters: z.ZodDefault<z.ZodBoolean>;
195
237
  }, z.ZodTypeAny, "passthrough">>>;
238
+ ui: z.ZodDefault<z.ZodObject<{} & {
239
+ page_size: z.ZodDefault<z.ZodNumber>;
240
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
241
+ page_size: z.ZodDefault<z.ZodNumber>;
242
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
243
+ page_size: z.ZodDefault<z.ZodNumber>;
244
+ }, z.ZodTypeAny, "passthrough">>>;
196
245
  }, z.ZodTypeAny, "passthrough">>;
197
246
  /**
198
247
  * Input schema for partial config layers (no defaults)
@@ -220,6 +269,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
220
269
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
221
270
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
222
271
  }, z.ZodTypeAny, "passthrough">>>;
272
+ skills: z.ZodOptional<z.ZodObject<{
273
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
274
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
275
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
276
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
277
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
278
+ }, z.ZodTypeAny, "passthrough">>>;
223
279
  rules: z.ZodOptional<z.ZodObject<{
224
280
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
225
281
  } & {
@@ -233,6 +289,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
233
289
  } & {
234
290
  includeDelimiters: z.ZodOptional<z.ZodBoolean>;
235
291
  }, z.ZodTypeAny, "passthrough">>>;
292
+ ui: z.ZodOptional<z.ZodObject<{
293
+ page_size: z.ZodOptional<z.ZodNumber>;
294
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
295
+ page_size: z.ZodOptional<z.ZodNumber>;
296
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
297
+ page_size: z.ZodOptional<z.ZodNumber>;
298
+ }, z.ZodTypeAny, "passthrough">>>;
236
299
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
237
300
  agents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
238
301
  mcp: z.ZodOptional<z.ZodObject<{
@@ -256,6 +319,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
256
319
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
257
320
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
258
321
  }, z.ZodTypeAny, "passthrough">>>;
322
+ skills: z.ZodOptional<z.ZodObject<{
323
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
324
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
325
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
326
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
327
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
328
+ }, z.ZodTypeAny, "passthrough">>>;
259
329
  rules: z.ZodOptional<z.ZodObject<{
260
330
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
261
331
  } & {
@@ -269,6 +339,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
269
339
  } & {
270
340
  includeDelimiters: z.ZodOptional<z.ZodBoolean>;
271
341
  }, z.ZodTypeAny, "passthrough">>>;
342
+ ui: z.ZodOptional<z.ZodObject<{
343
+ page_size: z.ZodOptional<z.ZodNumber>;
344
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
345
+ page_size: z.ZodOptional<z.ZodNumber>;
346
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
347
+ page_size: z.ZodOptional<z.ZodNumber>;
348
+ }, z.ZodTypeAny, "passthrough">>>;
272
349
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
273
350
  agents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
274
351
  mcp: z.ZodOptional<z.ZodObject<{
@@ -292,6 +369,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
292
369
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
293
370
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
294
371
  }, z.ZodTypeAny, "passthrough">>>;
372
+ skills: z.ZodOptional<z.ZodObject<{
373
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
375
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
376
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
377
+ active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
378
+ }, z.ZodTypeAny, "passthrough">>>;
295
379
  rules: z.ZodOptional<z.ZodObject<{
296
380
  active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
297
381
  } & {
@@ -305,6 +389,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
305
389
  } & {
306
390
  includeDelimiters: z.ZodOptional<z.ZodBoolean>;
307
391
  }, z.ZodTypeAny, "passthrough">>>;
392
+ ui: z.ZodOptional<z.ZodObject<{
393
+ page_size: z.ZodOptional<z.ZodNumber>;
394
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
395
+ page_size: z.ZodOptional<z.ZodNumber>;
396
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
397
+ page_size: z.ZodOptional<z.ZodNumber>;
398
+ }, z.ZodTypeAny, "passthrough">>>;
308
399
  }, z.ZodTypeAny, "passthrough">>;
309
400
  /**
310
401
  * Infer TypeScript types from schemas
@@ -313,5 +404,6 @@ export type McpServer = z.infer<typeof mcpServerSchema>;
313
404
  export type McpConfig = z.infer<typeof mcpConfigSchema>;
314
405
  export type SelectionSection = z.infer<typeof selectionSectionSchema>;
315
406
  export type RulesSection = z.infer<typeof rulesSectionSchema>;
407
+ export type UiSection = z.infer<typeof uiSectionSchema>;
316
408
  export type SwitchboardConfig = z.infer<typeof switchboardConfigSchema>;
317
409
  export type SwitchboardConfigLayer = z.infer<typeof switchboardConfigLayerSchema>;
@@ -45,6 +45,19 @@ export const rulesSectionSchema = rulesSectionBaseSchema
45
45
  includeDelimiters: z.boolean().default(false),
46
46
  })
47
47
  .passthrough();
48
+ /**
49
+ * UI configuration schema
50
+ */
51
+ const uiSectionBaseSchema = z
52
+ .object({
53
+ page_size: z.number().int().min(5).max(50).optional(),
54
+ })
55
+ .passthrough();
56
+ export const uiSectionSchema = uiSectionBaseSchema
57
+ .extend({
58
+ page_size: z.number().int().min(5).max(50).default(20),
59
+ })
60
+ .passthrough();
48
61
  /**
49
62
  * Schema for Agent Switchboard configuration file (~/.agent-switchboard/config.toml)
50
63
  */
@@ -54,7 +67,9 @@ export const switchboardConfigSchema = z
54
67
  mcp: selectionSectionSchema.default({ active: [] }),
55
68
  commands: selectionSectionSchema.default({ active: [] }),
56
69
  subagents: selectionSectionSchema.default({ active: [] }),
70
+ skills: selectionSectionSchema.default({ active: [] }),
57
71
  rules: rulesSectionSchema.default({ active: [], includeDelimiters: false }),
72
+ ui: uiSectionSchema.default({ pageSize: 20 }),
58
73
  })
59
74
  .passthrough();
60
75
  /**
@@ -66,7 +81,9 @@ export const switchboardConfigLayerSchema = z
66
81
  mcp: selectionSectionBaseSchema.optional(),
67
82
  commands: selectionSectionBaseSchema.optional(),
68
83
  subagents: selectionSectionBaseSchema.optional(),
84
+ skills: selectionSectionBaseSchema.optional(),
69
85
  rules: rulesSectionBaseSchema.optional(),
86
+ ui: uiSectionBaseSchema.optional(),
70
87
  })
71
88
  .passthrough();
72
89
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/config/schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACnC,CAAC;KACD,WAAW,EAAE,CAAC,CAAC,uBAAuB;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;C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AAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACtD,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;IAC3E,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;CAC9C,CAAC;KACD,WAAW,EAAE,CAAC;AAEjB;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpD,GAAG,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC/C,SAAS,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAChD,MAAM,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC7C,KAAK,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IACxC,EAAE,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CACnC,CAAC;KACD,WAAW,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import fs from 'node:fs';
7
7
  import path from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
8
9
  import { confirm } from '@inquirer/prompts';
9
10
  import chalk from 'chalk';
10
11
  import { Command } from 'commander';
@@ -14,7 +15,7 @@ import { distributeCommands } from './commands/distribution.js';
14
15
  import { importCommandFromFile } from './commands/importer.js';
15
16
  import { buildCommandInventory } from './commands/inventory.js';
16
17
  import { loadMcpConfig, updateEnabledFlags } from './config/mcp-config.js';
17
- import { getClaudeDir, getCodexDir, getCommandsDir, getGeminiDir, getMcpConfigPath, getOpencodePath, getSubagentsDir, } from './config/paths.js';
18
+ import { getClaudeDir, getCodexDir, getCommandsDir, getGeminiDir, getMcpConfigPath, getOpencodePath, getSkillsDir, getSubagentsDir, } from './config/paths.js';
18
19
  import { loadSwitchboardConfig, loadSwitchboardConfigWithLayers, } from './config/switchboard-config.js';
19
20
  import { ensureLibraryDirectories, writeFileSecure } from './library/fs.js';
20
21
  import { RULE_SUPPORTED_AGENTS } from './rules/agents.js';
@@ -23,16 +24,25 @@ import { distributeRules, listUnsupportedAgents } from './rules/distribution.js'
23
24
  import { buildRuleInventory } from './rules/inventory.js';
24
25
  import { loadRuleLibrary } from './rules/library.js';
25
26
  import { loadRuleState, updateRuleState } from './rules/state.js';
27
+ import { distributeSkills } from './skills/distribution.js';
28
+ import { importSkill, listSkillsInDirectory } from './skills/importer.js';
29
+ import { buildSkillInventory } from './skills/inventory.js';
26
30
  import { distributeSubagents } from './subagents/distribution.js';
27
31
  import { importSubagentFromFile } from './subagents/importer.js';
28
32
  import { buildSubagentInventory } from './subagents/inventory.js';
29
33
  import { showCommandSelector } from './ui/command-ui.js';
30
34
  import { showMcpServerUI } from './ui/mcp-ui.js';
31
35
  import { showRuleSelector } from './ui/rule-ui.js';
36
+ import { showSkillSelector } from './ui/skill-ui.js';
32
37
  import { showSubagentSelector } from './ui/subagent-ui.js';
33
38
  import { formatSyncTimestamp, printTable } from './util/cli.js';
34
39
  const program = new Command();
35
- program.name('asb').description('Unified MCP server manager for AI coding agents').version('0.1.0');
40
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
41
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8'));
42
+ program
43
+ .name('asb')
44
+ .description('Unified MCP server manager for AI coding agents')
45
+ .version(packageJson.version);
36
46
  // Initialize library directories for commands/subagents (secure permissions)
37
47
  ensureLibraryDirectories();
38
48
  program
@@ -73,6 +83,7 @@ program
73
83
  console.log(` Rules: ${chalk.cyan(String(config.rules.active.length))}`);
74
84
  console.log(` Commands: ${chalk.cyan(String(config.commands.active.length))}`);
75
85
  console.log(` Subagents: ${chalk.cyan(String(config.subagents.active.length))}`);
86
+ console.log(` Skills: ${chalk.cyan(String(config.skills.active.length))}`);
76
87
  if (config.agents.length > 0) {
77
88
  console.log(` Agents: ${chalk.cyan(config.agents.join(', '))}`);
78
89
  }
@@ -83,9 +94,11 @@ program
83
94
  const ruleDistribution = distributeRules(undefined, { force: true }, scope);
84
95
  const commandDistribution = distributeCommands(scope);
85
96
  const subagentDistribution = distributeSubagents(scope);
97
+ const skillDistribution = distributeSkills(scope);
86
98
  const ruleErrors = ruleDistribution.results.filter((result) => result.status === 'error');
87
99
  const commandErrors = commandDistribution.results.filter((result) => result.status === 'error');
88
100
  const subagentErrors = subagentDistribution.results.filter((result) => result.status === 'error');
101
+ const skillErrors = skillDistribution.results.filter((result) => result.status === 'error');
89
102
  console.log(chalk.blue('Rule distribution:'));
90
103
  for (const result of ruleDistribution.results) {
91
104
  const pathLabel = chalk.dim(result.filePath);
@@ -152,7 +165,32 @@ program
152
165
  }
153
166
  }
154
167
  console.log();
155
- const hasErrors = ruleErrors.length > 0 || commandErrors.length > 0 || subagentErrors.length > 0;
168
+ console.log(chalk.blue('Skill distribution:'));
169
+ if (skillDistribution.results.length === 0) {
170
+ console.log(` ${chalk.gray('no active skills')}`);
171
+ }
172
+ for (const result of skillDistribution.results) {
173
+ const pathLabel = chalk.dim(result.targetDir);
174
+ if (result.status === 'written') {
175
+ const reason = result.reason ? chalk.gray(` (${result.reason})`) : '';
176
+ console.log(` ${chalk.green('✓')} ${chalk.cyan(result.platform)} ${pathLabel}${reason}`);
177
+ }
178
+ else if (result.status === 'skipped') {
179
+ const reason = result.reason
180
+ ? chalk.gray(` (${result.reason})`)
181
+ : chalk.gray(' (unchanged)');
182
+ console.log(` ${chalk.gray('•')} ${chalk.cyan(result.platform)} ${pathLabel}${reason}`);
183
+ }
184
+ else {
185
+ const errorLabel = result.error ? ` ${chalk.red(result.error)}` : '';
186
+ console.log(` ${chalk.red('✗')} ${chalk.cyan(result.platform)} ${pathLabel}${errorLabel}`);
187
+ }
188
+ }
189
+ console.log();
190
+ const hasErrors = ruleErrors.length > 0 ||
191
+ commandErrors.length > 0 ||
192
+ subagentErrors.length > 0 ||
193
+ skillErrors.length > 0;
156
194
  if (hasErrors) {
157
195
  console.log(chalk.red('✗ Synchronization completed with errors.'));
158
196
  process.exit(1);
@@ -225,6 +263,14 @@ function defaultSubagentSourceDir(platform) {
225
263
  return getOpencodePath('agent');
226
264
  }
227
265
  }
266
+ function defaultSkillSourceDir(platform) {
267
+ switch (platform) {
268
+ case 'claude-code':
269
+ return path.join(getClaudeDir(), 'skills');
270
+ case 'codex':
271
+ return path.join(getCodexDir(), 'skills');
272
+ }
273
+ }
228
274
  function listFilesRecursively(root, filterExts) {
229
275
  const out = [];
230
276
  const exts = new Set(filterExts.map((e) => e.toLowerCase()));
@@ -260,8 +306,9 @@ program
260
306
  .action(async (options) => {
261
307
  try {
262
308
  const scope = resolveScope(options);
309
+ const config = loadSwitchboardConfig(scopeToLoadOptions(scope));
263
310
  // Step 1: Show UI and get selected servers
264
- const selectedServers = await showMcpServerUI();
311
+ const selectedServers = await showMcpServerUI({ pageSize: config.ui.page_size });
265
312
  // Proceed even if no servers are selected: this means disable all.
266
313
  // Previous behavior incorrectly bailed out and prevented users from clearing selections.
267
314
  // Step 2: Update enabled flags in mcp.json
@@ -358,7 +405,8 @@ ruleCommand
358
405
  ruleCommand.action(async (options) => {
359
406
  try {
360
407
  const scope = resolveScope(options);
361
- const selection = await showRuleSelector(scope);
408
+ const config = loadSwitchboardConfig(scopeToLoadOptions(scope));
409
+ const selection = await showRuleSelector({ scope, pageSize: config.ui.page_size });
362
410
  if (!selection) {
363
411
  return;
364
412
  }
@@ -449,7 +497,8 @@ const commandRoot = program
449
497
  commandRoot.action(async (options) => {
450
498
  try {
451
499
  const scope = resolveScope(options);
452
- const selection = await showCommandSelector(scope);
500
+ const config = loadSwitchboardConfig(scopeToLoadOptions(scope));
501
+ const selection = await showCommandSelector({ scope, pageSize: config.ui.page_size });
453
502
  if (!selection)
454
503
  return;
455
504
  console.log();
@@ -493,7 +542,6 @@ commandRoot.action(async (options) => {
493
542
  process.exit(1);
494
543
  }
495
544
  });
496
- // (add removed) — commands are created via `load` from platform sources
497
545
  // Commands library: load (import) existing platform files into library
498
546
  commandRoot
499
547
  .command('load')
@@ -628,7 +676,8 @@ const subagentRoot = program
628
676
  subagentRoot.action(async (options) => {
629
677
  try {
630
678
  const scope = resolveScope(options);
631
- const selection = await showSubagentSelector(scope);
679
+ const config = loadSwitchboardConfig(scopeToLoadOptions(scope));
680
+ const selection = await showSubagentSelector({ scope, pageSize: config.ui.page_size });
632
681
  if (!selection)
633
682
  return;
634
683
  console.log();
@@ -797,6 +846,177 @@ subagentRoot
797
846
  process.exit(1);
798
847
  }
799
848
  });
849
+ // Skills library: manage and distribute skill bundles
850
+ const skillRoot = program
851
+ .command('skill')
852
+ .description('Manage skill library')
853
+ .option('-p, --profile <name>', 'Profile configuration to use')
854
+ .option('--project <path>', 'Project directory containing .asb.toml');
855
+ skillRoot.action(async (options) => {
856
+ try {
857
+ const scope = resolveScope(options);
858
+ const config = loadSwitchboardConfig(scopeToLoadOptions(scope));
859
+ const selection = await showSkillSelector({ scope, pageSize: config.ui.page_size });
860
+ if (!selection)
861
+ return;
862
+ console.log();
863
+ console.log(chalk.green('✓ Updated active skills:'));
864
+ if (selection.active.length === 0) {
865
+ console.log(` ${chalk.gray('none')}`);
866
+ }
867
+ else {
868
+ for (const id of selection.active) {
869
+ console.log(` ${chalk.cyan(id)}`);
870
+ }
871
+ }
872
+ const out = distributeSkills(scope);
873
+ if (out.results.length > 0) {
874
+ console.log();
875
+ console.log(chalk.blue('Skill distribution:'));
876
+ for (const r of out.results) {
877
+ const pathLabel = chalk.dim(r.targetDir);
878
+ if (r.status === 'written') {
879
+ const reason = r.reason ? chalk.gray(` (${r.reason})`) : '';
880
+ console.log(` ${chalk.green('✓')} ${chalk.cyan(r.platform)} ${pathLabel}${reason}`);
881
+ }
882
+ else if (r.status === 'skipped') {
883
+ const reason = r.reason ? chalk.gray(` (${r.reason})`) : chalk.gray(' (unchanged)');
884
+ console.log(` ${chalk.gray('•')} ${chalk.cyan(r.platform)} ${pathLabel}${reason}`);
885
+ }
886
+ else {
887
+ const err = r.error ? ` ${chalk.red(r.error)}` : '';
888
+ console.log(` ${chalk.red('✗')} ${chalk.cyan(r.platform)} ${pathLabel}${err}`);
889
+ }
890
+ }
891
+ }
892
+ }
893
+ catch (error) {
894
+ if (error instanceof Error) {
895
+ console.error(chalk.red(`\n✗ Error: ${error.message}`));
896
+ }
897
+ process.exit(1);
898
+ }
899
+ });
900
+ skillRoot
901
+ .command('list')
902
+ .description('Display skill inventory and sync information')
903
+ .option('--json', 'Output inventory as JSON')
904
+ .option('-p, --profile <name>', 'Profile configuration to use')
905
+ .option('--project <path>', 'Project directory containing .asb.toml')
906
+ .action((options) => {
907
+ try {
908
+ const scope = resolveScope(options);
909
+ const inventory = buildSkillInventory(scope);
910
+ if (options.json) {
911
+ console.log(JSON.stringify({
912
+ entries: inventory.entries,
913
+ agentSync: inventory.state.agentSync,
914
+ active: inventory.state.active,
915
+ }, null, 2));
916
+ return;
917
+ }
918
+ if (inventory.entries.length === 0) {
919
+ console.log(chalk.yellow('⚠ No skills found. Use `asb skill load <platform> [path]`.'));
920
+ }
921
+ else {
922
+ console.log(chalk.blue('Skills:'));
923
+ const header = ['ID', 'Active', 'Name', 'Description'];
924
+ const rows = inventory.entries.map((row) => {
925
+ const activePlain = row.active ? 'yes' : 'no';
926
+ const descPlain = row.description.length > 50
927
+ ? `${row.description.substring(0, 47)}...`
928
+ : row.description;
929
+ return [
930
+ { plain: row.id, formatted: row.id },
931
+ {
932
+ plain: activePlain,
933
+ formatted: row.active ? chalk.green(activePlain) : chalk.gray(activePlain),
934
+ },
935
+ { plain: row.name, formatted: row.name },
936
+ { plain: descPlain, formatted: descPlain },
937
+ ];
938
+ });
939
+ printTable(header, rows);
940
+ }
941
+ console.log();
942
+ console.log(chalk.blue('Agent sync status:'));
943
+ const keys = Object.keys(inventory.state.agentSync);
944
+ if (keys.length === 0) {
945
+ console.log(` ${chalk.gray('no sync recorded')}`);
946
+ }
947
+ else {
948
+ for (const agent of keys) {
949
+ const sync = inventory.state.agentSync[agent];
950
+ const stamp = formatSyncTimestamp(sync?.updatedAt);
951
+ const display = sync?.updatedAt ? stamp : chalk.gray(stamp);
952
+ console.log(` ${chalk.cyan(agent)} ${chalk.gray('-')} ${display}`);
953
+ }
954
+ }
955
+ // Guidance: unsupported platforms for skills
956
+ console.log();
957
+ console.log(chalk.gray('Unsupported platforms (manual steps required): Gemini, OpenCode'));
958
+ }
959
+ catch (error) {
960
+ if (error instanceof Error) {
961
+ console.error(chalk.red(`\n✗ Error: ${error.message}`));
962
+ }
963
+ process.exit(1);
964
+ }
965
+ });
966
+ skillRoot
967
+ .command('load')
968
+ .description('Import existing platform skill directories into the skill library')
969
+ .argument('<platform>', 'claude-code | codex')
970
+ .argument('[path]', 'Source directory (defaults by platform)')
971
+ .option('-f, --force', 'Overwrite existing library directories without confirmation')
972
+ .action(async (platform, srcPath, opts) => {
973
+ try {
974
+ const source = srcPath && srcPath.trim().length > 0 ? srcPath : defaultSkillSourceDir(platform);
975
+ if (!fs.existsSync(source)) {
976
+ console.error(chalk.red(`\n✗ Source not found: ${source}`));
977
+ process.exit(1);
978
+ }
979
+ if (!isDir(source)) {
980
+ console.error(chalk.red('\n✗ Source must be a directory containing skill folders.'));
981
+ process.exit(1);
982
+ }
983
+ const skillIds = listSkillsInDirectory(source);
984
+ if (skillIds.length === 0) {
985
+ console.log(chalk.yellow('\n⚠ No skills to import (no SKILL.md found in subdirectories).'));
986
+ return;
987
+ }
988
+ const outDir = getSkillsDir();
989
+ let imported = 0;
990
+ let skipped = 0;
991
+ for (const id of skillIds) {
992
+ const result = importSkill(platform, source, id, { force: opts.force });
993
+ if (result.status === 'success') {
994
+ imported++;
995
+ console.log(`${chalk.green('✓')} ${chalk.cyan(result.skill.name)} → ${chalk.dim(result.skill.targetPath)}`);
996
+ }
997
+ else if (result.status === 'skipped') {
998
+ skipped++;
999
+ console.log(`${chalk.gray('•')} ${chalk.cyan(id)} ${chalk.gray(`(${result.reason})`)}`);
1000
+ }
1001
+ else {
1002
+ console.log(`${chalk.red('✗')} ${chalk.cyan(id)} ${chalk.red(result.error ?? 'unknown error')}`);
1003
+ }
1004
+ }
1005
+ console.log();
1006
+ if (imported > 0) {
1007
+ console.log(`${chalk.green('✓')} Imported ${imported} skill(s) into ${chalk.dim(outDir)}`);
1008
+ }
1009
+ if (skipped > 0) {
1010
+ console.log(chalk.gray(` ${skipped} skill(s) skipped (already exist, use --force to overwrite)`));
1011
+ }
1012
+ }
1013
+ catch (error) {
1014
+ if (error instanceof Error) {
1015
+ console.error(chalk.red(`\n✗ Error: ${error.message}`));
1016
+ }
1017
+ process.exit(1);
1018
+ }
1019
+ });
800
1020
  /**
801
1021
  * Apply enabled MCP servers to all registered agents
802
1022
  */