github-router 0.3.352 → 0.3.354

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 (72) hide show
  1. package/README.md +1 -38
  2. package/dist/ado-tools-CN4i9OVl.js +1 -0
  3. package/dist/{aic-statusline-settings-LnoxjBPe.js → aic-statusline-settings-EdsV1gzY.js} +6 -4
  4. package/dist/aic-statusline-settings-EdsV1gzY.js.map +1 -0
  5. package/dist/{attribution-settings-ul6VU6iP.js → attribution-settings-8Uv97n9j.js} +51 -39
  6. package/dist/{attribution-settings-ul6VU6iP.js.map → attribution-settings-8Uv97n9j.js.map} +1 -1
  7. package/dist/balanced-profile-contract-DtnTIBjL.js +105 -0
  8. package/dist/balanced-profile-contract-DtnTIBjL.js.map +1 -0
  9. package/dist/browser-ext/manifest.json +1 -1
  10. package/dist/{claude-xO1XW-Nn.js → claude-C_1OM7ce.js} +68 -59
  11. package/dist/claude-C_1OM7ce.js.map +1 -0
  12. package/dist/{claude-md-injection-BoXOsg7h.js → claude-md-injection-CDOoGNEJ.js} +20 -15
  13. package/dist/claude-md-injection-CDOoGNEJ.js.map +1 -0
  14. package/dist/{codex-DzUR40JA.js → codex-5eTmciDG.js} +5 -5
  15. package/dist/{codex-DzUR40JA.js.map → codex-5eTmciDG.js.map} +1 -1
  16. package/dist/{copilot-discount-C3jfysK-.js → copilot-discount-kpOLluHm.js} +3 -1
  17. package/dist/copilot-discount-kpOLluHm.js.map +1 -0
  18. package/dist/engine-CIAopp0h.js +1 -0
  19. package/dist/fast-profile-contract-JOnZBgFB.js +61 -0
  20. package/dist/fast-profile-contract-JOnZBgFB.js.map +1 -0
  21. package/dist/{gate-discovery-Cvdko01z.js → gate-discovery-CqJVzT_D.js} +2 -2
  22. package/dist/{gate-discovery-Cvdko01z.js.map → gate-discovery-CqJVzT_D.js.map} +1 -1
  23. package/dist/hooks.mjs +193 -12
  24. package/dist/hooks.sha256 +1 -1
  25. package/dist/{internal-aic-status-Dmi2bCsR.js → internal-aic-status-wYPsCG4r.js} +2 -2
  26. package/dist/{internal-aic-status-Dmi2bCsR.js.map → internal-aic-status-wYPsCG4r.js.map} +1 -1
  27. package/dist/{internal-fast-dispatch-guard-Cv7zf0ZI.js → internal-fast-dispatch-guard-A8teEib4.js} +1 -1
  28. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js → internal-fast-dispatch-guard-D_TCtJhQ.js} +3 -2
  29. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js.map → internal-fast-dispatch-guard-D_TCtJhQ.js.map} +1 -1
  30. package/dist/{internal-max-dispatch-guard-T-M7DRIW.js → internal-max-dispatch-guard-BM_B15EH.js} +1 -1
  31. package/dist/{internal-max-dispatch-guard-DkJixDmG.js → internal-max-dispatch-guard-D7ByWH4v.js} +2 -2
  32. package/dist/{internal-max-dispatch-guard-DkJixDmG.js.map → internal-max-dispatch-guard-D7ByWH4v.js.map} +1 -1
  33. package/dist/{internal-prompt-submit-B9MJxc3K.js → internal-prompt-submit-C77GnEaW.js} +3 -3
  34. package/dist/internal-prompt-submit-C77GnEaW.js.map +1 -0
  35. package/dist/{internal-prompt-submit-6OXEdQCK.js → internal-prompt-submit-CDTwamkW.js} +2 -2
  36. package/dist/{internal-rebrief-zIdunX3R.js → internal-rebrief-DZygfGHp.js} +6 -6
  37. package/dist/internal-rebrief-DZygfGHp.js.map +1 -0
  38. package/dist/{internal-stop-hook-DGcRVh_2.js → internal-stop-hook-Dn_AF0BF.js} +2 -2
  39. package/dist/{internal-stop-hook-DGcRVh_2.js.map → internal-stop-hook-Dn_AF0BF.js.map} +1 -1
  40. package/dist/main.js +11 -11
  41. package/dist/{max-profile-contract-DQDEDCsR.js → max-profile-contract-CMvzKSsg.js} +2 -2
  42. package/dist/max-profile-contract-CMvzKSsg.js.map +1 -0
  43. package/dist/{peer-mcp-personas-DDMKRFFG.js → peer-mcp-personas-DlF1dKCs.js} +142 -165
  44. package/dist/peer-mcp-personas-DlF1dKCs.js.map +1 -0
  45. package/dist/{pi-jVNeQXWf.js → pi-2m2IgZlm.js} +61 -62
  46. package/dist/pi-2m2IgZlm.js.map +1 -0
  47. package/dist/{provision-BtYRtvrj.js → provision-DLGlhu3a.js} +2 -2
  48. package/dist/{provision-BtYRtvrj.js.map → provision-DLGlhu3a.js.map} +1 -1
  49. package/dist/{serve-CmgmxigM.js → serve-8tXHVHOr.js} +7 -7
  50. package/dist/{serve-CmgmxigM.js.map → serve-8tXHVHOr.js.map} +1 -1
  51. package/dist/{server-setup-DinOFWiC.js → server-setup-BBSmse1J.js} +190 -127
  52. package/dist/server-setup-BBSmse1J.js.map +1 -0
  53. package/dist/{start-Dgsaz0HM.js → start-B7jTBpAc.js} +3 -3
  54. package/dist/{start-Dgsaz0HM.js.map → start-B7jTBpAc.js.map} +1 -1
  55. package/dist/{static-context-pack-CyucviRD.js → static-context-pack-BRqt4ajJ.js} +313 -6
  56. package/dist/static-context-pack-BRqt4ajJ.js.map +1 -0
  57. package/package.json +1 -1
  58. package/dist/ado-tools-xbuVU7YN.js +0 -1
  59. package/dist/aic-statusline-settings-LnoxjBPe.js.map +0 -1
  60. package/dist/balanced-profile-contract-XiIj4O1U.js +0 -127
  61. package/dist/balanced-profile-contract-XiIj4O1U.js.map +0 -1
  62. package/dist/claude-md-injection-BoXOsg7h.js.map +0 -1
  63. package/dist/claude-xO1XW-Nn.js.map +0 -1
  64. package/dist/copilot-discount-C3jfysK-.js.map +0 -1
  65. package/dist/engine-DwLIk1Zn.js +0 -1
  66. package/dist/internal-prompt-submit-B9MJxc3K.js.map +0 -1
  67. package/dist/internal-rebrief-zIdunX3R.js.map +0 -1
  68. package/dist/max-profile-contract-DQDEDCsR.js.map +0 -1
  69. package/dist/peer-mcp-personas-DDMKRFFG.js.map +0 -1
  70. package/dist/pi-jVNeQXWf.js.map +0 -1
  71. package/dist/server-setup-DinOFWiC.js.map +0 -1
  72. package/dist/static-context-pack-CyucviRD.js.map +0 -1
