@heretyc/subagent-mcp 2.10.2 → 2.10.3

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 (3) hide show
  1. package/README.md +2 -0
  2. package/dist/index.js +17 -4
  3. package/package.json +69 -68
package/README.md CHANGED
@@ -29,6 +29,8 @@ npm install -g @heretyc/subagent-mcp
29
29
 
30
30
  **Use this path for all standard installs.**
31
31
 
32
+ `subagent-mcp update` always refreshes from npmjs, even on machines whose `.npmrc` routes `@heretyc` packages through GitHub Packages.
33
+
32
34
  ### GitHub Packages (org-internal pin / supply-chain auditing)
33
35
 
34
36
  Use this path when your organization's `.npmrc` already routes the `@heretyc` scope through GitHub Packages, when you need supply-chain audit tracing against the org-internal artifact, or when you run inside a GitHub Actions workflow whose `GITHUB_TOKEN` carries `read:packages`. Otherwise prefer npmjs above — it is simpler and needs no credentials.
package/dist/index.js CHANGED
@@ -227,10 +227,12 @@ function runToolMaintenance() {
227
227
  }
228
228
  return records;
229
229
  }
230
- function withMaintenance(handler) {
230
+ function withMaintenance(handler, options = {}) {
231
231
  return async (params) => {
232
232
  const zombieRecords = runToolMaintenance();
233
233
  const result = await handler(params, zombieRecords);
234
+ if (options.omitZombieReport)
235
+ return result;
234
236
  if (result && typeof result === "object" && "content" in result) {
235
237
  return withZombieReport(result, zombieRecords);
236
238
  }
@@ -327,7 +329,7 @@ const ORCHESTRATION_INSTRUCTIONS = "subagent-mcp - CANONICAL OPERATING MODEL (fu
327
329
  const SUBAGENT_INSTRUCTIONS = "SUB-AGENT SESSION: you are a child process launched by subagent-mcp. Follow the parent prompt. Do not treat yourself as the orchestrator, do not re-trigger orchestration carryover, and do not launch further sub-agents unless the parent prompt explicitly assigns that.\n\nMODEL SELECTION MODE (parallel to orchestration-mode, set via the model-selection-mode tool). DEFAULT is \"smart\" and is used whenever unset: in smart, launch_agent REJECTS any call supplying provider/model/effort selectors and the server auto-picks the best model. \"user-approved-overrides\" opens a 30-MINUTE window where selectors are HONORED, enforced LAZILY (the mode reverts to smart on the next launch_agent call after 30 minutes) and re-enabling does NOT extend an active window. HONOR-BASED: you MUST NOT set \"user-approved-overrides\" without explicit interactive USER authorization via the structured-question tool (AskUserQuestion on Claude / request-user-input on Codex); never enable it on your own initiative.";
328
330
  const server = new McpServer({
329
331
  name: "subagent-mcp",
330
- version: "2.10.2",
332
+ version: "2.10.3",
331
333
  description: "Launches always-interactive local Claude and Codex sub-agent sessions and is the orchestrator's sole launch channel. Claude runs via the Claude Agent SDK over the local Claude Code executable; Codex via `codex app-server` over stdio. The server never calls Anthropic or OpenAI HTTP APIs directly.",
332
334
  }, {
333
335
  instructions: process.env.SUBAGENT_MCP_SUBAGENT === "1"
@@ -896,7 +898,8 @@ server.tool("launch_agent", "Spawn a sub-agent session. CONTRACT: every `prompt`
896
898
  .map((s, i) => ` ${i + 1}. ${s.model}@${s.effort} (${s.provider}) [${s.failure_type}]: ${s.reason}`)
897
899
  .join("\n");
898
900
  return errorResult(`Error: all ${skipped.length} candidate launches failed for task_category ${task_category}:\n${lines}\n${SPLIT_HINT}\n${AUTO_HINT}`);
899
- }));
901
+ }, { omitZombieReport: true }) // ponytail: launch_agent still reaps, but callers do not receive zombie_report.
902
+ );
900
903
  // Tool 2: poll_agent
