INNER CODE UNIT · Python

_detect_target_type

AgentSkillOS/SkillAnything · scripts/analyze_target.py:39

def _detect_target_type(target: str, verbose: bool = False) -> str:
    """Return one of: api, cli, library, workflow, service, file, unknown."""
    if _is_url(target):
        if verbose:
            print(f"[detect] Target looks like a URL: {target}")
        return _classify_url(target, verbose)

    if shutil.which(target):
        if verbose:
            print(f"[detect] Found executable in PATH: {target}")
        return "cli"

    if os.path.exists(target):
        if verbose:
            print(f"[detect] Target is an existing file/dir: {target}")
        return _classify_path(target, verbose)

    if verbose:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…