Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1e647da
chore(vendor): add vendored btop sources
senamakel Oct 28, 2026
4b42079
feat(vendor): add btop_embed header for embedded btop integration
senamakel Oct 28, 2026
ede059a
feat(vendor): add medulla btop header
senamakel Oct 28, 2026
11265ea
feat(vendor): add btop_embed.cpp for embedded btop support
senamakel Oct 28, 2026
e39f3a8
fix(btop): evaluate both view dimensions before early return
senamakel Oct 28, 2026
352afe5
refactor(btop): replace process exit handlers with embed fatal unwinding
senamakel Oct 28, 2026
b80b003
feat(btop): add embedded main loop for host-driven btop
senamakel Oct 28, 2026
9283ba0
feat(embed): route terminal I/O through embed host hooks
senamakel Oct 28, 2026
e7d4015
fix(btop): avoid blocking resize loop and signal-based reload
senamakel Oct 28, 2026
8b878be
chore(vendor): add reload_conf flag to btop globals
senamakel Oct 28, 2026
fa4c9eb
chore(vendor): remove unused btop cli sources
senamakel Oct 28, 2026
adf0610
chore(vendor): drop unused btop_cli include from btop.cpp
senamakel Oct 28, 2026
c1de8cf
build: add src/btop to workspace members
senamakel Oct 28, 2026
2a8e44a
feat(tui): add medulla-btop dependency for the Resources tab
senamakel Oct 28, 2026
e3da517
feat(btop): add build script for btop integration
senamakel Oct 28, 2026
6957b3e
docs(btop): replace intra-doc link with plain code reference
senamakel Oct 28, 2026
a681d9a
feat(btop): add Rust FFI bindings for btop types and library
senamakel Oct 28, 2026
43dd6db
feat(btop): add handle module for btop process management
senamakel Oct 28, 2026
76b710d
feat(btop): add tests for btop module
senamakel Oct 28, 2026
cc90c1b
chore(deps): add medulla-btop crate to the lockfile
senamakel Oct 28, 2026
454d04f
feat(btop): add coding-agents-only process filter
senamakel Oct 28, 2026
2d8728a
fix(btop): wait for runner before flipping proc agents mode
senamakel Oct 28, 2026
fcacf9f
feat(proc): add agents mode to filter the process tree by coding agent
senamakel Oct 28, 2026
6187110
fix(btop): reapply process filter when agent mode changes
senamakel Oct 28, 2026
c91fc33
feat(proc): add agent column and empty-state to the process box
senamakel Oct 28, 2026
d0f04bb
refactor(resources): remove resource sampler and plot modules
senamakel Oct 28, 2026
cdd91e2
chore(docs): remove implemented resources tab plan and screenshot
senamakel Oct 28, 2026
7cc34d9
feat(tui): add btop-style system monitor view
senamakel Oct 28, 2026
5079179
feat(tui): add btop feed and input modules
senamakel Oct 28, 2026
d8a99cf
feat(tui): add btop-style pane rendering
senamakel Oct 28, 2026
b0b359c
feat(tui): add resources module for app ui
senamakel Oct 28, 2026
f8eada8
refactor(tui): isolate btop config dir per process when no home is set
senamakel Oct 28, 2026
5f2c670
feat(tui): hand the Resources tab over to btop
senamakel Oct 28, 2026
52a65df
refactor(tui): remove resources settings subpage
senamakel Oct 28, 2026
27e6ceb
refactor(theme): remove resources theme and gradient helpers
senamakel Oct 28, 2026
f0fc3d7
refactor(tui): replace resource sampler with btop redraw waker
senamakel Oct 28, 2026
8086365
refactor(remote): simplify session row collection and drop usage test…
senamakel Oct 28, 2026
9bd4c4b
refactor(config): remove resources config types
senamakel Oct 28, 2026
bfeebda
fix(tui): hide resources when their tab is not shown
senamakel Oct 28, 2026
4168b3d
test(theme): drop assertions for retired resources section
senamakel Oct 28, 2026
5df1093
feat(tui): add tests for btop ui
senamakel Oct 28, 2026
0e6fee6
feat(tui): add tests for app resources
senamakel Oct 28, 2026
7485d7c
fix(tui): hide resources pane when leaving it
senamakel Oct 28, 2026
4628fef
fix(btop): use escape sequences supported by the host terminal emulator
senamakel Oct 28, 2026
6ad7a6f
test(tui): assert btop boxes honour cursor positioning
senamakel Oct 28, 2026
37cf43d
test(tui): tighten btop cpu box placement assertions
senamakel Oct 28, 2026
5f9b25a
chore(tui): use a shared scratch dir for btop config without a home
senamakel Oct 28, 2026
854f3de
ci: add macOS btop build job and install g++-14 for native deps
senamakel Oct 28, 2026
0614b85
ci: initialize submodules before embedded btop tests
senamakel Oct 28, 2026
d9bedbf
fix(release): include medulla-btop in version bump packages
senamakel Oct 28, 2026
5a4531f
test(release): cover medulla-btop in bump-version lockfile fixture
senamakel Oct 28, 2026
770056b
docs(agents): document vendored btop and medulla-btop crate
senamakel Oct 28, 2026
10590f4
docs(developing): document c++23 compiler requirement for btop
senamakel Oct 28, 2026
4e47f50
test(config): cover loading configs with retired resources tables
senamakel Oct 28, 2026
afa7ba4
test(config): use raw string delimiters that survive embedded quotes
senamakel Oct 28, 2026
51a1d81
chore: apply rustfmt formatting across btop and tui modules
senamakel Oct 28, 2026
b215528
test(tui): update expected subpage in config editor navigation test
senamakel Oct 28, 2026
8dc637d
test(tui): update settings subpage key assertions
senamakel Oct 28, 2026
be139bb
fix(btop): keep btop alive across relogin and stop it safely at exit
senamakel Oct 28, 2026
8965007
fix(btop): degrade gracefully when no g++ 14 is available
senamakel Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/actions/native-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,18 @@ runs:
# in the graph on a headless build too and their build scripts fail
# without these. Not needed by medulla itself.
# - libgit2 needs nothing: libgit2-sys builds vendored C via cc.
# - g++-14: the vendored btop (`src/btop`, the Resources tab) is C++23 and
# needs libstdc++ 14's `std::ranges::to`. Ubuntu 24.04 defaults to
# g++ 13; `src/btop/build.rs` picks `g++-14` when the default is older.
- name: Install native build dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libssl-dev libx11-dev libxi-dev libxtst-dev libxdo-dev
pkg-config libssl-dev libx11-dev libxi-dev libxtst-dev libxdo-dev g++-14

