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.2.tar.gz (18.0 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.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: imbue_mngr_codex_usage-0.1.2.tar.gz
  • Upload date:
  • Size: 18.0 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.2.tar.gz
Algorithm Hash digest
SHA256 37f63443979dc1c4f7047788e40c5a3ac7911d3c23fd77c1783061381faaf73b
MD5 d7d23f5c6eafb7007f1807649f0a6892
BLAKE2b-256 0f8cb511849faca3c7f8c6cb18e44b0a6146377c8abc9bed7cb0abe12144c8f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_codex_usage-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for imbue_mngr_codex_usage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89e585d6218854dc587e16acbd487dc0ab0af3aafa3df50211210fd84b907e61
MD5 f751c1c857a6b9dec4f8a8ba12ef41e8
BLAKE2b-256 18bb1a59e7d65b7f06d463709bf079f68501b0a0f0749313da2c07230737e596

See more details on using hashes here.

Provenance

The following attestation bundles were made for imbue_mngr_codex_usage-0.1.2-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