@heretyc/subagent-mcp 2.12.5-beta.1 → 2.12.5-beta.2
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/dist/index.js +1 -1
- package/dist/permission-engine.js +9 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -516,7 +516,7 @@ const ORCHESTRATION_INSTRUCTIONS = "subagent-mcp - CANONICAL OPERATING MODEL (fu
|
|
|
516
516
|
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.";
|
|
517
517
|
const server = new McpServer({
|
|
518
518
|
name: "subagent-mcp",
|
|
519
|
-
version: "2.12.5-beta.
|
|
519
|
+
version: "2.12.5-beta.2",
|
|
520
520
|
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.",
|
|
521
521
|
}, {
|
|
522
522
|
instructions: process.env.SUBAGENT_MCP_SUBAGENT === "1"
|
|
@@ -58,9 +58,15 @@ export function verdict(op, rules = {}) {
|
|
|
58
58
|
export function applyPermissionCeiling(engineVote, ceiling) {
|
|
59
59
|
if (ceiling === "yolo")
|
|
60
60
|
return "allow";
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
// The ceilings are NOT points on a permissiveness total order (the J2-9
|
|
62
|
+
// "total-order-over-modes" mistake). Neither `auto` nor `manual` may demote
|
|
63
|
+
// the engine's allow (SAFE) or deny (DANGER) decisions: SAFE always
|
|
64
|
+
// auto-allows, DANGER always auto-denies, and only NEUTRAL residue ("ask")
|
|
65
|
+
// parks. The auto/manual difference is solely *who* answers an "ask" —
|
|
66
|
+
// `auto` escalates only irreversible residue to a human while `manual` routes
|
|
67
|
+
// all residue to a human — which is decided downstream (see pending-permissions
|
|
68
|
+
// `escalate_to_human`), never by mapping SAFE ops to "ask" here.
|
|
69
|
+
return engineVote;
|
|
64
70
|
}
|
|
65
71
|
export function classifyPermissionOp(op) {
|
|
66
72
|
const command = commandText(op);
|
|
@@ -247,7 +253,3 @@ function wildcardMatch(pattern, value) {
|
|
|
247
253
|
const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[\\s\\S]*");
|
|
248
254
|
return new RegExp(`^${escaped}$`, "i").test(value);
|
|
249
255
|
}
|
|
250
|
-
function minVerdict(a, b) {
|
|
251
|
-
const rank = { deny: 0, ask: 1, allow: 2 };
|
|
252
|
-
return rank[a] <= rank[b] ? a : b;
|
|
253
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heretyc/subagent-mcp",
|
|
3
|
-
"version": "2.12.5-beta.
|
|
3
|
+
"version": "2.12.5-beta.2",
|
|
4
4
|
"description": "MCP server that launches and manages always-interactive Claude Code and Codex sub-agent sessions (no direct Anthropic/OpenAI API).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|