Skip to content

feat(foundation): bootstrap 0.1.x primitives#1

Merged
cchinchilla-dev merged 27 commits intomainfrom
feat/0.1.x-foundation
Apr 27, 2026
Merged

feat(foundation): bootstrap 0.1.x primitives#1
cchinchilla-dev merged 27 commits intomainfrom
feat/0.1.x-foundation

Conversation

@cchinchilla-dev
Copy link
Copy Markdown
Owner

@cchinchilla-dev cchinchilla-dev commented Apr 27, 2026

What

Bootstrap of the 0.1.x foundation: brings the skeleton from 0.1.0 (contract +
CLI stub only) up to a shape the 0.2.0 MVP can build on top of.

  • LLMBackend ABC + Pydantic primitives + parametrised contract suite.
  • DirectBackend for OpenAI, Anthropic, Google Gemini via httpx only.
  • Pinned pricing.yaml (USD per 1K tokens) + AGENTANVIL_PRICING_FILE override.
  • Runner ABC + SubprocessRunner with anyio.fail_after timeout; JSON stdin/stdout protocol.
  • Core trace models: Trace, Step, RunRecord, Report.
  • Record/replay envelope schema v1 with bit-for-bit determinism CI test.
  • AgentAnvilError exception hierarchy.
  • py.typed marker, coverage threshold 85%, slow marker excluded by default.
  • New CI jobs: version-linearity, determinism.

Why

The 0.1.0 skeleton ships AgentContract and a CLI stub but nothing else.
Every later module needs three primitives in place first:

  1. LLMBackend abstraction so backends are swappable.
  2. Runner abstraction so the agent under test runs in an isolated process.
  3. Bit-for-bit replay envelope so reproducibility holds across machines.

This PR introduces those primitives and pins the contract every later module honours.

Testing

  • uv run pytest passes (79 default + 2 slow = 81 tests)
  • uv run ruff check src/ tests/ clean
  • uv run mypy src/ clean
  • python scripts/check_version_linearity.py exits 0
  • Portability invariant: DirectBackend imports without AgentLoom
  • End-to-end smoke: RecordingBackend -> MockBackend byte-for-byte equal

Notes

  • AgentLoomBackend deferred to 0.2.0 (depends on AgentLoom 0.5.0).
  • DockerRunner deferred to 0.2.0; K8sRunner to 0.4.0.
  • Pricing format mirrors agentloom/providers/pricing.yaml.

@cchinchilla-dev cchinchilla-dev added the enhancement New feature or request label Apr 27, 2026
@cchinchilla-dev
Copy link
Copy Markdown
Owner Author

Temporary: agentloom constraint lowered from agentloom[contracts,observability]>=0.5.0 to agentloom>=0.4.0 so uv sync works in CI. Revert to the original constraint once AgentLoom 0.5.0 publishes to PyPI.

@cchinchilla-dev cchinchilla-dev merged commit 3e75db8 into main Apr 27, 2026
7 checks passed
@cchinchilla-dev cchinchilla-dev deleted the feat/0.1.x-foundation branch April 27, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci cli core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant