mcp-wordpress 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/README.md +114 -48
  2. package/dist/ajv-patch.js +34 -0
  3. package/dist/cache/CacheInvalidation.d.ts +3 -1
  4. package/dist/cache/CacheInvalidation.d.ts.map +1 -1
  5. package/dist/cache/CacheInvalidation.js +10 -4
  6. package/dist/cache/CacheInvalidation.js.map +1 -1
  7. package/dist/cache/CacheManager.d.ts +3 -2
  8. package/dist/cache/CacheManager.d.ts.map +1 -1
  9. package/dist/cache/CacheManager.js +11 -3
  10. package/dist/cache/CacheManager.js.map +1 -1
  11. package/dist/cache/HttpCacheWrapper.d.ts +7 -6
  12. package/dist/cache/HttpCacheWrapper.d.ts.map +1 -1
  13. package/dist/cache/HttpCacheWrapper.js +8 -5
  14. package/dist/cache/HttpCacheWrapper.js.map +1 -1
  15. package/dist/cache/__tests__/HttpCacheWrapper.test.js +6 -5
  16. package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +1 -1
  17. package/dist/cache/index.d.ts +3 -3
  18. package/dist/cache/index.d.ts.map +1 -1
  19. package/dist/cache/index.js +1 -1
  20. package/dist/cache/index.js.map +1 -1
  21. package/dist/client/CachedWordPressClient.d.ts +23 -9
  22. package/dist/client/CachedWordPressClient.d.ts.map +1 -1
  23. package/dist/client/CachedWordPressClient.js +4 -1
  24. package/dist/client/CachedWordPressClient.js.map +1 -1
  25. package/dist/client/MockWordPressClient.d.ts +2 -1
  26. package/dist/client/MockWordPressClient.d.ts.map +1 -1
  27. package/dist/client/MockWordPressClient.js +3 -1
  28. package/dist/client/MockWordPressClient.js.map +1 -1
  29. package/dist/client/api.d.ts +17 -13
  30. package/dist/client/api.d.ts.map +1 -1
  31. package/dist/client/api.js +135 -30
  32. package/dist/client/api.js.map +1 -1
  33. package/dist/client/auth.d.ts.map +1 -1
  34. package/dist/client/auth.js +2 -3
  35. package/dist/client/auth.js.map +1 -1
  36. package/dist/client/managers/AuthenticationManager.d.ts +55 -2
  37. package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
  38. package/dist/client/managers/AuthenticationManager.js +269 -71
  39. package/dist/client/managers/AuthenticationManager.js.map +1 -1
  40. package/dist/client/managers/BaseManager.d.ts +3 -3
  41. package/dist/client/managers/BaseManager.d.ts.map +1 -1
  42. package/dist/client/managers/BaseManager.js +11 -5
  43. package/dist/client/managers/BaseManager.js.map +1 -1
  44. package/dist/client/managers/RequestManager.d.ts +2 -2
  45. package/dist/client/managers/RequestManager.d.ts.map +1 -1
  46. package/dist/client/managers/RequestManager.js +25 -12
  47. package/dist/client/managers/RequestManager.js.map +1 -1
  48. package/dist/config/Config.d.ts +155 -0
  49. package/dist/config/Config.d.ts.map +1 -0
  50. package/dist/config/Config.js +215 -0
  51. package/dist/config/Config.js.map +1 -0
  52. package/dist/config/ConfigurationSchema.d.ts +21 -21
  53. package/dist/config/ConfigurationSchema.d.ts.map +1 -1
  54. package/dist/config/ConfigurationSchema.js +19 -2
  55. package/dist/config/ConfigurationSchema.js.map +1 -1
  56. package/dist/config/ServerConfiguration.d.ts +2 -1
  57. package/dist/config/ServerConfiguration.d.ts.map +1 -1
  58. package/dist/config/ServerConfiguration.js +50 -41
  59. package/dist/config/ServerConfiguration.js.map +1 -1
  60. package/dist/docs/DocumentationGenerator.d.ts +9 -8
  61. package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
  62. package/dist/docs/DocumentationGenerator.js +10 -7
  63. package/dist/docs/DocumentationGenerator.js.map +1 -1
  64. package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
  65. package/dist/docs/MarkdownFormatter.js +3 -2
  66. package/dist/docs/MarkdownFormatter.js.map +1 -1
  67. package/dist/dxt-entry.cjs +81 -0
  68. package/dist/dxt-entry.js +15 -14
  69. package/dist/dxt-entry.js.map +1 -1
  70. package/dist/index.d.ts +3 -1
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +37 -21
  73. package/dist/index.js.map +1 -1
  74. package/dist/performance/MetricsCollector.d.ts +13 -7
  75. package/dist/performance/MetricsCollector.d.ts.map +1 -1
  76. package/dist/performance/MetricsCollector.js +69 -27
  77. package/dist/performance/MetricsCollector.js.map +1 -1
  78. package/dist/performance/PerformanceAnalytics.d.ts +8 -2
  79. package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
  80. package/dist/performance/PerformanceAnalytics.js +17 -47
  81. package/dist/performance/PerformanceAnalytics.js.map +1 -1
  82. package/dist/performance/PerformanceMonitor.d.ts +2 -1
  83. package/dist/performance/PerformanceMonitor.d.ts.map +1 -1
  84. package/dist/performance/PerformanceMonitor.js +12 -13
  85. package/dist/performance/PerformanceMonitor.js.map +1 -1
  86. package/dist/performance/index.d.ts +2 -2
  87. package/dist/performance/index.d.ts.map +1 -1
  88. package/dist/security/AISecurityScanner.d.ts +1 -0
  89. package/dist/security/AISecurityScanner.d.ts.map +1 -1
  90. package/dist/security/AISecurityScanner.js +22 -12
  91. package/dist/security/AISecurityScanner.js.map +1 -1
  92. package/dist/security/AutomatedRemediation.d.ts +4 -3
  93. package/dist/security/AutomatedRemediation.d.ts.map +1 -1
  94. package/dist/security/AutomatedRemediation.js +46 -15
  95. package/dist/security/AutomatedRemediation.js.map +1 -1
  96. package/dist/security/InputValidator.d.ts +13 -9
  97. package/dist/security/InputValidator.d.ts.map +1 -1
  98. package/dist/security/InputValidator.js +4 -2
  99. package/dist/security/InputValidator.js.map +1 -1
  100. package/dist/security/SecurityCIPipeline.d.ts +1 -1
  101. package/dist/security/SecurityCIPipeline.d.ts.map +1 -1
  102. package/dist/security/SecurityCIPipeline.js +38 -29
  103. package/dist/security/SecurityCIPipeline.js.map +1 -1
  104. package/dist/security/SecurityConfig.d.ts +3 -3
  105. package/dist/security/SecurityConfig.d.ts.map +1 -1
  106. package/dist/security/SecurityConfig.js +13 -9
  107. package/dist/security/SecurityConfig.js.map +1 -1
  108. package/dist/security/SecurityConfigManager.d.ts +2 -2
  109. package/dist/security/SecurityConfigManager.d.ts.map +1 -1
  110. package/dist/security/SecurityConfigManager.js +20 -15
  111. package/dist/security/SecurityConfigManager.js.map +1 -1
  112. package/dist/security/SecurityMonitoring.d.ts +2 -2
  113. package/dist/security/SecurityMonitoring.d.ts.map +1 -1
  114. package/dist/security/SecurityMonitoring.js +19 -17
  115. package/dist/security/SecurityMonitoring.js.map +1 -1
  116. package/dist/security/SecurityReviewer.d.ts.map +1 -1
  117. package/dist/security/SecurityReviewer.js +10 -7
  118. package/dist/security/SecurityReviewer.js.map +1 -1
  119. package/dist/security/index.d.ts +24 -23
  120. package/dist/security/index.d.ts.map +1 -1
  121. package/dist/security/index.js +52 -23
  122. package/dist/security/index.js.map +1 -1
  123. package/dist/server/ConnectionTester.d.ts +12 -4
  124. package/dist/server/ConnectionTester.d.ts.map +1 -1
  125. package/dist/server/ConnectionTester.js +96 -22
  126. package/dist/server/ConnectionTester.js.map +1 -1
  127. package/dist/server/ToolRegistry.d.ts +2 -2
  128. package/dist/server/ToolRegistry.d.ts.map +1 -1
  129. package/dist/server/ToolRegistry.js +10 -5
  130. package/dist/server/ToolRegistry.js.map +1 -1
  131. package/dist/tools/BaseToolManager.d.ts +47 -11
  132. package/dist/tools/BaseToolManager.d.ts.map +1 -1
  133. package/dist/tools/BaseToolManager.js +168 -29
  134. package/dist/tools/BaseToolManager.js.map +1 -1
  135. package/dist/tools/auth.d.ts +16 -10
  136. package/dist/tools/auth.d.ts.map +1 -1
  137. package/dist/tools/auth.js +3 -2
  138. package/dist/tools/auth.js.map +1 -1
  139. package/dist/tools/cache.d.ts +30 -30
  140. package/dist/tools/cache.d.ts.map +1 -1
  141. package/dist/tools/cache.js +1 -6
  142. package/dist/tools/cache.js.map +1 -1
  143. package/dist/tools/comments.d.ts +20 -20
  144. package/dist/tools/comments.d.ts.map +1 -1
  145. package/dist/tools/comments.js +16 -9
  146. package/dist/tools/comments.js.map +1 -1
  147. package/dist/tools/media.d.ts +18 -16
  148. package/dist/tools/media.d.ts.map +1 -1
  149. package/dist/tools/media.js +16 -15
  150. package/dist/tools/media.js.map +1 -1
  151. package/dist/tools/pages.d.ts +19 -17
  152. package/dist/tools/pages.d.ts.map +1 -1
  153. package/dist/tools/pages.js +16 -12
  154. package/dist/tools/pages.js.map +1 -1
  155. package/dist/tools/performance.d.ts +11 -1
  156. package/dist/tools/performance.d.ts.map +1 -1
  157. package/dist/tools/performance.js +67 -34
  158. package/dist/tools/performance.js.map +1 -1
  159. package/dist/tools/posts/PostHandlers.d.ts +46 -0
  160. package/dist/tools/posts/PostHandlers.d.ts.map +1 -0
  161. package/dist/tools/posts/PostHandlers.js +400 -0
  162. package/dist/tools/posts/PostHandlers.js.map +1 -0
  163. package/dist/tools/posts/PostToolDefinitions.d.ts +37 -0
  164. package/dist/tools/posts/PostToolDefinitions.d.ts.map +1 -0
  165. package/dist/tools/posts/PostToolDefinitions.js +236 -0
  166. package/dist/tools/posts/PostToolDefinitions.js.map +1 -0
  167. package/dist/tools/posts/index.d.ts +138 -0
  168. package/dist/tools/posts/index.d.ts.map +1 -0
  169. package/dist/tools/posts/index.js +163 -0
  170. package/dist/tools/posts/index.js.map +1 -0
  171. package/dist/tools/posts.d.ts +10 -246
  172. package/dist/tools/posts.d.ts.map +1 -1
  173. package/dist/tools/posts.js +11 -723
  174. package/dist/tools/posts.js.map +1 -1
  175. package/dist/tools/site.d.ts +19 -18
  176. package/dist/tools/site.d.ts.map +1 -1
  177. package/dist/tools/site.js +14 -10
  178. package/dist/tools/site.js.map +1 -1
  179. package/dist/tools/taxonomies.d.ts +23 -24
  180. package/dist/tools/taxonomies.d.ts.map +1 -1
  181. package/dist/tools/taxonomies.js +24 -18
  182. package/dist/tools/taxonomies.js.map +1 -1
  183. package/dist/tools/users.d.ts +20 -15
  184. package/dist/tools/users.d.ts.map +1 -1
  185. package/dist/tools/users.js +12 -8
  186. package/dist/tools/users.js.map +1 -1
  187. package/dist/types/client.d.ts +48 -41
  188. package/dist/types/client.d.ts.map +1 -1
  189. package/dist/types/client.js +30 -5
  190. package/dist/types/client.js.map +1 -1
  191. package/dist/types/enhanced.d.ts +237 -0
  192. package/dist/types/enhanced.d.ts.map +1 -0
  193. package/dist/types/enhanced.js +49 -0
  194. package/dist/types/enhanced.js.map +1 -0
  195. package/dist/types/index.d.ts +15 -12
  196. package/dist/types/index.d.ts.map +1 -1
  197. package/dist/types/index.js +2 -0
  198. package/dist/types/index.js.map +1 -1
  199. package/dist/types/mcp.d.ts +12 -12
  200. package/dist/types/mcp.d.ts.map +1 -1
  201. package/dist/types/requests.d.ts +322 -0
  202. package/dist/types/requests.d.ts.map +1 -0
  203. package/dist/types/requests.js +8 -0
  204. package/dist/types/requests.js.map +1 -0
  205. package/dist/types/tools.d.ts +506 -0
  206. package/dist/types/tools.d.ts.map +1 -0
  207. package/dist/types/tools.js +8 -0
  208. package/dist/types/tools.js.map +1 -0
  209. package/dist/types/wordpress.d.ts +43 -15
  210. package/dist/types/wordpress.d.ts.map +1 -1
  211. package/dist/types/wordpress.js +8 -1
  212. package/dist/types/wordpress.js.map +1 -1
  213. package/dist/utils/debug.d.ts +19 -11
  214. package/dist/utils/debug.d.ts.map +1 -1
  215. package/dist/utils/debug.js +46 -10
  216. package/dist/utils/debug.js.map +1 -1
  217. package/dist/utils/enhancedError.d.ts +8 -8
  218. package/dist/utils/enhancedError.d.ts.map +1 -1
  219. package/dist/utils/enhancedError.js.map +1 -1
  220. package/dist/utils/error.d.ts +2 -4
  221. package/dist/utils/error.d.ts.map +1 -1
  222. package/dist/utils/error.js +42 -5
  223. package/dist/utils/error.js.map +1 -1
  224. package/dist/utils/logger.d.ts +106 -0
  225. package/dist/utils/logger.d.ts.map +1 -0
  226. package/dist/utils/logger.js +280 -0
  227. package/dist/utils/logger.js.map +1 -0
  228. package/dist/utils/streaming.d.ts +9 -9
  229. package/dist/utils/streaming.d.ts.map +1 -1
  230. package/dist/utils/streaming.js +71 -52
  231. package/dist/utils/streaming.js.map +1 -1
  232. package/dist/utils/toolWrapper.d.ts +9 -7
  233. package/dist/utils/toolWrapper.d.ts.map +1 -1
  234. package/dist/utils/toolWrapper.js.map +1 -1
  235. package/dist/utils/validation/core.d.ts +21 -0
  236. package/dist/utils/validation/core.d.ts.map +1 -0
  237. package/dist/utils/validation/core.js +71 -0
  238. package/dist/utils/validation/core.js.map +1 -0
  239. package/dist/utils/validation/index.d.ts +25 -0
  240. package/dist/utils/validation/index.d.ts.map +1 -0
  241. package/dist/utils/validation/index.js +29 -0
  242. package/dist/utils/validation/index.js.map +1 -0
  243. package/dist/utils/validation/network.d.ts +19 -0
  244. package/dist/utils/validation/network.d.ts.map +1 -0
  245. package/dist/utils/validation/network.js +93 -0
  246. package/dist/utils/validation/network.js.map +1 -0
  247. package/dist/utils/validation/rateLimit.d.ts +21 -0
  248. package/dist/utils/validation/rateLimit.d.ts.map +1 -0
  249. package/dist/utils/validation/rateLimit.js +43 -0
  250. package/dist/utils/validation/rateLimit.js.map +1 -0
  251. package/dist/utils/validation/security.d.ts +29 -0
  252. package/dist/utils/validation/security.d.ts.map +1 -0
  253. package/dist/utils/validation/security.js +327 -0
  254. package/dist/utils/validation/security.js.map +1 -0
  255. package/dist/utils/validation/wordpress.d.ts +31 -0
  256. package/dist/utils/validation/wordpress.d.ts.map +1 -0
  257. package/dist/utils/validation/wordpress.js +146 -0
  258. package/dist/utils/validation/wordpress.js.map +1 -0
  259. package/dist/utils/validation.d.ts +13 -82
  260. package/dist/utils/validation.d.ts.map +1 -1
  261. package/dist/utils/validation.js +25 -343
  262. package/dist/utils/validation.js.map +1 -1
  263. package/docs/BADGE_UPDATES.md +132 -0
  264. package/docs/CI_CD_IMPROVEMENTS.md +191 -0
  265. package/docs/INCREMENTAL_COVERAGE.md +183 -0
  266. package/docs/api/README.md +3 -1
  267. package/docs/api/openapi.json +5 -1
  268. package/docs/api/summary.json +1 -1
  269. package/docs/api/tools/wp_create_post.md +12 -14
  270. package/docs/examples/claude-desktop-config.md +1 -1
  271. package/docs/examples/docker-production.md +100 -93
  272. package/docs/examples/multi-site-setup.md +5 -4
  273. package/docs/examples/single-site-setup.md +3 -4
  274. package/docs/examples/use-case-workflows.md +4 -5
  275. package/docs/integrations/claude-desktop.md +31 -31
  276. package/docs/integrations/cline.md +4 -4
  277. package/docs/integrations/vs-code.md +9 -8
  278. package/docs/user-guides/SMITHERY_SETUP.md +10 -10
  279. package/package.json +44 -25
  280. package/src/cache/CacheInvalidation.ts +12 -5
  281. package/src/cache/CacheManager.ts +18 -15
  282. package/src/cache/HttpCacheWrapper.ts +30 -59
  283. package/src/cache/__tests__/HttpCacheWrapper.test.ts +6 -5
  284. package/src/cache/index.ts +3 -14
  285. package/src/client/CachedWordPressClient.ts +32 -30
  286. package/src/client/MockWordPressClient.ts +4 -2
  287. package/src/client/api.ts +186 -64
  288. package/src/client/auth.ts +15 -40
  289. package/src/client/managers/AuthenticationManager.ts +337 -77
  290. package/src/client/managers/BaseManager.ts +18 -30
  291. package/src/client/managers/RequestManager.ts +39 -44
  292. package/src/config/Config.ts +308 -0
  293. package/src/config/ConfigurationSchema.ts +23 -2
  294. package/src/config/ServerConfiguration.ts +51 -47
  295. package/src/docs/DocumentationGenerator.ts +50 -39
  296. package/src/docs/MarkdownFormatter.ts +19 -29
  297. package/src/dxt-entry.cjs +26 -16
  298. package/src/dxt-entry.ts +17 -27
  299. package/src/index.ts +42 -28
  300. package/src/performance/MetricsCollector.ts +108 -86
  301. package/src/performance/PerformanceAnalytics.ts +69 -164
  302. package/src/performance/PerformanceMonitor.ts +32 -47
  303. package/src/performance/index.ts +2 -10
  304. package/src/security/AISecurityScanner.ts +22 -12
  305. package/src/security/AutomatedRemediation.ts +49 -18
  306. package/src/security/InputValidator.ts +9 -6
  307. package/src/security/SecurityCIPipeline.ts +53 -37
  308. package/src/security/SecurityConfig.ts +22 -22
  309. package/src/security/SecurityConfigManager.ts +23 -19
  310. package/src/security/SecurityMonitoring.ts +24 -21
  311. package/src/security/SecurityReviewer.ts +10 -7
  312. package/src/security/index.ts +64 -29
  313. package/src/server/ConnectionTester.ts +120 -31
  314. package/src/server/ToolRegistry.ts +31 -21
  315. package/src/tools/BaseToolManager.ts +286 -33
  316. package/src/tools/auth.ts +20 -8
  317. package/src/tools/cache.ts +5 -15
  318. package/src/tools/comments.ts +34 -48
  319. package/src/tools/media.ts +41 -53
  320. package/src/tools/pages.ts +32 -54
  321. package/src/tools/performance.ts +141 -176
  322. package/src/tools/posts/PostHandlers.ts +474 -0
  323. package/src/tools/posts/PostToolDefinitions.ts +250 -0
  324. package/src/tools/posts/index.ts +192 -0
  325. package/src/tools/posts.ts +24 -780
  326. package/src/tools/site.ts +34 -19
  327. package/src/tools/taxonomies.ts +41 -57
  328. package/src/tools/users.ts +28 -16
  329. package/src/types/client.ts +114 -138
  330. package/src/types/enhanced.ts +318 -0
  331. package/src/types/index.ts +51 -30
  332. package/src/types/mcp.ts +20 -42
  333. package/src/types/requests.ts +378 -0
  334. package/src/types/tools.ts +608 -0
  335. package/src/types/wordpress.ts +56 -34
  336. package/src/utils/debug.ts +77 -59
  337. package/src/utils/enhancedError.ts +8 -8
  338. package/src/utils/error.ts +53 -31
  339. package/src/utils/logger.ts +351 -0
  340. package/src/utils/streaming.ts +86 -68
  341. package/src/utils/toolWrapper.ts +10 -12
  342. package/src/utils/validation/core.ts +108 -0
  343. package/src/utils/validation/index.ts +36 -0
  344. package/src/utils/validation/network.ts +132 -0
  345. package/src/utils/validation/rateLimit.ts +54 -0
  346. package/src/utils/validation/security.ts +361 -0
  347. package/src/utils/validation/wordpress.ts +180 -0
  348. package/src/utils/validation.ts +47 -470
