agent-statusline 0.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. agent_statusline-0.3.5/.gitignore +40 -0
  2. agent_statusline-0.3.5/AGENTS.md +98 -0
  3. agent_statusline-0.3.5/HANDOFF.md +97 -0
  4. agent_statusline-0.3.5/LICENSE +21 -0
  5. agent_statusline-0.3.5/PKG-INFO +163 -0
  6. agent_statusline-0.3.5/README.md +141 -0
  7. agent_statusline-0.3.5/docs/ACTIONS_EXPOSURE_INVENTORY.md +53 -0
  8. agent_statusline-0.3.5/docs/CHANGELOG.md +512 -0
  9. agent_statusline-0.3.5/docs/CODE_REVIEW.md +255 -0
  10. agent_statusline-0.3.5/docs/DEFERRED.md +37 -0
  11. agent_statusline-0.3.5/docs/FIELDS.md +224 -0
  12. agent_statusline-0.3.5/docs/INTERNALS.md +283 -0
  13. agent_statusline-0.3.5/docs/PORTING.md +130 -0
  14. agent_statusline-0.3.5/docs/PUBLIC_READINESS.md +137 -0
  15. agent_statusline-0.3.5/docs/RESEARCH.md +135 -0
  16. agent_statusline-0.3.5/docs/ROADMAP.md +431 -0
  17. agent_statusline-0.3.5/docs/adrs/0001-exactly-accountable-money.md +27 -0
  18. agent_statusline-0.3.5/docs/adrs/0002-state-outside-the-repository.md +25 -0
  19. agent_statusline-0.3.5/docs/adrs/0003-install-by-one-symlink.md +32 -0
  20. agent_statusline-0.3.5/docs/adrs/0004-no-runtime-dependencies.md +24 -0
  21. agent_statusline-0.3.5/docs/adrs/0005-hatchling-vcs-versioning.md +21 -0
  22. agent_statusline-0.3.5/docs/adrs/0006-cached-probes-only.md +24 -0
  23. agent_statusline-0.3.5/docs/adrs/0007-incremental-transcript-with-versioned-totals.md +23 -0
  24. agent_statusline-0.3.5/docs/adrs/0008-observe-the-cache-ttl.md +24 -0
  25. agent_statusline-0.3.5/docs/adrs/0009-suppress-derived-rate-limit-figures-in-overage.md +25 -0
  26. agent_statusline-0.3.5/docs/adrs/0010-wrap-then-truncate.md +25 -0
  27. agent_statusline-0.3.5/docs/adrs/0011-row-order-is-data.md +25 -0
  28. agent_statusline-0.3.5/docs/adrs/0012-match-the-host-permission-colours.md +24 -0
  29. agent_statusline-0.3.5/docs/adrs/0013-remove-the-cache-warmth-bar.md +26 -0
  30. agent_statusline-0.3.5/docs/adrs/0014-never-exercise-cost-paths-against-the-live-ledger.md +26 -0
  31. agent_statusline-0.3.5/docs/adrs/0015-timestamp-hooks-are-a-stopgap.md +24 -0
  32. agent_statusline-0.3.5/docs/adrs/0016-ci-enforces-the-constraints.md +31 -0
  33. agent_statusline-0.3.5/docs/adrs/0017-install-as-a-python-tool.md +39 -0
  34. agent_statusline-0.3.5/docs/adrs/0018-budget-hosted-ci.md +52 -0
  35. agent_statusline-0.3.5/docs/adrs/0019-release-tags-are-immutable.md +38 -0
  36. agent_statusline-0.3.5/docs/adrs/0020-own-only-managed-configuration.md +167 -0
  37. agent_statusline-0.3.5/docs/adrs/0021-lock-and-privatize-runtime-state.md +70 -0
  38. agent_statusline-0.3.5/docs/adrs/0022-account-rolling-costs-with-timestamped-deltas.md +66 -0
  39. agent_statusline-0.3.5/docs/adrs/0023-use-a-locked-local-quality-gate.md +38 -0
  40. agent_statusline-0.3.5/docs/adrs/0024-scope-process-probes-by-session.md +40 -0
  41. agent_statusline-0.3.5/docs/adrs/0025-bound-ephemeral-observation-state.md +54 -0
  42. agent_statusline-0.3.5/docs/adrs/0026-coordinate-one-owner-and-one-reviewer.md +47 -0
  43. agent_statusline-0.3.5/docs/adrs/0027-measure-cells-and-sanitize-terminal-output.md +57 -0
  44. agent_statusline-0.3.5/docs/adrs/0028-gate-the-installed-renderer-with-synthetic-evidence.md +52 -0
  45. agent_statusline-0.3.5/docs/adrs/0029-self-test-with-isolated-state-and-safe-failure-evidence.md +57 -0
  46. agent_statusline-0.3.5/docs/adrs/0030-ship-hardening-as-small-pre-one-patches.md +43 -0
  47. agent_statusline-0.3.5/docs/adrs/0031-practical-local-threat-model.md +80 -0
  48. agent_statusline-0.3.5/docs/adrs/0032-normalize-malformed-host-input-at-the-boundary.md +59 -0
  49. agent_statusline-0.3.5/docs/adrs/0033-pin-lean-ci-and-separate-public-conversion.md +60 -0
  50. agent_statusline-0.3.5/docs/adrs/0034-rewrite-reachable-pre-public-history-once.md +59 -0
  51. agent_statusline-0.3.5/docs/adrs/0035-accept-historical-pull-refs-and-gate-future-ancestry.md +60 -0
  52. agent_statusline-0.3.5/docs/adrs/0036-fail-closed-on-oversized-public-evidence.md +33 -0
  53. agent_statusline-0.3.5/docs/adrs/0037-require-one-aggregate-public-ci-result.md +57 -0
  54. agent_statusline-0.3.5/docs/adrs/0038-run-public-ci-on-linux-and-macos.md +54 -0
  55. agent_statusline-0.3.5/docs/adrs/0039-declare-the-production-ready-public-baseline.md +51 -0
  56. agent_statusline-0.3.5/docs/adrs/0040-remove-avoidable-hot-path-imports.md +57 -0
  57. agent_statusline-0.3.5/docs/adrs/0041-stage-pypi-distribution-as-independent-patches.md +68 -0
  58. agent_statusline-0.3.5/docs/adrs/0042-build-once-and-promote-exact-release-artifacts.md +60 -0
  59. agent_statusline-0.3.5/docs/adrs/0043-publish-exact-artifacts-to-testpypi-with-gated-oidc.md +76 -0
  60. agent_statusline-0.3.5/docs/adrs/0044-keep-the-readme-as-a-product-landing-page.md +51 -0
  61. agent_statusline-0.3.5/docs/adrs/README.md +66 -0
  62. agent_statusline-0.3.5/install.py +21 -0
  63. agent_statusline-0.3.5/pyproject.toml +136 -0
  64. agent_statusline-0.3.5/scripts/audit_reachable_history.py +198 -0
  65. agent_statusline-0.3.5/scripts/benchmark_renderer.py +100 -0
  66. agent_statusline-0.3.5/scripts/release_artifacts.py +147 -0
  67. agent_statusline-0.3.5/scripts/verify_artifacts.py +133 -0
  68. agent_statusline-0.3.5/scripts/verify_docs.py +306 -0
  69. agent_statusline-0.3.5/scripts/verify_package_index.py +176 -0
  70. agent_statusline-0.3.5/scripts/verify_public_readiness.py +842 -0
  71. agent_statusline-0.3.5/src/agent_statusline/__init__.py +21 -0
  72. agent_statusline-0.3.5/src/agent_statusline/__main__.py +8 -0
  73. agent_statusline-0.3.5/src/agent_statusline/_version.py +24 -0
  74. agent_statusline-0.3.5/src/agent_statusline/cli.py +94 -0
  75. agent_statusline-0.3.5/src/agent_statusline/coerce.py +76 -0
  76. agent_statusline-0.3.5/src/agent_statusline/diagnostics.py +21 -0
  77. agent_statusline-0.3.5/src/agent_statusline/hooks/__init__.py +0 -0
  78. agent_statusline-0.3.5/src/agent_statusline/hooks/context_guard.py +110 -0
  79. agent_statusline-0.3.5/src/agent_statusline/hooks/session_end.py +43 -0
  80. agent_statusline-0.3.5/src/agent_statusline/hooks/timestamp_stop.py +25 -0
  81. agent_statusline-0.3.5/src/agent_statusline/hooks/timestamp_user.py +23 -0
  82. agent_statusline-0.3.5/src/agent_statusline/installer.py +996 -0
  83. agent_statusline-0.3.5/src/agent_statusline/ledger.py +430 -0
  84. agent_statusline-0.3.5/src/agent_statusline/paths.py +58 -0
  85. agent_statusline-0.3.5/src/agent_statusline/probes.py +271 -0
  86. agent_statusline-0.3.5/src/agent_statusline/render.py +251 -0
  87. agent_statusline-0.3.5/src/agent_statusline/selftest.py +215 -0
  88. agent_statusline-0.3.5/src/agent_statusline/statusline.py +677 -0
  89. agent_statusline-0.3.5/src/agent_statusline/storage.py +341 -0
  90. agent_statusline-0.3.5/src/agent_statusline/transcript.py +429 -0
  91. agent_statusline-0.3.5/tests/conftest.py +28 -0
  92. agent_statusline-0.3.5/tests/fixture_payload.py +114 -0
  93. agent_statusline-0.3.5/tests/fixtures/statusline-payload.json +51 -0
  94. agent_statusline-0.3.5/tests/fixtures/statusline-transcript.jsonl +5 -0
  95. agent_statusline-0.3.5/tests/test_artifact_policy.py +162 -0
  96. agent_statusline-0.3.5/tests/test_cli.py +1800 -0
  97. agent_statusline-0.3.5/tests/test_coerce.py +75 -0
  98. agent_statusline-0.3.5/tests/test_docs.py +194 -0
  99. agent_statusline-0.3.5/tests/test_fixture_payload.py +85 -0
  100. agent_statusline-0.3.5/tests/test_ledger.py +597 -0
  101. agent_statusline-0.3.5/tests/test_performance.py +73 -0
  102. agent_statusline-0.3.5/tests/test_probes.py +279 -0
  103. agent_statusline-0.3.5/tests/test_public_readiness.py +1117 -0
  104. agent_statusline-0.3.5/tests/test_reachable_history_audit.py +145 -0
  105. agent_statusline-0.3.5/tests/test_release_artifacts.py +184 -0
  106. agent_statusline-0.3.5/tests/test_render.py +289 -0
  107. agent_statusline-0.3.5/tests/test_statusline.py +955 -0
  108. agent_statusline-0.3.5/tests/test_storage.py +379 -0
  109. agent_statusline-0.3.5/tests/test_transcript.py +718 -0
  110. agent_statusline-0.3.5/tests/test_verify_package_index.py +170 -0
