import { EventEmitter } from 'node:events'; import { SharedMemoryStore } from './shared-memory.js'; import type { AuditEntry, TeamConfig, TeamResult } from './types.js'; export declare class MultiAgentLoop extends EventEmitter { private messageBus; private compositionVerifier; private trustManager; private sharedMemory; private stallDetector; private agents; private auditTrail; private config; private codebaseRoot; constructor(codebaseRoot: string, config: TeamConfig); /** * Run the full multi-agent loop on a goal. * 1. Coordinator decomposes goal into task graph * 2. Ready tasks are assigned to agents * 3. Each agent output passes through boundary verification * 4. Completed tasks unlock dependent tasks * 5. Stall detector monitors for problems * 6. Loop until all tasks complete, fail, or escalate */ run(): Promise; /** Get the current audit trail. */ getAuditTrail(): readonly AuditEntry[]; /** Get the shared memory store. */ getSharedMemory(): SharedMemoryStore; /** * Execute a single task: agent generates → write artifacts → verify at boundary. * Returns a TeamResult only if an escalation halt is triggered (early exit). */ private executeAndVerifyTask; private updateReadyTasks; private getReviewTarget; private buildContextRefs; private parseDecomposition; private buildGraph; private makeEmptyGraph; private makeResult; /** * Write code/test artifacts to disk in the codebase root. * Returns the list of absolute paths written (for rollback). */ private writeArtifactsToDisk; /** * Remove previously written artifacts from disk (rollback on rejection). */ private removeArtifactsFromDisk; /** Create an auto-pass handoff (for skip verification tier). */ private makeAutoPassHandoff; private audit; }