Skip to content

release/v0.4.0: DX focus — brew, install script, opencode native scrape - #4

Open
tech4242 wants to merge 1 commit into
mainfrom
release/v0.4.0
Open

tech4242 wants to merge 1 commit into
mainfrom
release/v0.4.0

Conversation

@tech4242

Copy link
Copy Markdown
Owner

Summary

DX-focused release. No new TUI features — instead make existing functionality easier to install and pick up one new integration (opencode native SQLite scrape) that no other dashboard covers.

Quick Start (the new headline UX)

brew install tech4242/agenttop/agenttop                                                       # macOS
curl -fsSL https://raw.githubusercontent.com/tech4242/agenttop/main/scripts/install.sh | sh   # Linux
agenttop

Distribution

  • Homebrew tap published via release workflow:
    • homebrew/agenttop.rb in this repo is the source of truth.
    • release.yml computes SHA256s, renders the formula with the new version + four SHAs, and pushes Formula/agenttop.rb to tech4242/homebrew-agenttop. Gated on the HOMEBREW_TAP_TOKEN secret — skips silently with a warning if absent so we don't break the release workflow while the tap repo is being set up.
    • Release tarballs now ship .sha256 sibling files (used by both the brew bumper and the install script).
  • scripts/install.sh: detects OS+arch, downloads matching tarball from the latest GitHub release, verifies SHA256, installs to ~/.local/bin/agenttop, hints PATH if needed. ~120 LOC of POSIX shell.
  • README Quick Start at the top, immediately after the preview image. The current Installation section moves down to "Other install methods" (cargo, direct binaries).

opencode native scrape

  • New src/scraper/opencode_sessions.rs reads ~/.local/share/opencode/opencode.db read-only via rusqlite (bundled — no system sqlite needed). Aggregates per-session tokens from assistant messages, matches running opencode PIDs to sessions by cwd.
  • Defensive against schema drift: any rusqlite error downgrades to "no opencode sessions" rather than crashing the scraper.
  • Wired into Scraper::tick alongside Claude Code session scraping. Renders in the same Live panel with agent_id="opencode".
  • 5 new tests with in-test SQLite fixtures (~90% coverage on the new module).

What's NOT in v0.4.0 (parked in ROADMAP)

  • Local model integration (ollama / llama.cpp / vllm) — the v0.5.0 theme
  • AUR package, .deb/.rpm, cargo binstall, crates.io publish
  • Codex CLI / Cline native scrapers (OTLP works fine, less urgent)
  • Themes, web UI, MCP server self-monitoring, self-update

Tap setup checklist (one-time)

  1. Create empty repo tech4242/homebrew-agenttop.
  2. Create a Personal Access Token with repo scope.
  3. Add as repo secret HOMEBREW_TAP_TOKEN on tech4242/agenttop.
  4. Cut the next release — workflow auto-publishes formula.

Test plan

  • cargo test — 78 lib tests + integration tests passing
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • After merge + tag: cut v0.4.0 release and confirm:
    • GitHub release attaches *.tar.gz and *.tar.gz.sha256 for all four targets
    • Homebrew formula published to tap repo (or skipped warning if token not set yet)
    • curl -fsSL .../install.sh | sh works on a fresh Linux VM
    • brew install tech4242/agenttop/agenttop works on a fresh Mac
  • Smoke: with opencode session active, agenttop shows it in Live panel (no community OTLP plugin installed)

…ape)

Distribution + first-run UX overhaul. No new TUI features; instead make
existing functionality easier to install and pick up one new integration
that no other dashboard covers.

DX:
- README opens with a 3-line Quick Start (brew for macOS, curl-pipe-sh
  for Linux, run agenttop). Current Installation section moves under
  'Other install methods'.
- scripts/install.sh: detects OS+arch, downloads matching tarball from
  the latest GitHub release, verifies SHA256 (falls back to printing the
  hash when no .sha256 sibling exists yet), installs to
  ~/.local/bin/agenttop, hints PATH if needed.
- Homebrew tap published via release workflow:
    - homebrew/agenttop.rb in this repo is the source of truth.
    - release.yml computes SHA256s, renders the formula with the new
      version + four SHAs, and pushes Formula/agenttop.rb to
      tech4242/homebrew-agenttop. Gated on HOMEBREW_TAP_TOKEN secret —
      skips silently with a warning if absent.
    - Release tarballs now ship .sha256 siblings used by both the brew
      bumper and the install script.

opencode native scraper:
- src/scraper/opencode_sessions.rs reads ~/.local/share/opencode/opencode.db
  read-only via rusqlite (bundled). Aggregates per-session tokens from
  assistant messages, matches running opencode PIDs to sessions by cwd.
  Defensive against schema drift: any rusqlite error downgrades to 'no
  opencode sessions' rather than crashing the scraper.
- Wired into Scraper::tick alongside Claude Code session scraping.
  Renders in the same Live panel with agent_id='opencode'.
- 5 new tests with in-test SQLite fixtures.

Internal:
- ROADMAP.md added to .gitignore (personal scratch for post-v0.4.0).
- Bumped Cargo.toml to 0.4.0.

Verification: 78 lib tests + integration tests pass, clippy clean under
-D warnings, fmt clean. Coverage maintained (new scraper at >90%).
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.36538% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.20%. Comparing base (5e3929f) to head (c4af0ff).

Files with missing lines Patch % Lines
src/scraper/opencode_sessions.rs 79.41% 42 Missing ⚠️
src/scraper/mod.rs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   73.92%   74.20%   +0.27%     
==========================================
  Files          25       26       +1     
  Lines        4698     4904     +206     
==========================================
+ Hits         3473     3639     +166     
- Misses       1225     1265      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants