Skip to content

feat(agent): copy agent settings into sandbox home directory#48

Merged
feloy merged 1 commit into
mainfrom
agent-cfg-2
Jun 2, 2026
Merged

feat(agent): copy agent settings into sandbox home directory#48
feloy merged 1 commit into
mainfrom
agent-cfg-2

Conversation

@feloy

@feloy feloy commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

When --agent is specified, files placed in
/agents// are staged into the build context and COPYed with --chown=sandbox:sandbox into /sandbox before the agent is installed, so agent init can layer on top without overwriting user settings.

  • config::agent_settings_dir() resolves the settings subdirectory using the same lookup order as --config
  • Integration tests verify presence, absence, and sandbox ownership
  • README documents the feature with examples for both agents

Closes #46

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.15686% with 20 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@89dbd6b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/main.rs 86.11% 15 Missing ⚠️
src/containerfile.rs 96.66% 3 Missing ⚠️
src/config.rs 95.55% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage        ?   83.05%           
=======================================
  Files           ?       16           
  Lines           ?     1889           
  Branches        ?        0           
=======================================
  Hits            ?     1569           
  Misses          ?      320           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

When --agent is specified, files placed in
<settings dir>/agents/<agent>/ are staged into the build context
and COPYed with --chown=sandbox:sandbox into /sandbox before the
agent is installed, so agent init can layer on top without
overwriting user settings.

- Agent::id() trait method replaces AgentKind::name() switch
- config::agent_settings_dir() resolves the settings subdirectory
  using the same lookup order as --config
- Integration tests verify presence, absence, and sandbox ownership
- README documents the feature with examples for both agents

Closes #46

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy merged commit c65dda4 into main Jun 2, 2026
6 checks passed
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.

add agent settings in the image

1 participant