mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 09:27:29 +00:00
* refactor(daemon): group transport, provider, endpoint, and terminal owners * refactor(daemon): consolidate owner imports and preserve pinned baseline sources * refactor(daemon): import termination budgets from their defining owner * fix(ci): retain serve mode coverage for extracted orcad startup * fix daemon build smoke to load concrete argument owner * read daemon protocol facts from historical defining paths * route protocol revision owners through compatibility checks
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
import { ownFreshDaemonScope } from '../../../src/main/daemon/process-scopes/daemon-cgroup-scope'
|
|
import { startDaemonScopeDeathWatch } from '../../../src/main/daemon/process-scopes/daemon-scope-death-watch'
|
|
import { initializeTerminalScopes } from '../../../src/main/daemon/process-scopes/terminal-scopes-runtime'
|
|
|
|
export { buildDurableDaemonScopeCommand } from '../../../src/main/daemon/process-scopes/daemon-cgroup-scope'
|
|
export { wrapPtySpawnInTerminalScope } from '../../../src/main/daemon/process-scopes/terminal-scopes-runtime'
|
|
|
|
export function startScopeReaper(launchNonce: string, freshScope: boolean) {
|
|
return startDaemonScopeDeathWatch({
|
|
daemonScope: ownFreshDaemonScope(freshScope, launchNonce),
|
|
log: () => {}
|
|
})
|
|
}
|
|
|
|
/** What daemon-entry does at start: terminal scopes, then the death watch. */
|
|
export function startTerminalScopes(launchNonce: string) {
|
|
const daemonScope = ownFreshDaemonScope(true, launchNonce)
|
|
const events: unknown[] = []
|
|
const ceiling = initializeTerminalScopes(daemonScope, (event, details) =>
|
|
events.push({ event, ...details })
|
|
)
|
|
startDaemonScopeDeathWatch({ daemonScope, log: () => {} })
|
|
return { ceiling, events }
|
|
}
|