zara-shell: constrained argv execution surface #481

Open
nsaspy wants to merge 9 commits from rage/5-zara-shell into main
Owner

Implements #5.

RED-first contract: argv-only execution, explicit allowlist, root-confined cwd, bounded env/stdin/output/runtime, structured timeout and truncation evidence, and no shell interpolation.

Zara Core #371 is now completed. Current Core supports plugin-declared zara_requires_approval=true metadata through the canonical principal-scoped ToolApprovalController; callers/model input cannot downgrade it and duplicate registration fails closed. shell.run uses that canonical contract and this plugin introduces no second approval path.

Registry publication is included so zara-shell receives the generated validator, Nix package, plugin tests, installed-runtime compatibility, and lifecycle gates derived from plugins.json.

The generic bounded runner remains deliberately narrow; higher-level sysadmin/coding/desktop behavior stays in their domain plugins.

Implements #5. RED-first contract: argv-only execution, explicit allowlist, root-confined cwd, bounded env/stdin/output/runtime, structured timeout and truncation evidence, and no shell interpolation. Zara Core #371 is now completed. Current Core supports plugin-declared `zara_requires_approval=true` metadata through the canonical principal-scoped `ToolApprovalController`; callers/model input cannot downgrade it and duplicate registration fails closed. `shell.run` uses that canonical contract and this plugin introduces no second approval path. Registry publication is included so `zara-shell` receives the generated validator, Nix package, plugin tests, installed-runtime compatibility, and lifecycle gates derived from `plugins.json`. The generic bounded runner remains deliberately narrow; higher-level sysadmin/coding/desktop behavior stays in their domain plugins.
Some checks failed
CI / test (pull_request) Failing after 22s
This pull request has changes conflicting with the target branch.
  • plugins/zara-shell/README.md
  • plugins/zara-shell/lib/zara_shell/domain.py
  • plugins/zara-shell/lib/zara_shell/plugin.py
  • plugins/zara-shell/test/test_plugin.py
  • plugins/zara-shell/test/test_shell.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/5-zara-shell:rage/5-zara-shell
git switch rage/5-zara-shell

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/5-zara-shell
git switch rage/5-zara-shell
git rebase main
git switch main
git merge --ff-only rage/5-zara-shell
git switch rage/5-zara-shell
git rebase main
git switch main
git merge --no-ff rage/5-zara-shell
git switch main
git merge --squash rage/5-zara-shell
git switch main
git merge --ff-only rage/5-zara-shell
git switch main
git merge rage/5-zara-shell
git push origin main
Sign in to join this conversation.
No description provided.