diff --git a/.env.example b/.env.example index c8e2883135..0d02dea705 100644 --- a/.env.example +++ b/.env.example @@ -2407,6 +2407,15 @@ APP_LOG_TO_FILE=true # Used by: open-sse/translator/request/claude-to-openai.ts, open-sse/translator/response/openai-to-claude.ts. # OMNIROUTE_SYSTEM_INSTRUCTION_APPEND= +# Set to "1" to also strip echoed system-prompt PREAMBLE blocks +# (// blocks, prose reproductions of the skill +# section) from the start of an openai->claude stream. OFF by default: it recognises +# constructs by English-prose heuristics and DOES mutate the response payload, so a +# reply that genuinely opens with such a section would lose it. Turn it on only when +# you actually hit the system-echo leak. +# Used by: open-sse/translator/response/openai-to-claude.ts, open-sse/utils/directivePreambleStripper.ts. +# OMNIROUTE_STRIP_SYSTEM_PREAMBLE=0 + # Per-image fetch timeout (ms) for remote image_url vision input. Default: 15000. # Used by: open-sse/utils/cursorImages.ts. # CURSOR_IMAGE_FETCH_TIMEOUT_MS=15000 diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index 126b3225f0..3ca603874c 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -1195,6 +1195,7 @@ changing them requires a code edit, not an env var: | `CURSOR_KV_GRACE_MS` | `2000` | `open-sse/executors/cursor.ts` | Grace window (ms) after a composer kv_after_text soft terminator when bytes remain buffered — gives a trailing exec_mcp tool call time to complete its frame. | | `CURSOR_TOOL_DIRECTIVE` | enabled (`!== "0"`) | `open-sse/executors/cursor.ts` | Tool-commit directive that makes composer-2.5 reliably issue tool calls. Set `0` to disable. | | `OMNIROUTE_SYSTEM_INSTRUCTION_APPEND` | _(unset)_ | `open-sse/translator/request/claude-to-openai.ts`, `open-sse/translator/response/openai-to-claude.ts` | Operator-defined system prompt text appended to the system message AFTER translation (post-translation injection), reaching codex/Responses and `/v1/messages` paths. Also used as the directive prefix stripped from echoed system preamble blocks. Leave unset to disable. | +| `OMNIROUTE_STRIP_SYSTEM_PREAMBLE` | `0` (off) | `open-sse/translator/response/openai-to-claude.ts`, `open-sse/utils/directivePreambleStripper.ts` | Set to `1` to strip echoed system-prompt preamble blocks from the start of an openai→claude stream. Off by default — the heuristics are English-prose shaped and mutate the response payload, so a reply that legitimately opens with such a section would lose it. | | `CURSOR_IMAGE_FETCH_TIMEOUT_MS` | `15000` | `open-sse/utils/cursorImages.ts` | Per-image fetch timeout (ms) for remote `image_url` vision input. | | `CURSOR_STATE_DB_PATH` | _(probed)_ | `open-sse/utils/cursorVersionDetector.ts` | Override the Cursor IDE state DB lookup used for IDE version detection. | | `CURSOR_AGENT_CLI_VERSION` | _(detect / pin)_ | `open-sse/utils/cursorAgentCliVersion.ts` | Agent CLI build id (`YYYY.MM.DD-`) for `x-cursor-client-version: cli-…` on Agent Run. | diff --git a/scripts/check/check-env-doc-sync.mjs b/scripts/check/check-env-doc-sync.mjs index d333a89649..272ae00b72 100644 --- a/scripts/check/check-env-doc-sync.mjs +++ b/scripts/check/check-env-doc-sync.mjs @@ -272,6 +272,10 @@ const DOC_ONLY_ALLOWLIST = new Set([ // SQL keyword mentioned in the new VACUUM scheduler docs (#4437). // The check's regex picks up the bare word in description text. "VACUUM", + // Source-code constant (open-sse/services/combo/comboPredicates.ts:35 — + // `export const COMBO_LOOP_SAFETY_TIMEOUT_MS = 10 * 60 * 1000`), cited in the + // comboTimeoutMs narrative added by #13857. Not operator-configurable. + "COMBO_LOOP_SAFETY_TIMEOUT_MS", ]); // Vars present in .env.example but intentionally absent from ENVIRONMENT.md.