Skip to content

Commit 3d8e91d

Browse files
authored
Restructure and improve docs (#162)
1 parent 639f6c7 commit 3d8e91d

33 files changed

Lines changed: 373 additions & 351 deletions

.smithery/index.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4141
This test is trying to use the default command executor instead of a mock.
4242
Fix: Pass createMockExecutor() as the commandExecutor parameter in your test.
4343
Example: await plugin.handler(args, createMockExecutor({success: true}), mockFileSystem)
44-
See docs/TESTING.md for proper testing patterns.`);return mJe}function Ir(){if(process.env.VITEST==="true")throw new Error(`\u{1F6A8} REAL FILESYSTEM EXECUTOR DETECTED IN TEST! \u{1F6A8}
44+
See docs/dev/TESTING.md for proper testing patterns.`);return mJe}function Ir(){if(process.env.VITEST==="true")throw new Error(`\u{1F6A8} REAL FILESYSTEM EXECUTOR DETECTED IN TEST! \u{1F6A8}
4545
This test is trying to use the default filesystem executor instead of a mock.
4646
Fix: Pass createMockFileSystemExecutor() as the fileSystemExecutor parameter in your test.
4747
Example: await plugin.handler(args, mockCmd, createMockFileSystemExecutor())
48-
See docs/TESTING.md for proper testing patterns.`);return hJe}var hre,gre,_re,hJe,hs=O(()=>{"use strict";hre=require("child_process"),gre=require("fs"),_re=require("os");Go();hJe={async mkdir(t,e){await(await import("fs/promises")).mkdir(t,e)},async readFile(t,e="utf8"){return await(await import("fs/promises")).readFile(t,e)},async writeFile(t,e,r="utf8"){await(await import("fs/promises")).writeFile(t,e,r)},async cp(t,e,r){await(await import("fs/promises")).cp(t,e,r)},async readdir(t,e){return await(await import("fs/promises")).readdir(t,e)},async rm(t,e){await(await import("fs/promises")).rm(t,e)},existsSync(t){return(0,gre.existsSync)(t)},async stat(t){return await(await import("fs/promises")).stat(t)},async mkdtemp(t){return await(await import("fs/promises")).mkdtemp(t)},tmpdir(){return(0,_re.tmpdir)()}}});var ze=O(()=>{"use strict";hs()});function Lt(t){return{type:"text",text:t}}function g2(t,e){return{type:"image",data:t,mimeType:e}}var Dn=O(()=>{"use strict"});function Sre(){return gJe}function MI(){let t=process.env.XCODEBUILDMCP_DISABLE_SESSION_DEFAULTS;if(!t)return!1;let e=t.trim().toLowerCase();return["1","true","yes","on"].includes(e)}function Jh(t){let e={};for(let[r,n]of Object.entries(t??{})){if(n==null)continue;let o=r.startsWith("TEST_RUNNER_")?r:`TEST_RUNNER_${r}`;e[o]=n}return e}var vre,_2,gJe,Xh=O(()=>{"use strict";vre=require("child_process");Go();_2=class{isRunningUnderClaudeCode(){if(process.env.VITEST==="true")return!1;if(process.env.CLAUDECODE==="1"||process.env.CLAUDE_CODE_ENTRYPOINT==="cli")return!0;try{let e=process.ppid;if(e&&(0,vre.execSync)(`ps -o command= -p ${e}`,{encoding:"utf8",timeout:1e3}).trim().includes("claude"))return!0}catch(e){A("debug",`Failed to detect parent process: ${e}`)}return!1}},gJe=new _2});function le(t,e=!1){return{content:[{type:"text",text:t}],isError:e}}function DI(t,e){return(e?e.existsSync(t):yre.existsSync(t))?{isValid:!0}:{isValid:!1,errorResponse:le(`File not found: '${t}'. Please check the path and try again.`,!0)}}function Sp(t){if(!Sre().isRunningUnderClaudeCode()||!t.content||t.content.length<=1)return t;let r=[];if(t.content.forEach((o,i)=>{o.type==="text"&&(i>0&&r.length>0&&r.push(`
48+
See docs/dev/TESTING.md for proper testing patterns.`);return hJe}var hre,gre,_re,hJe,hs=O(()=>{"use strict";hre=require("child_process"),gre=require("fs"),_re=require("os");Go();hJe={async mkdir(t,e){await(await import("fs/promises")).mkdir(t,e)},async readFile(t,e="utf8"){return await(await import("fs/promises")).readFile(t,e)},async writeFile(t,e,r="utf8"){await(await import("fs/promises")).writeFile(t,e,r)},async cp(t,e,r){await(await import("fs/promises")).cp(t,e,r)},async readdir(t,e){return await(await import("fs/promises")).readdir(t,e)},async rm(t,e){await(await import("fs/promises")).rm(t,e)},existsSync(t){return(0,gre.existsSync)(t)},async stat(t){return await(await import("fs/promises")).stat(t)},async mkdtemp(t){return await(await import("fs/promises")).mkdtemp(t)},tmpdir(){return(0,_re.tmpdir)()}}});var ze=O(()=>{"use strict";hs()});function Lt(t){return{type:"text",text:t}}function g2(t,e){return{type:"image",data:t,mimeType:e}}var Dn=O(()=>{"use strict"});function Sre(){return gJe}function MI(){let t=process.env.XCODEBUILDMCP_DISABLE_SESSION_DEFAULTS;if(!t)return!1;let e=t.trim().toLowerCase();return["1","true","yes","on"].includes(e)}function Jh(t){let e={};for(let[r,n]of Object.entries(t??{})){if(n==null)continue;let o=r.startsWith("TEST_RUNNER_")?r:`TEST_RUNNER_${r}`;e[o]=n}return e}var vre,_2,gJe,Xh=O(()=>{"use strict";vre=require("child_process");Go();_2=class{isRunningUnderClaudeCode(){if(process.env.VITEST==="true")return!1;if(process.env.CLAUDECODE==="1"||process.env.CLAUDE_CODE_ENTRYPOINT==="cli")return!0;try{let e=process.ppid;if(e&&(0,vre.execSync)(`ps -o command= -p ${e}`,{encoding:"utf8",timeout:1e3}).trim().includes("claude"))return!0}catch(e){A("debug",`Failed to detect parent process: ${e}`)}return!1}},gJe=new _2});function le(t,e=!1){return{content:[{type:"text",text:t}],isError:e}}function DI(t,e){return(e?e.existsSync(t):yre.existsSync(t))?{isValid:!0}:{isValid:!1,errorResponse:le(`File not found: '${t}'. Please check the path and try again.`,!0)}}function Sp(t){if(!Sre().isRunningUnderClaudeCode()||!t.content||t.content.length<=1)return t;let r=[];if(t.content.forEach((o,i)=>{o.type==="text"&&(i>0&&r.length>0&&r.push(`
4949
---
5050
`),r.push(o.text))}),r.length===0)return t;let n=r.join("");return{...t,content:[{type:"text",text:n}]}}var yre,Qh=O(()=>{"use strict";yre=W(require("fs"),1);Go();Dn();Xh()});function ge(t,e){let r=e?`
5151
Details: ${e}`:"";return{content:[{type:"text",text:`Error: ${t}${r}`}],isError:!0}}var eg,Ka,at,v2,gt,sr,yp=O(()=>{"use strict";eg=class t extends Error{constructor(e){super(e),this.name="XcodeBuildMCPError",Object.setPrototypeOf(this,t.prototype)}},Ka=class t extends eg{constructor(r,n){super(r);this.paramName=n;this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},at=class t extends eg{constructor(r,n){super(r);this.originalError=n;this.name="SystemError",Object.setPrototypeOf(this,t.prototype)}},v2=class t extends eg{constructor(e){super(e),this.name="ConfigurationError",Object.setPrototypeOf(this,t.prototype)}},gt=class t extends eg{constructor(r,n,o,i){super(r);this.command=n;this.axeOutput=o;this.simulatorId=i;this.name="AxeError",Object.setPrototypeOf(this,t.prototype)}};sr=class t extends v2{constructor(r,n){super(r);this.details=n;this.name="DependencyError",Object.setPrototypeOf(this,t.prototype)}}});var hr=O(()=>{"use strict";Qh();yp()});var S2,gs,tg=O(()=>{"use strict";Go();S2=class{defaults={};setDefaults(e){this.defaults={...this.defaults,...e},A("info",`[Session] Defaults updated: ${Object.keys(e).join(", ")}`)}clear(e){if(e==null){this.defaults={},A("info","[Session] All defaults cleared");return}if(e.length===0){A("info","[Session] No keys provided to clear; no changes made");return}for(let r of e)delete this.defaults[r];A("info",`[Session] Defaults cleared: ${e.join(", ")}`)}get(e){return this.defaults[e]}getAll(){return{...this.defaults}}},gs=new S2});function Ht(t,e,r){return async n=>{try{let o=t.parse(n);return await e(o,r())}catch(o){if(o instanceof DP){let i=`Invalid parameters:

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ npx reloaderoo proxy --log-level debug -- node build/index.js
104104
-**8 Inspect Commands**: Complete MCP protocol testing capabilities
105105
-**Universal Compatibility**: Works on any system via npx
106106

107-
For complete documentation, examples, and troubleshooting, see @docs/RELOADEROO.md
107+
For complete documentation, examples, and troubleshooting, see @docs/dev/RELOADEROO.md
108108

109109
## Architecture Overview
110110

@@ -116,13 +116,13 @@ XcodeBuildMCP uses the concept of configuration by convention for MCP exposing a
116116

117117
Tools are the core of the MCP server and are the primary way to interact with the server. They are organized into directories by their functionality and are automatically loaded and exposed to MCP clients.
118118

119-
For more information see @docs/PLUGIN_DEVELOPMENT.md
119+
For more information see @docs/dev/PLUGIN_DEVELOPMENT.md
120120

121121
#### Resources
122122

123123
Resources are the secondary way to interact with the server. They are used to provide data to tools and are organized into directories by their functionality and are automatically loaded and exposed to MCP clients.
124124

125-
For more information see @docs/PLUGIN_DEVELOPMENT.md
125+
For more information see @docs/dev/PLUGIN_DEVELOPMENT.md
126126

127127
### Tool Registration
128128

@@ -141,7 +141,7 @@ XcodeBuildMCP loads tools at startup. To limit the toolset, set `XCODEBUILDMCP_E
141141
5. **Shared Utilities**: Command execution, build management, validation
142142
6. **Types**: Shared interfaces and Zod schemas
143143

144-
For more information see @docs/ARCHITECTURE.md
144+
For more information see @docs/dev/ARCHITECTURE.md
145145

146146
## Testing
147147

@@ -155,7 +155,7 @@ The project enforces a strict **Dependency Injection (DI)** testing philosophy.
155155

156156
This approach ensures that tests are robust, easy to maintain, and verify the actual integration between components without being tightly coupled to implementation details.
157157

158-
For complete guidelines, refer to @docs/TESTING.md.
158+
For complete guidelines, refer to @docs/dev/TESTING.md.
159159

160160
## TypeScript Import Standards
161161

@@ -189,7 +189,7 @@ This ensures all new code follows the `.ts` import pattern and maintains compati
189189

190190
Follow standardized development workflow with feature branches, structured pull requests, and linear commit history. **Never push to main directly or force push without permission.**
191191

192-
For complete guidelines, refer to @docs/RELEASE_PROCESS.md
192+
For complete guidelines, refer to @docs/dev/RELEASE_PROCESS.md
193193

194194
## Useful external resources
195195

0 commit comments

Comments
 (0)