mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +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
30 lines
834 B
TypeScript
30 lines
834 B
TypeScript
import { ORCHESTRATION_RUN_PAGE_LIMIT } from '../../src/shared/orchestration/orchestration-run-pagination'
|
|
|
|
export type OrchestrationRunSummary = {
|
|
id: string
|
|
objective: string
|
|
}
|
|
|
|
type RunListClient = {
|
|
call<TResult>(method: string, params?: unknown): Promise<{ result: TResult }>
|
|
}
|
|
|
|
export async function listAllOrchestrationRuns(
|
|
client: RunListClient
|
|
): Promise<OrchestrationRunSummary[]> {
|
|
const runs: OrchestrationRunSummary[] = []
|
|
let cursor: string | undefined
|
|
do {
|
|
const page = await client.call<{
|
|
runs: OrchestrationRunSummary[]
|
|
nextCursor?: string | null
|
|
}>('orchestration.runList', {
|
|
limit: ORCHESTRATION_RUN_PAGE_LIMIT,
|
|
...(cursor ? { cursor } : {})
|
|
})
|
|
runs.push(...page.result.runs)
|
|
cursor = page.result.nextCursor ?? undefined
|
|
} while (cursor)
|
|
return runs
|
|
}
|