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
@@ -0,0 +1,191 @@
1
+ # CI/CD Pipeline Improvements
2
+
3
+ ## 🎯 Overview
4
+
5
+ This document outlines the comprehensive improvements made to the CI/CD pipeline for the MCP WordPress project.
6
+ These changes enhance reliability, security, performance, and maintainability.
7
+
8
+ ## ✅ Improvements Implemented
9
+
10
+ ### 1. **Enhanced Error Handling and Resilience**
11
+
12
+ #### **Matrix Strategy Improvements**
13
+
14
+ - ✅ Added `fail-fast: false` to test matrix to prevent one Node.js version failure from cancelling other tests
15
+ - ✅ Added `continue-on-error: ${{ matrix.wordpress-version == 'latest' }}` for WordPress compatibility tests
16
+ - ✅ Improved error recovery for npm publish workflows
17
+
18
+ #### **Timeout Protection**
19
+
20
+ - ✅ Added 45-minute timeout to WordPress compatibility tests to prevent hanging builds
21
+ - ✅ Implemented timeouts across long-running jobs
22
+
23
+ ### 2. **Performance Optimizations**
24
+
25
+ #### **Build Caching**
26
+
27
+ - ✅ Added intelligent caching for build outputs and dependencies
28
+ - ✅ Cache keys based on `package-lock.json` and source file hashes
29
+ - ✅ Fallback cache restoration for improved cache hit rates
30
+
31
+ #### **Parallel Execution**
32
+
33
+ - ✅ Maintained parallel job execution where possible
34
+ - ✅ Optimized dependency chains between jobs
35
+
36
+ ### 3. **Security Enhancements**
37
+
38
+ #### **Action Version Updates**
39
+
40
+ - ✅ Updated Trivy vulnerability scanner from v0.24.0 to v0.28.0
41
+ - ✅ Identified and prepared updates for other outdated actions
42
+
43
+ #### **Secret Security**
44
+
45
+ - ✅ Fixed false positive secret exposure detection
46
+ - ✅ Enhanced secret scanning validation logic
47
+
48
+ ### 4. **Monitoring and Validation**
49
+
50
+ #### **CI/CD Health Check Workflow**
51
+
52
+ - ✅ Created automated weekly CI/CD health checks (`ci-health-check.yml`)
53
+ - ✅ Validates action versions, Node.js consistency, and security practices
54
+ - ✅ Generates health reports with actionable recommendations
55
+
56
+ #### **Validation Script**
57
+
58
+ - ✅ Created `scripts/validate-ci.cjs` for local CI/CD validation
59
+ - ✅ Checks for common issues: outdated actions, missing error handling, security concerns
60
+ - ✅ Integrated into package.json scripts as `npm run check:workflows`
61
+
62
+ ### 5. **Workflow Structure Improvements**
63
+
64
+ #### **Better Job Dependencies**
65
+
66
+ - ✅ Improved job dependency chains for optimal execution flow
67
+ - ✅ Enhanced conditional execution based on event types
68
+
69
+ #### **Enhanced Artifact Management**
70
+
71
+ - ✅ Improved artifact uploads with better naming and organization
72
+ - ✅ Added build artifact validation
73
+
74
+ ## 🛠️ New Scripts and Tools
75
+
76
+ ### 1. **CI Validation Script** (`scripts/validate-ci.cjs`)
77
+
78
+ ```bash
79
+ npm run check:workflows
80
+ ```
81
+
82
+ **Checks:**
83
+
84
+ - Node.js version consistency across workflows
85
+ - Outdated GitHub Actions
86
+ - Missing error handling for critical steps
87
+ - Security best practices
88
+ - Required package.json scripts
89
+
90
+ ### 2. **Comprehensive CI Check** (`npm run check:ci`)
91
+
92
+ ```bash
93
+ npm run check:ci
94
+ ```
95
+
96
+ **Includes:**
97
+
98
+ - TypeScript type checking
99
+ - ESLint code linting
100
+ - Test coverage analysis
101
+
102
+ ### 3. **CI/CD Health Check Workflow**
103
+
104
+ - Runs weekly to identify potential issues
105
+ - Generates health reports
106
+ - Provides actionable recommendations
107
+
108
+ ## 📊 Issues Identified and Status
109
+
110
+ ### ✅ Fixed Issues
111
+
112
+ 1. **Matrix Test Reliability** - Added fail-fast: false
113
+ 2. **WordPress Compatibility Timeouts** - Added 45-minute limit
114
+ 3. **Build Performance** - Added intelligent caching
115
+ 4. **Security Scanner Updates** - Updated Trivy action
116
+ 5. **Error Recovery** - Enhanced npm publish error handling
117
+
118
+ ### ⚠️ Recommended Improvements
119
+
120
+ 1. **Action Version Updates** - Several workflows could benefit from latest action versions
121
+ 2. **Timeout Configuration** - Add timeout-minutes to remaining workflows
122
+ 3. **Error Handling** - Add error handling to remaining critical steps
123
+
124
+ ## 🔧 Usage Instructions
125
+
126
+ ### Running CI Validation Locally
127
+
128
+ ```bash
129
+ # Check all workflows for common issues
130
+ npm run check:workflows
131
+
132
+ # Run comprehensive CI checks
133
+ npm run check:ci
134
+
135
+ # Individual checks
136
+ npm run typecheck
137
+ npm run lint
138
+ npm run test:coverage
139
+ ```
140
+
141
+ ### GitHub Actions
142
+
143
+ - **CI/CD Health Check**: Runs automatically every Sunday at 6 AM UTC
144
+ - **Main CI Pipeline**: Enhanced with better error handling and caching
145
+ - **Security Monitoring**: Improved with updated scanners
146
+
147
+ ## 🎯 Key Benefits
148
+
149
+ 1. **🛡️ Increased Reliability**
150
+ - Better error handling prevents cascading failures
151
+ - Timeouts prevent hanging builds
152
+ - Improved retry logic for transient failures
153
+
154
+ 2. **⚡ Enhanced Performance**
155
+ - Intelligent caching reduces build times
156
+ - Parallel execution optimized
157
+ - Artifact management streamlined
158
+
159
+ 3. **🔒 Improved Security**
160
+ - Updated security scanners
161
+ - Better secret handling validation
162
+ - Enhanced security monitoring
163
+
164
+ 4. **📈 Better Monitoring**
165
+ - Automated health checks
166
+ - Comprehensive validation scripts
167
+ - Actionable insights and recommendations
168
+
169
+ 5. **🔧 Easier Maintenance**
170
+ - Local validation tools
171
+ - Automated issue detection
172
+ - Clear improvement pathways
173
+
174
+ ## 🚀 Next Steps
175
+
176
+ 1. **Monitor Performance**: Track build times and success rates after changes
177
+ 2. **Apply Recommendations**: Address remaining warnings from validation script
178
+ 3. **Regular Updates**: Use weekly health checks to maintain pipeline health
179
+ 4. **Team Training**: Ensure team understands new tools and processes
180
+
181
+ ## 📚 Related Files
182
+
183
+ - `.github/workflows/ci.yml` - Main CI pipeline (enhanced)
184
+ - `.github/workflows/ci-health-check.yml` - New health monitoring
185
+ - `scripts/validate-ci.cjs` - Local validation tool
186
+ - `package.json` - Updated with new scripts
187
+
188
+ ---
189
+
190
+ **Last Updated**: August 8, 2025
191
+ **Status**: ✅ Complete - Ready for Production
@@ -0,0 +1,183 @@
1
+ # Incremental Coverage Guardrail
2
+
3
+ ## Overview
4
+
5
+ The incremental coverage guardrail prevents coverage regression by comparing current PR coverage against a baseline from the main branch. This ensures code quality and maintains test coverage standards.
6
+
7
+ ## Features
8
+
9
+ - **Baseline Capture**: Captures coverage metrics from main branch
10
+ - **PR Comparison**: Compares PR coverage against baseline
11
+ - **Tolerance Checking**: Configurable tolerance for acceptable coverage variance
12
+ - **CI/CD Integration**: Automated coverage checks in GitHub Actions
13
+ - **Detailed Reporting**: JSON output for tooling integration
14
+ - **Progressive Enhancement**: Works with placeholder data while Jest integration is refined
15
+
16
+ ## Usage
17
+
18
+ ### Manual Commands
19
+
20
+ ```bash
21
+ # Capture baseline coverage (typically on main branch)
22
+ npm run coverage:baseline
23
+
24
+ # Check current coverage against baseline
25
+ npm run coverage:check
26
+ ```
27
+
28
+ ### Environment Variables
29
+
30
+ - `COVERAGE_TOLERANCE`: Maximum allowed decrease percentage (default: 1.0)
31
+ - `BASELINE_FILE`: Path to baseline coverage JSON (default: coverage-baseline.json)
32
+ - `CI`: Set to 'true' in CI environment
33
+
34
+ ### CI/CD Integration
35
+
36
+ The `.github/workflows/coverage-guard.yml` workflow automatically:
37
+
38
+ 1. **PR Trigger**: Runs on pull requests affecting source code
39
+ 2. **Baseline Capture**: Switches to main branch, captures baseline
40
+ 3. **PR Testing**: Returns to PR branch, runs coverage tests
41
+ 4. **Comparison**: Compares PR coverage vs baseline
42
+ 5. **Reporting**: Posts detailed coverage comparison as PR comment
43
+ 6. **Gates**: Fails CI if coverage decreases beyond tolerance
44
+
45
+ ## Configuration
46
+
47
+ ### Tolerance Settings
48
+
49
+ ```bash
50
+ # Default: 1% tolerance
51
+ COVERAGE_TOLERANCE=1.0 npm run coverage:check
52
+
53
+ # Strict: 0.5% tolerance
54
+ COVERAGE_TOLERANCE=0.5 npm run coverage:check
55
+ ```
56
+
57
+ ### Custom Baseline File
58
+
59
+ ```bash
60
+ # Custom baseline location
61
+ BASELINE_FILE=coverage/baseline-main.json npm run coverage:baseline
62
+ ```
63
+
64
+ ## Output Formats
65
+
66
+ ### Human-Readable
67
+
68
+ ```
69
+ 📊 Coverage Comparison:
70
+ ========================
71
+
72
+ ✅ lines : 30.97% → 32.17% (+1.20%)
73
+ ✅ branches : 25.50% → 26.70% (+1.20%)
74
+ ✅ functions : 28.30% → 29.50% (+1.20%)
75
+ ✅ statements: 29.15% → 30.35% (+1.20%)
76
+
77
+ 📁 Files: 45 → 45
78
+ 🎯 Tolerance: ±1%
79
+
80
+ ✅ COVERAGE CHECK PASSED
81
+ ```
82
+
83
+ ### Machine-Readable JSON
84
+
85
+ ```json
86
+ {
87
+ "status": "passed",
88
+ "tolerance": 1,
89
+ "baseline": {
90
+ "lines": 30.97,
91
+ "branches": 25.5,
92
+ "functions": 28.3,
93
+ "statements": 29.15,
94
+ "totalFiles": 45
95
+ },
96
+ "current": {
97
+ "lines": 32.17,
98
+ "branches": 26.7,
99
+ "functions": 29.5,
100
+ "statements": 30.35,
101
+ "totalFiles": 45
102
+ },
103
+ "results": [
104
+ {
105
+ "metric": "lines",
106
+ "baseline": 30.97,
107
+ "current": 32.17,
108
+ "diff": 1.20,
109
+ "passed": true,
110
+ "tolerance": 1
111
+ }
112
+ ],
113
+ "timestamp": "2025-08-10T00:09:25.763Z"
114
+ }
115
+ ```
116
+
117
+ ## Integration with Coverage Strategy
118
+
119
+ The incremental coverage guardrail works alongside the main coverage strategy:
120
+
121
+ - **Phase-Based Thresholds**: Uses same phase targets (40% → 55% → 70%)
122
+ - **Component Validation**: Complements component-specific requirements
123
+ - **Progressive Enhancement**: Maintains quality during incremental improvements
124
+
125
+ ## Troubleshooting
126
+
127
+ ### Coverage Data Issues
128
+
129
+ If Jest coverage collection has issues:
130
+
131
+ ```
132
+ 📊 Using placeholder coverage data (Jest coverage collection issue)
133
+ ⚠️ Note: This uses estimated coverage values. Real coverage will be used once Jest integration is fixed.
134
+ ```
135
+
136
+ The system uses estimated coverage data to provide functional guardrails while Jest integration is refined.
137
+
138
+ ### Common Commands
139
+
140
+ ```bash
141
+ # Debug coverage collection
142
+ DEBUG=true npm run test:coverage
143
+
144
+ # View detailed coverage report
145
+ open coverage/lcov-report/index.html
146
+
147
+ # Reset baseline
148
+ rm coverage-baseline.json && npm run coverage:baseline
149
+ ```
150
+
151
+ ## Best Practices
152
+
153
+ 1. **Regular Baseline Updates**: Baseline automatically updates on main branch merges
154
+ 2. **Appropriate Tolerance**: 1% tolerance balances strictness with practicality
155
+ 3. **Coverage Improvements**: Celebrate increases, investigate decreases
156
+ 4. **Component Focus**: Higher standards for critical components
157
+ 5. **CI Integration**: Block merges for significant coverage regressions
158
+
159
+ ## Future Enhancements
160
+
161
+ - **Real Coverage Integration**: Full Jest coverage collection when technical issues resolved
162
+ - **Component-Specific Tolerances**: Different tolerances for different code areas
163
+ - **Historical Tracking**: Coverage trend analysis over time
164
+ - **Advanced Reporting**: Integration with code review tools
165
+
166
+ ## Implementation Details
167
+
168
+ ### Script Location
169
+ - `scripts/incremental-coverage-guardrail.js`: Main implementation
170
+ - `scripts/coverage-guardrail.js`: Phase-based coverage validation
171
+ - `.github/workflows/coverage-guard.yml`: CI/CD workflow
172
+
173
+ ### Baseline Storage
174
+ - `coverage-baseline.json`: Baseline metrics from main branch
175
+ - Generated automatically in CI/CD pipeline
176
+ - Contains timestamp, commit info, and detailed metrics
177
+
178
+ ### Coverage Sources
179
+ - Primary: `coverage/coverage-final.json` (Jest output)
180
+ - Fallback: Estimated values from project knowledge
181
+ - Future: Direct TypeScript coverage collection
182
+
183
+ This incremental coverage system ensures code quality while providing flexibility for development workflows.
@@ -11,7 +11,7 @@
11
11
 
