v0.4.0
What's New
- Planner cost budgeted — the LLM call used for task decomposition now has its cost tracked and deducted from the user's budget;
Plan.planner_costexposes the cost; CLI displays it when > 0 - Parallel step execution — executor now runs independent steps concurrently via
asyncio.gather(); steps declaredepends_onindices in the decomposition prompt; the executor builds a DAG and launches ready steps in parallel;execute()delegates toasyncio.run(aexecute())transparently - Persistent spend tracking — new
LedgerStoreclass persists execution history to a JSONL file (~/.config/tokenwise/ledger.jsonlby default);tokenwise plan --executeauto-saves; newtokenwise ledgerCLI command shows history and--summaryaggregates TOKENWISE_LEDGER_PATH— new env var / config field to customize the ledger file path
Changed
- Decomposition prompt — now asks the LLM to produce
depends_on(0-indexed step indices) for each step; planner parses these and falls back to sequential chain if missing - Executor —
execute()now dispatches to async DAG-based scheduling; falls back to sequential when already inside an async event loop
Full Changelog: v0.3.0...v0.4.0