github-router 0.3.297 → 0.3.302

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 (100) hide show
  1. package/dist/{attribution-settings-B70GmZ68.js → attribution-settings-B1xutIts.js} +146 -10
  2. package/dist/attribution-settings-B1xutIts.js.map +1 -0
  3. package/dist/{auth-CluG5e-l.js → auth-CpjOjoUG.js} +4 -3
  4. package/dist/{auth-CluG5e-l.js.map → auth-CpjOjoUG.js.map} +1 -1
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{check-usage-iOzfnKJe.js → check-usage-BsN3S4Fu.js} +4 -4
  7. package/dist/{check-usage-iOzfnKJe.js.map → check-usage-BsN3S4Fu.js.map} +1 -1
  8. package/dist/{claude-DMMfvfns.js → claude-uRuzEH0W.js} +130 -78
  9. package/dist/claude-uRuzEH0W.js.map +1 -0
  10. package/dist/{codex-DVOyVv2B.js → codex-D5ag-liR.js} +6 -5
  11. package/dist/{codex-DVOyVv2B.js.map → codex-D5ag-liR.js.map} +1 -1
  12. package/dist/{debug-DsEwleGg.js → debug-BXRPyeqO.js} +2 -2
  13. package/dist/{debug-DsEwleGg.js.map → debug-BXRPyeqO.js.map} +1 -1
  14. package/dist/engine-2uMJ4Isk.js +2 -0
  15. package/dist/{gate-discovery-G6PAG61j.js → gate-discovery-BTRVyKWu.js} +5 -5
  16. package/dist/{gate-discovery-G6PAG61j.js.map → gate-discovery-BTRVyKWu.js.map} +1 -1
  17. package/dist/{get-copilot-usage-B7Z4XVWj.js → get-copilot-usage-ByjQqhdi.js} +3 -2
  18. package/dist/{get-copilot-usage-B7Z4XVWj.js.map → get-copilot-usage-ByjQqhdi.js.map} +1 -1
  19. package/dist/hooks.mjs +287 -5
  20. package/dist/hooks.sha256 +1 -1
  21. package/dist/{internal-artifact-open-D6tKMg8v.js → internal-artifact-open-DRSxShAW.js} +2 -2
  22. package/dist/{internal-artifact-open-D6tKMg8v.js.map → internal-artifact-open-DRSxShAW.js.map} +1 -1
  23. package/dist/{internal-fast-dispatch-guard-N-RaLrOn.js → internal-fast-dispatch-guard-CYOWbxjX.js} +1 -1
  24. package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js → internal-fast-dispatch-guard-D2HcfXZv.js} +2 -2
  25. package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js.map → internal-fast-dispatch-guard-D2HcfXZv.js.map} +1 -1
  26. package/dist/{internal-first-mate-guard-C9BV7J4U.js → internal-first-mate-guard-Bcb5JwiO.js} +3 -3
  27. package/dist/{internal-first-mate-guard-C9BV7J4U.js.map → internal-first-mate-guard-Bcb5JwiO.js.map} +1 -1
  28. package/dist/{internal-first-mate-guard-WJApyc8j.js → internal-first-mate-guard-Brh_uois.js} +1 -1
  29. package/dist/internal-max-dispatch-guard-Bcjavapx.js +2 -0
  30. package/dist/internal-max-dispatch-guard-BjSVXMvC.js +198 -0
  31. package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +1 -0
  32. package/dist/{internal-plan-review-t3PuNfuL.js → internal-plan-review-DVY-iV2x.js} +3 -3
  33. package/dist/{internal-plan-review-t3PuNfuL.js.map → internal-plan-review-DVY-iV2x.js.map} +1 -1
  34. package/dist/{internal-prompt-submit-C3KovHQG.js → internal-prompt-submit-BTqRn4FW.js} +4 -4
  35. package/dist/{internal-prompt-submit-C3KovHQG.js.map → internal-prompt-submit-BTqRn4FW.js.map} +1 -1
  36. package/dist/{internal-session-bind-d2uoja8I.js → internal-session-bind-YfH656lt.js} +2 -2
  37. package/dist/{internal-session-bind-d2uoja8I.js.map → internal-session-bind-YfH656lt.js.map} +1 -1
  38. package/dist/{internal-stop-hook-BjzrF1zd.js → internal-stop-hook-BZg__ab6.js} +5 -5
  39. package/dist/{internal-stop-hook-BjzrF1zd.js.map → internal-stop-hook-BZg__ab6.js.map} +1 -1
  40. package/dist/{internal-stop-review-YtDUGXpX.js → internal-stop-review-B8MmEyQ1.js} +2 -2
  41. package/dist/{internal-stop-review-YtDUGXpX.js.map → internal-stop-review-B8MmEyQ1.js.map} +1 -1
  42. package/dist/{internal-worker-guard-CdkeS9PN.js → internal-worker-guard-Dr6W83TC.js} +2 -2
  43. package/dist/{internal-worker-guard-CdkeS9PN.js.map → internal-worker-guard-Dr6W83TC.js.map} +1 -1
  44. package/dist/{internal-workspace-header-tuBXJV22.js → internal-workspace-header-Cep0WSIb.js} +2 -2
  45. package/dist/{internal-workspace-header-tuBXJV22.js.map → internal-workspace-header-Cep0WSIb.js.map} +1 -1
  46. package/dist/lifecycle-4TZrJuAa.js +2 -0
  47. package/dist/{lifecycle-CM9eTzvk.js → lifecycle-CmPJ6e_6.js} +2 -2
  48. package/dist/{lifecycle-CM9eTzvk.js.map → lifecycle-CmPJ6e_6.js.map} +1 -1
  49. package/dist/{lifecycle-Bg6doY3-.js → lifecycle-DgsJ_8Am.js} +2 -2
  50. package/dist/{lifecycle-Bg6doY3-.js.map → lifecycle-DgsJ_8Am.js.map} +1 -1
  51. package/dist/lifecycle-O91Vzzb-.js +2 -0
  52. package/dist/main.js +19 -18
  53. package/dist/main.js.map +1 -1
  54. package/dist/max-profile-contract-BTXowh6k.js +264 -0
  55. package/dist/max-profile-contract-BTXowh6k.js.map +1 -0
  56. package/dist/{mcp-workspace-header-dERl2YTT.js → mcp-workspace-header-NzFD0Wgd.js} +2 -2
  57. package/dist/{mcp-workspace-header-dERl2YTT.js.map → mcp-workspace-header-NzFD0Wgd.js.map} +1 -1
  58. package/dist/{models-DZ4hYsR7.js → models-1KwEUgzd.js} +3 -3
  59. package/dist/{models-DZ4hYsR7.js.map → models-1KwEUgzd.js.map} +1 -1
  60. package/dist/{orchestration-BiGCEwbH.js → orchestration-CYyp9w-t.js} +2 -2
  61. package/dist/{orchestration-BiGCEwbH.js.map → orchestration-CYyp9w-t.js.map} +1 -1
  62. package/dist/paths-DDAiPVto.js +2 -0
  63. package/dist/{paths-Ci485qSJ.js → paths-IcZW8gZx.js} +4 -4
  64. package/dist/{paths-Ci485qSJ.js.map → paths-IcZW8gZx.js.map} +1 -1
  65. package/dist/{peer-mcp-personas-ce6_YMnX.js → peer-mcp-personas-DwEiYeJS.js} +423 -186
  66. package/dist/peer-mcp-personas-DwEiYeJS.js.map +1 -0
  67. package/dist/{plan-review-hook-DuW0pSoM.js → plan-review-hook-szSNt6uU.js} +3 -3
  68. package/dist/{plan-review-hook-DuW0pSoM.js.map → plan-review-hook-szSNt6uU.js.map} +1 -1
  69. package/dist/{prompt-submit-hook-IMl7ssfr.js → prompt-submit-hook-ZUxo_jEl.js} +3 -3
  70. package/dist/{prompt-submit-hook-IMl7ssfr.js.map → prompt-submit-hook-ZUxo_jEl.js.map} +1 -1
  71. package/dist/{provision-BhCtm3md.js → provision-BLT1pCFy.js} +4 -4
  72. package/dist/{provision-BhCtm3md.js.map → provision-BLT1pCFy.js.map} +1 -1
  73. package/dist/{self-invocation-DAB_od0C.js → self-invocation-BJWbA8ka.js} +2 -2
  74. package/dist/{self-invocation-DAB_od0C.js.map → self-invocation-BJWbA8ka.js.map} +1 -1
  75. package/dist/{serve-Blj_dRSr.js → serve-wEZoOijw.js} +13 -12
  76. package/dist/{serve-Blj_dRSr.js.map → serve-wEZoOijw.js.map} +1 -1
  77. package/dist/{server-setup-DhG3YZPj.js → server-setup-Zn5wkosb.js} +213 -37
  78. package/dist/server-setup-Zn5wkosb.js.map +1 -0
  79. package/dist/{start-8QaqICtd.js → start-DSqU8d8h.js} +3 -3
  80. package/dist/{start-8QaqICtd.js.map → start-DSqU8d8h.js.map} +1 -1
  81. package/dist/state-B8adscCv.js +51 -0
  82. package/dist/state-B8adscCv.js.map +1 -0
  83. package/dist/{stop-gate-hook-DQnh_KfI.js → stop-gate-hook-CJOk28zd.js} +3 -3
  84. package/dist/{stop-gate-hook-DQnh_KfI.js.map → stop-gate-hook-CJOk28zd.js.map} +1 -1
  85. package/dist/{stop-gate-policy-DMr3KVmw.js → stop-gate-policy-zhzRIj6G.js} +2 -2
  86. package/dist/{stop-gate-policy-DMr3KVmw.js.map → stop-gate-policy-zhzRIj6G.js.map} +1 -1
  87. package/dist/{token-BtJhjXXu.js → token-CbuFyx-B.js} +4 -50
  88. package/dist/token-CbuFyx-B.js.map +1 -0
  89. package/dist/{worker-dispatch-BEHkTbnH.js → worker-dispatch-DgP5yT26.js} +2 -2
  90. package/dist/{worker-dispatch-BEHkTbnH.js.map → worker-dispatch-DgP5yT26.js.map} +1 -1
  91. package/package.json +1 -1
  92. package/dist/attribution-settings-B70GmZ68.js.map +0 -1
  93. package/dist/claude-DMMfvfns.js.map +0 -1
  94. package/dist/engine-BkGRuUNs.js +0 -2
  95. package/dist/lifecycle-CGLt1cJQ.js +0 -2
  96. package/dist/lifecycle-DoUwpVDB.js +0 -2
  97. package/dist/paths-GD7bgGGy.js +0 -2
  98. package/dist/peer-mcp-personas-ce6_YMnX.js.map +0 -1
  99. package/dist/server-setup-DhG3YZPj.js.map +0 -1
  100. package/dist/token-BtJhjXXu.js.map +0 -1
