import {
  buildInitialState,
  calculateContextBudget,
  formatListDirectoryTree,
  formatTurnMessage,
  normalizeFinishFiles,
  readFinishFiles,
  toolGrep,
  toolListDirectory,
  toolRead
} from "../../chunk-KRDIR7GG.js";
import {
  formatAgentToolOutput
} from "../../chunk-APP75CBN.js";
import {
  LLMResponseParser
} from "../../chunk-SNGGSPYJ.js";
import {
  SYSTEM_PROMPT,
  getSystemPrompt
} from "../../chunk-FMLHRJDF.js";
import {
  LocalRipgrepProvider
} from "../../chunk-4KMBU6T3.js";
import "../../chunk-G2RSY56Q.js";
import "../../chunk-YPKNMYD4.js";
import "../../chunk-TPP2UGQP.js";
import {
  AGENT_CONFIG,
  DEFAULT_EXCLUDES
} from "../../chunk-5PNMAWLC.js";
import "../../chunk-PZ5AY32C.js";

// tools/warp_grep/harness.ts
var parser = new LLMResponseParser();
function parseToolCalls(text) {
  return parser.parse(text);
}
async function resolveFinishFiles(provider, files) {
  return readFinishFiles("", files, async (p, s, e) => {
    const r = await provider.read({ path: p, start: s, end: e });
    return r.lines.map((l) => {
      const idx = l.indexOf("|");
      return idx >= 0 ? l.slice(idx + 1) : l;
    });
  });
}
export {
  AGENT_CONFIG,
  DEFAULT_EXCLUDES,
  LLMResponseParser,
  LocalRipgrepProvider,
  SYSTEM_PROMPT,
  buildInitialState,
  calculateContextBudget,
  formatListDirectoryTree,
  formatAgentToolOutput as formatToolResult,
  formatTurnMessage,
  getSystemPrompt,
  normalizeFinishFiles,
  parseToolCalls,
  readFinishFiles,
  resolveFinishFiles,
  toolGrep,
  toolListDirectory,
  toolRead
};
//# sourceMappingURL=harness.js.map