feat: add controlled codex thread compaction

This commit is contained in:
AI Bot
2026-06-03 13:39:01 +08:00
parent 7a30c2a8d9
commit 0fb588e339
11 changed files with 362 additions and 0 deletions

View File

@@ -592,6 +592,33 @@ rl.on("line", (line) => {
return;
}
if (message.method === "thread/compact/start") {
send({
id: message.id,
result: {},
});
send({
method: "item/completed",
params: {
threadId: message.params?.threadId,
turnId: "compact-turn-secret-should-not-leak",
item: {
type: "contextCompaction",
id: "context-compaction-secret-should-not-leak",
summary: "private compaction summary should not leak",
},
},
});
send({
method: "thread/compacted",
params: {
threadId: message.params?.threadId,
turnId: "compact-turn-secret-should-not-leak",
},
});
return;
}
if (message.method === "thread/read") {
send({
id: message.id,