mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 08:03:58 +00:00
* refactor(daemon): split oversized PTY services * revert(daemon): restore merge-base session listing and canceled-spawn behavior Two behavior changes rode along with the file-splitting refactor: - listLiveTerminalHostSessions dropped sessions with isTerminating, not just dead ones, hiding sessions the merge base still advertised. - spawnAndPublishSession called session.beginTermination() before publishing a canceled spawn into the host map. Both hunks are reverted to the merge base; the refactor is untouched.
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import type { DaemonFileLog } from './daemon-file-log'
|
|
import type { SubprocessHandle } from './session-subprocess-handle'
|
|
|
|
export type DaemonServerOptions = {
|
|
socketPath: string
|
|
tokenPath: string
|
|
pidPath?: string
|
|
launchNonce?: string
|
|
startedAtMs?: number
|
|
publishEndpointOwnership?: () => void
|
|
entryPath?: string
|
|
appVersion?: string
|
|
spawnerExecPath?: string
|
|
protocolVersion?: number
|
|
onIdleShutdown?: () => void
|
|
onRpcShutdown?: () => void
|
|
initialAdoptionTestConfig?: {
|
|
timeoutMs: number
|
|
clock: {
|
|
setTimeout(callback: () => void, delayMs: number): unknown
|
|
clearTimeout(handle: unknown): void
|
|
now(): number
|
|
}
|
|
}
|
|
ptySpawnHealthCheck?: () => Promise<void>
|
|
preparePtySpawn?: () => Promise<void>
|
|
onPtySessionExit?: (sessionId: string) => void
|
|
onAuthenticatedClientPair?: () => void
|
|
log?: DaemonFileLog
|
|
spawnSubprocess: (opts: {
|
|
sessionId: string
|
|
cols: number
|
|
rows: number
|
|
cwd?: string
|
|
env?: Record<string, string>
|
|
command?: string
|
|
shellOverride?: string
|
|
isCanceled?: () => boolean
|
|
}) => SubprocessHandle | Promise<SubprocessHandle>
|
|
}
|