github-router 0.3.288 → 0.3.292

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 (87) hide show
  1. package/dist/{attribution-settings-CofaqSzw.js → attribution-settings-CpLUCi8R.js} +124 -34
  2. package/dist/attribution-settings-CpLUCi8R.js.map +1 -0
  3. package/dist/{auth-DG4vh8-F.js → auth-BwUHopJz.js} +3 -3
  4. package/dist/{auth-DG4vh8-F.js.map → auth-BwUHopJz.js.map} +1 -1
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{check-usage-BqN7mBYv.js → check-usage-BTda5753.js} +4 -4
  7. package/dist/{check-usage-BqN7mBYv.js.map → check-usage-BTda5753.js.map} +1 -1
  8. package/dist/{claude-CoZKRNB8.js → claude-_DYGKCw8.js} +101 -49
  9. package/dist/claude-_DYGKCw8.js.map +1 -0
  10. package/dist/{codex-y2OyLIdv.js → codex-rTJ8jW5G.js} +5 -5
  11. package/dist/{codex-y2OyLIdv.js.map → codex-rTJ8jW5G.js.map} +1 -1
  12. package/dist/{debug-B5TjPTTH.js → debug-B3UrZTHQ.js} +2 -2
  13. package/dist/{debug-B5TjPTTH.js.map → debug-B3UrZTHQ.js.map} +1 -1
  14. package/dist/engine-C9axTIu7.js +2 -0
  15. package/dist/{gate-discovery-LQZ-enJa.js → gate-discovery-Bjar5dgv.js} +5 -5
  16. package/dist/{gate-discovery-LQZ-enJa.js.map → gate-discovery-Bjar5dgv.js.map} +1 -1
  17. package/dist/{get-copilot-usage-BjA0nyGR.js → get-copilot-usage-CRrf1ZSC.js} +2 -2
  18. package/dist/{get-copilot-usage-BjA0nyGR.js.map → get-copilot-usage-CRrf1ZSC.js.map} +1 -1
  19. package/dist/{internal-artifact-open-BskmUpnb.js → internal-artifact-open-BsEQRvDi.js} +2 -2
  20. package/dist/{internal-artifact-open-BskmUpnb.js.map → internal-artifact-open-BsEQRvDi.js.map} +1 -1
  21. package/dist/{internal-first-mate-guard-5XEHMaqy.js → internal-first-mate-guard-CVFFJriA.js} +3 -3
  22. package/dist/{internal-first-mate-guard-5XEHMaqy.js.map → internal-first-mate-guard-CVFFJriA.js.map} +1 -1
  23. package/dist/{internal-first-mate-guard-DHDQ6hFz.js → internal-first-mate-guard-DJdX6t48.js} +1 -1
  24. package/dist/{internal-plan-review-BUuMx4ku.js → internal-plan-review-8TKDLco6.js} +3 -3
  25. package/dist/{internal-plan-review-BUuMx4ku.js.map → internal-plan-review-8TKDLco6.js.map} +1 -1
  26. package/dist/{internal-prompt-submit-CQQ15xdO.js → internal-prompt-submit-Da7pxqua.js} +4 -4
  27. package/dist/{internal-prompt-submit-CQQ15xdO.js.map → internal-prompt-submit-Da7pxqua.js.map} +1 -1
  28. package/dist/{internal-session-bind-D04W2yWI.js → internal-session-bind-BOFytA1f.js} +2 -2
  29. package/dist/{internal-session-bind-D04W2yWI.js.map → internal-session-bind-BOFytA1f.js.map} +1 -1
  30. package/dist/{internal-stop-hook-DSbaDb_m.js → internal-stop-hook-DrX2xlj0.js} +5 -5
  31. package/dist/{internal-stop-hook-DSbaDb_m.js.map → internal-stop-hook-DrX2xlj0.js.map} +1 -1
  32. package/dist/{internal-stop-review-CdByyJLc.js → internal-stop-review-CdouacHL.js} +2 -2
  33. package/dist/{internal-stop-review-CdByyJLc.js.map → internal-stop-review-CdouacHL.js.map} +1 -1
  34. package/dist/{internal-worker-guard-BIPN6Rv9.js → internal-worker-guard-Bx-itoP8.js} +2 -2
  35. package/dist/{internal-worker-guard-BIPN6Rv9.js.map → internal-worker-guard-Bx-itoP8.js.map} +1 -1
  36. package/dist/{internal-workspace-header-BKqejstG.js → internal-workspace-header-8WT0iB5K.js} +2 -2
  37. package/dist/{internal-workspace-header-BKqejstG.js.map → internal-workspace-header-8WT0iB5K.js.map} +1 -1
  38. package/dist/lifecycle-C8fOsQke.js +2 -0
  39. package/dist/lifecycle-D4Yc1aap.js +2 -0
  40. package/dist/{lifecycle-SXaWssN9.js → lifecycle-LeSfa7wH.js} +2 -2
  41. package/dist/{lifecycle-SXaWssN9.js.map → lifecycle-LeSfa7wH.js.map} +1 -1
  42. package/dist/{lifecycle-DbM29FLK.js → lifecycle-nuOHfwgj.js} +2 -2
  43. package/dist/{lifecycle-DbM29FLK.js.map → lifecycle-nuOHfwgj.js.map} +1 -1
  44. package/dist/main.js +17 -17
  45. package/dist/{mcp-workspace-header-DRCCWlOi.js → mcp-workspace-header-q34H_4wL.js} +2 -2
  46. package/dist/{mcp-workspace-header-DRCCWlOi.js.map → mcp-workspace-header-q34H_4wL.js.map} +1 -1
  47. package/dist/{models-Dz8d_SnI.js → models-hhJcrZhr.js} +3 -3
  48. package/dist/{models-Dz8d_SnI.js.map → models-hhJcrZhr.js.map} +1 -1
  49. package/dist/{orchestration-BrJwZxMN.js → orchestration-pzbrKkgD.js} +2 -2
  50. package/dist/{orchestration-BrJwZxMN.js.map → orchestration-pzbrKkgD.js.map} +1 -1
  51. package/dist/{paths-D7_SAaIQ.js → paths-BH4J7slC.js} +4 -4
  52. package/dist/{paths-D7_SAaIQ.js.map → paths-BH4J7slC.js.map} +1 -1
  53. package/dist/paths-DJZoXfAS.js +2 -0
  54. package/dist/{peer-mcp-personas-B5Wp6wIn.js → peer-mcp-personas-CHbl6MwM.js} +927 -147
  55. package/dist/peer-mcp-personas-CHbl6MwM.js.map +1 -0
  56. package/dist/{plan-review-hook-CVZsG9MZ.js → plan-review-hook-CfcanA7_.js} +3 -3
  57. package/dist/{plan-review-hook-CVZsG9MZ.js.map → plan-review-hook-CfcanA7_.js.map} +1 -1
  58. package/dist/{prompt-submit-hook-BW92FX2D.js → prompt-submit-hook-Bqf9ORgb.js} +3 -3
  59. package/dist/{prompt-submit-hook-BW92FX2D.js.map → prompt-submit-hook-Bqf9ORgb.js.map} +1 -1
  60. package/dist/{provision-CUqPki1z.js → provision-BYFd9nPK.js} +4 -4
  61. package/dist/{provision-CUqPki1z.js.map → provision-BYFd9nPK.js.map} +1 -1
  62. package/dist/{self-invocation-CP_SOkrr.js → self-invocation-DhO1Z8iD.js} +2 -2
  63. package/dist/{self-invocation-CP_SOkrr.js.map → self-invocation-DhO1Z8iD.js.map} +1 -1
  64. package/dist/{serve-BASqoXb3.js → serve-BWMxDLnD.js} +12 -12
  65. package/dist/{serve-BASqoXb3.js.map → serve-BWMxDLnD.js.map} +1 -1
  66. package/dist/{server-setup-D5hilphf.js → server-setup-CqlaZukJ.js} +852 -160
  67. package/dist/server-setup-CqlaZukJ.js.map +1 -0
  68. package/dist/{start-Rfim4TeF.js → start-5MgGT4IF.js} +3 -3
  69. package/dist/{start-Rfim4TeF.js.map → start-5MgGT4IF.js.map} +1 -1
  70. package/dist/{stop-gate-hook-DriRc9xN.js → stop-gate-hook-BiBp5aGm.js} +3 -3
  71. package/dist/{stop-gate-hook-DriRc9xN.js.map → stop-gate-hook-BiBp5aGm.js.map} +1 -1
  72. package/dist/{stop-gate-policy-DMPanpoR.js → stop-gate-policy-BGd6b5hR.js} +2 -2
  73. package/dist/{stop-gate-policy-DMPanpoR.js.map → stop-gate-policy-BGd6b5hR.js.map} +1 -1
  74. package/dist/{token-BGCjZwtj.js → token-8drORhXg.js} +33 -3
  75. package/dist/token-8drORhXg.js.map +1 -0
  76. package/dist/{worker-dispatch-BCTMyNE-.js → worker-dispatch-D5fGroNr.js} +2 -2
  77. package/dist/{worker-dispatch-BCTMyNE-.js.map → worker-dispatch-D5fGroNr.js.map} +1 -1
  78. package/package.json +2 -1
  79. package/dist/attribution-settings-CofaqSzw.js.map +0 -1
  80. package/dist/claude-CoZKRNB8.js.map +0 -1
  81. package/dist/engine-B5nVGH4b.js +0 -2
  82. package/dist/lifecycle-BTodQvn4.js +0 -2
  83. package/dist/lifecycle-C7JYNz-F.js +0 -2
  84. package/dist/paths-CTr59UC6.js +0 -2
  85. package/dist/peer-mcp-personas-B5Wp6wIn.js.map +0 -1
  86. package/dist/server-setup-D5hilphf.js.map +0 -1
  87. package/dist/token-BGCjZwtj.js.map +0 -1
