diff --git a/ai-hub/app/api/routes/nodes.py b/ai-hub/app/api/routes/nodes.py index 8db2891..c6cb050 100644 --- a/ai-hub/app/api/routes/nodes.py +++ b/ai-hub/app/api/routes/nodes.py @@ -573,7 +573,7 @@ # Create ZIP in memory zip_buffer = io.BytesIO() with zipfile.ZipFile(zip_buffer, "a", zipfile.ZIP_DEFLATED, False) as zip_file: - # 1. Add Agent Node files (binary or supporting scripts) + # 1. Add Agent Node files (source, scripts, and future binary) # Try production mount first, then local fallback source_dirs = ["/app/agent-node-source", "/app/agent-node"] found_dir = None @@ -584,12 +584,12 @@ if found_dir: for root, dirs, files in os.walk(found_dir): - # Exclude source code folders and sensitive/build metadata - dirs[:] = [d for d in dirs if d not in ["agent_node", "shared_core", "protos", "__pycache__", ".git", ".venv"]] + # Exclude sensitive/build metadata + dirs[:] = [d for d in dirs if d not in ["__pycache__", ".git", ".venv"]] for file in files: - # Security/Cleanliness Exclusion: Never include raw source, requirements, or local envs - if file.endswith(".py") or file == "requirements.txt" or file == ".env" or file == "agent_config.yaml": + # Exclude only instance-specific or sensitive config + if file == ".env" or file == "agent_config.yaml": continue file_path = os.path.join(root, file)