Repository navigation
feat(os-vitals): core on macOS (CPU, memory, processes) - #5
Merged
Merged
Conversation
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
textContentonly.CPU 23% · MEM 61%, updated at most every 5 seconds. Pressing it opens the panel through Orca's own CLI.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:
trusted-worker. It reads system counters and lists processes, which a sandboxed panel cannot do.settings:own(its settings),notifications:show(the fallback when the panel cannot be opened; memory alerts in a later pull request).os-vitals.open), nine settings.node:child_process,node:fs,node:os,node:path,node:timers,node:url./bin/ps,/usr/bin/vm_stat,/usr/sbin/sysctl,/usr/sbin/ioreg.src/cli.ts#runOrcaCliruns Orca's own CLI, whose path is found from the worker's executable at run time, to open the panel.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.tson macOS: reads the real system and passes. Linux and Windows run for the first time in this pull request's CI.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