/** * [WHO]: Provides createInitialHarnessState(), beginHarnessTurn(), buildHarnessInstructions(), prepareContextFiles(), inspectHarnessExit() * [FROM]: Depends on node fs/path and ./team-types for harness state and feature contracts * [TO]: Consumed by team-runtime.ts, team-presets.ts, index.ts to coordinate long-running AgentTeam work * [HERE]: extensions/builtin/team/team-harness.ts - Anthropic-style harness protocol helpers for /team teammates */ import type { HarnessFeature, HarnessPhase, HarnessState } from "./team-types.js"; import type { SubAgentResult } from "../../../core/sub-agent/index.js"; export interface HarnessFeatureList { version: 1; generatedAt: string; taskDescription: string; features: HarnessFeature[]; } export interface HarnessExitResult { harness: HarnessState; violations: string[]; event: string; } export declare function createInitialHarnessState(): HarnessState; export declare function ensureHarnessFiles(harness: HarnessState, cwd: string, taskDescription: string): Promise; export declare function beginHarnessTurn(harness: HarnessState, cwd: string): Promise; export declare function buildHarnessInstructions(harness: HarnessState, cwd: string, taskDescription: string): Promise; export declare function buildInitPhaseInstructions(harness: HarnessState, taskDescription: string, cwd: string): string; export declare function buildCodingPhaseInstructions(harness: HarnessState, featureListContent: string, progressContent: string): string; export declare function buildVerifyPhaseInstructions(harness: HarnessState, featureListContent: string): string; export declare function buildFixPhaseInstructions(harness: HarnessState, verifyReport: string | null, featureListContent: string): string; export declare function buildCompletePhaseInstructions(harness: HarnessState, featureListContent: string): string; export declare function prepareContextFiles(harness: HarnessState): string[]; export declare function inspectHarnessExit(harness: HarnessState, cwd: string, result: SubAgentResult): Promise; export declare function validateFeatureList(original: Omit[], current: HarnessFeature[]): string[]; export declare function resolveNextPhase(harness: Pick, previousPhase?: HarnessPhase, violations?: string[]): HarnessPhase; export declare function formatHarnessProgress(harness: HarnessState | undefined): string[]; export declare function createHarnessCheckpoint(cwd: string, message: string): Promise; export declare function revertHarnessChanges(cwd: string, preTurnCommit: string | null, violations: string[]): Promise;