Move power verbs into a bundled system plugin#54
Merged
Conversation
shutdown, sleep, restart/reboot, lock, log out, screensaver, display sleep, empty trash, and eject were Core built-ins. They only emit `exec`, which is plugin-legal, so they don't need host privilege. Each is now a `bool` option in the bundled `system` plugin, giving every verb its own on/off toggle in Settings (all default on); the standard per-plugin toggle disables the lot. Core keeps the verbs that emit host-only actions (quit, settings, install, reload, update) and the version readout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the "exec is plugin-legal" jargon; what a reader needs is the rule that keeps an exec-only verb out of the host built-ins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A new workspace member (`system`) isn't in plugins/package-lock.json, which fails `npm ci` (exact-sync only). `npm install` reconciles the lockfile in CI without a committed bump. Also add `system` to the vitest matrix so its tests run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The packager resources list is an explicit allowlist; without these two entries the system plugin ships in neither the app bundle nor the Linux packages, so the daemon never seeds it. Mirrors every other bundled plugin (manifest.json + plugin.js). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The power verbs (
shutdown,sleep,restart/reboot,lock,log out,screensaver,display sleep,empty trash,eject) were Core built-ins insrc/plugins/builtin/core.rs. They only emitexec, which is already plugin-legal, so they don't need host privilege.They now live in a bundled JS plugin,
plugins/system/. Each verb is abooloption (all default on), so it gets its own toggle in Settings → Plugins → System; the standard per-plugin toggle disables every verb at once. OS detection usesnode:os, and the per-OS command matrix is carried over unchanged fromcore.rs.Core keeps the verbs that emit host-only actions the JS boundary rejects (
quit,openSettings,reloadPlugin, install, update) plus the version readout.ejectships a macOS command only; its row is omitted on Linux, sincegio mount --ejectneeds a target device.Verification
cargo test,cargo clippy --all-targets,cargo fmt --check: clean.plugins/systemvitest: 12 tests covering OS gating, per-verb option gating, exec action shape, and prefix-match scoring.🤖 Generated with Claude Code