@@ -1,9 +1,10 @@
1
- import { Bt as CONDENSED_OPERATING_SEQUENCE, Vt as DEFINITION_OF_GREATNESS, c as personasFor, i as buildAgentPrompt, n as MCP_GROUPS, on as withOneMSuffix, t as GROUP_META } from "./peer-mcp-personas-B5Wp6wIn.js";
2
- import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-D7_SAaIQ.js";
3
- import "./self-invocation-CP_SOkrr.js";
4
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-CUqPki1z.js";
5
- import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-DRCCWlOi.js";
6
- import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-BCTMyNE-.js";
1
+ import { $t as CONDENSED_OPERATING_SEQUENCE, Sn as withOneMSuffix, a as buildAgentPrompt, en as DEFINITION_OF_GREATNESS, l as personasFor, n as MCP_GROUPS, t as GROUP_META, xn as oneMContextDisabled } from "./peer-mcp-personas-CHbl6MwM.js";
2
+ import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, t as PATHS } from "./paths-BH4J7slC.js";
3
+ import { f as LUNA_IMPLEMENTER_ALIAS_ID, p as LUNA_SCOUT_ALIAS_ID } from "./server-setup-CqlaZukJ.js";
4
+ import "./self-invocation-DhO1Z8iD.js";
5
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BYFd9nPK.js";
6
+ import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-q34H_4wL.js";
7
+ import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-D5fGroNr.js";
7
8
  import consola from "consola";