@@ -1,10 +1,11 @@
1
- import { Ft as LUNA_IMPLEMENTER_ALIAS_ID, Lt as LUNA_SCOUT_ALIAS_ID, Mt as FAST_CRITIC_ALIAS_ID, Rn as oneMContextDisabled, _n as CONDENSED_OPERATING_SEQUENCE, a as buildAgentPrompt, l as personasFor, n as MCP_GROUPS, t as GROUP_META, vn as DEFINITION_OF_GREATNESS, zn as withOneMSuffix } from "./peer-mcp-personas-ce6_YMnX.js";
2
- import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-Ci485qSJ.js";
1
+ import { Gn as oneMContextDisabled, It as LUNA_IMPLEMENTER_ALIAS_ID, Kn as withOneMSuffix, Nt as FAST_CRITIC_ALIAS_ID, Rt as LUNA_SCOUT_ALIAS_ID, Tn as DEFINITION_OF_GREATNESS, a as buildAgentPrompt, l as maxPersonasFor, n as MCP_GROUPS, t as GROUP_META, u as personasFor, wn as CONDENSED_OPERATING_SEQUENCE } from "./peer-mcp-personas-DwEiYeJS.js";
2
+ import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-IcZW8gZx.js";
3
3
  import { o as FAST_PROFILE_NATIVE_AGENT_NAMES } from "./fast-profile-contract-K3P58nj3.js";
