Commit 1ea4bec
fix(build): ship the MCP compat shim, and stop its absence being silent (#112)
class-saddle-mcp-compat.php was excluded from the shared build list, and the
selfhosted channel only ever re-added the updater — so the ChatGPT fix from
#80/#81 has been in no zip on any channel since it was written.
It was reachable the whole time: adapter_available() tests for
\WP\MCP\Core\McpAdapter, not for our bundled copy, so a site running the
official MCP Adapter plugin takes the adapter path on any channel, finds
class_exists( 'Saddle_MCP_Compat' ) false, and gets an app that connects and
then reports no callable actions.
The shim now ships on both channels. It is our own code with no library behind
it and applies_to() already no-ops without SessionManager, so a .org build pays
nothing for it; unlike the updater, its absence is not a guarantee we make to
anyone. The selfhosted branch additionally re-adds includes/lib/** and the
bundled-adapter loader, which the exclusion comment has asked for since the
channel landed.
And the guard no longer fails quietly. A false class_exists() branch with no
outward signal is why this survived a release, so it now marks the health
record degraded. Noted rather than recorded at the point of discovery: the
health option is rewritten wholesale on mcp_adapter_init, later in the same
request, so a direct write there would be erased on exactly the sites that
have the adapter.
Refs #111
Claude-Session: https://claude.ai/code/session_01AnLWpPkeyppYfTuKEPhTM2
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 620154a commit 1ea4bec
3 files changed
Lines changed: 81 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
136 | 134 | | |
137 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
138 | 155 | | |
139 | 156 | | |
140 | 157 | | |
| |||
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
263 | 287 | | |
264 | 288 | | |
| 289 | + | |
| 290 | + | |
265 | 291 | | |
266 | 292 | | |
267 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
46 | 69 | | |
47 | 70 | | |
48 | 71 | | |
| |||
153 | 176 | | |
154 | 177 | | |
155 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
156 | 187 | | |
157 | 188 | | |
158 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
295 | 302 | | |
296 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
| |||
0 commit comments