Repository navigation
v0.12.9
Added
-
retryandfallbackcan choose which errors they handle. A newwhenpredicate narrows either composer to the errors worth handling, and an error it rejects propagates untouched, the way a suspend or an abort already did.retrydoesn't spend another attempt or fireon_erroron it, andfallbacknever calls its handoff or its backup. That's what a schema failure needs, since a second attempt fails the same way, and it's what a paid provider needs, since every retry costs money. -
retryandfallbackcan say how they got their result. The optionalprojectthat the envelope composites gained in v0.12.0 now reaches both.retryhands it{ value, attempts, errors }andfallbackhands it{ value, source, primary_error }, so a flow can archive how many retries a value took, or mark a backup's answer as degraded, without keeping a mutable closure or reading the trajectory back. Leaveprojectoff and the output is the plain value, as before. It lives in its ownRetryProjectionandFallbackProjectiontypes rather than onRetryConfigandFallbackOptions, so a config annotated with the named type still infers its output from the inner steps. -
model_callandmodel_steptake anon_chunkobserver. It streams the call under a plainrunand hands the caller that call's chunks, which is what a live terminal renderer wants. The alternative was to drive the whole run throughrun.stream, which tees every token into the trajectory logger (and so intotrajectory.jsonl) and leaves the consumer to sort chunks back out bystep_id. Underrun.streamthe observer runs after themodel_chunkrecord, never in its place, so abort and the trajectory still belong to the composition layer. -
Every
GenerateResultreports how long the whole call took.StepTimingbrackets one turn's provider round-trip and leaves tools out, so nothing measured a call from end to end, andclaude_clisteps carried no timing at all. The newtimingfield (GenerateTiming, withstarted_atandduration_ms) covers every turn, the tools that ran between them, absorbed retries, and schema repair, and the engine stamps it for every adapter, external ones included. -
throughput()has a rate forclaude_cli. The adapter now readsduration_api_msoff the CLI's result event, reports it besideduration_ms, and splits it across the run's steps by output tokens (the same split it already used for cost). Each step gets a blendedStepTiming, so a local model and Claude can be compared in tokens per second on the same terms. -
claude_cli_reported(result)reads the CLI's report back typed. It narrowsprovider_reported['claude_cli']to aClaudeCliProviderReportedwith a runtime shape check, or returnsundefined.ClaudeCliProviderReportedandGenerateTimingare exported from the package root now too, so an app that imports fromfascicleno longer hand-writes either shape.
Fixed
- The
run.streambuffer lost new events once it overflowed. Past the high-water mark the channel dropped the oldest buffered event and then returned without buffering the new one, so each overflow lost two events whileevents_droppedcounted one. Seven events into a buffer of three delivered 3, 5, and 7 with a count of 2. They now deliver 5, 6, and 7 with a count of 4, which is what the documentation always described.
Internal
-
The docs cover all of the above, with a type-checked retry-then-fallback ladder in the cookbook and a per-call streaming recipe. The
branchentry incomposition.mdnow explains thatunicorn/no-thenableflags itsthenkey as a false positive (the config is never awaited) and how to turn the rule off. -
.gitignorecovers volley's per-run state and the timestamped backups it takes of that state, both of which night-shift runs write into the main checkout.