8
9
  import path from "node:path";
9
10
  import { randomBytes } from "node:crypto";
@@ -267,6 +268,67 @@ function readOnlyToolAllowlist(searchKey) {
267
268
  `mcp__${searchKey}__*`
268
269
  ];
269
270
  }
271
+ function decorateGuaranteedOneM(id) {
272
+ if (oneMContextDisabled() || /\[1m\]$/i.test(id)) return id;
273
+ return `${id}[1m]`;
274
+ }
275
+ /** Build the literal `-m fast` native roster. This is intentionally separate
276
+ * from the standard definitions: the names overlap, but their role bodies,
277
+ * fixed model assignments, and efforts are profile contracts. */
278
+ function buildFastProfileAgentDefinitions(opts) {
279
+ const scoutModel = nonEmptyModel(opts.scoutModel);
280
+ const implementerModel = nonEmptyModel(opts.nativeSubagentModel);
281
+ const reviewerModel = nonEmptyModel(opts.reviewerModel);
282
+ const plannerModel = nonEmptyModel(opts.plannerModel);
283
+ if (!scoutModel || !implementerModel || !reviewerModel || !plannerModel) throw new Error("fast profile requires resolved scout, implementer, reviewer, and planner models");
284
+ const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
285
+ const peersKey = peersKeyOf(opts.groupKeys);
286
+ const searchMcp = opts.serverUrl ? { mcpServers: { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } } : {};
287
+ const peersMcp = opts.serverUrl && opts.groupKeys.peers ? { mcpServers: { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } } : {};
288
+ const oracleTool = opts.groupKeys.peers ? `mcp__${peersKey}__oracle` : void 0;
289
+ const readOnlyTools = readOnlyToolAllowlist(searchKey);
290
+ const consultTools = oracleTool ? [...readOnlyTools, oracleTool] : readOnlyTools;
291
+ const reviewerPrompt = "You are the fast profile's repository-aware reviewer. Verify what is actually true by reading the code and running the relevant build, tests, or end-to-end reproduction. Find root causes rather than symptoms. Do not modify production code. Report severity-ranked findings with `file:line` evidence and a clear go/no-go. Use Oracle only as a last resort after your own investigation and Advisor have not resolved one precise question. " + fileToolSteer("builds and reproductions") + " Do not spawn further agents.";
292
+ const out = {
293
+ scout: {
294
+ description: `Read-only exploration subagent running ${scoutModel}. Use for broad repository discovery before the lead drafts a plan; return conclusions with file:line evidence, not file dumps.`,
295
+ prompt: "Investigate the repository read-only. Cast a wide net, then return a concise evidence packet for the lead: conclusions, load-bearing `file:line` citations, commands checked, and explicit gaps. Do not plan, edit, or spawn agents. " + readOnlyToolSteer(),
296
+ tools: readOnlyTools,
297
+ model: decorateGuaranteedOneM(LUNA_SCOUT_ALIAS_ID),
298
+ effort: opts.scoutEffort ?? "high",
299
+ ...searchMcp
300
+ },
301
+ implementer: {
302
+ description: `Implementation subagent running ${implementerModel}. Use for well-specified mechanical changes after the plan is approved; implement and verify end to end in its own context.`,
303
+ prompt: "Implement the approved, well-specified change surgically. Match surrounding style, minimize unrelated churn, use dedicated file tools, and run the relevant build/tests. Do not redesign the plan or spawn more agents. Report changes, verification, and unresolved risk. " + fileToolSteer("builds"),
304
+ model: decorateGuaranteedOneM(LUNA_IMPLEMENTER_ALIAS_ID),
305
+ effort: opts.implementerEffort ?? "max"
306
+ },
307
+ reviewer: {
308
+ description: `Repository-aware reviewer running ${reviewerModel} at medium effort. Use after implementation or for failures that need reproduction, runtime checks, or repository context.`,
309
+ prompt: reviewerPrompt,
310
+ model: reviewerModel,
311
+ effort: opts.reviewerEffort ?? "medium",
312
+ ...peersMcp
313
+ },
314
+ planner: {
315
+ description: `Plan consultant and approver running ${plannerModel}. Invoke only after Luna has done the repository legwork and drafted a plan; pass a handcrafted evidence packet and the complete draft. The lead must not implement until this agent returns APPROVE.`,
316
+ prompt: "You are the fast profile's final plan consultant and approver, not a first-pass planner. The caller must provide the user goal, acceptance criteria, repository/domain constraints, Luna's `file:line` and command/test evidence, the complete draft plan, settled decisions, and one focused review question. Selectively verify disputed citations or narrow evidence gaps with read/search tools, but do not repeat broad discovery, edit files, or execute the plan. Return exactly one leading verdict: `APPROVE`, `REVISE`, or `NEED_MORE_CONTEXT`. APPROVE only when the plan is safe, ordered, complete, and verifiable. REVISE must give concrete corrections. NEED_MORE_CONTEXT must name the exact evidence Luna should collect. Use Oracle only as a last resort for one precise unresolved question after your own review and Advisor are insufficient. Do not spawn further agents. " + readOnlyToolSteer(),
317
+ tools: consultTools,
318
+ model: decorateGuaranteedOneM(plannerModel),
319
+ effort: opts.plannerEffort ?? "high",
320
+ mcpServers: {
321
+ ...searchMcp.mcpServers ?? {},
322
+ ...peersMcp.mcpServers ?? {}
323
+ }
324
+ }
325
+ };
326
+ const roster = opts.nativeRoster == null ? void 0 : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
327
+ if (roster) {
328
+ for (const name of Object.keys(out)) if (!roster.has(name)) delete out[name];
329
+ }
330
+ return out;
331
+ }
270
332
  /**
271
333
  * Build the JSON payload for `claude --agents <path>`.
272
334
  *
@@ -277,11 +339,13 @@ function readOnlyToolAllowlist(searchKey) {
277
339
  * per Phase 2A of the peer-MCP plan.
278
340
  */
