sub-agents-mcp 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -13
- package/dist/agents/AgentManager.d.ts +3 -1
- package/dist/agents/AgentManager.d.ts.map +1 -1
- package/dist/agents/AgentManager.js +56 -22
- package/dist/agents/AgentManager.js.map +1 -1
- package/dist/config/ServerConfig.d.ts +7 -1
- package/dist/config/ServerConfig.d.ts.map +1 -1
- package/dist/config/ServerConfig.js +17 -3
- package/dist/config/ServerConfig.js.map +1 -1
- package/dist/execution/AgentExecutor.d.ts +15 -2
- package/dist/execution/AgentExecutor.d.ts.map +1 -1
- package/dist/execution/AgentExecutor.js +287 -79
- package/dist/execution/AgentExecutor.js.map +1 -1
- package/dist/execution/StreamProcessor.d.ts +5 -1
- package/dist/execution/StreamProcessor.d.ts.map +1 -1
- package/dist/execution/StreamProcessor.js +93 -10
- package/dist/execution/StreamProcessor.js.map +1 -1
- package/dist/server/McpServer.d.ts.map +1 -1
- package/dist/server/McpServer.js +2 -0
- package/dist/server/McpServer.js.map +1 -1
- package/dist/tools/RunAgentTool.d.ts.map +1 -1
- package/dist/tools/RunAgentTool.js +9 -2
- package/dist/tools/RunAgentTool.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Bring Claude Code–style sub-agents to any MCP-compatible tool.
|
|
7
7
|
|
|
8
|
-
This MCP server lets you define task-specific AI agents (like "test-writer" or "code-reviewer") in markdown files, and execute them via Cursor CLI, Claude Code, Codex, Gemini CLI, GLM,
|
|
8
|
+
This MCP server lets you define task-specific AI agents (like "test-writer" or "code-reviewer") in markdown files, and execute them via Cursor CLI, Claude Code, Codex, Gemini CLI, GLM, Grok Build, or OpenCode backends.
|
|
9
9
|
|
|
10
10
|
## Why?
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ Claude Code offers powerful sub-agent workflows—but they're limited to its own
|
|
|
14
14
|
**Concrete benefits:**
|
|
15
15
|
- Define reusable agents once, use them across multiple tools
|
|
16
16
|
- Share agent definitions within teams regardless of IDE choice
|
|
17
|
-
- Leverage Cursor CLI, Claude Code, Codex, Gemini CLI, GLM,
|
|
17
|
+
- Leverage Cursor CLI, Claude Code, Codex, Gemini CLI, GLM, Grok Build, or OpenCode capabilities from any MCP client
|
|
18
18
|
|
|
19
19
|
→ [Read the full story](https://dev.to/shinpr/bringing-claude-codes-sub-agents-to-any-mcp-compatible-tool-1hb9)
|
|
20
20
|
|
|
@@ -25,10 +25,11 @@ Claude Code offers powerful sub-agent workflows—but they're limited to its own
|
|
|
25
25
|
| | sub-agents-mcp | sub-agents-skills |
|
|
26
26
|
|---|---|---|
|
|
27
27
|
| **Setup** | MCP configuration required | Copy skill files to your environment |
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
28
|
+
| **Configuration** | One backend/model policy per MCP server | Backend/model/permission per agent frontmatter |
|
|
29
|
+
| **Agent discovery** | Fixed `AGENTS_DIR` | Project-local `.agents` or `SUB_AGENTS_DIR` |
|
|
30
|
+
| **Strengths** | Sessions, MCP resources, structured responses, centralized policy | Lightweight setup and mixed backends in one project |
|
|
30
31
|
|
|
31
|
-
Choose **sub-agents-mcp**
|
|
32
|
+
Choose **sub-agents-mcp** when you want a centrally configured execution service. Choose **sub-agents-skills** when each agent should select its own backend and model in a Skill-compatible environment.
|
|
32
33
|
|
|
33
34
|
## Table of Contents
|
|
34
35
|
|
|
@@ -53,6 +54,7 @@ Choose **sub-agents-mcp** for production use with reliability features. Choose *
|
|
|
53
54
|
- `gemini` CLI (from Gemini CLI — requires `GEMINI_API_KEY`)
|
|
54
55
|
- `glm` backend (uses the Claude Code `claude` CLI with a Z.ai token)
|
|
55
56
|
- `grok` CLI (from Grok Build)
|
|
57
|
+
- `opencode` CLI (from OpenCode)
|
|
56
58
|
- An MCP-compatible tool (Cursor IDE, Claude Desktop, Windsurf, etc.)
|
|
57
59
|
|
|
58
60
|
## Quick Start
|
|
@@ -133,6 +135,13 @@ Set `AGENT_TYPE` to `glm` and add `CLI_API_KEY` to the MCP server environment in
|
|
|
133
135
|
curl -fsSL https://x.ai/cli/install.sh | bash
|
|
134
136
|
```
|
|
135
137
|
|
|
138
|
+
**For OpenCode users:**
|
|
139
|
+
```bash
|
|
140
|
+
brew install anomalyco/tap/opencode
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Configure providers and credentials in OpenCode normally. Each MCP invocation uses isolated data and state directories to avoid concurrent session database locks while continuing to use your normal configuration and credentials.
|
|
144
|
+
|
|
136
145
|
### 3. Configure MCP
|
|
137
146
|
|
|
138
147
|
Add this to your MCP configuration file:
|
|
@@ -148,7 +157,7 @@ Add this to your MCP configuration file:
|
|
|
148
157
|
"args": ["-y", "sub-agents-mcp"],
|
|
149
158
|
"env": {
|
|
150
159
|
"AGENTS_DIR": "/absolute/path/to/your/agents-folder",
|
|
151
|
-
"AGENT_TYPE": "cursor" // or "claude", "codex", "gemini", "glm", or "
|
|
160
|
+
"AGENT_TYPE": "cursor" // or "claude", "codex", "gemini", "glm", "grok", or "opencode"
|
|
152
161
|
}
|
|
153
162
|
}
|
|
154
163
|
}
|
|
@@ -184,6 +193,9 @@ Sub-agents may fail to execute shell commands with permission errors. This happe
|
|
|
184
193
|
|
|
185
194
|
# For Grok Build users
|
|
186
195
|
grok
|
|
196
|
+
|
|
197
|
+
# For OpenCode users
|
|
198
|
+
opencode
|
|
187
199
|
```
|
|
188
200
|
|
|
189
201
|
2. When prompted to allow commands (e.g., "Add Shell(cd), Shell(make) to allowlist?"), approve them
|
|
@@ -321,17 +333,34 @@ Which execution engine to use:
|
|
|
321
333
|
- `"codex"` - uses `codex` CLI (OpenAI Codex)
|
|
322
334
|
- `"glm"` - uses the Claude Code `claude` CLI against GLM's Z.ai endpoint
|
|
323
335
|
- `"grok"` - uses `grok` CLI (Grok Build)
|
|
336
|
+
- `"opencode"` - uses `opencode` CLI and its configured provider
|
|
324
337
|
|
|
325
338
|
### Optional Settings
|
|
326
339
|
|
|
327
340
|
**`AGENT_PERMISSION`**
|
|
328
341
|
Approval/sandbox level the sub-agent runs with. Default: `"safe-edit"`.
|
|
329
342
|
|
|
330
|
-
- `"read-only"` — investigation/review only, no edits or shell writes (codex `-s read-only` / claude+glm `--permission-mode plan` / gemini `--approval-mode plan` / cursor `--mode plan` / grok `--
|
|
331
|
-
- `"safe-edit"` — auto-approve edits and suppress prompts (codex `-s workspace-write` + `approval_policy=never` / claude+glm `--permission-mode acceptEdits` / gemini `--approval-mode auto_edit` / cursor `--trust` / grok `--permission
|
|
343
|
+
- `"read-only"` — investigation/review only, no edits or shell writes (codex `-s read-only` / claude+glm `--permission-mode plan` / gemini `--approval-mode plan` / cursor `--mode plan` / grok `--sandbox read-only` / OpenCode deny rules)
|
|
344
|
+
- `"safe-edit"` — auto-approve edits and suppress prompts (codex `-s workspace-write` + `approval_policy=never` / claude+glm `--permission-mode acceptEdits` / gemini `--approval-mode auto_edit` / cursor `--trust` / grok `--sandbox workspace` / OpenCode permission rules)
|
|
332
345
|
- `"yolo"` — bypass all approvals and sandboxing. Use with care.
|
|
333
346
|
|
|
334
|
-
Sub-agents have no stdin, so any approval prompt would deadlock the run. The default `safe-edit` removes prompts; the depth of sandboxing depends on the CLI — codex
|
|
347
|
+
Sub-agents have no stdin, so any approval prompt would deadlock the run. The default `safe-edit` removes prompts; the depth of sandboxing depends on the CLI — codex and grok enforce a workspace-level sandbox (codex `workspace-write`, grok `--sandbox workspace`), while claude / glm / gemini / cursor only auto-approve and do not jail edits to the workspace. OpenCode's permission configuration is also not an OS-level sandbox and cannot confine every side effect of programs launched through bash. Grok fixes `--permission-mode bypassPermissions` and uses the kernel-enforced `--sandbox` profile to confine writes per `AGENT_PERMISSION`. If you need strict containment, use a sandbox-backed backend.
|
|
348
|
+
|
|
349
|
+
OpenCode custom and MCP tools follow your OpenCode permissions even in `read-only`; explicitly deny any added tool that can cause side effects.
|
|
350
|
+
|
|
351
|
+
**`AGENT_MODEL`**
|
|
352
|
+
Optional model override applied to every execution by this MCP server. The value is passed to the selected backend as `--model`. When omitted, the backend uses its configured default.
|
|
353
|
+
|
|
354
|
+
```json
|
|
355
|
+
"AGENT_MODEL": "gpt-5.6-luna"
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
OpenCode model names normally use `provider/model` syntax.
|
|
359
|
+
|
|
360
|
+
**`AGENT_EFFORT`**
|
|
361
|
+
Optional backend/model-specific reasoning level or model variant. It is passed to Codex as `model_reasoning_effort`, Claude/GLM as `--effort`, Grok as `--reasoning-effort`, and OpenCode as `--variant`. Cursor and Gemini do not support this setting; the MCP server rejects that configuration at startup.
|
|
362
|
+
|
|
363
|
+
Accepted values depend on the selected backend and model. The MCP server forwards the value unchanged.
|
|
335
364
|
|
|
336
365
|
**`CLI_API_KEY`**
|
|
337
366
|
Z.ai API token for `AGENT_TYPE=glm`. It is forwarded to the Claude Code binary as `ANTHROPIC_AUTH_TOKEN` and never passed as a CLI argument. If you add or change it in your MCP client configuration, restart or reconnect the MCP server so the running process receives the new environment.
|
|
@@ -346,7 +375,7 @@ Each CLI normally reads settings from project-level directories (`.claude/`, `.c
|
|
|
346
375
|
|
|
347
376
|
Applied to: `claude`, `cursor`, `codex`.
|
|
348
377
|
|
|
349
|
-
Note: Gemini CLI
|
|
378
|
+
Note: Gemini CLI, Grok Build, and OpenCode do not use this option, so it has no effect when `AGENT_TYPE` is `gemini`, `grok`, or `opencode`. OpenCode continues its normal XDG/project configuration discovery. The `glm` backend also ignores this setting to avoid mixing Claude settings into the Z.ai-backed subprocess.
|
|
350
379
|
|
|
351
380
|
Example with custom settings:
|
|
352
381
|
```json
|
|
@@ -463,6 +492,9 @@ Make sure the Claude Code `claude` CLI is installed, then set `CLI_API_KEY` to y
|
|
|
463
492
|
**If using Grok Build:**
|
|
464
493
|
Make sure the `grok` CLI is installed and accessible.
|
|
465
494
|
|
|
495
|
+
**If using OpenCode:**
|
|
496
|
+
Make sure the `opencode` CLI is installed and that its provider credentials are configured. The MCP server gives every invocation an isolated OpenCode data/state directory to prevent concurrent SQLite session locks.
|
|
497
|
+
|
|
466
498
|
### Agent not found
|
|
467
499
|
|
|
468
500
|
Check that:
|
|
@@ -472,7 +504,7 @@ Check that:
|
|
|
472
504
|
|
|
473
505
|
### Other execution errors
|
|
474
506
|
|
|
475
|
-
1. Verify `AGENT_TYPE` is set correctly (`cursor`, `claude`, `gemini`, `codex`, `glm`, or `
|
|
507
|
+
1. Verify `AGENT_TYPE` is set correctly (`cursor`, `claude`, `gemini`, `codex`, `glm`, `grok`, or `opencode`)
|
|
476
508
|
2. Ensure your chosen CLI tool is installed and accessible
|
|
477
509
|
3. Double-check that all environment variables are set in the MCP config
|
|
478
510
|
|
|
@@ -524,14 +556,14 @@ The startup overhead is an intentional trade-off: the system favors clarity and
|
|
|
524
556
|
|
|
525
557
|
## How It Works
|
|
526
558
|
|
|
527
|
-
This MCP server acts as a bridge between your AI tool and a supported execution engine (Cursor CLI, Claude Code, Gemini CLI, Codex, GLM via Z.ai,
|
|
559
|
+
This MCP server acts as a bridge between your AI tool and a supported execution engine (Cursor CLI, Claude Code, Gemini CLI, Codex, GLM via Z.ai, Grok Build, or OpenCode).
|
|
528
560
|
|
|
529
561
|
**The flow:**
|
|
530
562
|
|
|
531
563
|
1. You configure the MCP server in your client (Cursor, Claude Desktop, etc.)
|
|
532
564
|
2. The client automatically launches `sub-agents-mcp` as a background process when it starts
|
|
533
565
|
3. When your main AI assistant needs a sub-agent, it makes an MCP tool call
|
|
534
|
-
4. The MCP server reads the agent definition (markdown file) and invokes the
|
|
566
|
+
4. The MCP server reads the agent definition (markdown file) and invokes the globally configured CLI (`cursor-agent`, `claude`, `gemini`, `codex`, `glm` via the `claude` binary, `grok`, or `opencode`)
|
|
535
567
|
5. The execution engine runs the agent and streams results back through the MCP server
|
|
536
568
|
6. Your main assistant receives the results and continues working
|
|
537
569
|
|
|
@@ -42,10 +42,12 @@ export declare class AgentManager {
|
|
|
42
42
|
/**
|
|
43
43
|
* Loads and parses a single agent definition from a file.
|
|
44
44
|
*
|
|
45
|
-
* @param
|
|
45
|
+
* @param resolvedFilePath - Validated real path used for reading the definition
|
|
46
|
+
* @param agentName - Agent name derived from the discovered directory entry
|
|
46
47
|
* @returns Promise resolving to the parsed agent definition or undefined
|
|
47
48
|
*/
|
|
48
49
|
private loadAgentFromFile;
|
|
50
|
+
private isWithinDirectory;
|
|
49
51
|
/**
|
|
50
52
|
* Extracts description from agent file content.
|
|
51
53
|
* Looks for first heading or first line as description.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentManager.d.ts","sourceRoot":"","sources":["../../src/agents/AgentManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE;;;;;;GAMG;AACH,qBAAa,YAAY;IAGX,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,MAAM,CAAQ;gBAEF,MAAM,EAAE,YAAY;IAIxC;;;;;;OAMG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAqClE;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAK9C;;;;;OAKG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC;;;;;OAKG;YACW,uBAAuB;
|
|
1
|
+
{"version":3,"file":"AgentManager.d.ts","sourceRoot":"","sources":["../../src/agents/AgentManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE;;;;;;GAMG;AACH,qBAAa,YAAY;IAGX,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,MAAM,CAAQ;gBAEF,MAAM,EAAE,YAAY;IAIxC;;;;;;OAMG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAqClE;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAK9C;;;;;OAKG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC;;;;;OAKG;YACW,uBAAuB;IAuFrC;;;;;;OAMG;YACW,iBAAiB;IAuC/B,OAAO,CAAC,iBAAiB;IAQzB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;CAiB3B"}
|
|
@@ -78,10 +78,23 @@ export class AgentManager {
|
|
|
78
78
|
*/
|
|
79
79
|
async loadAgentsFromDirectory() {
|
|
80
80
|
try {
|
|
81
|
-
const agentsDir = path.resolve(this.config.agentsDir);
|
|
81
|
+
const agentsDir = await fs.promises.realpath(path.resolve(this.config.agentsDir));
|
|
82
82
|
this.logger.info('Starting agent discovery', { directory: agentsDir });
|
|
83
83
|
const files = await fs.promises.readdir(agentsDir);
|
|
84
|
-
const agentFiles = files
|
|
84
|
+
const agentFiles = files
|
|
85
|
+
.filter((file) => file.endsWith('.md') || file.endsWith('.txt'))
|
|
86
|
+
.sort((left, right) => {
|
|
87
|
+
const leftName = left.replace(/\.(md|txt)$/, '');
|
|
88
|
+
const rightName = right.replace(/\.(md|txt)$/, '');
|
|
89
|
+
const nameOrder = leftName.localeCompare(rightName);
|
|
90
|
+
if (nameOrder !== 0)
|
|
91
|
+
return nameOrder;
|
|
92
|
+
if (left.endsWith('.md') && right.endsWith('.txt'))
|
|
93
|
+
return -1;
|
|
94
|
+
if (left.endsWith('.txt') && right.endsWith('.md'))
|
|
95
|
+
return 1;
|
|
96
|
+
return left.localeCompare(right);
|
|
97
|
+
});
|
|
85
98
|
this.logger.info('Agent definition files discovered', {
|
|
86
99
|
totalFiles: files.length,
|
|
87
100
|
agentFiles: agentFiles.length,
|
|
@@ -90,19 +103,34 @@ export class AgentManager {
|
|
|
90
103
|
const agents = new Map();
|
|
91
104
|
for (const file of agentFiles) {
|
|
92
105
|
const filePath = path.join(agentsDir, file);
|
|
106
|
+
const agentName = file.replace(/\.(md|txt)$/, '');
|
|
107
|
+
if (agents.has(agentName)) {
|
|
108
|
+
this.logger.warn('Duplicate agent definition ignored', {
|
|
109
|
+
name: agentName,
|
|
110
|
+
filePath,
|
|
111
|
+
selectedFilePath: agents.get(agentName)?.filePath,
|
|
112
|
+
});
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
let resolvedFilePath;
|
|
93
116
|
try {
|
|
94
|
-
|
|
95
|
-
if (agent) {
|
|
96
|
-
agents.set(agent.name, agent);
|
|
97
|
-
this.logger.debug('Agent definition loaded successfully', {
|
|
98
|
-
name: agent.name,
|
|
99
|
-
filePath: agent.filePath,
|
|
100
|
-
description: agent.description,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
117
|
+
resolvedFilePath = await fs.promises.realpath(filePath);
|
|
103
118
|
}
|
|
104
119
|
catch (error) {
|
|
105
|
-
this.logger.error('Failed to
|
|
120
|
+
this.logger.error('Failed to resolve agent definition file', error instanceof Error ? error : undefined, { filePath });
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (!this.isWithinDirectory(agentsDir, resolvedFilePath)) {
|
|
124
|
+
throw new Error(`Agent definition resolves outside the configured agents directory: ${file}`);
|
|
125
|
+
}
|
|
126
|
+
const agent = await this.loadAgentFromFile(resolvedFilePath, agentName);
|
|
127
|
+
if (agent) {
|
|
128
|
+
agents.set(agentName, agent);
|
|
129
|
+
this.logger.debug('Agent definition loaded successfully', {
|
|
130
|
+
name: agent.name,
|
|
131
|
+
filePath: agent.filePath,
|
|
132
|
+
description: agent.description,
|
|
133
|
+
});
|
|
106
134
|
}
|
|
107
135
|
}
|
|
108
136
|
this.logger.info('Agent discovery completed', {
|
|
@@ -113,30 +141,31 @@ export class AgentManager {
|
|
|
113
141
|
}
|
|
114
142
|
catch (error) {
|
|
115
143
|
this.logger.error('Failed to scan agents directory', error instanceof Error ? error : undefined, { directory: this.config.agentsDir });
|
|
144
|
+
if (error instanceof Error && error.message.startsWith('Agent definition resolves outside')) {
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
116
147
|
throw new Error(`Failed to load agents from directory: ${this.config.agentsDir}`);
|
|
117
148
|
}
|
|
118
149
|
}
|
|
119
150
|
/**
|
|
120
151
|
* Loads and parses a single agent definition from a file.
|
|
121
152
|
*
|
|
122
|
-
* @param
|
|
153
|
+
* @param resolvedFilePath - Validated real path used for reading the definition
|
|
154
|
+
* @param agentName - Agent name derived from the discovered directory entry
|
|
123
155
|
* @returns Promise resolving to the parsed agent definition or undefined
|
|
124
156
|
*/
|
|
125
|
-
async loadAgentFromFile(
|
|
157
|
+
async loadAgentFromFile(resolvedFilePath, agentName) {
|
|
126
158
|
try {
|
|
127
|
-
this.logger.debug('Loading agent definition from file', { filePath });
|
|
128
|
-
const content = await fs.promises.readFile(
|
|
129
|
-
const stats = await fs.promises.stat(
|
|
130
|
-
// Extract agent name from filename (without extension)
|
|
131
|
-
const fileName = path.basename(filePath);
|
|
132
|
-
const agentName = fileName.replace(/\.(md|txt)$/, '');
|
|
159
|
+
this.logger.debug('Loading agent definition from file', { filePath: resolvedFilePath });
|
|
160
|
+
const content = await fs.promises.readFile(resolvedFilePath, 'utf-8');
|
|
161
|
+
const stats = await fs.promises.stat(resolvedFilePath);
|
|
133
162
|
// Parse description from content (first line or first heading)
|
|
134
163
|
const description = this.extractDescription(content);
|
|
135
164
|
const agentDefinition = {
|
|
136
165
|
name: agentName,
|
|
137
166
|
description,
|
|
138
167
|
content,
|
|
139
|
-
filePath,
|
|
168
|
+
filePath: resolvedFilePath,
|
|
140
169
|
lastModified: stats.mtime,
|
|
141
170
|
};
|
|
142
171
|
this.logger.debug('Agent definition parsed successfully', {
|
|
@@ -148,10 +177,15 @@ export class AgentManager {
|
|
|
148
177
|
return agentDefinition;
|
|
149
178
|
}
|
|
150
179
|
catch (error) {
|
|
151
|
-
this.logger.error('Error reading agent definition file', error instanceof Error ? error : undefined, { filePath });
|
|
180
|
+
this.logger.error('Error reading agent definition file', error instanceof Error ? error : undefined, { filePath: resolvedFilePath });
|
|
152
181
|
return undefined;
|
|
153
182
|
}
|
|
154
183
|
}
|
|
184
|
+
isWithinDirectory(root, candidate) {
|
|
185
|
+
const relative = path.relative(root, candidate);
|
|
186
|
+
return (relative === '' ||
|
|
187
|
+
(relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative)));
|
|
188
|
+
}
|
|
155
189
|
/**
|
|
156
190
|
* Extracts description from agent file content.
|
|
157
191
|
* Looks for first heading or first line as description.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentManager.js","sourceRoot":"","sources":["../../src/agents/AgentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAe,MAAM,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEvE;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IAGH;IAFZ,MAAM,CAAQ;IAEtB,YAAoB,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,gCAAgC;QAChC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;QAC/D,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;QAC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AAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QAE/D,kCAAkC;QAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;YAC1C,CAAC;QACH,CAAC;QAED,oCAAoC;QACpC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACxB,CAAC;QAED,OAAO,kBAAkB,CAAA;IAC3B,CAAC;CACF"}
|
|
@@ -10,8 +10,10 @@ import { type LogLevel } from '../utils/Logger.js';
|
|
|
10
10
|
* - SERVER_NAME: Name identifier for the MCP server (default: 'sub-agents-mcp-server')
|
|
11
11
|
* - SERVER_VERSION: Version of the MCP server (default: '1.0.0')
|
|
12
12
|
* - AGENTS_DIR: Directory containing agent definition files (REQUIRED - must be absolute path)
|
|
13
|
-
* - AGENT_TYPE: Type of agent to use (
|
|
13
|
+
* - AGENT_TYPE: Type of agent to use (default: 'cursor')
|
|
14
14
|
* - AGENT_PERMISSION: Approval/sandbox level for sub-agents ('read-only' | 'safe-edit' | 'yolo') (default: 'safe-edit')
|
|
15
|
+
* - AGENT_MODEL: Optional model override for every agent execution
|
|
16
|
+
* - AGENT_EFFORT: Optional backend-specific reasoning effort/model variant
|
|
15
17
|
* - LOG_LEVEL: Log level for server operations (default: 'info')
|
|
16
18
|
* - SESSION_ENABLED: Enable session management functionality (default: false)
|
|
17
19
|
* - SESSION_DIR: Directory for storing session files (default: '.mcp-sessions')
|
|
@@ -29,6 +31,10 @@ export declare class ServerConfig {
|
|
|
29
31
|
readonly agentType: AgentType;
|
|
30
32
|
/** Approval/sandbox level for sub-agent execution */
|
|
31
33
|
readonly agentPermission: AgentPermission;
|
|
34
|
+
/** Optional model override applied to every execution */
|
|
35
|
+
readonly agentModel: string | undefined;
|
|
36
|
+
/** Optional backend-specific reasoning effort or model variant */
|
|
37
|
+
readonly agentEffort: string | undefined;
|
|
32
38
|
/** Log level for server operations */
|
|
33
39
|
readonly logLevel: LogLevel;
|
|
34
40
|
/** Maximum execution timeout in milliseconds for agent execution */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerConfig.d.ts","sourceRoot":"","sources":["../../src/config/ServerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"ServerConfig.d.ts","sourceRoot":"","sources":["../../src/config/ServerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,SAAS,EAKf,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,YAAY;IACvB,uDAAuD;IACvD,SAAgB,UAAU,EAAE,MAAM,CAAA;IAElC,6CAA6C;IAC7C,SAAgB,aAAa,EAAE,MAAM,CAAA;IAErC,gEAAgE;IAChE,SAAgB,SAAS,EAAE,MAAM,CAAA;IAEjC,yCAAyC;IACzC,SAAgB,SAAS,EAAE,SAAS,CAAA;IAEpC,qDAAqD;IACrD,SAAgB,eAAe,EAAE,eAAe,CAAA;IAEhD,yDAAyD;IACzD,SAAgB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAE9C,kEAAkE;IAClE,SAAgB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAE/C,sCAAsC;IACtC,SAAgB,QAAQ,EAAE,QAAQ,CAAA;IAElC,oEAAoE;IACpE,SAAgB,kBAAkB,EAAE,MAAM,CAAA;IAE1C,8CAA8C;IAC9C,SAAgB,cAAc,EAAE,OAAO,CAAA;IAEvC,0CAA0C;IAC1C,SAAgB,UAAU,EAAE,MAAM,CAAA;IAElC,4DAA4D;IAC5D,SAAgB,oBAAoB,EAAE,MAAM,CAAA;IAE5C,8DAA8D;IAC9D,SAAgB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;IAEtD,2FAA2F;IAC3F,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhD,qEAAqE;IACrE,SAAgB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAE7C;;;;OAIG;;CA0GJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AGENT_PERMISSIONS, AGENT_TYPES, DEFAULT_AGENT_PERMISSION, isAgentPermission, isAgentType, } from '../execution/AgentExecutor.js';
|
|
1
|
+
import { AGENT_PERMISSIONS, AGENT_TYPES, DEFAULT_AGENT_PERMISSION, isAgentPermission, isAgentType, supportsAgentEffort, } from '../execution/AgentExecutor.js';
|
|
2
2
|
import { isLogLevel, LOG_LEVELS } from '../utils/Logger.js';
|
|
3
3
|
/**
|
|
4
4
|
* Server configuration management class.
|
|
@@ -10,8 +10,10 @@ import { isLogLevel, LOG_LEVELS } from '../utils/Logger.js';
|
|
|
10
10
|
* - SERVER_NAME: Name identifier for the MCP server (default: 'sub-agents-mcp-server')
|
|
11
11
|
* - SERVER_VERSION: Version of the MCP server (default: '1.0.0')
|
|
12
12
|
* - AGENTS_DIR: Directory containing agent definition files (REQUIRED - must be absolute path)
|
|
13
|
-
* - AGENT_TYPE: Type of agent to use (
|
|
13
|
+
* - AGENT_TYPE: Type of agent to use (default: 'cursor')
|
|
14
14
|
* - AGENT_PERMISSION: Approval/sandbox level for sub-agents ('read-only' | 'safe-edit' | 'yolo') (default: 'safe-edit')
|
|
15
|
+
* - AGENT_MODEL: Optional model override for every agent execution
|
|
16
|
+
* - AGENT_EFFORT: Optional backend-specific reasoning effort/model variant
|
|
15
17
|
* - LOG_LEVEL: Log level for server operations (default: 'info')
|
|
16
18
|
* - SESSION_ENABLED: Enable session management functionality (default: false)
|
|
17
19
|
* - SESSION_DIR: Directory for storing session files (default: '.mcp-sessions')
|
|
@@ -29,6 +31,10 @@ export class ServerConfig {
|
|
|
29
31
|
agentType;
|
|
30
32
|
/** Approval/sandbox level for sub-agent execution */
|
|
31
33
|
agentPermission;
|
|
34
|
+
/** Optional model override applied to every execution */
|
|
35
|
+
agentModel;
|
|
36
|
+
/** Optional backend-specific reasoning effort or model variant */
|
|
37
|
+
agentEffort;
|
|
32
38
|
/** Log level for server operations */
|
|
33
39
|
logLevel;
|
|
34
40
|
/** Maximum execution timeout in milliseconds for agent execution */
|
|
@@ -88,6 +94,14 @@ export class ServerConfig {
|
|
|
88
94
|
else {
|
|
89
95
|
throw new Error(`Invalid AGENT_PERMISSION: "${agentPermissionEnv}". Must be one of: ${AGENT_PERMISSIONS.join(', ')}.`);
|
|
90
96
|
}
|
|
97
|
+
const agentModelEnv = process.env['AGENT_MODEL']?.trim();
|
|
98
|
+
this.agentModel = agentModelEnv || undefined;
|
|
99
|
+
const agentEffortEnv = process.env['AGENT_EFFORT']?.trim();
|
|
100
|
+
this.agentEffort = agentEffortEnv || undefined;
|
|
101
|
+
if (this.agentEffort && !supportsAgentEffort(this.agentType)) {
|
|
102
|
+
throw new Error(`AGENT_EFFORT is not supported for AGENT_TYPE="${this.agentType}". ` +
|
|
103
|
+
'Supported types: codex, claude, glm, grok, opencode.');
|
|
104
|
+
}
|
|
91
105
|
const logLevelEnv = process.env['LOG_LEVEL']?.trim();
|
|
92
106
|
if (!logLevelEnv) {
|
|
93
107
|
this.logLevel = 'info';
|
|
@@ -125,7 +139,7 @@ export class ServerConfig {
|
|
|
125
139
|
// - Claude: passed as --settings argument
|
|
126
140
|
// - Cursor: set as CURSOR_CONFIG_DIR environment variable
|
|
127
141
|
// - Codex: set as CODEX_HOME environment variable
|
|
128
|
-
// - Gemini/Grok: not supported (upstream limitation)
|
|
142
|
+
// - Gemini/Grok/OpenCode: not supported (upstream limitation or normal config discovery)
|
|
129
143
|
this.agentsSettingsPath = process.env['AGENTS_SETTINGS_PATH'] || undefined;
|
|
130
144
|
// Cursor API key: prefer CURSOR_API_KEY, fall back to CLI_API_KEY for backward compatibility
|
|
131
145
|
const cursorApiKeyEnv = process.env['CURSOR_API_KEY'] || process.env['CLI_API_KEY'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerConfig.js","sourceRoot":"","sources":["../../src/config/ServerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAGX,wBAAwB,EACxB,iBAAiB,EACjB,WAAW,
|
|
1
|
+
{"version":3,"file":"ServerConfig.js","sourceRoot":"","sources":["../../src/config/ServerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAGX,wBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAiB,MAAM,oBAAoB,CAAA;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,YAAY;IACvB,uDAAuD;IACvC,UAAU,CAAQ;IAElC,6CAA6C;IAC7B,aAAa,CAAQ;IAErC,gEAAgE;IAChD,SAAS,CAAQ;IAEjC,yCAAyC;IACzB,SAAS,CAAW;IAEpC,qDAAqD;IACrC,eAAe,CAAiB;IAEhD,yDAAyD;IACzC,UAAU,CAAoB;IAE9C,kEAAkE;IAClD,WAAW,CAAoB;IAE/C,sCAAsC;IACtB,QAAQ,CAAU;IAElC,oEAAoE;IACpD,kBAAkB,CAAQ;IAE1C,8CAA8C;IAC9B,cAAc,CAAS;IAEvC,0CAA0C;IAC1B,UAAU,CAAQ;IAElC,4DAA4D;IAC5C,oBAAoB,CAAQ;IAE5C,8DAA8D;IAC9C,kBAAkB,CAAoB;IAEtD,2FAA2F;IAC3E,YAAY,CAAoB;IAEhD,qEAAqE;IACrD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AAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAA;QAEzE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;QAC/C,IAAI,CAAC,SAAS,GAAG,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAA;IAClE,CAAC;CACF"}
|
|
@@ -45,9 +45,11 @@ export interface ExecutionConfig {
|
|
|
45
45
|
* Default: 5 minutes (300000ms)
|
|
46
46
|
*/
|
|
47
47
|
executionTimeout: number;
|
|
48
|
+
/** Maximum combined stdout/stderr bytes retained in memory. */
|
|
49
|
+
maxOutputBytes: number;
|
|
48
50
|
/**
|
|
49
51
|
* Type of agent to use for execution.
|
|
50
|
-
* 'cursor', 'claude', 'gemini', 'codex', 'glm', or '
|
|
52
|
+
* 'cursor', 'claude', 'gemini', 'codex', 'glm', 'grok', or 'opencode'
|
|
51
53
|
*/
|
|
52
54
|
agentType: AgentType;
|
|
53
55
|
/**
|
|
@@ -78,15 +80,21 @@ export interface ExecutionConfig {
|
|
|
78
80
|
* Passed to the claude binary via ANTHROPIC_AUTH_TOKEN environment variable.
|
|
79
81
|
*/
|
|
80
82
|
glmApiKey?: string;
|
|
83
|
+
/** Optional model override applied to every execution by this MCP server. */
|
|
84
|
+
model?: string;
|
|
85
|
+
/** Optional backend-specific reasoning effort or model variant. */
|
|
86
|
+
effort?: string;
|
|
81
87
|
}
|
|
82
88
|
export declare const DEFAULT_EXECUTION_TIMEOUT = 300000;
|
|
83
89
|
/**
|
|
84
90
|
* Supported agent runtimes. Single source of truth for both runtime validation
|
|
85
91
|
* (ServerConfig) and static typing.
|
|
86
92
|
*/
|
|
87
|
-
export declare const AGENT_TYPES: readonly ["cursor", "claude", "gemini", "codex", "glm", "grok"];
|
|
93
|
+
export declare const AGENT_TYPES: readonly ["cursor", "claude", "gemini", "codex", "glm", "grok", "opencode"];
|
|
88
94
|
export type AgentType = (typeof AGENT_TYPES)[number];
|
|
89
95
|
export declare function isAgentType(value: unknown): value is AgentType;
|
|
96
|
+
export declare const AGENT_EFFORT_SUPPORTED_TYPES: readonly ["codex", "claude", "glm", "grok", "opencode"];
|
|
97
|
+
export declare function supportsAgentEffort(agentType: AgentType): agentType is (typeof AGENT_EFFORT_SUPPORTED_TYPES)[number];
|
|
90
98
|
/**
|
|
91
99
|
* Supported permission levels. Single source of truth for both runtime
|
|
92
100
|
* validation (ServerConfig) and static typing.
|
|
@@ -162,6 +170,7 @@ export declare class AgentExecutor {
|
|
|
162
170
|
*/
|
|
163
171
|
private buildSettingsPathEnv;
|
|
164
172
|
private permissionFlags;
|
|
173
|
+
private invocationFlags;
|
|
165
174
|
private formatSystemUserPrompt;
|
|
166
175
|
private buildCodexArgs;
|
|
167
176
|
private buildClaudeArgs;
|
|
@@ -169,7 +178,10 @@ export declare class AgentExecutor {
|
|
|
169
178
|
private buildGeminiArgs;
|
|
170
179
|
private buildCursorArgs;
|
|
171
180
|
private buildGrokArgs;
|
|
181
|
+
private buildOpenCodeArgs;
|
|
172
182
|
private buildSpawnEnv;
|
|
183
|
+
private prepareSpawnEnvironment;
|
|
184
|
+
private errorCode;
|
|
173
185
|
/**
|
|
174
186
|
* Executes an agent using child_process.spawn for proper TTY handling.
|
|
175
187
|
*
|
|
@@ -178,6 +190,7 @@ export declare class AgentExecutor {
|
|
|
178
190
|
* @returns Promise resolving to execution result
|
|
179
191
|
*/
|
|
180
192
|
private executeWithSpawn;
|
|
193
|
+
private signalNumber;
|
|
181
194
|
/**
|
|
182
195
|
* Generates a unique request ID for tracking execution requests.
|
|
183
196
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentExecutor.d.ts","sourceRoot":"","sources":["../../src/execution/AgentExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentExecutor.d.ts","sourceRoot":"","sources":["../../src/execution/AgentExecutor.ts"],"names":[],"mappings":"AAKA,OAAO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