mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* Move environment store operations off the main thread * Preserve CLI startup speed with the serialized environment owner * Handle absent paired host labels in the producer regression fixture * Preserve publication ownership and copy selected environment results * Correct publication and WSL readiness regression fixtures * Include environment store worker in deployed server artifacts * Check fresh listing publication across an intervening store update * Await store-backed results in new recovery coverage * Retire failed page publications and retain CLI worker support entries * Unpack environment store support modules for the installed CLI * Align async store callers with their return contracts * Avoid hardening work for absent environment store files * Keep permission repair bounded to one hardening attempt * Align store test fixtures and await pairing replacement * Use the semantic store operation for external pairing fixtures * Provide the live sender frame in the timed subscription fixture * Share pending server lookups and settle retired phone requests * Keep the relay error type import * Keep status ownership and transport imports acyclic * Await replacement pairing in status retirement cases * Keep asynchronous server rows bound to their admitted pairing * Keep inventory snapshots and queued delivery at one publication boundary * Await saved-host and graph test setup through publication completion * Finish async fixture types and remove foreground timing probe * Await renderer surface transitions in process identity coverage * Await nested graph publication fixtures through their callers * Await restored pane graph publication before hook assertions * Include imported store worker and sidebar files in web typecheck * Prepare saved host storage in source-based WSL test rigs * Await saved server lookups in the source retirement diagnostic * Preserve newer WSL status across async saved-host reads * Fence stopped probes when a newer WSL Ready arrives * Keep saved WSL host selection covered when admission is off * Check WSL probe ownership after async admission * Preserve WSL stop authority without cancelling Ready persistence * Prune removed WSL E2E real-time wait from flaky-test baseline * Limit WSL callback invalidation to confirmed stops * Retire pending WSL notices on every confirmed stop * Close the WSL picker dialog explicitly between scenarios * perf(layout): skip unused normalization reports in pane commands (#42615) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Clarify cleanup pinning and ignored-file protection (#42616) * test: remove 55 low-value suites and assertion driver (#42605) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> * fix(skills): skip Claude sync scratch folders during skill discovery (#42610) Claude Code parks replaced skill copies in `.trash` and in-progress syncs in `.staging` under its skills roots. Discovery walked into both, so each synced skill showed up as duplicates. Prune those directory names in the native file walk and in the generated WSL `find` command. Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com> * test: remove 78 low-value suites and trim redundant cases (#42621) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> * Keep quit teardown within the source line budget --------- Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Co-authored-by: OrcaWin <alpha-eng@stably.ai> Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> Co-authored-by: BingZ <zzb@gxsmjx.com> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
import {
|
|
pairedRuntimeConnectionFromOffer,
|
|
type PairedRuntimeConnection
|
|
} from '../../../shared/remote-runtime/pairing/paired-runtime-connection'
|
|
import { parsePairingCode } from '../../../shared/remote-runtime/pairing/pairing'
|
|
import { resolveEnvironmentPairingOffer } from './environments'
|
|
import { RuntimeClientError } from '../connection/types'
|
|
import { configureRemoteRuntimeE2EEV2HostLatch } from '../../../shared/remote-runtime/e2ee/node/remote-runtime-e2ee-v2-host-latch'
|
|
|
|
export async function resolveRemoteConnection(
|
|
userDataPath: string,
|
|
pairingCode: string | null,
|
|
environmentSelector: string | null
|
|
): Promise<PairedRuntimeConnection | null> {
|
|
const connection = await resolvePairedConnection(userDataPath, pairingCode, environmentSelector)
|
|
if (connection) {
|
|
// Why: the CLI and the desktop app share which hosts have proven E2EE v2.
|
|
configureRemoteRuntimeE2EEV2HostLatch(userDataPath)
|
|
}
|
|
return connection
|
|
}
|
|
|
|
async function resolvePairedConnection(
|
|
userDataPath: string,
|
|
pairingCode: string | null,
|
|
environmentSelector: string | null
|
|
): Promise<PairedRuntimeConnection | null> {
|
|
if (pairingCode && environmentSelector) {
|
|
throw new RuntimeClientError(
|
|
'invalid_argument',
|
|
'Use either --pairing-code or --environment, not both.'
|
|
)
|
|
}
|
|
if (environmentSelector) {
|
|
return pairedRuntimeConnectionFromOffer(
|
|
await resolveEnvironmentPairingOffer(userDataPath, environmentSelector)
|
|
)
|
|
}
|
|
if (!pairingCode) {
|
|
return null
|
|
}
|
|
const pairing = parsePairingCode(pairingCode)
|
|
if (!pairing) {
|
|
throw new RuntimeClientError(
|
|
'invalid_argument',
|
|
'Invalid remote pairing code. Expected an orca://pair?... URL or bare pairing payload.'
|
|
)
|
|
}
|
|
return pairedRuntimeConnectionFromOffer(pairing)
|
|
}
|