Files
orca/src/shared/terminal-spawn-response.ts
T
Brennan Benson 407069bc63 Unify terminal starts under one host operation (#32076)
* Unify terminal starts under one host operation

* Pin winning geometry across a late terminal join

* Use terminal creation options type in launch race test

* Check closed panes after acquiring the terminal spawn lease

* Preserve terminal start resource and join boundaries

* Keep terminal attach regression within project boundaries

* Capture terminal spawn authority and preserve image coverage

* Use checked fixtures for terminal image replay regression

* test: expose persisted pane to main layout in attach race

* test: contract terminal spawn scaling and retention

* test: correct spawn scaling fixture types and CI selection

* test(terminal): cover exited prompt claims and adopted team cleanup

* test(pty): consolidate mock registry imports

* fix(pty): retain untyped IPC resume inputs in common contract
2026-10-26 00:25:37 -07:00

17 lines
620 B
TypeScript

/** Only a boundary proved for this image can suppress subsequent replayed output. */
export function provenSpawnResponse<
Result extends {
startupCwdSource?: unknown
snapshotSeq?: number
snapshotKittyKeyboardFlags?: number
}
>(result: Result, provedSnapshotSeq?: number) {
const { startupCwdSource: _source, ...response } = result
const snapshotSeq = provedSnapshotSeq ?? result.snapshotSeq
return {
...response,
...(provedSnapshotSeq !== undefined ? { snapshotSeq: provedSnapshotSeq } : {}),
...(typeof snapshotSeq === 'number' ? {} : { snapshotKittyKeyboardFlags: undefined })
}
}