4
- import "./self-invocation-DAB_od0C.js";
5
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BhCtm3md.js";
6
- import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-dERl2YTT.js";
7
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-BEHkTbnH.js";
4
+ import "./self-invocation-BJWbA8ka.js";
5
+ 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-BTXowh6k.js";
6
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BLT1pCFy.js";
7
+ import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-NzFD0Wgd.js";
8
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-DgP5yT26.js";
8
9
  import consola from "consola";
9
10
  import path from "node:path";
10
11
  import { randomBytes } from "node:crypto";
@@ -272,6 +273,109 @@ function decorateGuaranteedOneM(id) {
272
273
  if (oneMContextDisabled() || /\[1m\]$/i.test(id)) return id;
273
274
  return `${id}[1m]`;
274
275
  }
276
+ /** Build the literal `-m max` native roster. Max shadows the client built-ins
277
+ * and every emitted role carries an explicit model and effort. */
278
+ function buildMaxProfileAgentDefinitions(opts) {
279
+ const modelFor = (value, fallback) => nonEmptyModel(value) ?? fallback;
280
+ const exploreModel = modelFor(opts.maxExploreModel, MAX_PROFILE_NATIVE_MODELS.Explore);
281
+ const planModel = modelFor(opts.maxPlanModel, MAX_PROFILE_NATIVE_MODELS.Plan);
282
+ const generalModel = modelFor(opts.maxGeneralPurposeModel, MAX_PROFILE_NATIVE_MODELS["general-purpose"]);
283
+ const implementerModel = modelFor(opts.maxImplementerModel, MAX_PROFILE_NATIVE_MODELS.implementer);
284
+ const reviewerModel = modelFor(opts.maxReviewerModel, modelFor(opts.maxGeminiModel, modelFor(opts.maxGrokModel, MAX_PROFILE_NATIVE_MODELS.reviewer)));
285
+ const brainstormModel = modelFor(opts.maxBrainstormModel, modelFor(opts.maxGrokModel, modelFor(opts.maxGeminiModel, MAX_PROFILE_NATIVE_MODELS.brainstorm)));
286
+ const peersKey = peersKeyOf(opts.groupKeys);
287
+ const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
288
+ const searchMcpServers = opts.serverUrl ? { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
289
+ const peersMcpServers = opts.serverUrl ? { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } : void 0;
290
+ const oneM = (model) => model === MAX_PROFILE_MODELS.grok ? model : decorateGuaranteedOneM(model);
291
+ 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.7 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.`,
295
+ model: oneM(model),
296
+ effort: roleEffort
297
+ });
298
+ const researchTools = [
299
+ "Read",
300
+ "Grep",
301
+ "Glob",
302
+ "Bash",
303
+ "WebFetch",
304
+ "WebSearch",
305
+ `mcp__${searchKey}__*`
306
+ ];
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(", ");
314
+ const out = {
315
+ 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(),
319
+ tools: researchTools,
320
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
321
+ },
322
+ 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(),
326
+ tools: researchTools,
327
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
328
+ },
329
+ "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"),
333
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
334
+ },
335
+ 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"),
339
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
340
+ },
341
+ 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"),
345
+ tools: researchTools,
346
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
347
+ },
348
+ 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(),
352
+ tools: researchTools,
353
+ ...searchMcpServers ? { mcpServers: searchMcpServers } : {}
354
+ },
355
+ "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.`,
358
+ model: oneM(MAX_PROFILE_MODELS.luna),
359
+ effort: opts.maxCoordinatorEffort ?? effort("peer-review-coordinator"),
360
+ tools: [`mcp__${peersKey}__*`],
361
+ ...peersMcpServers ? { mcpServers: peersMcpServers } : {}
362
+ }
363
+ };
364
+ if (opts.browseAvailable && opts.groupKeys.workers) {
365
+ const workersKey = workersKeyOf(opts.groupKeys);
366
+ out["worker-browse"] = {
367
+ description: dispatcherDescription("browse"),
368
+ prompt: dispatcherPrompt("browse", workersKey),
369
+ model: oneM(MAX_PROFILE_MODELS.luna),
370
+ effort: "high",
371
+ tools: dispatcherTools("browse", workersKey),
372
+ ...opts.serverUrl ? { mcpServers: { [workersKey]: httpEntryFor(opts.serverUrl, "workers", opts.nonce, opts.workspaceHeaderCmd) } } : {}
373
+ };
374
+ }
375
+ const roster = opts.nativeRoster == null ? new Set(MAX_PROFILE_NATIVE_AGENT_NAMES) : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
376
+ for (const name of Object.keys(out)) if (name !== "worker-browse" && !roster.has(name)) delete out[name];
377
+ return out;
378
+ }
275
379
  /** Build the literal `-m fast` native roster. This is intentionally separate
276
380
  * from the standard definitions: the names overlap, but their role bodies,
277
381
  * fixed model assignments, and efforts are profile contracts. */
