mirror of
https://github.com/stablyai/orca.git
synced 2026-10-03 16:02:11 +00:00
* Extend orchestration agent submission timing budgets * fix(orchestration): preserve mutation recovery identity * fix(orchestration): preserve recovery executable identity * fix(orchestration): keep worker starts and recovery commands safe * test(orchestration): cover federated worker preflight * fix(orchestration): harden mutation recovery * fix(orchestration): redact dispatch recovery credentials * chore: preserve upstream skill dialog formatting * test(orchestration): stabilize agent prompt submit e2e * fix(orchestration): validate federated start receipts * perf(runtime): cache unchanged prompt verification tail * fix(orchestration): reject worker-start timer overflow * fix(orchestration): normalize worker-start timeout defaults * fix(orchestration): normalize worker-start readiness budgets * fix(orchestration): normalize federated readiness timeout * test(runtime): tolerate current-main degradation exports * chore: preserve current-main orcad formatting * chore: drop unrelated formatting carryover
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
import type { PairingOffer } from '../../shared/pairing'
|
|
import type { RuntimeOrchestrationEnvelope } from '../../shared/runtime-rpc-envelope'
|
|
import {
|
|
RemoteRuntimeClientError,
|
|
sendRemoteRuntimeRequest,
|
|
sendRemoteRuntimeRequestWithStatusPreflight
|
|
} from '../../shared/remote-runtime-client'
|
|
import type { RuntimeStatus } from '../../shared/runtime-types'
|
|
import { RuntimeClientError, type RuntimeRpcResponse } from './types'
|
|
|
|
export async function sendWebSocketRequest<TResult>(
|
|
pairing: PairingOffer,
|
|
method: string,
|
|
params: unknown,
|
|
timeoutMs: number,
|
|
envelope?: RuntimeOrchestrationEnvelope
|
|
): Promise<RuntimeRpcResponse<TResult>> {
|
|
try {
|
|
return await sendRemoteRuntimeRequest<TResult>(pairing, method, params, timeoutMs, envelope)
|
|
} catch (error) {
|
|
if (error instanceof RemoteRuntimeClientError) {
|
|
throw new RuntimeClientError(error.code, error.message, error.data)
|
|
}
|
|
throw error
|
|
}
|
|
}
|
|
|
|
export async function sendWebSocketRequestWithStatusPreflight<TResult>(
|
|
pairing: PairingOffer,
|
|
method: string,
|
|
params: unknown,
|
|
timeoutMs: number,
|
|
validateStatus: (response: RuntimeRpcResponse<RuntimeStatus>) => void,
|
|
envelope?: RuntimeOrchestrationEnvelope
|
|
): Promise<RuntimeRpcResponse<TResult>> {
|
|
try {
|
|
return await sendRemoteRuntimeRequestWithStatusPreflight<TResult>(
|
|
pairing,
|
|
method,
|
|
params,
|
|
timeoutMs,
|
|
validateStatus,
|
|
envelope
|
|
)
|
|
} catch (error) {
|
|
if (error instanceof RemoteRuntimeClientError) {
|
|
throw new RuntimeClientError(error.code, error.message, error.data)
|
|
}
|
|
throw error
|
|
}
|
|
}
|