feat(anthropic-auto-compact): run DCP first on token limit errors before compaction

- Refactored DCP (Dynamic Context Pruning) to execute FIRST when token limit errors occur
- Previously, DCP only ran as a fallback after compaction failed
- Now DCP runs first to prune redundant context, then compaction executes immediately
- Simplified config flag: dcp_on_compaction_failure → dcp_for_compaction
- Updated documentation in all 4 README files (EN, KO, JA, ZH-CN)
- Updated schema.ts with new config field name and documentation
- Updated executor.ts with new DCP-first logic flow

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-28 14:13:50 +09:00
parent 87e229fb62
commit 889d80d0ca
6 changed files with 102 additions and 67 deletions

View File

@@ -162,8 +162,8 @@ export const ExperimentalConfigSchema = z.object({
truncate_all_tool_outputs: z.boolean().default(true),
/** Dynamic context pruning configuration */
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
/** Run DCP only when compaction (summarize) fails, then retry compaction (default: false) */
dcp_on_compaction_failure: z.boolean().optional(),
/** Enable DCP (Dynamic Context Pruning) for compaction - runs first when token limit exceeded (default: false) */
dcp_for_compaction: z.boolean().optional(),
})
export const OhMyOpenCodeConfigSchema = z.object({