@nuucognition/flint-cli 0.5.6-dev.0 → 0.5.6-dev.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.
Files changed (2) hide show
  1. package/dist/index.js +32 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5854,6 +5854,7 @@ function sendNotification(title, message) {
5854
5854
  const child = spawn('claude', claudeArgs, {
5855
5855
  cwd: flintPath,
5856
5856
  stdio: ['ignore', 'ignore', 'pipe'],
5857
+ shell: process.platform === 'win32',
5857
5858
  });
5858
5859
 
5859
5860
  let stderr = '';
@@ -8306,16 +8307,14 @@ import { readdirSync as readdirSync2, readFileSync as readFileSync4 } from "fs";
8306
8307
  import { existsSync as existsSync6 } from "fs";
8307
8308
  import { join as join32 } from "path";
8308
8309
  import { homedir as homedir22 } from "os";
8309
- import { spawnSync as spawnSync22 } from "child_process";
8310
8310
  import { existsSync as existsSync7, readdirSync as readdirSync3, readFileSync as readFileSync5, statSync as statSync2 } from "fs";
8311
- import { spawnSync as spawnSync32 } from "child_process";
8312
8311
  import { basename as basename4, join as join42 } from "path";
8313
8312
  import { homedir as homedir32 } from "os";
8314
8313
  import { existsSync as existsSync8, readdirSync as readdirSync4, readFileSync as readFileSync6, statSync as statSync3 } from "fs";
8315
- import { spawnSync as spawnSync4 } from "child_process";
8314
+ import { spawnSync as spawnSync22 } from "child_process";
8316
8315
  import { homedir as homedir42 } from "os";
8317
8316
  import { basename as basename22, join as join52 } from "path";
8318
- import { spawn as spawn4, spawnSync as spawnSync5 } from "child_process";
8317
+ import { spawn as spawn4, spawnSync as spawnSync32 } from "child_process";
8319
8318
  import { existsSync as existsSync9, readdirSync as readdirSync5, readFileSync as readFileSync7 } from "fs";
8320
8319
  import { join as join62 } from "path";
8321
8320
  import { homedir as homedir52 } from "os";
@@ -10214,6 +10213,11 @@ var JsonSessionWatcher = class {
10214
10213
  function createJsonSessionWatcher(transcriptPath, mapper, options) {
10215
10214
  return new JsonSessionWatcher(transcriptPath, mapper, options);
10216
10215
  }
10216
+ function isCommandOnPath(name) {
10217
+ const cmd = process.platform === "win32" ? "where" : "which";
10218
+ return spawnSync3(cmd, [name], { stdio: "ignore" }).status === 0;
10219
+ }
10220
+ var SPAWN_SHELL = process.platform === "win32";
10217
10221
  function buildTranscriptPath(cwd, nativeSessionId) {
10218
10222
  const sanitized = cwd.replace(/[^a-zA-Z0-9\-_]/g, "-");
10219
10223
  return join22(homedir5(), ".claude", "projects", sanitized, `${nativeSessionId}.jsonl`);
@@ -10279,7 +10283,7 @@ function createClaudeHarness() {
10279
10283
  return parseClaudeTranscript(content);
10280
10284
  },
10281
10285
  async isAvailable() {
10282
- return spawnSync3("which", ["claude"], { stdio: "ignore" }).status === 0;
10286
+ return isCommandOnPath("claude");
10283
10287
  }
10284
10288
  };
10285
10289
  }
@@ -10388,7 +10392,7 @@ function createCodexHarness() {
10388
10392
  return parseCodexTranscript(content);
10389
10393
  },
10390
10394
  async isAvailable() {
10391
- return spawnSync22("which", ["codex"], { stdio: "ignore" }).status === 0;
10395
+ return isCommandOnPath("codex");
10392
10396
  }
10393
10397
  };
10394
10398
  }
@@ -10551,7 +10555,7 @@ function createDroidHarness() {
10551
10555
  return parseDroidTranscript(content, { transcriptPath: options?.transcriptPath });
10552
10556
  },
10553
10557
  async isAvailable() {
10554
- return spawnSync32("which", ["droid"], { stdio: "ignore" }).status === 0;
10558
+ return isCommandOnPath("droid");
10555
10559
  }
10556
10560
  };
10557
10561
  }
