M1 — Headless core loop + Anthropic

New Issue

Goal

A working headless engine loop against a real provider (Anthropic), with the tool trait,
config loading, and permission service it depends on.

Scope

  • Tool trait + config loading/schema
  • Engine loop: text → tool call → final text, with a doom-loop guard and retry scaffolding
  • Permission service (auto-approve stub frontend for headless use)
  • read, write, bash, glob, grep tools
  • edit tool: opencode's replacer chain ported verbatim, including its test table
  • Anthropic SSE codec + provider, registry wiring
  • harness-app composition root
  • harness run -p "<prompt>" debug command

Acceptance criteria

  • Integration test: a scripted MockProvider does text → tool call (read) → final text with
    correct parts persisted.
  • harness run -p "<prompt>" works against real Anthropic.
No due date
0% Completed