/** * QuickMeta Orchestration - Harmony integration hooks * * Provides onPhaseComplete() and startPhase() functions * for seamless integration with the Harmony orchestrator. */ import type { Phase } from '../../types/pattern.js'; import type { QuickMeta, PhaseInsight } from '../../types/quickmeta.js'; /** * Context for phase completion handling */ export interface PhaseCompletionContext { sessionId: string; phase: Phase; agentOutput: string; toolUsage?: Record; startTime: number; endTime: number; delegationCount: number; parallelTaskCount: number; } /** * Called when a phase completes * Extracts QuickMeta and saves to disk * * Performance: < 100ms total */ export declare function onPhaseComplete(ctx: PhaseCompletionContext): Promise; /** * Called before starting a phase * Returns insight to inject into agent prompt */ export declare function startPhase(sessionId: string, phase: Phase): Promise<{ insight: PhaseInsight | null; injectionText: string; }>; /** * Create or retrieve session ID * Should be called once at the start of a /harmony workflow */ export declare function initSession(): string; /** * Session state for Harmony to track */ export interface HarmonySessionState { sessionId: string; currentPhase: Phase | null; phaseStartTime: number; completedPhases: Phase[]; quickMetas: Partial>; } /** * Create initial session state */ export declare function createSessionState(): HarmonySessionState; /** * Update session state when entering a phase */ export declare function enterPhase(state: HarmonySessionState, phase: Phase): HarmonySessionState; /** * Update session state when completing a phase */ export declare function completePhase(state: HarmonySessionState, phase: Phase, meta: QuickMeta): HarmonySessionState; /** * Get phase duration from session state */ export declare function getPhaseDuration(state: HarmonySessionState): number; /** * Check if all phases are complete */ export declare function isSessionComplete(state: HarmonySessionState): boolean; /** * Generate a summary of the session state */ export declare function getSessionSummary(state: HarmonySessionState): string; //# sourceMappingURL=orchestration.d.ts.map