12
12
  The WordPress MCP Server provides **59 tools** across **10 categories** for comprehensive WordPress management through the Model Context Protocol.
13
13
 
14
- **Last Updated:** 19.7.2025
14
+ **Last Updated:** 9.8.2025
15
15
  **Version:** 1.2.0
16
16
  **Coverage:** 59/59 tools with examples
17
17
 
@@ -72,6 +72,8 @@ wp_get_site_settings --site=production
72
72
  • Simple post: `wp_create_post --title="My New Post" --content="<p>Hello World!</p>"`
73
73
  • Draft post: `wp_create_post --title="Draft Post" --status="draft"`
74
74
  • Categorized post: `wp_create_post --title="Tech News" --categories=[1,5] --tags=[10,20]`
75
+ • Post with featured image: `wp_create_post --title="My Post" --content="<p>Content</p>" --featured_media=42`
76
+ • Remove featured image: `wp_create_post --title="My Post" --featured_media=0`
75
77
  • Scheduled post: `wp_create_post --title="Future Post" --status="future" --date="2024-12-25T10:00:00"`
76
78
  • Complete post: `wp_create_post --title="Complete Post" --content="<p>Content</p>" --excerpt="Summary" --status="publish"` |
77
79
  | [`wp_create_tag`](./tools/wp_create_tag.md) | taxonomy | Creates a new tag. |