@@ -7,6 +7,8 @@ import { CachedWordPressClient } from "../client/CachedWordPressClient.js";
7
7
  import { MockWordPressClient } from "../client/MockWordPressClient.js";
8
8
  import { WordPressClientConfig } from "../types/client.js";
9
9
  import { getErrorMessage } from "../utils/error.js";
10
+ import { LoggerFactory } from "../utils/logger.js";
11
+ import { ConfigHelpers } from "./Config.js";
10
12
  import {
11
13
  ConfigurationValidator,
12
14
  type SiteType as SiteConfig,
@@ -15,7 +17,7 @@ import {
15
17
  } from "./ConfigurationSchema.js";
16
18
 
17
19
  // Re-export types from schema for backward compatibility
18
- export type { SiteConfig, MultiSiteConfig };
20
+ export type { SiteConfig, MultiSiteConfig, McpConfigType };
19
21
 
20
22
  /**
21
23
  * Configuration loader for MCP WordPress Server
@@ -23,6 +25,7 @@ export type { SiteConfig, MultiSiteConfig };
23
25
  */
24
26
  export class ServerConfiguration {
25
27
  private static instance: ServerConfiguration;
28
+ private readonly logger = LoggerFactory.server();
26
29
  private rootDir: string;
27
30
  private envPath: string;
28
31
 
@@ -36,12 +39,12 @@ export class ServerConfiguration {
36
39
  dotenv.config({ path: this.envPath });
37
40
 
38
41
  // Debug output for DXT troubleshooting (reduced in DXT mode)
39
- const isDXTMode = process.env.NODE_ENV === "dxt";
40
- if (!isDXTMode && process.env.DEBUG === "true") {
41
- console.error("DEBUG: ServerConfiguration initialized");
42
- console.error(`DEBUG: Root directory: ${this.rootDir}`);
43
- console.error(`DEBUG: Environment file path: ${this.envPath}`);
44
- console.error(`DEBUG: Environment file exists: ${fs.existsSync(this.envPath)}`);
42
+ if (ConfigHelpers.shouldDebug()) {
43
+ this.logger.debug("ServerConfiguration initialized", {
44
+ rootDir: this.rootDir,
45
+ envPath: this.envPath,
46
+ envFileExists: fs.existsSync(this.envPath),
47
+ });
45
48
  }
46
49
  }
47
50
 
@@ -66,15 +69,15 @@ export class ServerConfiguration {
66
69
  const configPath = path.resolve(this.rootDir, "mcp-wordpress.config.json");
67
70
 
68
71
  if (fs.existsSync(configPath)) {
69
- if (process.env.NODE_ENV !== "test") {
70
- console.error("INFO: Found mcp-wordpress.config.json, loading multi-site configuration.");
72
+ if (ConfigHelpers.shouldLogInfo()) {
73
+ this.logger.info("Found multi-site configuration file", { configPath });
71
74
  }
72
75
  return this.loadMultiSiteConfig(configPath);
73
76
  } else {
74
- if (process.env.NODE_ENV !== "test") {
75
- console.error(
76
- "INFO: mcp-wordpress.config.json not found, falling back to environment variables for single-site mode.",
77
- );
77
+ if (ConfigHelpers.shouldLogInfo()) {
78
+ this.logger.info("Multi-site config not found, using environment variables for single-site mode", {
79
+ configPath,
80
+ });
78
81
  }
79
82
  return this.loadSingleSiteFromEnv(mcpConfig);
80
83
  }
@@ -108,21 +111,27 @@ export class ServerConfiguration {
108
111
  };
109
112
 
110
113
  // Use cached client for better performance
111
- const client =
112
- process.env.DISABLE_CACHE === "true"
113
- ? new WordPressClient(clientConfig)
114
- : new CachedWordPressClient(clientConfig, site.id);
114
+ const client = ConfigHelpers.shouldUseCache()
115
+ ? new CachedWordPressClient(clientConfig, site.id)
116
+ : new WordPressClient(clientConfig);
115
117
  clients.set(site.id, client);
116
118
  validConfigs.push(site);
117
119
 
118
- if (process.env.NODE_ENV !== "test") {
119
- console.error(`INFO: Initialized client for site: ${site.name} (ID: ${site.id})`);
120
+ if (ConfigHelpers.shouldLogInfo()) {
121
+ this.logger.info("Initialized site client", {
122
+ siteName: site.name,
123
+ siteId: site.id,
124
+ authMethod: site.config.WORDPRESS_AUTH_METHOD,
125
+ });
120
126
  }
121
127
  }
122
128
 
123
129
  return { clients, configs: validConfigs };
124
130
  } catch (error) {
125
- console.error(`FATAL: Error reading or parsing mcp-wordpress.config.json: ${getErrorMessage(error)}`);
131
+ this.logger.fatal("Failed to load multi-site configuration", {
132
+ configPath,
133
+ error: getErrorMessage(error),
134
+ });
126
135
  process.exit(1);
127
136
  }
128
137
  }
@@ -131,14 +140,7 @@ export class ServerConfiguration {
131
140
  * Check if we're in CI environment
132
141
  */
133
142
  private isCIEnvironment(): boolean {
134
- return (
135
- process.env.CI === "true" ||
136
- process.env.NODE_ENV === "ci" ||
137
- process.env.NODE_ENV === "test" ||
138
- process.env.GITHUB_ACTIONS === "true" ||
139
- process.env.TRAVIS === "true" ||
140
- process.env.CIRCLECI === "true"
141
- );
143
+ return ConfigHelpers.isCI();
142
144
  }
143
145
 
144
146
  /**
@@ -175,7 +177,7 @@ export class ServerConfiguration {
175
177
  config: mockConfig,
176
178
  };
177
179
 
178
- console.error("INFO: Using mock configuration for CI environment.");
180
+ this.logger.info("Using mock configuration for CI environment");
179
181
  return { clients, configs: [siteConfig] };
180
182
  }
181
183
 
@@ -189,14 +191,14 @@ export class ServerConfiguration {
189
191
  try {
190
192
  // Debug output for DXT troubleshooting (reduced in DXT mode)
191
193
  const isDXTMode = process.env.NODE_ENV === "dxt";
192
- if (!isDXTMode) {
193
- console.error("DEBUG: loadSingleSiteFromEnv called");
194
- console.error(`DEBUG: mcpConfig provided: ${mcpConfig ? "YES" : "NO"}`);
195
- console.error("DEBUG: Current environment variables:");
196
- console.error(` WORDPRESS_SITE_URL: ${process.env.WORDPRESS_SITE_URL || "NOT SET"}`);
197
- console.error(` WORDPRESS_USERNAME: ${process.env.WORDPRESS_USERNAME || "NOT SET"}`);
198
- console.error(` WORDPRESS_APP_PASSWORD: ${process.env.WORDPRESS_APP_PASSWORD ? "SET" : "NOT SET"}`);
199
- console.error(` WORDPRESS_AUTH_METHOD: ${process.env.WORDPRESS_AUTH_METHOD || "NOT SET"}`);
194
+ if (!isDXTMode && ConfigHelpers.shouldDebug()) {
195
+ this.logger.debug("Loading single-site configuration from environment", {
196
+ mcpConfigProvided: Boolean(mcpConfig),
197
+ siteUrl: process.env.WORDPRESS_SITE_URL || "NOT SET",
198
+ username: process.env.WORDPRESS_USERNAME || "NOT SET",
199
+ appPasswordSet: Boolean(process.env.WORDPRESS_APP_PASSWORD),
200
+ authMethod: process.env.WORDPRESS_AUTH_METHOD || "NOT SET",
201
+ });
200
202
  }
201
203
 
202
204
  // Check if we're in CI environment and credentials are missing
@@ -220,12 +222,13 @@ export class ServerConfiguration {
220
222
  LOG_LEVEL: process.env.LOG_LEVEL,
221
223
  };
222
224
 
223
- if (!isDXTMode) {
224
- console.error("DEBUG: Final envConfig for validation:");
225
- console.error(` WORDPRESS_SITE_URL: ${envConfig.WORDPRESS_SITE_URL || "NOT SET"}`);
226
- console.error(` WORDPRESS_USERNAME: ${envConfig.WORDPRESS_USERNAME || "NOT SET"}`);
227
- console.error(` WORDPRESS_APP_PASSWORD: ${envConfig.WORDPRESS_APP_PASSWORD ? "SET" : "NOT SET"}`);
228
- console.error(` WORDPRESS_AUTH_METHOD: ${envConfig.WORDPRESS_AUTH_METHOD || "NOT SET"}`);
225
+ if (!isDXTMode && ConfigHelpers.shouldDebug()) {
226
+ this.logger.debug("Final environment configuration for validation", {
227
+ siteUrl: envConfig.WORDPRESS_SITE_URL || "NOT SET",
228
+ username: envConfig.WORDPRESS_USERNAME || "NOT SET",
229
+ appPasswordSet: Boolean(envConfig.WORDPRESS_APP_PASSWORD),
230
+ authMethod: envConfig.WORDPRESS_AUTH_METHOD || "NOT SET",
231
+ });
229
232
  }
230
233
 
231
234
  // Validate environment configuration using Zod schema
@@ -260,14 +263,15 @@ export class ServerConfiguration {
260
263
  };
261
264
 
262
265
  if (!isDXTMode) {
263
- console.error("INFO: Initialized client for default site in single-site mode.");
266
+ this.logger.info("Initialized default site client in single-site mode");
264
267
  }
265
268
 
266
269
  return { clients, configs: [siteConfig] };
267
270
  } catch (error) {
268
- console.error("ERROR: Configuration validation failed for single-site mode.");
269
- console.error(`Details: ${getErrorMessage(error)}`);
270
- console.error("Please check your environment variables or MCP configuration.");
271
+ this.logger.error("Configuration validation failed for single-site mode", {
272
+ error: getErrorMessage(error),
273
+ suggestion: "Please check your environment variables or MCP configuration",
274
+ });
271
275
  return { clients: new Map(), configs: [] };
272
276
  }
273
277
  }
@@ -7,6 +7,7 @@ import * as fs from "fs";
7
7
  import * as path from "path";
8
8
  import * as Tools from "../tools/index.js";
9
9
  import type { ToolDefinition } from "../server/ToolRegistry.js";
10
+ import { LoggerFactory } from "../utils/logger.js";
10
11
 
11
12
  export interface DocumentationConfig {
12
13
  outputDir: string;
@@ -35,7 +36,7 @@ export interface ParameterDocumentation {
35
36
  type: string;
36
37
  required: boolean;
37
38
  description: string;
38
- defaultValue: any;
39
+ defaultValue: unknown;
39
40
  allowedValues: string[] | undefined;
40
41
  examples: string[];
41
42
  }
@@ -44,11 +45,11 @@ export interface ExampleUsage {
44
45
  title: string;
45
46
  description: string;
46
47
  command: string;
47
- parameters: Record<string, any>;
48
- expectedResponse: any;
48
+ parameters: Record<string, unknown>;
49
+ expectedResponse: unknown;
49
50
  errorExample?: {
50
51
  scenario: string;
51
- error: any;
52
+ error: unknown;
52
53
  };
53
54
  }
54
55
 
@@ -79,7 +80,7 @@ export interface TypeDocumentation {
79
80
  name: string;
80
81
  description: string;
81
82
  properties: PropertyDocumentation[];
82
- examples: any[];
83
+ examples: unknown[];
83
84
  wordpressSource?: string;
84
85
  }
85
86
 
@@ -93,9 +94,9 @@ export interface PropertyDocumentation {
93
94
 
94
95
  export interface OpenAPISpecification {
95
96
  openapi: string;
96
- info: any;
97
- paths: Record<string, any>;
98
- components: Record<string, any>;
97
+ info: Record<string, unknown>;
98
+ paths: Record<string, unknown>;
99
+ components: Record<string, unknown>;
99
100
  }
100
101
 
101
102
  export interface DocumentationSummary {
@@ -118,6 +119,7 @@ export class DocumentationGenerator {
118
119
  private config: DocumentationConfig;
119
120
  private toolCategories: Map<string, string[]> = new Map();
120
121
  private wordpressEndpoints: Map<string, string> = new Map();
122
+ private logger = LoggerFactory.api();
121
123
 
122
124
  constructor(config: Partial<DocumentationConfig> = {}) {
123
125
  this.config = {
@@ -138,7 +140,7 @@ export class DocumentationGenerator {
138
140
  * Generate complete documentation for all tools and types
139
141
  */
140
142
  async generateFullDocumentation(): Promise<DocumentationOutput> {
141
- console.error("🚀 Starting API documentation generation...");
143
+ this.logger.info("🚀 Starting API documentation generation...");
142
144
 
143
145
  const tools = await this.extractAllToolDocumentation();
144
146
  const categories = this.generateCategoryDocumentation(tools);
@@ -162,7 +164,7 @@ export class DocumentationGenerator {
162
164
  // Write documentation to files
163
165
  await this.writeDocumentationFiles(output);
164
166
 
165
- console.error(`✅ Documentation generation complete! ${tools.length} tools documented.`);
167
+ this.logger.info(`✅ Documentation generation complete! ${tools.length} tools documented.`);
166
168
  return output;
167
169
  }
168
170
 
@@ -176,23 +178,23 @@ export class DocumentationGenerator {
176
178
  for (const [className, ToolClass] of Object.entries(Tools)) {
177
179
  try {
178
180
  // Create tool instance
179
- let toolInstance: any;
181
+ let toolInstance: { getTools(): unknown[] };
180
182
  if (className === "CacheTools" || className === "PerformanceTools") {
181
183
  // These tools need client map - use empty map for doc generation
182
184
  toolInstance = new ToolClass(new Map());
183
185
  } else {
184
- toolInstance = new (ToolClass as new () => any)();
186
+ toolInstance = new (ToolClass as new () => { getTools(): unknown[] })();
185
187
  }
186
188
 
187
189
  const toolDefinitions = toolInstance.getTools();
188
190
  const category = this.extractCategoryFromClassName(className);
189
191
 
190
192
  for (const toolDef of toolDefinitions) {
191
- const doc = await this.extractToolDocumentation(toolDef, category, className);
193
+ const doc = await this.extractToolDocumentation(toolDef as ToolDefinition, category, className);
192
194
  toolDocs.push(doc);
193
195
  }
194
196
  } catch (error) {
195
- console.warn(`⚠️ Failed to extract documentation for ${className}:`, error);
197
+ this.logger.warn(`⚠️ Failed to extract documentation for ${className}:`, { error: String(error) });
196
198
  }
197
199
  }
198
200
 
@@ -231,7 +233,15 @@ export class DocumentationGenerator {
231
233
  /**
232
234
  * Extract parameter documentation
233
235
  */
234
- private extractParameterDocumentation(parameters: any[]): ParameterDocumentation[] {
236
+ private extractParameterDocumentation(
237
+ parameters: Array<{
238
+ name: string;
239
+ type?: string;
240
+ description?: string;
241
+ required?: boolean;
242
+ [key: string]: unknown;
243
+ }>,
244
+ ): ParameterDocumentation[] {
235
245
  return parameters.map((param) => ({
236
246
  name: param.name,
237
247
  type: param.type || "string",
@@ -277,7 +287,7 @@ export class DocumentationGenerator {
277
287
  */
278
288
  private generateBasicExample(toolDef: ToolDefinition, category: string): ExampleUsage | null {
279
289
  const toolName = toolDef.name;
280
- const basicParams: Record<string, any> = {};
290
+ const basicParams: Record<string, unknown> = {};
281
291
 
282
292
  // Add essential parameters
283
293
  const requiredParams = (toolDef.parameters || []).filter((p) => p.required);
@@ -406,8 +416,8 @@ export class DocumentationGenerator {
406
416
  * Generate OpenAPI specification
407
417
  */
408
418
  private generateOpenAPISpecification(tools: ToolDocumentation[], types: TypeDocumentation[]): OpenAPISpecification {
409
- const paths: Record<string, any> = {};
410
- const components: Record<string, any> = {
419
+ const paths: Record<string, unknown> = {};
420
+ const components: Record<string, unknown> = {
411
421
  schemas: {},
412
422
  parameters: {},
413
423
  responses: {},
@@ -453,8 +463,9 @@ export class DocumentationGenerator {
453
463
  }
454
464
 
455
465
  // Add type schemas to components
466
+ const schemas = components.schemas as Record<string, unknown>;
456
467
  for (const type of types) {
457
- components.schemas[type.name] = this.convertTypeToJsonSchema(type);
468
+ schemas[type.name] = this.convertTypeToJsonSchema(type);
458
469
  }
459
470
 
460
471
  return {
@@ -520,7 +531,7 @@ export class DocumentationGenerator {
520
531
  // Write summary
521
532
  await fs.promises.writeFile(path.join(outputDir, "summary.json"), JSON.stringify(output.summary, null, 2));
522
533
 
523
- console.error(`📁 Documentation written to ${outputDir}/`);
534
+ this.logger.info(`📁 Documentation written to ${outputDir}/`);
524
535
  }
525
536
 
526
537
  // Helper methods for specific documentation tasks...
@@ -582,8 +593,8 @@ export class DocumentationGenerator {
582
593
  * Helper methods for documentation generation
583
594
  */
584
595
 
585
- private getDefaultValue(param: any): any {
586
- const defaults: Record<string, any> = {
596
+ private getDefaultValue(param: { [key: string]: unknown }): unknown {
597
+ const defaults: Record<string, unknown> = {
587
598
  per_page: 10,
588
599
  page: 1,
589
600
  order: "desc",
@@ -594,10 +605,10 @@ export class DocumentationGenerator {
594
605
  includeExamples: true,
595
606
  includeTrends: true,
596
607
  };
597
- return defaults[param.name];
608
+ return defaults[String(param.name)];
598
609
  }
599
610
 
600
- private getAllowedValues(param: any): string[] | undefined {
611
+ private getAllowedValues(param: { [key: string]: unknown }): string[] | undefined {
601
612
  const allowedValues: Record<string, string[]> = {
602
613
  status: ["publish", "draft", "private", "pending", "future"],
603
614
  order: ["asc", "desc"],
@@ -608,10 +619,10 @@ export class DocumentationGenerator {
608
619
  priority: ["quick_wins", "medium_term", "long_term", "all"],
609
620
  focus: ["speed", "reliability", "efficiency", "scaling"],
610
621
  };
611
- return allowedValues[param.name];
622
+ return allowedValues[String(param.name)];
612
623
  }
613
624
 
614
- private generateParameterExamples(param: any): string[] {
625
+ private generateParameterExamples(param: { name: string; type?: string; [key: string]: unknown }): string[] {
615
626
  const examples: Record<string, string[]> = {
616
627
  id: ["123", "456"],
617
628
  title: ["My Blog Post", "Hello World"],
@@ -633,8 +644,8 @@ export class DocumentationGenerator {
633
644
  return toolDef.parameters?.some((p) => p.name === "site") ?? true;
634
645
  }
635
646
 
636
- private generateExampleValue(param: any): any {
637
- const exampleValues: Record<string, any> = {
647
+ private generateExampleValue(param: { name: string; type?: string; [key: string]: unknown }): unknown {
648
+ const exampleValues: Record<string, unknown> = {
638
649
  id: 123,
639
650
  title: "Example Post Title",
640
651
  content: "This is example content for the post.",
@@ -656,7 +667,7 @@ export class DocumentationGenerator {
656
667
  return exampleValues[param.name] || "example_value";
657
668
  }
658
669
 
659
- private generateExpectedResponse(toolName: string, category: string, type: string): any {
670
+ private generateExpectedResponse(toolName: string, category: string, type: string): unknown {
660
671
  if (toolName.includes("list")) {
661
672
  return {
662
673
  success: true,
@@ -724,8 +735,8 @@ export class DocumentationGenerator {
724
735
  };
725
736
  }
726
737
 
727
- private getExampleParameters(toolDef: ToolDefinition, type: string | number): Record<string, any> {
728
- const params: Record<string, any> = {};
738
+ private getExampleParameters(toolDef: ToolDefinition, type: string | number): Record<string, unknown> {
739
+ const params: Record<string, unknown> = {};
729
740
  const parameters = toolDef.parameters || [];
730
741
 
731
742
  if (type === "all") {
@@ -795,7 +806,7 @@ export class DocumentationGenerator {
795
806
  );
796
807
  }
797
808
 
798
- private generateWordPressPostExample(): any {
809
+ private generateWordPressPostExample(): Record<string, unknown> {
799
810
  return {
800
811
  id: 123,
801
812
  title: "Welcome to WordPress",
@@ -811,8 +822,8 @@ export class DocumentationGenerator {
811
822
  };
812
823
  }
813
824
 
814
- private generateParameterSchema(parameters: ParameterDocumentation[]): any {
815
- const properties: Record<string, any> = {};
825
+ private generateParameterSchema(parameters: ParameterDocumentation[]): Record<string, unknown> {
826
+ const properties: Record<string, unknown> = {};
816
827
  const required: string[] = [];
817
828
 
818
829
  for (const param of parameters) {
@@ -822,11 +833,11 @@ export class DocumentationGenerator {
822
833
  };
823
834
 
824
835
  if (param.allowedValues) {
825
- properties[param.name].enum = param.allowedValues;
836
+ (properties[param.name] as Record<string, unknown>).enum = param.allowedValues;
826
837
  }
827
838
 
828
839
  if (param.defaultValue !== undefined) {
829
- properties[param.name].default = param.defaultValue;
840
+ (properties[param.name] as Record<string, unknown>).default = param.defaultValue;
830
841
  }
831
842
 
832
843
  if (param.required) {
@@ -841,8 +852,8 @@ export class DocumentationGenerator {
841
852
  };
842
853
  }
843
854
 
844
- private convertTypeToJsonSchema(type: TypeDocumentation): any {
845
- const properties: Record<string, any> = {};
855
+ private convertTypeToJsonSchema(type: TypeDocumentation): Record<string, unknown> {
856
+ const properties: Record<string, unknown> = {};
846
857
  const required: string[] = [];
847
858
 
848
859
  for (const prop of type.properties) {
@@ -852,7 +863,7 @@ export class DocumentationGenerator {
852
863
  };
853
864
 
854
865
  if (prop.format) {
855
- properties[prop.name].format = prop.format;
866
+ (properties[prop.name] as Record<string, unknown>).format = prop.format;
856
867
  }
857
868
 
858
869
  if (prop.required) {
@@ -256,25 +256,20 @@ ${type.examples.length > 1 ? this.generateAdditionalExamples(type.examples.slice
256
256
  /**
257
257
  * Generate parameters table
258
258
  */
259
- private generateParametersTable(
260
- parameters: ParameterDocumentation[],
261
- ): string {
259
+ private generateParametersTable(parameters: ParameterDocumentation[]): string {
262
260
  if (parameters.length === 0) {
263
261
  return "*No parameters required.*";
264
262
  }
265
263
 
266
- const headers =
267
- "| Parameter | Type | Required | Description | Default | Examples |";
268
- const separator =
269
- "|-----------|------|----------|-------------|---------|----------|";
264
+ const headers = "| Parameter | Type | Required | Description | Default | Examples |";
265
+ const separator = "|-----------|------|----------|-------------|---------|----------|";
270
266
 
271
267
  const rows = parameters.map((param) => {
272
268
  const examples = param.examples
273
269
  .slice(0, 2)
274
270
  .map((ex) => `\`${ex}\``)
275
271
  .join(", ");
276
- const defaultVal =
277
- param.defaultValue !== undefined ? `\`${param.defaultValue}\`` : "-";
272
+ const defaultVal = param.defaultValue !== undefined ? `\`${param.defaultValue}\`` : "-";
278
273
  const required = param.required ? "✅" : "❌";
279
274
 
280
275
  return `| \`${param.name}\` | \`${param.type}\` | ${required} | ${param.description} | ${defaultVal} | ${examples || "-"} |`;
@@ -316,10 +311,7 @@ ${example.errorExample ? this.generateErrorExample(example.errorExample) : ""}
316
311
  /**
317
312
  * Generate error example
318
313
  */
319
- private generateErrorExample(errorExample: {
320
- scenario: string;
321
- error: any;
322
- }): string {
314
+ private generateErrorExample(errorExample: { scenario: string; error: unknown }): string {
323
315
  return `**Error Example (${errorExample.scenario}):**
324
316
  \`\`\`json
325
317
  ${JSON.stringify(errorExample.error, null, 2)}
@@ -378,7 +370,7 @@ ${permissions.map((perm) => `- \`${perm}\``).join("\n")}
378
370
  /**
379
371
  * Generate error documentation
380
372
  */
381
- private generateErrorDocumentation(errorCodes: any[]): string {
373
+ private generateErrorDocumentation(errorCodes: unknown[]): string {
382
374
  if (errorCodes.length === 0) {
383
375
  return `### Common Errors
384
376
 
@@ -392,11 +384,11 @@ See [Error Handling Guide](../error-handling.md) for complete error reference.`;
392
384
 
393
385
  return errorCodes
394
386
  .map(
395
- (error) => `### ${error.code}
387
+ (error) => `### ${(error as Record<string, unknown>).code}
396
388
 
397
- **Message:** ${error.message}
398
- **Description:** ${error.description}
399
- **Resolution:** ${error.resolution}
389
+ **Message:** ${(error as Record<string, unknown>).message}
390
+ **Description:** ${(error as Record<string, unknown>).description}
391
+ **Resolution:** ${(error as Record<string, unknown>).resolution}
400
392
  `,
401
393
  )
402
394
  .join("\n\n");
@@ -420,8 +412,7 @@ ${relatedTools.map((tool) => `- [\`${tool}\`](./${tool}.md)`).join("\n")}
420
412
  const separator = "|----------|-------|-------------|";
421
413
 
422
414
  const rows = categories.map(
423
- (cat) =>
424
- `| [${cat.name}](./categories/${cat.name.toLowerCase()}.md) | ${cat.toolCount} | ${cat.description} |`,
415
+ (cat) => `| [${cat.name}](./categories/${cat.name.toLowerCase()}.md) | ${cat.toolCount} | ${cat.description} |`,
425
416
  );
426
417
 
427
418
  return [headers, separator, ...rows].join("\n");
@@ -435,8 +426,7 @@ ${relatedTools.map((tool) => `- [\`${tool}\`](./${tool}.md)`).join("\n")}
435
426
  const separator = "|------|----------|-------------|";
436
427
 
437
428
  const rows = tools.map(
438
- (tool) =>
439
- `| [\`${tool.name}\`](./tools/${tool.name}.md) | ${tool.category} | ${tool.description} |`,
429
+ (tool) => `| [\`${tool.name}\`](./tools/${tool.name}.md) | ${tool.category} | ${tool.description} |`,
440
430
  );
441
431
 
442
432
  return [headers, separator, ...rows].join("\n");
@@ -445,13 +435,14 @@ ${relatedTools.map((tool) => `- [\`${tool}\`](./${tool}.md)`).join("\n")}
445
435
  /**
446
436
  * Generate type properties table
447
437
  */
448
- private generateTypePropertiesTable(properties: any[]): string {
438
+ private generateTypePropertiesTable(properties: unknown[]): string {
449
439
  const headers = "| Property | Type | Required | Description |";
450
440
  const separator = "|----------|------|----------|-------------|";
451
441
 
452
442
  const rows = properties.map((prop) => {
453
- const required = prop.required ? "✅" : "❌";
454
- return `| \`${prop.name}\` | \`${prop.type}\` | ${required} | ${prop.description} |`;
443
+ const propObj = prop as Record<string, unknown>;
444
+ const required = propObj.required ? "✅" : "❌";
445
+ return `| \`${propObj.name}\` | \`${propObj.type}\` | ${required} | ${propObj.description} |`;
455
446
  });
456
447
 
457
448
  return [headers, separator, ...rows].join("\n");
@@ -486,15 +477,14 @@ ${relatedTools.map((tool) => `- [\`${tool}\`](./${tool}.md)`).join("\n")}
486
477
  performance: "brightgreen",
487
478
  };
488
479
 
489
- const color =
490
- colors[category.toLowerCase() as keyof typeof colors] || "lightgrey";
480
+ const color = colors[category.toLowerCase() as keyof typeof colors] || "lightgrey";
491
481
  return `![${category}](https://img.shields.io/badge/category-${category}-${color})`;
492
482
  }
493
483
 
494
484
  /**
495
485
  * Format parameters for command examples
496
486
  */
497
- private formatParameters(params: Record<string, any>): string {
487
+ private formatParameters(params: Record<string, unknown>): string {
498
488
  return Object.entries(params)
499
489
  .map(([key, value]) => `--${key}="${value}"`)
500
490
  .join(" ");
@@ -503,7 +493,7 @@ ${relatedTools.map((tool) => `- [\`${tool}\`](./${tool}.md)`).join("\n")}
503
493
  /**
504
494
  * Generate additional examples
505
495
  */
506
- private generateAdditionalExamples(examples: any[]): string {
496
+ private generateAdditionalExamples(examples: unknown[]): string {
507
497
  return `## Additional Examples
508
498
 
509
499
  ${examples