fix: refresh role rules after compaction

This commit is contained in:
ejclaw
2026-05-25 22:57:52 +09:00
parent e4a0e15cf2
commit db5332e81a
9 changed files with 570 additions and 85 deletions

View File

@@ -18,6 +18,24 @@ export interface RunnerOutput {
output?: RunnerStructuredOutput;
newSessionId?: string;
error?: string;
compaction?: {
completed: boolean;
trigger?: string | null;
};
}
export type RunnerCompaction = NonNullable<RunnerOutput['compaction']>;
export function buildCompactionOutput(
compaction: RunnerCompaction | undefined,
): Pick<RunnerOutput, 'compaction'> {
return compaction ? { compaction } : {};
}
export function compactBoundaryOutput(
trigger: string | null | undefined,
): RunnerCompaction {
return { completed: true, trigger: trigger || null };
}
type ContentBlock =