feat: optimize security and deployment of agent skills
This commit is contained in:
@@ -223,6 +223,8 @@ func formatSkillsMetadata(skillsMetadata []*skills.SkillMetadata) string {
|
||||
builder.WriteString("#### Tool Reference\n\n")
|
||||
builder.WriteString("- `read_skill(skill_name)`: Load full skill instructions (MUST call before using a skill)\n")
|
||||
builder.WriteString("- `execute_skill_script(skill_name, script_path, args, input)`: Run utility scripts bundled with a skill\n")
|
||||
builder.WriteString(" - `input`: Pass data directly via stdin (use this when you have data in memory, e.g. JSON string)\n")
|
||||
builder.WriteString(" - `args`: Command-line arguments (only use `--file` if you have an actual file path in the skill directory)\n")
|
||||
|
||||
return builder.String()
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ var executeSkillScriptTool = BaseTool{
|
||||
type ExecuteSkillScriptInput struct {
|
||||
SkillName string `json:"skill_name" jsonschema:"Name of the skill containing the script"`
|
||||
ScriptPath string `json:"script_path" jsonschema:"Relative path to the script within the skill directory (e.g. scripts/analyze.py)"`
|
||||
Args []string `json:"args,omitempty" jsonschema:"Optional command-line arguments to pass to the script"`
|
||||
Input string `json:"input,omitempty" jsonschema:"Optional input data to pass to the script via stdin"`
|
||||
Args []string `json:"args,omitempty" jsonschema:"Optional command-line arguments to pass to the script. Note: if using --file flag, you must provide an actual file path that exists in the skill directory. If you have data in memory (not a file), use the 'input' parameter instead."`
|
||||
Input string `json:"input,omitempty" jsonschema:"Optional input data to pass to the script via stdin. Use this when you have data in memory (e.g. JSON string) that the script should process. This is equivalent to piping data: echo 'data' | python script.py"`
|
||||
}
|
||||
|
||||
// ExecuteSkillScriptTool allows the agent to execute skill scripts in a sandbox
|
||||
|
||||
Reference in New Issue
Block a user