MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / evalPredicates

Function evalPredicates

src/visibility/predicate-registry.ts:69–86  ·  view source on GitHub ↗
(names: string[] | undefined, ctx: PredicateContext)

Source from the content-addressed store, hash-verified

67 * @throws Error if an unknown predicate name is referenced
68 */
69export function evalPredicates(names: string[] | undefined, ctx: PredicateContext): boolean {
70 if (!names || names.length === 0) {
71 return true;
72 }
73
74 for (const name of names) {
75 const fn = PREDICATES[name];
76 if (!fn) {
77 throw new Error(
78 `Unknown predicate '${name}'. Available predicates: ${Object.keys(PREDICATES).join(', ')}`,
79 );
80 }
81 if (!fn(ctx)) {
82 return false;
83 }
84 }
85 return true;
86}
87
88/**
89 * Get all available predicate names.

Callers 4

isToolExposedForRuntimeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected