agent-switchboard 0.1.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/dist/agents/adapter.d.ts +32 -0
  4. package/dist/agents/adapter.js +6 -0
  5. package/dist/agents/adapter.js.map +1 -0
  6. package/dist/agents/claude-code.d.ts +17 -0
  7. package/dist/agents/claude-code.js +27 -0
  8. package/dist/agents/claude-code.js.map +1 -0
  9. package/dist/agents/claude-desktop.d.ts +23 -0
  10. package/dist/agents/claude-desktop.js +44 -0
  11. package/dist/agents/claude-desktop.js.map +1 -0
  12. package/dist/agents/codex.d.ts +42 -0
  13. package/dist/agents/codex.js +135 -0
  14. package/dist/agents/codex.js.map +1 -0
  15. package/dist/agents/cursor.d.ts +20 -0
  16. package/dist/agents/cursor.js +31 -0
  17. package/dist/agents/cursor.js.map +1 -0
  18. package/dist/agents/gemini.d.ts +20 -0
  19. package/dist/agents/gemini.js +31 -0
  20. package/dist/agents/gemini.js.map +1 -0
  21. package/dist/agents/json-utils.d.ts +9 -0
  22. package/dist/agents/json-utils.js +26 -0
  23. package/dist/agents/json-utils.js.map +1 -0
  24. package/dist/agents/registry.d.ts +23 -0
  25. package/dist/agents/registry.js +54 -0
  26. package/dist/agents/registry.js.map +1 -0
  27. package/dist/config/abs-config.d.ts +21 -0
  28. package/dist/config/abs-config.js +67 -0
  29. package/dist/config/abs-config.js.map +1 -0
  30. package/dist/config/mcp-config.d.ts +31 -0
  31. package/dist/config/mcp-config.js +98 -0
  32. package/dist/config/mcp-config.js.map +1 -0
  33. package/dist/config/paths.d.ts +28 -0
  34. package/dist/config/paths.js +43 -0
  35. package/dist/config/paths.js.map +1 -0
  36. package/dist/config/schemas.d.ts +84 -0
  37. package/dist/config/schemas.js +31 -0
  38. package/dist/config/schemas.js.map +1 -0
  39. package/dist/config/switchboard-config.d.ts +21 -0
  40. package/dist/config/switchboard-config.js +67 -0
  41. package/dist/config/switchboard-config.js.map +1 -0
  42. package/dist/index.d.ts +6 -0
  43. package/dist/index.js +116 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/types.d.ts +19 -0
  46. package/dist/types.js +6 -0
  47. package/dist/types.js.map +1 -0
  48. package/dist/ui/mcp-ui.d.ts +16 -0
  49. package/dist/ui/mcp-ui.js +65 -0
  50. package/dist/ui/mcp-ui.js.map +1 -0
  51. package/package.json +47 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Frank Qing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Agent Switchboard (WIP)
