drift-ml 0.1.8__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drift_ml-0.1.8 → drift_ml-0.1.9}/PKG-INFO +1 -1
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/engine_launcher.py +16 -10
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/PKG-INFO +1 -1
- {drift_ml-0.1.8 → drift_ml-0.1.9}/pyproject.toml +1 -1
- {drift_ml-0.1.8 → drift_ml-0.1.9}/README.md +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/__init__.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/__main__.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/cli/__init__.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/cli/client.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/cli/repl.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/cli/session.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/llm_adapters/__init__.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/llm_adapters/base.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/llm_adapters/gemini_cli.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift/llm_adapters/local_llm.py +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/SOURCES.txt +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/dependency_links.txt +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/entry_points.txt +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/requires.txt +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/drift_ml.egg-info/top_level.txt +0 -0
- {drift_ml-0.1.8 → drift_ml-0.1.9}/setup.cfg +0 -0
|
@@ -61,14 +61,12 @@ def _engine_running() -> bool:
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
def _get_asset_download_url(asset_name: str) -> str:
|
|
64
|
-
"""Resolve GitHub release asset to download URL."""
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# Fallback: API (needed for private repos or if direct fails)
|
|
64
|
+
"""Resolve GitHub release asset to download URL. Prefer direct URL (no API)."""
|
|
65
|
+
return f"https://github.com/{GITHUB_REPO}/releases/download/{ENGINE_TAG}/{asset_name}"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _get_asset_download_url_via_api(asset_name: str) -> str:
|
|
69
|
+
"""Fallback: get URL via GitHub API (for private repos)."""
|
|
72
70
|
token = os.environ.get("DRIFT_GITHUB_TOKEN") or os.environ.get("GITHUB_TOKEN")
|
|
73
71
|
headers = {
|
|
74
72
|
"User-Agent": "Drift-Engine-Launcher/1.0",
|
|
@@ -137,8 +135,16 @@ def ensure_engine() -> bool:
|
|
|
137
135
|
url = _get_asset_download_url(asset)
|
|
138
136
|
_download_file(url, bin_path)
|
|
139
137
|
except Exception as e:
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
if "404" in str(e) or "Not Found" in str(e):
|
|
139
|
+
try:
|
|
140
|
+
url = _get_asset_download_url_via_api(asset)
|
|
141
|
+
_download_file(url, bin_path)
|
|
142
|
+
except Exception as e2:
|
|
143
|
+
print(f"drift: Download failed: {e2}", file=sys.stderr)
|
|
144
|
+
return False
|
|
145
|
+
else:
|
|
146
|
+
print(f"drift: Download failed: {e}", file=sys.stderr)
|
|
147
|
+
return False
|
|
142
148
|
if platform.system() != "Windows":
|
|
143
149
|
bin_path.chmod(0o755)
|
|
144
150
|
if platform.system() == "Darwin":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|