# Lanes with g++-14 must really build btop: without this, `src/btop/build.rs`
# would quietly fall back to the unsupported stub on a broken toolchain.
- name: Require the embedded btop
shell: bash
run: echo "MEDULLA_BTOP_REQUIRED=1" >> "$GITHUB_ENV"
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,30 @@ jobs:
if: always()
run: sccache --show-stats

# The Resources tab compiles the vendored btop (C++23) into the binary, and
# the macOS release build is the only other place that compiler meets it.
# Building just that crate here surfaces an Apple-clang gap on the pull
# request rather than at release time, without a full macOS workspace build.
btop-macos:
name: btop (macOS)
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
submodules: false

# Cargo reads every workspace member's manifest, path deps included,
# even for `-p`.
- name: Initialize submodules
run: bash scripts/init-submodules.sh

- uses: dtolnay/rust-toolchain@stable

- name: Test the embedded btop
run: cargo test --locked -p medulla-btop

# ── end-to-end harness ─────────────────────────────────────────────────────
# Does this change need the docker/tmux harness run at all?
#
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ This repository is a two-crate Cargo workspace: the `medulla` SDK library at `sr
- `src/tui/src/ui/` owns ratatui state, rendering, input, and theming; `src/tui/src/cli.rs` owns argument parsing; `src/tui/src/main.rs` owns process wiring.
- `src/sdk/tests/` and `src/tui/tests/` contain feature and mocked end-to-end suites; reusable stand-ins live in `src/sdk/tests/support/` (the app crate's tests reach them via `#[path]`).
- `src/sdk/src/agent/` is the local agent: a `tinyagents` harness plus Medulla's own tool surface (shell, filesystem), used by the in-process daemon provider.
- `vendor/` holds the three vendored crates (`tinyagents`, `tinyflows`, `tinyhumans-sdk`), excluded from the workspace. Avoid unrelated edits there.
- `vendor/` holds the three vendored crates (`tinyagents`, `tinyflows`, `tinyhumans-sdk`), excluded from the workspace, and the vendored C++ `btop` (`vendor/btop`, plain source, not a submodule). Avoid unrelated edits there; `vendor/btop/MEDULLA.md` lists every Medulla patch to btop.
- `src/btop/` is the `medulla-btop` crate: its `build.rs` compiles `vendor/btop` and its safe API runs btop embedded. `src/tui/src/ui/btop/` is the host side (emulator, input encoding, agent feed) behind the Resources tab.
- `target/` and `.medulla-state/` are generated or local runtime data; never commit them.

## Build, Test, and Development Commands
Expand Down
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["src/link", "src/sdk", "src/tui"]
members = ["src/btop", "src/link", "src/sdk", "src/tui"]
# Vendored path deps must not become workspace members: they carry their own
# lints/tests and would otherwise fall under the CI clippy/test gates.
#
Expand All @@ -24,6 +24,9 @@ medulla = { path = "src/sdk", default-features = false }
# The host-link transport (docs/host-link-protocol.md). A plain path dep: it is
# ours, has no registry coordinate, and is not vendored.
medulla-link = { path = "src/link" }
# btop, compiled in from `vendor/btop` and driven through a C ABI; the host
# Resources tab is this crate's only consumer.
medulla-btop = { path = "src/btop" }
# The agent harness lives in the split `tinyagents-harness` package inside the
# direct `tinyagents` submodule. Keep the dependency key as `tinyagents` so the
# host code can migrate independently of the upstream package rename.
Expand Down
6 changes: 6 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ cargo clippy --all-targets -- -D warnings
cargo fmt --check
```

Building needs a C++23 compiler as well as Rust: the Resources tab is btop,
compiled into the binary from `vendor/btop` by `src/btop/build.rs`. Use GCC 14+
or Clang 18+ on Linux (on Ubuntu 24.04, `apt install g++-14` — the build picks
it up when the default `g++` is older) and Xcode 16+ on macOS. Windows builds
without it, and the tab says btop is unavailable there.

Run tests, Clippy, and formatting before pushing. See
[Contributing](https://tinyhumans.gitbook.io/medulla/developers/contributing)
for the full loop and the release process.
Expand Down
Loading
Loading