Repository navigation
WIP: make tool authoring location rw by default - #4
Closed
Thomas A Caswell (tacaswell) wants to merge 3 commits into
Closed
Thomas A Caswell (tacaswell) wants to merge 3 commits into
Thomas A Caswell (tacaswell) wants to merge 3 commits into
Conversation
Contributor
Author
|
Is / will be merged into #25 |
Thomas A Caswell (tacaswell)
added a commit
to tacaswell/n2snscripts
that referenced
this pull request
Oct 20, 2026
Personal skills were mounted one entry at a time over a tmpfs, so a new
top-level skill created inside the sandbox was discarded on exit, and the
agents/, commands/ and prompts/ directories the tools also read were not
writable at all (except Copilot's skills/ and agents/). Tools could
therefore not author their own extensions across sessions.
Replace build_personal_skills_mounts with two helpers in the library,
built on _mount_authoring_dir:
- build_authoring_dir_mounts KIND DIR...: create DIR on the host (not
under --dry-run) and bind it read-write as a whole at its logical
path, so anything created inside the sandbox persists.
- build_personal_authoring_mounts KIND DIR...: the same, but only for
directories that already exist (alternate search locations).
Skills symlinked in from a separate repository would dangle in a
whole-directory bind, and bwrap refuses to bind over a symlink inside a
bound directory. So the resolved target of each symlink entry is also
bound read-write at its own path; only that entry is exposed, not the
repository around it. Targets, or directories, that resolve into or
contain a blocked location are skipped with a warning. If the authoring
directory is itself reached through a symlink, fall back to the previous
per-entry binds (new top-level entries are then not persisted).
- bwopencode, bwopencode2: {skills,agents,commands} under the config
dir (now skipped by resolve_config_symlinks so the read-only bind
does not shadow them); ~/.claude/{skills,agents,commands} and
~/.agents/{skills,agents} when present
- bwclaude: {skills,agents,commands} under the Claude home
- bwcodex: ~/.codex/{skills,prompts}; ~/.agents/skills when present
- bwcopilot: ~/.copilot/{skills,agents} via the shared helper (replaces
the inline bind and mkdir); ~/.agents/skills when present
The deployment-managed read-only mounts are unchanged. Documented in
the launcher headers and a reworked "Authoring directories" section of
docs/bw-wrappers.md.
Based on the approach in NSLS2#4. Items from that PR
already on this branch (haiku model override, dropped gateway hostname
in bwclaude messages) are not repeated.
Assisted-by: OpenCode:claude-sonnet-5-5
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.
Done with 🤖
Summary
Allows tools to author skils/propmts/what-have-you from inside
Description
Increase the number of files we mount into the sandbox rw so that the tools to extend the tools work as expected.
Testing
manual local testing of opencode, not exhaustive of all tools.
Checklist
.github/workflows/super-linter.ymlrunansibledeployment)