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
12 lines
426 B
TypeScript
12 lines
426 B
TypeScript
import * as z from 'zod'
|
|
import { normalizeStoredTaskSourceContext, type TaskSourceContext } from './task-source-context'
|
|
|
|
export const TaskSourceContextSchema = z.unknown().transform((value, ctx): TaskSourceContext => {
|
|
const normalized = normalizeStoredTaskSourceContext(value)
|
|
if (!normalized) {
|
|
ctx.addIssue({ code: 'custom', message: 'Invalid task source context' })
|
|
return z.NEVER
|
|
}
|
|
return normalized
|
|
})
|