@respira/wordpress-mcp-server 8.1.5 → 8.2.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to Respira WordPress MCP Server will be documented in this f
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [8.1.6] - 2026-08-02
9
+
10
+ ### Fixed
11
+
12
+ - **An authentication failure was reported as "respira/v2 is not available on this site".** The version probe swallowed its own error and fell back to v1, so every failure mode reached you as the same message followed by four suggested causes: a security plugin, Plain permalinks, a WAF or CDN, an outdated plugin. For M.O. all four were false. Permalinks were `/%postname%/`, there was no CDN, the plugin was already current, and `/wp-json/respira/v2/status` was answering `401` rather than `404`, which proves the opposite of what the message said: the route existed, WordPress routed to it, and it ran far enough to reach its auth check. That cost most of a day chasing firewall rules for a deactivated key. The probe now keeps the reason and reports it. A `401` or `403` says the key was rejected and points at reconnecting, a `5xx` reports the status and sends you to the debug log, a connection failure says so, and the original text is kept only for a real `404`, which is the one case it was ever true for.
13
+
14
+ ### Added
15
+
16
+ - **`excerpt` on `update_page`, `update_post` and `update_custom_post`.** There was no way to ask for it, so callers put it in `meta`, where it became a post meta row that reads back perfectly and renders nowhere. The description says as much. Requires plugin 8.2.1 for the write to land in the native field. Reported by P.F.
17
+
8
18
  ## [8.1.5] - 2026-08-01
9
19
 
10
20
  ### Fixed
package/README.md CHANGED
@@ -35,6 +35,13 @@ Other WordPress MCP servers wrap the REST API. They can create posts and pages,
35
35
 
36
36
  Respira includes a WordPress plugin that gives AI **native access** to 17 page builders, plus element-level precision, full page creation from structure, HTML-to-builder conversion, storefront design intelligence, stock image search, and bulk operations across hundreds of pages.
37
37
 
38
+ ### New in 8.2: Resonance, a persistent memory for every site
39
+
40
+ - **Your AI forgets your site every session. Resonance remembers.** `wordpress_remember`, `wordpress_forget`, and `wordpress_list_memory` maintain a capped, per-site store of conventions, preferences, and lessons that rides into the site context of every future session, from any connected client.
41
+ - **Rules are enforced, not suggested.** A memory of type `rule` can protect content (post ids or slugs); the WordPress plugin refuses agent writes to protected content at the write path, server side. Agents can add protection in conversation; only the site owner can remove it, from the Respira dashboard.
42
+ - **Compatible with WordPress core's Knowledge direction.** On sites running the Gutenberg Knowledge experiment, published guideline scopes join the same memory block.
43
+ - Included on Builder and Studio plans with plugin 8.3+, at no extra cost.
44
+
38
45
  ### New in 8.1: MCP 2026-07-28, without breaking existing clients
39
46
 
40
47
  - **Modern protocol negotiation.** Compatible clients can use `server/discover` and negotiate MCP `2026-07-28`, including stateless per-request metadata and typed result contracts.
package/TOOL_CATALOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- Generated by scripts/check-tool-registry-parity.mjs. Do not edit by hand. -->
4
4
 
5
- Generated catalog: **171 core tools**, **105 WooCommerce tools**, **276 total**.
5
+ Generated catalog: **174 core tools**, **105 WooCommerce tools**, **279 total**.
6
6
 
7
7
  The runtime applies site context and per-site governance, so an individual connection may expose a smaller relevant subset.
8
8
 
@@ -74,6 +74,7 @@ The runtime applies site context and per-site governance, so an individual conne
74
74
  - `wordpress_extract_builder_content` — read; native + hosted
75
75
  - `wordpress_find_builder_targets` — read; native + hosted
76
76
  - `wordpress_find_element` — read; native + hosted
77
+ - `wordpress_forget` — read; native + hosted
77
78
  - `wordpress_get_accessibility_scan` — read; hosted/stdio
78
79
  - `wordpress_get_active_site` — read; hosted/stdio
79
80
  - `wordpress_get_activity` — read; native + hosted
@@ -113,6 +114,7 @@ The runtime applies site context and per-site governance, so an individual conne
113
114
  - `wordpress_list_custom_taxonomies` — read; hosted/stdio
114
115
  - `wordpress_list_design_tokens` — read; native + hosted
115
116
  - `wordpress_list_media` — read; native + hosted
117
+ - `wordpress_list_memory` — read; native + hosted
116
118
  - `wordpress_list_menu_items` — read; native + hosted
117
119
  - `wordpress_list_menu_locations` — read; native + hosted
118
120
  - `wordpress_list_menus` — read; native + hosted
@@ -137,6 +139,7 @@ The runtime applies site context and per-site governance, so an individual conne
137
139
  - `wordpress_read_post` — read; native + hosted
138
140
  - `wordpress_read_theme_file` — read; hosted/stdio
139
141
  - `wordpress_redeem_token` — write; hosted/stdio
142
+ - `wordpress_remember` — read; native + hosted
140
143
  - `wordpress_remove_element` — write; native + hosted
141
144
  - `wordpress_reorder_elements` — write; native + hosted
142
145
  - `wordpress_report_issue` — read; hosted/stdio
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-signature-clientinfo.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-signature-clientinfo.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/agent-signature-clientinfo.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Phase A attribution: the MCP initialize handshake's clientInfo outranks
3
+ * process heuristics but never an explicit env pin, and raw client names
4
+ * normalize to canonical slugs (a bare "Claude ..." over local stdio is the
5
+ * Desktop app; only claude.ai/web connectors never spawn this process).
6
+ */
7
+ import { test } from 'node:test';
8
+ import assert from 'node:assert';
9
+ import { detectRespiraAgentSignature, setMcpClientInfo } from '../agent-signature.js';
10
+ test('clientInfo outranks heuristics and normalizes names', () => {
11
+ delete process.env.RESPIRA_AGENT_CLIENT;
12
+ delete process.env.MCP_AGENT_CLIENT;
13
+ delete process.env.AI_AGENT_CLIENT;
14
+ setMcpClientInfo('Claude Desktop', '1.2.3');
15
+ const sig = detectRespiraAgentSignature();
16
+ assert.strictEqual(sig.client, 'claude-desktop');
17
+ assert.strictEqual(sig.source, 'client-info');
18
+ assert.strictEqual(sig.version, '1.2.3');
19
+ });
20
+ test('claude-code self-identification stays claude-code', () => {
21
+ setMcpClientInfo('claude-code', '2.0.0');
22
+ assert.strictEqual(detectRespiraAgentSignature().client, 'claude-code');
23
+ });
24
+ test('unknown but self-declared clients keep their sanitized name', () => {
25
+ setMcpClientInfo('SomeNew Agent!', null);
26
+ const sig = detectRespiraAgentSignature();
27
+ assert.strictEqual(sig.source, 'client-info');
28
+ assert.strictEqual(sig.client, 'somenewagent');
29
+ });
30
+ test('an explicit env pin still wins over clientInfo', () => {
31
+ setMcpClientInfo('Cursor', '9.9');
32
+ process.env.RESPIRA_AGENT_CLIENT = 'my-custom-rig';
33
+ const sig = detectRespiraAgentSignature();
34
+ assert.strictEqual(sig.client, 'my-custom-rig');
35
+ assert.strictEqual(sig.source, 'env');
36
+ delete process.env.RESPIRA_AGENT_CLIENT;
37
+ });
38
+ //# sourceMappingURL=agent-signature-clientinfo.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-signature-clientinfo.test.js","sourceRoot":"","sources":["../../src/__tests__/agent-signature-clientinfo.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,IAAI,CAAC,qDAAqD,EAAE,GAAG,EAAE;IAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IACxC,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACpC,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAEnC,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,2BAA2B,EAAE,CAAC;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjD,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9C,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC7D,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACzC,MAAM,CAAC,WAAW,CAAC,2BAA2B,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,6DAA6D,EAAE,GAAG,EAAE;IACvE,gBAAgB,CAAC,gBAAgB,EAAE,IAAW,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,2BAA2B,EAAE,CAAC;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9C,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;IAC1D,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,oBAAoB,GAAG,eAAe,CAAC;IACnD,MAAM,GAAG,GAAG,2BAA2B,EAAE,CAAC;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAChD,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;AAC1C,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=v2-negotiation-failure.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2-negotiation-failure.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/v2-negotiation-failure.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,104 @@
1
+ import { describe, it } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { classifyV2Failure, describeV2Failure } from '../wordpress-client.js';
4
+ /**
5
+ * The v2 probe used to swallow its own error:
6
+ *
7
+ * try { ...get('/wp-json/respira/v2/status')... } catch { }
8
+ * return 'v1'
9
+ *
10
+ * so every failure mode reached the user as one message: "respira/v2 is not
11
+ * available on this site", followed by four suggested causes (security plugin,
12
+ * Plain permalinks, WAF/CDN, outdated plugin).
13
+ *
14
+ * M.O. hit this with a 401. All four suggestions were false: permalinks were
15
+ * /%postname%/, there was no CDN, the plugin was on the newest version, and
16
+ * /wp-json/respira/v2/status answered 401 rather than 404 — meaning the route
17
+ * existed, WordPress routed to it, and it ran far enough to reach its auth
18
+ * check. The message described the one situation that provably was not
19
+ * happening, and cost most of a day.
20
+ */
21
+ const SITE = 'https://example.com';
22
+ const err = (status, data) => ({ response: { status, data } });
23
+ describe('classifyV2Failure', () => {
24
+ it('401 is auth, not a missing namespace', () => {
25
+ const f = classifyV2Failure(err(401, { code: 'respira_invalid_site_token', message: 'token out of date' }));
26
+ assert.equal(f.kind, 'auth');
27
+ assert.equal(f.status, 401);
28
+ assert.equal(f.code, 'respira_invalid_site_token');
29
+ });
30
+ it('403 is auth too', () => {
31
+ assert.equal(classifyV2Failure(err(403)).kind, 'auth');
32
+ });
33
+ it('404 is the one case that really means unavailable', () => {
34
+ assert.equal(classifyV2Failure(err(404)).kind, 'missing');
35
+ });
36
+ it('500 is a server fault, distinct from both', () => {
37
+ assert.equal(classifyV2Failure(err(500)).kind, 'server');
38
+ });
39
+ it('no response at all is a network failure', () => {
40
+ assert.equal(classifyV2Failure({ message: 'ECONNREFUSED' }).kind, 'network');
41
+ });
42
+ it('an undefined error does not throw', () => {
43
+ assert.equal(classifyV2Failure(undefined).kind, 'network');
44
+ });
45
+ });
46
+ describe('describeV2Failure', () => {
47
+ it("the auth message does NOT repeat the four causes that misled the reporter", () => {
48
+ const msg = describeV2Failure(classifyV2Failure(err(401)), SITE);
49
+ assert.ok(!/Wordfence/.test(msg), msg);
50
+ assert.ok(!/permalinks/i.test(msg), msg);
51
+ assert.ok(!/Cloudflare/.test(msg), msg);
52
+ assert.ok(!/outdated/i.test(msg), msg);
53
+ });
54
+ it('the auth message states what a 401 actually proves', () => {
55
+ const msg = describeV2Failure(classifyV2Failure(err(401)), SITE);
56
+ assert.ok(/routes exist and are reachable/.test(msg), msg);
57
+ assert.ok(/authentication result, not a missing namespace/.test(msg), msg);
58
+ });
59
+ it('it names the deactivated-key cause, which is the one that actually happened', () => {
60
+ const msg = describeV2Failure(classifyV2Failure(err(401)), SITE);
61
+ assert.ok(/lapsed licence disables API keys/.test(msg), msg);
62
+ assert.ok(/reconnect the site/i.test(msg), msg);
63
+ });
64
+ it("it quotes the site's own words when they were given", () => {
65
+ const msg = describeV2Failure(classifyV2Failure(err(401, { message: 'The saved connection token for this site is out of date.' })), SITE);
66
+ assert.ok(msg.includes('The saved connection token for this site is out of date.'), msg);
67
+ });
68
+ it('a real 404 keeps the original guidance, which is correct for a 404', () => {
69
+ const msg = describeV2Failure(classifyV2Failure(err(404)), SITE);
70
+ assert.ok(/is not available on this site/.test(msg), msg);
71
+ assert.ok(/Wordfence/.test(msg), msg);
72
+ });
73
+ it('a null failure falls back to the 404 text rather than inventing a cause', () => {
74
+ const msg = describeV2Failure(null, SITE);
75
+ assert.ok(/is not available on this site/.test(msg), msg);
76
+ });
77
+ it('the server branch reports the status instead of blaming the namespace', () => {
78
+ const msg = describeV2Failure(classifyV2Failure(err(500, { message: 'Fatal error' })), SITE);
79
+ assert.ok(/HTTP 500/.test(msg), msg);
80
+ assert.ok(/debug\.log/.test(msg), msg);
81
+ assert.ok(!/Wordfence/.test(msg), msg);
82
+ });
83
+ it('the network branch says connectivity, not configuration', () => {
84
+ const msg = describeV2Failure(classifyV2Failure({ message: 'ETIMEDOUT' }), SITE);
85
+ assert.ok(/connectivity failure, not a plugin problem/.test(msg), msg);
86
+ assert.ok(msg.includes('ETIMEDOUT'), msg);
87
+ });
88
+ it('branches where probing helps point at the probe URL for the specific site', () => {
89
+ // Not the auth branch: /v2/status answers 401 to an unauthenticated browser
90
+ // whether or not the key is the problem, so sending someone there proves
91
+ // nothing. Its next step is reconnecting, asserted above.
92
+ for (const e of [err(404), err(500), { message: 'x' }]) {
93
+ const msg = describeV2Failure(classifyV2Failure(e), SITE);
94
+ assert.ok(msg.includes(`${SITE}/wp-json/respira/v2/status`), msg);
95
+ }
96
+ });
97
+ it('no branch ever tells the reader the namespace is missing when it is not', () => {
98
+ for (const e of [err(401), err(403), err(500), { message: 'x' }]) {
99
+ const msg = describeV2Failure(classifyV2Failure(e), SITE);
100
+ assert.ok(!/is not available on this site/.test(msg), msg);
101
+ }
102
+ });
103
+ });
104
+ //# sourceMappingURL=v2-negotiation-failure.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2-negotiation-failure.test.js","sourceRoot":"","sources":["../../src/__tests__/v2-negotiation-failure.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9E;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,GAAG,GAAG,CAAC,MAAc,EAAE,IAAU,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AAE7E,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC;QAC5G,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC7B,MAA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AAI,CAAC,CAAC;YAC1D,MAAM,CAAC,EAAE,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=v2-negotiation-through-real-client.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2-negotiation-through-real-client.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/v2-negotiation-through-real-client.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,104 @@
1
+ import { describe, it, after } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import http from 'node:http';
4
+ import { WordPressClient } from '../wordpress-client.js';
5
+ /**
6
+ * The check the pure-unit tests structurally cannot make.
7
+ *
8
+ * v2-negotiation-failure.test.ts feeds classifyV2Failure a hand-built
9
+ * `{response:{status:401}}`. In production no such object ever reaches it: the
10
+ * shared axios error interceptor funnels every non-2xx through handleError ->
11
+ * codedError, which returns `new Error(message)` with the status recorded only
12
+ * in `.name`. `.response` is gone.
13
+ *
14
+ * So an implementation that reads `error.response.status` passes every unit
15
+ * test and misclassifies *every real failure* as a network problem — telling a
16
+ * customer with a deactivated key that the site could not be reached. That is
17
+ * the same trap that made the first PUT->POST fallback fix a no-op (it needed
18
+ * isRetryableAsPost() matching on `.name` for exactly this reason).
19
+ *
20
+ * These tests run a real HTTP server, a real WordPressClient with its real
21
+ * interceptors, and assert on the message a user would actually see.
22
+ */
23
+ const servers = [];
24
+ after(() => {
25
+ for (const s of servers)
26
+ s.close();
27
+ });
28
+ /** Start a server that answers the v2 status probe with a fixed status. */
29
+ async function clientAnswering(status, body) {
30
+ const server = http.createServer((_req, res) => {
31
+ res.writeHead(status, { 'Content-Type': 'application/json' });
32
+ res.end(JSON.stringify(body));
33
+ });
34
+ servers.push(server);
35
+ await new Promise((resolve) => server.listen(0, resolve));
36
+ const { port } = server.address();
37
+ return new WordPressClient({
38
+ id: 'probe',
39
+ name: 'probe',
40
+ url: `http://127.0.0.1:${port}`,
41
+ apiKey: 'respira_test_key',
42
+ });
43
+ }
44
+ /** Drive a v2-gated call and return the message the user would see. */
45
+ async function v2FailureMessage(client) {
46
+ try {
47
+ await client.listSnapshots({ post_id: 1 });
48
+ return '(no error thrown)';
49
+ }
50
+ catch (err) {
51
+ return String(err?.message ?? err);
52
+ }
53
+ }
54
+ describe('v2 negotiation through the real client', () => {
55
+ it('a real 401 is reported as an auth rejection, not a missing namespace', async () => {
56
+ const client = await clientAnswering(401, {
57
+ code: 'respira_invalid_site_token',
58
+ message: 'The saved connection token for this site is out of date.',
59
+ });
60
+ const msg = await v2FailureMessage(client);
61
+ assert.match(msg, /rejected this API key \(HTTP 401/);
62
+ assert.doesNotMatch(msg, /is not available on this site/);
63
+ // The four causes that sent the reporter chasing firewall rules for a day.
64
+ assert.doesNotMatch(msg, /Wordfence/);
65
+ assert.doesNotMatch(msg, /permalinks/i);
66
+ assert.doesNotMatch(msg, /Cloudflare/);
67
+ });
68
+ it("and quotes the site's own explanation", async () => {
69
+ const client = await clientAnswering(401, {
70
+ code: 'respira_invalid_site_token',
71
+ message: 'The saved connection token for this site is out of date.',
72
+ });
73
+ const msg = await v2FailureMessage(client);
74
+ assert.match(msg, /The saved connection token for this site is out of date\./);
75
+ assert.match(msg, /respira_invalid_site_token/);
76
+ });
77
+ it('a 403 is auth too', async () => {
78
+ const client = await clientAnswering(403, { code: 'respira_scope_denied', message: 'nope' });
79
+ const msg = await v2FailureMessage(client);
80
+ assert.match(msg, /rejected this API key \(HTTP 403/);
81
+ });
82
+ it('a real 404 keeps the original guidance, which is correct only for a 404', async () => {
83
+ const client = await clientAnswering(404, { code: 'rest_no_route', message: 'No route' });
84
+ const msg = await v2FailureMessage(client);
85
+ assert.match(msg, /is not available on this site/);
86
+ assert.match(msg, /Wordfence/);
87
+ });
88
+ it('a 500 names the status instead of blaming the namespace', async () => {
89
+ const client = await clientAnswering(500, { code: 'fatal', message: 'Fatal error' });
90
+ const msg = await v2FailureMessage(client);
91
+ assert.match(msg, /returned HTTP 500 on this site/);
92
+ assert.doesNotMatch(msg, /is not available on this site/);
93
+ });
94
+ it('a dead host is reported as connectivity, not configuration', async () => {
95
+ // Nothing listening: a genuine transport failure, where there IS no status.
96
+ const client = new WordPressClient({
97
+ id: 'probe', name: 'probe', url: 'http://127.0.0.1:1', apiKey: 'respira_test_key',
98
+ });
99
+ const msg = await v2FailureMessage(client);
100
+ assert.match(msg, /Could not reach respira\/v2|connectivity failure/);
101
+ assert.doesNotMatch(msg, /Wordfence/);
102
+ });
103
+ });
104
+ //# sourceMappingURL=v2-negotiation-through-real-client.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2-negotiation-through-real-client.test.js","sourceRoot":"","sources":["../../src/__tests__/v2-negotiation-through-real-client.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,OAAO,GAAkB,EAAE,CAAC;AAElC,KAAK,CAAC,GAAG,EAAE;IACT,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,2EAA2E;AAC3E,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,IAA6B;IAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAC7C,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAC9D,GAAG,CAAC,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K,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;QACvE,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;QACrF,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,gCAAgC,CAAC,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QAC1E,4EAA4E;QAC5E,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,EAAE,kBAAkB;SAC3E,CAAC,CAAC;QACV,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,kDAAkD,CAAC,CAAC;QACtE,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -8,8 +8,9 @@ export interface RespiraAgentSignature {
8
8
  client: string;
9
9
  version: string | null;
10
10
  transport: string;
11
- source: 'env' | 'heuristic' | 'default';
11
+ source: 'env' | 'client-info' | 'heuristic' | 'default';
12
12
  }
13
+ export declare function setMcpClientInfo(name: unknown, version?: unknown): void;
13
14
  export declare function detectRespiraAgentSignature(): RespiraAgentSignature;
14
15
  export declare function getRespiraAgentHeaders(): Record<string, string>;
15
16
  //# sourceMappingURL=agent-signature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-signature.d.ts","sourceRoot":"","sources":["../src/agent-signature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,GAAG,WAAW,GAAG,SAAS,CAAC;CACzC;AAwGD,wBAAgB,2BAA2B,IAAI,qBAAqB,CAgBnE;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa/D"}
1
+ {"version":3,"file":"agent-signature.d.ts","sourceRoot":"","sources":["../src/agent-signature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;CACzD;AAkCD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAQvE;AAwGD,wBAAgB,2BAA2B,IAAI,qBAAqB,CA4BnE;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa/D"}
@@ -6,6 +6,58 @@
6
6
  */
7
7
  import { execSync } from 'node:child_process';
8
8
  const MAX_HEADER_VALUE = 64;
9
+ /**
10
+ * The MCP initialize handshake carries the client's SELF-DECLARED identity
11
+ * (clientInfo.name/version). It is the highest-trust signal short of an
12
+ * explicit env override: the ps-parent heuristic below misfiles ambiguous
13
+ * cases (a bare `claude` parent buckets as claude-code, undercounting
14
+ * Claude Desktop), while clientInfo is what the app says it is. The server
15
+ * stores it here after initialization; every subsequent header/telemetry
16
+ * read picks it up. Phase A of the connection-mix attribution work.
17
+ */
18
+ let mcpClientInfo = null;
19
+ /** Normalize a raw clientInfo.name to Respira's canonical client slugs. */
20
+ function normalizeClientInfoName(raw) {
21
+ const n = raw.trim().toLowerCase();
22
+ if (!n)
23
+ return null;
24
+ if (n.includes('cowork'))
25
+ return 'cowork';
26
+ if (n.includes('claude-code') || n.includes('claude code'))
27
+ return 'claude-code';
28
+ // Any other Claude identity arriving over local stdio is the Desktop app
29
+ // (claude.ai/web connectors never spawn this process).
30
+ if (n.includes('claude'))
31
+ return 'claude-desktop';
32
+ if (n.includes('cursor'))
33
+ return 'cursor';
34
+ if (n.includes('windsurf') || n.includes('codeium'))
35
+ return 'windsurf';
36
+ if (n.includes('codex'))
37
+ return 'codex';
38
+ if (n.includes('chatgpt') || n.includes('openai'))
39
+ return 'chatgpt';
40
+ if (n.includes('copilot'))
41
+ return 'copilot';
42
+ if (n.includes('gemini') || n.includes('antigravity'))
43
+ return n.includes('antigravity') ? 'antigravity' : 'gemini';
44
+ if (n.includes('opencode'))
45
+ return 'opencode';
46
+ // Unknown but self-declared: keep the sanitized raw name rather than
47
+ // guessing. It surfaces new clients in telemetry instead of hiding them.
48
+ return sanitizeHeaderToken(n);
49
+ }
50
+ export function setMcpClientInfo(name, version) {
51
+ if (typeof name !== 'string' || !name.trim())
52
+ return;
53
+ const client = normalizeClientInfoName(name);
54
+ if (!client)
55
+ return;
56
+ mcpClientInfo = {
57
+ client,
58
+ version: sanitizeHeaderToken(typeof version === 'string' ? version : null),
59
+ };
60
+ }
9
61
  function sanitizeHeaderToken(value, fallback = null) {
10
62
  if (typeof value !== 'string') {
11
63
  return fallback;
@@ -112,8 +164,19 @@ export function detectRespiraAgentSignature() {
112
164
  const explicitClient = sanitizeHeaderToken(process.env.RESPIRA_AGENT_CLIENT) ||
113
165
  sanitizeHeaderToken(process.env.MCP_AGENT_CLIENT) ||
114
166
  sanitizeHeaderToken(process.env.AI_AGENT_CLIENT);
115
- const client = explicitClient || detectClientFromHeuristics();
116
167
  const transport = sanitizeHeaderToken(process.env.RESPIRA_AGENT_TRANSPORT, 'desktop-mcp') || 'desktop-mcp';
168
+ // Precedence: explicit env pin > the client's own initialize handshake >
169
+ // process heuristics. The env override stays on top deliberately: it is
170
+ // how a user corrects us when everything else is wrong.
171
+ if (!explicitClient && mcpClientInfo) {
172
+ return {
173
+ client: mcpClientInfo.client,
174
+ version: mcpClientInfo.version || detectVersion(mcpClientInfo.client),
175
+ transport,
176
+ source: 'client-info',
177
+ };
178
+ }
179
+ const client = explicitClient || detectClientFromHeuristics();
117
180
  return {
118
181
  client,
119
182
  version: detectVersion(client),
@@ -1 +1 @@
1
- {"version":3,"file":"agent-signature.js","sourceRoot":"","sources":["../src/agent-signature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAS5B,SAAS,mBAAmB,CAAC,KAAc,EAAE,WAA0B,IAAI;IACzE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,OAAO,GAAG,KAAK;SAClB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAC/B,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,CAAC,qBAAqB,OAAO,CAAC,IAAI,EAAE,EAAE;YAC3D,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,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