Skip to content

v0.2.0 — seams, loop controls, subagents, MCP, observability, testing

Choose a tag to compare

@wajihtba wajihtba released this 19 Sep 20:27
· 777 commits to main since this release

The three unreleased rounds since v0.1.0, tagged as one set (ADR 0005): the root and the three adapters at v0.2.0, mcp new at v0.1.0.

Added

  • Middleware seams — WrapModel/WrapTools, package mw (Retry, Fallback, Log, RepairJSON, Allow, Audit, MapErrors), ToolError with codes (ADR 0006)
  • Approval boundary — RequireApproval, RunResult/RunFinish Pending, Approve/Deny (ADR 0007)
  • Loop controls — UsageLimit, ModelRetry + MaxModelRetries, DetectLoops, PrepareStep, Options/ToolOptions composition (ADR 0002 amendments)
  • Subagents as tools — weft.Subagent, Nested events, lineage ids, cycle refusal (ADR 0014)
  • MCP, both ways — weft/mcp: mcp.Tools imports a connected session's tools; mcp.AddTools/mcp.Serve expose weft tools and agents as an MCP server (ADR 0015)
  • Observability — OTel spans per run/model call/tool call and one slog Debug line per phase; TracerProvider, Logger — the core's one dependency (ADR 0016)
  • Testing — wefttest Record/Replay at the Model seam, scripting helpers, Flatten; fuzz targets gate CI (ADR 0017)
  • Also — thinking control, ToolArgsDelta streaming, structured output (Output[T]/GenerateAs/OutputOf), ParseSchema, per-tool Timeout/MaxResultBytes/StrictInput/PromptSnippet

Changed — read before upgrading

  • A max_tokens step with tool calls executes none of them; the loop's own tool failures render INVALID_INPUT / NO_SUCH_TOOL with codes
  • Events carry RunID; events are snapshots; a repeated tool-call ID in one step fails the run; tool arguments must be exactly one JSON value; registered tools are frozen at New; a step consults its ToolSource exactly once
  • Sequential returns PolicyOption; RunFinish is no longer ==-comparable (Pending)

Fixed

  • The 43-finding code review (2026-09-18) and the §5 review round (2026-09-19): schema shadowing per encoding/json's real rules, decode errors in the schema's vocabulary, approval-resume ordering, the RunFinish/terminal-outcome rule
  • Adapters: empty content never reaches the wire, enforced mid-stream cancellation, per-request tool conversion, synthesised id collisions, thinking dialects
  • ParseSchema lenient on foreign keywords; anthropic forwards unmapped keywords whole

Pre-1.0: breaking changes may occur between releases — the two "read before upgrading" groups in CHANGELOG.md list every behavior change.