Skip to main content

Codex usage data provider for `mngr usage` (rollout token_count -> cost_snapshot writer + reader)

Project description

imbue-mngr-codex-usage

Codex data provider for mngr usage. Codex exposes no statusline or in-process plugin, but mngr already tails its rollout JSONL into a raw transcript via mngr_codex's background-tasks supervisor. This package adds:

  • The writer (codex_usage.sh): installed into the agent's commands/ dir, where mngr_codex's codex_background_tasks.sh launches it iff present. It reads the raw rollout stream and emits one cost_snapshot per token_count item to events/codex/usage/events.jsonl.
  • The reader: an aggregate_usage_source hookimpl claiming the codex source, aggregated session-cumulatively (each token_count carries the session's cumulative total, so the freshest per session wins).

What gets captured

Codex reports cumulative token usage (info.total_token_usage) but no dollar cost, so cost is left null and the reader estimates it from tokens via the pricing table (provenance ESTIMATED). input_tokens includes cached, so the writer emits input = input_tokens - cached_input_tokens and cache_read = cached_input_tokens (OpenAI has no cache-write surcharge). The model is openai/<model> from the rollout's turn_context.

In ChatGPT-plan (subscription) mode, token_count also carries 5h/7d rate-limit windows, which the writer maps onto the window schema -- so Codex subscription agents get Claude-style windows, and the session is classified SUBSCRIPTION (imputed). Without rate limits it's API_KEY (real spend).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imbue_mngr_codex_usage-0.1.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imbue_mngr_codex_usage-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file imbue_mngr_codex_usage-0.1.1.tar.gz.

File metadata

  • Download URL: imbue_mngr_codex_usage-0.1.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for imbue_mngr_codex_usage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75985437be9ef34d5b1d9f5e28e318ca0c33582a3872a99cc3e7ec6214f1b88b
MD5 5b843d0d8c7843fbe56cff63b20b6888
BLAKE2b-256 f71310fa2c0c50e6c5a9f037f6fc110c10af6b4d4a0fe5e81f55cd47f66d7075

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_codex_usage-0.1.1.tar.gz:

Publisher: publish.yml on imbue-ai/mngr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file imbue_mngr_codex_usage-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for imbue_mngr_codex_usage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 383a8e27d52b9e2901120fe6145339d96b506e1eda67ab00b618e22e6fc692ea
MD5 941818c997b4e20595430fb0febaef3c
BLAKE2b-256 f27e361a4a1e56c7c886acd1389a5068abe4a7560d765e356a68934f2af4042e

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_codex_usage-0.1.1-py3-none-any.whl:

Publisher: publish.yml on imbue-ai/mngr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page