github-router 0.3.306 → 0.3.308

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 (102) hide show
  1. package/dist/{attribution-settings-C5ScaOmz.js → attribution-settings-C_ZLSCQ4.js} +60 -61
  2. package/dist/attribution-settings-C_ZLSCQ4.js.map +1 -0
  3. package/dist/{auth-D9kUMR37.js → auth-O_UG1ABO.js} +3 -3
  4. package/dist/{auth-D9kUMR37.js.map → auth-O_UG1ABO.js.map} +1 -1
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{check-usage-C7MfBexN.js → check-usage-dicJOWML.js} +4 -4
  7. package/dist/{check-usage-C7MfBexN.js.map → check-usage-dicJOWML.js.map} +1 -1
  8. package/dist/{claude-CsGXL12X.js → claude-CyiXTFxe.js} +33 -30
  9. package/dist/claude-CyiXTFxe.js.map +1 -0
  10. package/dist/{codex-DpwyLLTp.js → codex-BV4Tvt0q.js} +5 -5
  11. package/dist/{codex-DpwyLLTp.js.map → codex-BV4Tvt0q.js.map} +1 -1
  12. package/dist/{debug-CDu4RIgW.js → debug-2PgImRnr.js} +2 -2
  13. package/dist/{debug-CDu4RIgW.js.map → debug-2PgImRnr.js.map} +1 -1
  14. package/dist/engine-Cv4SNuzn.js +2 -0
  15. package/dist/{fast-profile-contract-OuZQaGif.js → fast-profile-contract-BWCJy6iL.js} +6 -4
  16. package/dist/fast-profile-contract-BWCJy6iL.js.map +1 -0
  17. package/dist/{gate-discovery-BVLZH7-6.js → gate-discovery-CLV0ft3G.js} +5 -5
  18. package/dist/{gate-discovery-BVLZH7-6.js.map → gate-discovery-CLV0ft3G.js.map} +1 -1
  19. package/dist/{get-copilot-usage-CNMvWsMD.js → get-copilot-usage-Cjy8TiFf.js} +2 -2
  20. package/dist/{get-copilot-usage-CNMvWsMD.js.map → get-copilot-usage-Cjy8TiFf.js.map} +1 -1
  21. package/dist/hooks.mjs +28 -12
  22. package/dist/hooks.sha256 +1 -1
  23. package/dist/{internal-artifact-open-wYwuChib.js → internal-artifact-open-CxeIfsW_.js} +2 -2
  24. package/dist/{internal-artifact-open-wYwuChib.js.map → internal-artifact-open-CxeIfsW_.js.map} +1 -1
  25. package/dist/{internal-fast-dispatch-guard-CXs4ympz.js → internal-fast-dispatch-guard-CrsZI0pO.js} +1 -1
  26. package/dist/{internal-fast-dispatch-guard-u3vxgazZ.js → internal-fast-dispatch-guard-kzSKB0yV.js} +3 -3
  27. package/dist/{internal-fast-dispatch-guard-u3vxgazZ.js.map → internal-fast-dispatch-guard-kzSKB0yV.js.map} +1 -1
  28. package/dist/{internal-first-mate-guard-C8GG8i5H.js → internal-first-mate-guard-BuweUgjb.js} +3 -3
  29. package/dist/{internal-first-mate-guard-C8GG8i5H.js.map → internal-first-mate-guard-BuweUgjb.js.map} +1 -1
  30. package/dist/{internal-first-mate-guard-BGaGGIBS.js → internal-first-mate-guard-Nf1H0mCK.js} +1 -1
  31. package/dist/{internal-max-dispatch-guard-B-n687ho.js → internal-max-dispatch-guard-DF-f8VwE.js} +1 -1
  32. package/dist/{internal-max-dispatch-guard-Cw_9Qx-9.js → internal-max-dispatch-guard-lS4usOV5.js} +12 -5
  33. package/dist/internal-max-dispatch-guard-lS4usOV5.js.map +1 -0
  34. package/dist/{internal-plan-review-DCbxSIUR.js → internal-plan-review-DLduDz41.js} +3 -3
  35. package/dist/{internal-plan-review-DCbxSIUR.js.map → internal-plan-review-DLduDz41.js.map} +1 -1
  36. package/dist/{internal-prompt-submit-DIn8b_Zt.js → internal-prompt-submit-DG94f8E-.js} +4 -4
  37. package/dist/{internal-prompt-submit-DIn8b_Zt.js.map → internal-prompt-submit-DG94f8E-.js.map} +1 -1
  38. package/dist/{internal-session-bind-DXosxciQ.js → internal-session-bind-D6Hpl-84.js} +2 -2
  39. package/dist/{internal-session-bind-DXosxciQ.js.map → internal-session-bind-D6Hpl-84.js.map} +1 -1
  40. package/dist/{internal-stop-hook-C2lMgQuU.js → internal-stop-hook-B8Z1k6xC.js} +5 -5
  41. package/dist/{internal-stop-hook-C2lMgQuU.js.map → internal-stop-hook-B8Z1k6xC.js.map} +1 -1
  42. package/dist/{internal-stop-review-CnYqJTiC.js → internal-stop-review-DlKzZgFm.js} +2 -2
  43. package/dist/{internal-stop-review-CnYqJTiC.js.map → internal-stop-review-DlKzZgFm.js.map} +1 -1
  44. package/dist/{internal-worker-guard-DdwLtAMn.js → internal-worker-guard-D7sfByyo.js} +2 -2
  45. package/dist/{internal-worker-guard-DdwLtAMn.js.map → internal-worker-guard-D7sfByyo.js.map} +1 -1
  46. package/dist/{internal-workspace-header-B4qymRDb.js → internal-workspace-header-CU5OjLCB.js} +2 -2
  47. package/dist/{internal-workspace-header-B4qymRDb.js.map → internal-workspace-header-CU5OjLCB.js.map} +1 -1
  48. package/dist/lifecycle-B0USSJvd.js +2 -0
  49. package/dist/{lifecycle-DOvQozrm.js → lifecycle-BCnarXJV.js} +2 -2
  50. package/dist/{lifecycle-DOvQozrm.js.map → lifecycle-BCnarXJV.js.map} +1 -1
  51. package/dist/lifecycle-CQFjaQc0.js +2 -0
  52. package/dist/{lifecycle-CSHU91pP.js → lifecycle-CtRA3Y7p.js} +2 -2
  53. package/dist/{lifecycle-CSHU91pP.js.map → lifecycle-CtRA3Y7p.js.map} +1 -1
  54. package/dist/main.js +19 -19
  55. package/dist/max-profile-contract-v2Q6eN5w.js +355 -0
  56. package/dist/max-profile-contract-v2Q6eN5w.js.map +1 -0
  57. package/dist/{mcp-workspace-header-Cv4QWFVV.js → mcp-workspace-header-B60WSR1Y.js} +2 -2
  58. package/dist/{mcp-workspace-header-Cv4QWFVV.js.map → mcp-workspace-header-B60WSR1Y.js.map} +1 -1
  59. package/dist/{models-BDhlItXr.js → models-COuMOfM6.js} +3 -3
  60. package/dist/{models-BDhlItXr.js.map → models-COuMOfM6.js.map} +1 -1
  61. package/dist/{orchestration-C2Q_Qynl.js → orchestration-DjLA-lxB.js} +2 -2
  62. package/dist/{orchestration-C2Q_Qynl.js.map → orchestration-DjLA-lxB.js.map} +1 -1
  63. package/dist/{paths-D6SI5bmY.js → paths-De1Qh9Q9.js} +4 -4
  64. package/dist/{paths-D6SI5bmY.js.map → paths-De1Qh9Q9.js.map} +1 -1
  65. package/dist/paths-DyX6SEnd.js +2 -0
  66. package/dist/{peer-mcp-personas-DXOdPbev.js → peer-mcp-personas-DAd076hn.js} +112 -352
  67. package/dist/peer-mcp-personas-DAd076hn.js.map +1 -0
  68. package/dist/{plan-review-hook-CnRRttwl.js → plan-review-hook-vL6BYmA8.js} +3 -3
  69. package/dist/{plan-review-hook-CnRRttwl.js.map → plan-review-hook-vL6BYmA8.js.map} +1 -1
  70. package/dist/{prompt-submit-hook-G84QAm_F.js → prompt-submit-hook-DfqufWC1.js} +3 -3
  71. package/dist/{prompt-submit-hook-G84QAm_F.js.map → prompt-submit-hook-DfqufWC1.js.map} +1 -1
  72. package/dist/{provision-CfB_DkuL.js → provision-Xcr-fJii.js} +4 -4
  73. package/dist/{provision-CfB_DkuL.js.map → provision-Xcr-fJii.js.map} +1 -1
  74. package/dist/{self-invocation-Da5gSWen.js → self-invocation-B84JCHps.js} +2 -2
  75. package/dist/{self-invocation-Da5gSWen.js.map → self-invocation-B84JCHps.js.map} +1 -1
  76. package/dist/{serve-Bfw7xEkR.js → serve-8tqMuzVi.js} +12 -12
  77. package/dist/{serve-Bfw7xEkR.js.map → serve-8tqMuzVi.js.map} +1 -1
  78. package/dist/{server-setup-Cbuq2-Bi.js → server-setup-C7jSESEI.js} +301 -11
  79. package/dist/server-setup-C7jSESEI.js.map +1 -0
  80. package/dist/{start-CLSlFGUF.js → start-CaTinp_s.js} +3 -3
  81. package/dist/{start-CLSlFGUF.js.map → start-CaTinp_s.js.map} +1 -1
  82. package/dist/{stop-gate-hook-rjDyq1lk.js → stop-gate-hook-BEU8qQrC.js} +3 -3
  83. package/dist/{stop-gate-hook-rjDyq1lk.js.map → stop-gate-hook-BEU8qQrC.js.map} +1 -1
  84. package/dist/{stop-gate-policy-m3dvbV10.js → stop-gate-policy-qzqXfRxE.js} +2 -2
  85. package/dist/{stop-gate-policy-m3dvbV10.js.map → stop-gate-policy-qzqXfRxE.js.map} +1 -1
  86. package/dist/{token-DnTZlcc6.js → token-CCg-Ov5q.js} +2 -2
  87. package/dist/{token-DnTZlcc6.js.map → token-CCg-Ov5q.js.map} +1 -1
  88. package/dist/{worker-dispatch-CQ2y0aBP.js → worker-dispatch-CH-NN5FW.js} +2 -2
  89. package/dist/{worker-dispatch-CQ2y0aBP.js.map → worker-dispatch-CH-NN5FW.js.map} +1 -1
  90. package/package.json +1 -1
  91. package/dist/attribution-settings-C5ScaOmz.js.map +0 -1
  92. package/dist/claude-CsGXL12X.js.map +0 -1
  93. package/dist/engine-j34DK_PM.js +0 -2
  94. package/dist/fast-profile-contract-OuZQaGif.js.map +0 -1
  95. package/dist/internal-max-dispatch-guard-Cw_9Qx-9.js.map +0 -1
  96. package/dist/lifecycle-B4DDf-Me.js +0 -2
  97. package/dist/lifecycle-D0BpTV9A.js +0 -2
  98. package/dist/max-profile-contract-CiD5wyET.js +0 -276
  99. package/dist/max-profile-contract-CiD5wyET.js.map +0 -1
  100. package/dist/paths-Bmj5b7PS.js +0 -2
  101. package/dist/peer-mcp-personas-DXOdPbev.js.map +0 -1
  102. package/dist/server-setup-Cbuq2-Bi.js.map +0 -1
