fabro/lib/apps/fabro-cli
Bryan Helmkamp 850d5cca52
Bill an agent stage's whole session tree from one fold
One usage rule: a stage's usage is its session tree's, the root and every
subagent, live and at completion. The worker's event sink folds pebble's
SessionProjection over the events it records and the stage's billing and
files come from that fold at stage end, so the completed values are what
the run showed live. The store's live usage is the fold's tree usage, and
completion brings the catalog's price for the same tokens instead of
resetting them to the root's.

Fabro keeps catalog pricing: the root at its route, each descendant at its
own route where the catalog knows it and at the root's otherwise, a
provider-reported cost standing in where pebble has one. The rows travel
as billing_by_model on stage.completed and the stage projection, and the
billing rollup splits by_model by them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 07:49:27 -06:00
..
src Bill an agent stage's whole session tree from one fold 2026-09-13 07:49:27 -06:00
tests Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
build.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
Cargo.toml Keep Ctrl-C owned for the whole native Git command phase 2026-09-12 11:48:21 -06:00