github-router 0.3.380 → 0.3.382
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-CNEWS1kF.js +1 -0
- package/dist/{attribution-settings-BJ1fjX7V.js → attribution-settings-BhQmS2u9.js} +23 -26
- package/dist/{attribution-settings-BJ1fjX7V.js.map → attribution-settings-BhQmS2u9.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-BWwkOMi3.js → claude-B9Mw8x0M.js} +12 -12
- package/dist/{claude-BWwkOMi3.js.map → claude-B9Mw8x0M.js.map} +1 -1
- package/dist/{claude-md-injection-DNMDcw1W.js → claude-md-injection-DiokMV4p.js} +16 -7
- package/dist/claude-md-injection-DiokMV4p.js.map +1 -0
- package/dist/{codex-C6ix3BaY.js → codex-DiybqRAO.js} +5 -5
- package/dist/{codex-C6ix3BaY.js.map → codex-DiybqRAO.js.map} +1 -1
- package/dist/engine-DCR1lSsw.js +1 -0
- package/dist/{gate-discovery-2ILpM2fi.js → gate-discovery-DCdds1gg.js} +2 -2
- package/dist/{gate-discovery-2ILpM2fi.js.map → gate-discovery-DCdds1gg.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-DeEfWqfP.js → internal-max-dispatch-guard-CXaZ5TTR.js} +1 -1
- package/dist/{internal-max-dispatch-guard-4RLca1i5.js → internal-max-dispatch-guard-sjBGijoa.js} +2 -2
- package/dist/{internal-max-dispatch-guard-4RLca1i5.js.map → internal-max-dispatch-guard-sjBGijoa.js.map} +1 -1
- package/dist/{internal-prompt-submit-BZ2-CExM.js → internal-prompt-submit-C_QigwLP.js} +2 -2
- package/dist/{internal-prompt-submit-BZ2-CExM.js.map → internal-prompt-submit-C_QigwLP.js.map} +1 -1
- package/dist/{internal-prompt-submit-ZBhH-SQ1.js → internal-prompt-submit-DBmCOUfy.js} +2 -2
- package/dist/{internal-rebrief-BIWbN7Sr.js → internal-rebrief-CjaEXHIo.js} +3 -3
- package/dist/{internal-rebrief-BIWbN7Sr.js.map → internal-rebrief-CjaEXHIo.js.map} +1 -1
- package/dist/{internal-stop-hook-cDF1MuJZ.js → internal-stop-hook-CcXuDASI.js} +2 -2
- package/dist/{internal-stop-hook-cDF1MuJZ.js.map → internal-stop-hook-CcXuDASI.js.map} +1 -1
- package/dist/main.js +9 -9
- package/dist/{max-profile-contract-DbHwiLTx.js → max-profile-contract-CEn8hKb3.js} +60 -60
- package/dist/{max-profile-contract-DbHwiLTx.js.map → max-profile-contract-CEn8hKb3.js.map} +1 -1
- package/dist/{peer-mcp-personas-Dny0r5Am.js → peer-mcp-personas-Ckbn70c5.js} +40 -40
- package/dist/{peer-mcp-personas-Dny0r5Am.js.map → peer-mcp-personas-Ckbn70c5.js.map} +1 -1
- package/dist/{pi-YhoA26wi.js → pi-D9IbxlSj.js} +88 -180
- package/dist/pi-D9IbxlSj.js.map +1 -0
- package/dist/{provision-BWtuDq_v.js → provision-BY5pXtSG.js} +2 -2
- package/dist/{provision-BWtuDq_v.js.map → provision-BY5pXtSG.js.map} +1 -1
- package/dist/{serve-DrHAX2Bh.js → serve-DPPh7goh.js} +7 -7
- package/dist/{serve-DrHAX2Bh.js.map → serve-DPPh7goh.js.map} +1 -1
- package/dist/{server-setup-DLwejgVA.js → server-setup-CVMUKERN.js} +703 -9
- package/dist/server-setup-CVMUKERN.js.map +1 -0
- package/dist/{start-DvV3Lbwy.js → start-B7z2Mg2B.js} +3 -3
- package/dist/{start-DvV3Lbwy.js.map → start-B7z2Mg2B.js.map} +1 -1
- package/dist/{static-context-pack-BKFelEbM.js → static-context-pack-DdQpWwQN.js} +140 -140
- package/dist/{static-context-pack-BKFelEbM.js.map → static-context-pack-DdQpWwQN.js.map} +1 -1
- package/dist/{workiq-tools-DdiQ2DOW.js → workiq-tools-3K9WKiQ2.js} +1 -1
- package/package.json +1 -1
- package/dist/ado-tools-CsfbnY8x.js +0 -1
- package/dist/claude-md-injection-DNMDcw1W.js.map +0 -1
- package/dist/engine-B6la_uIW.js +0 -1
- package/dist/pi-YhoA26wi.js.map +0 -1
- package/dist/server-setup-DLwejgVA.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"max-profile-contract-DbHwiLTx.js","names":[],"sources":["../src/lib/model-suffix.ts","../src/lib/fast-endpoint.ts","../src/lib/max-profile-prompts.ts","../src/lib/max-profile-contract.ts"],"sourcesContent":["/**\n * Normalize Claude Code's local 1M-context decoration at model boundaries.\n *\n * `[1m]` is a client-side accounting marker, not part of a Copilot catalog id.\n * Claude Code can append its own marker to a picker value that is already\n * decorated by the router, producing a reachable doubled suffix. Keep the\n * helper dependency-free so launch/profile code and request preprocessing use\n * exactly the same trailing-suffix rule without an import cycle.\n */\nexport interface TrailingOneMSuffix {\n base: string\n hadSuffix: boolean\n}\n\n/** Strip every trailing `[1m]` marker, case-insensitively. */\nexport function stripTrailingOneMSuffix(id: string): TrailingOneMSuffix {\n const match = id.match(/(?:\\[1m\\])+$/i)\n if (!match || match.index === undefined) {\n return { base: id, hadSuffix: false }\n }\n return { base: id.slice(0, match.index), hadSuffix: true }\n}\n\n/** Reapply at most one canonical `[1m]` marker when the input had one. */\nexport function normalizeTrailingOneMSuffix(id: string): string {\n const { base, hadSuffix } = stripTrailingOneMSuffix(id)\n return hadSuffix ? `${base}[1m]` : base\n}\n\n/** Append one marker without ever creating a doubled suffix. */\nexport function withTrailingOneMSuffix(id: string): string {\n const { base } = stripTrailingOneMSuffix(id)\n return `${base}[1m]`\n}\n","import type { Model } from \"~/services/copilot/get-models\"\n\n// Fast endpoint policy is intentionally kept separate from the standard\n// pickEndpoint() resolver. See fastEndpointRequirement below.\n\n/** Endpoint clients used by the fast profile's fixed roster. */\nexport type FastEndpoint = \"chat\" | \"responses\" | \"messages\"\n\nconst ENDPOINTS: Readonly<Record<FastEndpoint, ReadonlySet<string>>> = {\n chat: new Set([\"/chat/completions\", \"/v1/chat/completions\"]),\n responses: new Set([\"/responses\", \"/v1/responses\"]),\n messages: new Set([\"/messages\", \"/v1/messages\"]),\n}\n\n/**\n * Return the endpoint mandated by a fast-profile roster model.\n *\n * This is intentionally independent of the standard `pickEndpoint`: that\n * resolver prefers chat when a catalog entry advertises both clients, while\n * fast roles have a fixed provider contract. Gemini stays on chat; Luna, Sol,\n * and Grok stay on Responses; the Opus Oracle stays on native Messages.\n * Unknown ids return undefined so a fast caller cannot guess a transport.\n */\nexport function fastEndpointRequirement(modelId: string): FastEndpoint | undefined {\n const id = modelId.replace(/(?:\\[1m\\])+$/i, \"\")\n if (id === \"gemini-3.8-flash\") return \"chat\"\n if (id === \"gpt-6-luna\" || id === \"gpt-5.6-luna\" || id === \"gpt-6-sol\" || id === \"gpt-5.6-sol\" || id === \"gpt-6.1-sol\" || id === \"gpt-6.2-sol\" || id === \"grok-4.6\" || id === \"grok-4.7\" || id === \"gpt-6-astra\") {\n return \"responses\"\n }\n if (id === \"claude-opus-5.5\" || id === \"claude-opus-5-5\" || id === \"claude-opus-5.5\" || id === \"claude-sonnet-5\") return \"messages\"\n return undefined\n}\n\n/**\n * Resolve the fixed fast transport only when the catalog explicitly advertises\n * the required endpoint. An entry that advertises both still resolves to the\n * policy endpoint, regardless of advertisement order.\n */\nexport function advertisesEndpoint(\n model: Model | undefined,\n endpoint: FastEndpoint,\n): boolean {\n const advertised = model?.supported_endpoints\n return Array.isArray(advertised)\n && advertised.some((value) => ENDPOINTS[endpoint].has(value))\n}\n\nexport function fastEndpointForModel(model: Model): FastEndpoint | undefined {\n const required = fastEndpointRequirement(model.id)\n if (!required) return undefined\n return advertisesEndpoint(model, required) ? required : undefined\n}\n\n/** Resolve a fast endpoint from a catalog id, without selecting a fallback. */\nexport function fastEndpointForCatalogId(\n modelId: string,\n catalog: ReadonlyArray<Model> | undefined,\n): FastEndpoint | undefined {\n const found = catalog?.find((model) => model.id === modelId)\n return found ? fastEndpointForModel(found) : undefined\n}\n\n/** Human-readable endpoint name for prerequisite diagnostics. */\nexport function fastEndpointLabel(endpoint: FastEndpoint): string {\n return endpoint === \"chat\"\n ? \"Chat Completions\"\n : endpoint === \"responses\"\n ? \"Responses\"\n : \"Messages\"\n}\n","import type { Effort } from \"./reasoning-effort\"\n\nexport const MAX_PARALLELISM_RULE =\n \"When two or more delegated workstreams are independent and non-overlapping, issue them together; sequence them when one needs another's result or their side effects can conflict.\"\n\nexport type MaxNativePromptRole =\n | \"Explore\"\n | \"Plan\"\n | \"general-purpose\"\n | \"implementer\"\n | \"reviewer\"\n | \"brainstorm\"\n\ninterface MaxNativePromptSpec {\n capability: string\n useWhen: string\n notFor: string\n returns: string\n prompt: string\n}\n\nconst MAX_NATIVE_PROMPT_SPECS: Record<MaxNativePromptRole, MaxNativePromptSpec> = {\n Explore: {\n capability: \"read-oriented repository exploration\",\n useWhen: \"the answer requires broad, multi-file or multi-source discovery and the caller needs conclusions rather than raw context\",\n notFor: \"a narrow lookup, implementation planning, or editing\",\n returns: \"concise conclusions, load-bearing file:line evidence, checks or sources consulted, and explicit gaps\",\n prompt: \"Explore the supplied question across the actual repository. Stay within discovery: do not plan the implementation or modify files. Return concise conclusions, load-bearing file:line evidence, checks or sources consulted, and explicit gaps. Stop when the question is supported or the missing evidence is identified. You do not have Advisor or native-agent delegation tools.\",\n },\n Plan: {\n capability: \"implementation planning\",\n useWhen: \"a non-trivial change crosses interfaces, has dependency or migration ordering, preserves important invariants, or needs explicit acceptance criteria\",\n notFor: \"routine decomposition, implementation, approval, or silently deciding unresolved product choices\",\n returns: \"affected files or symbols, ordered implementation slices, invariants, risks, open decisions, acceptance criteria, and runnable verification\",\n prompt: \"Turn the supplied goal, constraints, and evidence into an actionable implementation plan. Return affected files or symbols, ordered implementation slices with real dependencies identified, invariants, risks, open decisions, acceptance criteria, and runnable verification. Surface unresolved product or architecture choices instead of deciding them silently. Stop when another agent can implement the plan without rediscovering its structure; the lead owns acceptance and execution. You do not have Advisor or native-agent delegation tools.\",\n },\n \"general-purpose\": {\n capability: \"bounded mixed investigation and execution\",\n useWhen: \"one owner should carry a multi-step outcome across several narrower kinds of work\",\n notFor: \"a narrow direct action or a task cleanly owned by one specialist\",\n returns: \"the requested outcome, changed artifacts, verification evidence, blockers, and residual risks\",\n prompt: \"Own the supplied bounded outcome end to end. Return the requested outcome, changed artifacts, verification evidence, blockers, and residual risks. Stop at the requested scope and do not absorb adjacent cleanup. Do not re-delegate the core assignment merely to repeat it; any supporting delegation must be independent, non-overlapping, and integrated and verified by you.\",\n },\n implementer: {\n capability: \"bounded coding implementation\",\n useWhen: \"the desired behavior and constraints are settled but the implementation still needs coding judgment\",\n notFor: \"unresolved product behavior, architecture choices, or an unbounded investigation\",\n returns: \"a coherent scoped change, files changed, observable behavior, checks and results, blockers, and unresolved risks\",\n prompt: \"Implement the settled desired behavior within the supplied scope and repository conventions. Return the files changed, observable behavior, checks and results, blockers, and unresolved risks. Stop and report when ambiguity would materially change product behavior, architecture, or scope. Do not re-delegate the core assignment merely to repeat it; any supporting delegation must be independent, non-overlapping, and integrated and verified by you.\",\n },\n reviewer: {\n capability: \"repository-aware verification and reproduction\",\n useWhen: \"an implementation or failure already exists and assessment requires repository navigation, commands, tests, or runtime evidence\",\n notFor: \"a stateless review of an already self-contained artifact or authoring the fix\",\n returns: \"a calibrated verdict, severity-ranked findings, file:line evidence, concrete failure scenarios, checks and results, and unverified areas\",\n prompt: \"Assess the supplied artifact against its intent and the actual repository or runtime state. Return a calibrated verdict, severity-ranked findings, file:line evidence, concrete failure scenarios, checks and results, and unverified areas. Distinguish no findings from checks not run. Do not modify files or act as an approval gate. Stop when material claims have been tested to the available extent; the lead owns remediation and go/no-go. You do not have Advisor or native-agent delegation tools.\",\n },\n brainstorm: {\n capability: \"divergent repository-feasible option generation\",\n useWhen: \"materially different approaches remain credible before implementation planning\",\n notFor: \"a settled approach, proven fact, implementation plan, or code change\",\n returns: \"distinct options, trade-offs, assumptions, failure modes, discriminating evidence, and a recommendation only when supported\",\n prompt: \"Explore the useful design space for the supplied open decision. Return materially distinct repository-feasible options, trade-offs, assumptions, failure modes, discriminating evidence, and a recommendation only when the available evidence supports one. Do not turn the result into an implementation plan or modify files. Stop once the useful alternatives are covered or one option clearly dominates; the lead owns the decision. You do not have Advisor or native-agent delegation tools.\",\n },\n}\n\nexport function maxNativeDescription(\n role: MaxNativePromptRole,\n model: string,\n effort: Effort,\n): string {\n const spec = MAX_NATIVE_PROMPT_SPECS[role]\n return `Max-profile ${spec.capability} subagent running ${model} at ${effort} effort. Use when: ${spec.useWhen}. Not for: ${spec.notFor}. Returns: ${spec.returns}.`\n}\n\nexport function maxNativePrompt(role: MaxNativePromptRole): string {\n return MAX_NATIVE_PROMPT_SPECS[role].prompt\n}\n\nexport const MAX_COORDINATOR_DESCRIPTION =\n \"Max-profile peer-review coordinator running gpt-6-luna at maximum effort. Use when: a consequential self-contained plan, design, or diff has at least two distinct unresolved risk lenses for which independent fresh-context review could change the decision. Not for: routine second opinions, repository exploration or execution, facts a focused check can settle, or repeating one generic review across models. Returns: a provenance-preserving synthesis of material findings, disagreements, evidence gaps, and the cheapest checks that can settle them.\"\n\nexport const MAX_COORDINATOR_PROMPT =\n `Coordinate independent fresh-context review of the self-contained artifact and constraints supplied by the caller. You have peer tools only and cannot inspect the repository, transcript, or runtime, so identify missing material instead of guessing. Select the smallest sufficient peer set: use one peer when one lens is enough, and multiple peers only for distinct unresolved risk dimensions. Give every peer a non-overlapping lens; do not send one generic brief to several models or duplicate a same-family lens as a vote. ${MAX_PARALLELISM_RULE} Deduplicate findings while preserving provenance and genuine disagreement. Return severity-ranked material findings, concrete failure scenarios, confidence, evidence gaps, and the cheapest repository check or test that can settle each disagreement. Do not count votes or issue an evidence-free approval. Peer output is advisory; the lead owns go/no-go and remediation.`\n\nexport type MaxPeerKind = \"strategic critic\" | \"line-level reviewer\"\n\nexport interface MaxPeerPromptOptions {\n name: string\n model: string\n kind: MaxPeerKind\n lens: string\n useWhen: string\n notFor: string\n}\n\nexport function maxPeerDescription(opts: MaxPeerPromptOptions): string {\n return `Max-profile ${opts.kind} backed by ${opts.model}. Lens: ${opts.lens}. Use when: ${opts.useWhen}. Not for: ${opts.notFor}. Cold-start: it has no repository or transcript access and sees only the supplied prompt, context, and images. Returns: only material findings, or an explicit no material finding result.`\n}\n\nexport function maxPeerInstructions(opts: MaxPeerPromptOptions): string {\n const locationRule = opts.kind === \"line-level reviewer\"\n ? \"For each finding, cite a location from the supplied artifact, give severity and a concrete failure scenario, and suggest the smallest correction.\"\n : \"For each finding, identify the failed assumption or invariant, its consequence, and the cheapest evidence that would confirm or refute it.\"\n return `You are ${opts.name}, a fresh-context ${opts.kind} running on ${opts.model}. Apply this lens: ${opts.lens}. You have no repository or transcript access; use only the supplied artifact, constraints, and images. If material context is missing, identify it instead of guessing. ${locationRule} Treat supplied locations as citations to the artifact, not proof of repository state. Report only material findings; \"no material finding\" is a valid result. Stop when the requested lens is covered without padding or manufactured objections.`\n}\n\nexport const MAX_ADVISOR_TOOL_INSTRUCTIONS = `# Advisor Tool\n\nYou have access to an optional, primary-lead-only, transcript-aware Max Advisor. Transcript awareness makes it useful for detecting framing drift, changed assumptions, and a stuck strategy; it is not an independent repository verifier, supervisor, approver, workflow gate, or substitute for your own reasoning. You keep decision ownership.\n\nUse it for one precise consequential uncertainty that remains after proportionate direct investigation and cannot be settled by repository evidence, a focused command or test, Plan, reviewer, or a fresh-context peer. State the question, relevant evidence, credible alternatives, and what evidence would change the decision. Evidence-first does not require invoking every role before Advisor.\n\nDo not call it for initial investigation, routine progress, waiting, ordinary verification, planner approval, reviewer confirmation, reassurance, or completion ceremony. Treat its result as advice, not authority. Consult again only when materially new or conflicting evidence creates a different question.`\n\nexport const MAX_ADVISOR_SYSTEM_PROMPT =\n \"You are a non-binding, transcript-aware consultant to the primary lead. Answer the stated consequential question first, then give your recommendation and confidence, the transcript evidence and assumptions supporting it, the material risk, one credible alternative, and the evidence that would reverse your recommendation. The transcript may anchor you to the lead's framing, so identify any framing or assumption the session has stopped questioning. Stop after answering the focused question. Do not supervise, approve, veto, or redesign unrelated work; the lead weighs your advice against the user's intent and verified repository evidence.\"\n","import type { Model, ModelsResponse } from \"~/services/copilot/get-models\"\nimport type { Effort } from \"./reasoning-effort\"\nimport {\n advertisesEndpoint,\n fastEndpointForModel,\n} from \"./fast-endpoint\"\nimport { MAX_ADVISOR_TOOL_INSTRUCTIONS } from \"./max-profile-prompts\"\nimport { stripTrailingOneMSuffix } from \"./model-suffix\"\nimport { state } from \"./state\"\n\n// Max uses the same context threshold as Claude Code's `[1m]` accounting.\nexport const MAX_REQUIRED_CONTEXT_TOKENS = 1_000_000\n\nconst ONE_M_TOKENS = MAX_REQUIRED_CONTEXT_TOKENS\n\nfunction catalogModels(): Array<Model> {\n return state.models?.data ?? []\n}\n\nfunction catalogModel(id: string): Model | undefined {\n return catalogModels().find((model) => model.id === id)\n}\n\n\nexport const MAX_PROFILE_MODELS = Object.freeze({\n sol: \"gpt-5.6-sol\",\n luna: \"gpt-6-luna\",\n gemini: \"gemini-3.8-flash\",\n grok: \"grok-4.6\",\n opus: \"claude-opus-5.5\",\n sonnet: \"claude-sonnet-5\",\n codex: \"gpt-5.3-codex\",\n} as const)\n\nexport const MAX_PROFILE_NATIVE_AGENT_NAMES = [\n \"Explore\",\n \"Plan\",\n \"general-purpose\",\n \"implementer\",\n \"reviewer\",\n \"brainstorm\",\n \"peer-review-coordinator\",\n] as const\n\nexport type MaxProfileNativeAgentName =\n (typeof MAX_PROFILE_NATIVE_AGENT_NAMES)[number]\n\nexport const MAX_PROFILE_NATIVE_EFFORTS = Object.freeze({\n Explore: \"high\",\n Plan: \"high\",\n \"general-purpose\": \"max\",\n implementer: \"high\",\n reviewer: \"xhigh\",\n brainstorm: \"high\",\n \"peer-review-coordinator\": \"max\",\n} as const satisfies Record<MaxProfileNativeAgentName, Effort>)\n\n/** Default model family behind each native role's frontmatter. */\nexport const MAX_PROFILE_NATIVE_MODELS = Object.freeze({\n Explore: MAX_PROFILE_MODELS.luna,\n Plan: MAX_PROFILE_MODELS.sol,\n \"general-purpose\": MAX_PROFILE_MODELS.luna,\n implementer: MAX_PROFILE_MODELS.gemini,\n reviewer: MAX_PROFILE_MODELS.sonnet,\n brainstorm: MAX_PROFILE_MODELS.opus,\n \"peer-review-coordinator\": MAX_PROFILE_MODELS.luna,\n} as const satisfies Record<MaxProfileNativeAgentName, string>)\n\nexport const MAX_PROFILE_LEAD_MODEL = MAX_PROFILE_MODELS.sol\nexport const MAX_PROFILE_ADVISOR_MODEL = MAX_PROFILE_MODELS.opus\nexport const MAX_PROFILE_ADVISOR_EFFORT = \"high\" as const\nexport const MAX_PROFILE_ADVISOR_INSTRUCTIONS = MAX_ADVISOR_TOOL_INSTRUCTIONS\n\nexport function maxAdvisorModelFromPin(pinned: string | undefined, opusModel?: string): string {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : undefined\n if (base === MAX_PROFILE_MODELS.sol || base === \"gpt-6-sol\" || base === MAX_PROFILE_MODELS.opus) {\n return base\n }\n return opusModel ?? MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorPinIsValid(pinned: string | undefined): boolean {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : trimmed\n return base === undefined\n || base === \"\"\n || base === MAX_PROFILE_MODELS.sol\n || base === \"gpt-6-sol\"\n || base === MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorModelFromPinStrict(pinned: string | undefined, opusModel?: string): string {\n if (!maxAdvisorPinIsValid(pinned)) return opusModel ?? MAX_PROFILE_MODELS.opus\n return maxAdvisorModelFromPin(pinned, opusModel)\n}\n\nexport function maxStandInAvailable(): boolean {\n return usableSol(catalogModel(MAX_PROFILE_MODELS.sol))\n && maxOpusModel() !== undefined\n && (maxGrokHighModel() !== undefined || maxGeminiModel() !== undefined)\n}\nexport function maxAdvisorEffortForModel(_model: string): Effort {\n return MAX_PROFILE_ADVISOR_EFFORT\n}\n\nexport const MAX_PROFILE_NATIVE_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.grok,\n] as const)\n\nexport const MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.sol,\n \"gpt-6-sol\",\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.opus,\n] as const)\n\nexport type MaxProfileAllowedLeadModel =\n (typeof MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS)[number]\n\nexport interface MaxProfilePrerequisiteCheck {\n ok: boolean\n missing: ReadonlyArray<string>\n /** Resolved optional/third-lab assignments for the launch. */\n models: {\n sol?: Model\n luna?: Model\n gemini?: Model\n grok?: Model\n opus?: Model\n sonnet?: Model\n thirdLab?: \"gemini\" | \"grok\"\n }\n}\n\nfunction findModel(\n catalog: ModelsResponse | undefined,\n id: string,\n): Model | undefined {\n return catalog?.data?.find((model) => model.id === id)\n}\n\nfunction hasToolCalls(model: Model | undefined): boolean {\n return model?.capabilities?.supports?.tool_calls === true\n}\n\nfunction hasContextAtLeast(model: Model | undefined, tokens: number): boolean {\n return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens\n}\n\nfunction supportsEffort(model: Model | undefined, effort: Effort): boolean {\n const ladder = model?.capabilities?.supports?.reasoning_effort\n return Array.isArray(ladder) && ladder.includes(effort)\n}\n\nfunction hasUsableLimits(model: Model | undefined): boolean {\n const limits = model?.capabilities?.limits\n const prompt = limits?.max_prompt_tokens\n const output = limits?.max_output_tokens\n return (\n typeof prompt === \"number\"\n && Number.isFinite(prompt)\n && prompt > 0\n && typeof output === \"number\"\n && Number.isFinite(output)\n && output > 0\n && (limits?.max_context_window_tokens ?? 0) >= prompt\n )\n}\n\nfunction supportsEndpoint(\n model: Model | undefined,\n endpoint: \"chat\" | \"responses\" | \"messages\",\n): boolean {\n return model !== undefined && fastEndpointForModel(model) === endpoint\n}\n\nfunction validateRequiredModel(\n model: Model | undefined,\n id: string,\n requirements: ReadonlyArray<[string, boolean]>,\n missing: string[],\n): void {\n if (!model) {\n missing.push(`${id}: absent from the live catalog`)\n return\n }\n for (const [message, ok] of requirements) {\n if (!ok) missing.push(`${id}: ${message}`)\n }\n}\n\nfunction usableSol(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n )\n}\n\nfunction usableGemini(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"chat\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrok(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && supportsEffort(model, \"medium\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrokReviewer(model: Model | undefined): boolean {\n return Boolean(\n usableGrok(model)\n && supportsEffort(model, \"high\")\n && (model?.capabilities?.limits?.max_prompt_tokens ?? 0) >= 200_000,\n )\n}\n\n/**\n * Validate the fixed prerequisites for the raw `-m max` launch.\n *\n * Max is a deliberately strong, closed profile. Its lead, planning,\n * implementation, repository-review, brainstorm, and transcript-aware Advisor\n * paths must all be present before any runtime artifact is written: Sol, Luna,\n * Gemini 3.8 Flash, Sonnet 5, and Opus 5 are mandatory. Grok 4.6 is optional;\n * when present it supplies additional peer critic/reviewer coverage and the\n * preferred third-lab stand-in slot, but it is never a max lead and its sub-1M\n * context must remain undecorated.\n */\nexport function validateMaxProfilePrerequisites(\n catalog: ModelsResponse | undefined,\n): MaxProfilePrerequisiteCheck {\n const missing: string[] = []\n const sol = findModel(catalog, MAX_PROFILE_MODELS.sol)\n const luna = findModel(catalog, MAX_PROFILE_MODELS.luna)\n const gemini = findModel(catalog, MAX_PROFILE_MODELS.gemini)\n const grok = findModel(catalog, MAX_PROFILE_MODELS.grok)\n const opus = findModel(catalog, MAX_PROFILE_MODELS.opus)\n const sonnet = findModel(catalog, MAX_PROFILE_MODELS.sonnet)\n\n validateRequiredModel(\n sol,\n MAX_PROFILE_MODELS.sol,\n [\n [\"does not advertise tool_calls\", hasToolCalls(sol)],\n [\"advertised context window is below 1M\", hasContextAtLeast(sol, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(sol, \"high\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(sol, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(sol)],\n ],\n missing,\n )\n validateRequiredModel(\n luna,\n MAX_PROFILE_MODELS.luna,\n [\n [\"does not advertise tool_calls\", hasToolCalls(luna)],\n [\"advertised context window is below 1M\", hasContextAtLeast(luna, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(luna, \"high\")],\n [\"does not advertise a max reasoning effort\", supportsEffort(luna, \"max\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(luna, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(luna)],\n ],\n missing,\n )\n validateRequiredModel(\n gemini,\n MAX_PROFILE_MODELS.gemini,\n [\n [\"does not advertise tool_calls\", hasToolCalls(gemini)],\n [\"advertised context window is below 1M\", hasContextAtLeast(gemini, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(gemini, \"high\")],\n [\"does not advertise a supported Chat Completions endpoint\", supportsEndpoint(gemini, \"chat\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(gemini)],\n ],\n missing,\n )\n validateRequiredModel(\n opus,\n MAX_PROFILE_MODELS.opus,\n [\n [\"does not advertise tool_calls\", hasToolCalls(opus)],\n [\"advertised context window is below 1M\", hasContextAtLeast(opus, ONE_M_TOKENS)],\n [\"does not advertise adaptive_thinking\", opus?.capabilities?.supports?.adaptive_thinking === true],\n [\"does not advertise a high reasoning effort\", supportsEffort(opus, \"high\")],\n [\"does not advertise a supported Messages endpoint\", supportsEndpoint(opus, \"messages\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(opus)],\n ],\n missing,\n )\n validateRequiredModel(\n sonnet,\n MAX_PROFILE_MODELS.sonnet,\n [\n [\"does not advertise tool_calls\", hasToolCalls(sonnet)],\n [\"advertised context window is below 1M\", hasContextAtLeast(sonnet, ONE_M_TOKENS)],\n [\"does not advertise adaptive_thinking\", sonnet?.capabilities?.supports?.adaptive_thinking === true],\n [\"does not advertise an xhigh reasoning effort\", supportsEffort(sonnet, \"xhigh\")],\n [\"does not advertise a supported Messages endpoint\", supportsEndpoint(sonnet, \"messages\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(sonnet)],\n ],\n missing,\n )\n\n // Grok is intentionally optional. A malformed optional entry is simply\n // omitted from the max projection; it must never make launch fail or be\n // decorated as a 1M model.\n const geminiUsable = usableGemini(gemini)\n const grokUsable = usableGrok(grok)\n\n return {\n ok: missing.length === 0,\n missing,\n models: {\n sol: sol && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sol}:`)) ? sol : undefined,\n luna: luna && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.luna}:`)) ? luna : undefined,\n gemini: geminiUsable ? gemini : undefined,\n grok: grokUsable ? grok : undefined,\n opus: opus && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.opus}:`)) ? opus : undefined,\n sonnet: sonnet && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sonnet}:`)) ? sonnet : undefined,\n thirdLab: grokUsable && supportsEffort(grok, \"high\")\n ? \"grok\"\n : geminiUsable\n ? \"gemini\"\n : undefined,\n },\n }\n}\n\nexport function formatMaxPrerequisiteFailure(\n missing: ReadonlyArray<string>,\n): string {\n return (\n \"github-router claude -m max requires the following live-catalog capabilities, \"\n + \"which this account's catalog does not fully provide:\\n\"\n + missing.map((entry) => ` - ${entry}`).join(\"\\n\")\n + \"\\n\\nMax launches do not fall back to arbitrary older models. \"\n + \"Use plain `github-router claude` for the standard profile.\"\n )\n}\n\nexport function maxModelIsOneM(\n model: Model | undefined,\n): boolean {\n return (\n (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= ONE_M_TOKENS\n )\n}\n\nexport function maxModelSupportsEffort(\n model: Model | undefined,\n effort: Effort,\n): boolean {\n return supportsEffort(model, effort)\n}\n\nexport function maxModelHasUsableLimits(model: Model | undefined): boolean {\n return hasUsableLimits(model)\n}\n\nexport function maxThirdLabModel(): string | undefined {\n const gemini = catalogModel(MAX_PROFILE_MODELS.gemini)\n if (usableGemini(gemini)) return MAX_PROFILE_MODELS.gemini\n const grok = catalogModel(MAX_PROFILE_MODELS.grok)\n return usableGrok(grok) ? MAX_PROFILE_MODELS.grok : undefined\n}\n\nexport function maxGeminiModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.gemini)\n return model && usableGemini(model) ? model.id : undefined\n}\n\nexport function maxGrokModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrok(model) ? model.id : undefined\n}\n\n/** Grok replacement for max-profile surfaces that require high effort. */\nexport function maxGrokHighModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrokReviewer(model) ? model.id : undefined\n}\n\n/** Max-only replacement for any standard Gemini Pro assignment. */\nexport function maxProReplacementModel():\n | typeof MAX_PROFILE_MODELS.grok\n | typeof MAX_PROFILE_MODELS.gemini\n | undefined {\n if (maxGrokHighModel()) return MAX_PROFILE_MODELS.grok\n if (maxGeminiModel()) return MAX_PROFILE_MODELS.gemini\n return undefined\n}\n\nexport function maxOpusModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.opus)\n return model && hasContextAtLeast(model, ONE_M_TOKENS)\n && model.capabilities?.supports?.adaptive_thinking === true\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"messages\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxLunaMaxModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.luna)\n return model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"max\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxSonnetModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.sonnet)\n return model && hasContextAtLeast(model, ONE_M_TOKENS)\n && model.capabilities?.supports?.tool_calls === true\n && model.capabilities?.supports?.adaptive_thinking === true\n && supportsEffort(model, \"xhigh\")\n && supportsEndpoint(model, \"messages\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxReviewerModel(): string | undefined {\n return maxSonnetModel()\n}\n\nexport function maxCodexReviewerModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.codex)\n return model && hasToolCalls(model)\n && supportsEffort(model, \"xhigh\")\n && advertisesEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n && (model.capabilities?.limits?.max_prompt_tokens ?? 0) >= 200_000\n ? model.id\n : undefined\n}\n\nexport function maxCatalogModel(id: string): Model | undefined {\n return catalogModel(id)\n}\n\nexport function maxCatalogModels(): ReadonlyArray<Model> {\n return catalogModels()\n}"],"mappings":";;;AAeA,SAAgB,wBAAwB,IAAgC;CACtE,MAAM,QAAQ,GAAG,MAAM,eAAe;CACtC,IAAI,CAAC,SAAS,MAAM,UAAU,KAAA,GAC5B,OAAO;EAAE,MAAM;EAAI,WAAW;CAAM;CAEtC,OAAO;EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,KAAK;EAAG,WAAW;CAAK;AAC3D;;AAGA,SAAgB,4BAA4B,IAAoB;CAC9D,MAAM,EAAE,MAAM,cAAc,wBAAwB,EAAE;CACtD,OAAO,YAAY,GAAG,KAAK,QAAQ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AAEA,SAAgB,wBAA4C;CAC1D,MAAM,QAAQ,aAAa,mBAAmB,KAAK;CACnD,OAAO,SAAS,aAAa,KAAK,KAC7B,eAAe,OAAO,OAAO,KAC7B,mBAAmB,OAAO,WAAW,KACrC,gBAAgB,KAAK,MACpB,MAAM,cAAc,QAAQ,qBAAqB,MAAM,MACzD,MAAM,KACN,KAAA;AACN"}
|
|
1
|
+
{"version":3,"file":"max-profile-contract-CEn8hKb3.js","names":[],"sources":["../src/lib/max-profile-prompts.ts","../src/lib/model-suffix.ts","../src/lib/fast-endpoint.ts","../src/lib/max-profile-contract.ts"],"sourcesContent":["import type { Effort } from \"./reasoning-effort\"\n\nexport const MAX_PARALLELISM_RULE =\n \"When two or more delegated workstreams are independent and non-overlapping, issue them together; sequence them when one needs another's result or their side effects can conflict.\"\n\nexport type MaxNativePromptRole =\n | \"Explore\"\n | \"Plan\"\n | \"general-purpose\"\n | \"implementer\"\n | \"reviewer\"\n | \"brainstorm\"\n\ninterface MaxNativePromptSpec {\n capability: string\n useWhen: string\n notFor: string\n returns: string\n prompt: string\n}\n\nconst MAX_NATIVE_PROMPT_SPECS: Record<MaxNativePromptRole, MaxNativePromptSpec> = {\n Explore: {\n capability: \"read-oriented repository exploration\",\n useWhen: \"the answer requires broad, multi-file or multi-source discovery and the caller needs conclusions rather than raw context\",\n notFor: \"a narrow lookup, implementation planning, or editing\",\n returns: \"concise conclusions, load-bearing file:line evidence, checks or sources consulted, and explicit gaps\",\n prompt: \"Explore the supplied question across the actual repository. Stay within discovery: do not plan the implementation or modify files. Return concise conclusions, load-bearing file:line evidence, checks or sources consulted, and explicit gaps. Stop when the question is supported or the missing evidence is identified. You do not have Advisor or native-agent delegation tools.\",\n },\n Plan: {\n capability: \"implementation planning\",\n useWhen: \"a non-trivial change crosses interfaces, has dependency or migration ordering, preserves important invariants, or needs explicit acceptance criteria\",\n notFor: \"routine decomposition, implementation, approval, or silently deciding unresolved product choices\",\n returns: \"affected files or symbols, ordered implementation slices, invariants, risks, open decisions, acceptance criteria, and runnable verification\",\n prompt: \"Turn the supplied goal, constraints, and evidence into an actionable implementation plan. Return affected files or symbols, ordered implementation slices with real dependencies identified, invariants, risks, open decisions, acceptance criteria, and runnable verification. Surface unresolved product or architecture choices instead of deciding them silently. Stop when another agent can implement the plan without rediscovering its structure; the lead owns acceptance and execution. You do not have Advisor or native-agent delegation tools.\",\n },\n \"general-purpose\": {\n capability: \"bounded mixed investigation and execution\",\n useWhen: \"one owner should carry a multi-step outcome across several narrower kinds of work\",\n notFor: \"a narrow direct action or a task cleanly owned by one specialist\",\n returns: \"the requested outcome, changed artifacts, verification evidence, blockers, and residual risks\",\n prompt: \"Own the supplied bounded outcome end to end. Return the requested outcome, changed artifacts, verification evidence, blockers, and residual risks. Stop at the requested scope and do not absorb adjacent cleanup. Do not re-delegate the core assignment merely to repeat it; any supporting delegation must be independent, non-overlapping, and integrated and verified by you.\",\n },\n implementer: {\n capability: \"bounded coding implementation\",\n useWhen: \"the desired behavior and constraints are settled but the implementation still needs coding judgment\",\n notFor: \"unresolved product behavior, architecture choices, or an unbounded investigation\",\n returns: \"a coherent scoped change, files changed, observable behavior, checks and results, blockers, and unresolved risks\",\n prompt: \"Implement the settled desired behavior within the supplied scope and repository conventions. Return the files changed, observable behavior, checks and results, blockers, and unresolved risks. Stop and report when ambiguity would materially change product behavior, architecture, or scope. Do not re-delegate the core assignment merely to repeat it; any supporting delegation must be independent, non-overlapping, and integrated and verified by you.\",\n },\n reviewer: {\n capability: \"repository-aware verification and reproduction\",\n useWhen: \"an implementation or failure already exists and assessment requires repository navigation, commands, tests, or runtime evidence\",\n notFor: \"a stateless review of an already self-contained artifact or authoring the fix\",\n returns: \"a calibrated verdict, severity-ranked findings, file:line evidence, concrete failure scenarios, checks and results, and unverified areas\",\n prompt: \"Assess the supplied artifact against its intent and the actual repository or runtime state. Return a calibrated verdict, severity-ranked findings, file:line evidence, concrete failure scenarios, checks and results, and unverified areas. Distinguish no findings from checks not run. Do not modify files or act as an approval gate. Stop when material claims have been tested to the available extent; the lead owns remediation and go/no-go. You do not have Advisor or native-agent delegation tools.\",\n },\n brainstorm: {\n capability: \"divergent repository-feasible option generation\",\n useWhen: \"materially different approaches remain credible before implementation planning\",\n notFor: \"a settled approach, proven fact, implementation plan, or code change\",\n returns: \"distinct options, trade-offs, assumptions, failure modes, discriminating evidence, and a recommendation only when supported\",\n prompt: \"Explore the useful design space for the supplied open decision. Return materially distinct repository-feasible options, trade-offs, assumptions, failure modes, discriminating evidence, and a recommendation only when the available evidence supports one. Do not turn the result into an implementation plan or modify files. Stop once the useful alternatives are covered or one option clearly dominates; the lead owns the decision. You do not have Advisor or native-agent delegation tools.\",\n },\n}\n\nexport function maxNativeDescription(\n role: MaxNativePromptRole,\n model: string,\n effort: Effort,\n): string {\n const spec = MAX_NATIVE_PROMPT_SPECS[role]\n return `Max-profile ${spec.capability} subagent running ${model} at ${effort} effort. Use when: ${spec.useWhen}. Not for: ${spec.notFor}. Returns: ${spec.returns}.`\n}\n\nexport function maxNativePrompt(role: MaxNativePromptRole): string {\n return MAX_NATIVE_PROMPT_SPECS[role].prompt\n}\n\nexport const MAX_COORDINATOR_DESCRIPTION =\n \"Max-profile peer-review coordinator running gpt-6-luna at maximum effort. Use when: a consequential self-contained plan, design, or diff has at least two distinct unresolved risk lenses for which independent fresh-context review could change the decision. Not for: routine second opinions, repository exploration or execution, facts a focused check can settle, or repeating one generic review across models. Returns: a provenance-preserving synthesis of material findings, disagreements, evidence gaps, and the cheapest checks that can settle them.\"\n\nexport const MAX_COORDINATOR_PROMPT =\n `Coordinate independent fresh-context review of the self-contained artifact and constraints supplied by the caller. You have peer tools only and cannot inspect the repository, transcript, or runtime, so identify missing material instead of guessing. Select the smallest sufficient peer set: use one peer when one lens is enough, and multiple peers only for distinct unresolved risk dimensions. Give every peer a non-overlapping lens; do not send one generic brief to several models or duplicate a same-family lens as a vote. ${MAX_PARALLELISM_RULE} Deduplicate findings while preserving provenance and genuine disagreement. Return severity-ranked material findings, concrete failure scenarios, confidence, evidence gaps, and the cheapest repository check or test that can settle each disagreement. Do not count votes or issue an evidence-free approval. Peer output is advisory; the lead owns go/no-go and remediation.`\n\nexport type MaxPeerKind = \"strategic critic\" | \"line-level reviewer\"\n\nexport interface MaxPeerPromptOptions {\n name: string\n model: string\n kind: MaxPeerKind\n lens: string\n useWhen: string\n notFor: string\n}\n\nexport function maxPeerDescription(opts: MaxPeerPromptOptions): string {\n return `Max-profile ${opts.kind} backed by ${opts.model}. Lens: ${opts.lens}. Use when: ${opts.useWhen}. Not for: ${opts.notFor}. Cold-start: it has no repository or transcript access and sees only the supplied prompt, context, and images. Returns: only material findings, or an explicit no material finding result.`\n}\n\nexport function maxPeerInstructions(opts: MaxPeerPromptOptions): string {\n const locationRule = opts.kind === \"line-level reviewer\"\n ? \"For each finding, cite a location from the supplied artifact, give severity and a concrete failure scenario, and suggest the smallest correction.\"\n : \"For each finding, identify the failed assumption or invariant, its consequence, and the cheapest evidence that would confirm or refute it.\"\n return `You are ${opts.name}, a fresh-context ${opts.kind} running on ${opts.model}. Apply this lens: ${opts.lens}. You have no repository or transcript access; use only the supplied artifact, constraints, and images. If material context is missing, identify it instead of guessing. ${locationRule} Treat supplied locations as citations to the artifact, not proof of repository state. Report only material findings; \"no material finding\" is a valid result. Stop when the requested lens is covered without padding or manufactured objections.`\n}\n\nexport const MAX_ADVISOR_TOOL_INSTRUCTIONS = `# Advisor Tool\n\nYou have access to an optional, primary-lead-only, transcript-aware Max Advisor. Transcript awareness makes it useful for detecting framing drift, changed assumptions, and a stuck strategy; it is not an independent repository verifier, supervisor, approver, workflow gate, or substitute for your own reasoning. You keep decision ownership.\n\nUse it for one precise consequential uncertainty that remains after proportionate direct investigation and cannot be settled by repository evidence, a focused command or test, Plan, reviewer, or a fresh-context peer. State the question, relevant evidence, credible alternatives, and what evidence would change the decision. Evidence-first does not require invoking every role before Advisor.\n\nDo not call it for initial investigation, routine progress, waiting, ordinary verification, planner approval, reviewer confirmation, reassurance, or completion ceremony. Treat its result as advice, not authority. Consult again only when materially new or conflicting evidence creates a different question.`\n\nexport const MAX_ADVISOR_SYSTEM_PROMPT =\n \"You are a non-binding, transcript-aware consultant to the primary lead. Answer the stated consequential question first, then give your recommendation and confidence, the transcript evidence and assumptions supporting it, the material risk, one credible alternative, and the evidence that would reverse your recommendation. The transcript may anchor you to the lead's framing, so identify any framing or assumption the session has stopped questioning. Stop after answering the focused question. Do not supervise, approve, veto, or redesign unrelated work; the lead weighs your advice against the user's intent and verified repository evidence.\"\n","/**\n * Normalize Claude Code's local 1M-context decoration at model boundaries.\n *\n * `[1m]` is a client-side accounting marker, not part of a Copilot catalog id.\n * Claude Code can append its own marker to a picker value that is already\n * decorated by the router, producing a reachable doubled suffix. Keep the\n * helper dependency-free so launch/profile code and request preprocessing use\n * exactly the same trailing-suffix rule without an import cycle.\n */\nexport interface TrailingOneMSuffix {\n base: string\n hadSuffix: boolean\n}\n\n/** Strip every trailing `[1m]` marker, case-insensitively. */\nexport function stripTrailingOneMSuffix(id: string): TrailingOneMSuffix {\n const match = id.match(/(?:\\[1m\\])+$/i)\n if (!match || match.index === undefined) {\n return { base: id, hadSuffix: false }\n }\n return { base: id.slice(0, match.index), hadSuffix: true }\n}\n\n/** Reapply at most one canonical `[1m]` marker when the input had one. */\nexport function normalizeTrailingOneMSuffix(id: string): string {\n const { base, hadSuffix } = stripTrailingOneMSuffix(id)\n return hadSuffix ? `${base}[1m]` : base\n}\n\n/** Append one marker without ever creating a doubled suffix. */\nexport function withTrailingOneMSuffix(id: string): string {\n const { base } = stripTrailingOneMSuffix(id)\n return `${base}[1m]`\n}\n","import type { Model } from \"~/services/copilot/get-models\"\n\n// Fast endpoint policy is intentionally kept separate from the standard\n// pickEndpoint() resolver. See fastEndpointRequirement below.\n\n/** Endpoint clients used by the fast profile's fixed roster. */\nexport type FastEndpoint = \"chat\" | \"responses\" | \"messages\"\n\nconst ENDPOINTS: Readonly<Record<FastEndpoint, ReadonlySet<string>>> = {\n chat: new Set([\"/chat/completions\", \"/v1/chat/completions\"]),\n responses: new Set([\"/responses\", \"/v1/responses\"]),\n messages: new Set([\"/messages\", \"/v1/messages\"]),\n}\n\n/**\n * Return the endpoint mandated by a fast-profile roster model.\n *\n * This is intentionally independent of the standard `pickEndpoint`: that\n * resolver prefers chat when a catalog entry advertises both clients, while\n * fast roles have a fixed provider contract. Gemini stays on chat; Luna, Sol,\n * and Grok stay on Responses; the Opus Oracle stays on native Messages.\n * Unknown ids return undefined so a fast caller cannot guess a transport.\n */\nexport function fastEndpointRequirement(modelId: string): FastEndpoint | undefined {\n const id = modelId.replace(/(?:\\[1m\\])+$/i, \"\")\n if (id === \"gemini-3.8-flash\") return \"chat\"\n if (id === \"gpt-6-luna\" || id === \"gpt-5.6-luna\" || id === \"gpt-6-sol\" || id === \"gpt-5.6-sol\" || id === \"gpt-6.1-sol\" || id === \"gpt-6.2-sol\" || id === \"grok-4.6\" || id === \"grok-4.7\" || id === \"gpt-6-astra\") {\n return \"responses\"\n }\n if (id === \"claude-opus-5.5\" || id === \"claude-opus-5-5\" || id === \"claude-opus-5.5\" || id === \"claude-sonnet-5\") return \"messages\"\n return undefined\n}\n\n/**\n * Resolve the fixed fast transport only when the catalog explicitly advertises\n * the required endpoint. An entry that advertises both still resolves to the\n * policy endpoint, regardless of advertisement order.\n */\nexport function advertisesEndpoint(\n model: Model | undefined,\n endpoint: FastEndpoint,\n): boolean {\n const advertised = model?.supported_endpoints\n return Array.isArray(advertised)\n && advertised.some((value) => ENDPOINTS[endpoint].has(value))\n}\n\nexport function fastEndpointForModel(model: Model): FastEndpoint | undefined {\n const required = fastEndpointRequirement(model.id)\n if (!required) return undefined\n return advertisesEndpoint(model, required) ? required : undefined\n}\n\n/** Resolve a fast endpoint from a catalog id, without selecting a fallback. */\nexport function fastEndpointForCatalogId(\n modelId: string,\n catalog: ReadonlyArray<Model> | undefined,\n): FastEndpoint | undefined {\n const found = catalog?.find((model) => model.id === modelId)\n return found ? fastEndpointForModel(found) : undefined\n}\n\n/** Human-readable endpoint name for prerequisite diagnostics. */\nexport function fastEndpointLabel(endpoint: FastEndpoint): string {\n return endpoint === \"chat\"\n ? \"Chat Completions\"\n : endpoint === \"responses\"\n ? \"Responses\"\n : \"Messages\"\n}\n","import type { Model, ModelsResponse } from \"~/services/copilot/get-models\"\nimport type { Effort } from \"./reasoning-effort\"\nimport {\n advertisesEndpoint,\n fastEndpointForModel,\n} from \"./fast-endpoint\"\nimport { MAX_ADVISOR_TOOL_INSTRUCTIONS } from \"./max-profile-prompts\"\nimport { stripTrailingOneMSuffix } from \"./model-suffix\"\nimport { state } from \"./state\"\n\n// Max uses the same context threshold as Claude Code's `[1m]` accounting.\nexport const MAX_REQUIRED_CONTEXT_TOKENS = 1_000_000\n\nconst ONE_M_TOKENS = MAX_REQUIRED_CONTEXT_TOKENS\n\nfunction catalogModels(): Array<Model> {\n return state.models?.data ?? []\n}\n\nfunction catalogModel(id: string): Model | undefined {\n return catalogModels().find((model) => model.id === id)\n}\n\n\nexport const MAX_PROFILE_MODELS = Object.freeze({\n sol: \"gpt-5.6-sol\",\n luna: \"gpt-6-luna\",\n gemini: \"gemini-3.8-flash\",\n grok: \"grok-4.6\",\n opus: \"claude-opus-5.5\",\n sonnet: \"claude-sonnet-5\",\n codex: \"gpt-5.3-codex\",\n} as const)\n\nexport const MAX_PROFILE_NATIVE_AGENT_NAMES = [\n \"Explore\",\n \"Plan\",\n \"general-purpose\",\n \"implementer\",\n \"reviewer\",\n \"brainstorm\",\n \"peer-review-coordinator\",\n] as const\n\nexport type MaxProfileNativeAgentName =\n (typeof MAX_PROFILE_NATIVE_AGENT_NAMES)[number]\n\nexport const MAX_PROFILE_NATIVE_EFFORTS = Object.freeze({\n Explore: \"high\",\n Plan: \"high\",\n \"general-purpose\": \"max\",\n implementer: \"high\",\n reviewer: \"xhigh\",\n brainstorm: \"high\",\n \"peer-review-coordinator\": \"max\",\n} as const satisfies Record<MaxProfileNativeAgentName, Effort>)\n\n/** Default model family behind each native role's frontmatter. */\nexport const MAX_PROFILE_NATIVE_MODELS = Object.freeze({\n Explore: MAX_PROFILE_MODELS.luna,\n Plan: MAX_PROFILE_MODELS.sol,\n \"general-purpose\": MAX_PROFILE_MODELS.luna,\n implementer: MAX_PROFILE_MODELS.gemini,\n reviewer: MAX_PROFILE_MODELS.sonnet,\n brainstorm: MAX_PROFILE_MODELS.opus,\n \"peer-review-coordinator\": MAX_PROFILE_MODELS.luna,\n} as const satisfies Record<MaxProfileNativeAgentName, string>)\n\nexport const MAX_PROFILE_LEAD_MODEL = MAX_PROFILE_MODELS.sol\nexport const MAX_PROFILE_ADVISOR_MODEL = MAX_PROFILE_MODELS.opus\nexport const MAX_PROFILE_ADVISOR_EFFORT = \"high\" as const\nexport const MAX_PROFILE_ADVISOR_INSTRUCTIONS = MAX_ADVISOR_TOOL_INSTRUCTIONS\n\nexport function maxAdvisorModelFromPin(pinned: string | undefined, opusModel?: string): string {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : undefined\n if (base === MAX_PROFILE_MODELS.sol || base === \"gpt-6-sol\" || base === MAX_PROFILE_MODELS.opus) {\n return base\n }\n return opusModel ?? MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorPinIsValid(pinned: string | undefined): boolean {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : trimmed\n return base === undefined\n || base === \"\"\n || base === MAX_PROFILE_MODELS.sol\n || base === \"gpt-6-sol\"\n || base === MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorModelFromPinStrict(pinned: string | undefined, opusModel?: string): string {\n if (!maxAdvisorPinIsValid(pinned)) return opusModel ?? MAX_PROFILE_MODELS.opus\n return maxAdvisorModelFromPin(pinned, opusModel)\n}\n\nexport function maxStandInAvailable(): boolean {\n return usableSol(catalogModel(MAX_PROFILE_MODELS.sol))\n && maxOpusModel() !== undefined\n && (maxGrokHighModel() !== undefined || maxGeminiModel() !== undefined)\n}\nexport function maxAdvisorEffortForModel(_model: string): Effort {\n return MAX_PROFILE_ADVISOR_EFFORT\n}\n\nexport const MAX_PROFILE_NATIVE_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.grok,\n] as const)\n\nexport const MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.sol,\n \"gpt-6-sol\",\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.opus,\n] as const)\n\nexport type MaxProfileAllowedLeadModel =\n (typeof MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS)[number]\n\nexport interface MaxProfilePrerequisiteCheck {\n ok: boolean\n missing: ReadonlyArray<string>\n /** Resolved optional/third-lab assignments for the launch. */\n models: {\n sol?: Model\n luna?: Model\n gemini?: Model\n grok?: Model\n opus?: Model\n sonnet?: Model\n thirdLab?: \"gemini\" | \"grok\"\n }\n}\n\nfunction findModel(\n catalog: ModelsResponse | undefined,\n id: string,\n): Model | undefined {\n return catalog?.data?.find((model) => model.id === id)\n}\n\nfunction hasToolCalls(model: Model | undefined): boolean {\n return model?.capabilities?.supports?.tool_calls === true\n}\n\nfunction hasContextAtLeast(model: Model | undefined, tokens: number): boolean {\n return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens\n}\n\nfunction supportsEffort(model: Model | undefined, effort: Effort): boolean {\n const ladder = model?.capabilities?.supports?.reasoning_effort\n return Array.isArray(ladder) && ladder.includes(effort)\n}\n\nfunction hasUsableLimits(model: Model | undefined): boolean {\n const limits = model?.capabilities?.limits\n const prompt = limits?.max_prompt_tokens\n const output = limits?.max_output_tokens\n return (\n typeof prompt === \"number\"\n && Number.isFinite(prompt)\n && prompt > 0\n && typeof output === \"number\"\n && Number.isFinite(output)\n && output > 0\n && (limits?.max_context_window_tokens ?? 0) >= prompt\n )\n}\n\nfunction supportsEndpoint(\n model: Model | undefined,\n endpoint: \"chat\" | \"responses\" | \"messages\",\n): boolean {\n return model !== undefined && fastEndpointForModel(model) === endpoint\n}\n\nfunction validateRequiredModel(\n model: Model | undefined,\n id: string,\n requirements: ReadonlyArray<[string, boolean]>,\n missing: string[],\n): void {\n if (!model) {\n missing.push(`${id}: absent from the live catalog`)\n return\n }\n for (const [message, ok] of requirements) {\n if (!ok) missing.push(`${id}: ${message}`)\n }\n}\n\nfunction usableSol(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n )\n}\n\nfunction usableGemini(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"chat\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrok(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && supportsEffort(model, \"medium\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrokReviewer(model: Model | undefined): boolean {\n return Boolean(\n usableGrok(model)\n && supportsEffort(model, \"high\")\n && (model?.capabilities?.limits?.max_prompt_tokens ?? 0) >= 200_000,\n )\n}\n\n/**\n * Validate the fixed prerequisites for the raw `-m max` launch.\n *\n * Max is a deliberately strong, closed profile. Its lead, planning,\n * implementation, repository-review, brainstorm, and transcript-aware Advisor\n * paths must all be present before any runtime artifact is written: Sol, Luna,\n * Gemini 3.8 Flash, Sonnet 5, and Opus 5 are mandatory. Grok 4.6 is optional;\n * when present it supplies additional peer critic/reviewer coverage and the\n * preferred third-lab stand-in slot, but it is never a max lead and its sub-1M\n * context must remain undecorated.\n */\nexport function validateMaxProfilePrerequisites(\n catalog: ModelsResponse | undefined,\n): MaxProfilePrerequisiteCheck {\n const missing: string[] = []\n const sol = findModel(catalog, MAX_PROFILE_MODELS.sol)\n const luna = findModel(catalog, MAX_PROFILE_MODELS.luna)\n const gemini = findModel(catalog, MAX_PROFILE_MODELS.gemini)\n const grok = findModel(catalog, MAX_PROFILE_MODELS.grok)\n const opus = findModel(catalog, MAX_PROFILE_MODELS.opus)\n const sonnet = findModel(catalog, MAX_PROFILE_MODELS.sonnet)\n\n validateRequiredModel(\n sol,\n MAX_PROFILE_MODELS.sol,\n [\n [\"does not advertise tool_calls\", hasToolCalls(sol)],\n [\"advertised context window is below 1M\", hasContextAtLeast(sol, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(sol, \"high\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(sol, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(sol)],\n ],\n missing,\n )\n validateRequiredModel(\n luna,\n MAX_PROFILE_MODELS.luna,\n [\n [\"does not advertise tool_calls\", hasToolCalls(luna)],\n [\"advertised context window is below 1M\", hasContextAtLeast(luna, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(luna, \"high\")],\n [\"does not advertise a max reasoning effort\", supportsEffort(luna, \"max\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(luna, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(luna)],\n ],\n missing,\n )\n validateRequiredModel(\n gemini,\n MAX_PROFILE_MODELS.gemini,\n [\n [\"does not advertise tool_calls\", hasToolCalls(gemini)],\n [\"advertised context window is below 1M\", hasContextAtLeast(gemini, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(gemini, \"high\")],\n [\"does not advertise a supported Chat Completions endpoint\", supportsEndpoint(gemini, \"chat\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(gemini)],\n ],\n missing,\n )\n validateRequiredModel(\n opus,\n MAX_PROFILE_MODELS.opus,\n [\n [\"does not advertise tool_calls\", hasToolCalls(opus)],\n [\"advertised context window is below 1M\", hasContextAtLeast(opus, ONE_M_TOKENS)],\n [\"does not advertise adaptive_thinking\", opus?.capabilities?.supports?.adaptive_thinking === true],\n [\"does not advertise a high reasoning effort\", supportsEffort(opus, \"high\")],\n [\"does not advertise a supported Messages endpoint\", supportsEndpoint(opus, \"messages\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(opus)],\n ],\n missing,\n )\n validateRequiredModel(\n sonnet,\n MAX_PROFILE_MODELS.sonnet,\n [\n [\"does not advertise tool_calls\", hasToolCalls(sonnet)],\n [\"advertised context window is below 1M\", hasContextAtLeast(sonnet, ONE_M_TOKENS)],\n [\"does not advertise adaptive_thinking\", sonnet?.capabilities?.supports?.adaptive_thinking === true],\n [\"does not advertise an xhigh reasoning effort\", supportsEffort(sonnet, \"xhigh\")],\n [\"does not advertise a supported Messages endpoint\", supportsEndpoint(sonnet, \"messages\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(sonnet)],\n ],\n missing,\n )\n\n // Grok is intentionally optional. A malformed optional entry is simply\n // omitted from the max projection; it must never make launch fail or be\n // decorated as a 1M model.\n const geminiUsable = usableGemini(gemini)\n const grokUsable = usableGrok(grok)\n\n return {\n ok: missing.length === 0,\n missing,\n models: {\n sol: sol && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sol}:`)) ? sol : undefined,\n luna: luna && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.luna}:`)) ? luna : undefined,\n gemini: geminiUsable ? gemini : undefined,\n grok: grokUsable ? grok : undefined,\n opus: opus && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.opus}:`)) ? opus : undefined,\n sonnet: sonnet && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sonnet}:`)) ? sonnet : undefined,\n thirdLab: grokUsable && supportsEffort(grok, \"high\")\n ? \"grok\"\n : geminiUsable\n ? \"gemini\"\n : undefined,\n },\n }\n}\n\nexport function formatMaxPrerequisiteFailure(\n missing: ReadonlyArray<string>,\n): string {\n return (\n \"github-router claude -m max requires the following live-catalog capabilities, \"\n + \"which this account's catalog does not fully provide:\\n\"\n + missing.map((entry) => ` - ${entry}`).join(\"\\n\")\n + \"\\n\\nMax launches do not fall back to arbitrary older models. \"\n + \"Use plain `github-router claude` for the standard profile.\"\n )\n}\n\nexport function maxModelIsOneM(\n model: Model | undefined,\n): boolean {\n return (\n (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= ONE_M_TOKENS\n )\n}\n\nexport function maxModelSupportsEffort(\n model: Model | undefined,\n effort: Effort,\n): boolean {\n return supportsEffort(model, effort)\n}\n\nexport function maxModelHasUsableLimits(model: Model | undefined): boolean {\n return hasUsableLimits(model)\n}\n\nexport function maxThirdLabModel(): string | undefined {\n const gemini = catalogModel(MAX_PROFILE_MODELS.gemini)\n if (usableGemini(gemini)) return MAX_PROFILE_MODELS.gemini\n const grok = catalogModel(MAX_PROFILE_MODELS.grok)\n return usableGrok(grok) ? MAX_PROFILE_MODELS.grok : undefined\n}\n\nexport function maxGeminiModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.gemini)\n return model && usableGemini(model) ? model.id : undefined\n}\n\nexport function maxGrokModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrok(model) ? model.id : undefined\n}\n\n/** Grok replacement for max-profile surfaces that require high effort. */\nexport function maxGrokHighModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrokReviewer(model) ? model.id : undefined\n}\n\n/** Max-only replacement for any standard Gemini Pro assignment. */\nexport function maxProReplacementModel():\n | typeof MAX_PROFILE_MODELS.grok\n | typeof MAX_PROFILE_MODELS.gemini\n | undefined {\n if (maxGrokHighModel()) return MAX_PROFILE_MODELS.grok\n if (maxGeminiModel()) return MAX_PROFILE_MODELS.gemini\n return undefined\n}\n\nexport function maxOpusModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.opus)\n return model && hasContextAtLeast(model, ONE_M_TOKENS)\n && model.capabilities?.supports?.adaptive_thinking === true\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"messages\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxLunaMaxModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.luna)\n return model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"max\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxSonnetModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.sonnet)\n return model && hasContextAtLeast(model, ONE_M_TOKENS)\n && model.capabilities?.supports?.tool_calls === true\n && model.capabilities?.supports?.adaptive_thinking === true\n && supportsEffort(model, \"xhigh\")\n && supportsEndpoint(model, \"messages\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxReviewerModel(): string | undefined {\n return maxSonnetModel()\n}\n\nexport function maxCodexReviewerModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.codex)\n return model && hasToolCalls(model)\n && supportsEffort(model, \"xhigh\")\n && advertisesEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n && (model.capabilities?.limits?.max_prompt_tokens ?? 0) >= 200_000\n ? model.id\n : undefined\n}\n\nexport function maxCatalogModel(id: string): Model | undefined {\n return catalogModel(id)\n}\n\nexport function maxCatalogModels(): ReadonlyArray<Model> {\n return catalogModels()\n}"],"mappings":";;AAEA,MAAa,uBACX;AAkBF,MAAM,0BAA4E;CAChF,SAAS;EACP,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,SAAS;EACT,QAAQ;CACV;CACA,MAAM;EACJ,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,SAAS;EACT,QAAQ;CACV;CACA,mBAAmB;EACjB,YAAY;EACZ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AAO,KAC7B,iBAAiB,OAAO,UAAU,KAClC,gBAAgB,KAAK,IACtB,MAAM,KACN,KAAA;AACN;AAEA,SAAgB,mBAAuC;CACrD,OAAO,eAAe;AACxB;AAEA,SAAgB,wBAA4C;CAC1D,MAAM,QAAQ,aAAa,mBAAmB,KAAK;CACnD,OAAO,SAAS,aAAa,KAAK,KAC7B,eAAe,OAAO,OAAO,KAC7B,mBAAmB,OAAO,WAAW,KACrC,gBAAgB,KAAK,MACpB,MAAM,cAAc,QAAQ,qBAAqB,MAAM,MACzD,MAAM,KACN,KAAA;AACN"}
|
|
@@ -5,10 +5,10 @@ import { t as state } from "./state-CCGDJ43X.js";
|
|
|
5
5
|
import { C as copilotHeaders, E as githubAgentHeaders, S as copilotBaseUrl, T as githubAgentGraphQLHeaders, _ as isAllowedCopilotHost, b as GITHUB_API_BASE_URL, f as resolveModel, i as tryRefreshAndRetry, p as sleep$3, v as HTTPError, w as copilotVersion, x as GITHUB_GRAPHQL_URL } from "./token-CKPOBdO0.js";
|
|
6
6
|
import { a as withTransientRetry, i as sanitizeTransportText, n as classifyTransportError, r as fetchWithTransientRetry } from "./upstream-retry-VNR-bCuT.js";
|
|
7
7
|
import { a as parseBoolEnv, d as runManagedExeCapture, o as parseIntEnv, s as resolveExecutable } from "./exec-BC0MAnoA.js";
|
|
8
|
-
import {
|
|
9
|
-
import { A as CHEAPEST2_PROFILE_MODELS, C as localContractFor, F as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN, I as CHEAPEST_PROFILE_MODELS, M as CHEAPEST_PROFILE_ADVISOR_MODEL, N as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT, P as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX, T as LOCAL_PROFILE_LEAD_MODEL, _ as isBalancedFamily, a as decidePromptSubmitV2, b as isLocalFamily, c as CHEAPEST_REWRITE_EFFORT, f as balancedContractFor, g as displayModelName, h as consultIsLocalTransport, k as LOCAL_CONSULT_MAX_OUTPUT_TOKENS, m as cheapestRewriteModelFor, p as cheapestContractFor, t as buildStaticPack, u as isCheapestRewriteDisabledEnv, v as isCheapestFamily, w as BALANCED2_PROFILE_MODELS, x as isPinnedLaunchProfile, y as isCheaplocalProfile } from "./static-context-pack-BKFelEbM.js";
|
|
8
|
+
import { A as maxPeerDescription, S as normalizeTrailingOneMSuffix, b as fastEndpointForCatalogId, f as maxCodexReviewerModel, g as maxProReplacementModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, j as maxPeerInstructions, m as maxGrokModel, p as maxGeminiModel, r as MAX_PROFILE_LEAD_MODEL, v as maxSonnetModel, w as MAX_ADVISOR_SYSTEM_PROMPT, x as fastEndpointForModel } from "./max-profile-contract-CEn8hKb3.js";
|
|
10
9
|
import { r as BALANCED_PROFILE_MODELS } from "./balanced-profile-contract-B6pSoWjm.js";
|
|
11
|
-
import {
|
|
10
|
+
import { C as localContractFor, F as CHEAPEST_PROFILE_MODELS, M as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT, N as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX, O as LOCAL_CONSULT_MAX_OUTPUT_TOKENS, P as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN, R as BALANCED2_PROFILE_MODELS, _ as isBalancedFamily, a as decidePromptSubmitV2, b as isLocalFamily, c as CHEAPEST_REWRITE_EFFORT, f as balancedContractFor, g as displayModelName, h as consultIsLocalTransport, j as CHEAPEST_PROFILE_ADVISOR_MODEL, k as CHEAPEST2_PROFILE_MODELS, m as cheapestRewriteModelFor, p as cheapestContractFor, t as buildStaticPack, u as isCheapestRewriteDisabledEnv, v as isCheapestFamily, w as LOCAL_PROFILE_LEAD_MODEL, x as isPinnedLaunchProfile, y as isCheaplocalProfile } from "./static-context-pack-DdQpWwQN.js";
|
|
11
|
+
import { a as FAST_PROFILE_ASTRA_MODEL, c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, f as FAST_PROFILE_ORACLE_EFFORT, n as FAST_PROFILE_ADVISOR_EFFORT, p as FAST_PROFILE_ORACLE_MODEL, r as FAST_PROFILE_ADVISOR_MODEL, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-BLnKg0Ay.js";
|
|
12
12
|
import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-COZhARmE.js";
|
|
13
13
|
import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-Bpa4BId8.js";
|
|
14
14
|
import { n as ArtifactError, r as applyInsecureTls, t as ArtifactClient } from "./client-Bjp3XAMK.js";
|
|
@@ -39,6 +39,41 @@ import { Type } from "typebox";
|
|
|
39
39
|
import "partial-json";
|
|
40
40
|
import { Compile } from "typebox/compile";
|
|
41
41
|
import { Value } from "typebox/value";
|
|
42
|
+
// src/lib/local-consult-redaction.ts
|
|
43
|
+
/**
|
|
44
|
+
* The two halves of the redaction contract that surrounds a local consult.
|
|
45
|
+
*
|
|
46
|
+
* A leaf module on purpose: these strings are prompt text, and the prompt
|
|
47
|
+
* builders (`claude-md-injection`, `codex-mcp-config`) must be able to embed
|
|
48
|
+
* them without importing `local-egress`, which drags the Copilot service layer
|
|
49
|
+
* into launch-time prose generation. `local-egress` re-exports both, so a
|
|
50
|
+
* caller that already holds the egress graph imports them from there.
|
|
51
|
+
*
|
|
52
|
+
* Nothing here names the endpoint, a model, a window or an effort: the
|
|
53
|
+
* instruction is about what the caller puts in the brief, and it must read the
|
|
54
|
+
* same on every front-end.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* One line on every caller-facing local-consult surface: redact before you
|
|
58
|
+
* write.
|
|
59
|
+
*
|
|
60
|
+
* A prompt instruction, not a filter. The proxy cannot tell a credential from
|
|
61
|
+
* an identifier, so a mechanical scrub would either miss secrets or corrupt the
|
|
62
|
+
* code excerpts the consult depends on; the caller is the only party holding
|
|
63
|
+
* the context that distinguishes them. It names the shapes that matter and
|
|
64
|
+
* nothing about the endpoint, so it reads the same on the Advisor, the Oracle,
|
|
65
|
+
* and both of their consultants' own prompts.
|
|
66
|
+
*/
|
|
67
|
+
const LOCAL_CONSULT_REDACTION_LINE = "Replace every credential, token, key, password, and connection string with a placeholder, and keep secret file contents out of the transcript: the consultant needs the shape of the problem, never the value.";
|
|
68
|
+
/**
|
|
69
|
+
* The consultant half of {@link LOCAL_CONSULT_REDACTION_LINE}.
|
|
70
|
+
*
|
|
71
|
+
* Both sides carry it because the instruction is only half a contract on one
|
|
72
|
+
* side: a consultant that asks for the real value would undo the caller's care,
|
|
73
|
+
* and a consultant that treats a placeholder as a literal string would answer
|
|
74
|
+
* the wrong question.
|
|
75
|
+
*/
|
|
76
|
+
const LOCAL_CONSULT_REDACTION_NOTE = "Any credential in the material you receive has been replaced with a placeholder; treat it as an unknown value and do not ask for the real one.";
|
|
42
77
|
// src/lib/cheap-profile-contract.ts
|
|
43
78
|
/**
|
|
44
79
|
* Fixed identities for the literal `github-router claude -m cheap` and
|
|
@@ -731,41 +766,6 @@ function collapsePathKeys(env) {
|
|
|
731
766
|
env[process.platform === "win32" ? "Path" : "PATH"] = bestValue;
|
|
732
767
|
return env;
|
|
733
768
|
}
|
|
734
|
-
// src/lib/local-consult-redaction.ts
|
|
735
|
-
/**
|
|
736
|
-
* The two halves of the redaction contract that surrounds a local consult.
|
|
737
|
-
*
|
|
738
|
-
* A leaf module on purpose: these strings are prompt text, and the prompt
|
|
739
|
-
* builders (`claude-md-injection`, `codex-mcp-config`) must be able to embed
|
|
740
|
-
* them without importing `local-egress`, which drags the Copilot service layer
|
|
741
|
-
* into launch-time prose generation. `local-egress` re-exports both, so a
|
|
742
|
-
* caller that already holds the egress graph imports them from there.
|
|
743
|
-
*
|
|
744
|
-
* Nothing here names the endpoint, a model, a window or an effort: the
|
|
745
|
-
* instruction is about what the caller puts in the brief, and it must read the
|
|
746
|
-
* same on every front-end.
|
|
747
|
-
*/
|
|
748
|
-
/**
|
|
749
|
-
* One line on every caller-facing local-consult surface: redact before you
|
|
750
|
-
* write.
|
|
751
|
-
*
|
|
752
|
-
* A prompt instruction, not a filter. The proxy cannot tell a credential from
|
|
753
|
-
* an identifier, so a mechanical scrub would either miss secrets or corrupt the
|
|
754
|
-
* code excerpts the consult depends on; the caller is the only party holding
|
|
755
|
-
* the context that distinguishes them. It names the shapes that matter and
|
|
756
|
-
* nothing about the endpoint, so it reads the same on the Advisor, the Oracle,
|
|
757
|
-
* and both of their consultants' own prompts.
|
|
758
|
-
*/
|
|
759
|
-
const LOCAL_CONSULT_REDACTION_LINE = "Replace every credential, token, key, password, and connection string with a placeholder, and keep secret file contents out of the transcript: the consultant needs the shape of the problem, never the value.";
|
|
760
|
-
/**
|
|
761
|
-
* The consultant half of {@link LOCAL_CONSULT_REDACTION_LINE}.
|
|
762
|
-
*
|
|
763
|
-
* Both sides carry it because the instruction is only half a contract on one
|
|
764
|
-
* side: a consultant that asks for the real value would undo the caller's care,
|
|
765
|
-
* and a consultant that treats a placeholder as a literal string would answer
|
|
766
|
-
* the wrong question.
|
|
767
|
-
*/
|
|
768
|
-
const LOCAL_CONSULT_REDACTION_NOTE = "Any credential in the material you receive has been replaced with a placeholder; treat it as an unknown value and do not ask for the real one.";
|
|
769
769
|
// src/lib/artifact/tools.ts
|
|
770
770
|
const ARTIFACT_GROUP = "peers";
|
|
771
771
|
const ARTIFACT_POLL_TOOL_BUDGET_MS = 5e4;
|
|
@@ -38937,6 +38937,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
|
|
|
38937
38937
|
if (opts.codexCli) names.push("mcp__codex-cli__codex");
|
|
38938
38938
|
return [...new Set(names)];
|
|
38939
38939
|
}
|
|
38940
|
-
export { buildAnthropicErrorEvent as $,
|
|
38940
|
+
export { buildAnthropicErrorEvent as $, UPSTREAM_INACTIVITY_TIMEOUT_MS as $n, nativeSubagentModel as $t, TOOLBELT_TOOLS$1 as A, parseJsonOrDiagnose as An, brainstormModel as At, FAST_ADVISOR_TOOL_INSTRUCTIONS as B, colbertDegradedWarning as Bn, cloudAgentToolsEnabled as Bt, runWorkerAgent as C, assembleResponsesPayload as Cn, ADO_DEFAULT_TOOLSETS as Ct, toolbeltEnabled as D, createChatCompletions as Dn, artifactToolsEnabled as Dt, buildToolbeltAwareness as E, createResponses as En, agentToolsEnabled as Et, ADVISOR_TOOL_INSTRUCTIONS as F, normalizeKustoClusterUri as Fn, cheapOracleModel as Ft, isAdvisorRequested as G, toolbeltPathOverride as Gn, fastPlanModel as Gt, LOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as H, semanticSearchOptedIn as Hn, fastAstraModel as Ht, CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS as I, CONDENSED_OPERATING_SEQUENCE as In, cheapReviewerModel as It, resolveCuratedAdvisorModel as J, DEFAULT_CLAUDE_MODEL_FALLBACKS as Jn, fleetToolsEnabled as Jt, resolveAdvisorEffort as K, BUDGET_SMALL_FAST_CATALOG_ID as Kn, fastReviewerModel as Kt, CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as L, DEFINITION_OF_GREATNESS as Ln, cheapestAdvisorModel as Lt, satisfiesMinVersion as M, provisionBrowserAssets as Mn, browserCompoundToolsEnabled as Mt, searchWeb as N, hasSupportedBrowserInstalled as Nn, browserToolsEnabled as Nt, toolbeltSkipSet as O, MAX_RESPONSE_BODY_BYTES as On, balancedOracleModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, normalizeCloudAgentEnvironment as Pn, cheapAdvisorModel as Pt, repairRejectedThinkingHistory as Q, UPSTREAM_FETCH_TIMEOUT_MS as Qn, kustoToolsEnabled as Qt, CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS as R, assertCopilotModelAllowed as Rn, cheapestOracleModel as Rt, resolveWorkerRunOpts as S, unregisterLaunch as Sn, provisionAdoTools as St, availableToolCommands as T, resolveMcpToolTimeoutMs as Tn, adoToolsEnabled as Tt, buildAdvisorStream as U, shouldUseInsecureTls as Un, fastGeneralPurposeModel as Ut, LOCAL_ADVISOR_TOOL_INSTRUCTIONS as V, provisionAndIndexColbert as Vn, fastAdvisorModel as Vt, injectAdvisorTool as W, collapsePathKeys as Wn, fastOracleModel as Wt, rememberThinkingHistoryRepair as X, DEFAULT_CODEX_MODEL_FALLBACKS as Xn, generalPurposeFastModel as Xt, formatThinkingRepairDecline as Y, DEFAULT_CODEX_MODEL as Yn, geminiAvailable as Yt, repairKnownThinkingHistory as Z, DEFAULT_PORT as Zn, implementerFastModel as Zt, REVIEW_DEFAULT_MODEL as _, LAUNCH_BOUND_TOKEN_PREFIX as _n, LOCAL_CONSULT_REDACTION_LINE as _r, provisionWorkiqTools as _t, buildAgentPrompt as a, standInToolEnabled as an, upstreamMaxConnections as ar, EFFORT_ORDER as at, resolveDefaultModel as b, registerLaunch as bn, buildAdoToolEntries as bt, enumerateInjectedMcpToolNames as c, shimDefaultsToXhigh as cn, oneMContextDisabled as cr, clampEffort as ct, BROWSE_DEFAULT_MODEL as d, getTokenizerFromModel as dn, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as dr, normalizeAnthropicUsageInPlace as dt, resolveGeminiReviewModel as en, generateRandomPort as er, buildOpenAIErrorEvent as et, DEFAULT_MODEL_CHAIN as f, configureLocalEgress as fn, CHEAP_PROFILE_MODELS as fr, handleMcpDelete as ft, PLAN_DEFAULT_MODEL as g, createMessages as gn, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as gr, disposeWorkiqClients as gt, IMPLEMENT_DEFAULT_MODEL as h, countTokens as hn, CHEAP_PROFILE_NATIVE_MODELS as hr, buildWorkiqToolEntries as ht, assertMcpToolSurfaceConsistent as i, scribeModel as in, upstreamAllowH2 as ir, relayAnthropicStream as it, assetFor as j, normalizeOpenAIUsage as jn, browseAgentEnabled as jt, vscodeRipgrepPath as k, readResponseBodyCapped as kn, balancedReviewerModel as kt, maxPersonasFor as l, getTextTokenCount as ln, withOneMSuffix as lr, anthropicUsageNormalizeDisabled as lt, EXPLORE_DEFAULT_THINKING as m, localSessionId as mn, CHEAP_PROFILE_NATIVE_EFFORTS as mr, WORKIQ_TOOL_ALIASES as mt, MCP_GROUPS as n, reviewerModel as nn, pickClaudeDefault as nr, logStreamError as nt, buildPeerAwarenessSnippet as o, workerToolsEnabled as on, classifyMessagesRoute as or, UNKNOWN_EFFORT_ANCHOR as ot, EXPLORE_DEFAULT_MODEL as p, localBaseUrl as pn, CHEAP_PROFILE_NATIVE_AGENT_NAMES as pr, handleMcpPost as pt, resolveAdvisorModel as q, BUDGET_SMALL_FAST_SLUG as qn, fastScoutModel as qt, agentNamesForToolAllowlist as r, scoutModel as rn, resolveLeadSlugArg as rr, readIteratorWithTimeout as rt, buildPeerAwarenessSummary as s, workiqToolsEnabled as sn, catalogAdvertises1M as sr, bucketEffort as st, GROUP_META as t, reviewerFastModel as tn, isBudgetClaudeLead as tr, isControllerClosedError as tt, personasFor as u, getTokenCount as un, withOneMSuffixForLead as ur, createAnthropicUsageRewriteTransform as ut, TEST_DEFAULT_MODEL as v, findLaunchBySecret as vn, LOCAL_CONSULT_REDACTION_NOTE as vr, workiqMcpToolEntries as vt, buildEnv as w, warnOnTokenPriceDrift as wn, normalizeAdoToolsets as wt, resolveModeDefaults as x, rememberLaunchSessionId as xn, disposeAdoClients as xt, appendPlanReminder as y, launchBoundAccessToken as yn, adoMcpToolEntries as yt, CHEAPLOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as z, effectiveLocalProfile as zn, cheapestReviewerModel as zt };
|
|
38941
38941
|
|
|
38942
|
-
//# sourceMappingURL=peer-mcp-personas-
|
|
38942
|
+
//# sourceMappingURL=peer-mcp-personas-Ckbn70c5.js.map
|