diff --git a/src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts b/src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts index 1b3269b7add8..18f55ba0c95e 100644 --- a/src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts +++ b/src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts @@ -7,11 +7,11 @@ // A record ends when the chat's agent is started again outside a resume action — the host retires // it at that start, with the offer — or by a successful retry, or a dismissal. +import type { AgentSessionRecoveryCapsule } from '../../runtime/agent-session-recovery-capsule' import type { - AgentSessionRecoveryCapsule, AgentSessionResumeFailureInput, AgentSessionResumeFailureRecord -} from '../../runtime/agent-session-recovery-capsule' +} from '../../runtime/agent-session-recovery-capsule-entries' import type { AgentSessionRecord } from '../../../shared/agent-session-record' import type { AgentSessionResumeFailureOutcome, diff --git a/src/main/runtime/agent-prompt-submission-verification.test.ts b/src/main/runtime/agent-prompt-submission-verification.test.ts index aea3ffee9eff..8be383e165b8 100644 --- a/src/main/runtime/agent-prompt-submission-verification.test.ts +++ b/src/main/runtime/agent-prompt-submission-verification.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest' +import { AGENT_PROMPT_EFFECT_TIMEOUT_MS } from '../../shared/orchestration-timing-budgets' import { - AGENT_PROMPT_EFFECT_TIMEOUT_MS, AGENT_PROMPT_HOOK_EFFECT_TIMEOUT_MS, type AgentPromptActivity, isAgentPromptStalledError, diff --git a/src/main/runtime/agent-prompt-submission-verification.ts b/src/main/runtime/agent-prompt-submission-verification.ts index 91da0ed9dfe9..eb6f61fd0e42 100644 --- a/src/main/runtime/agent-prompt-submission-verification.ts +++ b/src/main/runtime/agent-prompt-submission-verification.ts @@ -1,4 +1,3 @@ -export { AGENT_PROMPT_EFFECT_TIMEOUT_MS } from '../../shared/orchestration-timing-budgets' import { AGENT_PROMPT_EFFECT_TIMEOUT_MS } from '../../shared/orchestration-timing-budgets' import type { TerminalAgent } from '../../shared/terminal-agent' diff --git a/src/main/runtime/agent-session-recovery-capsule.test.ts b/src/main/runtime/agent-session-recovery-capsule.test.ts index bb3c93a6a989..6777b8f26f5d 100644 --- a/src/main/runtime/agent-session-recovery-capsule.test.ts +++ b/src/main/runtime/agent-session-recovery-capsule.test.ts @@ -11,9 +11,9 @@ import { } from '../native-chat/agent-session-wire/structured-agent-session-restart-resume-test-harness' import { AgentSessionRecoveryCapsule, - AGENT_SESSION_RECOVERY_CAPSULE_FILE, - type AgentSessionResumeFailureInput + AGENT_SESSION_RECOVERY_CAPSULE_FILE } from './agent-session-recovery-capsule' +import type { AgentSessionResumeFailureInput } from './agent-session-recovery-capsule-entries' let directory: string let filePath: string diff --git a/src/main/runtime/agent-session-recovery-capsule.ts b/src/main/runtime/agent-session-recovery-capsule.ts index ba34c82fc57c..568fc88e9ef9 100644 --- a/src/main/runtime/agent-session-recovery-capsule.ts +++ b/src/main/runtime/agent-session-recovery-capsule.ts @@ -23,11 +23,6 @@ import { type RecoveryEntry } from './agent-session-recovery-capsule-entries' -export type { - AgentSessionResumeFailureInput, - AgentSessionResumeFailureRecord -} from './agent-session-recovery-capsule-entries' - export const AGENT_SESSION_RECOVERY_CAPSULE_FILE = 'agent-session-recovery.json' const MAX_CAPSULE_BYTES = 4 * 1024 * 1024 diff --git a/src/main/runtime/claude-agent-teams-service.test.ts b/src/main/runtime/claude-agent-teams-service.test.ts index 57f867cb1c25..8d00a36896d0 100644 --- a/src/main/runtime/claude-agent-teams-service.test.ts +++ b/src/main/runtime/claude-agent-teams-service.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it, vi } from 'vitest' -import { ClaudeAgentTeamsService, type AgentTeamsTerminalApi } from './claude-agent-teams-service' +import { ClaudeAgentTeamsService } from './claude-agent-teams-service' +import type { AgentTeamsTerminalApi } from './claude-agent-teams-types' function createServiceWithLeader(): { service: ClaudeAgentTeamsService diff --git a/src/main/runtime/claude-agent-teams-service.ts b/src/main/runtime/claude-agent-teams-service.ts index 34ef35ecb361..f72d361a46bf 100644 --- a/src/main/runtime/claude-agent-teams-service.ts +++ b/src/main/runtime/claude-agent-teams-service.ts @@ -11,13 +11,6 @@ import type { TeamPane } from './claude-agent-teams-types' -export type { - AgentTeamsLaunchEnv, - AgentTeamsTerminalApi, - AgentTeamsTmuxCompatRequest, - AgentTeamsTmuxCompatResponse -} from './claude-agent-teams-types' - export class ClaudeAgentTeamsService { private readonly teams = new Map() private readonly dispatcher = new ClaudeAgentTeamsTmuxDispatcher() diff --git a/src/main/runtime/construction/runtime-construction.ts b/src/main/runtime/construction/runtime-construction.ts index af925f81ebbf..ce9ae0cf5a62 100644 --- a/src/main/runtime/construction/runtime-construction.ts +++ b/src/main/runtime/construction/runtime-construction.ts @@ -25,10 +25,8 @@ import { installRuntimeGitCommandSurface } from '../runtime-git-command-surface' import { installRuntimeRepositoryCommandSurface } from '../runtime-repository-command-surface' import { installRuntimeReviewCommandSurface } from '../runtime-review-command-surface' import { installRuntimeServiceCommandSurface } from '../runtime-service-command-surface' -import { - RuntimeSkillCommands, - installRuntimeSkillCommandSurface -} from '../runtime-skill-command-surface' +import { RuntimeSkillCommands } from '../runtime-skill-command-surface' +import { installRuntimeSkillCommandSurface } from '../runtime-skill-command-contract' import { getAppEnvironment } from '../../../shared/app-environment' import { RuntimeClientSettingsController } from '../runtime-client-settings' import { RuntimeSessionSearchSettingsController } from '../runtime-session-search-settings' diff --git a/src/main/runtime/construction/runtime-service-state.ts b/src/main/runtime/construction/runtime-service-state.ts index 8e2d56f3529d..9c7860224acb 100644 --- a/src/main/runtime/construction/runtime-service-state.ts +++ b/src/main/runtime/construction/runtime-service-state.ts @@ -3,7 +3,7 @@ import { OrchestrationStructuredMailboxPointerDelivery } from '../orchestration/ import { createStructuredMailboxPointerHost } from '../orchestration/structured-mailbox-pointer-host' import { localOrchestrationCliCommand } from '../orchestration/cli-command' import { RuntimeOrchestrationSenderNames } from '../runtime-orchestration-sender-names' -import { isStructuredWorkerHandle } from '../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../shared/structured-worker-handle' import { ORCA_SESSION_ADDRESS_PREFIX } from '../../../shared/orca-session-address' import { resolveStructuredWorkerAuthority } from '../structured-worker-authority' import { OrcaRuntimeWithRuntimeId } from './runtime-identity-state' diff --git a/src/main/runtime/mobile-cloud-relay/desktop-relay-service.test.ts b/src/main/runtime/mobile-cloud-relay/desktop-relay-service.test.ts index cf4903535d5c..7177beb3ba07 100644 --- a/src/main/runtime/mobile-cloud-relay/desktop-relay-service.test.ts +++ b/src/main/runtime/mobile-cloud-relay/desktop-relay-service.test.ts @@ -1,5 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' -import type { MobilePairingConnectionContext } from '../runtime-rpc' +import type { MobilePairingConnectionContext } from '../runtime-rpc/runtime-rpc-pairing-types' import { DesktopRelayService } from './desktop-relay-service' import { pairingAuthorizationForContext } from './relay-pairing-authorization' diff --git a/src/main/runtime/mobile-cloud-relay/desktop-relay-service.ts b/src/main/runtime/mobile-cloud-relay/desktop-relay-service.ts index 894ca729e92c..a76b0c862c21 100644 --- a/src/main/runtime/mobile-cloud-relay/desktop-relay-service.ts +++ b/src/main/runtime/mobile-cloud-relay/desktop-relay-service.ts @@ -1,5 +1,6 @@ import type { OrcaCloudAuthConfig } from '../../orca-profiles/profile-cloud-auth-config' -import type { MobilePairingConnectionContext, OrcaRuntimeRpcServer } from '../runtime-rpc' +import type { MobilePairingConnectionContext } from '../runtime-rpc/runtime-rpc-pairing-types' +import type { OrcaRuntimeRpcServer } from '../runtime-rpc' import type { DeviceCredentialInstalled, PairingGetEndpointsParams, diff --git a/src/main/runtime/mobile-cloud-relay/relay-pairing-authorization.ts b/src/main/runtime/mobile-cloud-relay/relay-pairing-authorization.ts index c1760695b041..fbc9ad129fa4 100644 --- a/src/main/runtime/mobile-cloud-relay/relay-pairing-authorization.ts +++ b/src/main/runtime/mobile-cloud-relay/relay-pairing-authorization.ts @@ -1,4 +1,4 @@ -import type { MobilePairingConnectionContext } from '../runtime-rpc' +import type { MobilePairingConnectionContext } from '../runtime-rpc/runtime-rpc-pairing-types' import type { DeviceCredentialInstallAuthorization } from './relay-control-requests' // Derives install authorization only from immutable connection metadata, never from request params. diff --git a/src/main/runtime/mobile-cloud-relay/simulated-mobile-e2ee-v2-peer.ts b/src/main/runtime/mobile-cloud-relay/simulated-mobile-e2ee-v2-peer.ts index ec9a1b8f53f5..2894007794df 100644 --- a/src/main/runtime/mobile-cloud-relay/simulated-mobile-e2ee-v2-peer.ts +++ b/src/main/runtime/mobile-cloud-relay/simulated-mobile-e2ee-v2-peer.ts @@ -9,7 +9,7 @@ import { openMobileE2EEV2Frame, sealMobileE2EEV2Frame } from '../../../shared/mobile-e2ee-v2-framing' -import { deriveSharedKey } from '../rpc/e2ee-crypto' +import { deriveSharedKey } from '../../../shared/e2ee-crypto' import { deriveMobileE2EEV2KeySchedule } from '../../../shared/mobile-e2ee-v2-node-key-schedule' // Why: desktop-side tests need an independent mobile-side wire peer diff --git a/src/main/runtime/mobile-notification-dismissal-store.ts b/src/main/runtime/mobile-notification-dismissal-store.ts index 4a111a3dff2f..0b07807ec698 100644 --- a/src/main/runtime/mobile-notification-dismissal-store.ts +++ b/src/main/runtime/mobile-notification-dismissal-store.ts @@ -9,7 +9,6 @@ import { type StructuredAttentionOrigin } from '../../shared/agent-session-attention' -export type { DeliveredNotificationIdentity } from '../../shared/mobile-notification-identity' export type DeliveredNotificationRecord = DeliveredNotificationIdentity & { structuredOrigin?: StructuredAttentionOrigin } diff --git a/src/main/runtime/mobile-session-terminal-retirement-proof.test.ts b/src/main/runtime/mobile-session-terminal-retirement-proof.test.ts index 11426e50afe0..54189ae0ed9e 100644 --- a/src/main/runtime/mobile-session-terminal-retirement-proof.test.ts +++ b/src/main/runtime/mobile-session-terminal-retirement-proof.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' +import { appendRetiredTerminalSurfaceProofs } from '../../shared/terminal-retirement-proof-ledger' import { - appendRetiredTerminalSurfaceProofs, attachRetirementProofsToSnapshot, preserveTerminalRetirementProofs } from './mobile-session-terminal-retirement-proof' diff --git a/src/main/runtime/mobile-session-terminal-retirement-proof.ts b/src/main/runtime/mobile-session-terminal-retirement-proof.ts index 26bf1cb974da..ea7a3c39c849 100644 --- a/src/main/runtime/mobile-session-terminal-retirement-proof.ts +++ b/src/main/runtime/mobile-session-terminal-retirement-proof.ts @@ -8,11 +8,6 @@ import { retirementProofKey } from '../../shared/terminal-retirement-proof-ledger' -export { - appendRetiredTerminalSurfaceProofs, - dropRetirementProofsForLiveSurfaces -} from '../../shared/terminal-retirement-proof-ledger' - /** * Renderer snapshots omit the host's durable close acknowledgements; carry them forward. * diff --git a/src/main/runtime/mobile-session-terminal-retirement.ts b/src/main/runtime/mobile-session-terminal-retirement.ts index 0f027e8c68d5..cd9f8d2d3cb4 100644 --- a/src/main/runtime/mobile-session-terminal-retirement.ts +++ b/src/main/runtime/mobile-session-terminal-retirement.ts @@ -10,7 +10,7 @@ import type { TerminalLayoutSnapshot, TerminalPaneLayoutNode } from '../../shared/terminal-tab-types' -import { appendRetiredTerminalSurfaceProofs } from './mobile-session-terminal-retirement-proof' +import { appendRetiredTerminalSurfaceProofs } from '../../shared/terminal-retirement-proof-ledger' export type RetiredTerminalSurface = { worktreeId: string diff --git a/src/main/runtime/orca-runtime-browser-screencast-e2ee-backlog.test.ts b/src/main/runtime/orca-runtime-browser-screencast-e2ee-backlog.test.ts index 700a7e28188c..2458f8adec2e 100644 --- a/src/main/runtime/orca-runtime-browser-screencast-e2ee-backlog.test.ts +++ b/src/main/runtime/orca-runtime-browser-screencast-e2ee-backlog.test.ts @@ -7,7 +7,13 @@ import { createStreamedGuest } from './single-page-browser-commands-host-test-double' import { E2EEChannel } from './rpc/e2ee-channel' -import { decrypt, decryptBytes, deriveSharedKey, encrypt, generateKeyPair } from './rpc/e2ee-crypto' +import { + decrypt, + decryptBytes, + deriveSharedKey, + encrypt, + generateKeyPair +} from '../../shared/e2ee-crypto' import type { RpcBinarySender } from './rpc/rpc-binary-sender' const { webContentsFromId, startBrowserScreencast } = vi.hoisted(() => ({ diff --git a/src/main/runtime/orca-runtime-core.ts b/src/main/runtime/orca-runtime-core.ts index 5c5a4f32b8eb..fe88078cf62f 100644 --- a/src/main/runtime/orca-runtime-core.ts +++ b/src/main/runtime/orca-runtime-core.ts @@ -16,7 +16,7 @@ import type { RuntimeGitCommandSurface } from './runtime-git-command-surface' import type { RuntimeRepositoryCommandSurface } from './runtime-repository-command-surface' import type { RuntimeReviewCommandSurface } from './runtime-review-command-surface' import type { RuntimeServiceCommandSurface } from './runtime-service-command-surface' -import type { RuntimeSkillCommandSurface } from './runtime-skill-command-surface' +import type { RuntimeSkillCommandSurface } from './runtime-skill-command-contract' export type PtyIncarnationHandleRecord = { handle: string diff --git a/src/main/runtime/orca-runtime-git-branch-diff.test.ts b/src/main/runtime/orca-runtime-git-branch-diff.test.ts index baded112f165..26c4f1fc2bdd 100644 --- a/src/main/runtime/orca-runtime-git-branch-diff.test.ts +++ b/src/main/runtime/orca-runtime-git-branch-diff.test.ts @@ -1,6 +1,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import type { GlobalSettings } from '../../shared/global-settings-types' -import { RuntimeGitCommands, type ResolvedRuntimeGitWorktree } from './orca-runtime-git' +import { RuntimeGitCommands } from './orca-runtime-git' +import type { ResolvedRuntimeGitWorktree } from './runtime-git-command-target' const getBranchDiffMock = vi.hoisted(() => vi.fn()) diff --git a/src/main/runtime/orca-runtime-git-diff-budget.test.ts b/src/main/runtime/orca-runtime-git-diff-budget.test.ts index 37992fc2066c..ef2ea8a81523 100644 --- a/src/main/runtime/orca-runtime-git-diff-budget.test.ts +++ b/src/main/runtime/orca-runtime-git-diff-budget.test.ts @@ -4,7 +4,8 @@ import { REMOTE_RPC_MAX_CONTENT_BYTES } from '../../shared/remote-rpc-content-bu import type { GitDiffResult } from '../../shared/git-diff-compare-types' import type { GlobalSettings } from '../../shared/global-settings-types' import type * as GitStatusModule from '../git/status' -import { RuntimeGitCommands, type ResolvedRuntimeGitWorktree } from './orca-runtime-git' +import { RuntimeGitCommands } from './orca-runtime-git' +import type { ResolvedRuntimeGitWorktree } from './runtime-git-command-target' const mocks = vi.hoisted(() => ({ getDiff: vi.fn(), diff --git a/src/main/runtime/orca-runtime-git.test.ts b/src/main/runtime/orca-runtime-git.test.ts index 31f3a51db1d0..4c5e18edb339 100644 --- a/src/main/runtime/orca-runtime-git.test.ts +++ b/src/main/runtime/orca-runtime-git.test.ts @@ -10,7 +10,8 @@ import { SSH_HOST_NOT_SERVED_MESSAGE, SshHostNotServedError } from '../providers/ssh-host-not-served-error' -import { RuntimeGitCommands, type ResolvedRuntimeGitWorktree } from './orca-runtime-git' +import { RuntimeGitCommands } from './orca-runtime-git' +import type { ResolvedRuntimeGitWorktree } from './runtime-git-command-target' const mocks = vi.hoisted(() => ({ checkoutBranch: vi.fn(), diff --git a/src/main/runtime/orca-runtime-git.ts b/src/main/runtime/orca-runtime-git.ts index b5a5041fd197..809d61e6f4ee 100644 --- a/src/main/runtime/orca-runtime-git.ts +++ b/src/main/runtime/orca-runtime-git.ts @@ -5,11 +5,6 @@ import { RuntimeGitStatusCommands } from './runtime-git-status-commands' import { RuntimeGitSyncCommands } from './runtime-git-sync-commands' import type { RuntimeGitCommandHost } from './runtime-git-command-target' -export type { - ResolvedRuntimeGitWorktree, - RuntimeGitCommandHost -} from './runtime-git-command-target' - export class RuntimeGitCommands { readonly getRuntimeGitStatus: RuntimeGitStatusCommands['getRuntimeGitStatus'] readonly getRuntimeGitSubmoduleStatus: RuntimeGitStatusCommands['getRuntimeGitSubmoduleStatus'] diff --git a/src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts b/src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts index c17b1790e73e..fc170aa6f799 100644 --- a/src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts +++ b/src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts @@ -37,10 +37,8 @@ import { removeWorktree } from '../../git/worktree' import * as gitRunner from '../../git/runner' -import { - WORKTREE_PROCESS_SWEEP_TIMEOUT_MS, - WORKTREE_TEARDOWN_RPC_MARGIN_MS -} from '../worktree-teardown' +import { WORKTREE_PROCESS_SWEEP_TIMEOUT_MS } from '../worktree-teardown' +import { WORKTREE_TEARDOWN_RPC_MARGIN_MS } from '../worktree-teardown-deadline' import { clearSubmodulePathsCacheForTests, listSubmodulePaths } from '../../git/status' import { getEffectiveHooks, hasHooksFile, loadHooks, parseOrcaYaml, runHook } from '../../hooks' import { createSetupRunnerScript, resolveSetupRunnerShell } from '../../worktree-runner-script' diff --git a/src/main/runtime/orchestration/db/schema/structured-worker-orca-session-backfill.ts b/src/main/runtime/orchestration/db/schema/structured-worker-orca-session-backfill.ts index 59a0bdb1c7f7..1bc736d1500a 100644 --- a/src/main/runtime/orchestration/db/schema/structured-worker-orca-session-backfill.ts +++ b/src/main/runtime/orchestration/db/schema/structured-worker-orca-session-backfill.ts @@ -2,8 +2,10 @@ import type Database from '../../../../sqlite/sync-database' import { isOrcaSessionId } from '../../../../../shared/orca-session-address' import { STRUCTURED_WORKER_HANDLE_PREFIX, + isStructuredWorkerHandle +} from '../../../../../shared/structured-worker-handle' +import { STRUCTURED_WORKER_INCARNATION_PREFIX, - isStructuredWorkerHandle, sessionIdFromStructuredWorkerIncarnation } from '../../../structured-worker-identity' import { currentRunCoordinatorOrcaSessionIdSql } from '../runs/run-coordinator-orca-session' diff --git a/src/main/runtime/orchestration/worker-output-archive.ts b/src/main/runtime/orchestration/worker-output-archive.ts index d2d44fd48426..80da9d2da83a 100644 --- a/src/main/runtime/orchestration/worker-output-archive.ts +++ b/src/main/runtime/orchestration/worker-output-archive.ts @@ -7,10 +7,8 @@ import type { WorkerTerminalArchiveRow, WorkerTerminalArchiveStatus } from './worker-terminal-ownership' -import { - MAX_WORKER_TRANSCRIPT_MESSAGE_LIMIT, - redactWorkerTerminalLines -} from './worker-transcript-payload' +import { MAX_WORKER_TRANSCRIPT_MESSAGE_LIMIT } from './worker-transcript-payload' +import { redactWorkerTerminalLines } from './worker-terminal-redaction' import { readWorkerTranscript } from './worker-transcript-read' import { isWslHookRelayConnectionId } from '../../../shared/wsl-hook-relay-contract' import { captureStructuredWorkerArchive } from '../rpc/methods/orchestration-structured-worker-lifecycle' diff --git a/src/main/runtime/orchestration/worker-terminal-process-liveness.ts b/src/main/runtime/orchestration/worker-terminal-process-liveness.ts index 4e652d6286af..b1d5816e6b99 100644 --- a/src/main/runtime/orchestration/worker-terminal-process-liveness.ts +++ b/src/main/runtime/orchestration/worker-terminal-process-liveness.ts @@ -2,8 +2,6 @@ import type { PtyProcessInfo } from '../../providers/pty-process-info' // One reader for the durable `host_scope` column; re-exported so the process-liveness // path keeps its import site while the parse itself lives beside the fleet consumers. -export type { WorkerTerminalHostScope } from '../../../shared/worker-terminal-host-scope' -export { parseWorkerTerminalHostScope } from '../../../shared/worker-terminal-host-scope' /** * Does `processIncarnation` name exactly this pty's live incarnation? Requires exact diff --git a/src/main/runtime/orchestration/worker-transcript-payload.test.ts b/src/main/runtime/orchestration/worker-transcript-payload.test.ts index 7288af52a76e..5ff4bc0c0608 100644 --- a/src/main/runtime/orchestration/worker-transcript-payload.test.ts +++ b/src/main/runtime/orchestration/worker-transcript-payload.test.ts @@ -2,9 +2,9 @@ import { describe, expect, it } from 'vitest' import { projectStructuredItemsToNativeChat } from '../../../shared/structured-agent-session-projection' import { boundWorkerTranscriptMessages, - boundWorkerTranscriptTail, - redactWorkerTerminalLines + boundWorkerTranscriptTail } from './worker-transcript-payload' +import { redactWorkerTerminalLines } from './worker-terminal-redaction' describe('worker transcript wire bounds', () => { it('clips oversized blocks and omits local image paths', () => { diff --git a/src/main/runtime/orchestration/worker-transcript-payload.ts b/src/main/runtime/orchestration/worker-transcript-payload.ts index cedec632886d..04b4ef9b97d3 100644 --- a/src/main/runtime/orchestration/worker-transcript-payload.ts +++ b/src/main/runtime/orchestration/worker-transcript-payload.ts @@ -3,7 +3,6 @@ import type { NativeChatBlock, NativeChatMessage } from '../../../shared/native- import { boundSubagentEntryId } from '../../native-chat/subagent-entry-id-bounds' import { boundWorkerTranscriptActivityBlock } from './worker-transcript-activity-block-bounds' import { replaceDispatchCapabilities } from './worker-terminal-redaction' -export { redactWorkerTerminalLines } from './worker-terminal-redaction' export const DEFAULT_WORKER_TRANSCRIPT_MESSAGE_LIMIT = 40 export const MAX_WORKER_TRANSCRIPT_MESSAGE_LIMIT = 50 diff --git a/src/main/runtime/paired-client-navigation-test-harness.ts b/src/main/runtime/paired-client-navigation-test-harness.ts index acc330dc3fe0..1f3611780576 100644 --- a/src/main/runtime/paired-client-navigation-test-harness.ts +++ b/src/main/runtime/paired-client-navigation-test-harness.ts @@ -3,7 +3,7 @@ import WebSocket from 'ws' import { parsePairingCode } from '../../shared/pairing' import type { RuntimeMobileSessionTabsResult } from '../../shared/runtime-types' import type { OrcaRuntimeService } from './orca-runtime' -import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from './rpc/e2ee-crypto' +import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from '../../shared/e2ee-crypto' export const REPO_ID = 'repo-1' export const FOLDER_REPO_ID = 'folder-repo-1' diff --git a/src/main/runtime/remote-desktop-terminal-floor.ts b/src/main/runtime/remote-desktop-terminal-floor.ts index 88a7819eaa7c..13675a490d93 100644 --- a/src/main/runtime/remote-desktop-terminal-floor.ts +++ b/src/main/runtime/remote-desktop-terminal-floor.ts @@ -1,4 +1,4 @@ -import { clampTerminalViewport } from './terminal-viewport' +import { clampTerminalViewport } from '../../shared/terminal-viewport' type Viewport = { cols: number; rows: number } type Viewer = Viewport & { clientId: string; activity: number } diff --git a/src/main/runtime/rpc/device-key-auth.test.ts b/src/main/runtime/rpc/device-key-auth.test.ts index da9217213247..fa6c980a8244 100644 --- a/src/main/runtime/rpc/device-key-auth.test.ts +++ b/src/main/runtime/rpc/device-key-auth.test.ts @@ -9,7 +9,7 @@ import { DeviceRegistry } from '../device-registry' import { DEVICE_REGISTRY_FILENAME } from '../mobile-pairing-files' import { SimulatedMobileE2EEV2Peer } from '../mobile-cloud-relay/simulated-mobile-e2ee-v2-peer' import { registerSocketDeviceKey } from '../runtime-rpc/runtime-rpc-device-key-registration' -import { generateKeyPair } from './e2ee-crypto' +import { generateKeyPair } from '../../../shared/e2ee-crypto' import { MobileSocketWiring, type AuthenticatedMobileSocket, diff --git a/src/main/runtime/rpc/e2ee-channel-text-backpressure.test.ts b/src/main/runtime/rpc/e2ee-channel-text-backpressure.test.ts index 03a874e65709..24c49185c9ed 100644 --- a/src/main/runtime/rpc/e2ee-channel-text-backpressure.test.ts +++ b/src/main/runtime/rpc/e2ee-channel-text-backpressure.test.ts @@ -2,7 +2,13 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { WebSocket } from 'ws' import type { RpcBinarySendResult } from './rpc-binary-sender' import { E2EEChannel, type E2EEChannelOptions } from './e2ee-channel' -import { deriveSharedKey, decrypt, decryptBytes, encrypt, generateKeyPair } from './e2ee-crypto' +import { + deriveSharedKey, + decrypt, + decryptBytes, + encrypt, + generateKeyPair +} from '../../../shared/e2ee-crypto' import { createMobileE2EEOutboundMemoryBudget } from './mobile-e2ee-outbound-memory-budget' import { REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES } from '../../../shared/remote-runtime-memory-limits' diff --git a/src/main/runtime/rpc/e2ee-channel-v2.test.ts b/src/main/runtime/rpc/e2ee-channel-v2.test.ts index 7e06b53c0475..dcc21c2716d2 100644 --- a/src/main/runtime/rpc/e2ee-channel-v2.test.ts +++ b/src/main/runtime/rpc/e2ee-channel-v2.test.ts @@ -11,7 +11,7 @@ import { openMobileE2EEV2Frame, sealMobileE2EEV2Frame } from '../../../shared/mobile-e2ee-v2-framing' -import { deriveSharedKey } from './e2ee-crypto' +import { deriveSharedKey } from '../../../shared/e2ee-crypto' import type { RpcBinarySendResult } from './rpc-binary-sender' import { E2EEChannel } from './e2ee-channel' import { deriveMobileE2EEV2KeySchedule } from '../../../shared/mobile-e2ee-v2-node-key-schedule' diff --git a/src/main/runtime/rpc/e2ee-channel.test.ts b/src/main/runtime/rpc/e2ee-channel.test.ts index 5e88a5bee2cd..949fdc1b1adc 100644 --- a/src/main/runtime/rpc/e2ee-channel.test.ts +++ b/src/main/runtime/rpc/e2ee-channel.test.ts @@ -2,7 +2,13 @@ import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest' import type { WebSocket } from 'ws' import type { RpcBinarySendResult } from './rpc-binary-sender' import { E2EEChannel, type E2EEChannelOptions } from './e2ee-channel' -import { generateKeyPair, deriveSharedKey, encrypt, decrypt, encryptBytes } from './e2ee-crypto' +import { + generateKeyPair, + deriveSharedKey, + encrypt, + decrypt, + encryptBytes +} from '../../../shared/e2ee-crypto' import { REMOTE_RUNTIME_MAX_OUTBOUND_BINARY_FRAME_BYTES, REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES diff --git a/src/main/runtime/rpc/e2ee-channel.ts b/src/main/runtime/rpc/e2ee-channel.ts index b7c3506d1f93..453a32be66f2 100644 --- a/src/main/runtime/rpc/e2ee-channel.ts +++ b/src/main/runtime/rpc/e2ee-channel.ts @@ -1,6 +1,6 @@ // Why: this channel keeps E2EE framing out of RPC handlers, which consume plaintext across transports. import type { WebSocket } from 'ws' -import { deriveSharedKey, encrypt, decrypt, decryptBytes } from './e2ee-crypto' +import { deriveSharedKey, encrypt, decrypt, decryptBytes } from '../../../shared/e2ee-crypto' import { DesktopMobileE2EEV2Session, type DesktopMobileE2EEV2Context diff --git a/src/main/runtime/rpc/e2ee-crypto.test.ts b/src/main/runtime/rpc/e2ee-crypto.test.ts index bdc61e4c29cd..27ba88cf68f6 100644 --- a/src/main/runtime/rpc/e2ee-crypto.test.ts +++ b/src/main/runtime/rpc/e2ee-crypto.test.ts @@ -9,7 +9,7 @@ import { decryptBytes, MAX_E2EE_ENCRYPTED_BASE64_CHARACTERS, publicKeyFromBase64 -} from './e2ee-crypto' +} from '../../../shared/e2ee-crypto' import { MOBILE_E2EE_LEGACY_FIXTURE } from '../../../shared/mobile-e2ee-legacy-fixtures' describe('e2ee-crypto', () => { diff --git a/src/main/runtime/rpc/e2ee-crypto.ts b/src/main/runtime/rpc/e2ee-crypto.ts deleted file mode 100644 index 81e8c0f97556..000000000000 --- a/src/main/runtime/rpc/e2ee-crypto.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { - decrypt, - decryptBytes, - deriveSharedKey, - encrypt, - encryptBytes, - generateKeyPair, - MAX_E2EE_ENCRYPTED_BASE64_CHARACTERS, - publicKeyFromBase64 -} from '../../../shared/e2ee-crypto' diff --git a/src/main/runtime/rpc/e2ee-integration.test.ts b/src/main/runtime/rpc/e2ee-integration.test.ts index 1171848e8e75..edf302dc1948 100644 --- a/src/main/runtime/rpc/e2ee-integration.test.ts +++ b/src/main/runtime/rpc/e2ee-integration.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest' import type { WebSocket } from 'ws' import { E2EEChannel } from './e2ee-channel' -import { generateKeyPair, deriveSharedKey, encrypt, decrypt } from './e2ee-crypto' +import { generateKeyPair, deriveSharedKey, encrypt, decrypt } from '../../../shared/e2ee-crypto' // Why: this test simulates the full mobile → desktop E2EE flow without a real // WebSocket. The "mobile" side generates an ephemeral keypair, sends e2ee_hello, diff --git a/src/main/runtime/rpc/methods/browser-core.ts b/src/main/runtime/rpc/methods/browser-core.ts index f716c1e219d5..c354a55b1b75 100644 --- a/src/main/runtime/rpc/methods/browser-core.ts +++ b/src/main/runtime/rpc/methods/browser-core.ts @@ -25,7 +25,7 @@ import { TabSwitch, Upload, Wait -} from './browser-schemas' +} from '../../../../shared/rpc-contract/browser-params' import { BrowserOpenUrlParams, BrowserTabCreateParams diff --git a/src/main/runtime/rpc/methods/browser-extras.ts b/src/main/runtime/rpc/methods/browser-extras.ts index d725e7b886ca..99b72a9470eb 100644 --- a/src/main/runtime/rpc/methods/browser-extras.ts +++ b/src/main/runtime/rpc/methods/browser-extras.ts @@ -20,7 +20,7 @@ import { StorageKey, StorageKeyValue, Viewport -} from './browser-schemas' +} from '../../../../shared/rpc-contract/browser-params' import { MouseClick } from '../../../../shared/rpc-contract/browser-extras-params' export const BROWSER_EXTRA_METHODS = [ diff --git a/src/main/runtime/rpc/methods/browser-identity-rpc.ts b/src/main/runtime/rpc/methods/browser-identity-rpc.ts index 60d80d9fc020..bc58f3b1e89d 100644 --- a/src/main/runtime/rpc/methods/browser-identity-rpc.ts +++ b/src/main/runtime/rpc/methods/browser-identity-rpc.ts @@ -1,5 +1,5 @@ import { defineMethod } from '../core' -import { BrowserIdentitySet } from './browser-schemas' +import { BrowserIdentitySet } from '../../../../shared/rpc-contract/browser-identity-params' import { getBrowserIdentityModeStatus, setBrowserIdentityMode diff --git a/src/main/runtime/rpc/methods/browser-profile-rpc-methods.ts b/src/main/runtime/rpc/methods/browser-profile-rpc-methods.ts index 685857dc94f7..d5b8b569a65b 100644 --- a/src/main/runtime/rpc/methods/browser-profile-rpc-methods.ts +++ b/src/main/runtime/rpc/methods/browser-profile-rpc-methods.ts @@ -1,12 +1,12 @@ import { defineMethod } from '../core' +import { ProfileCreate } from '../../../../shared/rpc-contract/browser-identity-params' import { - ProfileCreate, ProfileDelete, ProfileImportFromBrowser, TabProfileClone, TabSetProfile, TabShow -} from './browser-schemas' +} from '../../../../shared/rpc-contract/browser-params' export const BROWSER_PROFILE_METHODS = [ defineMethod({ diff --git a/src/main/runtime/rpc/methods/browser-schemas.ts b/src/main/runtime/rpc/methods/browser-schemas.ts deleted file mode 100644 index 95beade5c5a5..000000000000 --- a/src/main/runtime/rpc/methods/browser-schemas.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Why: browser schemas stay separate from handler registration so both sides -// remain under the line cap and dispatch wiring stays scannable. -export { - Check, - ClipboardWrite, - CookieDelete, - CookieGet, - CookieSet, - DialogAccept, - Drag, - Element, - Eval, - Exec, - Fill, - Find, - FullScreenshot, - Geolocation, - Get, - Goto, - Highlight, - InterceptEnable, - Is, - KeyboardInsert, - Keypress, - LimitParam, - MouseButton, - MouseWheel, - MouseXY, - ProfileDelete, - ProfileImportFromBrowser, - Screencast, - Screenshot, - Scroll, - Select, - SelectorPath, - SetCredentials, - SetDevice, - SetHeaders, - SetMedia, - SetOffline, - StorageKey, - StorageKeyValue, - TabClose, - TabCurrent, - TabList, - TabProfileClone, - TabSetProfile, - TabShow, - TabSwitch, - Type, - Upload, - Viewport, - Wait -} from '../../../../shared/rpc-contract/browser-params' -export { - BrowserIdentitySet, - ProfileCreate -} from '../../../../shared/rpc-contract/browser-identity-params' diff --git a/src/main/runtime/rpc/methods/browser-screencast.ts b/src/main/runtime/rpc/methods/browser-screencast.ts index 5b59ebd629ee..1be2e6e92a5e 100644 --- a/src/main/runtime/rpc/methods/browser-screencast.ts +++ b/src/main/runtime/rpc/methods/browser-screencast.ts @@ -1,5 +1,5 @@ import { defineMethod, defineStreamingMethod } from '../core' -import { Screencast } from './browser-schemas' +import { Screencast } from '../../../../shared/rpc-contract/browser-params' import { BrowserError } from '../../../browser/browser-error' import { BROWSER_UNAVAILABLE_ERROR_CODE } from '../../../../shared/runtime-types' import { runtimeBrowserCommandsFactoryIsAvailable } from '../../runtime-browser-commands-factory' diff --git a/src/main/runtime/rpc/methods/browser-text-rpc-methods.ts b/src/main/runtime/rpc/methods/browser-text-rpc-methods.ts index 91f16ec18696..7f7cfb1249bd 100644 --- a/src/main/runtime/rpc/methods/browser-text-rpc-methods.ts +++ b/src/main/runtime/rpc/methods/browser-text-rpc-methods.ts @@ -1,6 +1,6 @@ import { defineMethod } from '../core' import { assertRpcClipboardTextWriteWithinLimit } from '../rpc-clipboard-text-validation' -import { Fill, KeyboardInsert, Type } from './browser-schemas' +import { Fill, KeyboardInsert, Type } from '../../../../shared/rpc-contract/browser-params' export const BROWSER_TEXT_METHODS = [ defineMethod({ diff --git a/src/main/runtime/rpc/methods/browser.test.ts b/src/main/runtime/rpc/methods/browser.test.ts index 962d2ea1a113..e22f2495ac31 100644 --- a/src/main/runtime/rpc/methods/browser.test.ts +++ b/src/main/runtime/rpc/methods/browser.test.ts @@ -12,7 +12,13 @@ import { import { BROWSER_CORE_METHODS } from './browser-core' import { BROWSER_EXTRA_METHODS } from './browser-extras' import { BROWSER_SCREENCAST_METHODS } from './browser-screencast' -import { ClipboardWrite, Fill, KeyboardInsert, ProfileCreate, Type } from './browser-schemas' +import { + ClipboardWrite, + Fill, + KeyboardInsert, + Type +} from '../../../../shared/rpc-contract/browser-params' +import { ProfileCreate } from '../../../../shared/rpc-contract/browser-identity-params' function makeRequest(method: string, params?: unknown): RpcRequest { return { id: 'req-1', authToken: 'tok', method, params } diff --git a/src/main/runtime/rpc/methods/client-ui-schemas.ts b/src/main/runtime/rpc/methods/client-ui-schemas.ts index f11bd7ca49cd..e079183e6c66 100644 --- a/src/main/runtime/rpc/methods/client-ui-schemas.ts +++ b/src/main/runtime/rpc/methods/client-ui-schemas.ts @@ -1,8 +1,4 @@ import type { UiUpdateFields } from '../../../../shared/rpc-contract/client-ui-params' -export { - FeatureInteractionIdParam, - UiUpdate -} from '../../../../shared/rpc-contract/client-ui-params' // The key/value parity assertions over this live in ui-state-schema-parity-checks.ts. export type UiUpdateFieldsSchema = typeof UiUpdateFields diff --git a/src/main/runtime/rpc/methods/client-ui.ts b/src/main/runtime/rpc/methods/client-ui.ts index 23f84843104a..8cbc3bce1ab7 100644 --- a/src/main/runtime/rpc/methods/client-ui.ts +++ b/src/main/runtime/rpc/methods/client-ui.ts @@ -17,7 +17,10 @@ import { PRBotAuthorOverrideUpdate, SettingsUpdate } from '../../../../shared/rpc-contract/client-settings-params' -import { FeatureInteractionIdParam, UiUpdate } from './client-ui-schemas' +import { + FeatureInteractionIdParam, + UiUpdate +} from '../../../../shared/rpc-contract/client-ui-params' // Type-only side effect: keeps the schema/PersistedUIState parity assertions in // the typecheck graph so drift fails the build instead of a paired client. diff --git a/src/main/runtime/rpc/methods/clipboard.test.ts b/src/main/runtime/rpc/methods/clipboard.test.ts index d68f06dbee07..46576db27ab1 100644 --- a/src/main/runtime/rpc/methods/clipboard.test.ts +++ b/src/main/runtime/rpc/methods/clipboard.test.ts @@ -16,8 +16,8 @@ vi.mock('../../../window/clipboard-image-temp-file', () => ({ saveClipboardImageBufferAsTempFile })) +import { CLIPBOARD_IMAGE_UPLOAD_CHUNK_BASE64_CHARS } from '../../../../shared/rpc-contract/clipboard-params' import { - CLIPBOARD_IMAGE_UPLOAD_CHUNK_BASE64_CHARS, CLIPBOARD_IMAGE_UPLOAD_MAX_CONCURRENT, CLIPBOARD_METHODS, resetClipboardImageUploadsForTest diff --git a/src/main/runtime/rpc/methods/clipboard.ts b/src/main/runtime/rpc/methods/clipboard.ts index 55ba5761c678..f5797ebf966c 100644 --- a/src/main/runtime/rpc/methods/clipboard.ts +++ b/src/main/runtime/rpc/methods/clipboard.ts @@ -10,7 +10,6 @@ import { StartImageUpload } from '../../../../shared/rpc-contract/clipboard-params' import { decodeClipboardImageUpload } from './clipboard-image-upload-decoding' -export { CLIPBOARD_IMAGE_UPLOAD_CHUNK_BASE64_CHARS } from '../../../../shared/rpc-contract/clipboard-params' export const CLIPBOARD_IMAGE_UPLOAD_MAX_CONCURRENT = 8 const CLIPBOARD_IMAGE_UPLOAD_TTL_MS = 5 * 60 * 1000 diff --git a/src/main/runtime/rpc/methods/orchestration-caller-workspace.ts b/src/main/runtime/rpc/methods/orchestration-caller-workspace.ts index a3bbe7f01a38..9d6d496d2e8a 100644 --- a/src/main/runtime/rpc/methods/orchestration-caller-workspace.ts +++ b/src/main/runtime/rpc/methods/orchestration-caller-workspace.ts @@ -15,7 +15,7 @@ import type { OrcaRuntimeService } from '../../orca-runtime' import type { OrchestrationSessionCaller } from '../../orchestration/orchestration-caller-identity' -import { isStructuredWorkerHandle } from '../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../shared/structured-worker-handle' export async function resolveDispatchCallerWorktreeId( runtime: Pick, diff --git a/src/main/runtime/rpc/methods/orchestration/federation/federated-worker-release-host.ts b/src/main/runtime/rpc/methods/orchestration/federation/federated-worker-release-host.ts index 918d4ef14f13..5557bab695f3 100644 --- a/src/main/runtime/rpc/methods/orchestration/federation/federated-worker-release-host.ts +++ b/src/main/runtime/rpc/methods/orchestration/federation/federated-worker-release-host.ts @@ -10,8 +10,8 @@ import { } from '../../../../orchestration/worker-output-archive' import type { WorkerTerminalReleaseRuntime } from '../../../../orchestration/worker-terminal-release-runtime' import { readArchivedWorkerOutput } from '../worker/worker-archive-read' +import { archiveSummary } from '../worker/worker-terminal-resource-presentation' import { - archiveSummary, releaseUnknownRecovery, type WorkerReleaseReceipt } from '../worker/worker-release-completion' diff --git a/src/main/runtime/rpc/methods/orchestration/federation/federation-attachment-observation.ts b/src/main/runtime/rpc/methods/orchestration/federation/federation-attachment-observation.ts index 5a09137782e5..da7beb0bb7fd 100644 --- a/src/main/runtime/rpc/methods/orchestration/federation/federation-attachment-observation.ts +++ b/src/main/runtime/rpc/methods/orchestration/federation/federation-attachment-observation.ts @@ -1,7 +1,7 @@ import type { RuntimeTerminalInteractiveWait } from '../../../../../../shared/runtime-types' import type { WorkerTerminalReleaseRuntime } from '../../../../orchestration/worker-terminal-release-runtime' import { OrchestrationError } from '../../../../orchestration/orchestration-error' -import { parseWorkerTerminalHostScope } from '../../../../orchestration/worker-terminal-process-liveness' +import { parseWorkerTerminalHostScope } from '../../../../../../shared/worker-terminal-host-scope' import type { RemoteDispatchAttachmentRow } from '../../../../orchestration/types' import { orchestrationTimestampToMs } from '../worker/worker-output' diff --git a/src/main/runtime/rpc/methods/orchestration/messaging/message-methods.ts b/src/main/runtime/rpc/methods/orchestration/messaging/message-methods.ts index 507fef56b2fd..f8dd5776fa68 100644 --- a/src/main/runtime/rpc/methods/orchestration/messaging/message-methods.ts +++ b/src/main/runtime/rpc/methods/orchestration/messaging/message-methods.ts @@ -8,7 +8,7 @@ import { orchestrationCallerIdentity, resolveRunScope } from '../runs/run-scope' import { readMutationReplayNudge, stripMutationReplayNudge -} from '../../../orchestration-mutation-executor' +} from '../../../orchestration-mutation-receipt' import { exposeMessage } from './mailbox-message-receipt' import { resolveOrchestrationParty } from '../../../../orchestration/orchestration-party' import { recordReceiptBeforeNudge, replayMutationNudge } from './mutation-replay-nudge' diff --git a/src/main/runtime/rpc/methods/orchestration/messaging/send-methods.ts b/src/main/runtime/rpc/methods/orchestration/messaging/send-methods.ts index 35ca12372278..d10ad61ae4dd 100644 --- a/src/main/runtime/rpc/methods/orchestration/messaging/send-methods.ts +++ b/src/main/runtime/rpc/methods/orchestration/messaging/send-methods.ts @@ -19,7 +19,7 @@ import { readMutationReplayNudge, readWorkerDoneReplayNudge, stripMutationReplayNudge -} from '../../../orchestration-mutation-executor' +} from '../../../orchestration-mutation-receipt' import { replayMutationNudge } from './mutation-replay-nudge' import { sendRemoteMessage } from './send-remote' import { mayNameSession } from './session-recipient' diff --git a/src/main/runtime/rpc/methods/orchestration/worker/explicit-worker-terminal-validation.ts b/src/main/runtime/rpc/methods/orchestration/worker/explicit-worker-terminal-validation.ts index a3ee27827f5b..d49487461400 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/explicit-worker-terminal-validation.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/explicit-worker-terminal-validation.ts @@ -1,6 +1,6 @@ import type { OrcaRuntimeService } from '../../../../orca-runtime' import { OrchestrationError } from '../../../../orchestration/orchestration-error' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' import type { OrchestrationCallerIdentity } from '../../../../orchestration/orchestration-caller-identity' import type { OrchestrationDb } from '../../../../orchestration/db' import type { OrcaSessionId } from '../../../../../../shared/orca-session-address' diff --git a/src/main/runtime/rpc/methods/orchestration/worker/retried-worker-terminal-release.ts b/src/main/runtime/rpc/methods/orchestration/worker/retried-worker-terminal-release.ts index a8f21eea3670..4f8c5af4f420 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/retried-worker-terminal-release.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/retried-worker-terminal-release.ts @@ -1,6 +1,6 @@ import type { OrcaRuntimeService } from '../../../../orca-runtime' import type { OrchestrationDb } from '../../../../orchestration/db' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' import { completeWorkerTerminalRelease } from './worker-release-completion' /** diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-control.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-control.ts index 7482f573cccd..c9d7ff3231b6 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-control.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-control.ts @@ -15,7 +15,7 @@ import { readStructuredWorkerOutput } from '../../orchestration-structured-worke import { releaseStructuredWorkerSession } from '../../orchestration-structured-worker-session' import { sessionIdFromStructuredWorkerIncarnation } from '../../../../structured-worker-identity' import { readExactWorkerOutput } from './worker-output' -import { exposeWorkerTerminalResource } from './worker-release-completion' +import { exposeWorkerTerminalResource } from './worker-terminal-resource-presentation' import { readFederatedWorkerOutput } from '../federation/federated-worker-read' import { showFederatedWorker } from '../federation/federated-worker-show' import { diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.ts index f79094d8d868..395ee332be90 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.ts @@ -9,7 +9,7 @@ import { resolveFederatedWorkerLaunchReceipt, resolveWorkerLaunchPreferences } from './worker-launch-preferences' -import { WorkerStartParams } from './worker-start-schema' +import { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' describe('orchestration worker launch preferences', () => { it('passes a discovered OMP model through the existing launch arguments and receipt', () => { diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts index 3520ae7e0499..bc30a0a667cc 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-list-method.ts @@ -22,7 +22,7 @@ import { } from './worker-list-snapshot-store' import { projectWorkerFleet, type WorkerListPageParams } from './worker-list-projection' import { chatAssigneeObserver } from './session-worker-observation' -import { exposeWorkerTerminalResource } from './worker-release-completion' +import { exposeWorkerTerminalResource } from './worker-terminal-resource-presentation' import { WORKER_TERMINAL_LIST_STATES, WorkerListParams diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-observation.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-observation.ts index dd3c253fc4ce..791f469a383d 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-observation.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-observation.ts @@ -2,7 +2,7 @@ import type { RuntimeTerminalInteractiveWait } from '../../../../../../shared/ru import type { WorkerTerminalReleaseRuntime } from '../../../../orchestration/worker-terminal-release-runtime' import type { OrchestrationDb } from '../../../../orchestration/db' import { OrchestrationError } from '../../../../orchestration/orchestration-error' -import { parseWorkerTerminalHostScope } from '../../../../orchestration/worker-terminal-process-liveness' +import { parseWorkerTerminalHostScope } from '../../../../../../shared/worker-terminal-host-scope' import type { OrchestrationFleetWorker } from '../../../../../../shared/orchestration-fleet-projection' import { projectWorkerFleet } from './worker-list-projection' import { observeChatAssignee } from '../../../../orchestration/chat-assignee' diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-release-completion.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-release-completion.ts index aaa3cfb1bac7..324824b22ba3 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-release-completion.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-release-completion.ts @@ -15,14 +15,9 @@ import { classifyWorkerTerminalCloseError } from './worker-release-close-error' import { workerTerminalLeaseIsCurrent } from './worker-terminal-release-lease' import { resolveStructuredWorkerForDispatch } from '../../orchestration-structured-worker-lifecycle' import { stopStructuredWorkerForRelease } from './structured-worker-release-stop' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' import { captureWorkerReleaseArchive } from './worker-release-archive-capture' -export { - archiveSummary, - exposeWorkerTerminalResource -} from './worker-terminal-resource-presentation' - export type WorkerReleaseReceipt = { dispatchId: string state: 'released' | 'already_released' | 'retained' | 'release_pending' | 'release_unknown' diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-release.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-release.ts index b0f08dffea3b..e2f852fbf3b6 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-release.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-release.ts @@ -3,8 +3,8 @@ import { defineMethod } from '../../../core' import { releaseFederatedWorker } from '../federation/federated-worker-release' import { ORCHESTRATION_WORKER_LIST_METHOD } from './worker-list-method' import { resolvePinnedFederatedServer } from './worker-observation' +import { archiveSummary } from './worker-terminal-resource-presentation' import { - archiveSummary, completeWorkerTerminalRelease, type WorkerReleaseReceipt } from './worker-release-completion' diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-agent-placement-teardown.test.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-agent-placement-teardown.test.ts index 65ed0403d73a..978c4dfdd9d0 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-agent-placement-teardown.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-agent-placement-teardown.test.ts @@ -11,7 +11,7 @@ import type { OrcaRuntimeService } from '../../../../orca-runtime' import type { OrchestrationDb } from '../../../../orchestration/db' import type * as StructuredWorkerSessionModule from '../../orchestration-structured-worker-session' import { structuredWorkerIdentities } from '../../../../structured-worker-identity' -import { WorkerStartParams } from './worker-start-schema' +import { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' const discard = vi.hoisted(() => vi.fn(async (_sessionId: string) => {})) const surfaced = vi.hoisted((): { sessionId: string | null } => ({ sessionId: null })) diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-launch-executor-parity.test.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-launch-executor-parity.test.ts index 5b534d8b0230..2e4b47b08fba 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-launch-executor-parity.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-launch-executor-parity.test.ts @@ -15,7 +15,7 @@ import type { OrchestrationDb } from '../../../../orchestration/db' import { WORKER_START_VOCABULARY } from '../../orchestration-worker-start-mode' import { structuredWorkerIdentities } from '../../../../structured-worker-identity' import type { WorkerEffect } from './worker-topology' -import { WorkerStartParams } from './worker-start-schema' +import { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' const sessionCreate = vi.hoisted((): { refusal: { code: string } | null } => ({ refusal: null })) diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-receipt.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-receipt.ts index e7d6b0d31edd..8f27496c68b8 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-receipt.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-receipt.ts @@ -2,7 +2,7 @@ import type { OrchestrationDb } from '../../../../orchestration/db' import { isUnknownWorkerStartOutcome, type WorkerSetupReceipt } from './worker-topology' import type { OrchestrationWorkerLaunchReceipt } from './worker-launch-preferences' import type { WorkerStartModeReceipt } from '../../orchestration-worker-start-mode' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' export function failWorkerStartWithReceipt(args: { db: OrchestrationDb diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-schema.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-schema.ts index b0f5328801d6..105d46e90f6c 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-start-schema.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-start-schema.ts @@ -1,6 +1,4 @@ import type { z } from 'zod' -import { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' -export { OptionalWorkerLaunchPreference } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' -export { WorkerStartParams } +import type { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' export type WorkerStartInput = z.infer diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-stop.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-stop.ts index dbb94c2726f6..c0f1fde7e02c 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-stop.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-stop.ts @@ -9,7 +9,7 @@ import { resolveStructuredWorkerForDispatch, stopStructuredWorker } from '../../orchestration-structured-worker-lifecycle' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' import { WorkerDispatchParams } from '../../../../../../shared/rpc-contract/orchestration-worker-stop-params' export const ORCHESTRATION_WORKER_STOP_METHODS = [ diff --git a/src/main/runtime/rpc/methods/orchestration/worker/worker-terminal-release-lease.ts b/src/main/runtime/rpc/methods/orchestration/worker/worker-terminal-release-lease.ts index 104aca91560d..dbcc05aa36af 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/worker-terminal-release-lease.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/worker-terminal-release-lease.ts @@ -3,7 +3,7 @@ import type { OrchestrationDb } from '../../../../orchestration/db' import type { WorkerTerminalResourceRow } from '../../../../orchestration/worker-terminal-ownership' import type { WorkerDispatchRow } from '../../../../orchestration/types' import { resolveStructuredWorkerIdentity } from '../../../../structured-worker-authority' -import { isStructuredWorkerHandle } from '../../../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../../../shared/structured-worker-handle' export function workerTerminalLeaseIsCurrent( runtime: WorkerTerminalReleaseRuntime, diff --git a/src/main/runtime/rpc/methods/orchestration/worker/workers.ts b/src/main/runtime/rpc/methods/orchestration/worker/workers.ts index 3d6a2b24a5a4..64d2b14e1bdd 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/workers.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/workers.ts @@ -7,7 +7,7 @@ import { readWorkerStartModeSettings } from '../../orchestration-worker-start-mode' import { resolveOrchestrationCaller } from '../runs/run-scope' -import { WorkerStartParams } from './worker-start-schema' +import { WorkerStartParams } from '../../../../../../shared/rpc-contract/orchestration-worker-start-params' import { isWorkerStartTimeoutWithinTimerLimit, resolveWorkerStartReadinessTimeoutMs diff --git a/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.test.ts b/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.test.ts index e69da50f3618..951cb5da796d 100644 --- a/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.test.ts +++ b/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' -import { UiUpdate } from './client-ui-schemas' -import { WorkspaceCleanup } from './workspace-cleanup-ui-schema' +import { UiUpdate } from '../../../../shared/rpc-contract/client-ui-params' +import { WorkspaceCleanup } from '../../../../shared/rpc-contract/workspace-cleanup-ui-params' import { createDefaultWorkspaceCleanupBrowseState } from '../../../../shared/workspace-cleanup-browse-state' const DISMISSAL = { diff --git a/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.ts b/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.ts deleted file mode 100644 index 11e6cab4ee36..000000000000 --- a/src/main/runtime/rpc/methods/workspace-cleanup-ui-schema.ts +++ /dev/null @@ -1 +0,0 @@ -export { WorkspaceCleanup } from '../../../../shared/rpc-contract/workspace-cleanup-ui-params' diff --git a/src/main/runtime/rpc/mobile-auth-acl-critical-path.test.ts b/src/main/runtime/rpc/mobile-auth-acl-critical-path.test.ts index c0d53a0796e9..8af9227695e3 100644 --- a/src/main/runtime/rpc/mobile-auth-acl-critical-path.test.ts +++ b/src/main/runtime/rpc/mobile-auth-acl-critical-path.test.ts @@ -16,7 +16,7 @@ import { import { createFakeWindowsSecurity } from '../../../shared/windows-security-addon.test-fixture' import { DEVICE_REGISTRY_FILENAME } from '../mobile-pairing-files' import { DeviceRegistry, type DeviceEntry } from '../device-registry' -import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from './e2ee-crypto' +import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from '../../../shared/e2ee-crypto' import { MobileSocketWiring, type MobileSocketTransport } from './mobile-socket-wiring' vi.mock('@orca/process-host', () => ({ diff --git a/src/main/runtime/rpc/mobile-e2ee-auth-validation.ts b/src/main/runtime/rpc/mobile-e2ee-auth-validation.ts index 18e15fa62810..506319e199ee 100644 --- a/src/main/runtime/rpc/mobile-e2ee-auth-validation.ts +++ b/src/main/runtime/rpc/mobile-e2ee-auth-validation.ts @@ -1,5 +1,5 @@ import type { DesktopMobileE2EEV2Session } from './mobile-e2ee-v2-desktop-session' -import { publicKeyFromBase64 } from './e2ee-crypto' +import { publicKeyFromBase64 } from '../../../shared/e2ee-crypto' import { parseRemoteRuntimeJsonText } from '../../../shared/remote-runtime-request-frames' import { isDeviceProofB64, verifyDeviceProof } from '../../../shared/device-key-proof' diff --git a/src/main/runtime/rpc/mobile-e2ee-desktop-outbound-owner.ts b/src/main/runtime/rpc/mobile-e2ee-desktop-outbound-owner.ts index ee076381f438..bfe85f68cae2 100644 --- a/src/main/runtime/rpc/mobile-e2ee-desktop-outbound-owner.ts +++ b/src/main/runtime/rpc/mobile-e2ee-desktop-outbound-owner.ts @@ -1,7 +1,7 @@ import type { WebSocket } from 'ws' import type { WsOutboundBackpressureQueue } from '../../../shared/ws-outbound-backpressure-queue' import { createLegacyMobileE2EEReplyQueue } from './mobile-e2ee-outbound-admission' -import { encryptBytes } from './e2ee-crypto' +import { encryptBytes } from '../../../shared/e2ee-crypto' import { createDesktopMobileE2EEV2OutboundQueue, desktopMobileE2EEV2OutboundItemBytes, diff --git a/src/main/runtime/rpc/mobile-e2ee-legacy-reply-senders.ts b/src/main/runtime/rpc/mobile-e2ee-legacy-reply-senders.ts index 629ea9ce6373..65d56c496bdf 100644 --- a/src/main/runtime/rpc/mobile-e2ee-legacy-reply-senders.ts +++ b/src/main/runtime/rpc/mobile-e2ee-legacy-reply-senders.ts @@ -1,5 +1,5 @@ import type { WebSocket } from 'ws' -import { encrypt } from './e2ee-crypto' +import { encrypt } from '../../../shared/e2ee-crypto' import type { MobileE2EEDesktopOutboundOwner } from './mobile-e2ee-desktop-outbound-owner' import { isMobileE2EEBinaryPayloadWithinLimit, diff --git a/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.test.ts b/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.test.ts index 94c5c11d767c..fc6c85d060c7 100644 --- a/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.test.ts +++ b/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from 'vitest' import nacl from 'tweetnacl' -import { deriveSharedKey } from './e2ee-crypto' +import { deriveSharedKey } from '../../../shared/e2ee-crypto' import { deriveMobileE2EEV2KeySchedule } from '../../../shared/mobile-e2ee-v2-node-key-schedule' import { encodeMobileE2EEV2Transcript, diff --git a/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.ts b/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.ts index 093653a1afce..5a9ef6b10754 100644 --- a/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.ts +++ b/src/main/runtime/rpc/mobile-e2ee-v2-desktop-session.ts @@ -10,7 +10,7 @@ import { openMobileE2EEV2Frame, sealMobileE2EEV2Frame } from '../../../shared/mobile-e2ee-v2-framing' -import { deriveSharedKey } from './e2ee-crypto' +import { deriveSharedKey } from '../../../shared/e2ee-crypto' import { deriveMobileE2EEV2KeySchedule } from '../../../shared/mobile-e2ee-v2-node-key-schedule' import { REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES } from '../../../shared/remote-runtime-memory-limits' diff --git a/src/main/runtime/rpc/mobile-socket-wiring.test.ts b/src/main/runtime/rpc/mobile-socket-wiring.test.ts index beeda8df4c97..08580eb8d856 100644 --- a/src/main/runtime/rpc/mobile-socket-wiring.test.ts +++ b/src/main/runtime/rpc/mobile-socket-wiring.test.ts @@ -9,7 +9,7 @@ import { } from '../../../shared/mobile-e2ee-v2-contract' import { sealMobileE2EEV2Frame } from '../../../shared/mobile-e2ee-v2-framing' import type { DeviceRegistry } from '../device-registry' -import { deriveSharedKey, encrypt, generateKeyPair } from './e2ee-crypto' +import { deriveSharedKey, encrypt, generateKeyPair } from '../../../shared/e2ee-crypto' import { deriveMobileE2EEV2KeySchedule } from '../../../shared/mobile-e2ee-v2-node-key-schedule' import { MobileSocketWiring, diff --git a/src/main/runtime/rpc/orchestration-mutation-executor.ts b/src/main/runtime/rpc/orchestration-mutation-executor.ts index 7db0c9f47d8d..479eff72422b 100644 --- a/src/main/runtime/rpc/orchestration-mutation-executor.ts +++ b/src/main/runtime/rpc/orchestration-mutation-executor.ts @@ -19,12 +19,6 @@ import { shouldObserveCompletedMutation } from './orchestration-mutation-receipt' -export { - readMutationReplayNudge, - readWorkerDoneReplayNudge, - stripMutationReplayNudge -} from './orchestration-mutation-receipt' - export type DurableMutationInvocation = { identity: { callerFingerprint: string diff --git a/src/main/runtime/rpc/schemas.test.ts b/src/main/runtime/rpc/schemas.test.ts index 8de0752434f6..207cec8a2817 100644 --- a/src/main/runtime/rpc/schemas.test.ts +++ b/src/main/runtime/rpc/schemas.test.ts @@ -15,7 +15,7 @@ import { TabClose, TabSwitch, Wait -} from './methods/browser-schemas' +} from '../../../shared/rpc-contract/browser-params' import { TERMINAL_METHODS } from './methods/terminal' import { TERMINAL_ORPHAN_METHODS } from './methods/terminal-orphan' import { WORKTREE_METHODS } from './methods/worktree' diff --git a/src/main/runtime/rpc/web-session-pairing.test.ts b/src/main/runtime/rpc/web-session-pairing.test.ts index 7491a7ab3ead..af4215c3ab28 100644 --- a/src/main/runtime/rpc/web-session-pairing.test.ts +++ b/src/main/runtime/rpc/web-session-pairing.test.ts @@ -9,7 +9,7 @@ import { DeviceRegistry } from '../device-registry' import { EPHEMERAL_DEVICE_IDLE_MS } from '../ephemeral-device-rows' import { SimulatedMobileE2EEV2Peer } from '../mobile-cloud-relay/simulated-mobile-e2ee-v2-peer' import { registerSocketDeviceKey } from '../runtime-rpc/runtime-rpc-device-key-registration' -import { generateKeyPair } from './e2ee-crypto' +import { generateKeyPair } from '../../../shared/e2ee-crypto' import { MobileSocketWiring, type AuthenticatedMobileSocket, diff --git a/src/main/runtime/runtime-git-execution-host-ownership.test.ts b/src/main/runtime/runtime-git-execution-host-ownership.test.ts index b9818313bc65..0dc58b7a5800 100644 --- a/src/main/runtime/runtime-git-execution-host-ownership.test.ts +++ b/src/main/runtime/runtime-git-execution-host-ownership.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import type { GlobalSettings } from '../../shared/global-settings-types' import type * as GitRemoteModule from '../git/remote' import type * as GitStatusModule from '../git/status' -import type { ResolvedRuntimeGitWorktree } from './orca-runtime-git' +import type { ResolvedRuntimeGitWorktree } from './runtime-git-command-target' import { RuntimeGitCommands } from './orca-runtime-git' import { SSH_HOST_NOT_SERVED_MESSAGE } from '../providers/ssh-host-not-served-error' diff --git a/src/main/runtime/runtime-mobile-notification-controller.ts b/src/main/runtime/runtime-mobile-notification-controller.ts index 605b38a9f49a..90792771dbea 100644 --- a/src/main/runtime/runtime-mobile-notification-controller.ts +++ b/src/main/runtime/runtime-mobile-notification-controller.ts @@ -15,10 +15,8 @@ import type { import { MobileNotificationReplayBuffer } from './mobile-notification-replay' import { notifyRuntimeListeners } from './runtime-async-boundaries' import { getRuntimeDesktopSurface } from './runtime-desktop-surface' -import { - MobileNotificationDismissalStore, - type DeliveredNotificationIdentity -} from './mobile-notification-dismissal-store' +import { MobileNotificationDismissalStore } from './mobile-notification-dismissal-store' +import type { DeliveredNotificationIdentity } from '../../shared/mobile-notification-identity' export type MobileNotificationDispatchEvent = { type: 'notification' diff --git a/src/main/runtime/runtime-mobile-session-result-finalization.ts b/src/main/runtime/runtime-mobile-session-result-finalization.ts index 1848ae567935..29a336bdaf46 100644 --- a/src/main/runtime/runtime-mobile-session-result-finalization.ts +++ b/src/main/runtime/runtime-mobile-session-result-finalization.ts @@ -1,5 +1,5 @@ import type { RuntimeMobileSessionTabsResult } from '../../shared/runtime-types' -import { dropRetirementProofsForLiveSurfaces } from './mobile-session-terminal-retirement-proof' +import { dropRetirementProofsForLiveSurfaces } from '../../shared/terminal-retirement-proof-ledger' import type { RuntimeMobileSessionProjectionHost, RuntimeMobileSessionProjectionInput diff --git a/src/main/runtime/runtime-rpc-browser-host-admission.test.ts b/src/main/runtime/runtime-rpc-browser-host-admission.test.ts index 93f2b63fe63c..a5c9a6703ed3 100644 --- a/src/main/runtime/runtime-rpc-browser-host-admission.test.ts +++ b/src/main/runtime/runtime-rpc-browser-host-admission.test.ts @@ -8,7 +8,8 @@ import type { WebSocket } from 'ws' import { DeviceRegistry } from './device-registry' import { OrcaRuntimeService } from './orca-runtime' import { defineStreamingMethod, type RpcRequest } from './rpc/core' -import { classifyRuntimeLongPoll, OrcaRuntimeRpcServer } from './runtime-rpc' +import { classifyRuntimeLongPoll } from './runtime-rpc/runtime-rpc-long-poll' +import { OrcaRuntimeRpcServer } from './runtime-rpc' import { withCurrentOrchestrationContract } from './runtime-rpc-test-harness' const request = (method: string, params?: unknown): RpcRequest => ({ diff --git a/src/main/runtime/runtime-rpc-device-revocation.test.ts b/src/main/runtime/runtime-rpc-device-revocation.test.ts index bde1ec7f697d..af3d342a2300 100644 --- a/src/main/runtime/runtime-rpc-device-revocation.test.ts +++ b/src/main/runtime/runtime-rpc-device-revocation.test.ts @@ -5,7 +5,7 @@ import { describe, expect, it, vi } from 'vitest' import { OrcaRuntimeService } from './orca-runtime' import { OrcaRuntimeRpcServer } from './runtime-rpc' import { parsePairingCode } from '../../shared/pairing' -import { generateKeyPair } from './rpc/e2ee-crypto' +import { generateKeyPair } from '../../shared/e2ee-crypto' import { waitFor } from './runtime-rpc-test-harness' import { connectWs, diff --git a/src/main/runtime/runtime-rpc-dispatch-inject-long-poll.test.ts b/src/main/runtime/runtime-rpc-dispatch-inject-long-poll.test.ts index e609ef178a69..a3583cb7df0e 100644 --- a/src/main/runtime/runtime-rpc-dispatch-inject-long-poll.test.ts +++ b/src/main/runtime/runtime-rpc-dispatch-inject-long-poll.test.ts @@ -4,7 +4,8 @@ import { join } from 'node:path' import { describe, expect, it, vi } from 'vitest' import { OrcaRuntimeService } from './orca-runtime' import { readRuntimeMetadata } from './runtime-metadata' -import { classifyRuntimeLongPoll, OrcaRuntimeRpcServer } from './runtime-rpc' +import { classifyRuntimeLongPoll } from './runtime-rpc/runtime-rpc-long-poll' +import { OrcaRuntimeRpcServer } from './runtime-rpc' import { openFramedSession, sleep } from './runtime-rpc-test-harness' // `dispatch --inject` into a chat waits for its agent to accept the turn, which can outlast the diff --git a/src/main/runtime/runtime-rpc-long-poll-transport.test.ts b/src/main/runtime/runtime-rpc-long-poll-transport.test.ts index 5ea6035caab8..3451b8f99bf6 100644 --- a/src/main/runtime/runtime-rpc-long-poll-transport.test.ts +++ b/src/main/runtime/runtime-rpc-long-poll-transport.test.ts @@ -7,7 +7,7 @@ import { describe, expect, it, vi } from 'vitest' import { OrcaRuntimeService } from './orca-runtime' import { OrchestrationDb } from './orchestration/db' import { readRuntimeMetadata } from './runtime-metadata' -import { classifyRuntimeLongPoll } from './runtime-rpc' +import { classifyRuntimeLongPoll } from './runtime-rpc/runtime-rpc-long-poll' import { createLongPollServer as createServer } from './runtime-rpc-long-poll-server.test-fixture' import { sendRequest, diff --git a/src/main/runtime/runtime-rpc-metadata-lifecycle.test.ts b/src/main/runtime/runtime-rpc-metadata-lifecycle.test.ts index ac8ceb112fe4..728a55032c02 100644 --- a/src/main/runtime/runtime-rpc-metadata-lifecycle.test.ts +++ b/src/main/runtime/runtime-rpc-metadata-lifecycle.test.ts @@ -6,7 +6,8 @@ import { describe, expect, it, vi } from 'vitest' import { OrcaRuntimeService } from './orca-runtime' import * as runtimeMetadataModule from './runtime-metadata' import { readRuntimeMetadata, writeRuntimeMetadata } from './runtime-metadata' -import { createRuntimeTransportMetadata, OrcaRuntimeRpcServer } from './runtime-rpc' +import { createRuntimeTransportMetadata } from './runtime-rpc/runtime-rpc-socket-metadata' +import { OrcaRuntimeRpcServer } from './runtime-rpc' import type { DeviceRegistry } from './device-registry' import type { RuntimeMetadata } from '../../shared/runtime-bootstrap' diff --git a/src/main/runtime/runtime-rpc-mobile-ws-test-harness.ts b/src/main/runtime/runtime-rpc-mobile-ws-test-harness.ts index f32a181f79a6..61c630d991f5 100644 --- a/src/main/runtime/runtime-rpc-mobile-ws-test-harness.ts +++ b/src/main/runtime/runtime-rpc-mobile-ws-test-harness.ts @@ -1,7 +1,7 @@ import { expect } from 'vitest' import WebSocket from 'ws' import { parsePairingCode } from '../../shared/pairing' -import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from './rpc/e2ee-crypto' +import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from '../../shared/e2ee-crypto' export function connectWs(endpoint: string): Promise { return new Promise((resolve, reject) => { diff --git a/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts b/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts index dac8287d3548..569951e10d66 100644 --- a/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts +++ b/src/main/runtime/runtime-rpc-websocket-reply-size-limit.test.ts @@ -9,7 +9,7 @@ import { OrcaRuntimeRpcServer } from './runtime-rpc' import { DeviceRegistry } from './device-registry' import { FILE_METHODS } from './rpc/methods/files' import { E2EEChannel } from './rpc/e2ee-channel' -import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from './rpc/e2ee-crypto' +import { decrypt, deriveSharedKey, encrypt, generateKeyPair } from '../../shared/e2ee-crypto' import { REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES } from '../../shared/remote-runtime-memory-limits' import type { DirEntry } from '../../shared/filesystem-entry-types' import { RUNTIME_RPC_REPLY_TOO_LARGE_CODE } from './runtime-rpc/runtime-rpc-reply-size-limit' diff --git a/src/main/runtime/runtime-rpc.ts b/src/main/runtime/runtime-rpc.ts index e7450ff57203..fbfb1a5ee32f 100644 --- a/src/main/runtime/runtime-rpc.ts +++ b/src/main/runtime/runtime-rpc.ts @@ -2,22 +2,8 @@ import { RuntimeRpcShutdown } from './runtime-rpc/runtime-rpc-shutdown' import type { OrcaRuntimeRpcServerOptions } from './runtime-rpc/runtime-rpc-pairing-types' -export type { - PairingOfferUnavailableReason, - PairingOfferUnavailable -} from './runtime-rpc/runtime-rpc-pairing-types' -export type { MobilePairingConnectionContext } from './runtime-rpc/runtime-rpc-pairing-types' -export type { RuntimeLongPollClass } from './runtime-rpc/runtime-rpc-long-poll' -export { classifyRuntimeLongPoll } from './runtime-rpc/runtime-rpc-long-poll' - export class OrcaRuntimeRpcServer extends RuntimeRpcShutdown { constructor(options: OrcaRuntimeRpcServerOptions) { super(options) } } - -export { - RUNTIME_SOCKET_NAME_REGEX, - sweepOrphanedRuntimeSockets, - createRuntimeTransportMetadata -} from './runtime-rpc/runtime-rpc-socket-metadata' diff --git a/src/main/runtime/runtime-skill-command-contract.ts b/src/main/runtime/runtime-skill-command-contract.ts index a1a00b26e2b5..063e2c82dbd3 100644 --- a/src/main/runtime/runtime-skill-command-contract.ts +++ b/src/main/runtime/runtime-skill-command-contract.ts @@ -24,16 +24,18 @@ import type { SkillCloudPackageDetails, SkillCloudPublishRequest, SkillCloudPublishResult, - SkillCloudService, - SkillCloudVersion, + SkillCloudVersion +} from '../../shared/skill-cloud-contract' +import type { SkillCloudService } from '../skills/skill-cloud-service' +import type { ManagedSkillInstall, SkillInstallPreview, SkillInstallPreviewRequest, SkillInstallRequest, SkillInstallResult, - SkillProviderRootOverrides, SkillRemoveRequest -} from './runtime-skill-types' +} from '../../shared/skill-install-contract' +import type { SkillProviderRootOverrides } from '../skills/skill-provider-destinations' export type RuntimeSkillCommandSurface = { setSkillCloudService(service: SkillCloudService): void assertAgentSkillSharingAllowed(): void diff --git a/src/main/runtime/runtime-skill-command-surface.ts b/src/main/runtime/runtime-skill-command-surface.ts index 03e97a942d32..b8541270c95b 100644 --- a/src/main/runtime/runtime-skill-command-surface.ts +++ b/src/main/runtime/runtime-skill-command-surface.ts @@ -20,16 +20,8 @@ import type { RuntimeSkillCommandSurface, RuntimeSkillCommandHost } from './runtime-skill-command-contract' -import type { - SkillCloudOptions, - SkillCloudPublishRequest, - SkillCloudService -} from './runtime-skill-types' -export type { - RuntimeSkillCommandSurface, - RuntimeSkillCommandHost -} from './runtime-skill-command-contract' -export { installRuntimeSkillCommandSurface } from './runtime-skill-command-contract' +import type { SkillCloudOptions, SkillCloudPublishRequest } from '../../shared/skill-cloud-contract' +import type { SkillCloudService } from '../skills/skill-cloud-service' export class RuntimeSkillCommands extends RuntimeSkillInstallQueries diff --git a/src/main/runtime/runtime-skill-install-authority.ts b/src/main/runtime/runtime-skill-install-authority.ts index 3c040b4079b4..8eab22d2dca8 100644 --- a/src/main/runtime/runtime-skill-install-authority.ts +++ b/src/main/runtime/runtime-skill-install-authority.ts @@ -16,8 +16,9 @@ import { resolveWslSkillProviderRoots, withClaudeSkillProviderRoot } from '../skills/skill-provider-runtime-roots' -import type { SkillInstallRequest, SkillProviderRootOverrides } from './runtime-skill-types' -import type { RuntimeSkillCommandHost } from './runtime-skill-command-surface' +import type { SkillInstallRequest } from '../../shared/skill-install-contract' +import type { SkillProviderRootOverrides } from '../skills/skill-provider-destinations' +import type { RuntimeSkillCommandHost } from './runtime-skill-command-contract' /** Whether the destination lives on an SSH target; a workspace that cannot be placed throws. */ export async function isSkillSshDestination( diff --git a/src/main/runtime/runtime-skill-install-commands.ts b/src/main/runtime/runtime-skill-install-commands.ts index b8060eedcc7d..e09ade4a292f 100644 --- a/src/main/runtime/runtime-skill-install-commands.ts +++ b/src/main/runtime/runtime-skill-install-commands.ts @@ -9,8 +9,8 @@ import type { SkillBundleInstallRequest, SkillBundleInstallResult } from '../../shared/skill-bundle-install-contract' -import type { SkillInstallRequest, SkillInstallResult } from './runtime-skill-types' -import type { RuntimeSkillCommandHost } from './runtime-skill-command-surface' +import type { SkillInstallRequest, SkillInstallResult } from '../../shared/skill-install-contract' +import type { RuntimeSkillCommandHost } from './runtime-skill-command-contract' import { createSkillInstallAuthority, folderExecutionHostId, diff --git a/src/main/runtime/runtime-skill-install-queries.ts b/src/main/runtime/runtime-skill-install-queries.ts index 873815556745..bc6028553095 100644 --- a/src/main/runtime/runtime-skill-install-queries.ts +++ b/src/main/runtime/runtime-skill-install-queries.ts @@ -10,15 +10,17 @@ import { removeSharedSkillInstall } from '../skills/skill-install-management-service' import { toLinuxPath } from '../wsl' +import type { SkillBundleInstallPreviewRequest } from '../../shared/skill-bundle-install-contract' import type { - SkillBundleInstallPreviewRequest, SkillInstallPreviewRequest, SkillInstallRequest, SkillRemoveRequest, - ManagedSkillInstall, + ManagedSkillInstall +} from '../../shared/skill-install-contract' +import type { SkillUploadBeginRequest, SkillUploadChunkRequest -} from './runtime-skill-types' +} from '../../shared/skill-upload-session-contract' import { RuntimeSkillInstallCommands, SKILL_SSH_UNAVAILABLE diff --git a/src/main/runtime/runtime-skill-types.ts b/src/main/runtime/runtime-skill-types.ts deleted file mode 100644 index 25ab1ff382be..000000000000 --- a/src/main/runtime/runtime-skill-types.ts +++ /dev/null @@ -1,30 +0,0 @@ -export type { - SkillCloudDownloadGrant, - SkillCloudOperation, - SkillCloudOptions, - SkillCloudPackageDetails, - SkillCloudPublishRequest, - SkillCloudPublishResult, - SkillCloudVersion -} from '../../shared/skill-cloud-contract' -export type { SkillCloudService } from '../skills/skill-cloud-service' -export type { - ManagedSkillInstall, - SkillInstallPreview, - SkillInstallPreviewRequest, - SkillInstallRequest, - SkillInstallResult, - SkillRemoveRequest -} from '../../shared/skill-install-contract' -export type { - SkillBundleInstallPreview, - SkillBundleInstallPreviewRequest, - SkillBundleInstallProgress, - SkillBundleInstallRequest, - SkillBundleInstallResult -} from '../../shared/skill-bundle-install-contract' -export type { - SkillUploadBeginRequest, - SkillUploadChunkRequest -} from '../../shared/skill-upload-session-contract' -export type { SkillProviderRootOverrides } from '../skills/skill-provider-destinations' diff --git a/src/main/runtime/runtime-terminal-contracts.ts b/src/main/runtime/runtime-terminal-contracts.ts index 7c78b9388eb6..077ee9bc8773 100644 --- a/src/main/runtime/runtime-terminal-contracts.ts +++ b/src/main/runtime/runtime-terminal-contracts.ts @@ -25,7 +25,7 @@ import type { RuntimeTerminalWriteOptions } from './runtime-terminal-writer' import type { TerminalInputKind } from '../../shared/terminal-input-kind' import type { RuntimePtyController } from './runtime-pty-controller-contract' import type { RuntimeAgentRowSnapshot } from './runtime-worktree-agent-rows' -import type { WorkerTerminalHostScope } from './orchestration/worker-terminal-process-liveness' +import type { WorkerTerminalHostScope } from '../../shared/worker-terminal-host-scope' export type TerminalCreateOptions = { command?: string diff --git a/src/main/runtime/session-tabs/headless-terminal-tab-close.ts b/src/main/runtime/session-tabs/headless-terminal-tab-close.ts index 7f0284c3425b..ad77bdf9cca9 100644 --- a/src/main/runtime/session-tabs/headless-terminal-tab-close.ts +++ b/src/main/runtime/session-tabs/headless-terminal-tab-close.ts @@ -10,7 +10,7 @@ import type { } from '../../../shared/runtime-types' import { parseAppSshPtyId } from '../../../shared/ssh-pty-id' import { buildHeadlessMobileSessionTabGroups } from '../mobile-session-layout-projection' -import { appendRetiredTerminalSurfaceProofs } from '../mobile-session-terminal-retirement-proof' +import { appendRetiredTerminalSurfaceProofs } from '../../../shared/terminal-retirement-proof-ledger' import type { RuntimePtyWorktreeRecord } from '../runtime-terminal-state-records' import type { TerminalPaneLayoutNode } from '../../../shared/terminal-tab-types' import type { RuntimeTerminalRename } from '../../../shared/runtime-terminal-contracts' diff --git a/src/main/runtime/structured-worker-authority.ts b/src/main/runtime/structured-worker-authority.ts index 0916ca112950..0b0ccff3b7ef 100644 --- a/src/main/runtime/structured-worker-authority.ts +++ b/src/main/runtime/structured-worker-authority.ts @@ -34,8 +34,8 @@ import { import { AGENT_SESSION_FOUNDING_FENCE } from './agent-session-record-founding' import { isTuiAgent } from '../../shared/tui-agent-config' import type { TuiAgent } from '../../shared/tui-agent' +import { isStructuredWorkerHandle } from '../../shared/structured-worker-handle' import { - isStructuredWorkerHandle, structuredWorkerIdentities, structuredWorkerProcessIncarnation, type StructuredWorkerIdentity diff --git a/src/main/runtime/structured-worker-identity.test.ts b/src/main/runtime/structured-worker-identity.test.ts index 1df016f3cafa..45ff3e5199bd 100644 --- a/src/main/runtime/structured-worker-identity.test.ts +++ b/src/main/runtime/structured-worker-identity.test.ts @@ -8,7 +8,6 @@ import { selectExactWorkerProviderSession } from './orchestration/worker-provide import { sealedChildEnv } from './structured-session-child-env.test-support' import { StructuredWorkerIdentityRegistry, - isStructuredWorkerHandle, mintStructuredWorkerHandle, mintStructuredWorkerPaneKey, sessionIdFromStructuredWorkerIncarnation, @@ -18,6 +17,7 @@ import { structuredWorkerProcessIncarnation, structuredWorkerRecordIsCurrent } from './structured-worker-identity' +import { isStructuredWorkerHandle } from '../../shared/structured-worker-handle' import type { AgentSessionRecord } from '../../shared/agent-session-record' import type { ExecutionHostId } from '../../shared/execution-host' diff --git a/src/main/runtime/structured-worker-identity.ts b/src/main/runtime/structured-worker-identity.ts index e1899f4fdce0..2c2cb57ba046 100644 --- a/src/main/runtime/structured-worker-identity.ts +++ b/src/main/runtime/structured-worker-identity.ts @@ -34,12 +34,8 @@ import { import { parseWorkerTerminalHostScope, type WorkerTerminalHostScope -} from './orchestration/worker-terminal-process-liveness' +} from '../../shared/worker-terminal-host-scope' -export { - STRUCTURED_WORKER_HANDLE_PREFIX, - isStructuredWorkerHandle -} from '../../shared/structured-worker-handle' export const STRUCTURED_WORKER_INCARNATION_PREFIX = 'structured:' export type StructuredWorkerIdentity = { diff --git a/src/main/runtime/terminal-viewport.ts b/src/main/runtime/terminal-viewport.ts deleted file mode 100644 index efffe04a9d85..000000000000 --- a/src/main/runtime/terminal-viewport.ts +++ /dev/null @@ -1 +0,0 @@ -export { clampTerminalViewport } from '../../shared/terminal-viewport' diff --git a/src/main/runtime/terminal/launch/terminal-split-source-authority.ts b/src/main/runtime/terminal/launch/terminal-split-source-authority.ts index e77c84c591be..9903891552d0 100644 --- a/src/main/runtime/terminal/launch/terminal-split-source-authority.ts +++ b/src/main/runtime/terminal/launch/terminal-split-source-authority.ts @@ -6,7 +6,7 @@ import { terminalLayoutContainsLeaf } from '../../../../shared/workspace-session import type { AgentTeamsTmuxCompatRequest, AgentTeamsTmuxCompatResponse -} from '../../claude-agent-teams-service' +} from '../../claude-agent-teams-types' import { ensureClaudeAgentTeamsShimDir, resolveClaudeAgentTeamsShimBin diff --git a/src/main/runtime/terminal/layout/mobile-terminal-activity.ts b/src/main/runtime/terminal/layout/mobile-terminal-activity.ts index 453c4ef2a0ae..71c509b1071f 100644 --- a/src/main/runtime/terminal/layout/mobile-terminal-activity.ts +++ b/src/main/runtime/terminal/layout/mobile-terminal-activity.ts @@ -1,6 +1,6 @@ import { OrcaRuntimeWithMarkPtyLivenessUnverifiable } from './terminal-input-floor' import type { ApplyLayoutResult, DriverState } from '../../orca-runtime-core' -import { clampTerminalViewport } from '../../terminal-viewport' +import { clampTerminalViewport } from '../../../../shared/terminal-viewport' export abstract class OrcaRuntimeWithMobileTookFloor extends OrcaRuntimeWithMarkPtyLivenessUnverifiable { abstract applyMobileDisplayMode(ptyId: string): Promise diff --git a/src/main/runtime/terminal/layout/mobile-terminal-subscribe-internal.ts b/src/main/runtime/terminal/layout/mobile-terminal-subscribe-internal.ts index c5dc5504e918..ad8587fea69e 100644 --- a/src/main/runtime/terminal/layout/mobile-terminal-subscribe-internal.ts +++ b/src/main/runtime/terminal/layout/mobile-terminal-subscribe-internal.ts @@ -1,5 +1,5 @@ import { OrcaRuntimeWithHandleMobileSubscribe } from './mobile-terminal-subscribe' -import { clampTerminalViewport } from '../../terminal-viewport' +import { clampTerminalViewport } from '../../../../shared/terminal-viewport' export abstract class OrcaRuntimeWithHandleMobileSubscribeInternal extends OrcaRuntimeWithHandleMobileSubscribe { protected async handleMobileSubscribeInternal( diff --git a/src/main/runtime/terminal/layout/terminal-input-floor.ts b/src/main/runtime/terminal/layout/terminal-input-floor.ts index 43435491b136..66dcf448579d 100644 --- a/src/main/runtime/terminal/layout/terminal-input-floor.ts +++ b/src/main/runtime/terminal/layout/terminal-input-floor.ts @@ -3,7 +3,7 @@ import type { PtyLivenessVerdict } from '../../../../shared/pty-liveness-verdict import type { DriverState } from '../../orca-runtime-core' import type { TerminalInputKind } from '../../../../shared/terminal-input-kind' import { isUntypedTerminalInput } from '../../../../shared/terminal-untyped-input' -import { clampTerminalViewport } from '../../terminal-viewport' +import { clampTerminalViewport } from '../../../../shared/terminal-viewport' import { getPtyTerminalState, getTerminalState } from '../../terminal-wait-results' // Orphaned verdicts are bounded; active PTYs retain theirs until new evidence resolves them. diff --git a/src/main/runtime/terminal/layout/terminal-resize-listeners.ts b/src/main/runtime/terminal/layout/terminal-resize-listeners.ts index 677ab9500676..ccecfb5f7220 100644 --- a/src/main/runtime/terminal/layout/terminal-resize-listeners.ts +++ b/src/main/runtime/terminal/layout/terminal-resize-listeners.ts @@ -17,10 +17,8 @@ import type { RuntimeTerminalOrphanAdoptionRequest, RuntimeTerminalOrphanAdoptionResult } from '../../../../shared/runtime-terminal-contracts' -import { - classifyWorkerTerminalProcessIncarnation, - parseWorkerTerminalHostScope -} from '../../orchestration/worker-terminal-process-liveness' +import { classifyWorkerTerminalProcessIncarnation } from '../../orchestration/worker-terminal-process-liveness' +import { parseWorkerTerminalHostScope } from '../../../../shared/worker-terminal-host-scope' import { getRepoIdFromWorktreeId } from '../../../../shared/worktree/id' import { buildOrchestrationTaskDisplayMetadata } from '../../../../shared/orchestration-task-display' import { LOCAL_EXECUTION_HOST_ID, toSshExecutionHostId } from '../../../../shared/execution-host' diff --git a/src/main/runtime/terminal/output/terminal-orchestration-authority.ts b/src/main/runtime/terminal/output/terminal-orchestration-authority.ts index ddcf3fbc9d57..bffb8537b192 100644 --- a/src/main/runtime/terminal/output/terminal-orchestration-authority.ts +++ b/src/main/runtime/terminal/output/terminal-orchestration-authority.ts @@ -30,7 +30,7 @@ import { } from '../../orchestration/cli-command' import { readOrchestrationFleetAgentStatusSnapshot } from '../../orchestration-fleet-agent-status-snapshot' import { resolveStructuredWorkerAuthority } from '../../structured-worker-authority' -import { isStructuredWorkerHandle } from '../../structured-worker-identity' +import { isStructuredWorkerHandle } from '../../../../shared/structured-worker-handle' import { parseOrcaSessionAddress } from '../../../../shared/orca-session-address' import { matchesProcessIncarnation } from '../../orchestration/worker-terminal-process-liveness' diff --git a/src/main/runtime/terminal/output/terminal-output-path.ts b/src/main/runtime/terminal/output/terminal-output-path.ts index 7a4f3f43507c..f08e1aac8fbc 100644 --- a/src/main/runtime/terminal/output/terminal-output-path.ts +++ b/src/main/runtime/terminal/output/terminal-output-path.ts @@ -4,7 +4,7 @@ import { recentTerminalOutputIncludesPath, recentTerminalPathCandidatesIncludePath } from '../../terminal-output-path-candidates' -import { clampTerminalViewport } from '../../terminal-viewport' +import { clampTerminalViewport } from '../../../../shared/terminal-viewport' export abstract class OrcaRuntimeWithHasRecentTerminalOutputPath extends OrcaRuntimeWithGetOrchestrationDispatchAuthority { protected abstract enqueueLayout( diff --git a/src/main/runtime/terminal/stop/worktree-terminal-sleep.ts b/src/main/runtime/terminal/stop/worktree-terminal-sleep.ts index c9b9ef08c6e4..d647793767cf 100644 --- a/src/main/runtime/terminal/stop/worktree-terminal-sleep.ts +++ b/src/main/runtime/terminal/stop/worktree-terminal-sleep.ts @@ -6,7 +6,7 @@ import { import { worktreeIdentityKey } from '../../../../shared/worktree/id' import type { RuntimeWorktreeTerminalSleepResult } from '../../../../shared/runtime-types' import { WORKTREE_TERMINAL_SLEEP_TIMEOUT_MS } from '../../orca-runtime-postlude' -import { teardownRpcDeadline } from '../../worktree-teardown' +import { teardownRpcDeadline } from '../../worktree-teardown-deadline' export abstract class OrcaRuntimeWithSleepResolvedWorktreeTerminals extends OrcaRuntimeWithWorktreeSleepResumeRecording { protected async sleepResolvedWorktreeTerminals( diff --git a/src/main/runtime/terminal/stop/worktree-terminal-stop.ts b/src/main/runtime/terminal/stop/worktree-terminal-stop.ts index c4c80af2448f..a9bc8732671c 100644 --- a/src/main/runtime/terminal/stop/worktree-terminal-stop.ts +++ b/src/main/runtime/terminal/stop/worktree-terminal-stop.ts @@ -1,7 +1,7 @@ import { OrcaRuntimeWithResolveTerminalSplitSourceAuthority } from '../launch/terminal-split-source-authority' import type { ResolvedWorktree } from '../../runtime-worktree-path-identity' import { worktreeIdentityKey, worktreeIdsEqual } from '../../../../shared/worktree/id' -import { teardownRpcDeadline } from '../../worktree-teardown' +import { teardownRpcDeadline } from '../../worktree-teardown-deadline' import { WORKTREE_TERMINALS_SLEEPING_ERROR } from '../../worktree-terminals-sleeping-error' import type { RuntimeWorktreeTerminalCloseResult, diff --git a/src/main/runtime/worktree-teardown.ts b/src/main/runtime/worktree-teardown.ts index 17816ba09210..f8af7a5205af 100644 --- a/src/main/runtime/worktree-teardown.ts +++ b/src/main/runtime/worktree-teardown.ts @@ -75,8 +75,6 @@ export type WorktreeTeardownResult = { export const WORKTREE_PROCESS_SWEEP_TIMEOUT_MS = 10_000 -export { WORKTREE_TEARDOWN_RPC_MARGIN_MS, teardownRpcDeadline } from './worktree-teardown-deadline' - /** * Kills every PTY we can prove belongs to `worktreeId`, across all three * registration surfaces (renderer graph, installed PTY provider session list, diff --git a/src/main/server/serve-readiness.ts b/src/main/server/serve-readiness.ts index b0d1e82a59f5..58bf1e4ef66e 100644 --- a/src/main/server/serve-readiness.ts +++ b/src/main/server/serve-readiness.ts @@ -1,4 +1,4 @@ -import type { PairingOfferUnavailableReason } from '../runtime/runtime-rpc' +import type { PairingOfferUnavailableReason } from '../runtime/runtime-rpc/runtime-rpc-pairing-types' import type { OrcadHealth } from '../orcad/orcad-health' import { describePtyProcessCeiling } from '../../shared/pty-process-ceiling-state' diff --git a/tests/e2e/cross-version-wire/cross-version-web-device-key.unit.test.ts b/tests/e2e/cross-version-wire/cross-version-web-device-key.unit.test.ts index b3d68bac18e2..54528c287716 100644 --- a/tests/e2e/cross-version-wire/cross-version-web-device-key.unit.test.ts +++ b/tests/e2e/cross-version-wire/cross-version-web-device-key.unit.test.ts @@ -12,7 +12,7 @@ import { import { pairedRuntimeConnectionFromOffer } from '../../../src/shared/paired-runtime-connection' import { DeviceRegistry } from '../../../src/main/runtime/device-registry' import { registerSocketDeviceKey } from '../../../src/main/runtime/runtime-rpc/runtime-rpc-device-key-registration' -import { generateKeyPair } from '../../../src/main/runtime/rpc/e2ee-crypto' +import { generateKeyPair } from '../../../src/shared/e2ee-crypto' import { MobileSocketWiring, type AuthenticatedMobileSocket,