Skip to content

feat(os-vitals): core on macOS (CPU, memory, processes) - #5

Merged
pblobp merged 4 commits into
mainfrom
feat/os-vitals-core
Nov 17, 2026
Merged

pblobp merged 4 commits into
mainfrom
feat/os-vitals-core

Conversation

@pblobp

@pblobp pblobp commented Nov 17, 2026

Copy link
Copy Markdown
Owner

What changed and why

The first plugin, OS Vitals: a system monitor in Orca's right sidebar and status bar. This pull request is its core on macOS. Network, disk, GPU, energy, quitting a process, alerts, Linux support and the listing images follow in later pull requests. Nothing is released by this change: the catalog stays empty and no tag is made.

  • Worker: samples CPU (total and per core, with performance and efficiency cores labeled), memory (app, wired, compressed, cached, swap, pressure) and the process list. Process CPU comes from CPU time between two readings. Processes are read only while a view shows them.
  • Panel: an HTML panel with the Overview (CPU, memory and top processes cards) and the Processes view (filter, sortable columns, paging, a details drawer). Styled from Orca's theme variables. Process names and command lines are set with textContent only.
  • Status bar: CPU 23% · MEM 61%, updated at most every 5 seconds. Pressing it opens the panel through Orca's own CLI.
  • Outside the plugin folder: unit tests and cleaned fixtures (tests/os-vitals/), the smoke test and browser harness (tools/os-vitals/), and the allowlist (policy/os-vitals.json). None of them is installed.

Measured worker cost on an M4 Pro: about 1.2% of one core with the Overview open, 2.1% with the Processes view open, 0.16% in the background.

Plugin

os-vitals (new)

Access changes

New plugin, so everything is new:

  • Execution: trusted-worker. It reads system counters and lists processes, which a sandboxed panel cannot do.
  • Capabilities: settings:own (its settings), notifications:show (the fallback when the panel cannot be opened; memory alerts in a later pull request).
  • Contributions: one panel, one status bar item, one command (os-vitals.open), nine settings.
  • Node modules: node:child_process, node:fs, node:os, node:path, node:timers, node:url.
  • Programs, by absolute path: /bin/ps, /usr/bin/vm_stat, /usr/sbin/sysctl, /usr/sbin/ioreg.
  • One declared exception: src/cli.ts#runOrcaCli runs Orca's own CLI, whose path is found from the worker's executable at run time, to open the panel.
  • Network: none.

Tests

  • npm run check: formatting, policy (including the fixture scan), catalog and versions pass; 143 of 143 script tests pass.
  • orca plugin validate plugins/os-vitals --json: valid, no errors or warnings.
  • orca plugin test plugins/os-vitals --json: 13 of 13 worker tests pass.
  • node --test 'tests/os-vitals/**/*.test.ts': 84 of 84 pass.
  • node tools/os-vitals/smoke.ts on macOS: reads the real system and passes. Linux and Windows run for the first time in this pull request's CI.
  • Loaded in Orca 1.4.261 as a development plugin: the panel draws live data, the status bar item updates, and the open-panel command opens the panel.

Not verified: the drawer, filter, sort and keyboard handling inside Orca itself (checked in the browser harness only), and the light theme in Orca.

Screenshots

Reviewed locally from Orca (dark) and from the harness (dark, light, 220 px). They are not attached: the CLI cannot upload images, and the repository does not commit screenshots.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD

pblobp and others added 3 commits November 17, 2026 18:35
A worker that samples CPU from node:os, an HTML panel with the
Overview CPU card, a status bar item, and the command that opens the
panel through Orca's CLI. The manifest already declares the final
access: two capabilities, one panel, one command, one status bar item.

Unit tests and the smoke test live outside the plugin folder, so they
are not installed.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
The worker reads memory from vm_stat and sysctl, the process list from
ps, and core kinds from ioreg. Process CPU comes from CPU time between
two readings. The panel gains the memory card, the top processes card,
and a sortable, filterable process table with a details drawer.

Processes are read only while a view shows them. Measured cost is
about 1.2% of one core with the Overview open and 0.16% in the
background.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
Comment thread tools/os-vitals/serve.ts Fixed
CodeQL flagged the development server for returning an error's text
to the client. It now logs the error and answers with a fixed message.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EWVANCgSt8W3VxxxZyAyoD
@pblobp
pblobp merged commit 8076bc8 into main Nov 17, 2026
11 checks passed
@pblobp
pblobp deleted the feat/os-vitals-core branch November 17, 2026 23:13
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