/** * `slowcook cost log` — 0.19.x+ * * Append a cost entry for a non-Actions agent run into the canonical * cost sidecar (`specs/story-.cost.jsonl`). * * Why this exists: slowcook agents that run in-process emit cost * markers + `appendCostEntry` calls automatically. But long-lived * agents OUTSIDE slowcook's process (Claude Code session in a * consumer repo, Managed Agents, Cursor mimicking the pipeline) * generate no cost entries — their LLM spend is invisible to the * cost-store + the workflow rollup. That makes "what does the * methodology cost end-to-end" unanswerable, which matters for * 0.20's AI-native-org thesis. * * This subcommand is the explicit logging primitive for those agents. * Usage: * * slowcook cost log \\ * --story 009 \\ * --usd 0.42 \\ * --agent local-claude-pipeline \\ * [--model claude-opus-4-7] \\ * [--source-url https://github.com/.../pull/698] \\ * [--round brew-iteration-3] \\ * [--tokens-in 12000] [--tokens-out 1500] \\ * [--cache-read 85000] [--cache-create 12000] \\ * [--apply-to-spec] * * `--apply-to-spec` recomputes spec.cost.total_usd from the full * sidecar after appending (same call slowcook agents make in-process). * * The convention: each session's log a single entry summarising the * whole session (`--usd $TOTAL`), or one entry per logical round * (refine-mimic, testgen-mimic, brew-mimic, …). Either works; the * aggregator just sums. */ import { type CostEntry } from "../cost-store.js"; export interface CostLogArgs { repoRoot: string; storyId: string; entry: CostEntry; applyToSpec: boolean; } export interface CostLogResult { sidecarPath: string; appendedEntry: CostEntry; appliedToSpec: boolean; } export declare function costLogCore(args: CostLogArgs): CostLogResult; interface ParsedArgs { storyId?: string; usd?: number; agent?: string; model?: string; sourceUrl?: string; round?: string; tokensIn?: number; tokensOut?: number; cacheRead?: number; cacheCreate?: number; applyToSpec: boolean; help: boolean; } /** Pure arg parser — exported for testing. */ export declare function parseCostLogArgs(argv: string[]): ParsedArgs; export declare function costLog(argv: string[]): Promise; export {}; //# sourceMappingURL=cost-log.d.ts.map