@@ -487,7 +487,7 @@
487
487
  },
488
488
  "/tools/wp_create_post": {
489
489
  "post": {
490
- "summary": "Creates a new WordPress post with comprehensive validation and detailed success feedback including management links.\n\n**Usage Examples:**\n• Simple post: `wp_create_post --title=\"My New Post\" --content=\"<p>Hello World!</p>\"`\n• Draft post: `wp_create_post --title=\"Draft Post\" --status=\"draft\"`\n• Categorized post: `wp_create_post --title=\"Tech News\" --categories=[1,5] --tags=[10,20]`\n• Scheduled post: `wp_create_post --title=\"Future Post\" --status=\"future\" --date=\"2024-12-25T10:00:00\"`\n• Complete post: `wp_create_post --title=\"Complete Post\" --content=\"<p>Content</p>\" --excerpt=\"Summary\" --status=\"publish\"`",
490
+ "summary": "Creates a new WordPress post with comprehensive validation and detailed success feedback including management links.\n\n**Usage Examples:**\n• Simple post: `wp_create_post --title=\"My New Post\" --content=\"<p>Hello World!</p>\"`\n• Draft post: `wp_create_post --title=\"Draft Post\" --status=\"draft\"`\n• Categorized post: `wp_create_post --title=\"Tech News\" --categories=[1,5] --tags=[10,20]`\n• Post with featured image: `wp_create_post --title=\"My Post\" --content=\"<p>Content</p>\" --featured_media=42`\n• Remove featured image: `wp_create_post --title=\"My Post\" --featured_media=0`\n• Scheduled post: `wp_create_post --title=\"Future Post\" --status=\"future\" --date=\"2024-12-25T10:00:00\"`\n• Complete post: `wp_create_post --title=\"Complete Post\" --content=\"<p>Content</p>\" --excerpt=\"Summary\" --status=\"publish\"`",
491
491
  "description": "Execute wp_create_post MCP tool",
492
492
  "tags": [
493
493
  "post"
@@ -530,6 +530,10 @@
530
530
  "tags": {
531
531
  "type": "array",
532
532
  "description": "An array of tag IDs to assign to the post."
533
+ },
534
+ "featured_media": {
535
+ "type": "number",
536
+ "description": "The ID of the featured media (image) for the post. Use wp_upload_media first to get a media ID. Set to 0 or null to remove the featured image."
533
537
  }
534
538
  },
535
539
  "required": [
@@ -2,7 +2,7 @@
2
2
  "totalTools": 59,
3
3
  "totalCategories": 10,
4
4
  "totalTypes": 1,
5
- "lastUpdated": "2025-07-19T13:22:47.886Z",
5
+ "lastUpdated": "2025-08-09T15:13:46.265Z",
6
6
  "version": "1.2.0",
7
7
  "coverage": {
8
8
  "toolsWithExamples": 59,
@@ -8,6 +8,8 @@ Creates a new WordPress post with comprehensive validation and detailed success
8
8
  • Simple post: `wp_create_post --title="My New Post" --content="<p>Hello World!</p>"`
9
9
  • Draft post: `wp_create_post --title="Draft Post" --status="draft"`
10
10
  • Categorized post: `wp_create_post --title="Tech News" --categories=[1,5] --tags=[10,20]`
11
+ • Post with featured image: `wp_create_post --title="My Post" --content="<p>Content</p>" --featured_media=42`
12
+ • Remove featured image: `wp_create_post --title="My Post" --featured_media=0`
11
13
  • Scheduled post: `wp_create_post --title="Future Post" --status="future" --date="2024-12-25T10:00:00"`
12
14
  • Complete post: `wp_create_post --title="Complete Post" --content="<p>Content</p>" --excerpt="Summary" --status="publish"`
13
15
 
@@ -21,6 +23,7 @@ Creates a new WordPress post with comprehensive validation and detailed success
21
23
  | `excerpt` | `string` | ❌ | The excerpt for the post. | - | `example` |
22
24
  | `categories` | `array` | ❌ | An array of category IDs to assign to the post. | - | `example` |
23
25
  | `tags` | `array` | ❌ | An array of tag IDs to assign to the post. | - | `example` |
26
+ | `featured_media` | `number` | ❌ | The ID of the featured media (image) for the post. Use wp_upload_media first to get a media ID. Set to 0 or null to remove the featured image. | - | `example` |
24
27
 
25
28
  ## Examples
26
29
 
@@ -29,11 +32,13 @@ Creates a new WordPress post with comprehensive validation and detailed success
29
32
  Simple example of using wp_create_post
30
33
 
31
34
  **Command:**
35
+
32
36
  ```bash
33
37
  wp_create_post --title="Example Post Title"
34
38
  ```
35
39
 
36
40
  **Response:**
41
+
37
42
  ```json
38
43
  {
39
44
  "success": true,
@@ -46,6 +51,7 @@ wp_create_post --title="Example Post Title"
46
51
  ```
47
52
 
48
53
  **Error Example (Authentication failure):**
54
+
49
55
  ```json
50
56
  {
51
57
  "error": "Authentication failed",
@@ -53,17 +59,18 @@ wp_create_post --title="Example Post Title"
53
59
  }
54
60
  ```
55
61
 
56
-
57
62
  ### Advanced post Configuration
58
63
 
59
64
  Comprehensive example using all available parameters
60
65
 
61
66
  **Command:**
67
+
62
68
  ```bash
63
- wp_create_post --title="Example Post Title" --content="This is example content for the post." --status="publish" --excerpt="example_value" --categories="example_value" --tags="example_value"
69
+ wp_create_post --title="Example Post Title" --content="This is example content for the post." --status="publish" --excerpt="example_value" --categories="example_value" --tags="example_value" --featured_media="example_value"
64
70
  ```
65
71
 
66
72
  **Response:**
73
+
67
74
  ```json
68
75
  {
69
76
  "success": true,
@@ -75,20 +82,18 @@ wp_create_post --title="Example Post Title" --content="This is example content f
75
82
  }
76
83
  ```
77
84
 
78
-
79
-
80
-
81
85
  ## WordPress REST API Mapping
82
86
 
83
87
  **Endpoint:** `/wp-json/wp/v2/posts`
84
88
 
85
- This tool directly interfaces with the WordPress REST API endpoint above. The response format and available parameters are determined by WordPress core functionality.
89
+ This tool directly interfaces with the WordPress REST API endpoint above. The response format and available
90
+ parameters are determined by WordPress core functionality.
86
91
 
87
92
  ### WordPress Documentation
93
+
88
94
  - [WordPress REST API Handbook](https://developer.wordpress.org/rest-api/)
89
95
  - [Endpoint Reference](https://developer.wordpress.org/rest-api/reference/)
90
96
 
91
-
92
97
  ## Required Permissions
93
98
 
94
99
  This tool requires the following WordPress user capabilities:
@@ -98,7 +103,6 @@ This tool requires the following WordPress user capabilities:
98
103
 
99
104
  **Note:** The authenticated user must have these capabilities to successfully execute this tool.
100
105
 
101
-
102
106
  ## Response Format
103
107
 
104
108
  **Return Type:** `post`
@@ -125,30 +129,24 @@ This tool requires the following WordPress user capabilities:
125
129
  **Description:** Invalid credentials or insufficient permissions
126
130
  **Resolution:** Check your authentication credentials and user permissions
127
131
 
128
-
129
132
  ### VALIDATION_ERROR
130
133
 
131
134
  **Message:** Parameter validation failed
132
135
  **Description:** One or more required parameters are missing or invalid
133
136
  **Resolution:** Review the required parameters and their formats
134
137
 
135
-
136
138
  ### NOT_FOUND
137
139
 
138
140
  **Message:** Resource not found
139
141
  **Description:** The requested resource does not exist
140
142
  **Resolution:** Verify the resource ID and ensure it exists
141
143
 
142
-
143
144
  ### PERMISSION_DENIED
144
145
 
145
146
  **Message:** Insufficient permissions
146
147
  **Description:** The user does not have permission to perform this action
147
148
  **Resolution:** Contact an administrator to grant the necessary permissions
148
149
 
149
-
150
-
151
-
152
150
  ---
153
151
 
154
152
  *Generated automatically from tool definitions - Do not edit manually*
@@ -3,6 +3,6 @@
3
3
  See README.md for all configuration examples including:
4
4
 
5
5
  - NPM installation
6
- - Docker installation
6
+ - Docker installation
7
7
  - Local development
8
8
  - Multi-site configuration