fix(cli): confine agent runtime paths

This commit is contained in:
ZacharyZhang-NY committed 2026-07-19 16:26:00 -04:00
1 parent c9d1075585
commit 7bf84a35e0
10 files changed
+399 -51

No files matched your search

+5 -4
View File
@@ -119,14 +119,15 @@ func (p *QwenPlugin) Status() (PluginStatus, error) {
}
func qwenAgentDirectory(agentID string) (string, string, error) {
if agentID == "" || agentID == "." || agentID == ".." || filepath.IsAbs(agentID) || filepath.Base(agentID) != agentID {
return "", "", fmt.Errorf("agent_id must be a single non-empty path segment")
}
runtimeRoot, err := qwenRuntimeRoot()
if err != nil {
return "", "", err
}
return runtimeRoot, filepath.Join(runtimeRoot, agentID), nil
agentDirectory, err := ResolveAgentRuntimeDirectory(agentID)
if err != nil {
return "", "", err
}
return runtimeRoot, agentDirectory, nil
}
func prepareQwenInstallationChanges(