cliclaw 1.0.11 → 1.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cliclaw",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Telegram bot bridging AI CLIs (Claude Code, Codex) to Forum Topics",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -38,7 +38,12 @@ function spawnClaude(args: string[]): Promise<ClaudeResult> {
38
38
  return new Promise((resolve, reject) => {
39
39
  let stdout = ''
40
40
  let stderr = ''
41
- const proc = spawn('claude', args, { env: buildEnv() })
41
+ const isWin = process.platform === 'win32'
42
+ const proc = spawn('claude', args, {
43
+ env: buildEnv(),
44
+ shell: isWin,
45
+ windowsHide: true, // prevent CMD window from flashing on Windows
46
+ })
42
47
  proc.stdout.on('data', (d: Buffer) => { stdout += d.toString() })
43
48
  proc.stderr.on('data', (d: Buffer) => { stderr += d.toString() })
44
49
  proc.on('close', (code) => {
@@ -18,9 +18,12 @@ const BASE_ENV = {
18
18
  function spawnCodex(args: string[]): Promise<{ text: string; threadId: string | null; usage?: TokenUsage }> {
19
19
  return new Promise((resolve, reject) => {
20
20
  let stdout = ''
21
+ const isWin = process.platform === 'win32'
21
22
  const proc = spawn('codex', args, {
22
23
  env: { ...process.env, ...BASE_ENV },
23
24
  cwd: process.cwd(),
25
+ shell: isWin,
26
+ windowsHide: true, // prevent CMD window from flashing on Windows
24
27
  })
25
28
  proc.stdout.on('data', (d: Buffer) => { stdout += d.toString() })
26
29
  proc.stderr.on('data', (d: Buffer) => {