package/README.md CHANGED
@@ -101,43 +101,9 @@ Each persona is exposed both as a Claude Code subagent (callable via the `Task`
101
101
 
102
102
  `gemini-critic` and `gemini-reviewer` both register only when `gemini-3.1-pro-preview` (or another `gemini-3.x-pro` model) is present in your Copilot model catalog — `gemini-critic` is the architecture-level critic, `gemini-reviewer` the line-level second-lab code reviewer on the same model at its highest reasoning tier. If absent, both personas are silently dropped from the MCP `tools/list` and the subagent set, and `peer-review-coordinator` skips them in routing decisions.
103
103
 
104
- ### Native subagents
105
-
106
- The launcher also registers focused native subagents that run in their own contexts. `implementer`, `reviewer`, `brainstorm`, and `scribe` are always present. Each uses its preferred model when the live catalog provides one with tool calls, otherwise it inherits the lead model; `scout`, `implementer-fast`, `reviewer-fast`, and `general-purpose-fast` are present only when their cheap-tier model chains resolve, so the work they exist to make cheaper does not silently run at the lead's model rate.
107
-
108
- | Subagent | Use for | Preferred model chain | Tools |
109
- |---|---|---|---|
110
- | `implementer` | Coding changes needing judgment or with ambiguous scope | gpt-5.6-sol → gpt-6-sol → gpt-5.5 | Full inherited toolset |
111
- | `implementer-fast` | Well-specified, mechanical coding changes | gpt-5.6-terra → gemini-3.1-pro-preview | Full inherited toolset |
112
- | `reviewer` | Assessing an existing diff, plan, document, or failure | gemini-3.1-pro-preview → gemini-3.8-flash → OpenAI frontier | Full inherited toolset |
113
- | `reviewer-fast` | Lower-stakes assessment on a cheaper cross-lab model | gemini-3.8-flash | Full inherited toolset |
114
- | `brainstorm` | Divergent approaches before selecting one | gemini-3.1-pro-preview → gemini-3.8-flash → OpenAI frontier | Read-only allowlist |
115
- | `scout` | Low-cost repository exploration | gpt-6-luna → gemini-3.8-flash | Read-only allowlist |
116
- | `scribe` | Documentation that trails the code | gpt-5.6-terra → OpenAI frontier | Full inherited toolset |
117
- | `general-purpose-fast` | Work no specialist fits | gpt-6-luna | Full inherited toolset |
118
-
119
- For codex-side write capability (a `codex-implementer` persona that can mutate files via Codex's tool-use sandbox), pass `--codex-cli`. Requires `codex` CLI 0.129+ on `PATH`; falls back to HTTP-only with a warning if codex is missing or older. Pass `--codex-mcp-only` to also pass `--strict-mcp-config` to Claude Code so only the proxy's MCP servers are loaded (hides any MCP servers in your existing `~/.claude/mcp.json`).
120
-
121
104
  ### Code search (`mcp__search__code`)
122
105
 
123
- Alongside the peer reviewers, the same MCP surface exposes a `code` tool (under the `search` server — `mcp__search__code`) — fast structured code search over the workspace. Without a search flag it uses the local lexical engine. Pass `--search` for router-managed local ColBERT semantic search with transparent lexical fallback, or `--bluebird` to route semantic and lexical modes through the Bluebird Azure DevOps index. Bluebird failures remain visible and never silently fall back locally; `exact`, `regex`, and `ast` always stay local. The flags are independent, so `--bluebird` alone never provisions local ColBERT artifacts. See [local semantic search](docs/semantic-search.md) and the [Bluebird protocol and routing reference](docs/bluebird-search.md).
124
-
125
- ### Azure DevOps and Kusto (`mcp__ado__*`, `mcp__kusto__*`)
126
-
127
- Two further groups follow the same shape, and a git remote that resolves to an
128
- Azure DevOps repository turns on all three of Bluebird, `ado` and `kusto` at
129
- once (`--ado` / `--kusto` force them anywhere; `--no-…` refuses any one of
130
- them). `ado` exposes whatever Microsoft's remote MCP server advertises under
131
- the selected toolsets, **read-only by default** via `X-MCP-Readonly: true`;
132
- `--ado-write` clears the header for an operator who explicitly wants mutations,
133
- and prints a banner line when it does. `kusto` exposes five
134
- read-only tools over an in-repo Azure Data Explorer client, the cluster named on
135
- each call (`--kusto-cluster` only sets a default, and discovery never supplies
136
- one), with read-only
137
- enforced by the service (`x-ms-readonly` plus
138
- `request_readonly_hardline`) rather than by inspecting the query text. Both mint
139
- their own Azure CLI access token, which never reaches a child process. See
140
- [Azure MCP groups](docs/azure-mcp.md).
106
+ Alongside the peer reviewers, the same MCP surface exposes a `code` tool (under the `search` server — `mcp__search__code`) — fast structured code search over the workspace. Without a search flag it uses the local lexical engine. Pass `--search` for router-managed local ColBERT semantic search with transparent lexical fallback; `exact`, `regex`, and `ast` always stay local. See [local semantic search](docs/semantic-search.md).
141
107
 
142
108
  The local lexical engine ranks with **BM25F** (Robertson, Zaragoza, Taylor 2004) over matched lines, context, paths, and symbol definitions, then refines top hits with tree-sitter. Single-identifier queries auto-expand across camelCase / snake_case / kebab-case skeletons so `getUserName` also matches `get_user_name`. `workspace` is any absolute path the proxy process can read, and result paths are repository-relative rather than absolute.
143
109
 
@@ -292,9 +258,6 @@ Fallback chains fire only on the implicit-default path; explicit `-m`/`--model`
292
258
  | `--show-token` | Print tokens to console | false |
293
259
  | `--proxy-env` | Use HTTP_PROXY/HTTPS_PROXY env vars | false |
294
260
  | `--search` | Enable router-managed local ColBERT semantic search with lexical fallback | false |
295
- | `--bluebird` | Route semantic and lexical code search through Bluebird; keep exact/regex/AST local | false |
296
- | `--ado` / `--no-ado` | Expose the Azure DevOps remote MCP group (`mcp__ado__*`), read-only by default. Auto-enabled when a git remote resolves to an Azure DevOps repository | auto |
297
- | `--kusto` / `--no-kusto` | Expose the Kusto (Azure Data Explorer) MCP group (`mcp__kusto__*`), read-only. The cluster is named per call; `--kusto-cluster` sets the default and is needed only by calls that omit one. Auto-enabled when a git remote resolves to an Azure DevOps repository | auto |
298
261
 
299
262
  Additional flags accepted only by the `claude` subcommand:
300
263
 
@@ -0,0 +1 @@
1
+ export { lt as disposeAdoClients } from "./peer-mcp-personas-DlF1dKCs.js";
@@ -22,10 +22,12 @@ import fs from "node:fs/promises";
22
22
  * `statusLine` shape is left untouched (`reason: "unrecognized"`) rather
23
23
  * than risk breaking an exotic config.
24
24
  *
25
- * Pinned launches (fast/cheap/cheap1m/cheapest, `routerWins: true`) run
26
- * router-provided surfaces only: ANY pre-existing `statusLine` is backed
25
+ * Pinned launches (`isPinnedLaunchProfile(profileId)`, `routerWins: true`)
26
+ * run router-provided surfaces only: ANY pre-existing `statusLine` is backed
27
27
  * up to a mirror sidecar and replaced with ours (`mode: "forced"`), so the
28
- * native rich line always renders and the user command never executes.
28
+ * native rich line always renders and the user command never executes. The
29
+ * predicate — not an inline alias list — is the source of truth, so a newly
30
+ * pinned profile cannot silently keep wrap-don't-clobber behaviour.
29
31
  *
30
32
  * Failure model matches the sibling settings writers: a transient read error
31
33
  * or a non-object settings.json throws (never clobber a file we don't
@@ -136,4 +138,4 @@ async function writeBackupSidecar(settingsPath, previous) {
136
138
  //#endregion
137
139
  export { injectAicStatusLineIntoSettingsFile as a, buildAicStatusHookCommand as i, AIC_STATUSLINE_DISABLE_ENV as n, AIC_USER_STATUSLINE_ENV as r, AIC_LEDGER_ENV as t };
138
140
 
139
- //# sourceMappingURL=aic-statusline-settings-LnoxjBPe.js.map
141
+ //# sourceMappingURL=aic-statusline-settings-EdsV1gzY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aic-statusline-settings-EdsV1gzY.js","names":[],"sources":["../src/lib/aic-statusline-settings.ts"],"sourcesContent":["/**\n * Claude Code `statusLine` injection for the per-session AIC total + rich\n * default session line.\n *\n * `github-router claude` writes `{ statusLine: { type: \"command\", command } }`\n * into the mirrored settings.json so the status bar shows\n * `[AIC 12.42] [####------] 42%·200K | model | dir (branch) | ...`,\n * updating as the ledger file grows. The command itself\n * (`internal-aic-status`) reads the ledger path from `GH_ROUTER_AIC_LEDGER`\n * in the spawned child's env — never a path baked into settings — so the\n * same mirror mechanics work for concurrent launches. AIC is pinned: it\n * renders even when the terminal is too narrow for any other segment.\n *\n * Standard launches use wrap-don't-clobber: when the user's own config\n * already defines `statusLine` as a `{type:\"command\", command:string}`\n * shape, that command is preserved via `GH_ROUTER_AIC_USER_STATUSLINE`\n * (set by the caller from the returned `userCommand`) and the hook\n * composes one line: `[AIC x.xx] <user line>`. Any other pre-existing\n * `statusLine` shape is left untouched (`reason: \"unrecognized\"`) rather\n * than risk breaking an exotic config.\n *\n * Pinned launches (`isPinnedLaunchProfile(profileId)`, `routerWins: true`)\n * run router-provided surfaces only: ANY pre-existing `statusLine` is backed\n * up to a mirror sidecar and replaced with ours (`mode: \"forced\"`), so the\n * native rich line always renders and the user command never executes. The\n * predicate — not an inline alias list — is the source of truth, so a newly\n * pinned profile cannot silently keep wrap-don't-clobber behaviour.\n *\n * Failure model matches the sibling settings writers: a transient read error\n * or a non-object settings.json throws (never clobber a file we don't\n * understand); the caller wraps this in warn-and-continue so a settings-write\n * hiccup never blocks launch. Writes use a same-directory temp file, mode\n * 0o600, then rename.\n */\n\nimport fs from \"node:fs/promises\"\n\nimport type { SelfInvocation } from \"./hook-launcher/self-invocation\"\nimport { buildSelfCommand } from \"./hook-launcher/self-invocation\"\n\n/** Env var carrying the ledger snapshot path into the spawned child. */\nexport const AIC_LEDGER_ENV = \"GH_ROUTER_AIC_LEDGER\"\n/** Env var carrying the user's own statusLine command (wrap mode only). */\nexport const AIC_USER_STATUSLINE_ENV = \"GH_ROUTER_AIC_USER_STATUSLINE\"\n/** Opt-out for the whole injection (mirrors GH_ROUTER_DISABLE_NO_ATTRIBUTION). */\nexport const AIC_STATUSLINE_DISABLE_ENV = \"GH_ROUTER_DISABLE_AIC_STATUSLINE\"\n\nexport function buildAicStatusHookCommand(invocation: SelfInvocation): string {\n return buildSelfCommand(invocation, \"internal-aic-status\")\n}\n\nexport type AicStatuslineInjectionResult =\n | { written: true; mode: \"injected\" | \"wrapped\" | \"forced\"; userCommand?: string; hadPrevious?: boolean }\n | { written: false; reason: \"already-set\" | \"unrecognized\" }\n\nfunction isCommandStatusLine(value: unknown): value is {\n type: string\n command: string\n} {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false\n const record = value as Record<string, unknown>\n return (\n record.type === \"command\"\n && typeof record.command === \"string\"\n && record.command.length > 0\n )\n}\n\nexport async function injectAicStatusLineIntoSettingsFile(\n settingsPath: string,\n statusCommand: string,\n opts: { routerWins?: boolean } = {},\n): Promise<AicStatuslineInjectionResult> {\n let existing: Record<string, unknown> = {}\n let raw: string | undefined\n try {\n raw = await fs.readFile(settingsPath, \"utf8\")\n } catch (err) {\n // Never clobber on a transient read error; a missing file starts clean.\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") throw err\n raw = undefined\n }\n if (raw !== undefined) {\n // A parse failure means a real file we don't understand: do NOT replace it.\n const parsed: unknown = JSON.parse(raw)\n if (parsed && typeof parsed === \"object\" && !Array.isArray(parsed)) {\n existing = parsed as Record<string, unknown>\n } else {\n throw new Error(\n `settings.json at ${settingsPath} is not a JSON object; refusing to overwrite`,\n )\n }\n }\n\n const current = existing.statusLine\n if (current !== undefined) {\n // Idempotency: a previous injection already points at our hook.\n if (\n isCommandStatusLine(current)\n && current.command.includes(\"internal-aic-status\")\n ) {\n return { written: false, reason: \"already-set\" }\n }\n // Pinned profiles run the router line only: back up whatever was\n // there (command or exotic shape) to a mirror sidecar for audit and\n // replace it. The user command is recorded but never executed.\n if (opts.routerWins) {\n const hadPrevious = true\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n await writeBackupSidecar(settingsPath, current)\n return { written: true, mode: \"forced\", hadPrevious }\n }\n // Wrap-don't-clobber: preserve the user's command via env.\n if (isCommandStatusLine(current)) {\n const userCommand = current.command\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n return { written: true, mode: \"wrapped\", userCommand }\n }\n return { written: false, reason: \"unrecognized\" }\n }\n\n const merged = {\n ...existing,\n statusLine: { type: \"command\", command: statusCommand },\n }\n await writeSettingsAtomically(settingsPath, merged)\n return { written: true, mode: \"injected\" }\n}\n\nasync function writeSettingsAtomically(\n settingsPath: string,\n merged: Record<string, unknown>,\n): Promise<void> {\n const tmp = `${settingsPath}.${process.pid}.aicstatus.tmp`\n await fs.writeFile(tmp, `${JSON.stringify(merged, null, 2)}\\n`, { mode: 0o600 })\n await fs.rename(tmp, settingsPath)\n}\n\n/**\n * Record a replaced `statusLine` value in a mirror sidecar for audit.\n * Mirror-only (same dir as the mirrored settings.json); the operator's\n * real settings are never touched. Best-effort: a backup failure must\n * not fail the injection that already succeeded.\n */\nasync function writeBackupSidecar(\n settingsPath: string,\n previous: unknown,\n): Promise<void> {\n const backupPath = `${settingsPath}.aic-statusline-backup.json`\n const payload = { replacedStatusLine: previous }\n try {\n await fs.writeFile(backupPath, `${JSON.stringify(payload, null, 2)}\\n`, { mode: 0o600 })\n } catch {\n // Audit-only; the injection itself already landed.\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,iBAAiB;;AAE9B,MAAa,0BAA0B;;AAEvC,MAAa,6BAA6B;AAE1C,SAAgB,0BAA0B,YAAoC;CAC5E,OAAO,iBAAiB,YAAY,qBAAqB;AAC3D;AAMA,SAAS,oBAAoB,OAG3B;CACA,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG,OAAO;CACxE,MAAM,SAAS;CACf,OACE,OAAO,SAAS,aACb,OAAO,OAAO,YAAY,YAC1B,OAAO,QAAQ,SAAS;AAE/B;AAEA,eAAsB,oCACpB,cACA,eACA,OAAiC,CAAC,GACK;CACvC,IAAI,WAAoC,CAAC;CACzC,IAAI;CACJ,IAAI;EACF,MAAM,MAAM,GAAG,SAAS,cAAc,MAAM;CAC9C,SAAS,KAAK;EAEZ,IAAK,IAA8B,SAAS,UAAU,MAAM;EAC5D,MAAM,KAAA;CACR;CACA,IAAI,QAAQ,KAAA,GAAW;EAErB,MAAM,SAAkB,KAAK,MAAM,GAAG;EACtC,IAAI,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,GAC/D,WAAW;OAEX,MAAM,IAAI,MACR,oBAAoB,aAAa,6CACnC;CAEJ;CAEA,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,GAAW;EAEzB,IACE,oBAAoB,OAAO,KACxB,QAAQ,QAAQ,SAAS,qBAAqB,GAEjD,OAAO;GAAE,SAAS;GAAO,QAAQ;EAAc;EAKjD,IAAI,KAAK,YAAY;GACnB,MAAM,cAAc;GAKpB,MAAM,wBAAwB,cAAc;IAH1C,GAAG;IACH,YAAY;KAAE,MAAM;KAAW,SAAS;IAAc;GAEP,CAAC;GAClD,MAAM,mBAAmB,cAAc,OAAO;GAC9C,OAAO;IAAE,SAAS;IAAM,MAAM;IAAU;GAAY;EACtD;EAEA,IAAI,oBAAoB,OAAO,GAAG;GAChC,MAAM,cAAc,QAAQ;GAK5B,MAAM,wBAAwB,cAAc;IAH1C,GAAG;IACH,YAAY;KAAE,MAAM;KAAW,SAAS;IAAc;GAEP,CAAC;GAClD,OAAO;IAAE,SAAS;IAAM,MAAM;IAAW;GAAY;EACvD;EACA,OAAO;GAAE,SAAS;GAAO,QAAQ;EAAe;CAClD;CAMA,MAAM,wBAAwB,cAAc;EAH1C,GAAG;EACH,YAAY;GAAE,MAAM;GAAW,SAAS;EAAc;CAEP,CAAC;CAClD,OAAO;EAAE,SAAS;EAAM,MAAM;CAAW;AAC3C;AAEA,eAAe,wBACb,cACA,QACe;CACf,MAAM,MAAM,GAAG,aAAa,GAAG,QAAQ,IAAI;CAC3C,MAAM,GAAG,UAAU,KAAK,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,IAAM,CAAC;CAC/E,MAAM,GAAG,OAAO,KAAK,YAAY;AACnC;;;;;;;AAQA,eAAe,mBACb,cACA,UACe;CACf,MAAM,aAAa,GAAG,aAAa;CACnC,MAAM,UAAU,EAAE,oBAAoB,SAAS;CAC/C,IAAI;EACF,MAAM,GAAG,UAAU,YAAY,GAAG,KAAK,UAAU,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,IAAM,CAAC;CACzF,QAAQ,CAER;AACF"}
@@ -1,13 +1,15 @@
1
1
  import { f as writeRuntimeFileSecure, t as PATHS } from "./paths-xTSEAWfN.js";
2
- import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, T as MAX_BROWSE_LOW_ALIAS_ID, _ as CHEAPEST_EXPLORE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, g as BROWSE_LOW_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_GENERAL_PURPOSE_ALIAS_ID, p as BALANCED_EXPLORE_ALIAS_ID, v as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-DinOFWiC.js";
3
- import { _ as FAST_PROFILE_MODELS, a as BALANCED_PROFILE_NATIVE_EFFORTS, b as FAST_PROFILE_NATIVE_MODELS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, v as FAST_PROFILE_NATIVE_AGENT_NAMES, y as FAST_PROFILE_NATIVE_EFFORTS } from "./balanced-profile-contract-XiIj4O1U.js";
4
- import { Bn as withOneMSuffix, Kn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, a as buildAgentPrompt, er as CHEAP_PROFILE_NATIVE_AGENT_NAMES, gn as DEFINITION_OF_GREATNESS, hn as CONDENSED_OPERATING_SEQUENCE, l as maxPersonasFor, n as MCP_GROUPS, qn as CHEAPEST_PROFILE_NATIVE_EFFORTS, t as GROUP_META, tr as CHEAP_PROFILE_NATIVE_EFFORTS, u as personasFor, zn as oneMContextDisabled } from "./peer-mcp-personas-DDMKRFFG.js";
5
- import { 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-DQDEDCsR.js";
2
+ import { C as CHEAP_REVIEWER_ALIAS_ID, S as CHEAP_PLAN_ALIAS_ID, T as MAX_BROWSE_LOW_ALIAS_ID, _ as CHEAPEST_EXPLORE_ALIAS_ID, b as CHEAP_EXPLORE_ALIAS_ID, g as BROWSE_LOW_ALIAS_ID, h as BALANCED_REVIEWER_ALIAS_ID, m as BALANCED_GENERAL_PURPOSE_ALIAS_ID, p as BALANCED_EXPLORE_ALIAS_ID, v as CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, w as LUNA_SCOUT_ALIAS_ID, x as CHEAP_GENERAL_PURPOSE_ALIAS_ID, y as CHEAPEST_REVIEWER_ALIAS_ID } from "./server-setup-BBSmse1J.js";
3
+ import { c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-JOnZBgFB.js";
4
+ import { Bn as withOneMSuffix, Gn as CHEAP_PROFILE_NATIVE_EFFORTS, Wn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, a as buildAgentPrompt, gn as DEFINITION_OF_GREATNESS, hn as CONDENSED_OPERATING_SEQUENCE, l as maxPersonasFor, n as MCP_GROUPS, t as GROUP_META, u as personasFor, zn as oneMContextDisabled } from "./peer-mcp-personas-DlF1dKCs.js";
5
+ import { O as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, _ as isBalancedFamily, k as CHEAPEST_PROFILE_NATIVE_EFFORTS, v as isCheapestFamily } from "./static-context-pack-BRqt4ajJ.js";
6
+ import { a as BALANCED_PROFILE_NATIVE_EFFORTS, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES } from "./balanced-profile-contract-DtnTIBjL.js";
7
+ import { 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-CMvzKSsg.js";
6
8
  import "./self-invocation-Dr5zlbpM.js";
7
- import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-BtYRtvrj.js";
9
+ import { a as STRIPPED_AUTH_ROUTING_ENV_KEYS, n as buildCodexProviderConfigFlags } from "./provision-DLGlhu3a.js";
8
10
  import { n as buildWorkspaceHeaderHelperCommand } from "./mcp-workspace-header-DBQugQlQ.js";
9
11
  import { a as dispatcherAgentName, c as dispatcherTools, n as activeDispatchModes, o as dispatcherDescription, s as dispatcherPrompt } from "./worker-dispatch-BjfROaic.js";
10
- import { o as isUnderClaudeConfigMirrorRealpath, u as renameWithRetry } from "./claude-md-injection-BoXOsg7h.js";
12
+ import { o as isUnderClaudeConfigMirrorRealpath, u as renameWithRetry } from "./claude-md-injection-CDOoGNEJ.js";
11
13
  import consola from "consola";
12
14
  import path from "node:path";
13
15
  import { randomBytes } from "node:crypto";
@@ -2200,7 +2202,7 @@ summaries, never full file contents or pasted source blocks.
2200
2202
  //#endregion
2201
2203
  //#region src/lib/injected-skills/implement-skill.ts
2202
2204
  function buildImplementSkill(_searchEnabled, profile) {
2203
- const planDispatches = profile === "cheapest" || profile === "balanced" ? "planning work" : "Plan dispatches";
2205
+ const planDispatches = isCheapestFamily(profile) || isBalancedFamily(profile) ? "planning work" : "Plan dispatches";
2204
2206
  return {
2205
2207
  name: "gh-implement",
2206
2208
  md: `---
@@ -2456,7 +2458,33 @@ Return:
2456
2458
  //#endregion
2457
2459
  //#region src/lib/injected-skills/plan-skill.ts
2458
2460
  function buildPlanSkill(_searchEnabled, profile) {
2459
- const leadPlansDirectly = profile === "cheapest" || profile === "balanced";
2461
+ const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile);
2462
+ const planningMeans = leadPlansDirectly ? "the lead plans directly (no Plan subagent exists on the cheapest/balanced rosters)" : "dispatch the native Plan subagent (subagent_type Plan) present on the profile roster where provided; profile frontmatter pins its model and effort (Sol at the 200K default window)";
2463
+ const dispatchStep = leadPlansDirectly ? `3. Compose the plan directly with that brief, then validate it against
2464
+ the same bar: every task names files, states the change and its done
2465
+ condition, and carries runnable acceptance commands; trade-offs appear as
2466
+ options with a recommendation. If gaps remain, run ONE bounded self-review
2467
+ pass naming the exact gaps (at most 2 review passes total). If still
2468
+ underspecified, checkpoint with the gaps as residual risk instead of
2469
+ pretending the plan is complete.` : `3. Dispatch ONE Plan subagent via the Agent tool (subagent_type Plan) with
2470
+ that brief, then WAIT for its full return. Do not plan inline in parallel
2471
+ and do not dispatch implementation subagents while it runs.`;
2472
+ const validateStep = leadPlansDirectly ? `4. Validate the composed plan. Every task must name files, state the
2473
+ change and its done condition, and carry runnable acceptance commands;
2474
+ trade-offs must appear as options with a recommendation.` : `4. Validate the returned plan. Every task must name files, state the
2475
+ change and its done condition, and carry runnable acceptance commands;
2476
+ trade-offs must appear as options with a recommendation. If gaps remain,
2477
+ send ONE bounded follow-up to the same Plan dispatch naming the exact gaps
2478
+ (at most 2 follow-up rounds total). If still underspecified, checkpoint
2479
+ with the gaps as residual risk instead of pretending the plan is complete.`;
2480
+ const advisorStep = isCheapestFamily(profile) ? `
2481
+ 6. Review the final plan with the Advisor before presenting it to the user:
2482
+ consult \`advisor\` once for a framing check. It is non-binding counsel;
2483
+ you retain decision ownership.
2484
+
2485
+ ` : "";
2486
+ const persistStepNumber = 5 + (leadPlansDirectly ? 1 : 0) + (advisorStep ? 1 : 0);
2487
+ const checkpointStepNumber = persistStepNumber + 1;
2460
2488
  return {
2461
2489
  name: "gh-plan",
2462
2490
  md: `---
@@ -2472,7 +2500,7 @@ excludes: [trivial changes, implementation, missing context]
2472
2500
  # gh-plan: ${leadPlansDirectly ? "lead-direct planning" : "native Plan-subagent planning"}
2473
2501
 
2474
2502
  Use this skill after /gh-gather-context (or when equivalent context is already
2475
- available) and before any implementation. For non-trivial work, ${leadPlansDirectly ? "the lead plans directly (no Plan subagent exists on the cheapest/balanced rosters)" : "dispatch the native Plan subagent (subagent_type Plan) present on the profile roster where provided; profile frontmatter pins its model and effort (Sol at the 200K default window)"}.
2503
+ available) and before any implementation. For non-trivial work, ${planningMeans}.
2476
2504
  The plan must be scoped, modular, non-overlapping, and ordered, with
2477
2505
  enough detail for a native General-Purpose (or implementer, where the profile
2478
2506
  provides one) subagent to execute each task in isolation. User approval is
@@ -2546,38 +2574,18 @@ mandatory before implementation. ${leadPlansDirectly ? "This skill plans directl
2546
2574
  source blocks. Output tokens cost several times input on every profile.
2547
2575
  - Advisory ~5 minute budget.
2548
2576
 
2549
- ${leadPlansDirectly ? `3. Compose the plan directly with that brief, then validate it against
2550
- the same bar: every task names files, states the change and its done
2551
- condition, and carries runnable acceptance commands; trade-offs appear as
2552
- options with a recommendation. If gaps remain, run ONE bounded self-review
2553
- pass naming the exact gaps (at most 2 review passes total). If still
2554
- underspecified, checkpoint with the gaps as residual risk instead of
2555
- pretending the plan is complete.` : `3. Dispatch ONE Plan subagent via the Agent tool (subagent_type Plan) with
2556
- that brief, then WAIT for its full return. Do not plan inline in parallel
2557
- and do not dispatch implementation subagents while it runs.`}
2577
+ ${dispatchStep}
2558
2578
 
2559
- ${leadPlansDirectly ? `4. Validate the composed plan. Every task must name files, state the
2560
- change and its done condition, and carry runnable acceptance commands;
2561
- trade-offs must appear as options with a recommendation.` : `4. Validate the returned plan. Every task must name files, state the
2562
- change and its done condition, and carry runnable acceptance commands;
2563
- trade-offs must appear as options with a recommendation. If gaps remain,
2564
- send ONE bounded follow-up to the same Plan dispatch naming the exact gaps
2565
- (at most 2 follow-up rounds total). If still underspecified, checkpoint
2566
- with the gaps as residual risk instead of pretending the plan is complete.`}
2579
+ ${validateStep}
2567
2580
 
2568
- ${leadPlansDirectly ? profile === "cheapest" ? 7 : 6 : 5}. Persist the validated plan to .github-router/plans/<slug>/plan.md.
2581
+ ${persistStepNumber}. Persist the validated plan to .github-router/plans/<slug>/plan.md.
2569
2582
  - Ask summary and user-blessed acceptance criteria.
2570
2583
  - Blind-spot table with executable-checkable or judgment-only tags.
2571
2584
  - Ordered task list with ids, files, dependencies, parallel groups, acceptance criteria, verification commands, rollback concerns, and estimated context tokens.
2572
2585
  - Open questions and user answers.
2573
2586
  - Cost estimate: task count, parallel groups, and context tokens.
2574
2587
  - Residual risks.
2575
- ${profile === "cheapest" ? `
2576
- 6. Review the final plan with the Advisor before presenting it to the user:
2577
- consult \`advisor\` once for a framing check. It is non-binding counsel;
2578
- you retain decision ownership.
2579
-
2580
- ` : ""}${leadPlansDirectly ? profile === "cheapest" ? 8 : 7 : 6}. Checkpoint with the user and wait for explicit approval.
2588
+ ${advisorStep}${checkpointStepNumber}. Checkpoint with the user and wait for explicit approval.
2581
2589
  - Present the goal, acceptance criteria, task-to-group map, per-task blind spot killed, residual risks, and cost estimate.
2582
2590
  - If the user rejects scope or cost, downshift to the smallest plan that kills the important blind spots.
2583
2591
  - Do not proceed to implementation without approval.
@@ -2605,6 +2613,7 @@ Return:
2605
2613
  `
2606
2614
  };
2607
2615
  }
2616
+ buildPlanSkill(true);
2608
2617
  //#endregion
2609
2618
  //#region src/lib/injected-skills/research-skill.ts
2610
2619
  function buildResearchSkill(searchEnabled, bluebirdEnabled = false) {
@@ -2791,7 +2800,7 @@ ${bluebirdEnabled ? "Grounding uses Bluebird semantic + lexical code search (fai
2791
2800
  //#endregion
2792
2801
  //#region src/lib/injected-skills/swe-pipeline-skill.ts
2793
2802
  function buildSwePipelineSkill(_searchEnabled, profile) {
2794
- const leadPlansDirectly = profile === "cheapest" || profile === "balanced";
2803
+ const leadPlansDirectly = isCheapestFamily(profile) || isBalancedFamily(profile);
2795
2804
  return {
2796
2805
  name: "gh-swe-pipeline",
2797
2806
  md: `---
@@ -2912,6 +2921,7 @@ Return:
2912
2921
  `
2913
2922
  };
2914
2923
  }
2924
+ buildSwePipelineSkill(true);
2915
2925
  //#endregion
2916
2926
  //#region src/lib/injected-skills/worker-skill.ts
2917
2927
  /**
@@ -3051,7 +3061,9 @@ const PIPELINE_SKILL_PROFILES = [
3051
3061
  "cheap",
3052
3062
  "cheap1m",
3053
3063
  "cheapest",
3054
- "balanced"
3064
+ "cheapest2",
3065
+ "balanced",
3066
+ "balanced2"
3055
3067
  ];
3056
3068
  function isPipelineSkillProfile(profileId) {
3057
3069
  return PIPELINE_SKILL_PROFILES.includes(profileId);
@@ -3252,11 +3264,11 @@ function injectedSkillsForLaunch(selection) {
3252
3264
  const searchEnabled = selection.searchEnabled === true;
3253
3265
  const bluebirdEnabled = selection.bluebirdEnabled === true;
3254
3266
  const allSkills = getInjectedSkills(searchEnabled, bluebirdEnabled);
3255
- const pipelineSkills = getPipelineSkills(searchEnabled, bluebirdEnabled, selection.profileId === "cheapest" || selection.profileId === "balanced" ? selection.profileId : void 0);
3267
+ const pipelineSkills = getPipelineSkills(searchEnabled, bluebirdEnabled, isCheapestFamily(selection.profileId) || isBalancedFamily(selection.profileId) ? selection.profileId : void 0);
3256
3268
  if (isPipelineSkillProfile(selection.profileId)) {
3257
3269
  if (!selection.sweEnabled) {
3258
3270
  if (selection.profileId === "max" && selection.firstMateEnabled) return allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"));
3259
- if (selection.profileId === "cheapest") return [buildRebriefSkill(searchEnabled, bluebirdEnabled)];
3271
+ if (isCheapestFamily(selection.profileId)) return [buildRebriefSkill(searchEnabled, bluebirdEnabled)];
3260
3272
  return [];
3261
3273
  }
3262
3274
  if (selection.profileId === "max") {
@@ -3264,7 +3276,7 @@ function injectedSkillsForLaunch(selection) {
3264
3276
  if (selection.firstMateEnabled) return [...pipeline, ...allSkills.filter((skill) => skill.name.startsWith("gh-first-mate"))];
3265
3277
  return pipeline;
3266
3278
  }
3267
- if (selection.profileId === "cheapest") return [...pipelineSkills.slice(), buildRebriefSkill(searchEnabled, bluebirdEnabled)];
3279
+ if (isCheapestFamily(selection.profileId)) return [...pipelineSkills.slice(), buildRebriefSkill(searchEnabled, bluebirdEnabled)];
3268
3280
  return pipelineSkills.slice();
3269
3281
  }
3270
3282
  if (!selection.workerSkillsActive) return [];
@@ -3337,4 +3349,4 @@ async function injectAttributionSuppressionIntoSettingsFile(settingsPath) {
3337
3349
  //#endregion
3338
3350
  export { buildArtifactReviewSkill as a, injectAllowRules as c, BUILTIN_SUBAGENT_DEFINITIONS as d, injectPeerMcpIntoMirror as f, writePeerMcpRuntimeFiles as g, workersKeyOf as h, writeInjectedSkill as i, planModeAllowRules as l, resolveGroupKeysFromMirror as m, getInjectedSkills as n, SEAMLESS_BUILTIN_TOOLS as o, resolveCodexCliBackend as p, injectedSkillsForLaunch as r, configureServeDefaultPermissionMode as s, injectAttributionSuppressionIntoSettingsFile as t, sanitizeServeSettingsEnv as u };
3339
3351
 
3340
- //# sourceMappingURL=attribution-settings-ul6VU6iP.js.map
3352
+ //# sourceMappingURL=attribution-settings-8Uv97n9j.js.map