@slock-ai/daemon 0.53.0 → 0.53.1-alpha.1

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.
@@ -2094,7 +2094,13 @@ import path3 from "path";
2094
2094
  function normalizeExecOutput(raw) {
2095
2095
  return Buffer.isBuffer(raw) ? raw.toString("utf8") : String(raw ?? "");
2096
2096
  }
2097
- function resolveCommandOnWindows(command, env, execFileSyncFn) {
2097
+ function preferWindowsCmdShim(resolved, existsSyncFn) {
2098
+ const parsed = path3.win32.parse(resolved);
2099
+ if (parsed.ext.toLowerCase() !== ".ps1") return resolved;
2100
+ const cmdShim = path3.win32.join(parsed.dir, `${parsed.name}.cmd`);
2101
+ return existsSyncFn(cmdShim) ? cmdShim : resolved;
2102
+ }
2103
+ function resolveCommandOnWindows(command, env, execFileSyncFn, existsSyncFn) {
2098
2104
  const script = "& {$cmd = Get-Command -Name $args[0] -ErrorAction Stop | Select-Object -First 1; if ($cmd.Path) { $cmd.Path } elseif ($cmd.Source) { $cmd.Source } elseif ($cmd.Definition) { $cmd.Definition } }";
2099
2105
  try {
2100
2106
  const output = normalizeExecOutput(execFileSyncFn("powershell.exe", [
@@ -2108,7 +2114,7 @@ function resolveCommandOnWindows(command, env, execFileSyncFn) {
2108
2114
  env
2109
2115
  }));
2110
2116
  const resolved = output.trim().split(/\r?\n/)[0];
2111
- return resolved || command;
2117
+ return resolved ? preferWindowsCmdShim(resolved, existsSyncFn) : command;
2112
2118
  } catch {
2113
2119
  return null;
2114
2120
  }
@@ -2117,8 +2123,9 @@ function resolveCommandOnPath(command, deps = {}) {
2117
2123
  const platform = deps.platform ?? process.platform;
2118
2124
  const env = deps.env ?? process.env;
2119
2125
  const execFileSyncFn = deps.execFileSyncFn ?? execFileSync;
2126
+ const existsSyncFn = deps.existsSyncFn ?? existsSync2;
2120
2127
  if (platform === "win32") {
2121
- return resolveCommandOnWindows(command, env, execFileSyncFn);
2128
+ return resolveCommandOnWindows(command, env, execFileSyncFn, existsSyncFn);
2122
2129
  }
2123
2130
  const locator = "which";
2124
2131
  try {
@@ -3451,6 +3458,9 @@ function buildGeminiSpawnEnv(ctx, platform = process.platform) {
3451
3458
  if (!Object.prototype.hasOwnProperty.call(ctx.config.envVars ?? {}, "GEMINI_CLI_TRUST_WORKSPACE")) {
3452
3459
  spawnEnv.GEMINI_CLI_TRUST_WORKSPACE = "true";
3453
3460
  }
3461
+ if (platform === "win32" && !Object.prototype.hasOwnProperty.call(ctx.config.envVars ?? {}, "GEMINI_PTY_INFO")) {
3462
+ spawnEnv.GEMINI_PTY_INFO = "child_process";
3463
+ }
3454
3464
  return spawnEnv;
3455
3465
  }
3456
3466
  function normalizeExecOutput2(raw) {
package/dist/core.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  resolveSlockCliPath,
10
10
  resolveWorkspaceDirectoryPath,
11
11
  scanWorkspaceDirectories
12
- } from "./chunk-LPRTPDGH.js";
12
+ } from "./chunk-LKHS6SRG.js";
13
13
  import {
14
14
  subscribeDaemonLogs
15
15
  } from "./chunk-KNMCE6WB.js";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  DAEMON_CLI_USAGE,
4
4
  DaemonCore,
5
5
  parseDaemonCliArgs
6
- } from "./chunk-LPRTPDGH.js";
6
+ } from "./chunk-LKHS6SRG.js";
7
7
  import "./chunk-KNMCE6WB.js";
8
8
 
9
9
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slock-ai/daemon",
3
- "version": "0.53.0",
3
+ "version": "0.53.1-alpha.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "slock-daemon": "dist/index.js"