@lifeaitools/clauth 2.15.4 → 2.15.5

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.
@@ -1212,8 +1212,16 @@ export function runSurfaceAction(id, action, actor = "localhost") {
1212
1212
  // a space (e.g. "C:\Program Files\nodejs\node.exe") breaks at the first
1213
1213
  // space unless quoted. Bare shim names (pm2, npm) never contain spaces,
1214
1214
  // so this only ever affects absolute-path values, and only on Windows.
1215
- const resolvedCmd = shellQuote(cmd, useShell);
1216
- const resolvedArgs = args.map((arg) => shellQuote(arg, useShell));
1215
+ // Expand $LIFEAI_ENV / $REGEN_ROOT tokens in the command AND its args, the same
1216
+ // way surface.cwd is expanded at normalize time. A surface start such as
1217
+ // `pwsh -File $LIFEAI_ENV/services/restart-dev-center.ps1` (dev-center) or
1218
+ // `pm2 start $REGEN_ROOT/apps/codeflow-explorer/... ` otherwise reached the shell
1219
+ // with the literal token and failed ("not recognized as the name of a script
1220
+ // file", exit 64) — a start/restart that fails while the service stays down.
1221
+ // expandPathToken is a no-op on token-free values (pm2, --name, --cwd), so it is
1222
+ // safe on every arg.
1223
+ const resolvedCmd = shellQuote(expandPathToken(cmd) || cmd, useShell);
1224
+ const resolvedArgs = args.map((arg) => shellQuote(expandPathToken(arg) || arg, useShell));
1217
1225
  return spawnSync(resolvedCmd, resolvedArgs, {
1218
1226
  cwd: surface.cwd || undefined,
1219
1227
  env: { ...process.env, CLAUTH_PM2_HOME: getClauthPm2Home(), PM2_HOME: getClauthPm2Home() },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "2.15.4",
3
+ "version": "2.15.5",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {