runcastle 1.4.3 → 1.4.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/bin/runcastle.js CHANGED
@@ -1617,7 +1617,7 @@ function createSidecarPtySession(cmd, args, opts) {
1617
1617
  }
1618
1618
  switch (msg.t) {
1619
1619
  case "ready":
1620
- if (typeof msg.pid === "number")
1620
+ if (typeof msg.pid === "number" && msg.pid > 0)
1621
1621
  pid = msg.pid;
1622
1622
  break;
1623
1623
  case "data":
package/index.js CHANGED
@@ -1616,7 +1616,7 @@ function createSidecarPtySession(cmd, args, opts) {
1616
1616
  }
1617
1617
  switch (msg.t) {
1618
1618
  case "ready":
1619
- if (typeof msg.pid === "number")
1619
+ if (typeof msg.pid === "number" && msg.pid > 0)
1620
1620
  pid = msg.pid;
1621
1621
  break;
1622
1622
  case "data":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcastle",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Burn tickets into shipped features with Claude Code.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "drizzle-orm": "0.45.2",
39
39
  "hono": "4.12.30",
40
40
  "nanoid": "6.0.0",
41
- "node-pty": "^1.1.0",
41
+ "node-pty": "1.2.0-beta.15",
42
42
  "simple-git": "^3.36.0",
43
43
  "zod": "4.4.3"
44
44
  }
package/pty-host.cjs CHANGED
@@ -102,7 +102,15 @@ function handleSpawn(msg) {
102
102
 
103
103
  send({ t: 'ready', pid: proc.pid })
104
104
 
105
+ // node-pty 1.2 on win32 starts the ConPTY child only once its output worker has
106
+ // connected, so `proc.pid` is still 0 above. It is set before the first output
107
+ // arrives, so re-announce it then.
108
+ let pidAnnounced = proc.pid > 0
105
109
  proc.onData((d) => {
110
+ if (!pidAnnounced && proc.pid > 0) {
111
+ pidAnnounced = true
112
+ send({ t: 'ready', pid: proc.pid })
113
+ }
106
114
  const buf = typeof d === 'string' ? Buffer.from(d, 'utf8') : d
107
115
  send({ t: 'data', d: buf.toString('base64') })
108
116
  })