Skip to content

custom-workflows#251

Open
cameroncooke wants to merge 1 commit intomainfrom
custom-workflows
Open

custom-workflows#251
cameroncooke wants to merge 1 commit intomainfrom
custom-workflows

Conversation

@cameroncooke
Copy link
Collaborator

@cameroncooke cameroncooke commented Feb 27, 2026

Summary

Adds support for user-defined custom workflows in .xcodebuildmcp/config.yaml. Users can define named workflow groups mapping to explicit tool lists, then reference them from enabledWorkflows just like built-in workflows.

enabledWorkflows: ["my-workflow"]
customWorkflows:
  my-workflow:
    - build_run_sim
    - record_sim_video
    - screenshot

Changes

  • New customWorkflows config field (schema, parsing, normalization, config-store resolution)
  • Tool registry resolves custom workflow tool names to manifest tool IDs with alias matching
  • Conflict detection: custom workflows sharing names with built-in workflows are rejected with warnings
  • Unknown tool names are logged as warnings and skipped
  • Session-management and doctor tools remain auto-included as before

Test plan

  • Unit tests for createCustomWorkflowsFromConfig (happy path, conflicts, unknown tools)
  • Config parsing tests for normalizeCustomWorkflows (case normalization, empty names, string-as-array)
  • Config-store resolution tests (overrides > file > defaults)
  • Existing workflow/exposure/predicate tests updated and passing

@cameroncooke cameroncooke changed the title WIP custom-workflows Feb 27, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@251

commit: c65eda4

@cameroncooke cameroncooke marked this pull request as ready for review March 2, 2026 12:33
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Asymmetric normalization masks silent workflow selection failures
    • Normalized requestedWorkflows before passing to selectWorkflowsForMcp to ensure consistent matching against workflow IDs across both selection and unknown workflow detection paths.

Create PR

Or push these changes by commenting:

@cursor push fd7273dac7
Preview (fd7273dac7)
diff --git a/src/utils/tool-registry.ts b/src/utils/tool-registry.ts
--- a/src/utils/tool-registry.ts
+++ b/src/utils/tool-registry.ts
@@ -187,12 +187,17 @@
   }
   const allWorkflows = [...manifest.workflows.values(), ...customSelection.workflows];
 
+  // Normalize requested workflows for consistent matching
+  const normalizedRequestedWorkflows = requestedWorkflows
+    ?.map(normalizeName)
+    .filter((name) => name.length > 0);
+
   // Select workflows using manifest-driven rules
-  const selectedWorkflows = selectWorkflowsForMcp(allWorkflows, requestedWorkflows, ctx);
+  const selectedWorkflows = selectWorkflowsForMcp(allWorkflows, normalizedRequestedWorkflows, ctx);
   const knownWorkflowIds = new Set(allWorkflows.map((workflow) => workflow.id));
-  const unknownRequestedWorkflows = (requestedWorkflows ?? [])
-    .map(normalizeName)
-    .filter((workflowName) => workflowName.length > 0 && !knownWorkflowIds.has(workflowName));
+  const unknownRequestedWorkflows = (normalizedRequestedWorkflows ?? []).filter(
+    (workflowName) => !knownWorkflowIds.has(workflowName),
+  );
   if (unknownRequestedWorkflows.length > 0) {
     const uniqueUnknownRequestedWorkflows = [...new Set(unknownRequestedWorkflows)];
     log(
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Allow users to define named workflow groups in config.yaml mapping to
explicit tool lists, then reference them from enabledWorkflows like
built-in workflows.

- New customWorkflows config field (schema, parsing, normalization)
- Tool registry resolves custom workflow tool names to manifest IDs
- Conflict detection for built-in workflow name collisions
- Unknown tool names logged as warnings and skipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant