M1: Headless core loop + Anthropic #2

Open
darman wants to merge 5 commits from feature/m1 into develop
Owner
  • Tool trait, config loading, permission service, and the engine loop (text → tool call → final text), exercised via MockProvider
  • read/write/bash/glob/grep tools, plus the edit tool porting opencode's replacer chain (and test table) verbatim
  • Anthropic SSE codec + provider
  • harness-app composition root and the harness run -p "<prompt>" debug command
- `Tool` trait, config loading, permission service, and the engine loop (text → tool call → final text), exercised via `MockProvider` - read/write/bash/glob/grep tools, plus the edit tool porting opencode's replacer chain (and test table) verbatim - Anthropic SSE codec + provider - `harness-app` composition root and the `harness run -p "<prompt>"` debug command
darman added this to the M1 — Headless core loop + Anthropic milestone 2026-07-10 15:07:57 +00:00
darman added 5 commits 2026-07-10 15:07:58 +00:00
Adds the Tool trait, config loading/schema, the Provider trait plus an Llm event surface, a permission service, and the core engine loop with a doom-loop guard and retry scaffolding. The processor drives a text/tool-call/final-text turn against a Provider, laying the groundwork for the MockProvider integration test and the real Anthropic path.
Implements the first five harness-tools: read, write, bash (with timeout/output truncation), glob, and grep, plus shared path-resolution helpers. Wires them into the core tool registry and processor.
Ports opencode's multi-strategy string-replacer chain (and its test table) into harness-tools::edit, giving the edit tool the same fuzzy-match fallback behavior opencode relies on.
Adds the Anthropic SSE codec (codec/anthropic.rs) translating Anthropic's event stream into LlmEvents, the AnthropicProvider, and registry wiring so the engine loop can run against the real API instead of just MockProvider.
Adds the harness-app composition root wiring config, providers, tools, and the engine loop together, plus the harness run -p "<prompt>" debug command in harness-tui::main for driving a one-shot prompt end-to-end from the CLI.
darman added this to the AI Harness project 2026-07-10 15:08:15 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/m1:feature/m1
git checkout feature/m1
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: darman/ai-harness#2