/** * Stable byte-identical sentinels marking the start/end of any gitnexus * addendum (full or lite) inside the system prompt. Used for: * - idempotency: a `experimental.chat.system.transform` hook can detect * whether a gitnexus addendum is already present in `output.system` and * skip re-pushing on a subsequent invocation within the same turn. * - debug visibility: anyone reading the system prompt in a log can find * the plugin's contribution without parsing. * * IMPORTANT: changing these strings invalidates provider prefix caches for * every existing session. Treat as a wire format. */ export declare const SYSTEM_ADDENDUM_START = ""; export declare const SYSTEM_ADDENDUM_END = ""; /** * Full system-prompt addendum for MAIN (orchestrator) sessions: covers the * envelope contract, subagent propagation rules, tool preference, and the * "build a graph yourself" cost/benefit rule. * * This string is intentionally a module-level constant rather than a * function: it must be byte-identical across every turn of every main * session so that the provider's system-prompt prefix cache (Anthropic, etc.) * keeps matching and we never pay uncached input cost for these tokens * after the first turn of a session. * * Anything that varies per repository (names, paths, freshness, symbol * counts) lives in the dynamic user-message envelope in hint-envelope.ts. * Do NOT interpolate per-instance data into this string. */ export declare const STATIC_SYSTEM_ADDENDUM = "\n# GitNexus knowledge graph\n\nA `` envelope is delivered in user messages with the live\nlist of indexed repos and their freshness \u2014 re-read it each turn. If absent\n(cwd has no local indexes), call `gitnexus_list_repos` once to discover\nrepos indexed elsewhere; target them via the `repo` parameter on any\ngitnexus_* tool.\n\n## Subagent propagation\n\nSpawned subagents do NOT inherit the user-message envelope. Include the\nliteral marker `[[gitnexus:graph]]` in the prompt to grant graph access \u2014\nthe plugin swaps it for the envelope and strips the marker.\n\n- INCLUDE for code agents: explore, deep, build, quick, refactor, sisyphus-junior, general\n- OMIT for non-code agents: librarian, oracle, Momus, Metis, Prometheus, multimodal-looker\n- INCLUDE regardless of agent type when the prompt references an absolute\n path under any `` in the envelope \u2014 without the marker\n the subagent will Grep the tree where one gitnexus_query would suffice.\n\n## Tools (your own calls)\n\nPrefer for structural questions: gitnexus_query, gitnexus_context,\ngitnexus_impact, gitnexus_cypher, gitnexus_list_repos. Keep Grep/Read for\nliteral strings, configs, file-level navigation.\nFor open-ended exploration or multi-flow tracing, delegate to a subagent\nwith `[[gitnexus:graph]]` instead of stacking inline calls.\n\n## When to build a graph yourself\n\nDefault: if you are going to touch an unindexed repo more than trivially,\nstart with `gitnexus_analyze`. \"Trivially\" = one file, already open, edit\nyou could make without understanding the rest of the repo.\n\nEverything else \u2014 exploration, debugging, multi-file changes, anything that\nstarts with \"look into\u2026\" / \"how does\u2026\" / \"why\u2026\" / \"add\u2026\" \u2014 warrants the\nupfront 30-120s because graph queries will outpace grep within 2 tool calls.\n"; /** * Lite system-prompt addendum for SUBAGENT sessions: covers only what the * subagent itself uses — the envelope contract (so it can do its own * `gitnexus_list_repos` discovery if the orchestrator forgot the marker) * and the tool preference list. * * Deliberately omits: * - Subagent propagation rules — subagents rarely spawn further subagents. * - "When to build a graph yourself" — gitnexus_analyze is intended for * the main agent only (see its tool description); a short-lived * subagent should not initiate a 3-120s background indexing job. * * This save roughly 60-65% of the addendum size for every subagent system * prompt while keeping the subagent functionally complete for its own work. */ export declare const STATIC_SYSTEM_ADDENDUM_SUBAGENT = "\n# GitNexus knowledge graph\n\nIf a `` envelope is delivered in your user messages, it lists\nthe repos currently indexed and reachable via the `repo` parameter. Re-read\nit each turn for live data. If absent, call `gitnexus_list_repos` once to\ndiscover repos indexed elsewhere on the machine.\n\n## Tools (your own calls)\n\nPrefer for structural questions: gitnexus_query, gitnexus_context,\ngitnexus_impact, gitnexus_cypher, gitnexus_list_repos. Keep Grep/Read for\nliteral strings, configs, file-level navigation.\n"; export declare function systemAddendumPresent(sections: readonly string[]): boolean;