@@ -1,11 +1,12 @@
1
- import { Cn as withOneMSuffix, On as LUNA_SCOUT_ALIAS_ID, Sn as oneMContextDisabled, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, nn as DEFINITION_OF_GREATNESS, t as GROUP_META, tn as CONDENSED_OPERATING_SEQUENCE, u as personasFor } from "./peer-mcp-personas-DXOdPbev.js";
2
- import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-D6SI5bmY.js";
3
- import { a as FAST_PROFILE_MODELS, c as FAST_PROFILE_NATIVE_MODELS, o as FAST_PROFILE_NATIVE_AGENT_NAMES, s as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-OuZQaGif.js";
4
- import { a as MAX_PROFILE_NATIVE_AGENT_NAMES, i as MAX_PROFILE_MODELS, o as MAX_PROFILE_NATIVE_EFFORTS, s as MAX_PROFILE_NATIVE_MODELS } from "./max-profile-contract-CiD5wyET.js";
5
- import "./self-invocation-Da5gSWen.js";
6
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-CfB_DkuL.js";
7
- import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-Cv4QWFVV.js";
8
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-CQ2y0aBP.js";
1
+ import { Cn as withOneMSuffix, Sn as oneMContextDisabled, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, nn as DEFINITION_OF_GREATNESS, t as GROUP_META, tn as CONDENSED_OPERATING_SEQUENCE, u as personasFor } from "./peer-mcp-personas-DAd076hn.js";
2
+ import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-De1Qh9Q9.js";
3
+ import { f as LUNA_SCOUT_ALIAS_ID } from "./server-setup-C7jSESEI.js";
4
+ import { a as FAST_PROFILE_MODELS, c as FAST_PROFILE_NATIVE_MODELS, o as FAST_PROFILE_NATIVE_AGENT_NAMES, s as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-BWCJy6iL.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-v2Q6eN5w.js";
6
+ import "./self-invocation-B84JCHps.js";
7
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-Xcr-fJii.js";
8
+ import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-B60WSR1Y.js";
9
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-CH-NN5FW.js";
9
10
  import consola from "consola";
10
11
  import path from "node:path";
11
12
  import { randomBytes } from "node:crypto";
@@ -225,6 +226,9 @@ function fileToolSteer(bashUses) {
225
226
  function readOnlyToolSteer() {
226
227
  return "Use Read to read files and Grep/Glob plus the semantic code search tool to find them; Bash is for read-only inspection such as git log, git blame, and git show. Do not modify any file, and do not run mutating commands.";
227
228
  }
229
+ function reviewerToolSteer() {
230
+ return "Use Read to read files and Grep/Glob plus the semantic code search tool to find them. Use Bash for builds, tests, reproductions, and read-only git inspection; do not modify source-controlled files or use the shell to edit them.";
231
+ }
228
232
  /**
229
233
  * `tools:` allowlist for read-only natives (`scout`, fast `Explore`, `brainstorm`), modelled
230
234
  * on Claude Code's own `Explore`/`Plan` built-ins, which run with every tool
@@ -282,16 +286,14 @@ function buildMaxProfileAgentDefinitions(opts) {
282
286
  const generalModel = modelFor(opts.maxGeneralPurposeModel, MAX_PROFILE_NATIVE_MODELS["general-purpose"]);
283
287
  const implementerModel = modelFor(opts.maxImplementerModel, MAX_PROFILE_NATIVE_MODELS.implementer);
284
288
  const reviewerModel = modelFor(opts.maxReviewerModel, MAX_PROFILE_NATIVE_MODELS.reviewer);
285
- const brainstormModel = modelFor(opts.maxBrainstormModel, modelFor(opts.maxGrokModel, modelFor(opts.maxGeminiModel, MAX_PROFILE_NATIVE_MODELS.brainstorm)));
289
+ const brainstormModel = modelFor(opts.maxBrainstormModel, MAX_PROFILE_NATIVE_MODELS.brainstorm);
286
290
  const peersKey = peersKeyOf(opts.groupKeys);
287
291
  const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
288
292
  const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
289
293
  const peersMcpServers = opts.serverUrl ? { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
290
294
  const oneM = (model) => model === MAX_PROFILE_MODELS.grok ? model : decorateGuaranteedOneM(model);
291
295
  const effort = (name) => MAX_PROFILE_NATIVE_EFFORTS[name];
292
- const base = (name, model, roleEffort) => ({
293
- description: `Max-profile ${name} subagent running ${model}. This model is the deliberate default for the role; use it first and override only after a concrete failure or task-model mismatch. Max dispatch strips Claude Code's required built-in model placeholder so the roster model remains authoritative; clients that can send catalog ids may override only to Luna, Gemini 3.8 Flash, or Grok 4.6.`,
294
- prompt: `You are the max-profile ${name} subagent. Work from the supplied brief, verify against the actual repository, and return concrete evidence with file:line references. You do not have Advisor. Do not spawn further agents.`,
296
+ const base = (model, roleEffort) => ({
295
297
  model: oneM(model),
296
298
  effort: roleEffort
297
299
  });
@@ -304,57 +306,54 @@ function buildMaxProfileAgentDefinitions(opts) {
304
306
  "WebSearch",
305
307
  `mcp__${searchKey}__*`
306
308
  ];
307
- const peerList = (opts.maxPersonaNames ?? maxPersonasFor({
308
- solModel: opts.maxPeerModels?.sol,
309
- lunaModel: opts.maxPeerModels?.luna,
310
- opusModel: opts.maxPeerModels?.opus,
311
- geminiModel: opts.maxPeerModels?.gemini ?? opts.maxGeminiModel,
312
- grokModel: opts.maxPeerModels?.grok ?? opts.maxGrokModel
313
- }).map((persona) => persona.toolNameHttp)).map((name) => `\`${name}\``).join(", ");
309
+ const maxRole = (role, model, roleEffort) => ({
310
+ description: maxNativeDescription(role, oneM(model), roleEffort),
311
+ prompt: maxNativePrompt(role)
312
+ });
314
313
  const out = {
315
314
  Explore: {
316
- ...base("Explore", exploreModel, opts.maxExploreEffort ?? effort("Explore")),
317
- description: `Max-profile read-only exploration subagent running ${exploreModel}. Best suited to broad, multi-file discovery that should return conclusions and file:line evidence without filling the lead's context.`,
318
- prompt: "Role: read-only repository exploration. Answer the supplied question with a concise evidence packet: conclusions, load-bearing file:line citations, relevant commands or sources checked, and explicit gaps. The caller retains planning and implementation. " + readOnlyToolSteer(),
315
+ ...base(exploreModel, opts.maxExploreEffort ?? effort("Explore")),
316
+ ...maxRole("Explore", exploreModel, opts.maxExploreEffort ?? effort("Explore")),
317
+ prompt: `${maxNativePrompt("Explore")} ${readOnlyToolSteer()}`,
319
318
  tools: researchTools,
320
319
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
321
320
  },
322
321
  Plan: {
323
- ...base("Plan", planModel, opts.maxPlanEffort ?? effort("Plan")),
324
- description: `Max-profile plan consultant running ${planModel} at high effort. Best suited to non-trivial changes where sequencing, interfaces, migration risk, or explicit acceptance criteria benefit from a separate planning view.`,
325
- prompt: "Role: implementation planning. Given the goal, constraints, and available evidence, return a coherent plan with affected files or symbols, important invariants and risks, acceptance criteria, and useful verification. Surface assumptions or missing decisions; the lead owns plan acceptance and execution. " + readOnlyToolSteer(),
322
+ ...base(planModel, opts.maxPlanEffort ?? effort("Plan")),
323
+ ...maxRole("Plan", planModel, opts.maxPlanEffort ?? effort("Plan")),
324
+ prompt: `${maxNativePrompt("Plan")} ${readOnlyToolSteer()}`,
326
325
  tools: researchTools,
327
326
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
328
327
  },
329
328
  "general-purpose": {
330
- ...base("general-purpose", generalModel, opts.maxGeneralPurposeEffort ?? effort("general-purpose")),
331
- description: `Max-profile general-purpose execution subagent running ${generalModel}. Best suited to mixed or unusual work that does not fit the narrower discovery, planning, implementation, review, or ideation roles.`,
332
- prompt: "Role: catch-all execution for the supplied bounded task. Deliver the requested outcome within its stated scope and return the files or artifacts changed, verification evidence, and unresolved risks. The lead owns integration and final decisions. " + fileToolSteer("builds, tests, and git"),
329
+ ...base(generalModel, opts.maxGeneralPurposeEffort ?? effort("general-purpose")),
330
+ ...maxRole("general-purpose", generalModel, opts.maxGeneralPurposeEffort ?? effort("general-purpose")),
331
+ prompt: `${maxNativePrompt("general-purpose")} ${fileToolSteer("builds")}`,
333
332
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
334
333
  },
335
334
  implementer: {
336
- ...base("implementer", implementerModel, opts.maxImplementerEffort ?? effort("implementer")),
337
- description: `Max-profile implementation subagent running ${implementerModel} at high effort. Best suited to a bounded coding change whose desired outcome and constraints are known but whose implementation still needs judgment.`,
338
- prompt: "Role: coding implementation for a settled desired outcome. Make a coherent, scoped change consistent with repository conventions and acceptance criteria. Return the files changed, observable behavior, checks and results, and unresolved risks; surface material ambiguity rather than silently deciding product or architecture questions. " + fileToolSteer("builds, tests, and git"),
335
+ ...base(implementerModel, opts.maxImplementerEffort ?? effort("implementer")),
336
+ ...maxRole("implementer", implementerModel, opts.maxImplementerEffort ?? effort("implementer")),
337
+ prompt: `${maxNativePrompt("implementer")} ${fileToolSteer("builds")}`,
339
338
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
340
339
  },
341
340
  reviewer: {
342
- ...base("reviewer", reviewerModel, opts.maxReviewerEffort ?? effort("reviewer")),
343
- description: `Max-profile repository-aware verifier running ${reviewerModel}. Best suited to assessing an implementation or reproducing a failure when code execution and surrounding repository context matter.`,
344
- prompt: "Role: independent repository-aware verification. Assess the supplied artifact against its intent and the actual repository or runtime state. Return verified or clearly plausible findings, severity, file:line evidence, concrete failure scenarios, checks run and results, and a go/no-go; distinguish no findings from checks not run. The lead owns remediation and approval. " + fileToolSteer("builds, tests, and reproductions"),
341
+ ...base(reviewerModel, opts.maxReviewerEffort ?? effort("reviewer")),
342
+ ...maxRole("reviewer", reviewerModel, opts.maxReviewerEffort ?? effort("reviewer")),
343
+ prompt: `${maxNativePrompt("reviewer")} ${reviewerToolSteer()}`,
345
344
  tools: researchTools,
346
345
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
347
346
  },
348
347
  brainstorm: {
349
- ...base("brainstorm", brainstormModel, opts.maxBrainstormEffort ?? effort("brainstorm")),
350
- description: `Max-profile divergent-options subagent running ${brainstormModel}. Best suited to an open decision where materially different repository-feasible approaches remain plausible.`,
351
- prompt: "Role: divergent option generation. Return materially distinct, repository-feasible alternatives with trade-offs, assumptions, failure modes, and evidence that would discriminate among them. A recommendation is useful when the available evidence supports one; the lead owns the decision and planning. " + readOnlyToolSteer(),
348
+ ...base(brainstormModel, opts.maxBrainstormEffort ?? effort("brainstorm")),
349
+ ...maxRole("brainstorm", brainstormModel, opts.maxBrainstormEffort ?? effort("brainstorm")),
350
+ prompt: `${maxNativePrompt("brainstorm")} ${readOnlyToolSteer()}`,
352
351
  tools: researchTools,
353
352
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
354
353
  },
355
354
  "peer-review-coordinator": {
356
- description: `Max-profile peer-review coordinator running ${MAX_PROFILE_MODELS.luna} at maximum effort. Best suited to consequential plans or diffs where several independent, cross-family lenses are likely to add value beyond one review.`,
357
- prompt: `Role: synthesize independent fresh-context review of the supplied artifact and constraints. Available peers: ${peerList || "(none)"}. Select a risk-proportionate set with distinct useful lenses, preserving independence and avoiding redundant same-model calls unless their scopes differ. Return deduplicated, severity-ranked findings with sources, file:line evidence where applicable, concrete failure scenarios, disagreements, confidence, and evidence gaps. Peer output is advisory; the lead owns go/no-go and remediation.`,
355
+ description: MAX_COORDINATOR_DESCRIPTION,
356
+ prompt: MAX_COORDINATOR_PROMPT,
358
357
  model: oneM(MAX_PROFILE_MODELS.luna),
359
358
  effort: opts.maxCoordinatorEffort ?? effort("peer-review-coordinator"),
360
359
  tools: [`mcp__${peersKey}__*`],
@@ -409,16 +408,16 @@ function buildFastProfileAgentDefinitions(opts) {
409
408
  const effort = (name) => FAST_PROFILE_NATIVE_EFFORTS[name];
410
409
  const out = {
411
410
  Explore: {
412
- description: `Fast-profile read-only exploration subagent running ${exploreModel}. Use for broad repository discovery; return conclusions with file:line evidence, not file dumps.`,
413
- prompt: "You are the fast-profile read-only exploration subagent. Investigate the repository to answer the question: cast a wide net, then return a concise evidence packet with file:line citations and checked commands. Do not plan, edit, or spawn agents. " + readOnlyToolSteer(),
411
+ description: `Fast-profile read-only exploration subagent running ${exploreModel}. Use proactively and in parallel for multi-file discovery, mapping architecture, tracing call graphs, or inventorying conventions. Returns concise file:line evidence; not for single-file lookups or editing.`,
412
+ prompt: "You are the fast-profile read-only exploration subagent. Investigate the repository to answer the question: cast a wide net across semantic and lexical searches, follow call chains, and return a structured evidence packet (Answer, Inventory with file:line, Entry Points, Conventions, Gaps). Do not plan, edit, or spawn agents. " + readOnlyToolSteer(),
414
413
  tools: readSearchTools,
415
414
  model: decorateGuaranteedOneM(LUNA_SCOUT_ALIAS_ID),
416
415
  effort: effort("Explore"),
417
416
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
418
417
  },
419
418
  Plan: {
420
- description: `Fast-profile plan architect running ${planModel} at high effort. Best suited to non-trivial changes where sequencing, interfaces, or verification benefit from a separate planning view.`,
421
- prompt: "You are the fast-profile planning subagent. Given the goal, constraints, and available evidence, return an ordered implementation plan with affected files, invariants, risks, acceptance criteria, and verification. You do not have Advisor. Use Oracle only when one precise consequential uncertainty remains after your own investigation and available repository evidence cannot settle it. The Task/Agent capability is restricted by the fast in-session ACL: you may invoke only `Explore` or `reviewer`; do not invoke any other role. " + readOnlyToolSteer(),
419
+ description: `Fast-profile plan architect running ${planModel} at high effort. Best suited to non-trivial changes where sequencing, interface contracts, invariants, or acceptance criteria benefit from a separate planning view.`,
420
+ prompt: "You are the fast-profile planning subagent. Given the goal, constraints, and available evidence, return an ordered implementation plan (Objective, Invariants, Interface Boundaries, Steps with parallel markings, Runnable Acceptance Criteria, Risks). You do not have Advisor. Use Oracle only when one precise consequential uncertainty remains after your own investigation and available repository evidence cannot settle it. The Task/Agent capability is restricted by the fast in-session ACL: you may invoke only `Explore` or `reviewer`; do not invoke any other role. " + readOnlyToolSteer(),
422
421
  tools: planTools,
423
422
  model: oneM(planModel),
424
423
  effort: effort("Plan"),
@@ -428,22 +427,22 @@ function buildFastProfileAgentDefinitions(opts) {
428
427
  }
429
428
  },
430
429
  "general-purpose": {
431
- description: `Fast-profile general-purpose execution subagent running ${generalModel} at maximum effort. Best suited to mixed or multi-step execution tasks that do not fit narrower roles.`,
432
- prompt: "You are the fast-profile general-purpose execution subagent. Work out what the task requires and deliver the outcome end to end using dedicated file tools, builds, tests, and git. For verification, you may invoke only `reviewer`. The lead owns final integration. " + fileToolSteer("builds, tests, and git"),
430
+ description: `Fast-profile general-purpose execution subagent running ${generalModel} at maximum effort. Best suited to mixed, multi-step, or open-ended execution tasks that span investigation, tool workflows, and code changes.`,
431
+ prompt: "You are the fast-profile general-purpose execution subagent. Work out what the task requires and deliver the outcome end to end using dedicated file tools, builds, tests, and git. Iterate against concrete feedback, check error output, and return (Outcome, Actions with trimmed output, Side Effects changed, Evidence, Open items). For verification, you may invoke only `reviewer`. The lead owns final integration. " + fileToolSteer("builds, tests, and git"),
433
432
  model: oneM(generalModel),
434
433
  effort: effort("general-purpose"),
435
434
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
436
435
  },
437
436
  implementer: {
438
- description: `Fast-profile implementation subagent running ${implementerModel} at high effort. Best suited to bounded coding changes consistent with repository conventions.`,
439
- prompt: "You are the fast-profile implementation subagent. Implement the change surgically, matching surrounding code style, minimizing unrelated churn, and running builds/tests. For verification, you may invoke only `reviewer`; do not invoke any other role. Report exact changes and risks. " + fileToolSteer("builds, tests, and git"),
437
+ description: `Fast-profile implementation subagent running ${implementerModel} at high effort. Best suited to surgical, bounded coding changes with settled scope that match repository conventions.`,
438
+ prompt: "You are the fast-profile implementation subagent. Implement the change surgically, matching surrounding code style, minimizing unrelated churn, and running builds/tests. Report (Changes with file:line, Verification commands and trimmed output, Not Done/Assumed). For verification, you may invoke only `reviewer`; do not invoke any other role. Report exact changes and risks. " + fileToolSteer("builds, tests, and git"),
440
439
  model: oneM(implementerModel),
441
440
  effort: effort("implementer"),
442
441
  ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
443
442
  },
444
443
  reviewer: {
445
- description: `Fast-profile repository-aware reviewer running ${reviewerModel} at medium effort. Use for independent verification, test authoring, failure reproduction, or runtime checks.`,
446
- prompt: "You are the fast-profile repository-aware reviewer. Verify what is actually true by reading code and running builds, tests, or reproductions. Report severity-ranked findings with `file:line` evidence and a clear go/no-go. You do not have Advisor. " + fileToolSteer("builds, tests, and reproductions") + " Do not spawn further agents.",
444
+ description: `Fast-profile repository-aware reviewer running ${reviewerModel} at xhigh effort. Use proactively for independent adversarial verification, test authoring, failure reproduction, or runtime checks.`,
445
+ prompt: "You are the fast-profile repository-aware reviewer. Verify what is actually true by reading code and running builds, tests, or reproductions. Return on line one: VERDICT: SHIP | FIX | BLOCK, followed by Must Fix (file:line), Should Fix, Evidence run, and Not Verified. You do not have Advisor. " + reviewerToolSteer() + " Do not spawn further agents.",
447
446
  model: oneM(reviewerModel),
448
447
  effort: effort("reviewer"),
449
448
  tools: readSearchTools,
@@ -936,8 +935,6 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
936
935
  maxImplementerModel: opts.maxImplementerModel,
937
936
  maxReviewerModel: opts.maxReviewerModel,
938
937
  maxBrainstormModel: opts.maxBrainstormModel,
939
- maxGeminiModel: opts.maxGeminiModel,
940
- maxGrokModel: opts.maxGrokModel,
941
938
  maxExploreEffort: opts.maxExploreEffort,
942
939
  maxPlanEffort: opts.maxPlanEffort,
943
940
  maxGeneralPurposeEffort: opts.maxGeneralPurposeEffort,
@@ -945,7 +942,6 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
945
942
  maxReviewerEffort: opts.maxReviewerEffort,
946
943
  maxBrainstormEffort: opts.maxBrainstormEffort,
947
944
  maxCoordinatorEffort: opts.maxCoordinatorEffort,
948
- maxPersonaNames: opts.maxPersonaNames,
949
945
  maxPeerModels: opts.maxPeerModels,
950
946
  nonce,
951
947
  codexHome,
@@ -974,6 +970,8 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
974
970
  if (!completeMdResult) throw new Error("peer MCP agent files were not generated");
975
971
  const personas = opts.maxProfile ? maxPersonasFor({
976
972
  solModel: opts.maxPeerModels?.sol,
973
+ codexModel: opts.maxPeerModels?.codex,
974
+ sonnetModel: opts.maxPeerModels?.sonnet,
977
975
  lunaModel: opts.maxPeerModels?.luna,
978
976
  opusModel: opts.maxPeerModels?.opus,
979
977
  geminiModel: opts.maxPeerModels?.gemini,
@@ -2130,11 +2128,11 @@ function joinClauses(parts) {
2130
2128
  * tier; reserve `reviewer` for the higher-stakes assessment it is there for. */
2131
2129
  function buildNativeReachClauses(opts) {
2132
2130
  if (opts.profile === "fast") return joinClauses([
2133
- "`Explore` for broad discovery and repo investigation",
2134
- "`Plan` for non-trivial sequencing, interfaces, migration risk, or acceptance criteria",
2135
- "`general-purpose` for mixed execution tasks",
2136
- "`implementer` for bounded coding changes",
2137
- "`reviewer` for repository-aware verification, reproduction, and root-causing"
2131
+ "`Explore` for broad repository discovery, dependency mapping, and convention tracking",
2132
+ "`Plan` for architectural sequencing, interface contracts, migration risk, and runnable acceptance criteria",
2133
+ "`general-purpose` for mixed, iterative, or multi-step execution tasks",
2134
+ "`implementer` for surgical coding changes matching existing conventions",
2135
+ "`reviewer` for independent adversarial verification, reproduction, and root-causing"
2138
2136
  ]);
2139
2137
  const clauses = [];
2140
2138
  const implementerFast = opts.implementerFastAvailable !== false;
@@ -2166,7 +2164,8 @@ function buildNativeReachClauses(opts) {
2166
2164
  function buildOperatingDefaultsDirective(opts = {}) {
2167
2165
  if (opts.profile === "max") {
2168
2166
  const peersKey = opts.peersKey ?? opts.groupKeys?.peers ?? "peers";
2169
- 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 and may use the roster as a set of complementary capabilities, not a required sequence: direct tools suit narrow facts; `Explore` broad discovery; `brainstorm` open design choices; `Plan` changes where sequencing, interfaces, or acceptance criteria benefit from a separate view; `implementer` bounded coding; `general-purpose` mixed work; and `reviewer` (Grok 4.6/high with Luna 1M/max fallback) repository-aware verification. Independent work can run in parallel when that improves context isolation or latency. A fresh-context peer from another model family can be useful where correlated blind spots matter and deterministic evidence does not settle the issue; `peer-review-coordinator` is available when the risk justifies several lenses. Small or obvious tasks are often better handled directly, and model output remains evidence to synthesize rather than a vote. Each role's configured model is the deliberate default for role fit and diversity; overrides are most useful after a concrete mismatch. On every retained max surface, Gemini 3.1 Pro is replaced by Grok 4.6/high when available, otherwise Gemini 3.8 Flash 1M/high. Advisor is optional, non-binding counsel for one focused consequential uncertainty that the normal evidence and roles cannot settle; it has no approval or workflow authority, and a further consultation is useful only when materially new evidence changes the question." + (opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "");
2167
+ const artifactClause = opts.artifactAvailable ? ` Live human review is available in the artifact panel via \`mcp__${peersKey}__artifact_*\`.` : "";
2168
+ 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;
2170
2169
  }
2171
2170
  if (opts.profile === "fast") {
2172
2171
  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)\n\nFast 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.";
@@ -2190,8 +2189,8 @@ Advisor is an optional, non-binding, lead-only transcript-aware sounding board f
2190
2189
  const OPERATING_DEFAULTS_DIRECTIVE = buildOperatingDefaultsDirective();
2191
2190
  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.";
2192
2191
  function buildOperatingDefaultsDigest(opts = {}) {
2193
- 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 and may use the roster as complementary capabilities: direct tools for narrow facts, `Explore` for broad discovery, `brainstorm` for open choices, `Plan` for a separate planning view, `implementer` and `general-purpose` for execution, and `reviewer` (Grok 4.6/high with Luna 1M/max fallback) for repository-aware verification. Delegate when work is wide or slow to protect the main thread's finite context; do trivial and surgical work directly. Prefer parallel delegation for independent work. Stop named teammates when finished.\n\nVerify claims against real evidence: run the code, check outputs and test results. Model output is evidence to synthesize rather than a vote. A fresh-context peer or `peer-review-coordinator` can reduce correlated blind spots on consequential decisions where judgment remains after direct evidence is in.\n\nAdvisor is optional, non-binding, primary-lead-only counsel for focused consequential uncertainty that direct evidence, Plan, reviewer, or peers cannot settle. It has no approval or workflow authority.";
2194
- if (opts.profile === "fast") return "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nFast launch profile. The lead coordinates execution across `Explore` (broad discovery), `Plan` (sequencing, interfaces, migration risk, acceptance criteria), `general-purpose` (mixed execution), `implementer` (bounded coding), and `reviewer` (repository-aware verification). `Plan` is an advisory planning capability, not an approval gate. Delegate when work is wide or slow to protect main-thread context; do trivial and surgical work directly. Independent subagents may run in parallel. Stop named teammates when finished.\n\nVerify claims against real evidence: run relevant commands and tests. Advisor is optional, non-binding, transcript-aware, and lead-only for consequential unresolved uncertainty, not routine progress or workflow gates. `oracle` (Opus 5 1M/high) is a stateless last resort for the lead and `Plan` when normal paths remain stuck.";
2192
+ 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.";
2193
+ if (opts.profile === "fast") return "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nFast launch profile. The lead coordinates execution across `Explore` (broad discovery, convention mapping), `Plan` (sequencing, interfaces, migration risk, acceptance criteria), `general-purpose` (mixed execution), `implementer` (bounded coding), and `reviewer` (repository-aware verification). `Plan` is an advisory planning capability, not an approval gate. Delegate when work is wide or slow to protect main-thread context; do trivial and surgical work 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. Advisor is optional, non-binding, transcript-aware, and lead-only for consequential unresolved uncertainty, not routine progress or workflow gates. `oracle` (Opus 5 1M/high) is a stateless last resort for the lead and `Plan` when normal paths remain stuck.";
2195
2194
  return STANDARD_OPERATING_DEFAULTS_DIGEST;
2196
2195
  }
2197
2196
  /**
@@ -2743,4 +2742,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
2743
2742
  //#endregion
2744
2743
  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 };
2745
2744
 
2746
- //# sourceMappingURL=attribution-settings-C5ScaOmz.js.map
2745
+ //# sourceMappingURL=attribution-settings-C_ZLSCQ4.js.map