MCPcopy Create free account
hub / github.com/53AI/53AIHub / normalizeSandboxInputPath

Function normalizeSandboxInputPath

api/service/tools/executor.go:810–822  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

808}
809
810func normalizeSandboxInputPath(fileName string) (string, error) {
811 normalized, err := normalizeSandboxWorkspacePath(fileName)
812 if err != nil {
813 return "", err
814 }
815 if strings.HasPrefix(normalized, "output/") || strings.HasPrefix(normalized, "outputs/") {
816 return normalized, nil
817 }
818 if strings.HasPrefix(normalized, "inputs/") || strings.HasPrefix(normalized, "tmp/") || strings.HasPrefix(normalized, "skills/") {
819 return normalized, nil
820 }
821 return filepath.ToSlash(filepath.Join("inputs", normalized)), nil
822}
823
824func shouldNormalizeSandboxDeliverablePath(fileName string) bool {
825 switch strings.ToLower(filepath.Ext(strings.TrimSpace(fileName))) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected