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

Function applyWorkflowSelectionFromManifest

src/utils/tool-registry.ts:457–481  ·  view source on GitHub ↗
(
  requestedWorkflows: string[] | undefined,
  ctx: PredicateContext,
)

Source from the content-addressed store, hash-verified

455}
456
457export async function applyWorkflowSelectionFromManifest(
458 requestedWorkflows: string[] | undefined,
459 ctx: PredicateContext,
460): Promise<RuntimeToolInfo> {
461 if (!server) {
462 throw new Error('Tool registry has not been initialized.');
463 }
464
465 registryState.currentContext = ctx;
466
467 const manifest = loadManifest();
468 const selectedWorkflows = resolveSelectedWorkflows(manifest, requestedWorkflows, ctx);
469 const { registeredCount, desiredWorkflows } = await enumerateAndRegisterTools(
470 manifest,
471 selectedWorkflows,
472 ctx,
473 );
474
475 registryState.enabledWorkflows = desiredWorkflows;
476
477 const workflowLabel = selectedWorkflows.map((w) => w.id).join(', ');
478 log('info', `Registered ${registeredCount} tools from workflows: ${workflowLabel}`);
479
480 return snapshotRuntimeRegistration();
481}
482
483export async function registerWorkflowsFromManifest(
484 workflowNames?: string[],

Callers 3

Calls 5

loadManifestFunction · 0.90
logFunction · 0.90
resolveSelectedWorkflowsFunction · 0.85

Tested by

no test coverage detected