This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Repository navigation
Conversation
Contributor
Author
|
Superseded by #63, which includes this change or replaces it. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #37.
The skill catalog in the system prompt tells the model to read each skill's
SKILL.mdwithread_fileand gives its absolute path. With Restrict to Workspace on, the default,read_filereads only the workspace, the media folder andtools.allow_read_paths. It answered "path escapes workspace" for a skill in$COMPA_HOME/skillsor in the built-in folder ($COMPA_BUILTIN_SKILLS, orskillsbeside the executable).buildAllowReadPatternsnow adds the global and built-in skill folders, as it adds the media folder. It uses the same^<folder>(?:<separator>|$)pattern, which the file tools also check against the link-resolved path. The context builder and the patterns get the global folder from one helper,globalSkillsDir, and the built-in one fromskills.BuiltinDir. So they name the folders the loader lists.Every tool that takes the read paths uses these patterns:
read_file,list_dir,exec,send_file,load_imageand the message tool's local media. So a skill's other files, and the scripts its instructions run, can be reached too. The writing tools usetools.allow_write_pathsand are unchanged. Embedders no longer needCOMPA_TOOLS_ALLOW_READ_PATHSfor their built-in skills.docs/use.mdnow names the skill folders among the paths file tools may read and commands may name. It also names the attachment folder for commands, which was already allowed. CHANGELOG line.Test:
TestNewAgentInstance_ReadsTheSkillsTheCatalogListsputs one skill in each folder and reads every skill the loader lists with the agent'sread_file. On main it fails with "path escapes workspace".