Skip to content

Commit 628c964

Browse files
cameroncookecodex
andcommitted
fix(schema): Deduplicate bridge status defs
Move the shared xcode bridge status schema fragment into the common structured-output defs file so the status and sync schemas cannot drift independently. Also replace the hardcoded physical device UUID in the repo-maintained agent docs with a portable placeholder for other contributors. Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent 48e1061 commit 628c964

5 files changed

Lines changed: 75 additions & 64 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use these sections under `## [Unreleased]`:
5656
- When running long test suites (snapshot tests, smoke tests), ALWAYS write full output to a log file and read it afterwards. NEVER pipe through `tail` or `grep` directly — that loses output you may need to debug failures.
5757
- Pattern: `DEVICE_ID=... npm run test:snapshot 2>&1 | tee /tmp/snapshot-results.txt` then read `/tmp/snapshot-results.txt` with the native read tool.
5858
- If you need a summary, read the log file and grep/filter it — the full output is always preserved.
59-
- Snapshot test command: `DEVICE_ID=33689F72-9B74-5406-9842-1CC6A6A96A88 npm run test:snapshot`
59+
- Snapshot test command: `DEVICE_ID=<YOUR_DEVICE_ID> npm run test:snapshot`
6060
- If physical-device snapshot tests hang after the final test summary, the likely cause is Apple post-failure diagnostics invoking `devicectl diagnose`, which may prompt for a macOS password and wedge in automated runs; see `docs/dev/device-snapshot-password-hang-rca.md`.
6161

6262
## **CRITICAL** Tool Usage Rules **CRITICAL**

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use these sections under `## [Unreleased]`:
5656
- When running long test suites (snapshot tests, smoke tests), ALWAYS write full output to a log file and read it afterwards. NEVER pipe through `tail` or `grep` directly — that loses output you may need to debug failures.
5757
- Pattern: `DEVICE_ID=... npm run test:snapshot 2>&1 | tee /tmp/snapshot-results.txt` then read `/tmp/snapshot-results.txt` with the native read tool.
5858
- If you need a summary, read the log file and grep/filter it — the full output is always preserved.
59-
- Snapshot test command: `DEVICE_ID=33689F72-9B74-5406-9842-1CC6A6A96A88 npm run test:snapshot`
59+
- Snapshot test command: `DEVICE_ID=<YOUR_DEVICE_ID> npm run test:snapshot`
6060

6161
## **CRITICAL** Tool Usage Rules **CRITICAL**
6262
- NEVER use sed/cat to read a file or a range of a file. Always use the native read tool.

schemas/structured-output/_defs/common.schema.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,73 @@
395395
"bundleId",
396396
"env"
397397
]
398+
},
399+
"bridgeStatus": {
400+
"type": "object",
401+
"additionalProperties": false,
402+
"properties": {
403+
"workflowEnabled": {
404+
"type": "boolean"
405+
},
406+
"bridgeAvailable": {
407+
"type": "boolean"
408+
},
409+
"bridgePath": {
410+
"type": [
411+
"string",
412+
"null"
413+
]
414+
},
415+
"xcodeRunning": {
416+
"type": [
417+
"boolean",
418+
"null"
419+
]
420+
},
421+
"connected": {
422+
"type": "boolean"
423+
},
424+
"bridgePid": {
425+
"type": [
426+
"integer",
427+
"null"
428+
]
429+
},
430+
"proxiedToolCount": {
431+
"type": "integer",
432+
"minimum": 0
433+
},
434+
"lastError": {
435+
"type": [
436+
"string",
437+
"null"
438+
]
439+
},
440+
"xcodePid": {
441+
"type": [
442+
"string",
443+
"null"
444+
]
445+
},
446+
"xcodeSessionId": {
447+
"type": [
448+
"string",
449+
"null"
450+
]
451+
}
452+
},
453+
"required": [
454+
"workflowEnabled",
455+
"bridgeAvailable",
456+
"bridgePath",
457+
"xcodeRunning",
458+
"connected",
459+
"bridgePid",
460+
"proxiedToolCount",
461+
"lastError",
462+
"xcodePid",
463+
"xcodeSessionId"
464+
]
398465
}
399466
}
400467
}

