{"actions":{"bootstrapAndRun":{"effect":"installs rote if missing, inspects, prepares, and asks before running","href":"https://play.modiqo.ai/install?play=rajkaria/session-ledger@0.1.2","method":"GET","rel":"https://rote.dev/rels/bootstrap-and-run","requiresConsent":true,"responseMediaType":"text/x-shellscript"},"inspect":{"command":"rote play inspect https://play.modiqo.ai/rajkaria/session-ledger@0.1.2","effect":"read-only"},"installCliOnly":{"effect":"installs the rote CLI, nothing else","href":"https://play.modiqo.ai/install","method":"GET","rel":"https://rote.dev/rels/install-cli","requiresConsent":true,"responseMediaType":"text/x-shellscript"},"run":{"command":"rote play run https://play.modiqo.ai/rajkaria/session-ledger@0.1.2","effect":"executes the play locally after consent","headless":{"approvalAssertion":"--yes","approvalRequiredBeforeInvocation":true,"commandTemplate":"rote play run https://play.modiqo.ai/rajkaria/session-ledger@0.1.2 <name=value...> --yes","stdinPolicy":"never pipe input to automate the interactive Ready selector"},"requiresConsent":true}},"description":"Every agent harness on this machine keeps a transcript, each in its own shape, and none of them agree on what a token record looks like. Claude Code writes one line per content block so four in ten usage lines are duplicates of the same API call, and buries subagent spend in a subdirectory. Codex writes cumulative counters that have to be differenced. Pi and OpenCode have their own layouts. This reads all of them and emits one deduplicated ledger: usage records with uncached input, cache write, cache read, output and reasoning tokens per model per turn; the human messages that started each turn; and every tool call with whether it errored. Nothing is priced, nothing is judged, and message text is truncated and hashed unless you ask for it. It is the file the other session Plays should be reading instead of each re-parsing the logs, and it says which sources it found, which it could not read, and why. Read-only, no credentials, no network. Writes one JSONL and one summary JSON under the folder you choose. Poin","distribution":{"digest":"sha256:2c6752423a70242b38acb18252a5c4b1a4da917d1dca6d5fd54ea9d226a5ef06","mediaType":"application/vnd.modiqo.rote-flow","size":152193,"verifiedBy":"rote verifies the downloaded archive against this digest before it runs"},"effects":{"credentialsProvidedBy":"runner","credentialsRemainLocal":true,"declaredWrites":[],"publisherReceivesCredentials":false},"id":"https://play.modiqo.ai/rajkaria/session-ledger@0.1.2","inputPolicy":{"optionalWithDefault":"show_default_and_accept_override","optionalWithoutDefault":"omit_unless_supplied","required":"ask","secrets":"collect_locally_outside_conversation"},"links":{"docs":"https://rote.dev","page":"https://play.modiqo.ai/rajkaria/session-ledger@0.1.2","protocol":"https://play.modiqo.ai/.well-known/rote","self":"https://play.modiqo.ai/rajkaria/session-ledger@0.1.2.json"},"name":"session-ledger","owner":{"kind":"user","slug":"rajkaria"},"parameters":[{"default":30,"description":"Filter on each record's own timestamp.","example":30,"input":{"allowCustom":true,"choices":[],"label":"Days back"},"name":"days_back","required":false,"type":"integer"},{"default":"~/comped","description":"Created if missing. Everything this Play writes goes here and nowhere else.","example":"~/comped","input":{"allowCustom":true,"choices":[],"label":"Out dir"},"name":"out_dir","required":false,"type":"string"},{"default":"~/.claude/projects","description":"Set to resources/fixtures/claude for a demo run on synthetic logs.","example":"resources/fixtures/claude","input":{"allowCustom":true,"choices":[],"label":"Claude dir"},"name":"claude_dir","required":false,"type":"string"},{"default":"~/.codex/sessions","description":"Set to resources/fixtures/codex for a demo run on synthetic logs.","example":"resources/fixtures/codex","input":{"allowCustom":true,"choices":[],"label":"Codex dir"},"name":"codex_dir","required":false,"type":"string"},{"default":"~/.pi/agent/sessions","description":"Best-effort adapter; the source note says so.","example":"resources/fixtures/pi","input":{"allowCustom":true,"choices":[],"label":"Pi dir"},"name":"pi_dir","required":false,"type":"string"},{"default":"~/.local/share/opencode/storage","description":"Best-effort adapter; the source note says so.","example":"resources/fixtures/opencode/storage","input":{"allowCustom":true,"choices":[],"label":"Opencode dir"},"name":"opencode_dir","required":false,"type":"string"},{"default":"true","description":"Claude Code subagent transcripts. true or false.","example":"true","input":{"allowCustom":true,"choices":[],"label":"Include subagents"},"name":"include_subagents","required":false,"type":"string"},{"default":"true","description":"true stores a 120-character truncation plus sha256; false keeps full text locally, never in a card.","example":"true","input":{"allowCustom":true,"choices":[],"label":"Redact"},"name":"redact","required":false,"type":"string"}],"preparation":[{"action":{"command":"rote play inspect https://play.modiqo.ai/rajkaria/session-ledger@0.1.2 --json","effect":"read-only"},"step":1,"type":"inspect_local_readiness"},{"references":["/parameters"],"step":2,"type":"collect_parameters"},{"references":["/parameters","/requirements","/effects"],"step":3,"type":"review"},{"consentBoundary":"the user approves the exact play and parameter values","references":["/parameters","/requirements","/effects"],"step":4,"type":"obtain_run_consent"},{"action":{"command":"rote play run https://play.modiqo.ai/rajkaria/session-ledger@0.1.2","headlessCommandTemplate":"rote play run https://play.modiqo.ai/rajkaria/session-ledger@0.1.2 <name=value...> --yes"},"preservesAcquisitionBoundaries":["adapter_selection","oauth_dcr","google_discovery","static_token_setup","runtime_security_checks"],"requiresConsent":true,"step":5,"type":"run"}],"producedBy":{"roteVersion":"0.79.0"},"publishedAt":"2026-09-04T12:24:49.37393+00:00","reference":"rajkaria/session-ledger@0.1.2","requirements":{"adapters":[],"browser":{"dependencies":[],"runtime":false,"signIn":false},"localTools":["python3"],"roteCli":{"minimumVersion":"0.62.0"},"sessions":false},"resolution":"pinned","schema":"rote.play.v1","stats":{"downloads":1,"installs":0},"steps":{"count":6,"names":["merge_ledger","read_claude","read_codex","read_opencode","read_pi","summarize"]},"title":"session-ledger","type":"play","version":"0.1.2","visibility":"public"}