@@ -10625,7 +10629,7 @@ function resolveGeminiResumeTarget(nativeSessionId, cwd) {
10625
10629
  if (nativeSessionId === "latest" || /^\d+$/.test(nativeSessionId)) {
10626
10630
  return nativeSessionId;
10627
10631
  }
10628
- const result = spawnSync4("gemini", ["--list-sessions"], {
10632
+ const result = spawnSync22("gemini", ["--list-sessions"], {
10629
10633
  cwd,
10630
10634
  encoding: "utf-8",
10631
10635
  stdio: ["ignore", "pipe", "pipe"]
@@ -10738,7 +10742,7 @@ function createGeminiHarness() {
10738
10742
  return parseGeminiTranscript(content);
10739
10743
  },
10740
10744
  async isAvailable() {
10741
- return spawnSync4("which", ["gemini"], { stdio: "ignore" }).status === 0;
10745
+ return isCommandOnPath("gemini");
10742
10746
  }
10743
10747
  };
10744
10748
  }
@@ -10798,9 +10802,9 @@ function sendNotification2(session, exitCode) {
10798
10802
  const body = `${session.runtime}:${session.id}`;
10799
10803
  try {
10800
10804
  if (process.platform === "darwin") {
10801
- spawnSync5("osascript", ["-e", `display notification "${body}" with title "${title}"`], { stdio: "ignore" });
10805
+ spawnSync32("osascript", ["-e", `display notification "${body}" with title "${title}"`], { stdio: "ignore" });
10802
10806
  } else if (process.platform === "linux") {
10803
- spawnSync5("notify-send", [title, body], { stdio: "ignore" });
10807
+ spawnSync32("notify-send", [title, body], { stdio: "ignore" });
10804
10808
  }
10805
10809
  } catch {
10806
10810
  }
@@ -10898,7 +10902,8 @@ async function spawnHarnessProcess(options) {
10898
10902
  cwd: options.cwd,
10899
10903
  detached: true,
10900
10904
  stdio: ["ignore", "ignore", "pipe"],
10901
- env: buildHarnessSpawnEnv(options.cwd, options.sessionId)
10905
+ env: buildHarnessSpawnEnv(options.cwd, options.sessionId),
10906
+ shell: process.platform === "win32"
10902
10907
  });
10903
10908
  let stderr = "";
10904
10909
  child.stderr?.on("data", (chunk) => {
@@ -14083,7 +14088,8 @@ function registerOrbhRoutes(app, ctx, options) {
14083
14088
  cwd: ctx.flintPath,
14084
14089
  detached: true,
14085
14090
  stdio: ["ignore", "ignore", "pipe"],
14086
- env: buildHarnessSpawnEnv(ctx.flintPath, session.id)
14091
+ env: buildHarnessSpawnEnv(ctx.flintPath, session.id),
14092
+ shell: process.platform === "win32"
14087
14093
  });
14088
14094
  let stderr = "";
14089
14095
  child.stderr?.on("data", (chunk) => {
@@ -16280,7 +16286,8 @@ async function bootstrapCodexSession(cwd, initPrompt) {
16280
16286
  return new Promise((resolve12, reject) => {
16281
16287
  const proc = spawn7("codex", ["app-server"], {
16282
16288
  stdio: ["pipe", "pipe", "pipe"],
16283
- cwd
16289
+ cwd,
16290
+ shell: process.platform === "win32"
16284
16291
  });
16285
16292
  const rl = createInterface5({ input: proc.stdout });
16286
16293
  const send = (msg) => proc.stdin.write(`${JSON.stringify(msg)}
@@ -16365,7 +16372,8 @@ codeCommand.command("claude").description("Open Claude Code TUI").option("-p, --
16365
16372
  }
16366
16373
  const child = spawn7("claude", args, {
16367
16374
  cwd: flintPath,
16368
- stdio: "inherit"
16375
+ stdio: "inherit",
16376
+ shell: process.platform === "win32"
16369
16377
  });
16370
16378
  child.on("error", (err) => {
16371
16379
  if (err.code === "ENOENT") {
@@ -16439,7 +16447,8 @@ codeCommand.command("codex").description("Open Codex TUI with session tracking")
16439
16447
  resumePrompt
16440
16448
  ], {
16441
16449
  cwd: flintPath,
16442
- stdio: "inherit"
16450
+ stdio: "inherit",
16451
+ shell: process.platform === "win32"
16443
16452
  });
16444
16453
  child.on("error", (err) => {
16445
16454
  console.error(pc29.red(`Error: ${err.message}`));
@@ -16533,7 +16542,8 @@ codeCommand.command("gemini").description("Open Gemini CLI with Orbh session tra
16533
16542
  const child = spawn7("gemini", args, {
16534
16543
  cwd: flintPath,
16535
16544
  stdio: "inherit",
16536
- env: { ...process.env, ORBH_SESSION_ID: session.id }
16545
+ env: { ...process.env, ORBH_SESSION_ID: session.id },
16546
+ shell: process.platform === "win32"
16537
16547
  });
16538
16548
  if (child.pid) {
16539
16549
  updateCurrentRun2(session, { pid: child.pid });
@@ -17792,7 +17802,7 @@ var tinderboxCommand = new Command35("tinderbox").description("Orchestrate opera
17792
17802
  // src/commands/orb.ts
17793
17803
  import { Command as Command36 } from "commander";
17794
17804
  import pc41 from "picocolors";
17795
- import { spawn as spawn8, spawnSync as spawnSync6, execSync as execSync5 } from "child_process";
17805
+ import { spawn as spawn8, spawnSync as spawnSync4, execSync as execSync5 } from "child_process";
17796
17806
  import { existsSync as existsSync14, mkdirSync as mkdirSync4, readFileSync as readFileSync10, readdirSync as readdirSync7, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
17797
17807
  import { join as join18 } from "path";
17798
17808
  import { homedir as homedir10 } from "os";
@@ -17906,7 +17916,7 @@ function notify(title, message) {
17906
17916
  } catch {}
17907
17917
  }
17908
17918
 
17909
- const child = spawn(command, args, { cwd, stdio: ['ignore', 'ignore', 'pipe'] });
17919
+ const child = spawn(command, args, { cwd, stdio: ['ignore', 'ignore', 'pipe'], shell: process.platform === 'win32' });
17910
17920
 
17911
17921
  let stderr = '';
17912
17922
  child.stderr?.on('data', (chunk) => { stderr += chunk.toString(); });
@@ -19322,7 +19332,7 @@ orbCommand.command("ask").description("Ask a blocking question and wait for a re
19322
19332
  session.status = "blocked";
19323
19333
  writeSession(sessionsDir, session);
19324
19334
  try {
19325
- spawnSync6("osascript", ["-e", `display notification "${question.slice(0, 100)}" with title "Orbh Agent Needs Input"`], { stdio: "ignore" });
19335
+ spawnSync4("osascript", ["-e", `display notification "${question.slice(0, 100)}" with title "Orbh Agent Needs Input"`], { stdio: "ignore" });
19326
19336
  } catch {
19327
19337
  }
19328
19338
  const startTime = Date.now();
@@ -19356,7 +19366,7 @@ orbCommand.command("request").description("Post a deferred question and exit imm
19356
19366
  session.status = "deferred";
19357
19367
  writeSession(sessionsDir, session);
19358
19368
  try {
19359
- spawnSync6("osascript", ["-e", `display notification "${question.slice(0, 100)}" with title "Orbh Agent Needs Input"`], { stdio: "ignore" });
19369
+ spawnSync4("osascript", ["-e", `display notification "${question.slice(0, 100)}" with title "Orbh Agent Needs Input"`], { stdio: "ignore" });
19360
19370
  } catch {
19361
19371
  }
19362
19372
  console.log(`Question posted. Session ${shortId2(session.id)} is now deferred.`);
@@ -19392,7 +19402,7 @@ orbCommand.command("respond").description("Answer a pending question on a sessio
19392
19402
  console.log(`Response sent to session ${shortId2(session.id)}`);
19393
19403
  console.log(pc41.dim("Deferred question answered \u2014 auto-resuming session..."));
19394
19404
  const resumePrompt = `Your deferred question has been answered. Run \`flint orb requests ${session.id}\` to see the response, then continue working.`;
19395
- spawnSync6("flint", ["orb", "resume", session.id, resumePrompt], {
19405
+ spawnSync4("flint", ["orb", "resume", session.id, resumePrompt], {
19396
19406
  cwd: process.cwd(),
19397
19407
  stdio: "inherit"
19398
19408
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuucognition/flint-cli",
3
- "version": "0.5.6-dev.0",
3
+ "version": "0.5.6-dev.1",
4
4
  "type": "module",
5
5
  "description": "Flint cognitive workspace CLI",
6
6
  "license": "PROPRIETARY",