Skip to content

Commit 13807c9

Browse files
committed
πŸ“ docs: correct hideWhenXcodeAgentMode predicate description
The docs incorrectly stated the predicate depends on both runningUnderXcode AND xcodeToolsActive. In reality it only checks runningUnderXcode β€” Xcode's coding agent always provides native equivalents, independent of the Xcode Tools bridge (which is for external agents connecting to Xcode's MCP server).
1 parent af358e2 commit 13807c9

2 files changed

Lines changed: 15 additions & 20 deletions

File tree

β€Ždocs/dev/MANIFEST_FORMAT.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Predicates control visibility based on runtime context. All predicates in the ar
301301
| `experimentalWorkflowDiscoveryEnabled` | Show only when experimental workflow discovery is enabled |
302302
| `runningUnderXcodeAgent` | Show only when running under Xcode's coding agent |
303303
| `requiresXcodeTools` | Show only when Xcode Tools bridge is active |
304-
| `hideWhenXcodeAgentMode` | Hide when running under Xcode agent AND Xcode Tools bridge is active |
304+
| `hideWhenXcodeAgentMode` | Hide when running inside Xcode's coding agent (tools conflict with Xcode's native equivalents) |
305305
| `always` | Always visible (explicit documentation) |
306306
| `never` | Never visible (temporarily disable) |
307307

β€Ždocs/dev/TOOL_REGISTRY_REFACTOR.mdβ€Ž

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,10 @@ type PredicateContext = {
311311

312312
- `debugEnabled`: true if config debug mode is enabled
313313
- `experimentalWorkflowDiscoveryEnabled`: true if experimental workflow discovery is enabled
314-
- `hideWhenXcodeAgentMode`: hides tool/workflow when:
315-
- running under Xcode agent, AND
316-
- Xcode Tools bridge is active (proxied tools are available)
314+
- `hideWhenXcodeAgentMode`: hides tool/workflow when running inside Xcode's coding agent.
315+
Xcode provides native equivalents for these tools, so XcodeBuildMCP hides its versions
316+
to avoid conflicts. This is independent of the Xcode Tools bridge (which is for external
317+
agents connecting to Xcode's MCP server).
317318

318319
This predicate powers the policy described in `XCODE_IDE_TOOL_CONFLICTS.md`.
319320

@@ -345,12 +346,9 @@ These tools:
345346
- can trigger `tools/listChanged` updates
346347

347348
### How dynamic tools influence static tool visibility
348-
When dynamic tools are active (`xcodeToolsActive`), conflict-tagged XcodeBuildMCP tools are hidden via `hideWhenXcodeAgentMode`.
349+
When running inside Xcode's coding agent (`runningUnderXcode`), conflict-tagged XcodeBuildMCP tools are hidden via `hideWhenXcodeAgentMode` because Xcode provides native equivalents.
349350

350-
This behavior is:
351-
- scoped to MCP runtime
352-
- driven by bridge status
353-
- re-applied whenever bridge status changes
351+
This is distinct from the Xcode Tools bridge, which allows external agents (Cursor, Claude Code, etc.) to access Xcode capabilities via its MCP server.
354352

355353
---
356354

@@ -437,8 +435,8 @@ At runtime the loader imports:
437435

438436
### Phase 4: migrate MCP registration to manifest-driven
439437
- Replace generated loader usage with manifest selection + import-based registration
440-
- Wire in Xcode bridge status β†’ `xcodeToolsActive` updates
441-
- Apply conflict filtering via `hideWhenXcodeAgentMode`
438+
- Wire in Xcode bridge status β†’ `xcodeToolsActive` updates for bridge-dependent predicates
439+
- Apply Xcode agent conflict filtering via `hideWhenXcodeAgentMode` (based on `runningUnderXcode`)
442440

443441
### Phase 5: migrate daemon to manifest-driven
444442
- Daemon builds catalog from manifest
@@ -478,9 +476,7 @@ routing:
478476
daemonAffinity: preferred
479477
```
480478

481-
When:
482-
- runningUnderXcode=true AND xcodeToolsActive=true
483-
then `hideWhenXcodeAgentMode` fails and tool is not registered/listed in MCP (but remains in CLI outside Xcode).
479+
When `runningUnderXcode=true`, `hideWhenXcodeAgentMode` fails and the tool is not registered/listed in MCP (but remains in CLI outside Xcode). This check is independent of `xcodeToolsActive` β€” Xcode's coding agent always provides native equivalents for these tools.
484480

485481
---
486482

@@ -657,8 +653,9 @@ export const PREDICATES: Record<string, PredicateFn> = {
657653
debugEnabled: (ctx) => ctx.config.debug,
658654
experimentalWorkflowDiscoveryEnabled: (ctx) => ctx.config.experimentalWorkflowDiscovery,
659655
660-
// Key for XCODE_IDE_TOOL_CONFLICTS.md
661-
hideWhenXcodeAgentMode: (ctx) => !(ctx.runningUnderXcode && ctx.xcodeToolsActive),
656+
// Key for XCODE_IDE_TOOL_CONFLICTS.md β€” hides tools when running inside Xcode's
657+
// coding agent, where Xcode provides native equivalents.
658+
hideWhenXcodeAgentMode: (ctx) => !ctx.runningUnderXcode,
662659
};
663660
664661
export function evalPredicates(names: string[] | undefined, ctx: PredicateContext): boolean {
@@ -780,11 +777,9 @@ In MCP bootstrap, set `ctx.xcodeToolsActive` based on bridge status:
780777
- `workflowEnabled && bridgeAvailable && connected && proxiedToolCount > 0`
781778

782779
### 6.2 Re-apply static tool registration when bridge becomes active/inactive
783-
When the bridge syncs tools / disconnects, `xcodeToolsActive` can flip. If it flips, you must re-run the static registration pass so `hideWhenXcodeAgentMode` takes effect immediately.
780+
When the bridge syncs tools / disconnects, `xcodeToolsActive` can flip. If it flips, re-run the static registration pass so predicates that depend on `xcodeToolsActive` (e.g. `requiresXcodeTools`) take effect immediately.
784781

785-
This requires a small wiring change:
786-
- add an event/callback in `XcodeToolsBridgeManager` (or expose status polling after sync)
787-
- call `updateWorkflows(...)` (or a new `applyManifestSelection(...)`) when status changes
782+
Note: `hideWhenXcodeAgentMode` depends only on `runningUnderXcode`, not bridge status β€” Xcode's coding agent always provides native equivalents regardless of bridge state.
788783

789784
---
790785

0 commit comments

Comments
Β (0)