(ptyId: string, exitCode: number)
| 179 | } |
| 180 | |
| 181 | function sendExit(ptyId: string, exitCode: number): void { |
| 182 | const p = activePtys.get(ptyId) |
| 183 | if (!p) return |
| 184 | |
| 185 | p.exited = true |
| 186 | p.exitCode = exitCode |
| 187 | |
| 188 | emitLifecycle({ type: "exit", ptyId, exitCode }) |
| 189 | |
| 190 | scheduleCleanup(ptyId) |
| 191 | } |
| 192 | |
| 193 | async function handleSpawn(params: SpawnParams): Promise<SpawnResponse> { |
| 194 | logger.info("[Pty:spawn] Starting", JSON.stringify({ ptyId: params.ptyId, cwd: params.cwd, cols: params.cols, rows: params.rows })) |
no test coverage detected