drift-ml 0.2.1__tar.gz → 0.2.6__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.2.1/drift_ml.egg-info → drift_ml-0.2.6}/PKG-INFO +1 -1
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/__main__.py +4 -1
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/engine_launcher.py +58 -15
- {drift_ml-0.2.1 → drift_ml-0.2.6/drift_ml.egg-info}/PKG-INFO +1 -1
- {drift_ml-0.2.1 → drift_ml-0.2.6}/pyproject.toml +1 -1
- {drift_ml-0.2.1 → drift_ml-0.2.6}/LICENSE +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/README.md +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/__init__.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/cli/__init__.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/cli/client.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/cli/repl.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/cli/session.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/llm_adapters/__init__.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/llm_adapters/base.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/llm_adapters/gemini_cli.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift/llm_adapters/local_llm.py +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift_ml.egg-info/SOURCES.txt +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift_ml.egg-info/dependency_links.txt +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift_ml.egg-info/entry_points.txt +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift_ml.egg-info/requires.txt +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/drift_ml.egg-info/top_level.txt +0 -0
- {drift_ml-0.2.1 → drift_ml-0.2.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drift-ml
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: drift — terminal-first, chat-based AutoML. Open source. No tokens. No auth.
|
|
5
5
|
Project-URL: Homepage, https://github.com/lakshitsachdeva/intent2model
|
|
6
6
|
Project-URL: Repository, https://github.com/lakshitsachdeva/intent2model
|
|
@@ -19,7 +19,10 @@ def main() -> None:
|
|
|
19
19
|
from drift.engine_launcher import ensure_engine
|
|
20
20
|
|
|
21
21
|
if not ensure_engine():
|
|
22
|
-
print("drift: Failed to start engine.
|
|
22
|
+
print("drift: Failed to start engine.", file=sys.stderr)
|
|
23
|
+
print("drift: Check ~/.drift/bin/.engine-stderr.log", file=sys.stderr)
|
|
24
|
+
print("drift: On macOS: System Settings → Privacy & Security → allow drift-engine", file=sys.stderr)
|
|
25
|
+
print("drift: Or set DRIFT_BACKEND_URL to a running engine", file=sys.stderr)
|
|
23
26
|
sys.exit(1)
|
|
24
27
|
base_url = f"http://127.0.0.1:{os.environ.get('DRIFT_ENGINE_PORT', '8000')}"
|
|
25
28
|
run_repl(base_url=base_url)
|
|
@@ -15,8 +15,8 @@ try:
|
|
|
15
15
|
except ImportError:
|
|
16
16
|
requests = None
|
|
17
17
|
|
|
18
|
-
GITHUB_REPO = "lakshitsachdeva/
|
|
19
|
-
ENGINE_TAG = "v0.2.
|
|
18
|
+
GITHUB_REPO = "lakshitsachdeva/intent2model" # Engine binaries (same repo)
|
|
19
|
+
ENGINE_TAG = "v0.2.6" # Pinned — direct URL, no API, no rate limits
|
|
20
20
|
ENGINE_PORT = os.environ.get("DRIFT_ENGINE_PORT", "8000")
|
|
21
21
|
HEALTH_URL = f"http://127.0.0.1:{ENGINE_PORT}/health"
|
|
22
22
|
|
|
@@ -143,24 +143,67 @@ def ensure_engine() -> bool:
|
|
|
143
143
|
try:
|
|
144
144
|
bin_path.chmod(0o755)
|
|
145
145
|
subprocess.run(["xattr", "-dr", "com.apple.quarantine", str(bin_path)], check=False, capture_output=True)
|
|
146
|
+
# Ad-hoc sign so macOS Gatekeeper doesn't kill the binary (requires non-UPX build)
|
|
147
|
+
subprocess.run(["codesign", "-s", "-", "--force", str(bin_path)], check=False, capture_output=True)
|
|
146
148
|
except Exception:
|
|
147
149
|
pass
|
|
148
150
|
|
|
151
|
+
# macOS: use wrapper script via bash to avoid spawn -88
|
|
152
|
+
# Windows: use batch file so engine starts reliably (inherits PATH for gemini etc.)
|
|
153
|
+
if platform.system() == "Darwin":
|
|
154
|
+
wrapper = bin_dir / "run-engine.sh"
|
|
155
|
+
port = ENGINE_PORT
|
|
156
|
+
bin_name = bin_path.name
|
|
157
|
+
script = f'#!/bin/bash\ncd "$(dirname "$0")"\nexport DRIFT_ENGINE_PORT="{port}"\nexec ./{bin_name}\n'
|
|
158
|
+
if not wrapper.exists() or wrapper.read_text() != script:
|
|
159
|
+
wrapper.write_text(script)
|
|
160
|
+
wrapper.chmod(0o755)
|
|
161
|
+
launch_cmd = ["/bin/bash", str(wrapper)]
|
|
162
|
+
elif platform.system() == "Windows":
|
|
163
|
+
bat = bin_dir / "run-engine.bat"
|
|
164
|
+
port = ENGINE_PORT
|
|
165
|
+
bin_name = bin_path.name
|
|
166
|
+
script = f'@echo off\ncd /d "%~dp0"\nset DRIFT_ENGINE_PORT={port}\nstart /b "" {bin_name}\n'
|
|
167
|
+
if not bat.exists() or bat.read_text() != script:
|
|
168
|
+
bat.write_text(script)
|
|
169
|
+
launch_cmd = ["cmd", "/c", str(bat)]
|
|
170
|
+
else:
|
|
171
|
+
launch_cmd = [str(bin_path)]
|
|
172
|
+
|
|
149
173
|
env = {**os.environ, "DRIFT_ENGINE_PORT": ENGINE_PORT}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
174
|
+
stderr_file = bin_dir / ".engine-stderr.log"
|
|
175
|
+
proc = None
|
|
176
|
+
try:
|
|
177
|
+
with open(stderr_file, "w") as errf:
|
|
178
|
+
proc = subprocess.Popen(
|
|
179
|
+
launch_cmd,
|
|
180
|
+
cwd=str(bin_dir),
|
|
181
|
+
env=env,
|
|
182
|
+
stdout=subprocess.DEVNULL,
|
|
183
|
+
stderr=errf,
|
|
184
|
+
start_new_session=True,
|
|
185
|
+
)
|
|
186
|
+
try:
|
|
187
|
+
proc.wait(timeout=3)
|
|
188
|
+
if proc.returncode and proc.returncode != 0:
|
|
189
|
+
err = stderr_file.read_text().strip() if stderr_file.exists() else ""
|
|
190
|
+
print(f"drift: Engine exited with code {proc.returncode}", file=sys.stderr)
|
|
191
|
+
if err:
|
|
192
|
+
print(f"drift: {err[-400:]}", file=sys.stderr)
|
|
193
|
+
return False
|
|
194
|
+
except subprocess.TimeoutExpired:
|
|
195
|
+
pass # Engine still running
|
|
196
|
+
except Exception as e:
|
|
197
|
+
print(f"drift: Engine spawn failed: {e}", file=sys.stderr)
|
|
198
|
+
return False
|
|
199
|
+
|
|
200
|
+
import time
|
|
201
|
+
print("drift: Starting engine (first run may take 30s)...", file=sys.stderr)
|
|
202
|
+
for i in range(120): # 60s — PyInstaller binary can take 30+ s to unpack
|
|
162
203
|
if _engine_running():
|
|
163
204
|
return True
|
|
164
|
-
import time
|
|
165
205
|
time.sleep(0.5)
|
|
206
|
+
err = stderr_file.read_text().strip() if stderr_file.exists() else ""
|
|
207
|
+
if err:
|
|
208
|
+
print(f"drift: Engine log: {err[-400:]}", file=sys.stderr)
|
|
166
209
|
return False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drift-ml
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: drift — terminal-first, chat-based AutoML. Open source. No tokens. No auth.
|
|
5
5
|
Project-URL: Homepage, https://github.com/lakshitsachdeva/intent2model
|
|
6
6
|
Project-URL: Repository, https://github.com/lakshitsachdeva/intent2model
|
|
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
|