agent-comms 2.18.1 → 2.18.2
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/core/mcp-registry-retry.d.ts +2 -2
- package/dist/core/mcp-registry-retry.d.ts.map +1 -1
- package/dist/core/mcp-registry-retry.js +11 -2
- package/dist/core/mcp-registry-retry.js.map +1 -1
- package/dist/test/mcp-registry-retry.test.js +13 -5
- package/dist/test/mcp-registry-retry.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ExaDev/agent-comms)
|
|
4
4
|
[](https://www.npmjs.com/package/agent-comms)
|
|
5
|
-
[](https://github.com/ExaDev/agent-comms/releases/tag/v2.18.2)
|
|
6
6
|
[](https://github.com/ExaDev/agent-comms/actions)
|
|
7
7
|
|
|
8
8
|
Cross-harness communication mesh for LLM agents: rooms, DMs, presence, and visibility over TCP with zero filesystem dependencies.
|
|
@@ -4,6 +4,6 @@ export declare const RETRY_BACKOFF_MULTIPLIER = 2;
|
|
|
4
4
|
export declare const MAX_TOTAL_RETRY_MS: number;
|
|
5
5
|
/** The next delay in the doubling-with-cap backoff schedule, given the delay just used. */
|
|
6
6
|
export declare function nextRetryDelayMs(previousDelayMs: number): number;
|
|
7
|
-
/** Recognises
|
|
8
|
-
export declare function
|
|
7
|
+
/** Recognises a publish failure worth retrying (npm propagation lag, or a transient 5xx from the registry's own infrastructure) as opposed to any other failure -- a genuinely invalid publish request, for instance, which retrying can never fix. */
|
|
8
|
+
export declare function isRetryablePublishFailure(output: string): boolean;
|
|
9
9
|
//# sourceMappingURL=mcp-registry-retry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-registry-retry.d.ts","sourceRoot":"","sources":["../../src/core/mcp-registry-retry.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,kBAAkB,SAAU,CAAC;AAC1C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,kBAAkB,QAAiB,CAAC;AAEjD,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAKhE;
|
|
1
|
+
{"version":3,"file":"mcp-registry-retry.d.ts","sourceRoot":"","sources":["../../src/core/mcp-registry-retry.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,kBAAkB,SAAU,CAAC;AAC1C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,kBAAkB,QAAiB,CAAC;AAEjD,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAKhE;AAiBD,uPAAuP;AACvP,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjE"}
|
|
@@ -10,9 +10,18 @@ export const MAX_TOTAL_RETRY_MS = 15 * 60 * 1000;
|
|
|
10
10
|
export function nextRetryDelayMs(previousDelayMs) {
|
|
11
11
|
return Math.min(previousDelayMs * RETRY_BACKOFF_MULTIPLIER, MAX_RETRY_DELAY_MS);
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** The MCP registry's own npm-propagation-lag error text -- the version semantic-release just published may not be visible to the registry's own npm lookup for a few seconds. */
|
|
14
|
+
function isNpmPropagationLag(output) {
|
|
15
15
|
return (output.includes("was not found") &&
|
|
16
16
|
output.includes("A newly published release can take a moment"));
|
|
17
17
|
}
|
|
18
|
+
// Confirmed as a second, distinct retryable failure mode in the same run this retry logic was first fixed for (ExaDev/agent-comms, 2026-09-13, v2.18.1): the registry returned a genuine HTTP 504 (a transient gateway timeout on the registry's own infrastructure, not anything to do with npm propagation), and the retry logic at the time only recognised the propagation-lag text above, so it failed the release job immediately instead of retrying a condition that resolved itself on a plain re-run seconds later. Any 5xx is the registry's own server failing to complete the request, not this side's request being wrong -- exactly the class of error a retry can plausibly fix, unlike a 4xx (this side asked for something invalid) other than the specific propagation-lag 404 already handled above.
|
|
19
|
+
const SERVER_ERROR_STATUS_PATTERN = /server returned status 5\d{2}\b/;
|
|
20
|
+
function isRetryableServerError(output) {
|
|
21
|
+
return SERVER_ERROR_STATUS_PATTERN.test(output);
|
|
22
|
+
}
|
|
23
|
+
/** Recognises a publish failure worth retrying (npm propagation lag, or a transient 5xx from the registry's own infrastructure) as opposed to any other failure -- a genuinely invalid publish request, for instance, which retrying can never fix. */
|
|
24
|
+
export function isRetryablePublishFailure(output) {
|
|
25
|
+
return isNpmPropagationLag(output) || isRetryableServerError(output);
|
|
26
|
+
}
|
|
18
27
|
//# sourceMappingURL=mcp-registry-retry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-registry-retry.js","sourceRoot":"","sources":["../../src/core/mcp-registry-retry.ts"],"names":[],"mappings":"AAAA,mgBAAmgB;AAEngB,sSAAsS;AACtS,EAAE;AACF,6bAA6b;AAC7b,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,eAAuB;IACtD,OAAO,IAAI,CAAC,GAAG,CACb,eAAe,GAAG,wBAAwB,EAC1C,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"mcp-registry-retry.js","sourceRoot":"","sources":["../../src/core/mcp-registry-retry.ts"],"names":[],"mappings":"AAAA,mgBAAmgB;AAEngB,sSAAsS;AACtS,EAAE;AACF,6bAA6b;AAC7b,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,eAAuB;IACtD,OAAO,IAAI,CAAC,GAAG,CACb,eAAe,GAAG,wBAAwB,EAC1C,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED,kLAAkL;AAClL,SAAS,mBAAmB,CAAC,MAAc;IACzC,OAAO,CACL,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;QAChC,MAAM,CAAC,QAAQ,CAAC,6CAA6C,CAAC,CAC/D,CAAC;AACJ,CAAC;AAED,yxBAAyxB;AACzxB,MAAM,2BAA2B,GAAG,iCAAiC,CAAC;AAEtE,SAAS,sBAAsB,CAAC,MAAc;IAC5C,OAAO,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,uPAAuP;AACvP,MAAM,UAAU,yBAAyB,CAAC,MAAc;IACtD,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "node:test";
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
|
-
import { INITIAL_RETRY_DELAY_MS, MAX_RETRY_DELAY_MS, MAX_TOTAL_RETRY_MS,
|
|
3
|
+
import { INITIAL_RETRY_DELAY_MS, MAX_RETRY_DELAY_MS, MAX_TOTAL_RETRY_MS, isRetryablePublishFailure, nextRetryDelayMs, } from "../core/mcp-registry-retry.js";
|
|
4
4
|
describe("nextRetryDelayMs", () => {
|
|
5
5
|
it("doubles the previous delay", () => {
|
|
6
6
|
assert.equal(nextRetryDelayMs(INITIAL_RETRY_DELAY_MS), INITIAL_RETRY_DELAY_MS * 2);
|
|
@@ -21,13 +21,21 @@ describe("nextRetryDelayMs", () => {
|
|
|
21
21
|
assert.ok(totalMs >= MAX_TOTAL_RETRY_MS);
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
|
-
describe("
|
|
24
|
+
describe("isRetryablePublishFailure", () => {
|
|
25
25
|
it("recognises the MCP registry's own npm-propagation-lag error text", () => {
|
|
26
26
|
const output = "registry validation failed for package 0 (agent-comms): NPM package 'agent-comms' exists, but version '2.18.0' was not found (status: 404). A newly published release can take a moment to appear on the registry. Wait and retry, or publish version '2.18.0' before registering it";
|
|
27
|
-
assert.equal(
|
|
27
|
+
assert.equal(isRetryablePublishFailure(output), true);
|
|
28
28
|
});
|
|
29
|
-
it("
|
|
30
|
-
|
|
29
|
+
it("recognises a transient 5xx from the registry's own infrastructure -- confirmed as a real, second retryable failure mode (ExaDev/agent-comms, 2026-09-13, v2.18.1): the registry returned a genuine HTTP 504 that resolved itself on a plain re-run seconds later, but the retry logic at the time only recognised the propagation-lag text above and failed the release job immediately instead of retrying it", () => {
|
|
30
|
+
const output = "Error: publish failed: server returned status 504: <html>";
|
|
31
|
+
assert.equal(isRetryablePublishFailure(output), true);
|
|
32
|
+
});
|
|
33
|
+
it("does not retry a 4xx other than the specific propagation-lag 404 -- a genuinely invalid publish request, which retrying can never fix", () => {
|
|
34
|
+
const output = "Error: publish failed: server returned status 400: Bad Request";
|
|
35
|
+
assert.equal(isRetryablePublishFailure(output), false);
|
|
36
|
+
});
|
|
37
|
+
it("does not misclassify an unrelated failure as retryable", () => {
|
|
38
|
+
assert.equal(isRetryablePublishFailure("permission denied"), false);
|
|
31
39
|
});
|
|
32
40
|
});
|
|
33
41
|
//# sourceMappingURL=mcp-registry-retry.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-registry-retry.test.js","sourceRoot":"","sources":["../../src/test/mcp-registry-retry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"mcp-registry-retry.test.js","sourceRoot":"","sources":["../../src/test/mcp-registry-retry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAEvC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,KAAK,CACV,gBAAgB,CAAC,sBAAsB,CAAC,EACxC,sBAAsB,GAAG,CAAC,CAC3B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,CAAC;QACvE,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,kBAAkB,GAAG,EAAE,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wPAAwP,EAAE,GAAG,EAAE;QAChQ,MAAM,gBAAgB,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;QACrD,IAAI,OAAO,GAAG,sBAAsB,CAAC;QACrC,IAAI,OAAO,GAAG,CAAC,CAAC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