Files
orca/src/shared/hook-command-source-policy.ts
T
2026-05-18 14:43:24 -07:00

12 lines
440 B
TypeScript

import type { HookCommandSourcePolicy } from './types'
export function normalizeHookCommandSourcePolicy(policy: unknown): HookCommandSourcePolicy {
if (policy === 'local-only' || policy === 'run-both' || policy === 'shared-only') {
return policy
}
// Why: old persisted settings may still contain the removed shared-first mode.
// Treat any unknown value as the authoritative committed config policy.
return 'shared-only'
}