mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 19:07:41 +00:00
* refactor: import journal queue state from defining owners * refactor(shared): organize execution and automation owners * fix: retain type imports used by surviving test cases * refactor: finish work item owners and refresh validation metadata * test: infer reconnect status fixture type * test(claude): resolve source files beside same-named directories * test(runtime): group repository creation mock registrations
20 lines
725 B
TypeScript
20 lines
725 B
TypeScript
import { rejectValuelessFlag } from './flags'
|
|
import { RuntimeClientError } from './runtime/types'
|
|
import {
|
|
isOrchestrationRetryRequestId,
|
|
RETRY_REQUEST_ID_GUIDANCE
|
|
} from '../shared/orchestration/orchestration-retry-request-id'
|
|
|
|
/** Reject damaged identities: falling back to a fresh id could replay an already-applied mutation. */
|
|
export function readRetryRequestFlag(flags: Map<string, string | boolean>): string | undefined {
|
|
const value = flags.get('retry-request')
|
|
rejectValuelessFlag(value, 'retry-request')
|
|
if (value === undefined) {
|
|
return undefined
|
|
}
|
|
if (!isOrchestrationRetryRequestId(value)) {
|
|
throw new RuntimeClientError('invalid_argument', RETRY_REQUEST_ID_GUIDANCE)
|
|
}
|
|
return value
|
|
}
|