@cccarv82/freya 3.8.1 → 3.8.3
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.
- package/cli/retroactive-ingest.js +16 -9
- package/cli/web.js +10 -11
- package/package.json +1 -1
|
@@ -34,14 +34,16 @@ function run(cmd, args, cwd, extraEnv) {
|
|
|
34
34
|
const env = extraEnv ? { ...process.env, ...extraEnv } : process.env;
|
|
35
35
|
try {
|
|
36
36
|
if (process.platform === 'win32') {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
// If we have a full path to the executable, use it directly with spawn
|
|
38
|
+
// (no shell needed — avoids PowerShell argument mangling).
|
|
39
|
+
// Only fall back to cmd.exe for bare command names.
|
|
40
|
+
if (path.isAbsolute(cmd) || cmd.includes('\\') || cmd.includes('/')) {
|
|
41
|
+
child = spawn(cmd, args, { cwd, env, windowsHide: true });
|
|
42
|
+
} else {
|
|
43
|
+
// Bare command name — use cmd.exe to resolve from PATH
|
|
44
|
+
const comspec = process.env.ComSpec || 'cmd.exe';
|
|
45
|
+
child = spawn(comspec, ['/d', '/s', '/c', cmd, ...args], { cwd, shell: false, env });
|
|
46
|
+
}
|
|
45
47
|
} else {
|
|
46
48
|
child = spawn(cmd, args, { cwd, shell: true, env });
|
|
47
49
|
}
|
|
@@ -302,7 +304,7 @@ IMPORTANTE: Extraia APENAS informações explícitas do log. NÃO invente dados.
|
|
|
302
304
|
r = await run(sc, sa, workspaceDir, agentEnv);
|
|
303
305
|
try { fs.unlinkSync(tmpFile); } catch { }
|
|
304
306
|
} else {
|
|
305
|
-
const { cmd: sc, args: sa } = copilotSpawnArgs(copilotResolved, [...copilotExtra, '-p', fullPrompt]);
|
|
307
|
+
const { cmd: sc, args: sa } = copilotSpawnArgs(copilotResolved, [...copilotExtra, '--allow-all-tools', '-p', fullPrompt]);
|
|
306
308
|
r = await run(sc, sa, workspaceDir, agentEnv);
|
|
307
309
|
}
|
|
308
310
|
|
|
@@ -328,6 +330,11 @@ IMPORTANTE: Extraia APENAS informações explícitas do log. NÃO invente dados.
|
|
|
328
330
|
} catch {
|
|
329
331
|
try { plan = JSON.parse(escapeJsonControlChars(jsonText)); } catch {
|
|
330
332
|
totalErrors++;
|
|
333
|
+
if (totalErrors <= 2) {
|
|
334
|
+
console.log(`\n ⚠ JSON parse diagnostic for ${date}:`);
|
|
335
|
+
console.log(` Raw output (first 500 chars): ${out.slice(0, 500)}`);
|
|
336
|
+
console.log(` Extracted JSON attempt: ${(jsonText || '').slice(0, 300)}`);
|
|
337
|
+
}
|
|
331
338
|
process.stdout.write(`\r [${i + 1}/${files.length}] ${date} — ❌ invalid JSON `);
|
|
332
339
|
continue;
|
|
333
340
|
}
|
package/cli/web.js
CHANGED
|
@@ -971,17 +971,16 @@ function run(cmd, args, cwd, extraEnv, stdinData) {
|
|
|
971
971
|
|
|
972
972
|
try {
|
|
973
973
|
if (process.platform === 'win32') {
|
|
974
|
-
//
|
|
975
|
-
//
|
|
976
|
-
//
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
], { cwd, env, windowsHide: true });
|
|
974
|
+
// getCopilotCmd() resolves the full path via PowerShell/where.
|
|
975
|
+
// Once we have the full path, spawn directly — no shell needed.
|
|
976
|
+
// This avoids PowerShell argument mangling issues.
|
|
977
|
+
if (path.isAbsolute(cmd) || cmd.includes('\\') || cmd.includes('/')) {
|
|
978
|
+
child = spawn(cmd, args, { cwd, env, windowsHide: true });
|
|
979
|
+
} else {
|
|
980
|
+
// Bare command name — use cmd.exe to resolve from PATH
|
|
981
|
+
const comspec = process.env.ComSpec || 'cmd.exe';
|
|
982
|
+
child = spawn(comspec, ['/d', '/s', '/c', cmd, ...args], { cwd, shell: false, env });
|
|
983
|
+
}
|
|
985
984
|
} else {
|
|
986
985
|
child = spawn(cmd, args, { cwd, shell: true, env });
|
|
987
986
|
}
|
package/package.json
CHANGED