feat(omo-codex): add post-compact rule budget to codex hook

Trim rule and result char budgets after compaction via new
postCompactMaxRuleChars/postCompactMaxResultChars config, applied
through withPostCompactBudget. Extract codex-hook helpers into
dynamic-target-fingerprints, hook-output, path-utils,
rules-engine-factory, and transcript-rule-filter modules.
This commit is contained in:
YeonGyu-Kim
2026-05-29 11:17:24 +09:00
parent 58871c4301
commit bb8ef30bbe
12 changed files with 381 additions and 201 deletions
@@ -0,0 +1,9 @@
import type { PiRulesConfig } from "./rules/types.js";
export function withPostCompactBudget(config: PiRulesConfig): PiRulesConfig {
return {
...config,
maxRuleChars: Math.min(config.maxRuleChars, config.postCompactMaxRuleChars),
maxResultChars: Math.min(config.maxResultChars, config.postCompactMaxResultChars),
};
}