feat(compression): add Responses tool-output engine (#8010)

* Add Responses tool-output compression engine

* fix: enable Codex Responses stacked steps

* fix(compression): share Codex tokenizer and rebase UI

* fix(compression): sync MCP engine selection

* fix(compression): i18n parity for codex-responses mode + rebaseline

The codex-responses compression engine already imports the shared
countTextTokens/resolveTokenizerEncoding from tiktokenCounter.ts (no
duplicate encoder) and CompressionSettingsTab.tsx already threads the
new mode through the existing useTranslations()/labelKey pattern - both
pre-existing on this branch tip after rebasing onto release/v3.8.49.

What was missing after the rebase: the new compressionModeCodexResponses
/ compressionModeCodexResponsesDesc keys existed only in en.json. Filled
en-fallback into all 42 locales via scripts/i18n/fill-missing-from-en.mjs
and added real pt-BR/vi translations. Also rebaselined the three files
whose own growth (new codex-responses mode wiring) crossed the frozen
file-size caps: open-sse/mcp-server/schemas/tools.ts, open-sse/services/
compression/strategySelector.ts, and src/lib/db/compression.ts.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This commit is contained in:
Jan Leon
2026-07-22 12:03:02 +02:00
committed by GitHub
parent dc41a73ff7
commit fb6ea295bf
66 changed files with 1254 additions and 161 deletions

View File

@@ -7,6 +7,7 @@ export const compressionModeSchema = z.enum([
"aggressive",
"ultra",
"rtk",
"codex-responses",
"omniglyph",
"stacked",
]);
@@ -15,6 +16,19 @@ export const cavemanIntensitySchema = z.enum(["lite", "full", "ultra"]);
export const rtkIntensitySchema = z.enum(["minimal", "standard", "aggressive"]);
export const rtkRawOutputRetentionSchema = z.enum(["never", "failures", "always"]);
export const codexResponsesConfigSchema = z
.object({
enabled: z.boolean().optional(),
minBytes: z.number().int().min(0).max(2_000_000).optional(),
maxOutputBytes: z.number().int().min(1).max(10_000_000).optional(),
maxCandidateBytes: z.number().int().min(1).max(2_000_000).optional(),
maxLines: z.number().int().min(1).max(10_000).optional(),
minSearchMatches: z.number().int().min(2).max(10_000).optional(),
minLogLines: z.number().int().min(2).max(10_000).optional(),
preserveToolNames: z.array(z.string().trim().min(1).max(100)).max(100).optional(),
})
.strict();
export const cavemanConfigSchema = z
.object({
enabled: z.boolean().optional(),
@@ -191,6 +205,13 @@ export const stackedPipelineStepSchema = z.discriminatedUnion("engine", [
config: rtkConfigSchema.optional(),
})
.strict(),
z
.object({
engine: z.literal("codex-responses"),
intensity: z.string().optional(),
config: codexResponsesConfigSchema.optional(),
})
.strict(),
z
.object({
engine: z.literal("session-dedup"),
@@ -252,6 +273,7 @@ export const STACKED_PIPELINE_ENGINE_INTENSITIES: Record<string, readonly string
ccr: [],
lite: ["lite"],
rtk: ["minimal", "standard", "aggressive"],
"codex-responses": [],
headroom: [],
relevance: [],
caveman: ["lite", "full", "ultra"],
@@ -309,6 +331,7 @@ export const compressionSettingsUpdateSchema = z
cavemanOutputMode: cavemanOutputModeSchema.optional(),
outputStyles: z.array(outputStyleSelectionSchema).optional(),
rtkConfig: rtkConfigSchema.optional(),
codexResponsesConfig: codexResponsesConfigSchema.optional(),
languageConfig: languageConfigSchema.optional(),
aggressive: aggressiveConfigSchema.optional(),
ultra: ultraConfigSchema.optional(),