(fileName string)
| 850 | } |
| 851 | |
| 852 | func normalizeSandboxRuntimePath(fileName string) (string, error) { |
| 853 | normalized, err := normalizeSandboxRelativePath(fileName) |
| 854 | if err != nil { |
| 855 | return "", err |
| 856 | } |
| 857 | if normalized == "" || normalized == "." { |
| 858 | return "", fmt.Errorf("missing path argument") |
| 859 | } |
| 860 | if strings.HasPrefix(normalized, "output/") || strings.HasPrefix(normalized, "outputs/") { |
| 861 | return normalized, nil |
| 862 | } |
| 863 | if strings.HasPrefix(normalized, "inputs/") || strings.HasPrefix(normalized, "tmp/") || strings.HasPrefix(normalized, "skills/") { |
| 864 | return normalized, nil |
| 865 | } |
| 866 | if shouldNormalizeSandboxDeliverablePath(normalized) { |
| 867 | return "output/" + filepath.Base(normalized), nil |
| 868 | } |
| 869 | return filepath.ToSlash(filepath.Join("inputs", normalized)), nil |
| 870 | } |
| 871 | |
| 872 | func executeRunShell(ctx context.Context, args map[string]interface{}) (*ToolResult, error) { |
| 873 | command, ok := args["command"].(string) |
no test coverage detected