Files
orca/config/docker/daemon-scope-lifetime/bundle-entry.ts
Neil 2f217b4d0d refactor(daemon): group endpoint, provider, session and transport owners (#38462)
* 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
2026-11-05 01:54:51 -08:00

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 }
}