github-router 0.3.315 → 0.3.316
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/{attribution-settings-DXmmyuEE.js → attribution-settings-jcsSeVur.js} +116 -17
- package/dist/attribution-settings-jcsSeVur.js.map +1 -0
- package/dist/{auth-D8t41c5D.js → auth-JfxL9q7z.js} +3 -3
- package/dist/{auth-D8t41c5D.js.map → auth-JfxL9q7z.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-BpBKOjGZ.js → check-usage-DXUEQzt_.js} +3 -3
- package/dist/{check-usage-BpBKOjGZ.js.map → check-usage-DXUEQzt_.js.map} +1 -1
- package/dist/{claude-Cmmu3-cL.js → claude-CJ4Nd2_3.js} +94 -29
- package/dist/claude-CJ4Nd2_3.js.map +1 -0
- package/dist/{codex-DqTKKoEx.js → codex-CwuLqNZF.js} +6 -6
- package/dist/codex-CwuLqNZF.js.map +1 -0
- package/dist/engine-DwrxceOS.js +2 -0
- package/dist/{gate-discovery-CPk6Z8yc.js → gate-discovery-z04ywOzB.js} +2 -2
- package/dist/{gate-discovery-CPk6Z8yc.js.map → gate-discovery-z04ywOzB.js.map} +1 -1
- package/dist/{get-copilot-usage-FSQE8szQ.js → get-copilot-usage-BMD_cJNT.js} +3 -3
- package/dist/{get-copilot-usage-FSQE8szQ.js.map → get-copilot-usage-BMD_cJNT.js.map} +1 -1
- package/dist/hooks.mjs +1 -0
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-max-dispatch-guard-l1NGYHtF.js → internal-max-dispatch-guard-BNqQ2wMc.js} +2 -2
- package/dist/{internal-max-dispatch-guard-l1NGYHtF.js.map → internal-max-dispatch-guard-BNqQ2wMc.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-BzKsY9ze.js → internal-max-dispatch-guard-Bz7a2Ntf.js} +1 -1
- package/dist/{internal-stop-hook-BKiKYeda.js → internal-stop-hook-UN1JHtjj.js} +2 -2
- package/dist/{internal-stop-hook-BKiKYeda.js.map → internal-stop-hook-UN1JHtjj.js.map} +1 -1
- package/dist/main.js +9 -9
- package/dist/{max-profile-contract-BcrMlrmo.js → max-profile-contract-Bl7I_EOC.js} +2 -2
- package/dist/{max-profile-contract-BcrMlrmo.js.map → max-profile-contract-Bl7I_EOC.js.map} +1 -1
- package/dist/{models-DgLeb-Dv.js → models-CVzyU5mJ.js} +2 -2
- package/dist/{models-DgLeb-Dv.js.map → models-CVzyU5mJ.js.map} +1 -1
- package/dist/{peer-mcp-personas-CYWJSxPK.js → peer-mcp-personas-CQ-0Piyr.js} +166 -45
- package/dist/peer-mcp-personas-CQ-0Piyr.js.map +1 -0
- package/dist/{provision-AwSjt-vR.js → provision-_R7ZMygj.js} +2 -2
- package/dist/{provision-AwSjt-vR.js.map → provision-_R7ZMygj.js.map} +1 -1
- package/dist/{serve-BG2O6Slz.js → serve-DU66K5kv.js} +7 -7
- package/dist/{serve-BG2O6Slz.js.map → serve-DU66K5kv.js.map} +1 -1
- package/dist/{server-setup-D7ABbEs1.js → server-setup-iLG8LrfL.js} +165 -27
- package/dist/server-setup-iLG8LrfL.js.map +1 -0
- package/dist/{start-Dpwpnq99.js → start-DQTcm0o_.js} +3 -3
- package/dist/{start-Dpwpnq99.js.map → start-DQTcm0o_.js.map} +1 -1
- package/dist/{state-B8adscCv.js → state-BlMpEFAt.js} +2 -1
- package/dist/{state-B8adscCv.js.map → state-BlMpEFAt.js.map} +1 -1
- package/dist/{token-ClzS23Y2.js → token-C1gthnbV.js} +2 -2
- package/dist/{token-ClzS23Y2.js.map → token-C1gthnbV.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-DXmmyuEE.js.map +0 -1
- package/dist/claude-Cmmu3-cL.js.map +0 -1
- package/dist/codex-DqTKKoEx.js.map +0 -1
- package/dist/engine-b9XaKLp0.js +0 -2
- package/dist/peer-mcp-personas-CYWJSxPK.js.map +0 -1
- package/dist/server-setup-D7ABbEs1.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { An as
|
|
1
|
+
import { An as oneMContextDisabled, Bn as CHEAP_PROFILE_MODELS, Fn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Hn as CHEAP_PROFILE_NATIVE_EFFORTS, In as CHEAPEST_PROFILE_NATIVE_EFFORTS, Ln as CHEAPEST_PROFILE_NATIVE_MODELS, Pn as CHEAPEST_PROFILE_MODELS, Un as CHEAP_PROFILE_NATIVE_MODELS, Vn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, a as buildAgentPrompt, jn as withOneMSuffix, l as maxPersonasFor, ln as CONDENSED_OPERATING_SEQUENCE, n as MCP_GROUPS, t as GROUP_META, u as personasFor, un as DEFINITION_OF_GREATNESS } from "./peer-mcp-personas-CQ-0Piyr.js";
|
|
2
2
|
import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-CMxlQEfQ.js";
|
|
3
|
-
import { f as LUNA_SCOUT_ALIAS_ID } from "./server-setup-
|
|
3
|
+
import { f as LUNA_SCOUT_ALIAS_ID } from "./server-setup-iLG8LrfL.js";
|
|
4
4
|
import { c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-_DhIWank.js";
|
|
5
|
-
import { C as MAX_PARALLELISM_RULE, S as MAX_COORDINATOR_PROMPT, T as maxNativePrompt, a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS, w as maxNativeDescription, x as MAX_COORDINATOR_DESCRIPTION } from "./max-profile-contract-
|
|
5
|
+
import { C as MAX_PARALLELISM_RULE, S as MAX_COORDINATOR_PROMPT, T as maxNativePrompt, a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS, w as maxNativeDescription, x as MAX_COORDINATOR_DESCRIPTION } from "./max-profile-contract-Bl7I_EOC.js";
|
|
6
6
|
import "./self-invocation-cRl4RqfW.js";
|
|
7
|
-
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-
|
|
7
|
+
import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-_R7ZMygj.js";
|
|
8
8
|
import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-BYgWioLH.js";
|
|
9
9
|
import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DMIdrlsF.js";
|
|
10
10
|
import consola from "consola";
|
|
@@ -551,6 +551,95 @@ function buildCheapProfileAgentDefinitions(opts) {
|
|
|
551
551
|
for (const name of Object.keys(out)) if (name !== "worker-browse" && !roster.has(name)) delete out[name];
|
|
552
552
|
return out;
|
|
553
553
|
}
|
|
554
|
+
/** Build the literal `-m cheapest` native roster. Same fixed five-agent
|
|
555
|
+
* surface and roles as `-m cheap`, but Luna-led with a Gemini reviewer —
|
|
556
|
+
* every SUBAGENT model emitted BARE (200K default window). The Plan prompt
|
|
557
|
+
* additionally directs the planner to do the minimal synthesis itself and
|
|
558
|
+
* delegate discovery/execution heavily to `Explore` and `general-purpose`. */
|
|
559
|
+
function buildCheapestProfileAgentDefinitions(opts) {
|
|
560
|
+
const modelFor = (value, fallback) => nonEmptyModel(value) ?? fallback;
|
|
561
|
+
const planModel = modelFor(opts.cheapestPlanModel, CHEAPEST_PROFILE_NATIVE_MODELS.Plan);
|
|
562
|
+
const generalModel = modelFor(opts.cheapestGeneralPurposeModel, CHEAPEST_PROFILE_NATIVE_MODELS["general-purpose"]);
|
|
563
|
+
const implementerModel = modelFor(opts.cheapestImplementerModel, CHEAPEST_PROFILE_NATIVE_MODELS.implementer);
|
|
564
|
+
const reviewerModel = modelFor(opts.cheapestReviewerModel, CHEAPEST_PROFILE_NATIVE_MODELS.reviewer);
|
|
565
|
+
const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
|
|
566
|
+
const peersKey = peersKeyOf(opts.groupKeys);
|
|
567
|
+
const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
|
|
568
|
+
const peersMcpServers = opts.serverUrl && opts.groupKeys.peers ? { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
|
|
569
|
+
const oracleTool = opts.groupKeys.peers ? `mcp__${peersKey}__oracle` : void 0;
|
|
570
|
+
const readSearchTools = [
|
|
571
|
+
"Read",
|
|
572
|
+
"Grep",
|
|
573
|
+
"Glob",
|
|
574
|
+
"Bash",
|
|
575
|
+
"WebFetch",
|
|
576
|
+
"WebSearch",
|
|
577
|
+
`mcp__${searchKey}__*`
|
|
578
|
+
];
|
|
579
|
+
const planTools = [
|
|
580
|
+
...readSearchTools,
|
|
581
|
+
...oracleTool ? [oracleTool] : [],
|
|
582
|
+
"Agent"
|
|
583
|
+
];
|
|
584
|
+
const effort = (name) => CHEAPEST_PROFILE_NATIVE_EFFORTS[name];
|
|
585
|
+
const out = {
|
|
586
|
+
Explore: {
|
|
587
|
+
description: "Read-only codebase exploration specialist. Use proactively, and launch several in parallel via `Task(subagent_type:\"Explore\")`, to map architecture, trace call chains, or locate the files and symbols a task will touch. Use when the question spans more than a couple of files. Do not use for planning, edits, or single-file reads. Returns a structured evidence report with file:line citations. Never edits files.",
|
|
588
|
+
prompt: "You are a codebase exploration specialist. Your mission is to map repository structure, discover implementation patterns, trace call chains, and locate the exact files, symbols, and declarations that are relevant to the request. This is read-only work. Do not modify files, do not propose diffs, and do not delegate to other agents. You cannot ask clarifying questions mid-run: ground every answer in repository evidence. If the request is ambiguous, explore the most probable interpretations and record the ambiguity in your report. Start broad, then converge. Issue independent searches in parallel in one turn rather than one at a time, and pair semantic search with exact lexical and symbol search so that neither naming drift nor synonym mismatch hides a result. Include surrounding context lines in your search results so that callers, guards, and types are visible without a second round trip, and inspect the file whenever the surrounding logic determines the answer. Confirm every claim at the source before you report it. Stop when further searching stops changing your answer. When you can name the exact files and lines a change would touch, you are done. Report what the repository contains, not what it ought to contain. Do not design a solution or recommend an approach. Return a self-contained result the lead can act on immediately without needing to re-run your discovery.\n\nReturn format:\nAnswer: a direct response to what was asked, in a few sentences.\nInventory: each relevant file and symbol as file:line, with a one-line description of its role.\nEntry points: where control enters this area, as file:line.\nConventions in use: the patterns, idioms, error handling, and test style that any change here would be expected to follow, each with a file:line example.\nGaps and unknowns: what you could not confirm, and where you would look next.\n\n" + readOnlyToolSteer(),
|
|
589
|
+
tools: readSearchTools,
|
|
590
|
+
model: modelFor(opts.cheapestExploreModel, CHEAPEST_PROFILE_MODELS.explore),
|
|
591
|
+
effort: effort("Explore"),
|
|
592
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
593
|
+
},
|
|
594
|
+
Plan: {
|
|
595
|
+
description: "Architecture and implementation planning specialist. Use proactively in plan mode, and whenever sequencing, cross-boundary interfaces, invariants, migration risk, or acceptance criteria deserve a dedicated pass before any code is written. Delegates repository discovery to `Explore` and mixed execution to `general-purpose` rather than doing that work itself; does the minimal synthesis to produce the plan. Returns a decision-complete, ordered implementation plan with runnable acceptance criteria. Never edits files.",
|
|
596
|
+
prompt: "You are a software architect and planning specialist. Your mission is to turn a request into a decision-complete implementation plan: an ordered sequence of changes, the invariants that must hold throughout, and acceptance criteria a reviewer can actually run. This is read-only work. Do not modify repository files. Produce the architecture, sequencing, and acceptance criteria for the lead to synthesize and execute. Plan is an advisory planning capability, not an approval gate. Do the minimal planning work yourself and delegate heavily: launch one or more `Explore` subagents in parallel with scoped evidence questions for repository discovery, and lean on `general-purpose` for any mixed investigation/execution needed to settle a choice — then read directly only the files needed to resolve trade-offs and write executable steps. Do not sweep the repository yourself. Escalate only genuine product or architectural trade-offs, and escalate them as explicit options with consequences and a recommendation, never as an open question. For low-risk details, choose the reading most consistent with the codebase, proceed, and record it as an assumption. When a design trade-off has more than one viable answer and repository evidence cannot settle it, consult Oracle tool with one self-contained brief that states the constraints, the candidate designs, and the evidence you already gathered plus one precise question. If Oracle does not settle it, carry the options and the remaining gap into the plan rather than silently picking one. Delegation: you may invoke Explore and `reviewer` for discovery and verification; do not invoke any other subagent. Behavior and code verification belongs to post-implementation review. Write the plan for an implementer who cannot see your reasoning. Every step must be executable without rediscovering what you already found: name the files, name the interfaces, and state the condition that means the step is done. Prefer the smallest design that satisfies the requirement and fits the conventions already in the codebase. Mark steps that are independent of each other and can run concurrently.\n\nReturn format:\nObjective: what will be true when this is complete.\nArchitectural invariants: what must hold before, during, and after every step.\nInterface contracts: signatures, types, error and edge-case behaviour at each boundary the change crosses.\nExecution steps: ordered. Each names the files it touches, the change it makes, and its done condition. Mark steps that are independent of each other and can run concurrently.\nAcceptance criteria: the exact commands to run and the observable result that counts as passing.\nCritical files: the files an implementer must read before starting, as file:line, with why each matters.\nOpen questions: any unresolved trade-off, as options with a recommendation. Omit this section if there are none.\n\n" + readOnlyToolSteer(),
|
|
597
|
+
tools: planTools,
|
|
598
|
+
model: planModel,
|
|
599
|
+
effort: effort("Plan"),
|
|
600
|
+
mcpServers: {
|
|
601
|
+
...searchMcpServers ?? {},
|
|
602
|
+
...peersMcpServers ?? {}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"general-purpose": {
|
|
606
|
+
description: "Autonomous multi-step execution agent. Use proactively for open-ended or mixed tasks combining investigation, tool workflows, and code changes where the approach emerges during work. Drives to a verified end state with changed files and evidence. Do not use for pure discovery (use Explore), settled bounded edits (use implementer), or verification-only (use reviewer).",
|
|
607
|
+
prompt: "You are an autonomous execution specialist for mixed, multi-step work. Your mission is to take an open-ended task from investigation through implementation to a verified end state within this turn. Keep going until the task is genuinely done. Do not stop at a diagnosis, a partial fix, or a plan when the request asked for a change. Ground discovery in repository truth. For low-risk ambiguities, choose the interpretation most consistent with the repository, proceed, and record it as an assumption in your report. For material intent gaps that would alter product behavior or security, surface concrete options and a recommendation to the lead. Investigate before you act. Confirm your assumptions against the actual code rather than against the request's description of it. After every command, read the real output and let it decide the next step. When something fails, diagnose the specific cause before trying again. If repeated attempts fail for the same reason and no new information has emerged, stop retrying: re-examine the underlying assumption and take a different path. Escalate rather than expand. If the task turns out to require a change the lead did not sanction, complete the sanctioned part and report the rest as a recommendation. If the task collapses to pure discovery or a single settled edit, do that slice and report the remainder as a recommendation. Do not expand scope. Match the conventions, structure, and test style already present in the files you touch. The lead owns final integration. Verify before you report. Run the builds, linters, or test commands relevant to what you changed. Quote the command run, exit status, and concise decisive output verbatim; if output is long, summarize the middle and quote the pass/fail lines. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nOutcome: what is now true, and whether the task is complete.\nActions taken: what you did, in order.\nChanged files: each as file:line, with a one-line description of the change.\nVerification: the commands you ran, exit status, and decisive output.\nAssumptions: every interpretation you had to choose.\nRemaining items: anything deliberately not done, and why.\n\n" + fileToolSteer("builds, tests, and git"),
|
|
608
|
+
model: generalModel,
|
|
609
|
+
effort: effort("general-purpose"),
|
|
610
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
611
|
+
},
|
|
612
|
+
implementer: {
|
|
613
|
+
description: "Surgical implementation specialist for bounded changes with settled scope. Use proactively when what and where are decided, to make the change cleanly, match conventions, and verify it. Use Plan first if the approach is still open. Returns modified files with verbatim verification. Keeps the diff tight.",
|
|
614
|
+
prompt: "You are an implementation specialist. Your mission is to make bounded, surgical code changes that satisfy a settled requirement and look as though they were always part of the codebase. Before you edit, inspect the target files and relevant adjacent code, so that your change matches the existing idioms, error handling, logging, and test style. For a bug fix, reproduce the failure first and keep that reproduction as your success signal. While you edit, keep the change inside the requested scope and keep the diff tight and focused. Apply changes with the file editing tools; printing a patch in your response does not modify the file. Match the surrounding formatting, naming, and structure. Write a comment only where the reason for the code is non-obvious, and let well-named identifiers carry what the code does. If the requirement turns out to need work outside the agreed scope, implement the agreed change and report the additional work as a recommendation. For low-risk ambiguities, choose the interpretation most consistent with the surrounding code, proceed, and state the assumption in your report. For material intent gaps, surface concrete options and a recommendation to the lead. After you edit, run the builds, linters, or tests relevant to what you changed. Report the command, exit code, and decisive output verbatim. If a check fails, diagnose the cause before retrying; do not retry the same failing action without new information. Never claim something passes, compiles, or is covered unless you ran it and read the result. Report your changes and test output directly to the caller. Post-integration review is owned by the lead. Return a self-contained result the lead can act on immediately.\n\nReturn format:\nModified files: each as file:line, with a one-line description of the change.\nVerification: each command you ran, exit status, and decisive output.\nAssumptions and deferred work: interpretations you chose, and anything you deliberately left undone.\n\n" + fileToolSteer("builds, tests, and git"),
|
|
615
|
+
model: implementerModel,
|
|
616
|
+
effort: effort("implementer"),
|
|
617
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
618
|
+
},
|
|
619
|
+
reviewer: {
|
|
620
|
+
description: "Adversarial evidence-based reviewer. Use proactively post-integration after behavior-changing, cross-boundary, or risk-sensitive changes, and always after `implementer`, before done. Runs builds/tests itself rather than assuming them. Returns SHIP / FIX / BLOCK with reproducible evidence. Never edits source.",
|
|
621
|
+
prompt: "You are an adversarial code reviewer. Your job is not to confirm that the change works. Your job is to find the conditions under which it does not. Think carefully about the plausible failure modes of this change before you start running commands, so that what you run is chosen to expose them. Read before you judge. Inspect the changed files and relevant surrounding context, callers of affected call sites, and tests that claim to cover the change, sized to the identified risks of the change. Then verify by execution. Run the builds, linters, or test suites relevant to what changed, and any command that would surface the specific failure you suspect. Verification means output you observed. Never state that something passes, compiles, or is covered unless you ran it and read the result; where you could not run something, say so explicitly rather than inferring the outcome. Probe deliberately: boundary and empty inputs, error and early-return paths, concurrency and ordering, resource acquisition and cleanup on the failure path, partial failure and retry, backward compatibility of any changed interface, handling of untrusted input, and whether the new tests would actually fail if the change were reverted. Judge against the bar the repository already holds itself to, not an abstract ideal. Do not soften a real finding, and do not manufacture findings to appear thorough. If the change is correct and verified, say so. Do not modify source code and do not delegate to other agents. You may run build, test, and read-only inspection commands; do not run commands that alter tracked source files or touch remote infrastructure (transient build cache or test runner side effects are expected). Return a self-contained result the lead can act on immediately.\n\nReturn format. Line one must be exactly one of:\nVERDICT: SHIP\nVERDICT: FIX\nVERDICT: BLOCK\n\nSHIP means you found no blocking defect and your verification ran clean. FIX means the approach is sound but specific defects must be corrected. BLOCK means the approach itself is wrong, or verification could not be run at all.\n\nThen, using the repository's severity taxonomy:\nCritical: blocking defects (correctness, security, data loss). Each with file:line, the concrete scenario in which it fails, and how you confirmed it.\nImportant: non-blocking issues that should be fixed before shipping. Each with file:line and impact.\nSuggestion: non-blocking improvements or stylistic suggestions.\nEvidence: the commands you ran, exit status, and decisive output.\nUnverified surface: what you could not exercise, and why.\n\n" + reviewerToolSteer(),
|
|
622
|
+
model: reviewerModel,
|
|
623
|
+
effort: effort("reviewer"),
|
|
624
|
+
tools: readSearchTools,
|
|
625
|
+
...searchMcpServers ? { mcpServers: searchMcpServers } : {}
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
if (opts.browseAvailable && opts.groupKeys.workers) {
|
|
629
|
+
const workersKey = workersKeyOf(opts.groupKeys);
|
|
630
|
+
out["worker-browse"] = {
|
|
631
|
+
description: dispatcherDescription("browse"),
|
|
632
|
+
prompt: dispatcherPrompt("browse", workersKey),
|
|
633
|
+
model: modelFor(opts.cheapestExploreModel, CHEAPEST_PROFILE_MODELS.explore),
|
|
634
|
+
effort: "high",
|
|
635
|
+
tools: dispatcherTools("browse", workersKey),
|
|
636
|
+
...opts.serverUrl ? { mcpServers: { [workersKey]: httpEntryFor(opts.serverUrl, "workers", opts.nonce, opts.workspaceHeaderCmd) } } : {}
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
const roster = opts.nativeRoster == null ? new Set(CHEAPEST_PROFILE_NATIVE_AGENT_NAMES) : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
|
|
640
|
+
for (const name of Object.keys(out)) if (name !== "worker-browse" && !roster.has(name)) delete out[name];
|
|
641
|
+
return out;
|
|
642
|
+
}
|
|
554
643
|
/**
|
|
555
644
|
* Build the JSON payload for `claude --agents <path>`.
|
|
556
645
|
*
|
|
@@ -564,6 +653,7 @@ function buildPeerAgentDefinitions(opts) {
|
|
|
564
653
|
if (opts.maxProfile) return buildMaxProfileAgentDefinitions(opts);
|
|
565
654
|
if (opts.fastProfile) return buildFastProfileAgentDefinitions(opts);
|
|
566
655
|
if (opts.cheapProfile) return buildCheapProfileAgentDefinitions(opts);
|
|
656
|
+
if (opts.cheapestProfile) return buildCheapestProfileAgentDefinitions(opts);
|
|
567
657
|
const out = {};
|
|
568
658
|
const personas = personasFor({
|
|
569
659
|
codexCli: opts.codexCli,
|
|
@@ -1013,6 +1103,11 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
1013
1103
|
cheapGeneralPurposeModel: opts.cheapGeneralPurposeModel,
|
|
1014
1104
|
cheapImplementerModel: opts.cheapImplementerModel,
|
|
1015
1105
|
cheapReviewerModel: opts.cheapReviewerModel,
|
|
1106
|
+
cheapestExploreModel: opts.cheapestExploreModel,
|
|
1107
|
+
cheapestPlanModel: opts.cheapestPlanModel,
|
|
1108
|
+
cheapestGeneralPurposeModel: opts.cheapestGeneralPurposeModel,
|
|
1109
|
+
cheapestImplementerModel: opts.cheapestImplementerModel,
|
|
1110
|
+
cheapestReviewerModel: opts.cheapestReviewerModel,
|
|
1016
1111
|
nativeRoster: opts.nativeRoster,
|
|
1017
1112
|
personaAllowlist: opts.personaAllowlist,
|
|
1018
1113
|
includeCoordinator: opts.includeCoordinator,
|
|
@@ -1021,6 +1116,7 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
|
|
|
1021
1116
|
reviewerFastEffort: opts.reviewerFastEffort,
|
|
1022
1117
|
fastProfile: opts.fastProfile,
|
|
1023
1118
|
cheapProfile: opts.cheapProfile,
|
|
1119
|
+
cheapestProfile: opts.cheapestProfile,
|
|
1024
1120
|
implementerEffort: opts.implementerEffort,
|
|
1025
1121
|
reviewerEffort: opts.reviewerEffort,
|
|
1026
1122
|
maxProfile: opts.maxProfile,
|
|
@@ -2222,7 +2318,7 @@ function joinClauses(parts) {
|
|
|
2222
2318
|
* there is no quality-for-cost trade being hidden by leading with the cheap
|
|
2223
2319
|
* tier; reserve `reviewer` for the higher-stakes assessment it is there for. */
|
|
2224
2320
|
function buildNativeReachClauses(opts) {
|
|
2225
|
-
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m") return joinClauses([
|
|
2321
|
+
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") return joinClauses([
|
|
2226
2322
|
"`Explore` for broad repository discovery, dependency mapping, and convention tracking",
|
|
2227
2323
|
"`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria",
|
|
2228
2324
|
"`general-purpose` for mixed, iterative, or multi-step execution tasks",
|
|
@@ -2262,11 +2358,12 @@ function buildOperatingDefaultsDirective(opts = {}) {
|
|
|
2262
2358
|
const artifactClause = opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "";
|
|
2263
2359
|
return "## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)\n\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Handle narrow, obvious, surgical, and single-command work directly; delegate a bounded workstream when it is broad, slow, context-heavy, or benefits from a genuinely independent perspective. " + MAX_PARALLELISM_RULE + " Brief each role with the desired outcome, relevant context, constraints, expected evidence, and verification. Use the roster as complementary capabilities, never as a required Explore → Plan → implement → review sequence. Avoid overlapping assignments and do not ask several models the same generic question. Synthesize results against the repository and executable checks: model agreement is not verification. Use one fresh-context peer only when a consequential judgment remains after direct checks; use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding counsel for one focused consequential uncertainty that evidence and the appropriate roles cannot settle; it has no approval or workflow authority, and a further consultation requires materially new or conflicting evidence." + artifactClause;
|
|
2264
2360
|
}
|
|
2265
|
-
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m") {
|
|
2361
|
+
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
|
|
2266
2362
|
const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
|
|
2267
|
-
const
|
|
2268
|
-
const
|
|
2269
|
-
const
|
|
2363
|
+
const isCheapest = opts.profile === "cheapest";
|
|
2364
|
+
const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : "Fast";
|
|
2365
|
+
const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
|
|
2366
|
+
const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
|
|
2270
2367
|
if (opts.fastRuntimeAvailable === false) return `## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)
|
|
2271
2368
|
|
|
2272
2369
|
${profileLabel} profile runtime wiring is unavailable. Work directly, use only tools actually listed in this session, verify with the repository's relevant build/tests before declaring done, report uncertainty, and do not invent unavailable capabilities.`;
|
|
@@ -2277,7 +2374,7 @@ ${profileLabel} profile runtime wiring is unavailable. Work directly, use only t
|
|
|
2277
2374
|
const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${browserKey}__*\` provides direct browser control.` : "";
|
|
2278
2375
|
const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated autonomous browsing tasks through \`mcp__${workersKey}__browse\`.` : "";
|
|
2279
2376
|
const artifactClause = opts.artifactAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
|
|
2280
|
-
const astraClause = opts.astraAvailable && opts.profile
|
|
2377
|
+
const astraClause = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? ` \`mcp__${peersKey}__astra\` (GPT-6 Astra ${astraDescriptor}) is the terminal escalation consultant for the lead only, reserved strictly for the hardest dead ends when direct evidence, Advisor, and Oracle have all failed to produce a defensible path (consulted at most 1-2 times per decision with concise context and specific questions).` : "";
|
|
2281
2378
|
return `## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)
|
|
2282
2379
|
|
|
2283
2380
|
${profileLabel} launch profile. The lead coordinates execution across specialized native roles: ` + buildNativeReachClauses(opts) + `. In plan mode or when designing changes with complex sequencing, interface contracts, or acceptance criteria, delegate architectural planning to \`Plan\` (in plan mode, produce the plan and acceptance criteria; do not edit files). Discovery rule: delegate to \`Explore\` instead of exploring yourself. For any question spanning more than a couple of files, launch one or more \`Explore\` subagents in parallel with scoped evidence questions and let them return file:line citations; read directly only the small subset you must touch to decide or edit. \`Plan\` follows the same rule when it needs repository facts. Implementation rule: delegate bounded implementation to \`implementer\` whenever a fresh context helps or lead-context pressure matters; brief with outcome, constraints, files in scope, and verification. Review rule: after behavior-changing, cross-boundary, or risk-sensitive implementation, and always after \`implementer\` completes, run relevant build/tests then invoke \`reviewer\` before declaring done. Handle trivial, surgical, single-file, or single-command tasks directly; you do not need to justify skipping delegation. \`Explore\` is cheap and may be launched in parallel across independent discovery questions. Send independent subagent calls in parallel within a single turn. Delegation graph: the lead may invoke all five; \`Plan\` may invoke \`Explore\` and \`reviewer\`; \`implementer\` and \`general-purpose\` may invoke \`reviewer\`; \`Explore\`, \`reviewer\`, and \`worker-browse\` cannot invoke native subagents.
|
|
@@ -2294,14 +2391,16 @@ const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
|
|
|
2294
2391
|
const STANDARD_OPERATING_DEFAULTS_DIGEST = "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nDelegate when the work is WIDE (many files or sources to sweep) or SLOW and you need only the conclusion, to protect the main thread's finite context and keep it free for reasoning and interacting with the user; prefer parallel delegation for independent work. Do NOT delegate merely because a sub-question is separable: a narrow, deep question whose value is file:line fidelity loses exactly that through a summarization layer, and one answerable in a single command is cheaper done directly. Do trivial, surgical, and last-mile work yourself. Stop a named teammate once you are done with it: it persists for follow-ups, its idle notice means available rather than finished, and nothing reaps it for you.\n\nVerify, do not assert. Run the code, read the file, check the exit code. A claim in prose is worth nothing against state you did not check, and a check that cannot fail proves nothing. Reproduce a bug end to end, the way a real user hits it, before fixing it. Fix a lint error, failing test, or flake the moment you see it, whoever introduced it, without letting it derail the task at hand. Prefer quality and long-term maintainability over development cost.\n\nVerification has a blind spot: a consequential recommendation, a design or trade-off call, or a hard-to-reverse decision that still turns on judgment among plausible alternatives once the direct evidence is in. That is where confabulation hides, so put it past a peer critic before you ship it and budget the wait even under delivery pressure. When a test, a run, a reproduction, or a search would settle the claim, settle it that way instead; a critic asked to re-derive what you can already prove is ritual, not review.\n\nThe agent roster, the tool surface, and the reasoning behind these defaults are in your CLAUDE.md project instructions. Read them when choosing HOW to work; the rules above apply without a lookup.";
|
|
2295
2392
|
function buildOperatingDefaultsDigest(opts = {}) {
|
|
2296
2393
|
if (opts.profile === "max") return "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nMax launch profile. The lead owns the outcome. Start with direct repository or runtime evidence. Do narrow, obvious, surgical, and single-command work directly; delegate bounded work that is broad, slow, context-heavy, or independently valuable. " + MAX_PARALLELISM_RULE + " Give delegated workstreams non-overlapping scopes and state the outcome, constraints, evidence, and verification expected.\n\nSynthesize and verify: run the code, inspect outputs, and check tests. Agent count and agreement are not evidence. Use a fresh-context peer only for consequential judgment that remains after direct checks, and use the coordinator only when several distinct lenses could change the decision. Advisor is optional, non-binding, primary-lead-only counsel for one focused consequential uncertainty; it is not an approval or completion gate.";
|
|
2297
|
-
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m") {
|
|
2394
|
+
if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
|
|
2298
2395
|
const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
|
|
2299
|
-
const
|
|
2300
|
-
const
|
|
2301
|
-
const
|
|
2396
|
+
const isCheapest = opts.profile === "cheapest";
|
|
2397
|
+
const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : "Fast";
|
|
2398
|
+
const oracleDescriptor = isCheapest ? "(GPT-5.6 Sol 200K/high, lead and Plan)" : isCheap ? "(Grok 4.6 200K/medium, lead and Plan)" : "(Opus 5 1M/high, lead and Plan)";
|
|
2399
|
+
const advisorDescriptor = isCheapest ? "(Gemini/high, lead-only)" : "(Sol/high, lead-only)";
|
|
2400
|
+
const astraStep = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? `; (4) \`astra\` (GPT-6 Astra 200K/${isCheap ? "medium" : "high"}, lead-only) only as a last resort when direct evidence, Advisor, and Oracle cannot produce a defensible path (at most 1-2 calls per decision).` : ".";
|
|
2302
2401
|
return `## Operating defaults (the user's explicit direction and the domain's standards always override)
|
|
2303
2402
|
|
|
2304
|
-
${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate); delegate bounded implementation to \`implementer\` in a fresh context to preserve lead context (\`general-purpose\` for mixed multi-step execution); delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation, and always after \`implementer\` completes, to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\nVerify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) \`advisor\`
|
|
2403
|
+
${profileLabel} launch profile. The lead coordinates execution across specialized roles: delegate broad discovery to \`Explore\` in parallel and do not sweep the repo yourself (read directly only files you will act on); delegate to \`Plan\` in plan mode or when structuring complex multi-step sequencing (\`Plan\` is an advisory planning capability, not an approval gate); delegate bounded implementation to \`implementer\` in a fresh context to preserve lead context (\`general-purpose\` for mixed multi-step execution); delegate to \`reviewer\` after behavior-changing or risk-sensitive implementation, and always after \`implementer\` completes, to verify correctness before declaring done; handle trivial and surgical edits directly. Send independent subagent calls in parallel within a single turn. Stop named teammates when finished.\n\nVerify claims against real evidence: run relevant commands and tests. Follow a disciplined consultation ladder for unresolved decisions: (1) direct code inspection, search, builds, and tests settle factual questions; (2) \`advisor\` ` + advisorDescriptor + " for transcript-aware framing checks or trajectory guidance; (3) `oracle` " + oracleDescriptor + " for self-contained technical/architectural trade-offs" + astraStep;
|
|
2305
2404
|
}
|
|
2306
2405
|
return STANDARD_OPERATING_DEFAULTS_DIGEST;
|
|
2307
2406
|
}
|
|
@@ -2782,7 +2881,7 @@ const INJECTED_SKILLS = [
|
|
|
2782
2881
|
FIRST_MATE_CONDUCT_SKILL
|
|
2783
2882
|
];
|
|
2784
2883
|
function injectedSkillsForLaunch(selection) {
|
|
2785
|
-
if (selection.profileId === "fast" || selection.profileId === "cheap" || selection.profileId === "cheap1m") return [];
|
|
2884
|
+
if (selection.profileId === "fast" || selection.profileId === "cheap" || selection.profileId === "cheap1m" || selection.profileId === "cheapest") return [];
|
|
2786
2885
|
if (selection.profileId === "max") return selection.firstMateEnabled ? INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate")) : [];
|
|
2787
2886
|
if (!selection.workerSkillsActive) return [];
|
|
2788
2887
|
return INJECTED_SKILLS.filter((skill) => selection.firstMateEnabled || !skill.name.startsWith("gh-first-mate"));
|
|
@@ -2854,4 +2953,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
|
|
|
2854
2953
|
//#endregion
|
|
2855
2954
|
export { writePeerMcpRuntimeFiles as C, workersKeyOf as S, sanitizeServeSettingsEnv as _, appendPeerAwarenessToMirroredClaudeMd as a, resolveCodexCliBackend as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, buildArtifactReviewSkill as f, planModeAllowRules as g, injectAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, configureServeDefaultPermissionMode as m, INJECTED_SKILLS as n, appendToolbeltAwarenessToMirroredClaudeMd as o, SEAMLESS_BUILTIN_TOOLS as p, injectedSkillsForLaunch as r, buildOperatingDefaultsDigest as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, BUILTIN_SUBAGENT_DEFINITIONS as v, resolveGroupKeysFromMirror as x, injectPeerMcpIntoMirror as y };
|
|
2856
2955
|
|
|
2857
|
-
//# sourceMappingURL=attribution-settings-
|
|
2956
|
+
//# sourceMappingURL=attribution-settings-jcsSeVur.js.map
|