Repository navigation
v0.2.0 — seams, loop controls, subagents, MCP, observability, testing
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, packagemw(Retry, Fallback, Log, RepairJSON, Allow, Audit, MapErrors),ToolErrorwith codes (ADR 0006) - Approval boundary —
RequireApproval,RunResult/RunFinishPending,Approve/Deny(ADR 0007) - Loop controls —
UsageLimit,ModelRetry+MaxModelRetries,DetectLoops,PrepareStep,Options/ToolOptionscomposition (ADR 0002 amendments) - Subagents as tools —
weft.Subagent,Nestedevents, lineage ids, cycle refusal (ADR 0014) - MCP, both ways —
weft/mcp:mcp.Toolsimports a connected session's tools;mcp.AddTools/mcp.Serveexpose 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 —
wefttestRecord/Replayat the Model seam, scripting helpers,Flatten; fuzz targets gate CI (ADR 0017) - Also — thinking control,
ToolArgsDeltastreaming, structured output (Output[T]/GenerateAs/OutputOf),ParseSchema, per-toolTimeout/MaxResultBytes/StrictInput/PromptSnippet
Changed — read before upgrading
- A
max_tokensstep with tool calls executes none of them; the loop's own tool failures renderINVALID_INPUT/NO_SUCH_TOOLwith 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 atNew; a step consults itsToolSourceexactly once SequentialreturnsPolicyOption;RunFinishis 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
ParseSchemalenient 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.