mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
refactor(runtime): import runtime helpers from their owning modules, not re-export shims (#30373)
Removes the re-export lines in 22 src/main/runtime modules (rpc schemas, skill surface, worker identity, terminal viewport, teardown, git, e2ee crypto and more); importers and test mocks name the real modules.
This commit is contained in:
+2
-2
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<string, AgentTeam>()
|
||||
private readonly dispatcher = new ClaudeAgentTeamsTmuxDispatcher()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(() => ({
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
export {
|
||||
decrypt,
|
||||
decryptBytes,
|
||||
deriveSharedKey,
|
||||
encrypt,
|
||||
encryptBytes,
|
||||
generateKeyPair,
|
||||
MAX_E2EE_ENCRYPTED_BASE64_CHARACTERS,
|
||||
publicKeyFromBase64
|
||||
} from '../../../shared/e2ee-crypto'
|
||||
@@ -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,
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
TabSwitch,
|
||||
Upload,
|
||||
Wait
|
||||
} from './browser-schemas'
|
||||
} from '../../../../shared/rpc-contract/browser-params'
|
||||
import {
|
||||
BrowserOpenUrlParams,
|
||||
BrowserTabCreateParams
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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'
|
||||
@@ -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'
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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<OrcaRuntimeService, 'showTerminal' | 'getOrchestrationDispatchAuthority'>,
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
+1
-1
@@ -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 }))
|
||||
|
||||
+1
-1
@@ -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 }))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<typeof WorkerStartParams>
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { WorkspaceCleanup } from '../../../../shared/rpc-contract/workspace-cleanup-ui-params'
|
||||
@@ -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', () => ({
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -19,12 +19,6 @@ import {
|
||||
shouldObserveCompletedMutation
|
||||
} from './orchestration-mutation-receipt'
|
||||
|
||||
export {
|
||||
readMutationReplayNudge,
|
||||
readWorkerDoneReplayNudge,
|
||||
stripMutationReplayNudge
|
||||
} from './orchestration-mutation-receipt'
|
||||
|
||||
export type DurableMutationInvocation = {
|
||||
identity: {
|
||||
callerFingerprint: string
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 => ({
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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<WebSocket> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user