@nuucognition/flint-cli 0.6.0-dev.3 → 0.6.0-dev.4
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/dist/index.js +16 -9
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -164158,10 +164158,17 @@ function isCommandOnPath(name) {
|
|
|
164158
164158
|
}
|
|
164159
164159
|
function resolveCommand2(name) {
|
|
164160
164160
|
if (process.platform !== "win32") return { cmd: name, prependArgs: [] };
|
|
164161
|
-
|
|
164162
|
-
|
|
164163
|
-
|
|
164164
|
-
|
|
164161
|
+
let resolved;
|
|
164162
|
+
if (name.includes("\\") || name.includes("/")) {
|
|
164163
|
+
if (!existsSync72(name)) return { cmd: name, prependArgs: [] };
|
|
164164
|
+
resolved = name;
|
|
164165
|
+
} else {
|
|
164166
|
+
const where = spawnSync2("where", [name], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], windowsHide: true });
|
|
164167
|
+
const lines = (where.stdout ?? "").trim().split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
164168
|
+
if (where.status !== 0 || lines.length === 0) return { cmd: name, prependArgs: [] };
|
|
164169
|
+
const preferred = lines.find((line) => /\.(exe|cmd|bat|com)$/i.test(line));
|
|
164170
|
+
resolved = preferred ?? lines[0];
|
|
164171
|
+
}
|
|
164165
164172
|
if (!resolved.toLowerCase().endsWith(".cmd")) return { cmd: resolved, prependArgs: [] };
|
|
164166
164173
|
try {
|
|
164167
164174
|
const content = readFileSync6(resolved, "utf-8");
|
|
@@ -164552,7 +164559,7 @@ async function bootstrapCodexSession(cwd, initPrompt, options3 = {}) {
|
|
|
164552
164559
|
return new Promise((resolve19, reject) => {
|
|
164553
164560
|
const start = async () => {
|
|
164554
164561
|
const executable = await getExecutable("codex");
|
|
164555
|
-
const spawnCmd = executable.
|
|
164562
|
+
const spawnCmd = executable.resolvedCommand.cmd;
|
|
164556
164563
|
const proc = spawn6(spawnCmd, [...executable.resolvedCommand.prependArgs, ...buildCodexAppServerArgs(options3)], {
|
|
164557
164564
|
stdio: ["pipe", "pipe", "pipe"],
|
|
164558
164565
|
cwd,
|
|
@@ -167050,7 +167057,7 @@ async function spawnHarnessProcess(options3) {
|
|
|
167050
167057
|
writeSession(options3.sessionsDir, session, { emitter: options3.emitter });
|
|
167051
167058
|
return null;
|
|
167052
167059
|
}
|
|
167053
|
-
const spawnCmd = executable.
|
|
167060
|
+
const spawnCmd = executable.resolvedCommand.cmd;
|
|
167054
167061
|
const opencodeStreamCapturePath = harness.name === "opencode" ? (() => {
|
|
167055
167062
|
ensureOpencodeStreamCaptureDir();
|
|
167056
167063
|
return buildPendingOpencodeStreamCapturePath(options3.sessionId);
|
|
@@ -167613,7 +167620,7 @@ async function spawnDetachedResume(session, harness, options3) {
|
|
|
167613
167620
|
writeSession(options3.sessionsDir, session);
|
|
167614
167621
|
throw new Error(`Orbh runtime '${harness.name}' is not installed or not available.`);
|
|
167615
167622
|
}
|
|
167616
|
-
const spawnCmd = executable.
|
|
167623
|
+
const spawnCmd = executable.resolvedCommand.cmd;
|
|
167617
167624
|
const child = spawn32(spawnCmd, [...executable.resolvedCommand.prependArgs, ...args], {
|
|
167618
167625
|
cwd: options3.cwd,
|
|
167619
167626
|
detached: process.platform !== "win32",
|
|
@@ -167815,7 +167822,7 @@ async function launchInteractive(options3) {
|
|
|
167815
167822
|
session2.status = "in-progress";
|
|
167816
167823
|
writeSession(options3.sessionsDir, session2);
|
|
167817
167824
|
const executable2 = await getExecutable(harness2.name);
|
|
167818
|
-
const spawnCmd2 = executable2.
|
|
167825
|
+
const spawnCmd2 = executable2.resolvedCommand.cmd;
|
|
167819
167826
|
const child2 = spawn32(spawnCmd2, [...executable2.resolvedCommand.prependArgs, ...args2], {
|
|
167820
167827
|
cwd: options3.cwd,
|
|
167821
167828
|
stdio: "inherit",
|
|
@@ -167913,7 +167920,7 @@ async function launchInteractive(options3) {
|
|
|
167913
167920
|
session.status = "in-progress";
|
|
167914
167921
|
writeSession(options3.sessionsDir, session);
|
|
167915
167922
|
const executable = await getExecutable(harness.name);
|
|
167916
|
-
const spawnCmd = executable.
|
|
167923
|
+
const spawnCmd = executable.resolvedCommand.cmd;
|
|
167917
167924
|
const child = spawn32(spawnCmd, [...executable.resolvedCommand.prependArgs, ...args], {
|
|
167918
167925
|
cwd: options3.cwd,
|
|
167919
167926
|
stdio: "inherit",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuucognition/flint-cli",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Flint cognitive workspace CLI",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"tsx": "^4.19.2",
|
|
35
35
|
"typescript": "^5.9.2",
|
|
36
36
|
"@nuucognition/flint-server": "0.0.1",
|
|
37
|
+
"@nuucognition/flint-sdk": "0.0.1",
|
|
37
38
|
"@nuucognition/eslint-config": "0.0.0",
|
|
39
|
+
"@nuucognition/flint": "0.1.0",
|
|
38
40
|
"@nuucognition/flint-migrations": "0.1.0",
|
|
39
41
|
"@nuucognition/orbh": "0.0.1-dev.0",
|
|
40
|
-
"@nuucognition/flint": "0.1.0",
|
|
41
42
|
"@nuucognition/orbh-cli": "0.1.0-dev.1",
|
|
42
|
-
"@nuucognition/typescript-config": "0.0.0"
|
|
43
|
-
"@nuucognition/flint-sdk": "0.0.1"
|
|
43
|
+
"@nuucognition/typescript-config": "0.0.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"predev": "turbo build --filter=@nuucognition/flint-cli^...",
|