// engine/autopilot/summary-collector.ts — SPEC-469: per-tool-call autopilot summary collector
/** Per-tool-call summary collector. Tools instantiate, collect, and include in response. */
export class AutopilotSummaryCollector {
    entries = [];
    push(entry) {
        this.entries.push(entry);
    }
    pushOk(action, message, details) {
        this.push({ action, status: 'ok', message, details });
    }
    pushFail(action, message, error) {
        this.push({ action, status: 'fail', message, details: error ? { error } : undefined });
    }
    pushSkipped(action, message) {
        this.push({ action, status: 'skipped', message });
    }
    /** Get all entries (max 10, most recent first). */
    getAll() {
        return [...this.entries].slice(-10).reverse();
    }
    /** Get human-readable string array for LLM consumption. */
    getMessages() {
        return this.getAll().map((e) => e.message);
    }
    hasEntries() {
        return this.entries.length > 0;
    }
}
//# sourceMappingURL=summary-collector.js.map