opencode-swarm 7.21.2 → 7.21.3
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/dist/cli/index.js +1 -1
- package/dist/index.js +32 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var package_default;
|
|
|
34
34
|
var init_package = __esm(() => {
|
|
35
35
|
package_default = {
|
|
36
36
|
name: "opencode-swarm",
|
|
37
|
-
version: "7.21.
|
|
37
|
+
version: "7.21.3",
|
|
38
38
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
39
39
|
main: "dist/index.js",
|
|
40
40
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var package_default;
|
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "opencode-swarm",
|
|
36
|
-
version: "7.21.
|
|
36
|
+
version: "7.21.3",
|
|
37
37
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
38
38
|
main: "dist/index.js",
|
|
39
39
|
types: "dist/index.d.ts",
|
|
@@ -24285,7 +24285,7 @@ function getMostRecentAssistantText(messages) {
|
|
|
24285
24285
|
function isTransientProviderFailureText(text) {
|
|
24286
24286
|
if (!text.trim())
|
|
24287
24287
|
return false;
|
|
24288
|
-
const providerFailureMarker = /provider[_\s-]?unavailable|network\s+connection\s+lost/i.test(text);
|
|
24288
|
+
const providerFailureMarker = /provider[_\s-]?unavailable|network\s+connection\s+lost|ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|ENOTFOUND|broken.?pipe|dns(?:[\s_-]+(?:resolution)?)?[\s_-]+fail|name.?not.?resolved|EAI_AGAIN|connection\s+reset|connection\s+refused/i.test(text);
|
|
24289
24289
|
if (!providerFailureMarker)
|
|
24290
24290
|
return false;
|
|
24291
24291
|
const status = extractStatusCode(text);
|
|
@@ -25762,6 +25762,35 @@ ${textPart2.text}`;
|
|
|
25762
25762
|
}
|
|
25763
25763
|
session.pendingAdvisoryMessages = [];
|
|
25764
25764
|
} else if (!isArchitectSession && session && (session.pendingAdvisoryMessages?.length ?? 0) > 0) {
|
|
25765
|
+
const allAdvisories = session.pendingAdvisoryMessages ?? [];
|
|
25766
|
+
const TRANSIENT_PREFIXES = [
|
|
25767
|
+
"TRANSIENT ERROR:",
|
|
25768
|
+
"MODEL FALLBACK:",
|
|
25769
|
+
"DEGRADED:"
|
|
25770
|
+
];
|
|
25771
|
+
const transientAdvisories = allAdvisories.filter((m) => TRANSIENT_PREFIXES.some((p) => m.startsWith(p)));
|
|
25772
|
+
if (transientAdvisories.length > 0) {
|
|
25773
|
+
let targetMsg = systemMessages[0];
|
|
25774
|
+
if (!targetMsg) {
|
|
25775
|
+
const newMsg = {
|
|
25776
|
+
info: { role: "system" },
|
|
25777
|
+
parts: [{ type: "text", text: "" }]
|
|
25778
|
+
};
|
|
25779
|
+
messages.unshift(newMsg);
|
|
25780
|
+
targetMsg = newMsg;
|
|
25781
|
+
}
|
|
25782
|
+
const textPart2 = (targetMsg.parts ?? []).find((part) => part.type === "text" && typeof part.text === "string");
|
|
25783
|
+
if (textPart2) {
|
|
25784
|
+
const joined = transientAdvisories.join(`
|
|
25785
|
+
---
|
|
25786
|
+
`);
|
|
25787
|
+
textPart2.text = `[ADVISORIES]
|
|
25788
|
+
${joined}
|
|
25789
|
+
[/ADVISORIES]
|
|
25790
|
+
|
|
25791
|
+
${textPart2.text}`;
|
|
25792
|
+
}
|
|
25793
|
+
}
|
|
25765
25794
|
session.pendingAdvisoryMessages = [];
|
|
25766
25795
|
}
|
|
25767
25796
|
if (isArchitectSession && session?.prmHardStopPending) {
|
|
@@ -26237,7 +26266,7 @@ var init_guardrails = __esm(() => {
|
|
|
26237
26266
|
]);
|
|
26238
26267
|
storedInputArgs = new Map;
|
|
26239
26268
|
TRANSIENT_STATUS_CODES = new Set([408, 429, 500, 502, 503, 504, 529]);
|
|
26240
|
-
TRANSIENT_MODEL_ERROR_PATTERN = /rate.?limit|429|500|502|503|504|529|timeout|overloaded|model.?not.?found|temporarily.?unavailable|provider[_\s-]?unavailable|server.?error|network.?connection.?lost|connection.?(refused|reset|timeout|lost)|bad.?gateway|gateway.?timeout|internal.?server.?error|service.?unavailable/i;
|
|
26269
|
+
TRANSIENT_MODEL_ERROR_PATTERN = /rate.?limit|429|500|502|503|504|529|timeout|overloaded|model.?not.?found|temporarily.?unavailable|provider[_\s-]?unavailable|server.?error|network.?connection.?lost|connection.?(refused|reset|timeout|lost)|bad.?gateway|gateway.?timeout|internal.?server.?error|service.?unavailable|ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|ENOTFOUND|broken.?pipe|dns(?:[\s_-]+(?:resolution)?)?[\s_-]+fail|name.?not.?resolved|EAI_AGAIN/i;
|
|
26241
26270
|
DEGRADED_ERROR_PATTERN = /context.?length|token.?(limit|budget)|input.?too.?long|content.?filter|exceeds?.?(maximum.?)?tokens|maximum.?context|context.?window|too.?many.?tokens|prompt.?too.?long|message.?too.?long|request.?too.?large|max.?tokens/i;
|
|
26242
26271
|
CONTENT_FILTER_PATTERN = /content.?filter/i;
|
|
26243
26272
|
toolCallsSinceLastWrite = new Map;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.21.
|
|
3
|
+
"version": "7.21.3",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|