mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 00:04:01 +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
32 lines
888 B
TypeScript
32 lines
888 B
TypeScript
import { RuntimeClientError, RuntimeRpcFailureError } from './types'
|
|
|
|
export function attachMutationRecovery(
|
|
error: unknown,
|
|
requestId: string | undefined,
|
|
originalCommand?: string[]
|
|
): unknown {
|
|
if (!requestId || !(error instanceof RuntimeClientError)) {
|
|
return error
|
|
}
|
|
const data = {
|
|
...(error.data && typeof error.data === 'object' ? error.data : {}),
|
|
orchestrationRequestId: requestId,
|
|
...(originalCommand ? { originalCommand } : {})
|
|
}
|
|
if (error instanceof RuntimeRpcFailureError) {
|
|
return new RuntimeRpcFailureError({
|
|
...error.response,
|
|
error: {
|
|
...error.response.error,
|
|
message: `${error.message} Orchestration mutation request ID: ${requestId}.`,
|
|
data
|
|
}
|
|
})
|
|
}
|
|
return new RuntimeClientError(
|
|
error.code,
|
|
`${error.message} Orchestration mutation request ID: ${requestId}.`,
|
|
data
|
|
)
|
|
}
|