feat: track compaction count + verbose notice

This commit is contained in:
Peter Steinberger
2026-01-06 02:41:48 +01:00
parent 3c6dea3ef3
commit b30bae89ed
12 changed files with 293 additions and 6 deletions

View File

@@ -555,6 +555,10 @@ export function subscribeEmbeddedPiSession(params: {
compactionInFlight = true;
ensureCompactionPromise();
log.debug(`embedded run compaction start: runId=${params.runId}`);
params.onAgentEvent?.({
stream: "compaction",
data: { phase: "start" },
});
}
if (evt.type === "auto_compaction_end") {
@@ -567,6 +571,10 @@ export function subscribeEmbeddedPiSession(params: {
} else {
maybeResolveCompactionWait();
}
params.onAgentEvent?.({
stream: "compaction",
data: { phase: "end", willRetry },
});
}
if (evt.type === "agent_end") {