@@ -367,9 +471,10 @@ function buildFastProfileAgentDefinitions(opts) {
367
471
  * per Phase 2A of the peer-MCP plan.
368
472
  */
369
473
  function buildPeerAgentDefinitions(opts) {
474
+ if (opts.maxProfile) return buildMaxProfileAgentDefinitions(opts);
370
475
  if (opts.fastProfile) return buildFastProfileAgentDefinitions(opts);
371
476
  const out = {};
372
- const personas = opts.fastProfile ? [] : personasFor({
477
+ const personas = personasFor({
373
478
  codexCli: opts.codexCli,
374
479
  geminiAvailable: opts.geminiAvailable,
375
480
  geminiModel: opts.geminiModel,
@@ -819,6 +924,24 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
819
924
  plannerEffort: opts.plannerEffort,
820
925
  criticModel: opts.criticModel,
821
926
  criticEffort: opts.criticEffort,
927
+ maxProfile: opts.maxProfile,
928
+ maxExploreModel: opts.maxExploreModel,
929
+ maxPlanModel: opts.maxPlanModel,
930
+ maxGeneralPurposeModel: opts.maxGeneralPurposeModel,
931
+ maxImplementerModel: opts.maxImplementerModel,
932
+ maxReviewerModel: opts.maxReviewerModel,
933
+ maxBrainstormModel: opts.maxBrainstormModel,
934
+ maxGeminiModel: opts.maxGeminiModel,
935
+ maxGrokModel: opts.maxGrokModel,
936
+ maxExploreEffort: opts.maxExploreEffort,
937
+ maxPlanEffort: opts.maxPlanEffort,
938
+ maxGeneralPurposeEffort: opts.maxGeneralPurposeEffort,
939
+ maxImplementerEffort: opts.maxImplementerEffort,
940
+ maxReviewerEffort: opts.maxReviewerEffort,
941
+ maxBrainstormEffort: opts.maxBrainstormEffort,
942
+ maxCoordinatorEffort: opts.maxCoordinatorEffort,
943
+ maxPersonaNames: opts.maxPersonaNames,
944
+ maxPeerModels: opts.maxPeerModels,
822
945
  nonce,
823
946
  codexHome,
824
947
  serverUrl,
@@ -844,7 +967,13 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
844
967
  }
845
968
  const completeMdResult = mdResult;
846
969
  if (!completeMdResult) throw new Error("peer MCP agent files were not generated");
847
- const personas = opts.fastProfile ? [] : personasFor({
970
+ const personas = opts.maxProfile ? maxPersonasFor({
971
+ solModel: opts.maxPeerModels?.sol,
972
+ lunaModel: opts.maxPeerModels?.luna,
973
+ opusModel: opts.maxPeerModels?.opus,
974
+ geminiModel: opts.maxPeerModels?.gemini,
975
+ grokModel: opts.maxPeerModels?.grok
976
+ }) : opts.fastProfile ? [] : personasFor({
848
977
  codexCli: opts.codexCli,
849
978
  geminiAvailable: opts.geminiAvailable,
850
979
  geminiModel: opts.geminiModel,
@@ -1945,6 +2074,7 @@ function buildNativeReachClauses(opts) {
1945
2074
  return joinClauses(clauses);
1946
2075
  }
1947
2076
  function buildOperatingDefaultsDirective(opts = {}) {
2077
+ if (opts.profile === "max") 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` 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.7 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.";
1948
2078
  if (opts.profile === "fast") {
1949
2079
  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, so no injected Task roster, search, or Oracle is available. 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.";
1950
2080
  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\nOrchestrate. Delegate research, implementation, and review to the right subagent. Reach for " + buildNativeReachClauses(opts) + "; Task subagents run in parallel. That keeps your own context free to reason and collaborate with the user. Delegate only when work is wide or slow; do trivial and surgical work directly. Luna investigates and drafts. The lead must give `planner` a handcrafted evidence packet and must not implement until `planner` returns `APPROVE`. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for consequential unresolved uncertainty, conflicting evidence, or a genuinely stuck path; never use it for routine progress, waiting, directly verifiable facts, planner approval, reviewer verification, or completion ritual. `oracle` is exact Opus 5 (1M/high), stateless and last resort after the normal paths remain stuck. Before declaring work done, run the relevant build/tests and ask `reviewer` for repository-aware verification. Verify claims, report uncertainty, and stop named teammates when finished.";
@@ -2449,6 +2579,12 @@ const INJECTED_SKILLS = [
2449
2579
  FIRST_MATE_OPERATE_SKILL,
2450
2580
  FIRST_MATE_CONDUCT_SKILL
2451
2581
  ];
2582
+ function injectedSkillsForLaunch(selection) {
2583
+ if (selection.profileId === "fast") return [];
2584
+ if (selection.profileId === "max") return selection.firstMateEnabled ? INJECTED_SKILLS.filter((skill) => skill.name.startsWith("gh-first-mate")) : [];
2585
+ if (!selection.workerSkillsActive) return [];
2586
+ return INJECTED_SKILLS.filter((skill) => selection.firstMateEnabled || !skill.name.startsWith("gh-first-mate"));
2587
+ }
2452
2588
  //#endregion
2453
2589
  //#region src/lib/attribution-settings.ts
2454
2590
  /**
@@ -2514,6 +2650,6 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
2514
2650
  return { written: true };
2515
2651
  }
2516
2652
  //#endregion
2517
- export { injectPeerMcpIntoMirror as _, appendPeerAwarenessToMirroredClaudeMd as a, workersKeyOf as b, prependArtifactPanelDirectiveToMirroredClaudeMd as c, SEAMLESS_BUILTIN_TOOLS as d, configureServeDefaultPermissionMode as f, BUILTIN_SUBAGENT_DEFINITIONS as g, sanitizeServeSettingsEnv as h, OPERATING_DEFAULTS_DIGEST as i, prependOperatingDefaultsToMirroredClaudeMd as l, planModeAllowRules as m, INJECTED_SKILLS as n, appendToolbeltAwarenessToMirroredClaudeMd as o, injectAllowRules as p, writeInjectedSkill as r, buildOperatingDefaultsDirective as s, injectAttributionSuppressionIntoSettingsFile as t, prependStyleDirectiveToMirroredClaudeMd as u, resolveCodexCliBackend as v, writePeerMcpRuntimeFiles as x, resolveGroupKeysFromMirror as y };
2653
+ export { writePeerMcpRuntimeFiles as S, BUILTIN_SUBAGENT_DEFINITIONS as _, OPERATING_DEFAULTS_DIGEST as a, resolveGroupKeysFromMirror as b, buildOperatingDefaultsDirective as c, prependStyleDirectiveToMirroredClaudeMd as d, SEAMLESS_BUILTIN_TOOLS as f, sanitizeServeSettingsEnv as g, planModeAllowRules as h, writeInjectedSkill as i, prependArtifactPanelDirectiveToMirroredClaudeMd as l, injectAllowRules as m, INJECTED_SKILLS as n, appendPeerAwarenessToMirroredClaudeMd as o, configureServeDefaultPermissionMode as p, injectedSkillsForLaunch as r, appendToolbeltAwarenessToMirroredClaudeMd as s, injectAttributionSuppressionIntoSettingsFile as t, prependOperatingDefaultsToMirroredClaudeMd as u, injectPeerMcpIntoMirror as v, workersKeyOf as x, resolveCodexCliBackend as y };
2518
2654
 
2519
- //# sourceMappingURL=attribution-settings-B70GmZ68.js.map
2655
+ //# sourceMappingURL=attribution-settings-B1xutIts.js.map