Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/bwcopilot
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,10 @@ main() {
# the read-only logical settings path.
build_copilot_settings_mount
# Deployment-managed skills are optional and never replace user-created
# skills under COPILOT_HOME. Bind the deployment alias read-only after
# skills under COPILOT_HOME. Bind the shared skills tree read-only after
# user extra mounts so this narrow final mount cannot be shadowed writable.
if [[ -d /opt/nsls2/skills/skills && -r /opt/nsls2/skills/skills ]]; then
build_managed_ro_bind /opt/nsls2/skills/skills /opt/nsls2/skills/skills
if [[ -d /nsls2/agents/skills && -r /nsls2/agents/skills ]]; then
build_managed_ro_bind /nsls2/agents/skills /nsls2/agents/skills
fi

# Environment variables
Expand Down
3 changes: 2 additions & 1 deletion bin/bwopencode
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ build_managed_config() {
fi
}

# The host-managed skills alias may point into /opt/nsls2/skills. Bind
# The host-managed skills alias may point into the shared skills tree
# (/nsls2/agents/skills). Bind
# its resolved source at OpenCode's documented managed-skills location so the
# alias target and every supporting file remain available inside the sandbox.
build_managed_skills() {
Expand Down
3 changes: 2 additions & 1 deletion bin/bwopencode2
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ build_managed_config() {
fi
}

# The host-managed skills alias may point into /opt/nsls2/skills. Bind
# The host-managed skills alias may point into the shared skills tree
# (/nsls2/agents/skills). Bind
# its resolved source at OpenCode's documented managed-skills location so the
# alias target and every supporting file remain available inside the sandbox.
build_managed_skills() {
Expand Down
18 changes: 10 additions & 8 deletions docs/bw-wrappers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,19 @@ configuration directories.
- Codex: `/etc/codex/skills`
- Claude: `/etc/claude-code/.claude/skills` and
`/etc/claude-code/managed-settings.json`
- Copilot: its deployment-defined shared-skill directory, when configured by
the wrapper
- Copilot: the shared skills tree `/nsls2/agents/skills`, at the same path
inside the sandbox

## Shared agent skills

Shared agent skills are a deployment-managed skill collection. The deployment
defines the source repository or checkout and manages read-only aliases at the
paths above. When those aliases are present, `bwopencode`, `bwopencode2`,
`bwcodex`, and `bwclaude` mount them read-only into their sandboxes. A wrapper configured for
Copilot likewise mounts its deployment-defined shared-skill directory
read-only.
Shared agent skills are a deployment-managed skill collection published to
`/nsls2/agents/skills`. The deployment links the system skill directories above
to it. When those links are present, `bwopencode`, `bwopencode2`, `bwcodex`,
and `bwclaude` resolve them and mount the shared tree read-only at the same
paths inside their sandboxes. `bwcopilot` has no system skill directory, so it
mounts `/nsls2/agents/skills` read-only at that path; list it in Copilot's
`skillDirectories` setting. `/nsls2/agents` itself is not mounted, so a skill
refers to files beside it with relative paths such as `../_site/nsls2.md`.

Contribute or update skills through the deployment's documented contribution
workflow; do not edit its deployed checkout or managed aliases directly.
Expand Down