drift-ml 0.2.9 → 0.2.11

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.
Files changed (2) hide show
  1. package/bin/drift.js +21 -1
  2. package/package.json +1 -1
package/bin/drift.js CHANGED
@@ -13,7 +13,7 @@ const http = require("http");
13
13
  const isWindows = process.platform === "win32";
14
14
  const ENGINE_PORT = process.env.DRIFT_ENGINE_PORT || "8000";
15
15
  const GITHUB_REPO = "lakshitsachdeva/intent2model"; // Engine binaries (same repo)
16
- const ENGINE_TAG = "v0.2.9"; // Pinned — direct URL, no API, no rate limits
16
+ const ENGINE_TAG = "v0.2.11"; // Pinned — direct URL, no API, no rate limits
17
17
  const ENGINE_BASE_URL = `https://github.com/${GITHUB_REPO}/releases/download/${ENGINE_TAG}`;
18
18
  const HEALTH_URL = `http://127.0.0.1:${ENGINE_PORT}/health`;
19
19
  const HEALTH_TIMEOUT_MS = 2000;
@@ -178,6 +178,26 @@ async function ensureEngine() {
178
178
  const absPath = path.resolve(binPath);
179
179
  const env = { ...process.env, DRIFT_ENGINE_PORT: ENGINE_PORT };
180
180
 
181
+ // Windows + npm/pipx: Engine inherits limited PATH. Prepend npm/pipx bins so Gemini CLI is found.
182
+ if (isWindows) {
183
+ const home = process.env.USERPROFILE || process.env.HOME || "";
184
+ const appdata = process.env.APPDATA || "";
185
+ const localappdata = process.env.LOCALAPPDATA || "";
186
+ const pf = process.env.ProgramFiles || "";
187
+ const pf86 = process.env["ProgramFiles(x86)"] || "";
188
+ const extraPaths = [
189
+ path.join(localappdata, "npm"),
190
+ path.join(appdata, "npm"),
191
+ path.join(pf, "nodejs"),
192
+ path.join(pf86, "nodejs"),
193
+ path.join(home, ".local", "bin"),
194
+ ].filter((p) => p && fs.existsSync(p));
195
+ if (extraPaths.length) {
196
+ const sep = path.delimiter;
197
+ env.PATH = extraPaths.join(sep) + sep + (env.PATH || "");
198
+ }
199
+ }
200
+
181
201
  // macOS: spawn a wrapper script instead of the binary directly (avoids -88)
182
202
  // Windows: use batch file so engine starts reliably (inherits PATH for gemini etc.)
183
203
  const binName = path.basename(binPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drift-ml",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "drift — terminal-first, chat-based AutoML. Open source. No tokens. No auth.",
5
5
  "bin": {
6
6
  "drift": "bin/drift.js"