mirror of
https://github.com/stablyai/orca.git
synced 2026-10-05 16:02:22 +00:00
* fix(vault): read OpenCode SQLite on WSL and SSH execution hosts * fix(vault): bound host setup and preserve cancellation across readers * fix(vault): keep WSL discovery visible and isolate probe tests * fix: retry local Vault runtime downloads without reserving remote stages Preserve verified remote cache reuse and latch only unresolved host work. Update WSL source-guard and remote dedup test integration. * fix(queue): discard aborted requests before respawn * fix(vault): preserve host paths and recover setup after reconnect * fix(ssh): fence every runtime platform probe across reconnects * fix(vault): reject setup results from superseded SSH connections --------- Co-authored-by: m4air <m4air@m4airs-Air.localdomain>
25 lines
855 B
TypeScript
25 lines
855 B
TypeScript
import { parentPort } from 'node:worker_threads'
|
|
import type { OpenCodeSqliteWorkerRequest } from './session-scanner-opencode-sqlite-worker-protocol'
|
|
import { handleOpenCodeSqliteRequest } from './session-scanner-opencode-sqlite-dispatch'
|
|
|
|
if (!parentPort) {
|
|
throw new Error('OpenCode SQLite worker must run with a parent port.')
|
|
}
|
|
const port = parentPort
|
|
|
|
port.on('message', (request: OpenCodeSqliteWorkerRequest) => {
|
|
void handleOpenCodeSqliteRequest(request).then((response) => {
|
|
try {
|
|
port.postMessage(response)
|
|
} catch {
|
|
// A non-cloneable result would otherwise post nothing and leave the client
|
|
// waiting out its timeout; fail that request fast instead.
|
|
port.postMessage({
|
|
id: request.id,
|
|
ok: false,
|
|
error: 'OpenCode SQLite worker result could not be serialized.'
|
|
})
|
|
}
|
|
})
|
|
})
|