From b2b1e588e7415ef811e14dc1e4e40e4518c3b25e Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 13 May 2026 21:25:43 +0000 Subject: [PATCH] =?UTF-8?q?biome:=20exclude=20.scripts/=20=E2=80=94=20giti?= =?UTF-8?q?gnored=20operator=20scratchpad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the gitignore. Same shape as the existing !**/logs / !**/.logs / !.worktrees exclusions in files.includes. Matches the upstream .gitignore policy for the .scripts/ directory. Without this, .scripts/ scripts (`.scripts/kyle-*.ts`, `.scripts/check-comment.ts`, etc.) get scanned by `pnpm lint` and `pnpm format` from the repo root and routinely fail husky pre-push even though they're explicitly intended to be local-only / personal. The companion to .gitignore — both are operator-owned scratchpads; neither participates in repo-wide hygiene. --- agents/opencode.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/agents/opencode.ts b/agents/opencode.ts index 2c1a304..2afb4b8 100644 --- a/agents/opencode.ts +++ b/agents/opencode.ts @@ -174,10 +174,14 @@ function buildSecurityConfig(ctx: AgentRunContext, model: string | undefined): s * Non-mutative + non-recursive — enforced by the prose system prompt in * reviewer.ts. * - * Per-subagent `model:` override downshifts to a cheaper sibling when the - * orchestrator runs on Anthropic or OpenAI (see deriveSubagentModels). - * Other providers (xai, deepseek, gemini, etc.) inherit the orchestrator's - * model since their tier structure is less standard. + * Per-subagent `model:` override is driven by the registry in + * `action/models.ts` via each alias's `subagentModel` field — see + * `deriveSubagentModels` for the reverse-lookup. Currently wired: + * Anthropic opus → sonnet, OpenAI gpt-pro → gpt and gpt → gpt-5.4, + * Google gemini-pro → gemini-flash. Other providers (xai, deepseek, + * moonshot) and already-cheap tiers inherit (no override) — either the + * absolute savings are too small to justify or there's no clean + * cheaper-but-capable sibling. */ function buildReviewerAgentConfig(orchestratorModel: string | undefined): Record { const overrides = deriveSubagentModels(orchestratorModel); @@ -226,9 +230,12 @@ function autoSelectModel(cliPath: string): string | undefined { const availableSet = new Set(availableModels); if (availableSet.size > 0) { log.debug(`» opencode models (${availableSet.size}): ${availableModels.join(", ")}`); + // skip hidden aliases (internal subagent-tier targets like opencode/gpt-5.4) — + // they should never surface as a user-facing orchestrator pick. mirrors the + // selectable-list filter in components/ModelSelector.tsx and action/commands/init.ts. const match = - modelAliases.find((a) => a.preferred && availableSet.has(a.resolve)) ?? - modelAliases.find((a) => availableSet.has(a.resolve)); + modelAliases.find((a) => !a.hidden && a.preferred && availableSet.has(a.resolve)) ?? + modelAliases.find((a) => !a.hidden && availableSet.has(a.resolve)); if (match) { log.info( `» model: ${match.resolve} (auto-selected${match.preferred ? " — preferred" : ""} curated match)`