-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
ai-friendlyWell-documented task suitable for AI-assisted developmentWell-documented task suitable for AI-assisted developmentarea:harnessCoding agent harness integrationCoding agent harness integrationenhancementNew feature or requestNew feature or requestsdk:pythonPython SDK relatedPython SDK relatedsdk:typescriptTypeScript SDK relatedTypeScript SDK related
Description
Overview
Implement the OpenCode CLI provider using subprocess. No native SDK — CLI-only for both Python and TypeScript.
Branch: feat/harness-v2
Design doc: docs/design/harness-v2-design.md (Section 4)
Scope
Python (sdk/python/agentfield/harness/providers/)
-
opencode.py—OpenCodeProviderimplementingHarnessProvider:- CLI subprocess invocation
- Parse output from stdout
- Extract result, messages, metrics
- Binary path via
opencode_bin
- Register in
_factory.pyfor"opencode" - Tests with mocked subprocess
TypeScript (sdk/typescript/src/harness/providers/)
-
opencode.ts—OpenCodeProvider- Uses shared CLI utilities
- Register in
factory.ts - Tests
Key Details
- OpenCode CLI interface and output format
- No native schema support — relies entirely on file-write strategy
- Binary path configurable via
HarnessConfig.opencode_bin - Reuses shared CLI subprocess utilities
Acceptance Criteria
- CLI command constructed correctly
- Output parsing works
- Handles binary not found and non-zero exit codes
- All tests pass
Dependencies
- Depends on: [SDK] Core types & provider interface for .harness() #199 (types), [SDK] HarnessRunner with retry & schema orchestration for .harness() #201 (runner), [SDK] Codex provider for .harness() #203 (codex — for shared CLI utils), [SDK] Wire .harness() into Agent class #204 (agent wiring)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ai-friendlyWell-documented task suitable for AI-assisted developmentWell-documented task suitable for AI-assisted developmentarea:harnessCoding agent harness integrationCoding agent harness integrationenhancementNew feature or requestNew feature or requestsdk:pythonPython SDK relatedPython SDK relatedsdk:typescriptTypeScript SDK relatedTypeScript SDK related