Files
orca/src/shared/work-items/task-source-context-schema.ts
T
Neil c10881fa8c refactor(shared): organize execution and automation defining owners (#39776)
* 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
2026-11-08 06:46:09 -08:00

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
})