-
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
Define all foundational types for the .harness() feature: HarnessConfig, HarnessOptions, HarnessResult, RawResult, Metrics, Message, and the HarnessProvider protocol/interface. Also implement the provider factory skeleton.
Branch: feat/harness-v2
Design doc: docs/design/harness-v2-design.md (Sections 6, 7, 4.4)
Scope
Python (sdk/python/agentfield/harness/)
-
__init__.py— public API exports -
_result.py—HarnessResult,RawResult,Metrics,Messagedataclasses -
providers/_base.py—HarnessProviderProtocol class -
providers/_factory.py—build_provider()skeleton (raises for unknown providers) -
providers/__init__.py— exports - Add
HarnessConfigtosdk/python/agentfield/types.py(alongsideAIConfig) - Unit tests for all types (construction, defaults, validation)
- Unit tests for config resolution (constructor defaults + per-call overrides)
TypeScript (sdk/typescript/src/harness/)
-
types.ts— all type/interface definitions -
providers/base.ts—HarnessProviderinterface -
providers/factory.ts—buildProvider()skeleton -
providers/index.ts— exports -
index.ts— public API exports - Unit tests for types and factory
Acceptance Criteria
- All types match the design doc
HarnessConfig.provideris required (no default)- Config resolution: per-call overrides > constructor defaults
- Factory raises/throws for unknown provider names
- All tests pass, no lint errors
Dependencies
- None (foundation issue)
- Blocks: [SDK] Schema handling with universal file-write strategy for .harness() #200, [SDK] HarnessRunner with retry & schema orchestration for .harness() #201, all provider issues
TDD Approach
Write tests for type construction, validation, and config resolution BEFORE implementing the types.
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