901
904
  server.tool("poll_agent", "Get an agent's current status and output. `processing` = ALIVE with visible provider activity in the last 10 min; `stalled` = ALIVE but no visible provider stream item for 10 min (thinking, or awaiting a temp-file handoff) — NOT dead, so prefer `wait`/re-poll over killing. Always returns `alive` + `idle_seconds`, plus `recent_stream` (last 3 timestamped visible stream items) and a `hint` while stalled. `verbose: true` also returns `final_output`, the agent's final assistant turn from its captured stdout.", {
902
905
  agent_id: z.string(),
@@ -1337,7 +1340,17 @@ if (isMain) {
1337
1340
  }
1338
1341
  if (arg === "update" || arg === "--update") {
1339
1342
  const pkg = readPkg();
1340
- const npmArgs = ["install", "-g", `${pkg.name}@latest`];
1343
+ const scope = pkg.name.startsWith("@") ? pkg.name.split("/")[0] : null;
1344
+ const npmjsRegistryArgs = [
1345
+ "--registry=https://registry.npmjs.org",
1346
+ ...(scope ? [`--${scope}:registry=https://registry.npmjs.org`] : []),
1347
+ ];
1348
+ const npmArgs = [
1349
+ "install",
1350
+ "-g",
1351
+ ...npmjsRegistryArgs,
1352
+ `${pkg.name}@latest`,
1353
+ ];
1341
1354
  console.log(`subagent-mcp ${pkg.version} -> npm ${npmArgs.join(" ")}`);
1342
1355
  // npm on Windows is npm.cmd; spawning a .cmd without a shell fails
1343
1356
  // (EINVAL on modern Node). Resolve the underlying npm-cli.js and run it
package/package.json CHANGED
@@ -1,68 +1,69 @@
1
- {
2
- "name": "@heretyc/subagent-mcp",
3
- "version": "2.10.2",
4
- "description": "MCP server that launches and manages always-interactive Claude Code and Codex sub-agent sessions (no direct Anthropic/OpenAI API).",
5
- "keywords": [
6
- "mcp",
7
- "model-context-protocol",
8
- "mcp-server",
9
- "claude",
10
- "claude-code",
11
- "codex",
12
- "orchestration",
13
- "subagent",
14
- "sub-agent",
15
- "multi-agent",
16
- "ai-agents",
17
- "anthropic",
18
- "openai"
19
- ],
20
- "type": "module",
21
- "main": "dist/index.js",
22
- "bin": {
23
- "subagent-mcp": "dist/index.js"
24
- },
25
- "files": [
26
- "dist",
27
- "directives",
28
- "scripts/postinstall.mjs",
29
- "LICENSE",
30
- "NOTICE",
31
- "README.md"
32
- ],
33
- "scripts": {
34
- "check:versions": "node scripts/check_version_sync.mjs",
35
- "build": "npm run check:versions && node scripts/gen-ruleset-scaffold.mjs && tsc && node scripts/copy-provider.mjs",
36
- "start": "node dist/index.js",
37
- "postinstall": "node scripts/postinstall.mjs",
38
- "prepare": "npm run build",
39
- "prepublishOnly": "npm test",
40
- "test": "npm run check:versions && node test/effort.test.mjs && node test/drivers.test.mjs && node test/platform.test.mjs && node test/wait.test.mjs && node test/status.test.mjs && node test/output.test.mjs && node test/stream.test.mjs && node test/routing.test.mjs && node test/deadlock.test.mjs && node test/handler-validation.test.mjs && node test/index-handler.test.mjs && node test/ruleset.test.mjs && node test/ruleset-exec.test.mjs && node test/ruleset-handler.test.mjs && node test/failover.test.mjs && node test/global-concurrency-cap.test.mjs && node test/zombie.test.mjs && node test/orchestration-marker.test.mjs && node test/orchestration-hook-core.test.mjs && node test/orchestration-adapters.test.mjs && node test/orchestration-pretool.test.mjs && node test/orchestration-directives.test.mjs && node test/no-five-call.test.mjs && node test/check-worktree-subagent.test.mjs && node test/launch-agent-upsert.test.mjs && node test/claude-session-limit.test.mjs && node test/init-migration.test.mjs && node test/init-global.test.mjs && node test/mirror-fragments.test.mjs && node test/performance-tier-effort.test.mjs && node test/setup-repair.test.mjs && node test/setup-quoting.test.mjs && node test/setup-wire.test.mjs && node test/setup-cli-integration.test.mjs && node test/init.test.mjs && node test/model-selection-mode.test.mjs && node test/cli-args.test.mjs && node scripts/validate_provider.mjs && node scripts/validate_seed_sites.mjs && node scripts/validate_routing_audit.mjs && node test/seed-sites.test.mjs && node test/mcp-compliance.test.mjs"
41
- },
42
- "author": "Lexi Blackburn",
43
- "license": "Apache-2.0",
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://github.com/Heretyc/subagent-mcp.git"
47
- },
48
- "homepage": "https://github.com/Heretyc/subagent-mcp#readme",
49
- "bugs": {
50
- "url": "https://github.com/Heretyc/subagent-mcp/issues"
51
- },
52
- "dependencies": {
53
- "@anthropic-ai/claude-agent-sdk": "^0.3.177",
54
- "@modelcontextprotocol/sdk": "^1.0.0",
55
- "zod": "^4.4.3"
56
- },
57
- "devDependencies": {
58
- "@types/node": "^20.0.0",
59
- "typescript": "^5.0.0"
60
- },
61
- "engines": {
62
- "node": ">=18"
63
- },
64
- "publishConfig": {
65
- "registry": "https://registry.npmjs.org",
66
- "access": "public"
67
- }
68
- }
1
+ {
2
+ "name": "@heretyc/subagent-mcp",
3
+ "version": "2.10.3",
4
+ "description": "MCP server that launches and manages always-interactive Claude Code and Codex sub-agent sessions (no direct Anthropic/OpenAI API).",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "mcp-server",
9
+ "claude",
10
+ "claude-code",
11
+ "codex",
12
+ "orchestration",
13
+ "subagent",
14
+ "sub-agent",
15
+ "multi-agent",
16
+ "ai-agents",
17
+ "anthropic",
18
+ "openai"
19
+ ],
20
+ "type": "module",
21
+ "main": "dist/index.js",
22
+ "bin": {
23
+ "subagent-mcp": "dist/index.js"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "directives",
28
+ "scripts/postinstall.mjs",
29
+ "LICENSE",
30
+ "NOTICE",
31
+ "README.md"
32
+ ],
33
+ "scripts": {
34
+ "check:versions": "node scripts/check_version_sync.mjs",
35
+ "build": "npm run check:versions && node scripts/gen-ruleset-scaffold.mjs && tsc && node scripts/copy-provider.mjs",
36
+ "verify:npmjs-release": "node scripts/verify_npmjs_release.mjs",
37
+ "start": "node dist/index.js",
38
+ "postinstall": "node scripts/postinstall.mjs",
39
+ "prepare": "npm run build",
40
+ "prepublishOnly": "npm test",
41
+ "test": "npm run check:versions && node test/effort.test.mjs && node test/drivers.test.mjs && node test/platform.test.mjs && node test/wait.test.mjs && node test/status.test.mjs && node test/output.test.mjs && node test/stream.test.mjs && node test/routing.test.mjs && node test/deadlock.test.mjs && node test/handler-validation.test.mjs && node test/index-handler.test.mjs && node test/ruleset.test.mjs && node test/ruleset-exec.test.mjs && node test/ruleset-handler.test.mjs && node test/failover.test.mjs && node test/global-concurrency-cap.test.mjs && node test/zombie.test.mjs && node test/orchestration-marker.test.mjs && node test/orchestration-hook-core.test.mjs && node test/orchestration-adapters.test.mjs && node test/orchestration-pretool.test.mjs && node test/orchestration-directives.test.mjs && node test/no-five-call.test.mjs && node test/check-worktree-subagent.test.mjs && node test/launch-agent-upsert.test.mjs && node test/claude-session-limit.test.mjs && node test/init-migration.test.mjs && node test/init-global.test.mjs && node test/mirror-fragments.test.mjs && node test/performance-tier-effort.test.mjs && node test/setup-repair.test.mjs && node test/setup-quoting.test.mjs && node test/setup-wire.test.mjs && node test/setup-cli-integration.test.mjs && node test/init.test.mjs && node test/model-selection-mode.test.mjs && node test/cli-args.test.mjs && node scripts/validate_provider.mjs && node scripts/validate_seed_sites.mjs && node scripts/validate_routing_audit.mjs && node test/seed-sites.test.mjs && node test/mcp-compliance.test.mjs"
42
+ },
43
+ "author": "Lexi Blackburn",
44
+ "license": "Apache-2.0",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/Heretyc/subagent-mcp.git"
48
+ },
49
+ "homepage": "https://github.com/Heretyc/subagent-mcp#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/Heretyc/subagent-mcp/issues"
52
+ },
53
+ "dependencies": {
54
+ "@anthropic-ai/claude-agent-sdk": "^0.3.177",
55
+ "@modelcontextprotocol/sdk": "^1.0.0",
56
+ "zod": "^4.4.3"
57
+ },
58
+ "devDependencies": {
59
+ "@types/node": "^20.0.0",
60
+ "typescript": "^5.0.0"
61
+ },
62
+ "engines": {
63
+ "node": ">=18"
64
+ },
65
+ "publishConfig": {
66
+ "registry": "https://registry.npmjs.org",
67
+ "access": "public"
68
+ }
69
+ }