2
+
3
+ Minimal tool to manage MCP servers in one place and apply them to local agents (e.g., Codex, Cursor).
4
+
5
+ ## Installation
6
+
7
+ Requirements: Node.js >= 16
8
+
9
+ Global install:
10
+
11
+ ```bash
12
+ npm i -g agent-switchboard
13
+ ```
14
+
15
+ Run once without installing:
16
+
17
+ ```bash
18
+ npx agent-switchboard@latest mcp
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ 1) Create `~/.agent-switchboard/mcp.json` (if missing).
24
+ 2) Run the interactive UI:
25
+
26
+ ```bash
27
+ agent-switchboard mcp
28
+ # or
29
+ asb mcp
30
+ ```
31
+
32
+ That’s it. The tool updates `~/.agent-switchboard/mcp.json` and writes agent configs.
33
+
34
+ ## Configure Agents
35
+
36
+ Agent Switchboard only applies MCP servers to the agents you list in `~/.agent-switchboard/config.toml`.
37
+
38
+ Create the file if it does not exist:
39
+
40
+ ```toml
41
+ # ~/.agent-switchboard/config.toml
42
+ agents = ["codex", "cursor"]
43
+ ```
44
+
45
+ Supported agent IDs:
46
+ - `codex` — Codex CLI (~/.codex/config.toml)
47
+ - `cursor` — Cursor IDE (~/.cursor/mcp.json)
48
+ - `claude-code` — Claude Code CLI (~/.claude.json)
49
+ - `claude-desktop` — Claude Desktop app (platform-specific path)
50
+ - `gemini` — Gemini CLI (~/.gemini/settings.json)
51
+
52
+ Run `agent-switchboard mcp` again after updating the list.
53
+
54
+ ## License
55
+
56
+ MIT
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Agent adapter interface
3
+ * Implements the strategy pattern for different agent config formats
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ /**
7
+ * Agent adapter interface
8
+ * Each agent (Claude Code, Codex, Cursor, etc.) implements this interface
9
+ * to handle its specific configuration format and file location
10
+ */
11
+ export interface AgentAdapter {
12
+ /**
13
+ * Unique identifier for the agent
14
+ * @example "claude-code", "codex", "cursor"
15
+ */
16
+ readonly id: string;
17
+ /**
18
+ * Returns the absolute path to the agent's config file
19
+ * @returns Absolute path to the config file
20
+ * @example "/Users/username/.claude.json"
21
+ */
22
+ configPath(): string;
23
+ /**
24
+ * Applies MCP config to the agent's config file
25
+ * - Merges with existing config (preserves unknown fields)
26
+ * - The 'enable' field is excluded from the input
27
+ * @param config - MCP servers to apply (without 'enable')
28
+ */
29
+ applyConfig(config: {
30
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
31
+ }): void;
32
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Agent adapter interface
3
+ * Implements the strategy pattern for different agent config formats
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/agents/adapter.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Claude Code agent adapter
3
+ * Manages MCP server configuration for Claude Code CLI
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ import type { AgentAdapter } from "./adapter.js";
7
+ /**
8
+ * Claude Code agent adapter
9
+ * Config location: ~/.claude.json
10
+ */
11
+ export declare class ClaudeCodeAgent implements AgentAdapter {
12
+ readonly id: "claude-code";
13
+ configPath(): string;
14
+ applyConfig(config: {
15
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
16
+ }): void;
17
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Claude Code agent adapter
3
+ * Manages MCP server configuration for Claude Code CLI
4
+ */
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import { loadJsonFile, saveJsonFile, mergeMcpIntoAgent } from "./json-utils.js";
8
+ /**
9
+ * Claude Code agent adapter
10
+ * Config location: ~/.claude.json
11
+ */
12
+ export class ClaudeCodeAgent {
13
+ id = "claude-code";
14
+ configPath() {
15
+ const base = (process.env.ASB_AGENTS_HOME && process.env.ASB_AGENTS_HOME.trim().length > 0)
16
+ ? process.env.ASB_AGENTS_HOME
17
+ : os.homedir();
18
+ return path.join(base, ".claude.json");
19
+ }
20
+ applyConfig(config) {
21
+ const path = this.configPath();
22
+ const agentConfig = loadJsonFile(path, { mcpServers: {} });
23
+ const merged = mergeMcpIntoAgent(agentConfig, config.mcpServers);
24
+ saveJsonFile(path, merged);
25
+ }
26
+ }
27
+ //# sourceMappingURL=claude-code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/agents/claude-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAEtG;;;GAGG;AACH,MAAM,OAAO,eAAe;IAClB,EAAE,GAAG,aAAsB,CAAC;IAErC,UAAU;QACT,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,eAA0B;YACzC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACxC,CAAC;IAED,WAAW,CAAC,MAAiE;QAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,YAAY,CAAkB,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAoC,CAAC,CAAC;QAC3F,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;CACD"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Claude Desktop agent adapter
3
+ * Manages MCP server configuration for Claude Desktop app
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ import type { AgentAdapter } from "./adapter.js";
7
+ /**
8
+ * Claude Desktop config file structure
9
+ */
10
+ /**
11
+ * Claude Desktop agent adapter
12
+ * Config location (platform-specific):
13
+ * - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
14
+ * - Linux: ~/.config/Claude/claude_desktop_config.json
15
+ * - Windows: %APPDATA%\Claude\claude_desktop_config.json
16
+ */
17
+ export declare class ClaudeDesktopAgent implements AgentAdapter {
18
+ readonly id: "claude-desktop";
19
+ configPath(): string;
20
+ applyConfig(config: {
21
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
22
+ }): void;
23
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Claude Desktop agent adapter
3
+ * Manages MCP server configuration for Claude Desktop app
4
+ */
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import { loadJsonFile, saveJsonFile, mergeMcpIntoAgent } from "./json-utils.js";
8
+ /**
9
+ * Claude Desktop config file structure
10
+ */
11
+ // Uses shared JsonAgentConfig
12
+ /**
13
+ * Claude Desktop agent adapter
14
+ * Config location (platform-specific):
15
+ * - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
16
+ * - Linux: ~/.config/Claude/claude_desktop_config.json
17
+ * - Windows: %APPDATA%\Claude\claude_desktop_config.json
18
+ */
19
+ export class ClaudeDesktopAgent {
20
+ id = "claude-desktop";
21
+ configPath() {
22
+ const platform = os.platform();
23
+ const home = (process.env.ASB_AGENTS_HOME && process.env.ASB_AGENTS_HOME.trim().length > 0)
24
+ ? process.env.ASB_AGENTS_HOME
25
+ : os.homedir();
26
+ switch (platform) {
27
+ case "darwin": // macOS
28
+ return path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
29
+ case "win32": // Windows
30
+ return path.join(home, "AppData", "Roaming", "Claude", "claude_desktop_config.json");
31
+ case "linux": // Linux
32
+ return path.join(home, ".config", "Claude", "claude_desktop_config.json");
33
+ default:
34
+ throw new Error(`Unsupported platform: ${platform}`);
35
+ }
36
+ }
37
+ applyConfig(config) {
38
+ const path = this.configPath();
39
+ const agentConfig = loadJsonFile(path, { mcpServers: {} });
40
+ const merged = mergeMcpIntoAgent(agentConfig, config.mcpServers);
41
+ saveJsonFile(path, merged);
42
+ }
43
+ }
44
+ //# sourceMappingURL=claude-desktop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-desktop.js","sourceRoot":"","sources":["../../src/agents/claude-desktop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAGtG;;GAEG;AACH,8BAA8B;AAE9B;;;;;;GAMG;AACH,MAAM,OAAO,kBAAkB;IACrB,EAAE,GAAG,gBAAyB,CAAC;IAExC,UAAU;QACT,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,eAA0B;YACzC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAEhB,QAAQ,QAAQ,EAAE,CAAC;YAClB,KAAK,QAAQ,EAAE,QAAQ;gBACtB,OAAO,IAAI,CAAC,IAAI,CACf,IAAI,EACJ,SAAS,EACT,qBAAqB,EACrB,QAAQ,EACR,4BAA4B,CAC5B,CAAC;YACH,KAAK,OAAO,EAAE,UAAU;gBACvB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC;YACtF,KAAK,OAAO,EAAE,QAAQ;gBACrB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC;YAC3E;gBACC,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;IACF,CAAC;IAED,WAAW,CAAC,MAAiE;QAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,YAAY,CAAkB,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAoC,CAAC,CAAC;QAC3F,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;CACD"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Codex CLI Agent Adapter
3
+ * Handles TOML-based configuration with canonical section output
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ import type { AgentAdapter } from "./adapter.js";
7
+ /**
8
+ * Codex CLI agent adapter
9
+ * Config: ~/.codex/config.toml (TOML format)
10
+ */
11
+ export declare class CodexAgent implements AgentAdapter {
12
+ readonly id: "codex";
13
+ configPath(): string;
14
+ applyConfig(config: {
15
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
16
+ }): void;
17
+ private _loadConfig;
18
+ private _saveConfig;
19
+ }
20
+ /**
21
+ * Merge MCP server config into TOML content
22
+ * Preserves unrelated top-level tables/keys; rewrites mcp_servers in canonical form
23
+ */
24
+ export declare function mergeConfig(content: string, mcpServers: Record<string, Omit<McpServer, "enable">>): string;
25
+ /**
26
+ * Minimal shape for a Codex MCP server entry used by the renderer
27
+ */
28
+ export type McpServerLike = Record<string, unknown> & {
29
+ command?: string;
30
+ args?: string[];
31
+ url?: string;
32
+ type?: string;
33
+ env_file?: string;
34
+ env?: Record<string, unknown>;
35
+ };
36
+ /**
37
+ * Build canonical TOML: one table per server [mcp_servers.<name>]
38
+ * env must be written as dotted keys inside the same table: env.KEY = "VALUE"
39
+ * Key order per server: command, args, url, type, env_file, env.* (alpha), unknown (alpha)
40
+ * Exactly one blank line between server tables; final newline added by caller
41
+ */
42
+ export declare function buildNestedToml(mcpServers: Record<string, Omit<McpServerLike, "enable">>): string;
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Codex CLI Agent Adapter
3
+ * Handles TOML-based configuration with canonical section output
4
+ */
5
+ import fs from "node:fs";
6
+ import os from "node:os";
7
+ import path from "node:path";
8
+ import { parse as parseToml, stringify as tomlStringify } from "@iarna/toml";
9
+ /**
10
+ * Codex CLI agent adapter
11
+ * Config: ~/.codex/config.toml (TOML format)
12
+ */
13
+ export class CodexAgent {
14
+ id = "codex";
15
+ configPath() {
16
+ const base = (process.env.ASB_AGENTS_HOME && process.env.ASB_AGENTS_HOME.trim().length > 0)
17
+ ? process.env.ASB_AGENTS_HOME
18
+ : os.homedir();
19
+ return path.join(base, ".codex", "config.toml");
20
+ }
21
+ applyConfig(config) {
22
+ const content = this._loadConfig();
23
+ const updated = mergeConfig(content, config.mcpServers);
24
+ this._saveConfig(updated);
25
+ }
26
+ _loadConfig() {
27
+ const configPath = this.configPath();
28
+ if (!fs.existsSync(configPath)) {
29
+ return "";
30
+ }
31
+ return fs.readFileSync(configPath, "utf-8");
32
+ }
33
+ _saveConfig(content) {
34
+ const configPath = this.configPath();
35
+ const dirPath = path.dirname(configPath);
36
+ if (!fs.existsSync(dirPath)) {
37
+ fs.mkdirSync(dirPath, { recursive: true });
38
+ }
39
+ fs.writeFileSync(configPath, content, "utf-8");
40
+ }
41
+ }
42
+ /**
43
+ * Merge MCP server config into TOML content
44
+ * Preserves unrelated top-level tables/keys; rewrites mcp_servers in canonical form
45
+ */
46
+ export function mergeConfig(content, mcpServers) {
47
+ // Read existing content to preserve unrelated top-level keys (not comments)
48
+ let otherTopLevel = {};
49
+ try {
50
+ if (content && content.trim().length > 0) {
51
+ const parsed = parseToml(content);
52
+ // Remove mcp_servers from the preserved portion
53
+ const { mcp_servers: _ignored, ...rest } = (parsed ?? {});
54
+ otherTopLevel = rest;
55
+ }
56
+ }
57
+ catch {
58
+ // If parsing fails, drop old content entirely to avoid propagating bad state
59
+ otherTopLevel = {};
60
+ }
61
+ // Build canonical mcp_servers TOML from provided config
62
+ const mcpToml = buildNestedToml(mcpServers);
63
+ // Stringify other top-level tables/keys via iarna/toml
64
+ let otherToml = "";
65
+ try {
66
+ if (Object.keys(otherTopLevel).length > 0) {
67
+ otherToml = tomlStringify(otherTopLevel);
68
+ }
69
+ }
70
+ catch {
71
+ otherToml = "";
72
+ }
73
+ const parts = [];
74
+ if (otherToml.trim().length > 0)
75
+ parts.push(otherToml.trimEnd());
76
+ if (mcpToml.trim().length > 0)
77
+ parts.push(mcpToml.trimEnd());
78
+ return parts.join("\n\n") + "\n";
79
+ }
80
+ /**
81
+ * Build canonical TOML: one table per server [mcp_servers.<name>]
82
+ * env must be written as dotted keys inside the same table: env.KEY = "VALUE"
83
+ * Key order per server: command, args, url, type, env_file, env.* (alpha), unknown (alpha)
84
+ * Exactly one blank line between server tables; final newline added by caller
85
+ */
86
+ export function buildNestedToml(mcpServers) {
87
+ const lines = [];
88
+ const serverNames = Object.keys(mcpServers); // preserve insertion order for stability
89
+ for (let idx = 0; idx < serverNames.length; idx++) {
90
+ const name = serverNames[idx];
91
+ const server = (mcpServers[name] ?? {});
92
+ lines.push(`[mcp_servers.${name}]`);
93
+ const KNOWN_ORDER = [
94
+ "command",
95
+ "args",
96
+ "url",
97
+ "type",
98
+ "env_file",
99
+ ];
100
+ const emit = (k, v) => {
101
+ if (v === undefined || v === null)
102
+ return;
103
+ // Only allow primitives and primitive arrays
104
+ const isPrim = (x) => typeof x === "string" || typeof x === "number" || typeof x === "boolean";
105
+ const isPrimArr = (x) => Array.isArray(x) && x.every(isPrim);
106
+ if (!isPrim(v) && !isPrimArr(v))
107
+ return;
108
+ // @iarna/toml value formatting for RHS
109
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
+ const rhs = tomlStringify.value ? tomlStringify.value(v) : JSON.stringify(v);
111
+ lines.push(`${k} = ${rhs}`);
112
+ };
113
+ // Known keys
114
+ for (const k of KNOWN_ORDER)
115
+ emit(k, server[k]);
116
+ // env dotted keys (alphabetical)
117
+ if (server.env && typeof server.env === "object") {
118
+ const envEntries = Object.entries(server.env).filter(([_, v]) => v !== undefined && v !== null);
119
+ envEntries.sort(([a], [b]) => a.localeCompare(b));
120
+ for (const [ek, ev] of envEntries)
121
+ emit(`env.${ek}`, String(ev));
122
+ }
123
+ // Unknown keys (exclude known + env)
124
+ const knownSet = new Set([...KNOWN_ORDER.map(String), "env"]);
125
+ const unknownKeys = Object.keys(server)
126
+ .filter((k) => !knownSet.has(k))
127
+ .sort((a, b) => a.localeCompare(b));
128
+ for (const uk of unknownKeys)
129
+ emit(uk, server[uk]);
130
+ if (idx !== serverNames.length - 1)
131
+ lines.push(""); // blank line between servers
132
+ }
133
+ return lines.join("\n");
134
+ }
135
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/agents/codex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAI7E;;;GAGG;AACH,MAAM,OAAO,UAAU;IACb,EAAE,GAAG,OAAgB,CAAC;IAE/B,UAAU;QACT,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,eAA0B;YACzC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IACj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2
+ * Cursor agent adapter
3
+ * Manages MCP server configuration for Cursor IDE
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ import type { AgentAdapter } from "./adapter.js";
7
+ /**
8
+ * Cursor config file structure
9
+ */
10
+ /**
11
+ * Cursor agent adapter
12
+ * Config location: ~/.cursor/mcp.json
13
+ */
14
+ export declare class CursorAgent implements AgentAdapter {
15
+ readonly id: "cursor";
16
+ configPath(): string;
17
+ applyConfig(config: {
18
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
19
+ }): void;
20
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Cursor agent adapter
3
+ * Manages MCP server configuration for Cursor IDE
4
+ */
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import { loadJsonFile, saveJsonFile, mergeMcpIntoAgent } from "./json-utils.js";
8
+ /**
9
+ * Cursor config file structure
10
+ */
11
+ // Uses shared JsonAgentConfig
12
+ /**
13
+ * Cursor agent adapter
14
+ * Config location: ~/.cursor/mcp.json
15
+ */
16
+ export class CursorAgent {
17
+ id = "cursor";
18
+ configPath() {
19
+ const base = (process.env.ASB_AGENTS_HOME && process.env.ASB_AGENTS_HOME.trim().length > 0)
20
+ ? process.env.ASB_AGENTS_HOME
21
+ : os.homedir();
22
+ return path.join(base, ".cursor", "mcp.json");
23
+ }
24
+ applyConfig(config) {
25
+ const path = this.configPath();
26
+ const agentConfig = loadJsonFile(path, { mcpServers: {} });
27
+ const merged = mergeMcpIntoAgent(agentConfig, config.mcpServers);
28
+ saveJsonFile(path, merged);
29
+ }
30
+ }
31
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/agents/cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAGtG;;GAEG;AACH,8BAA8B;AAE9B;;;GAGG;AACH,MAAM,OAAO,WAAW;IACd,EAAE,GAAG,QAAiB,CAAC;IAEhC,UAAU;QACT,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,eAA0B;YACzC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,MAAiE;QAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,YAAY,CAAkB,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAoC,CAAC,CAAC;QAC3F,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;CACD"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Gemini CLI agent adapter
3
+ * Manages MCP server configuration for Gemini CLI
4
+ */
5
+ import type { McpServer } from "../config/schemas.js";
6
+ import type { AgentAdapter } from "./adapter.js";
7
+ /**
8
+ * Gemini CLI config file structure
9
+ */
10
+ /**
11
+ * Gemini CLI agent adapter
12
+ * Config location: ~/.gemini/settings.json
13
+ */
14
+ export declare class GeminiAgent implements AgentAdapter {
15
+ readonly id: "gemini";
16
+ configPath(): string;
17
+ applyConfig(config: {
18
+ mcpServers: Record<string, Omit<McpServer, "enable">>;
19
+ }): void;
20
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Gemini CLI agent adapter
3
+ * Manages MCP server configuration for Gemini CLI
4
+ */
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import { loadJsonFile, saveJsonFile, mergeMcpIntoAgent } from "./json-utils.js";
8
+ /**
9
+ * Gemini CLI config file structure
10
+ */
11
+ // Uses shared JsonAgentConfig
12
+ /**
13
+ * Gemini CLI agent adapter
14
+ * Config location: ~/.gemini/settings.json
15
+ */
16
+ export class GeminiAgent {
17
+ id = "gemini";
18
+ configPath() {
19
+ const base = (process.env.ASB_AGENTS_HOME && process.env.ASB_AGENTS_HOME.trim().length > 0)
20
+ ? process.env.ASB_AGENTS_HOME
21
+ : os.homedir();
22
+ return path.join(base, ".gemini", "settings.json");
23
+ }
24
+ applyConfig(config) {
25
+ const path = this.configPath();
26
+ const agentConfig = loadJsonFile(path, { mcpServers: {} });
27
+ const merged = mergeMcpIntoAgent(agentConfig, config.mcpServers);
28
+ saveJsonFile(path, merged);
29
+ }
30
+ }
31
+ //# sourceMappingURL=gemini.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/agents/gemini.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAGtG;;GAEG;AACH,8BAA8B;AAE9B;;;GAGG;AACH,MAAM,OAAO,WAAW;IACd,EAAE,GAAG,QAAiB,CAAC;IAEhC,UAAU;QACT,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1F,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,eAA0B;YACzC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACpD,CAAC;IAED,WAAW,CAAC,MAAiE;QAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,YAAY,CAAkB,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAoC,CAAC,CAAC;QAC3F,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;CACD"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared JSON file helpers for agent adapters
3
+ */
4
+ export type JsonAgentConfig = {
5
+ mcpServers?: Record<string, unknown>;
6
+ } & Record<string, unknown>;
7
+ export declare function loadJsonFile<T extends object>(filePath: string, fallback: T): T;
8
+ export declare function saveJsonFile(filePath: string, data: object): void;
9
+ export declare function mergeMcpIntoAgent(agentConfig: JsonAgentConfig, mcpServers: Record<string, object>): JsonAgentConfig;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Shared JSON file helpers for agent adapters
3
+ */
4
+ import fs from "node:fs";
5
+ export function loadJsonFile(filePath, fallback) {
6
+ if (!fs.existsSync(filePath))
7
+ return fallback;
8
+ const content = fs.readFileSync(filePath, "utf-8");
9
+ return JSON.parse(content);
10
+ }
11
+ export function saveJsonFile(filePath, data) {
12
+ const json = `${JSON.stringify(data, null, 2)}\n`;
13
+ fs.writeFileSync(filePath, json, "utf-8");
14
+ }
15
+ export function mergeMcpIntoAgent(agentConfig, mcpServers) {
16
+ if (Object.keys(mcpServers).length === 0)
17
+ return agentConfig;
18
+ const merged = { ...agentConfig };
19
+ const target = (merged.mcpServers ??= {});
20
+ for (const [name, server] of Object.entries(mcpServers)) {
21
+ const existing = target[name] ?? {};
22
+ target[name] = { ...existing, ...server };
23
+ }
24
+ return merged;
25
+ }
26
+ //# sourceMappingURL=json-utils.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C;AAChB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Agent adapter registry
3
+ * Central registry for all supported agent adapters
4
+ */
5
+ import type { AgentAdapter } from "./adapter.js";
6
+ /**
7
+ * Get an agent adapter by its ID
8
+ * @param id - Agent identifier (e.g., "claude-code", "codex", "cursor")
9
+ * @returns Agent adapter instance
10
+ * @throws {Error} If agent ID is not supported
11
+ */
12
+ export declare function getAgentById(id: string): AgentAdapter;
13
+ /**
14
+ * Get list of all supported agent IDs
15
+ * @returns Array of agent IDs
16
+ */
17
+ export declare function supportedAgentIds(): string[];
18
+ /**
19
+ * Register a new agent adapter
20
+ * Used for dynamic registration or testing
21
+ * @param adapter - Agent adapter to register
22
+ */
23
+ export declare function registerAgent(adapter: AgentAdapter): void;