agent-switchboard 0.1.28 → 0.1.29

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 (2) hide show
  1. package/README.md +48 -31
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![CI](https://github.com/qyhfrank/agent-switchboard/actions/workflows/ci.yml/badge.svg)](https://github.com/qyhfrank/agent-switchboard/actions/workflows/ci.yml)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
6
 
7
- Manage MCP servers, rules, commands, subagents, and skills from a single source of truth, then sync them to every AI coding agent you use.
7
+ Manage MCP servers, rules, commands, agents, skills, and hooks from a single source of truth, then sync them to every AI coding agent you use.
8
8
 
9
9
  Alias: `asb`
10
10
 
@@ -20,13 +20,13 @@ Libraries Config Layers Distribution
20
20
  │ mcp.json │ │ User config.toml │ │ Claude Code │
21
21
  │ rules/ │ │ Profile <name>.toml │ │ Codex │
22
22
  │ commands/ │ ─► │ Project .asb.toml │ ─► │ Cursor │
23
- subagents/ │ │ │ │ Gemini │
24
- │ skills/ │ │ Per-agent overrides │ │ OpenCode │
25
- └──────────────┘ └─────────────────────┘ │ Claude Desktop │
26
- └────────────────┘
23
+ agents/ │ │ │ │ Gemini │
24
+ │ skills/ │ │ Per-app overrides │ │ OpenCode │
25
+ │ hooks/ │ │ │ │ Claude Desktop │
26
+ └──────────────┘ └─────────────────────┘ └────────────────┘
27
27
  ```
28
28
 
29
- All library entries are agent-agnostic Markdown files (or directories for skills). Agent Switchboard reads them, applies layered configuration and per-agent overrides, then writes the correct format to each agent's config location.
29
+ Library entries are agent-agnostic Markdown files (or directories for skills, JSON for hooks). Agent Switchboard reads them, applies layered configuration and per-application overrides, then writes the correct format to each agent's config location.
30
30
 
31
31
  ## Compatibility
32
32
 
@@ -36,8 +36,9 @@ All library entries are agent-agnostic Markdown files (or directories for skills
36
36
  | Project-level MCP| ✓ | ✓ | ✓ | ✓ | ✓ | |
37
37
  | Rules | ✓ | ✓ | ✓ mdc | ✓ | ✓ | |
38
38
  | Commands | ✓ | ✓\* | ✓ | ✓ | ✓ | |
39
- | Subagents | ✓ | | ✓ | | ✓ | |
39
+ | Agents | ✓ | | ✓ | | ✓ | |
40
40
  | Skills | ✓ | ✓ | ✓ | ✓ | ✓ | |
41
+ | Hooks | ✓ | | | | | |
41
42
 
42
43
  \* Codex commands use deprecated `~/.codex/prompts/`; prefer skills instead.
43
44
 
@@ -52,7 +53,7 @@ npm i -g agent-switchboard # or: npx agent-switchboard@latest mcp
52
53
  1. **Pick your agents** -- create `~/.agent-switchboard/config.toml`:
53
54
 
54
55
  ```toml
55
- [agents]
56
+ [applications]
56
57
  active = ["claude-code", "codex", "cursor"]
57
58
  ```
58
59
 
@@ -62,7 +63,7 @@ active = ["claude-code", "codex", "cursor"]
62
63
  asb mcp
63
64
  ```
64
65
 
65
- 3. **Sync everything** -- pushes all libraries (rules, commands, subagents, skills) and MCP config to every active agent:
66
+ 3. **Sync everything** -- pushes all libraries (rules, commands, agents, skills, hooks) and MCP config to every active application:
66
67
 
67
68
  ```bash
68
69
  asb sync
@@ -77,16 +78,17 @@ That's it. Library content lives under `~/.agent-switchboard/` and agent configs
77
78
  | `asb mcp` | Interactive MCP server selector |
78
79
  | `asb rule` | Interactive rule snippet selector with ordering |
79
80
  | `asb command` | Interactive command selector |
80
- | `asb subagent` | Interactive subagent selector |
81
+ | `asb agent` | Interactive agent selector |
81
82
  | `asb skill` | Interactive skill selector |
82
- | `asb sync` | Push all libraries + MCP to agents (no UI) |
83
+ | `asb hook` | Interactive hook selector (Claude Code only) |
84
+ | `asb sync` | Push all libraries + MCP to applications (no UI) |
83
85
  | `asb <lib> load` | Import files from a platform into the library |
84
86
  | `asb <lib> list` | Show inventory, activation state, and sync timestamps |
85
87
  | `asb source add` | Add an external library source (local path or git URL) |
86
88
  | `asb source remove` | Remove a library source |
87
89
  | `asb source list` | List configured library sources |
88
90
 
89
- `<lib>` = `rule`, `command`, `subagent`, or `skill`.
91
+ `<lib>` = `rule`, `command`, `agent`, `skill`, or `hook`.
90
92
 
91
93
  **Shared flags**: `-p, --profile <name>`, `--project <path>`, `--json` (on `list` and `source list`).
92
94
 
@@ -94,24 +96,24 @@ That's it. Library content lives under `~/.agent-switchboard/` and agent configs
94
96
 
95
97
  ### `config.toml`
96
98
 
97
- The central config file at `~/.agent-switchboard/config.toml` controls which agents and library entries are active:
99
+ The central config file at `~/.agent-switchboard/config.toml` controls which applications and library entries are active:
98
100
 
99
101
  ```toml
100
- [agents]
102
+ [applications]
101
103
  active = ["claude-code", "codex", "cursor", "gemini", "opencode"]
102
104
 
103
105
  [rules]
104
106
  includeDelimiters = false # wrap each rule snippet in <!-- id:start/end --> markers
105
107
  ```
106
108
 
107
- Supported agent IDs: `claude-code`, `claude-desktop`, `codex`, `cursor`, `gemini`, `opencode`.
109
+ Supported application IDs: `claude-code`, `claude-desktop`, `codex`, `cursor`, `gemini`, `opencode`.
108
110
 
109
- ### Per-Agent Overrides
111
+ ### Per-Application Overrides
110
112
 
111
- Fine-tune which library entries reach each agent using `add` / `remove` / `active`:
113
+ Fine-tune which library entries reach each application using `add` / `remove` / `active`:
112
114
 
113
115
  ```toml
114
- [agents]
116
+ [applications]
115
117
  active = ["claude-code", "codex", "opencode"]
116
118
 
117
119
  codex.skills.remove = ["skill-codex"]
@@ -121,13 +123,13 @@ gemini.commands.add = ["cmd-gemini-only"]
121
123
  gemini.skills.remove = ["skill-go"]
122
124
  ```
123
125
 
124
- | Syntax | Behavior |
125
- |:----------------------------------|:---------------------------|
126
- | `<agent>.<section>.active = [...]`| Replace the global list |
127
- | `<agent>.<section>.add = [...]` | Append to the global list |
128
- | `<agent>.<section>.remove = [...]`| Remove from the global list|
126
+ | Syntax | Behavior |
127
+ |:--------------------------------|:---------------------------|
128
+ | `<app>.<section>.active = [...]`| Replace the global list |
129
+ | `<app>.<section>.add = [...]` | Append to the global list |
130
+ | `<app>.<section>.remove = [...]`| Remove from the global list|
129
131
 
130
- Sections: `mcp`, `rules`, `commands`, `subagents`, `skills`.
132
+ Sections: `mcp`, `rules`, `commands`, `agents`, `skills`, `hooks`.
131
133
 
132
134
  ### Layered Configuration
133
135
 
@@ -142,7 +144,7 @@ Three TOML layers merge in priority order (higher wins):
142
144
  ```bash
143
145
  asb command -p team # profile layer
144
146
  asb rule --project /path/to/repo # project layer
145
- asb subagent -p team --project /path/to/repo # both
147
+ asb agent -p team --project /path/to/repo # both
146
148
  ```
147
149
 
148
150
  When `--project` is used, outputs target the project directory (e.g. `<project>/AGENTS.md`, `<project>/.claude/commands/`).
@@ -206,12 +208,12 @@ asb command load gemini [path] -r # import recursively
206
208
 
207
209
  Platforms: `claude-code`, `codex`, `cursor`, `gemini`, `opencode`.
208
210
 
209
- ### Subagents
211
+ ### Agents
210
212
 
211
- Same format as commands, stored in `~/.agent-switchboard/subagents/`.
213
+ Same format as commands, stored in `~/.agent-switchboard/agents/`.
212
214
 
213
215
  ```bash
214
- asb subagent load claude-code # import from ~/.claude/agents/
216
+ asb agent load claude-code # import from ~/.claude/agents/
215
217
  ```
216
218
 
217
219
  Platforms: `claude-code`, `opencode`, `cursor`.
@@ -235,6 +237,21 @@ asb skill load codex # import from ~/.agents/skills/
235
237
 
236
238
  Entire directories are copied to each agent's skill location. Deactivated skills are cleaned up automatically.
237
239
 
240
+ ### Hooks
241
+
242
+ JSON-based hook definitions distributed to Claude Code's `settings.json`. Two storage formats:
243
+
244
+ - **Single file**: `~/.agent-switchboard/hooks/<id>.json`
245
+ - **Bundle**: `~/.agent-switchboard/hooks/<id>/hook.json` plus script files
246
+
247
+ ```bash
248
+ asb hook load claude-code # import from ~/.claude/settings.json
249
+ asb hook load /path/to/hook.json # import a JSON file
250
+ asb hook load /path/to/hook-dir/ # import a bundle directory
251
+ ```
252
+
253
+ Bundle scripts are copied to `~/.claude/hooks/asb/<id>/` and the `${HOOK_DIR}` placeholder in commands is resolved to the absolute path at distribution time.
254
+
238
255
  ## Library Sources
239
256
 
240
257
  Pull library entries from external directories or git repos:
@@ -246,17 +263,17 @@ asb source list # list configured sources
246
263
  asb source remove repo # remove
247
264
  ```
248
265
 
249
- The source path must contain at least one of `rules/`, `commands/`, `subagents/`, or `skills/`. Entries from external sources appear with a namespace prefix (e.g. `team:my-rule`) in selectors and config.
266
+ A source can be a flat directory containing `rules/`, `commands/`, `agents/`, `skills/`, or `hooks/` subdirectories, or a `.claude-plugin` marketplace (detected by the presence of `.claude-plugin/marketplace.json`). Entries from external sources appear with a namespace prefix (e.g. `team:my-rule`) in selectors and config.
250
267
 
251
268
  ## Sync
252
269
 
253
- Push all libraries and MCP config to every active agent in one step:
270
+ Push all libraries and MCP config to every active application in one step:
254
271
 
255
272
  ```bash
256
273
  asb sync [-p <profile>] [--project <path>]
257
274
  ```
258
275
 
259
- This merges layered config, applies per-agent overrides, and writes target files in place. Files are only rewritten when content changes.
276
+ This merges layered config, applies per-application overrides, and writes target files in place. Files are only rewritten when content changes.
260
277
 
261
278
  ## Environment
262
279
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-switchboard",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Unified MCP server manager for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {