fraim 2.0.332 → 2.0.335

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.
@@ -44,7 +44,7 @@ function probeVersion(commandPath) {
44
44
  const args = process.platform === 'win32'
45
45
  ? ['/d', '/s', '/c', `${escapeWindowsArg(commandPath)} --version`]
46
46
  : ['--version'];
47
- const result = (0, child_process_1.spawnSync)(executable, args, { encoding: 'utf8', timeout: 5000 });
47
+ const result = (0, child_process_1.spawnSync)(executable, args, { encoding: 'utf8', timeout: 5000, windowsHide: true });
48
48
  if (result.status !== 0 || result.error)
49
49
  return null;
50
50
  // Issue #1256 (AC-D1/D2): only stdout counts as a version — see versionFromProbeOutput.
@@ -112,6 +112,7 @@ function getNpmMajorVersion() {
112
112
  const args = process.platform === 'win32' ? ['/d', '/s', '/c', 'npm --version'] : ['--version'];
113
113
  const output = (0, child_process_1.execFileSync)(command, args, {
114
114
  encoding: 'utf8',
115
+ windowsHide: true,
115
116
  stdio: ['ignore', 'pipe', 'ignore']
116
117
  });
117
118
  const major = Number.parseInt(output.trim().split('.')[0], 10);
@@ -689,6 +690,7 @@ async function spawnAndHandshake(command, args, timeoutMs = STDIO_HANDSHAKE_TIME
689
690
  // spawnOptions is typed loosely so we can set windowsVerbatimArguments below.
690
691
  let spawnOptions = {
691
692
  stdio: ['pipe', 'pipe', 'pipe'],
693
+ windowsHide: true,
692
694
  env: process.env
693
695
  };
694
696
  if (process.platform === 'win32') {
@@ -233,7 +233,7 @@ function checkPythonAvailability() {
233
233
  }
234
234
  if (process.platform === 'win32') {
235
235
  // Primary probe: py launcher (not subject to App Execution Alias)
236
- const pyResult = (0, child_process_1.spawnSync)('py --version', { timeout: 1500, encoding: 'utf8', shell: true });
236
+ const pyResult = (0, child_process_1.spawnSync)('py --version', { timeout: 1500, encoding: 'utf8', shell: true, windowsHide: true });
237
237
  if (pyResult.status === 0) {
238
238
  const version = (pyResult.stdout || pyResult.stderr || '').trim();
239
239
  return {
@@ -242,7 +242,7 @@ function checkPythonAvailability() {
242
242
  };
243
243
  }
244
244
  // Fallback: check if python.exe resolves to a real install (not WindowsApps)
245
- const whereResult = (0, child_process_1.spawnSync)('where', ['python'], { timeout: 1500, encoding: 'utf8' });
245
+ const whereResult = (0, child_process_1.spawnSync)('where', ['python'], { timeout: 1500, encoding: 'utf8', windowsHide: true });
246
246
  const paths = (whereResult.stdout || '').split('\n').map(p => p.trim()).filter(Boolean);
247
247
  const realPython = paths.find(p => !p.toLowerCase().includes('windowsapps'));
248
248
  if (realPython) {
@@ -93,7 +93,7 @@ function runCommand(command, args, options) {
93
93
  return spawnSync(command, args, options);
94
94
  }
95
95
 
96
- return spawnSync(process.env.ComSpec || 'cmd.exe', ['/d', '/s', '/c', [command, ...args.map(quoteCmdArg)].join(' ')], options);
96
+ return spawnSync(process.env.ComSpec || 'cmd.exe', ['/d', '/s', '/c', [command, ...args.map(quoteCmdArg)].join(' ')], { ...options, windowsHide: true });
97
97
  }
98
98
 
99
99
  function ensureDir(dir) {
@@ -59,7 +59,7 @@ function persistShellPath() {
59
59
  // getUserFraimDirPath() in project-fraim-paths.ts) rather than a
60
60
  // dedicated flag for this call site.
61
61
  if (process.env.FRAIM_TEST_SANDBOX !== '1') {
62
- const result = (0, child_process_1.spawnSync)('powershell', ['-NoProfile', '-NonInteractive', '-Command', psCmd], { encoding: 'utf8', timeout: 10000 });
62
+ const result = (0, child_process_1.spawnSync)('powershell', ['-NoProfile', '-NonInteractive', '-Command', psCmd], { encoding: 'utf8', timeout: 10000, windowsHide: true });
63
63
  if (result.error || result.status !== 0) {
64
64
  throw new Error(`Could not register managed binaries on the User PATH: ${result.error?.message || result.stderr}`);
65
65
  }
@@ -19,6 +19,7 @@ function spawnViaCmdExe(command, args, options) {
19
19
  const cmdString = needsOuterQuote ? `"${innerCmd}"` : innerCmd;
20
20
  return (0, child_process_1.spawnSync)(comSpec, ['/d', '/s', '/c', cmdString], {
21
21
  ...options,
22
+ windowsHide: true,
22
23
  windowsVerbatimArguments: true,
23
24
  });
24
25
  }
@@ -38,6 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.FIRST_RUN_ROW_IDS = exports.FirstRunSessionService = void 0;
40
40
  exports.commandVersion = commandVersion;
41
+ exports.runProcess = runProcess;
41
42
  exports.buildFirstRunHubLaunchArgs = buildFirstRunHubLaunchArgs;
42
43
  const fs_1 = __importDefault(require("fs"));
43
44
  const os_1 = __importDefault(require("os"));
@@ -77,6 +78,7 @@ function commandVersion(command, extraBinDirs, basePath) {
77
78
  const recoveredPath = (0, managed_agent_paths_1.buildRecoveredAgentPath)(pathValue ?? process.env.PATH ?? process.env.Path);
78
79
  const env = { ...process.env, PATH: recoveredPath, Path: recoveredPath };
79
80
  const result = (0, child_process_1.spawnSync)(executable, args, {
81
+ windowsHide: true,
80
82
  encoding: 'utf8',
81
83
  timeout: 5000,
82
84
  env,
@@ -133,6 +135,7 @@ function runProcess(command, args, env) {
133
135
  }
134
136
  const child = (0, child_process_1.spawn)(realCmd, realArgs, {
135
137
  env: childEnv,
138
+ windowsHide: true,
136
139
  shell: false,
137
140
  });
138
141
  let stdout = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim",
3
- "version": "2.0.332",
3
+ "version": "2.0.335",
4
4
  "description": "FRAIM core CLI and MCP package.",
5
5
  "main": "index.js",
6
6
  "bin": {