chore(runtime): delete exports nothing reads (#31639)

flushDurableStateOrThrowAsync and six exported types (AgentSessionSpawnTokenScanEvidence,
FreshExplicitAgentStatus, LiveTerminalPty, RemoteStartReceipt, WorkerStartMode(Reason),
WorktreeTeardownStopPty) had no reader anywhere in src, mobile, config or tests.
This commit is contained in:
Neil
2026-10-21 13:18:20 -07:00
committed by GitHub
parent 7d43ed9024
commit cd8b289f2f
7 changed files with 0 additions and 57 deletions
@@ -137,29 +137,6 @@ export class WriteFlushBarrierOperations {
}
}
export async function flushDurableStateOrThrowAsync(
owner: WriteFlushBarrierOperations
): Promise<void> {
const { runtime, writes } = owner[writeFlushBarrierOperationsContext]
if (runtime.writesFrozen || runtime.profileMaintenancePending || runtime.quitFlushStarted) {
throw new Error('Cannot flush while persistence is finalized')
}
return runProfileStateFlush(runtime, async () => {
for (;;) {
if (runtime.writeTimer) {
clearTimeout(runtime.writeTimer)
runtime.writeTimer = null
}
runtime.firstPendingSaveAt = null
const generation = runtime.writeGeneration
await enqueueWrite(writes)
if (generation === runtime.writeGeneration) {
break
}
}
})
}
export async function flushCurrentStateAsync(
owner: WriteFlushBarrierOperations,
{
@@ -14,10 +14,6 @@ import { spawnTokenFromEnvironBlock } from './agent-session-spawn-token-readback
export type AgentSessionSpawnTokenScan = ReadonlyMap<string, readonly number[]>
export type AgentSessionSpawnTokenScanEvidence =
| { status: 'verified'; processes: AgentSessionSpawnTokenScan }
| { status: 'unverifiable'; processes: null; platform: NodeJS.Platform }
/** Tokens observed on this host, or null when the platform cannot answer at all. */
export async function scanAgentSessionSpawnTokenProcesses(
platform: NodeJS.Platform = process.platform,
@@ -12,8 +12,6 @@ import {
downgradeAgentLaunchModeForHost,
readAgentLaunchModeSettings,
resolveAgentLaunchModeOnHost,
type AgentLaunchMode,
type AgentLaunchModeReason,
type AgentLaunchModeReceipt,
type AgentLaunchModeSettings,
type AgentLaunchModeVocabulary
@@ -21,8 +19,6 @@ import {
import type { TuiAgent } from '../../../../shared/tui-agent'
import type { OrcaRuntimeService } from '../../orca-runtime'
export type WorkerStartMode = AgentLaunchMode
export type WorkerStartModeReason = AgentLaunchModeReason
export type WorkerStartModeReceipt = AgentLaunchModeReceipt
/** Orchestration's receipts are read next to dispatch records, so they name the worker and the
@@ -1,20 +1,5 @@
import type { OrchestrationWorkerLaunchReceipt } from '../worker/worker-launch-preferences'
export type RemoteStartReceipt = {
dispatchId: string
state: string
runtimeEpoch: string
worktreeId?: string
terminalHandle?: string
setup?: { state: string }
launch?: OrchestrationWorkerLaunchReceipt
effects?: unknown[]
residualResources?: unknown[]
prompt?: unknown
failedStage?: string
lastError?: string
}
export function isKnownRemoteStartFailure(code: string): boolean {
return [
'invalid_argument',
@@ -71,8 +71,6 @@ export function selectFreshExplicitAgentStatusRow(args: HookRowJoin): AgentStatu
return best
}
export type FreshExplicitAgentStatus = ReturnType<typeof selectFreshExplicitAgentStatus>
/** The freshest explicit state for a terminal, matched on its handle or its pane key. */
export function selectFreshExplicitAgentStatus(args: {
handle: string
@@ -21,10 +21,6 @@ import { ORCA_LAYOUT_OWNER_IS_MAIN } from '../../../../shared/layout-owner-switc
import { startedMainTerminalSurfaces } from '../surface/main-terminal-surfaces'
import { HEADLESS_RUNTIME_WINDOW_ID } from '../../../../shared/runtime-types'
export type LiveTerminalPty = ReturnType<
OrcaRuntimeWithBuildPtyTerminalSummary['getLivePtyForHandle']
>
export abstract class OrcaRuntimeWithBuildPtyTerminalSummary extends OrcaRuntimeWithGetPtyRecordForPaneKey {
protected abstract bindPtyIncarnationHandle(
retained: PtyIncarnationHandleRecord,
@@ -17,11 +17,6 @@ import { teardownRpcDeadline } from './worktree-teardown-deadline'
// or pathological inventory cannot fan out unbounded provider/RPC shutdowns.
const WORKTREE_TEARDOWN_CONCURRENCY = 32
export type WorktreeTeardownStopPty = (
ptyId: string,
stop: () => Promise<boolean>
) => Promise<{ stopped: boolean; owner: boolean }>
export async function sweepProviderByPrefix(
worktreeId: string,
provider: IPtyProvider,