@@ -0,0 +1,40 @@
1
+ # Runtime state never belongs in the repo - it lives in the agent's config dir
2
+ # (~/.claude by default, or $AGENT_STATUSLINE_STATE). Listed here anyway so a
3
+ # stray test run with AGENT_STATUSLINE_STATE=. cannot commit a cost ledger.
4
+ cost-ledger.json
5
+ statusline-transcript.json
6
+ statusline-probe-cache.json
7
+ statusline-last-payload.json
8
+ statusline-last-error.json
9
+ rate-limit-history.jsonl
10
+ hook-lastrun.json
11
+ *.tmp
12
+ __pycache__/
13
+ *.pyc
14
+ .DS_Store
15
+
16
+ # hatch-vcs writes this at build time
17
+ src/agent_statusline/_version.py
18
+ .verify-state/
19
+ build/
20
+ dist/
21
+ *.egg-info/
22
+ .pytest_cache/
23
+ .ruff_cache/
24
+ .mypy_cache/
25
+ .venv/
26
+
27
+ # Private session handoff and local Claude project state. Kept out of Git on
28
+ # purpose: it records account details, spend figures and session history that
29
+ # must not enter a repository that may become public.
30
+ /.claude/
31
+
32
+ # Local private workspace state and linked worktrees. Keep all three root
33
+ # boundaries even when only one is currently present.
34
+ /.pvt/
35
+ /.worktrees/
36
+
37
+ # Coverage output from a local test run.
38
+ .coverage
39
+ .coverage.*
40
+ htmlcov/
@@ -0,0 +1,98 @@
1
+ # agent-statusline project instructions
2
+
3
+ This is a local-first, dependency-free Python status line for coding agents.
4
+ The installed command is `agent-statusline`. Release versions come from Git
5
+ tags through hatch-vcs; never duplicate a version string in source.
6
+
7
+ ## Start here
8
+
9
+ - Read [HANDOFF.md](HANDOFF.md) completely before changing the repository.
10
+ - Read the affected module, tests, ADRs, and field documentation before
11
+ changing behavior.
12
+ - Treat this file as the only authoritative assistant instruction file.
13
+
14
+ ## Product invariants
15
+
16
+ - Preserve the approved Claude Code display: ten rows in `ORDER`, with their
17
+ current fields and priority order. Do not remove, rename, reorder, or simplify
18
+ a row or field without explicit maintainer approval.
19
+ - Keep runtime behavior local. No telemetry, analytics, runtime networking,
20
+ automatic downloads, or cloud fallbacks.
21
+ - Keep runtime dependencies empty. The renderer is a frequent short-lived
22
+ process and must run with the Python standard library alone.
23
+ - Never test cost paths against live state. Set `AGENT_STATUSLINE_STATE` to a
24
+ disposable directory before importing the package.
25
+ - A currency-labelled claim must be exactly accountable. An exact lower bound
26
+ uses `≥`; do not silently present partial or estimated spend as a total.
27
+ - Preserve lifetime session, rolling 24h/7d/30d, `last5`, and `all` cost fields.
28
+ Rolling-cost changes must retain seed, resume, timestamp, pruning, malformed-
29
+ evidence, and concurrent-redraw coverage.
30
+ - Keep mutable state outside the repository. Coordinate every read-modify-write
31
+ transaction through the locked storage service, publish atomically, and use
32
+ private file permissions.
33
+ - Installation and removal may mutate only this package's status line, hooks,
34
+ and checkout symlink. Preserve unrelated configuration and fail closed on an
35
+ unreadable or malformed existing settings file.
36
+ - Keep width fitting deterministic and ensure no physical output line exceeds
37
+ the detected terminal-cell width.
38
+ - Treat Codex as a separate widget-based host. Do not claim that this Python
39
+ renderer can run in Codex unless the installed Codex interface actually adds
40
+ an arbitrary-command status line.
41
+
42
+ ## Development workflow
43
+
44
+ - Use uv 0.12 or newer. Commit `uv.lock` and manage development tools in
45
+ `pyproject.toml`; do not add requirements files.
46
+ - Use Hatchling and hatch-vcs with standard PEP 621 metadata.
47
+ - Start each short-lived `codex/<type>/<version>-<slug>` or
48
+ `claude/<type>/<version>-<slug>` branch from the preceding released state on
49
+ `main`, not from an unreleased integration branch.
50
+ - Add or update synthetic, privacy-neutral pytest coverage with every behavior
51
+ change. Do not read or publish live ledger contents in tests or documentation.
52
+ - Run the documentation verifier, locked all-files gate, subprocess-aware
53
+ pytest coverage, and build before requesting review.
54
+ - Both hosted workflows are active. Full-scope pull requests and `main` pushes
55
+ automatically run the Linux Python matrix and representative macOS evidence
56
+ behind one aggregate required result. Do not dispatch a duplicate run when an
57
+ automatic run already proves the same SHA. Documentation-only changes run
58
+ only the ancestry audit and remain outside the full hosted gate.
59
+ - Pin future workflow action updates to immutable commits. Do not weaken local
60
+ evidence when a hosted lane is intentionally skipped.
61
+ - Record durable decisions as one numbered ADR under `docs/adrs/`. Supersede an
62
+ accepted ADR rather than rewriting its history.
63
+ - Keep `docs/CODE_REVIEW.md`, `docs/CHANGELOG.md`, `docs/ROADMAP.md`, and
64
+ `HANDOFF.md` synchronized with implementation status.
65
+ - Follow [ADR 0030](docs/adrs/0030-ship-hardening-as-small-pre-one-patches.md)
66
+ while the project is pre-1.0: keep compatible hardening tags small, never
67
+ conceal a breaking change in a patch, describe future scope in the roadmap,
68
+ and keep the changelog limited to the next slice plus landed releases.
69
+ - Stage newly added files before an all-files pre-commit gate. Git does not
70
+ include untracked files in `--all-files`.
71
+
72
+ ## Ownership and review
73
+
74
+ - Each release has exactly one branch owner. The owner alone changes the release
75
+ branch, applies corrections, opens the pull request, and performs the release.
76
+ - Work serially by default. At most one independent reviewer may be active at a
77
+ time; do not fan work out to multiple agents or add another delegation layer.
78
+ - The reviewer uses a detached disposable worktree, reports findings, and does
79
+ not commit to or check out the owner's worktree. Remove the review worktree
80
+ when the verdict is complete.
81
+ - Review an immutable exact candidate SHA against the preceding release. Any
82
+ correction changes the candidate and requires a renewed exact-SHA review.
83
+ - Use concise one-line commits. Merge only the reviewed candidate after green
84
+ required checks, and create an immutable annotated release tag only from the
85
+ verified merge commit.
86
+ - Use `git --no-optional-locks` for read-only inspection of an active worktree
87
+ where possible. Run `uv sync --locked` per worktree, but install pre-commit
88
+ only once from the primary clone because linked worktrees share `.git/hooks`.
89
+
90
+ ## Release-equivalent local gate
91
+
92
+ ```bash
93
+ uv sync --locked --all-groups
94
+ uv run --locked python scripts/verify_docs.py
95
+ uv run --locked pre-commit run --all-files
96
+ uv run --locked pytest --cov=agent_statusline --cov-report=term-missing
97
+ uv build
98
+ ```
@@ -0,0 +1,97 @@
1
+ # agent-statusline handoff
2
+
3
+ This is the tracked, public-safe current-state record. Machine-local operational
4
+ notes may add detail, but they do not override this file, [AGENTS.md](AGENTS.md),
5
+ the roadmap, or accepted ADRs.
6
+
7
+ ## Current release boundary
8
+
9
+ - Current release target: 0.3.5, public README and trusted production PyPI publication.
10
+ - Preceding release: v0.3.4, the immutable base for this slice.
11
+ - Branch owner: Codex; only the owner changes the release branch.
12
+ - Reviewer role: one independent read-only reviewer, assigned after the exact
13
+ candidate SHA is frozen. No second reviewer or delegated worker runs beside it.
14
+ - Both hosted workflows are active. Every pull request and `main` push runs one
15
+ complete-ancestry audit. Documentation-only refs skip both hosted test lanes;
16
+ full-scope refs run the Linux Python matrix and representative macOS evidence.
17
+ One stable aggregate job reports whether all required work passed or was
18
+ deliberately skipped. Missing, malformed, failed, cancelled, or inconsistent
19
+ results fail closed; only reviewed canonical direct keys are accepted.
20
+ - The repository is public. Active no-bypass ruleset `22966865` protects
21
+ `main`: pull requests and resolved review threads are required, the aggregate
22
+ GitHub Actions result must pass against current `main`, and deletion and
23
+ force-push are blocked.
24
+ - Runtime dependencies remain empty and versions remain Git-tag-derived.
25
+
26
+ The first v0.3.5 phase replaces the exhaustive public README catalog and
27
+ internal process narrative with a concise product and installation journey.
28
+ The unmerged candidate may stage package-name commands, but production PyPI
29
+ configuration, publication, merge, tagging, and release remain unapproved until
30
+ the maintainer accepts the public copy and separately authorizes that boundary.
31
+
32
+ ## Stable product boundary
33
+
34
+ The Claude Code renderer retains ten rows in this order:
35
+
36
+ `PROJECT`, `MODEL`, `CONTEXT`, `USAGE`, `COST`, `SYSTEM`, `TOOLS`, `CACHE`,
37
+ `TOKENS`, `TIMING`.
38
+
39
+ Their current fields and priority order remain approved. Runtime behavior stays
40
+ local, state stays outside the repository, runtime dependencies stay empty, and
41
+ currency-labelled values remain exactly accountable. Codex remains a separate
42
+ widget-based host; [PORTING.md](docs/PORTING.md) records the verified boundary.
43
+
44
+ ## Release train
45
+
46
+ Released slices through v0.2.14 cover ownership-safe installation, the locked
47
+ quality gate, malformed-input resilience, private serialized state, exact
48
+ rolling-cost attribution, session-scoped process evidence, and bounded
49
+ observation state, tracked governance, deterministic rendering safety, and
50
+ hermetic installed-renderer evidence, isolated self-test, and safe diagnostics.
51
+ They also cover pinned lean workflows, the ordinary reachable-history rewrite,
52
+ accepted historical pull-ref boundary, prospective ancestry protection,
53
+ oversized-evidence closure, protected public conversion, and exact aggregate CI.
54
+
55
+ v0.2.14 completed public-CI alignment after conversion. v0.3.0 completed the
56
+ production-ready records-and-metadata milestone promised by ADR 0030. v0.3.1
57
+ completed measured hot-path import reduction and source-hermetic benchmark
58
+ evidence. v0.3.2 completed public package metadata, portable package-page
59
+ rendering, and package-manager guidance. v0.3.3 completed locked build-once
60
+ artifact promotion and exact GitHub Release publication. v0.3.4 completed
61
+ trusted TestPyPI publication and exact public-index verification.
62
+
63
+ The complete sequence and exclusions are authoritative in
64
+ [ROADMAP.md](docs/ROADMAP.md). Do not merge the historical hardening branch as
65
+ a whole or import a later slice into the current release.
66
+
67
+ ## Resume point
68
+
69
+ v0.3.4 is complete at tagged merge
70
+ `d7f81ba7101eb4ee1fdc736bedd2fb5286e9e0ae`. Exact-SHA review, protected PR and
71
+ merged-main CI, tag-triggered build-once Release, manually approved OIDC
72
+ TestPyPI publication, public hash verification, and an isolated Python 3.9
73
+ wheel self-test passed. Live Claude Code remains intentionally on exact
74
+ installed v0.3.1 through one status-line command and four managed hooks, with
75
+ unrelated settings and state preserved and no checkout symlink.
76
+
77
+ The v0.3.5 owner branch starts from exact v0.3.4. The current phase contains the
78
+ README, ADR 0044 and its index, synchronized release records, and the approved
79
+ narrow correction that makes root-level Markdown obey the existing
80
+ documentation-only CI boundary. Exact policy and executable scope regressions
81
+ must accompany that workflow correction. The policy pins the complete scope
82
+ step, including its trusted base expression and command order, so an appended
83
+ output cannot override a full-scope result. It also exact-maps the `checks` job
84
+ and binds its sole exported value to that reviewed scope step, preventing the
85
+ downstream matrix from accepting an injected documentation-only result. Run the
86
+ complete local gate and one independent exact-SHA review, then stop for
87
+ maintainer acceptance. Do not
88
+ configure a production publisher or environment, merge, tag, publish, access
89
+ live state, or alter live installation. Explicit host acquisition and Codex
90
+ evidence remain on the next minor track. Runtime behavior, accepted pull refs,
91
+ unreachable objects, and recovery cleanup remain separate.
92
+ [PUBLIC_READINESS.md](docs/PUBLIC_READINESS.md) records the protected baseline.
93
+
94
+ Durable decisions live in [ADRs](docs/adrs/README.md), completed behavior in the
95
+ [changelog](docs/CHANGELOG.md), review evidence in
96
+ [CODE_REVIEW.md](docs/CODE_REVIEW.md), and measured or open questions in
97
+ [RESEARCH.md](docs/RESEARCH.md).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nachiketbhujbal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.5
2
+ Name: agent-statusline
3
+ Version: 0.3.5
4
+ Summary: A dense, width-aware status line for coding agents
5
+ Project-URL: Homepage, https://github.com/nachiketbhujbal/agent-statusline
6
+ Project-URL: Documentation, https://github.com/nachiketbhujbal/agent-statusline/tree/main/docs
7
+ Project-URL: Source, https://github.com/nachiketbhujbal/agent-statusline
8
+ Project-URL: Issues, https://github.com/nachiketbhujbal/agent-statusline/issues
9
+ Project-URL: Changelog, https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/CHANGELOG.md
10
+ Author: nachiketbhujbal
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: claude-code,cli,codex,statusline,tui
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # agent-statusline
24
+
25
+ [![CI](https://github.com/nachiketbhujbal/agent-statusline/actions/workflows/ci.yml/badge.svg)](https://github.com/nachiketbhujbal/agent-statusline/actions/workflows/ci.yml)
26
+ [![PyPI](https://img.shields.io/pypi/v/agent-statusline.svg)](https://pypi.org/project/agent-statusline/)
27
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
28
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/nachiketbhujbal/agent-statusline/blob/main/LICENSE)
29
+ [![No dependencies](https://img.shields.io/badge/dependencies-none-brightgreen.svg)](https://github.com/nachiketbhujbal/agent-statusline/blob/main/pyproject.toml)
30
+
31
+ A dense, local-first status line for
32
+ [Claude Code](https://claude.com/claude-code). See the project, model, context,
33
+ usage, cost, tools, cache, tokens, timing, and machine pressure of the session
34
+ you are in—without telemetry, runtime network calls, or third-party packages.
35
+
36
+ ```text
37
+ PROJECT acme-web/services │ feature/ingest* ↑2 stash1 │ "Rewrite the importer"
38
+ MODEL Opus 5:high │ think │ fast off │ auto │ v2.1.246
39
+ CONTEXT ctx[██░░░░░░░░] 19% 189k/1M │ session 25.7M in · 311k out · 107k thinking · 189 api turns · avg 136k/1.65k per turn
40
+ USAGE 5h [███░░░░░░░] 26% @19.7%/h ▸ 98% (reset Wed 19:30 | 3h40m) │ 7d [█████░░░░░] 50% @0.3%/h ▸ 50% (reset Wed 17:00 | 1h10m)
41
+ COST $2.10 session │ 24h $9.40 · 7d $31.20 · 30d $88.60 │ last5 $27.50 · all $142.30 (5 convos · 6 sess · 1 fork) │ +174/-12 lines │ credits on
42
+ SYSTEM this session 540M · 5 proc · pid 4821 │ all claude 512M · 1 proc · 1.6% of ram │ ram[█████░░░] 62% of 32.0G · 4.2G compressed │ disk[████░░░░] 48% · 210G free
43
+ TOOLS 101 calls │ Bash81 Edit12 Read8 │ 2 tool errors │ 6 files edited · 14 read │ 0 subagents │ 0 compactions
44
+ CACHE 97.9% hit │ 1h ttl ▸ expires 16:49 │ 0.12x vs all-uncached │ writes 504k 1h · 0 5m
45
+ TOKENS total 23.8M reused · 504k written · 366 uncached │ turn 184k reused · 5.2k written · 2 uncached
46
+ TIMING turn 12m last · 4m median · 12m max (3 timed) │ wall 1h11m · api 19m (27% busy) │ hooks 3 runs · 133ms median · 0 errors
47
+ ```
48
+
49
+ Rows reflow deterministically as the terminal changes width. Each may wrap once;
50
+ only then are lower-priority details removed with an `…` marker. No physical
51
+ output line exceeds the detected terminal width.
52
+
53
+ ## Install
54
+
55
+ The recommended installation keeps this frequently invoked command isolated:
56
+
57
+ ```bash
58
+ uv tool install agent-statusline
59
+ agent-statusline install
60
+ ```
61
+
62
+ Restart Claude Code after installation. To preview the configuration changes
63
+ first, run `agent-statusline install --dry-run`.
64
+
65
+ The package is a standard Python distribution. These install the same command
66
+ with other package managers:
67
+
68
+ ```bash
69
+ pipx install agent-statusline
70
+ python -m pip install agent-statusline
71
+ ```
72
+
73
+ `pipx` isolates the command like `uv tool`; `pip` installs it into the active
74
+ Python environment.
75
+
76
+ Requirements: Python 3.9 or newer, Claude Code, and macOS or Linux. Git is
77
+ optional and enriches the `PROJECT` row. On Linux, the macOS-specific memory
78
+ probe gracefully reduces the `SYSTEM` row to the information available.
79
+
80
+ ## What it tracks
81
+
82
+ - `PROJECT` and `MODEL`: location, Git state, task, model, effort, mode, and host version.
83
+ - `CONTEXT` and `USAGE`: context consumption, session tokens, API turns, and rate-limit windows.
84
+ - `COST`: current, rolling, recent, and lifetime spend plus session counts and line changes.
85
+ - `SYSTEM` and `TOOLS`: process, memory, disk, tool, file, subagent, and compaction activity.
86
+ - `CACHE`, `TOKENS`, and `TIMING`: cache efficiency, token flow, turn time, wall time, and hooks.
87
+
88
+ The [field reference](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/FIELDS.md)
89
+ documents every value and its source.
90
+
91
+ ## Local and private by design
92
+
93
+ - Rendering uses local Claude Code payloads, transcripts, and machine state. It
94
+ sends no telemetry and has no cloud fallback.
95
+ - Runtime state stays under `~/.claude/`, outside the repository. Package-owned
96
+ state is privately permissioned and locked, using atomic replacement or
97
+ durable append as appropriate.
98
+ - Currency-labelled totals are exactly attributable. When retained evidence can
99
+ prove only a lower bound, the display says `≥` instead of presenting it as a total.
100
+ - Installation backs up `settings.json`, preserves unrelated settings and hooks,
101
+ and refuses to replace configuration it cannot prove it owns.
102
+ - `agent-statusline selftest` uses isolated synthetic state and never touches the
103
+ live cost ledger.
104
+
105
+ The last-payload file can contain sensitive paths, titles, costs, and commands.
106
+ Do not publish or attach files from the status-line state directory.
107
+
108
+ ## Commands
109
+
110
+ | Command | Purpose |
111
+ | --- | --- |
112
+ | `agent-statusline install` | Wire the command and managed hooks into Claude Code |
113
+ | `agent-statusline install --dry-run` | Preview installation without writing anything |
114
+ | `agent-statusline selftest` | Render all ten rows from isolated synthetic data |
115
+ | `agent-statusline ledger show` | Inspect the local cost ledger |
116
+ | `agent-statusline uninstall` | Remove only configuration owned by this installation |
117
+ | `agent-statusline --version` | Print the installed version |
118
+
119
+ If the status line does not appear, run `agent-statusline selftest` first, then
120
+ restart Claude Code. Unexpected renderer failures leave only their time and
121
+ exception type in `~/.claude/statusline-last-error.json`.
122
+
123
+ ## Update or remove
124
+
125
+ ```bash
126
+ uv tool upgrade agent-statusline
127
+ agent-statusline install
128
+ ```
129
+
130
+ Re-running `install` refreshes the managed Claude Code wiring while preserving
131
+ unrelated configuration.
132
+
133
+ ```bash
134
+ agent-statusline uninstall
135
+ uv tool uninstall agent-statusline
136
+ ```
137
+
138
+ Uninstalling leaves the local ledger and history in `~/.claude/` intact.
139
+
140
+ ## Develop from a checkout
141
+
142
+ ```bash
143
+ git clone https://github.com/nachiketbhujbal/agent-statusline.git
144
+ cd agent-statusline
145
+ uv sync --locked --all-groups
146
+ uv run --locked python scripts/verify_docs.py
147
+ uv run --locked pre-commit run --all-files
148
+ uv run --locked pytest --cov=agent_statusline --cov-report=term-missing
149
+ uv build
150
+ ```
151
+
152
+ Run `python3 install.py` to wire a development checkout into Claude Code through
153
+ a symlink; working-tree edits then become live without reinstalling. Tests use
154
+ synthetic inputs and must never read the real `~/.claude` state.
155
+
156
+ Contributor-facing details live in the
157
+ [implementation guide](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/INTERNALS.md)
158
+ and [host-porting boundary](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/PORTING.md).
159
+
160
+ ## License
161
+
162
+ [MIT](https://github.com/nachiketbhujbal/agent-statusline/blob/main/LICENSE).
163
+ This independent project is not affiliated with or endorsed by Anthropic.
@@ -0,0 +1,141 @@
1
+ # agent-statusline
2
+
3
+ [![CI](https://github.com/nachiketbhujbal/agent-statusline/actions/workflows/ci.yml/badge.svg)](https://github.com/nachiketbhujbal/agent-statusline/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/agent-statusline.svg)](https://pypi.org/project/agent-statusline/)
5
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/nachiketbhujbal/agent-statusline/blob/main/LICENSE)
7
+ [![No dependencies](https://img.shields.io/badge/dependencies-none-brightgreen.svg)](https://github.com/nachiketbhujbal/agent-statusline/blob/main/pyproject.toml)
8
+
9
+ A dense, local-first status line for
10
+ [Claude Code](https://claude.com/claude-code). See the project, model, context,
11
+ usage, cost, tools, cache, tokens, timing, and machine pressure of the session
12
+ you are in—without telemetry, runtime network calls, or third-party packages.
13
+
14
+ ```text
15
+ PROJECT acme-web/services │ feature/ingest* ↑2 stash1 │ "Rewrite the importer"
16
+ MODEL Opus 5:high │ think │ fast off │ auto │ v2.1.246
17
+ CONTEXT ctx[██░░░░░░░░] 19% 189k/1M │ session 25.7M in · 311k out · 107k thinking · 189 api turns · avg 136k/1.65k per turn
18
+ USAGE 5h [███░░░░░░░] 26% @19.7%/h ▸ 98% (reset Wed 19:30 | 3h40m) │ 7d [█████░░░░░] 50% @0.3%/h ▸ 50% (reset Wed 17:00 | 1h10m)
19
+ COST $2.10 session │ 24h $9.40 · 7d $31.20 · 30d $88.60 │ last5 $27.50 · all $142.30 (5 convos · 6 sess · 1 fork) │ +174/-12 lines │ credits on
20
+ SYSTEM this session 540M · 5 proc · pid 4821 │ all claude 512M · 1 proc · 1.6% of ram │ ram[█████░░░] 62% of 32.0G · 4.2G compressed │ disk[████░░░░] 48% · 210G free
21
+ TOOLS 101 calls │ Bash81 Edit12 Read8 │ 2 tool errors │ 6 files edited · 14 read │ 0 subagents │ 0 compactions
22
+ CACHE 97.9% hit │ 1h ttl ▸ expires 16:49 │ 0.12x vs all-uncached │ writes 504k 1h · 0 5m
23
+ TOKENS total 23.8M reused · 504k written · 366 uncached │ turn 184k reused · 5.2k written · 2 uncached
24
+ TIMING turn 12m last · 4m median · 12m max (3 timed) │ wall 1h11m · api 19m (27% busy) │ hooks 3 runs · 133ms median · 0 errors
25
+ ```
26
+
27
+ Rows reflow deterministically as the terminal changes width. Each may wrap once;
28
+ only then are lower-priority details removed with an `…` marker. No physical
29
+ output line exceeds the detected terminal width.
30
+
31
+ ## Install
32
+
33
+ The recommended installation keeps this frequently invoked command isolated:
34
+
35
+ ```bash
36
+ uv tool install agent-statusline
37
+ agent-statusline install
38
+ ```
39
+
40
+ Restart Claude Code after installation. To preview the configuration changes
41
+ first, run `agent-statusline install --dry-run`.
42
+
43
+ The package is a standard Python distribution. These install the same command
44
+ with other package managers:
45
+
46
+ ```bash
47
+ pipx install agent-statusline
48
+ python -m pip install agent-statusline
49
+ ```
50
+
51
+ `pipx` isolates the command like `uv tool`; `pip` installs it into the active
52
+ Python environment.
53
+
54
+ Requirements: Python 3.9 or newer, Claude Code, and macOS or Linux. Git is
55
+ optional and enriches the `PROJECT` row. On Linux, the macOS-specific memory
56
+ probe gracefully reduces the `SYSTEM` row to the information available.
57
+
58
+ ## What it tracks
59
+
60
+ - `PROJECT` and `MODEL`: location, Git state, task, model, effort, mode, and host version.
61
+ - `CONTEXT` and `USAGE`: context consumption, session tokens, API turns, and rate-limit windows.
62
+ - `COST`: current, rolling, recent, and lifetime spend plus session counts and line changes.
63
+ - `SYSTEM` and `TOOLS`: process, memory, disk, tool, file, subagent, and compaction activity.
64
+ - `CACHE`, `TOKENS`, and `TIMING`: cache efficiency, token flow, turn time, wall time, and hooks.
65
+
66
+ The [field reference](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/FIELDS.md)
67
+ documents every value and its source.
68
+
69
+ ## Local and private by design
70
+
71
+ - Rendering uses local Claude Code payloads, transcripts, and machine state. It
72
+ sends no telemetry and has no cloud fallback.
73
+ - Runtime state stays under `~/.claude/`, outside the repository. Package-owned
74
+ state is privately permissioned and locked, using atomic replacement or
75
+ durable append as appropriate.
76
+ - Currency-labelled totals are exactly attributable. When retained evidence can
77
+ prove only a lower bound, the display says `≥` instead of presenting it as a total.
78
+ - Installation backs up `settings.json`, preserves unrelated settings and hooks,
79
+ and refuses to replace configuration it cannot prove it owns.
80
+ - `agent-statusline selftest` uses isolated synthetic state and never touches the
81
+ live cost ledger.
82
+
83
+ The last-payload file can contain sensitive paths, titles, costs, and commands.
84
+ Do not publish or attach files from the status-line state directory.
85
+
86
+ ## Commands
87
+
88
+ | Command | Purpose |
89
+ | --- | --- |
90
+ | `agent-statusline install` | Wire the command and managed hooks into Claude Code |
91
+ | `agent-statusline install --dry-run` | Preview installation without writing anything |
92
+ | `agent-statusline selftest` | Render all ten rows from isolated synthetic data |
93
+ | `agent-statusline ledger show` | Inspect the local cost ledger |
94
+ | `agent-statusline uninstall` | Remove only configuration owned by this installation |
95
+ | `agent-statusline --version` | Print the installed version |
96
+
97
+ If the status line does not appear, run `agent-statusline selftest` first, then
98
+ restart Claude Code. Unexpected renderer failures leave only their time and
99
+ exception type in `~/.claude/statusline-last-error.json`.
100
+
101
+ ## Update or remove
102
+
103
+ ```bash
104
+ uv tool upgrade agent-statusline
105
+ agent-statusline install
106
+ ```
107
+
108
+ Re-running `install` refreshes the managed Claude Code wiring while preserving
109
+ unrelated configuration.
110
+
111
+ ```bash
112
+ agent-statusline uninstall
113
+ uv tool uninstall agent-statusline
114
+ ```
115
+
116
+ Uninstalling leaves the local ledger and history in `~/.claude/` intact.
117
+
118
+ ## Develop from a checkout
119
+
120
+ ```bash
121
+ git clone https://github.com/nachiketbhujbal/agent-statusline.git
122
+ cd agent-statusline
123
+ uv sync --locked --all-groups
124
+ uv run --locked python scripts/verify_docs.py
125
+ uv run --locked pre-commit run --all-files
126
+ uv run --locked pytest --cov=agent_statusline --cov-report=term-missing
127
+ uv build
128
+ ```
129
+
130
+ Run `python3 install.py` to wire a development checkout into Claude Code through
131
+ a symlink; working-tree edits then become live without reinstalling. Tests use
132
+ synthetic inputs and must never read the real `~/.claude` state.
133
+
134
+ Contributor-facing details live in the
135
+ [implementation guide](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/INTERNALS.md)
136
+ and [host-porting boundary](https://github.com/nachiketbhujbal/agent-statusline/blob/main/docs/PORTING.md).
137
+
138
+ ## License
139
+
140
+ [MIT](https://github.com/nachiketbhujbal/agent-statusline/blob/main/LICENSE).
141
+ This independent project is not affiliated with or endorsed by Anthropic.
@@ -0,0 +1,53 @@
1
+ # Historical Actions exposure inventory
2
+
3
+ This public-safe record inventories the GitHub Actions surface retained before
4
+ repository visibility can change. It records identifiers and categories, never
5
+ the private values that triggered a match.
6
+
7
+ ## Method
8
+
9
+ At 2026-09-11T19:18:25Z, the authenticated GitHub API reported 41 workflow runs
10
+ and 26 unexpired artifacts. Every run-log archive was downloaded and every text
11
+ entry was scanned for the personal-provider email and private billing patterns
12
+ used by the repository policy. Every artifact was downloaded, recursively
13
+ opened through its outer artifact archive and inner wheel or source archive,
14
+ and checked for private paths, personal-provider email, private billing
15
+ evidence, and members above the two-MiB audit boundary.
16
+
17
+ The first pass found no matching run log. It found the superseded ADR 0018
18
+ billing phrase in the source distribution inside each artifact below:
19
+
20
+ | Artifact ID | Workflow run ID |
21
+ | --- | --- |
22
+ | `10182553023` | `34555947827` |
23
+ | `10184350659` | `34561155649` |
24
+ | `10184366510` | `34561213302` |
25
+ | `10185317588` | `34563964744` |
26
+ | `10185337583` | `34564023511` |
27
+ | `10185936009` | `34565747191` |
28
+ | `10185954867` | `34565803226` |
29
+ | `10186700274` | `34567959880` |
30
+ | `10186730316` | `34568055955` |
31
+ | `10187653749` | `34570718665` |
32
+ | `10187672444` | `34570771590` |
33
+ | `10188481916` | `34572971872` |
34
+ | `10188519132` | `34573060459` |
35
+ | `10190053406` | `34577055928` |
36
+ | `10190368422` | `34577894293` |
37
+ | `10190411583` | `34578002044` |
38
+
39
+ ## Disposition and verification
40
+
41
+ The maintainer explicitly authorized deletion of exactly those 16 unsafe
42
+ Actions artifacts. All deletions succeeded. Workflow runs and their logs,
43
+ GitHub Releases and release assets, Git refs and tags, and the ten clean Actions
44
+ artifacts were left intact.
45
+
46
+ A complete post-deletion pass again downloaded all 41 retained log archives;
47
+ all were available and no match remained. It downloaded all ten remaining
48
+ artifacts; all were available and no private path, personal-provider email,
49
+ private billing evidence, or oversized member remained.
50
+
51
+ This inventory does not alter or expand the accepted twelve historical pull
52
+ refs in ADR 0035. Unreachable objects, provider caches, visibility, and
53
+ post-conversion repository protection remain separate boundaries.