Skip to content

feat(package): add agent-settings package - #750

Merged
koterpillar merged 2 commits into
mainfrom
agent-settings
Nov 24, 2026
Merged

koterpillar merged 2 commits into
mainfrom
agent-settings

Conversation

@koterpillar

@koterpillar koterpillar commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Add an agent-settings package that grants command and path permissions to Claude and Rovo. The first commit adds shared JSON and YAML file editing. The second adds the package and its tests.

Usage

{
  "agent-settings": "development-tools",
  "agents": ["claude", "rovo"],
  "execute": [
    "git status",
    "stack test",
    { "exact": "make test" }
  ]
}

The required agent-settings field names the package. Use distinct names to install multiple packages for the same agents. The required agents field accepts one agent or a nonempty list.

A string in execute allows the command with or without extra arguments. An exact object allows only the specified command. Use literal words separated by single spaces. The parser rejects quoting, wildcards, expansions, and shell operators.

{
  "agent-settings": "project-files",
  "agents": ["claude"],
  "read": ["projects", "/etc/hosts"],
  "write": ["projects/mybox", "/tmp/mybox"]
}

The optional read and write fields grant access to files or directories. Relative paths start at the user's home directory, and directory grants cover descendants. Write grants include read access. Rovo requires each read path to be covered by a write path. It places new command allow rules before existing command rules.

Installation behavior

Mybox edits ~/.claude/settings.json and ~/.rovo/config.yml. It creates files and missing keys when it adds a grant. It skips invalid JSON or YAML and settings fields with the wrong type.

Installation adds grants and keeps existing entries. Reinstallation can add duplicates. Removing an entry or uninstalling a package leaves installed grants in place. Changing the package definition triggers installation. Changes to agent settings alone do not.

Mybox updates agents in the listed order. If a later agent fails, earlier changes remain. The shared writer preserves files when the content stays the same. When content changes, it re-encodes the file and recreates it with default permissions. Recreating the file replaces any symlink at that path.

Verification

All 74 focused tests passed. They cover agent settings, package decoding, file editing, and the Driver file modifier. bash ./bin/lint and git diff --check passed.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.11111% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.03%. Comparing base (db5a8c1) to head (c8570c8).

Files with missing lines Patch % Lines
test/Mybox/Package/AgentSettingsSpec.hs 83.55% 0 Missing and 25 partials ⚠️
src/Mybox/Package/AgentSettings/Internal.hs 85.22% 1 Missing and 12 partials ⚠️
src/Mybox/Package/AgentSettings/Types.hs 72.41% 0 Missing and 8 partials ⚠️
test/Mybox/FileLensSpec.hs 95.58% 0 Missing and 3 partials ⚠️
test/Mybox/Driver/IOSpec.hs 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #750      +/-   ##
==========================================
- Coverage   92.43%   92.03%   -0.40%     
==========================================
  Files         126      131       +5     
  Lines        5118     5477     +359     
  Branches      281      330      +49     
==========================================
+ Hits         4731     5041     +310     
  Misses        106      106              
- Partials      281      330      +49     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@koterpillar
koterpillar marked this pull request as ready for review November 24, 2026 09:45
@koterpillar
koterpillar merged commit 65f27c3 into main Nov 24, 2026
13 checks passed
@koterpillar
koterpillar deleted the agent-settings branch November 24, 2026 10:03
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.

1 participant