279
341
  function buildPeerAgentDefinitions(opts) {
342
+ if (opts.fastProfile) return buildFastProfileAgentDefinitions(opts);
280
343
  const out = {};
281
- const personas = personasFor({
344
+ const personas = opts.fastProfile ? [] : personasFor({
282
345
  codexCli: opts.codexCli,
283
346
  geminiAvailable: opts.geminiAvailable,
284
- geminiModel: opts.geminiModel
347
+ geminiModel: opts.geminiModel,
348
+ agentAllowlist: opts.personaAllowlist
285
349
  });
286
350
  const peersKey = peersKeyOf(opts.groupKeys);
287
351
  const peersMcp = opts.serverUrl ? { mcpServers: { [peersKey]: httpEntryFor(opts.serverUrl, "peers", opts.nonce, opts.workspaceHeaderCmd) } } : {};
@@ -293,13 +357,15 @@ function buildPeerAgentDefinitions(opts) {
293
357
  }),
294
358
  ...peersMcp
295
359
  };
296
- out["peer-review-coordinator"] = {
360
+ if (opts.includeCoordinator !== false) out["peer-review-coordinator"] = {
297
361
  ...buildCoordinatorAgent({
298
362
  codexCli: opts.codexCli,
299
363
  geminiAvailable: opts.geminiAvailable
300
364
  }),
301
365
  ...peersMcp
302
366
  };
367
+ const rosterSet = opts.nativeRoster == null ? void 0 : opts.nativeRoster instanceof Set ? opts.nativeRoster : new Set(opts.nativeRoster);
368
+ const rosterAllows = (name) => !rosterSet || rosterSet.has(name);
303
369
  const nativeModel = nonEmptyModel(opts.nativeSubagentModel);
304
370
  const reviewerModel = nonEmptyModel(opts.reviewerModel);
305
371
  const reviewerFastModel = nonEmptyModel(opts.reviewerFastModel);
@@ -308,51 +374,59 @@ function buildPeerAgentDefinitions(opts) {
308
374
  const scribeModel = nonEmptyModel(opts.scribeModel);
309
375
  const implementerFastModel = nonEmptyModel(opts.implementerFastModel);
310
376
  const generalPurposeFastModel = nonEmptyModel(opts.generalPurposeFastModel);
377
+ const hasImplementer = rosterAllows("implementer");
378
+ const hasReviewer = rosterAllows("reviewer");
311
379
  const modelField = nativeModel ? { model: withOneMSuffix(nativeModel) } : {};
312
380
  const searchKey = opts.groupKeys.search ?? GROUP_META.search.preferredKey;
313
381
  const searchMcp = opts.serverUrl ? { mcpServers: { [searchKey]: httpEntryFor(opts.serverUrl, "search", opts.nonce, opts.workspaceHeaderCmd) } } : {};
314
- out.implementer = {
382
+ if (rosterAllows("implementer")) out.implementer = {
315
383
  description: nativeModel ? `Bounded implementation subagent running ${nativeModel} (strong non-Claude coder, maximum reasoning). Use proactively for coding changes that need judgment or have ambiguous scope — edits, features, fixes — to keep the lead's context focused; use implementer-fast instead for well-specified, mechanical changes. Runs in its own context. Model is overridable at spawn.` : `Bounded implementation subagent (native tools, runs on the lead's model in its own context). Use proactively for coding changes that need judgment or have ambiguous scope — edits, features, fixes — to keep the lead's context focused; use implementer-fast instead for well-specified, mechanical changes. Model is overridable at spawn.`,
316
384
  prompt: "You are a bounded implementation subagent for well-scoped coding tasks. Implement the requested change surgically, matching the surrounding code style and minimizing unrelated churn. " + fileToolSteer("builds") + " Verify with the project's build or tests where applicable. Do the work yourself — do not spawn further subagents. Report exactly what changed and any risks.",
317
385
  ...modelField
318
386
  };
319
387
  const reviewerPrompt = "You are a feedback subagent. Your job is to tell the caller what is actually true about the artifact you are given — code, a plan, a document, a failure report — and what is wrong with it. Verify against the ACTUAL code by reading it; never assume. Do whatever the assessment requires: reproduce a failure end to end as close to how a real user hits it as you can, form hypotheses and test them against the code and runtime, and isolate the true root cause rather than a symptom. Where the change warrants it, author tests that try to BREAK the implementation (edge cases, error paths, and the acceptance criteria as executable checks), run them, and report which pass and which fail; do NOT modify production code just to make tests pass. " + fileToolSteer("builds") + " Do the work yourself — do not spawn further subagents. Report severity-ranked findings with `file:line` citations, the evidence behind each, and end with a clear go/no-go.";
320
- out.reviewer = {
388
+ if (rosterAllows("reviewer")) out.reviewer = {
321
389
  description: reviewerModel ? `Feedback subagent running ${reviewerModel}, a DIFFERENT lab from both the lead and the implementer, so its blind spots are decorrelated from whoever produced the work. Use proactively when something already exists and you want it assessed: a diff, a plan, a document, a failing test. Unlike the stateless peer critics, it reads the repo and can RUN things, so prefer it whenever the assessment needs execution or repo context (reproduce a failure, run the suite, bisect); prefer a peer critic when you already hold the artifact and want a fresh-context opinion on it. It can also REVIEW SCREENSHOTS and other images: just point it at the file and it will look at them. Model is overridable at spawn.` : `Feedback subagent (native tools, runs on the lead's model in its own context). Use proactively when something already exists and you want it assessed: a diff, a plan, a document, a failing test. Unlike the stateless peer critics, it reads the repo and can RUN things, so prefer it whenever the assessment needs execution or repo context; prefer a peer critic when you already hold the artifact and want a fresh-context opinion on it. Model is overridable at spawn.`,
322
390
  prompt: reviewerPrompt,
323
391
  ...reviewerModel ? { model: withOneMSuffix(reviewerModel) } : {}
324
392
  };
325
- if (reviewerFastModel) out["reviewer-fast"] = {
326
- description: `Cheaper feedback subagent running ${reviewerFastModel} (1M context, typically faster than the pro-tier reviewer and cross-lab from the OpenAI-backed implementer). Use for lower-stakes assessments that still need repository access or execution; escalate higher-stakes review to reviewer. Full toolset, so it can read the repo and run builds, tests, and reproductions in its own context. Model is overridable at spawn.`,
327
- prompt: reviewerPrompt,
328
- model: withOneMSuffix(reviewerFastModel)
329
- };
330
- out.brainstorm = {
393
+ if (reviewerFastModel && rosterAllows("reviewer-fast")) {
394
+ const isGrok = reviewerFastModel === "grok-4.6";
395
+ out["reviewer-fast"] = {
396
+ description: `Cheaper feedback subagent running ${reviewerFastModel} (${isGrok ? "500K total context, 372K max prompt" : "1M context"}${isGrok ? "" : ", typically faster than the pro-tier reviewer"}${!isGrok && hasImplementer ? " and cross-lab from the OpenAI-backed implementer" : ""}). ${hasReviewer ? "Use for lower-stakes assessments that still need repository access or execution; escalate higher-stakes review to reviewer." : "Use for lower-stakes assessments that still need repository access or execution."} Full toolset, so it can read the repo and run builds, tests, and reproductions in its own context. Model is overridable at spawn.`,
397
+ prompt: reviewerPrompt,
398
+ model: withOneMSuffix(reviewerFastModel),
399
+ ...opts.reviewerFastEffort ? { effort: opts.reviewerFastEffort } : {}
400
+ };
401
+ }
402
+ if (rosterAllows("brainstorm")) out.brainstorm = {
331
403
  description: brainstormModel ? `Divergent-options subagent running ${brainstormModel} (third lab, for approaches the lead would not generate). Use proactively BEFORE an approach is chosen. Pass the decision, the constraints, what you have already ruled out, and the cost of being wrong; pass your current leading approach too if you have one, and it will try to beat it rather than restate it. Read-only; it proposes, then hands off to implementer. Model is overridable at spawn.` : `Divergent-options subagent (runs on the lead's model in its own context). Use proactively BEFORE an approach is chosen. Pass the decision, the constraints, what you have already ruled out, and the cost of being wrong; pass your current leading approach too if you have one, and it will try to beat it rather than restate it. Read-only; it proposes, then hands off to implementer. Model is overridable at spawn.`,
332
404
  prompt: "You are a divergent-options subagent: the lead's sounding board while an approach is still open. Your job is to surface the option the lead would not have reached on its own. If the caller states its current leading approach, your job is to try to beat it, and you close with one verdict: `replace`, `retain`, or `insufficient evidence`. `replace` requires naming a concrete alternative that dominates it and the evidence that decides between them. `retain` is a real answer and a useful one: say it plainly when the approach survives a genuine attempt to beat it. Manufactured disagreement is as useless as agreement; do neither. If the caller states no leading approach, generate independently and let the lead compare. Return 3 to 5 approaches that differ in MECHANISM, not in phrasing. For each: how it works, what it costs, what would have to be true for it to be the right answer, and the failure mode that would kill it. Near-duplicate options are the failure mode to avoid — if only one real approach exists, say so plainly and explain why the alternatives are dead, because one honest option beats four padded ones. Screen EVERY candidate against this repository and this environment before you rank them, then verify the one you are about to recommend can actually run here: read the code path it depends on, the guard that would refuse it, the artifact it assumes exists. A recommendation that cannot execute is worse than no recommendation. If checking kills your front-runner, rerank and say so. Ground every option in what the repository actually contains, and prefer reusing what is already there over inventing something new. " + readOnlyToolSteer() + " Do the work yourself — do not spawn further subagents.",
333
405
  tools: readOnlyToolAllowlist(searchKey),
334
406
  ...brainstormModel ? { model: withOneMSuffix(brainstormModel) } : {},
335
407
  ...searchMcp
336
408
  };
337
- if (scoutModel) out.scout = {
409
+ if (scoutModel && rosterAllows("scout")) out.scout = {
338
410
  description: `Read-only exploration subagent running ${scoutModel} (fast and cheap, so repository lookups do not run at the lead's model rates). Use proactively to find or understand something in the codebase: it sweeps widely and returns conclusions with file:line references rather than file dumps. Model is overridable at spawn.`,
339
411
  prompt: "You are a read-only exploration subagent. Answer the question by investigating the repository: cast a wide net, then narrow. Return the conclusion, not the raw material — cite `file:line` for anything load-bearing and quote only the lines that matter. If the answer is that something does not exist, say so explicitly and describe where you looked. " + readOnlyToolSteer() + " Do the work yourself — do not spawn further subagents.",
340
412
  tools: readOnlyToolAllowlist(searchKey),
341
413
  model: withOneMSuffix(scoutModel),
414
+ ...opts.scoutEffort ? { effort: opts.scoutEffort } : {},
342
415
  ...searchMcp
343
416
  };
344
- out.scribe = {
417
+ if (rosterAllows("scribe")) out.scribe = {
345
418
  description: scribeModel ? `Documentation subagent running ${scribeModel} (the mid tier: documentation is verifiable prose, not frontier reasoning). Use proactively for prose that trails the code: docs, ADRs, CLAUDE.md sections, changelog entries, and README updates that have gone stale. Keeps low-glamour upkeep off the lead's context. Model is overridable at spawn.` : `Documentation subagent (runs on the lead's model in its own context). Use proactively for prose that trails the code: docs, ADRs, CLAUDE.md sections, changelog entries, and README updates that have gone stale. Model is overridable at spawn.`,
346
419
  prompt: "You are a documentation subagent. Write and maintain the prose that trails the code: docs, ADRs, CLAUDE.md sections, changelog entries, README rows. Read the code before describing it — every claim you write must be checkable against the repository as it is now, not as a summary said it was. Match the surrounding document's voice, structure, and level of detail. Prefer updating an existing document over adding a new one, and delete what has become false rather than layering a correction on top of it. " + fileToolSteer("builds") + " Do the work yourself — do not spawn further subagents. Report which documents changed and any claim you could not verify.",
347
420
  ...scribeModel ? { model: withOneMSuffix(scribeModel) } : {}
348
421
  };
349
422
  const genericPromptFor = (role) => `You are a general-purpose subagent handling ${role} the lead has delegated to keep its own context free. Work out what the task actually requires, then do it end to end. Verify against the real repository and the real runtime rather than assuming — read the code, run the command, check the exit code. ` + fileToolSteer("builds") + " Do the work yourself — do not spawn further subagents. Report what you did, what you verified, and anything you could not settle.";
350
- if (implementerFastModel) out["implementer-fast"] = {
351
- description: `Implementation subagent running ${implementerFastModel} (1M context, ${implementerFastModel === "gpt-5.6-terra" ? "the cheaper, faster implementation tier" : "a non-lead implementation model"}). Use proactively for well-specified, mechanical coding changes; use implementer instead when the change needs judgment or its scope is ambiguous. Full toolset, so it can implement and verify the change end to end in its own context. Model is overridable at spawn.`,
423
+ if (implementerFastModel && rosterAllows("implementer-fast")) out["implementer-fast"] = {
424
+ description: `Implementation subagent running ${implementerFastModel} (1M context, ${implementerFastModel === "gpt-5.6-terra" ? "the cheaper, faster implementation tier" : implementerFastModel === "gpt-5.6-luna" ? "the fast, low-cost tier for this launch profile" : "a non-lead implementation model"}). Use proactively for well-specified, mechanical coding changes${hasImplementer ? "; use implementer instead when the change needs judgment or its scope is ambiguous" : ""}. Full toolset, so it can implement and verify the change end to end in its own context. Model is overridable at spawn.`,
352
425
  prompt: genericPromptFor("a well-specified, mechanical coding change"),
353
- model: withOneMSuffix(implementerFastModel)
426
+ model: withOneMSuffix(implementerFastModel),
427
+ ...opts.implementerFastEffort ? { effort: opts.implementerFastEffort } : {}
354
428
  };
355
- if (generalPurposeFastModel) out["general-purpose-fast"] = {
429
+ if (generalPurposeFastModel && rosterAllows("general-purpose-fast")) out["general-purpose-fast"] = {
356
430
  description: `Catch-all subagent running ${generalPurposeFastModel} (1.05M context, the lowest-cost model in the catalog and the fastest measured catch-all candidate, with the full reasoning-effort ladder). Use proactively for work no specialist fits when a fast, economical non-lead model can finish it. Full toolset, so it can complete the work rather than only research it. Runs in its own context. Model is overridable at spawn.`,
357
431
  prompt: genericPromptFor("work no specialist fits"),
358
432
  model: withOneMSuffix(generalPurposeFastModel)
@@ -459,6 +533,7 @@ function buildAgentMd(spec) {
459
533
  `description: ${escapeYamlString(spec.description)}`
460
534
  ];
461
535
  if (spec.model) lines.push(`model: ${escapeYamlString(spec.model)}`);
536
+ if (spec.effort) lines.push(`effort: ${escapeYamlString(spec.effort)}`);
462
537
  if (spec.tools && spec.tools.length > 0) lines.push(`tools: [${spec.tools.map((t) => JSON.stringify(t)).join(", ")}]`);
463
538
  if (spec.mcpServers && Object.keys(spec.mcpServers).length > 0) lines.push(...emitMcpServersYaml(spec.mcpServers));
464
539
  lines.push("---", "", spec.prompt, "");
@@ -495,6 +570,7 @@ async function writePeerAgentMdFiles(agents, opts) {
495
570
  description: def.description,
496
571
  prompt: def.prompt,
497
572
  model: def.model,
573
+ effort: def.effort,
498
574
  tools: def.tools,
499
575
  mcpServers: def.mcpServers
500
576
  }));
@@ -702,6 +778,17 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
702
778
  scribeModel: opts.scribeModel,
703
779
  implementerFastModel: opts.implementerFastModel,
704
780
  generalPurposeFastModel: opts.generalPurposeFastModel,
781
+ nativeRoster: opts.nativeRoster,
782
+ personaAllowlist: opts.personaAllowlist,
783
+ includeCoordinator: opts.includeCoordinator,
784
+ scoutEffort: opts.scoutEffort,
785
+ implementerFastEffort: opts.implementerFastEffort,
786
+ reviewerFastEffort: opts.reviewerFastEffort,
787
+ fastProfile: opts.fastProfile,
788
+ plannerModel: opts.plannerModel,
789
+ implementerEffort: opts.implementerEffort,
790
+ reviewerEffort: opts.reviewerEffort,
791
+ plannerEffort: opts.plannerEffort,
705
792
  nonce,
706
793
  codexHome,
707
794
  serverUrl,
@@ -718,10 +805,11 @@ async function writePeerMcpRuntimeFiles(serverUrl, opts) {
718
805
  agentsDir: opts.agentsDir,
719
806
  fileSuffix
720
807
  });
721
- const personas = personasFor({
808
+ const personas = opts.fastProfile ? [] : personasFor({
722
809
  codexCli: opts.codexCli,
723
810
  geminiAvailable: opts.geminiAvailable,
724
- geminiModel: opts.geminiModel
811
+ geminiModel: opts.geminiModel,
812
+ agentAllowlist: opts.personaAllowlist
725
813
  });
726
814
  const cleanup = async () => {
727
815
  await Promise.allSettled([
@@ -1791,6 +1879,12 @@ function joinClauses(parts) {
1791
1879
  * there is no quality-for-cost trade being hidden by leading with the cheap
1792
1880
  * tier; reserve `reviewer` for the higher-stakes assessment it is there for. */
1793
1881
  function buildNativeReachClauses(opts) {
1882
+ if (opts.profile === "fast") return joinClauses([
1883
+ "`scout` to find or understand something in the repo",
1884
+ "`implementer` for approved mechanical coding changes",
1885
+ "`reviewer` for repository-aware verification, reproduction, and root-causing",
1886
+ "`planner` as the Sol plan consultant and approver after Luna has drafted with evidence"
1887
+ ]);
1794
1888
  const clauses = [];
1795
1889
  const implementerFast = opts.implementerFastAvailable !== false;
1796
1890
  const reviewerFast = opts.reviewerFastAvailable !== false;
@@ -1810,15 +1904,11 @@ function buildNativeReachClauses(opts) {
1810
1904
  if (opts.generalPurposeFastAvailable !== false) clauses.push(opts.budgetLead === true ? "`general-purpose-fast` for work no specialist fits, in preference to carrying it inline yourself" : "`general-purpose-fast` for work no specialist fits");
1811
1905
  return joinClauses(clauses);
1812
1906
  }
1813
- /**
1814
- * Build the operating-defaults directive for one launch, naming only the
1815
- * natives that launch actually emitted.
1816
- *
1817
- * Callers must pass the SAME availability booleans they used for the `.md`
1818
- * generation and `buildPeerAwarenessSnippet`, so the three surfaces cannot
1819
- * disagree about which agents exist.
1820
- */
1821
1907
  function buildOperatingDefaultsDirective(opts = {}) {
1908
+ if (opts.profile === "fast") {
1909
+ 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.";
1910
+ 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 the transcript-aware brainstorming, sounding-board, fresh-look, uncertainty, and stuck path. `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.";
1911
+ }
1822
1912
  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, review, and large reads to the right subagent, worker, or model. Reach for " + buildNativeReachClauses(opts) + "; worker-* agents for background non-blocking runs; Task subagents for parallel work; peer critics for review. That keeps your own context free to reason and collaborate with the user. Launch independent agents concurrently in a single message rather than serially. Delegation pays when the work is WIDE (many files or sources to sweep) or SLOW, and you need only the conclusion: the main thread is where you think with and respond to the user, and its context window is a finite shared resource. It does NOT pay merely because a sub-question is separable. A narrow, deep question whose whole value is file:line fidelity loses exactly that through a summarization layer, and a sub-question you could answer in one command is cheaper done directly than paying a subagent's startup. Do trivial, surgical, and last-mile work yourself. A named teammate persists after it reports so you can send it follow-ups, and nothing reaps it for you: its idle notice means available, not finished. Stop it once you are done with it.\n\nAdversarial review. The peer critics (`codex_critic` and `codex_reviewer`, `gemini_critic` and `gemini_reviewer`, `opus_critic`, and the `peer-review-coordinator` that fans out to several of them) are fresh-context models, so what they add is a blind spot that whoever produced the work cannot reach by thinking harder about it; prefer a critic from a different lab than the producer, since blind spots correlate within a lab. The `advisor` is a complement and not a substitute: it sees your transcript, so it catches your own drift and momentum, but it inherits your framing, which is exactly what a fresh-context critic does not. They earn their keep on consequential design choices, recommendations, and hard-to-reverse decisions: the cases where plausible alternatives remain and the conclusion rests on judgment rather than on something you can verify directly. That is where confabulation hides, so budget the wait even under delivery pressure. Always consult one when the change touches auth, user input, database queries, crypto, or serialization. They do NOT pay for read-only tracing, ordinary repository lookup, or a conclusion that a focused test, a direct reproduction, or unambiguous code evidence already settles. Asking a critic to re-derive a proven fact returns a confident answer either way, which is ritual skepticism rather than review, and skipping them there is the right call and not a shortcut. Match the lens to the artifact: a strategic critic for plans and trade-offs, a code reviewer for a concrete diff, the coordinator only when the risk warrants several independent lenses. Give whichever you pick the artifact and the constraints and not your rationale, since justification anchors the review and dulls it.\n\nAim high. Default to radical simplicity and a relentless focus on the user's real experience: design for the person and the job to be done, not the demo. Reason about the whole system from first principles, anticipating scale and the long arc rather than patching the surface. Work backwards from the outcome the user actually needs. Question every assumption and prefer what you can derive, reproduce, or test.\n\nEngineering excellence. When making technical decisions, give little weight to development cost; prefer quality, simplicity, robustness, scalability, and long-term maintainability. Fix a bug by first reproducing it end to end, as close to how a real user hits it as you can, so you solve the real problem and not a symptom. When testing a product end to end, be picky about the UI and obsessed with pixel perfection: if something clearly looks off, even when it is unrelated to your task, get it fixed along the way. Hold that same bar for the codebase itself: a lint error, a failing test, or a flaky test is worth fixing the moment you see it, whoever introduced it. Fold it into your current work rather than letting it derail the task the user actually asked for.";
1823
1913
  }
1824
1914
  /** The all-available form of the directive. Prefer
@@ -2386,4 +2476,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
2386
2476
  //#endregion
2387
2477
  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 };
2388
2478
 
2389
- //# sourceMappingURL=attribution-settings-CofaqSzw.js.map
2479
+ //# sourceMappingURL=attribution-settings-CpLUCi8R.js.map