github-router 0.3.353 → 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.
- package/dist/ado-tools-CN4i9OVl.js +1 -0
- package/dist/{aic-statusline-settings-LnoxjBPe.js → aic-statusline-settings-EdsV1gzY.js} +6 -4
- package/dist/aic-statusline-settings-EdsV1gzY.js.map +1 -0
- package/dist/{attribution-settings-7cbLvuiE.js → attribution-settings-8Uv97n9j.js} +51 -39
- package/dist/{attribution-settings-7cbLvuiE.js.map → attribution-settings-8Uv97n9j.js.map} +1 -1
- package/dist/balanced-profile-contract-DtnTIBjL.js +105 -0
- package/dist/balanced-profile-contract-DtnTIBjL.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-CugVz_lo.js → claude-C_1OM7ce.js} +68 -59
- package/dist/claude-C_1OM7ce.js.map +1 -0
- package/dist/{claude-md-injection-BoXOsg7h.js → claude-md-injection-CDOoGNEJ.js} +20 -15
- package/dist/claude-md-injection-CDOoGNEJ.js.map +1 -0
- package/dist/{codex-pfFa6vPh.js → codex-5eTmciDG.js} +5 -5
- package/dist/{codex-pfFa6vPh.js.map → codex-5eTmciDG.js.map} +1 -1
- package/dist/{copilot-discount-C3jfysK-.js → copilot-discount-kpOLluHm.js} +3 -1
- package/dist/copilot-discount-kpOLluHm.js.map +1 -0
- package/dist/engine-CIAopp0h.js +1 -0
- package/dist/fast-profile-contract-JOnZBgFB.js +61 -0
- package/dist/fast-profile-contract-JOnZBgFB.js.map +1 -0
- package/dist/{gate-discovery-Cvdko01z.js → gate-discovery-CqJVzT_D.js} +2 -2
- package/dist/{gate-discovery-Cvdko01z.js.map → gate-discovery-CqJVzT_D.js.map} +1 -1
- package/dist/hooks.mjs +193 -12
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-aic-status-Dmi2bCsR.js → internal-aic-status-wYPsCG4r.js} +2 -2
- package/dist/{internal-aic-status-Dmi2bCsR.js.map → internal-aic-status-wYPsCG4r.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-Cv7zf0ZI.js → internal-fast-dispatch-guard-A8teEib4.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js → internal-fast-dispatch-guard-D_TCtJhQ.js} +3 -2
- package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js.map → internal-fast-dispatch-guard-D_TCtJhQ.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-T-M7DRIW.js → internal-max-dispatch-guard-BM_B15EH.js} +1 -1
- package/dist/{internal-max-dispatch-guard-DkJixDmG.js → internal-max-dispatch-guard-D7ByWH4v.js} +2 -2
- package/dist/{internal-max-dispatch-guard-DkJixDmG.js.map → internal-max-dispatch-guard-D7ByWH4v.js.map} +1 -1
- package/dist/{internal-prompt-submit-B9MJxc3K.js → internal-prompt-submit-C77GnEaW.js} +3 -3
- package/dist/internal-prompt-submit-C77GnEaW.js.map +1 -0
- package/dist/{internal-prompt-submit-6OXEdQCK.js → internal-prompt-submit-CDTwamkW.js} +2 -2
- package/dist/{internal-rebrief-zIdunX3R.js → internal-rebrief-DZygfGHp.js} +6 -6
- package/dist/internal-rebrief-DZygfGHp.js.map +1 -0
- package/dist/{internal-stop-hook-DGcRVh_2.js → internal-stop-hook-Dn_AF0BF.js} +2 -2
- package/dist/{internal-stop-hook-DGcRVh_2.js.map → internal-stop-hook-Dn_AF0BF.js.map} +1 -1
- package/dist/main.js +11 -11
- package/dist/{max-profile-contract-DQDEDCsR.js → max-profile-contract-CMvzKSsg.js} +2 -2
- package/dist/max-profile-contract-CMvzKSsg.js.map +1 -0
- package/dist/{peer-mcp-personas-DDMKRFFG.js → peer-mcp-personas-DlF1dKCs.js} +142 -165
- package/dist/peer-mcp-personas-DlF1dKCs.js.map +1 -0
- package/dist/{pi-BNpaiwEF.js → pi-2m2IgZlm.js} +61 -62
- package/dist/pi-2m2IgZlm.js.map +1 -0
- package/dist/{provision-BtYRtvrj.js → provision-DLGlhu3a.js} +2 -2
- package/dist/{provision-BtYRtvrj.js.map → provision-DLGlhu3a.js.map} +1 -1
- package/dist/{serve-BQ0spYrs.js → serve-8tXHVHOr.js} +7 -7
- package/dist/{serve-BQ0spYrs.js.map → serve-8tXHVHOr.js.map} +1 -1
- package/dist/{server-setup-COrhtCdv.js → server-setup-BBSmse1J.js} +190 -127
- package/dist/server-setup-BBSmse1J.js.map +1 -0
- package/dist/{start-Dd7O3bB9.js → start-B7jTBpAc.js} +3 -3
- package/dist/{start-Dd7O3bB9.js.map → start-B7jTBpAc.js.map} +1 -1
- package/dist/{static-context-pack-CyucviRD.js → static-context-pack-BRqt4ajJ.js} +313 -6
- package/dist/static-context-pack-BRqt4ajJ.js.map +1 -0
- package/package.json +1 -1
- package/dist/ado-tools-xbuVU7YN.js +0 -1
- package/dist/aic-statusline-settings-LnoxjBPe.js.map +0 -1
- package/dist/balanced-profile-contract-XiIj4O1U.js +0 -127
- package/dist/balanced-profile-contract-XiIj4O1U.js.map +0 -1
- package/dist/claude-CugVz_lo.js.map +0 -1
- package/dist/claude-md-injection-BoXOsg7h.js.map +0 -1
- package/dist/copilot-discount-C3jfysK-.js.map +0 -1
- package/dist/engine-DwLIk1Zn.js +0 -1
- package/dist/internal-prompt-submit-B9MJxc3K.js.map +0 -1
- package/dist/internal-rebrief-zIdunX3R.js.map +0 -1
- package/dist/max-profile-contract-DQDEDCsR.js.map +0 -1
- package/dist/peer-mcp-personas-DDMKRFFG.js.map +0 -1
- package/dist/pi-BNpaiwEF.js.map +0 -1
- package/dist/server-setup-COrhtCdv.js.map +0 -1
- package/dist/static-context-pack-CyucviRD.js.map +0 -1
|
@@ -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 (
|
|
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-
|
|
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-
|
|
3
|
-
import {
|
|
4
|
-
import { Bn as withOneMSuffix,
|
|
5
|
-
import {
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
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, ${
|
|
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
|
-
${
|
|
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
|
-
${
|
|
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
|
-
${
|
|
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
|
-
${
|
|
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
|
|
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
|
-
"
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
3352
|
+
//# sourceMappingURL=attribution-settings-8Uv97n9j.js.map
|