Files
orca/src/main/runtime/construction/runtime-construction-dependencies.ts
T
Brennan Benson 8d908764dc Revert "Keep same-machine folders with matching Git remotes in separate projects (#32272)" (#34662)
* Revert "Keep same-machine folders with matching Git remotes in separate projects (#32272)"

This reverts commit 29a5f89b8a.

On a machine with several clones of one repo, #32272 moved the oldest clone
into the shared cross-host project. Shared Windows QA machines have several
orca clones, so everyone's sidebar "orca" project suddenly gained that
machine's main checkout and its worktrees. Revert until the intended
grouping is decided.

Conflicts resolved against later main: Settings files moved into
settings/repository (imports adjusted), and two test files later deleted on
main stay deleted.

* Use checked types in restored test fixtures

* Combine restored fixture type imports
2026-10-27 20:38:35 -07:00

83 lines
4.6 KiB
TypeScript

import type { CliWriterObservation } from '../../agent-hooks/server/cli-writer-observation'
import type { ExecutionHostScope } from '../../../shared/execution-host'
import type { IPtyProvider } from '../../providers/pty-provider-contract'
import type { PrepareClaudeAuth } from '../../ipc/pty/host-env/types'
import type {
RuntimeTerminalAgentStatusEvent,
RuntimeTerminalProgramStatusFacetEvent
} from '../runtime-terminal-contracts'
import type { TerminalSideEffectBatch } from '../../../shared/terminal-side-effect-facts'
import type { ClaudeTerminalEvidence } from '../../../shared/claude-terminal-interrupt'
import type { AgentStatusIpcPayload } from '../../../shared/agent-status-types'
import type { StructuredAgentSessionStatusSink } from '../../native-chat/agent-session-wire/structured-agent-session-status-feed'
import type { ObservedAgentStatusPaneIdentity } from '../../ipc/agent-status-ipc-boundary'
import type { AgentHookAuthorityAttestation } from '../../agent-hooks/server'
import type {
AiVaultPrepareSessionResumeArgs,
AiVaultPrepareSessionResumeResult
} from '../../../shared/ai-vault-resume-preparation'
import type { RuntimeDesktopWindowStatus } from '../../../shared/runtime-types'
import type { AgentSessionClaimSigner } from '../agent-session/ownership/agent-session-claim-identity'
import type { OrchestrationEnvironmentTransport } from '../orchestration/environment-transport'
import type { WorkspaceSleepPlatform } from '../workspaces/workspace-sleep-platform'
import type { SessionSearchSettingsApply } from '../runtime-session-search-settings'
export type RuntimeConstructionDependencies = {
getSetupTerminalTitle?: () => string
getLocalProvider?: () => IPtyProvider
prepareClaudeAuth?: PrepareClaudeAuth
onPtyStopped?: (ptyId: string) => void
onTerminalAgentStatus?: (event: RuntimeTerminalAgentStatusEvent) => void
onTerminalProgramStatusFacet?: (event: RuntimeTerminalProgramStatusFacetEvent) => void
onTerminalSideEffects?: (batch: TerminalSideEffectBatch) => void
onClaudeTerminalEvidence?: (paneKey: string, evidence: ClaudeTerminalEvidence) => void
getAgentStatusSnapshot?: () => AgentStatusIpcPayload[]
getAgentStatusSnapshotForPane?: (paneKey: string) => AgentStatusIpcPayload[]
structuredAgentStatusSink?: StructuredAgentSessionStatusSink
readObservedAgentStatusPaneIdentity?: (paneKey: string) => ObservedAgentStatusPaneIdentity
getAgentProviderSessionSnapshot?: () => AgentStatusIpcPayload[]
getAgentProviderSessionRowsForPane?: (paneKey: string) => AgentStatusIpcPayload[]
subscribeAgentProviderSessionChanges?: (
listener: (sessions: readonly { paneKey: string; sessionId: string }[]) => void
) => () => void
attestAgentHookCompatibilityAuthority?: (candidate: {
paneKey: string
launchTokenHash: string
connectionId: string | null
terminalProvenance: 'current_runtime' | 'restored'
}) => AgentHookAuthorityAttestation | null
retireAgentHookCompatibilityAuthority?: (paneKey: string) => void
readHookCliWriterObservation?: (row: AgentStatusIpcPayload) => CliWriterObservation | null
/** `exitedSince`: also answer `exited` for an exit the hook store proved at or after it. */
checkHookAgentPresence?: (
paneKey: string,
exitedSince?: number
) => Promise<'live' | 'unverifiable' | 'exited' | null>
reconcileAgentStatusForEndedProcess?: (paneKeys: Iterable<string>) => void
/** A worker attached to these panes; an exit the hook store proved before then is not its own. */
forgetHookAgentExit?: (paneKeys: Iterable<string>) => void
dropAgentStatusForRemovedWorktree?: (worktreeId: string, host?: ExecutionHostScope) => void
canRecoverPersistentLocalPtys?: () => boolean
getPairedDeviceName?: (pairedDeviceId: string) => string | null
getAdditionalAiVaultCodexHomePaths?: () => readonly string[]
prepareAiVaultSessionResume?: (
args: AiVaultPrepareSessionResumeArgs
) => Promise<AiVaultPrepareSessionResumeResult>
prepareCodexStructuredLaunch?: (input: {
launchEnv: NodeJS.ProcessEnv
}) => string | null | Promise<string | null>
resolveCodexStructuredLaunchHome?: (input: {
launchEnv: NodeJS.ProcessEnv
}) => string | null | Promise<string | null>
prepareCodexCatalogProbeHome?: (homePath: string) => void
buildAgentHookPtyEnv?: () => Record<string, string>
getDesktopWindowStatus?: () => RuntimeDesktopWindowStatus
agentSessionClaimSigner?: AgentSessionClaimSigner
skillTransactionRecovery?: Promise<unknown>
applySessionSearchSettings?: SessionSearchSettingsApply
orchestrationEnvironmentTransport?: OrchestrationEnvironmentTransport
workspaceSleepPlatform?: WorkspaceSleepPlatform
}
export type RuntimeConstructionBindings = Required<RuntimeConstructionDependencies>