ToolResult gains an events field (additive, defaults empty) carrying
per-tool audit records when a rein can observe its own inner loop's
individual tool calls -- populated after dispatch_tool returns, not via
a live callback (the contract has no per-event hook). ReinAharness
gains a stream_tool_events flag: when set, passes --stream-tool-events
and parses the tagged {"stream_event": ...} lines back out of captured
stdout into ToolResult.events.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
glas_harness/reins/rein_openweights.py implements the Rein ABC by
shelling out to `rein-openweights run --task-file ... --no-hub
[--model ...]`, mirroring reins/rein_aharness.py exactly. Factored the
duplicated git_head/write_task_file logic into reins/_shared.py, used
by both adapters now. registry/reins/rein-openweights.yaml flipped to
status: implemented. 8 new tests (mocked subprocess), 18/18 passing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- src/glas_harness/contract.py: Rein ABC (start_session/dispatch_tool/
end_session), SandboxHandle/ToolCall/ToolResult, per docs/harness-contract.md.
- reins/rein_aharness.py: adapter around the rein-aharness CLI. Collapses
a whole `agent-harness run` into one dispatch_tool call for now (no
per-tool hooks yet — tracked in rein-aharness HARNESS-WP-0002-T03);
verifies success via new-commit detection, mirroring rein-aharness's
own success signal.
- gateway.py + cli.py: resolves a sand-boxer sandbox, runs one task
through a rein, tears the sandbox down.
- registry/reins/*.yaml (rein-aharness implemented, rein-openweights
planned) and profiles/harness.agent-dev{,-local}.yaml, pairing with
sand-boxer's profile.agent-dev and the new profile.bwrap-local.
Tested against a real local git repo + mocked SandboxManager/CLI
subprocess (10 tests, all passing). A real live run against the actual
Claude Code CLI is deliberately left for a human-triggered follow-up —
not executed autonomously since it spends real API credits/credentials.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>