schemas/structured-output/xcodebuildmcp.output.xcode-bridge-status/1.schema.json

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,6 @@
88
"$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency"
99
}
1010
],
11-
"$defs": {
12-
"bridgeStatus": {
13-
"type": "object",
14-
"additionalProperties": false,
15-
"properties": {
16-
"workflowEnabled": { "type": "boolean" },
17-
"bridgeAvailable": { "type": "boolean" },
18-
"bridgePath": { "type": ["string", "null"] },
19-
"xcodeRunning": { "type": ["boolean", "null"] },
20-
"connected": { "type": "boolean" },
21-
"bridgePid": { "type": ["integer", "null"] },
22-
"proxiedToolCount": { "type": "integer", "minimum": 0 },
23-
"lastError": { "type": ["string", "null"] },
24-
"xcodePid": { "type": ["string", "null"] },
25-
"xcodeSessionId": { "type": ["string", "null"] }
26-
},
27-
"required": [
28-
"workflowEnabled",
29-
"bridgeAvailable",
30-
"bridgePath",
31-
"xcodeRunning",
32-
"connected",
33-
"bridgePid",
34-
"proxiedToolCount",
35-
"lastError",
36-
"xcodePid",
37-
"xcodeSessionId"
38-
]
39-
}
40-
},
4111
"properties": {
4212
"schema": { "const": "xcodebuildmcp.output.xcode-bridge-status" },
4313
"schemaVersion": { "const": "1" },
@@ -51,7 +21,9 @@
5121
"type": "string",
5222
"enum": ["status", "disconnect"]
5323
},
54-
"status": { "$ref": "#/$defs/bridgeStatus" }
24+
"status": {
25+
"$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus"
26+
}
5527
},
5628
"required": ["action", "status"]
5729
}

schemas/structured-output/xcodebuildmcp.output.xcode-bridge-sync/1.schema.json

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,6 @@
88
"$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/errorConsistency"
99
}
1010
],
11-
"$defs": {
12-
"bridgeStatus": {
13-
"type": "object",
14-
"additionalProperties": false,
15-
"properties": {
16-
"workflowEnabled": { "type": "boolean" },
17-
"bridgeAvailable": { "type": "boolean" },
18-
"bridgePath": { "type": ["string", "null"] },
19-
"xcodeRunning": { "type": ["boolean", "null"] },
20-
"connected": { "type": "boolean" },
21-
"bridgePid": { "type": ["integer", "null"] },
22-
"proxiedToolCount": { "type": "integer", "minimum": 0 },
23-
"lastError": { "type": ["string", "null"] },
24-
"xcodePid": { "type": ["string", "null"] },
25-
"xcodeSessionId": { "type": ["string", "null"] }
26-
},
27-
"required": [
28-
"workflowEnabled",
29-
"bridgeAvailable",
30-
"bridgePath",
31-
"xcodeRunning",
32-
"connected",
33-
"bridgePid",
34-
"proxiedToolCount",
35-
"lastError",
36-
"xcodePid",
37-
"xcodeSessionId"
38-
]
39-
}
40-
},
4111
"properties": {
4212
"schema": { "const": "xcodebuildmcp.output.xcode-bridge-sync" },
4313
"schemaVersion": { "const": "1" },
@@ -58,7 +28,9 @@
5828
},
5929
"required": ["added", "updated", "removed", "total"]
6030
},
61-
"status": { "$ref": "#/$defs/bridgeStatus" }
31+
"status": {
32+
"$ref": "https://xcodebuildmcp.com/schemas/structured-output/_defs/common.schema.json#/$defs/bridgeStatus"
33+
}
6234
},
6335
"required": ["sync", "status"]
6436
}

0 commit comments

Comments
 (0)