dify/api/core/sandbox/bash
Harry 76c02db094 fix: namespace sandbox temp paths by sandbox ID to prevent cross-session collisions
DifyCli and AppAssets used hardcoded absolute paths under /tmp/.dify/,
causing concurrent sandbox sessions on the same host (e.g. SSH provider)
to overwrite each other's config files and CLI binaries.

- Add Sandbox.id property (uuid4 hex) as a stable, path-safe identifier
  independent of provider-specific environment IDs
- Convert DifyCli/AppAssets from static constants to per-sandbox instances
  namespaced under /tmp/.dify/{sandbox.id}/
- Replace all vm.metadata.id references with sandbox.id
- Replace upload_file with heredoc-based pipeline step in session.py to
  reduce round-trips
2026-03-11 19:19:17 +08:00
..
__init__.py refactor(sandbox): redesign sandbox_layer & reorganize import paths 2026-01-15 13:22:49 +08:00
bash_tool.py fix: increase COMMAND_TIMEOUT_SECONDS to 2 hours for better command execution handling 2026-02-14 10:55:29 +08:00
dify_cli.py fix: update files_url to use FILES_API_URL in DifyCliConfig 2026-02-15 17:19:08 +08:00
session.py fix: namespace sandbox temp paths by sandbox ID to prevent cross-session collisions 2026-03-11 19:19:17 +08:00