opencode-swarm 6.86.13 → 6.86.14
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 +6 -3
- package/dist/config/schema.d.ts +6 -0
- package/dist/index.js +23 -8
- package/dist/session/snapshot-writer.d.ts +2 -2
- package/dist/state.d.ts +2 -0
- package/dist/transient-retry.test.d.ts +10 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -18580,7 +18580,7 @@ import * as path33 from "path";
|
|
|
18580
18580
|
// package.json
|
|
18581
18581
|
var package_default = {
|
|
18582
18582
|
name: "opencode-swarm",
|
|
18583
|
-
version: "6.86.
|
|
18583
|
+
version: "6.86.14",
|
|
18584
18584
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
18585
18585
|
main: "dist/index.js",
|
|
18586
18586
|
types: "dist/index.d.ts",
|
|
@@ -19371,7 +19371,8 @@ var GuardrailsProfileSchema = exports_external.object({
|
|
|
19371
19371
|
max_repetitions: exports_external.number().min(3).max(50).optional(),
|
|
19372
19372
|
max_consecutive_errors: exports_external.number().min(2).max(20).optional(),
|
|
19373
19373
|
warning_threshold: exports_external.number().min(0.1).max(0.9).optional(),
|
|
19374
|
-
idle_timeout_minutes: exports_external.number().min(5).max(240).optional()
|
|
19374
|
+
idle_timeout_minutes: exports_external.number().min(5).max(240).optional(),
|
|
19375
|
+
max_transient_retries: exports_external.number().min(0).max(20).optional()
|
|
19375
19376
|
});
|
|
19376
19377
|
var DEFAULT_AGENT_PROFILES = {
|
|
19377
19378
|
architect: {
|
|
@@ -19432,6 +19433,7 @@ var GuardrailsConfigSchema = exports_external.object({
|
|
|
19432
19433
|
max_duration_minutes: exports_external.number().min(0).max(480).default(30),
|
|
19433
19434
|
max_repetitions: exports_external.number().min(3).max(50).default(10),
|
|
19434
19435
|
max_consecutive_errors: exports_external.number().min(2).max(20).default(5),
|
|
19436
|
+
max_transient_retries: exports_external.number().min(0).max(20).default(5),
|
|
19435
19437
|
warning_threshold: exports_external.number().min(0.1).max(0.9).default(0.75),
|
|
19436
19438
|
idle_timeout_minutes: exports_external.number().min(5).max(240).default(60),
|
|
19437
19439
|
no_op_warning_threshold: exports_external.number().min(1).max(100).default(15),
|
|
@@ -34545,7 +34547,8 @@ function serializeAgentSession(s) {
|
|
|
34545
34547
|
lastSuccessTimeMs: win.lastSuccessTimeMs,
|
|
34546
34548
|
recentToolCalls: win.recentToolCalls,
|
|
34547
34549
|
warningIssued: win.warningIssued,
|
|
34548
|
-
warningReason: win.warningReason
|
|
34550
|
+
warningReason: win.warningReason,
|
|
34551
|
+
transientRetryCount: win.transientRetryCount ?? 0
|
|
34549
34552
|
};
|
|
34550
34553
|
}
|
|
34551
34554
|
return {
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -297,6 +297,7 @@ export declare const GuardrailsProfileSchema: z.ZodObject<{
|
|
|
297
297
|
max_consecutive_errors: z.ZodOptional<z.ZodNumber>;
|
|
298
298
|
warning_threshold: z.ZodOptional<z.ZodNumber>;
|
|
299
299
|
idle_timeout_minutes: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
max_transient_retries: z.ZodOptional<z.ZodNumber>;
|
|
300
301
|
}, z.core.$strip>;
|
|
301
302
|
export type GuardrailsProfile = z.infer<typeof GuardrailsProfileSchema>;
|
|
302
303
|
export declare const DEFAULT_AGENT_PROFILES: Record<string, GuardrailsProfile>;
|
|
@@ -308,6 +309,7 @@ export declare const DEFAULT_ARCHITECT_PROFILE: {
|
|
|
308
309
|
max_consecutive_errors?: number | undefined;
|
|
309
310
|
warning_threshold?: number | undefined;
|
|
310
311
|
idle_timeout_minutes?: number | undefined;
|
|
312
|
+
max_transient_retries?: number | undefined;
|
|
311
313
|
};
|
|
312
314
|
export declare const GuardrailsConfigSchema: z.ZodObject<{
|
|
313
315
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -315,6 +317,7 @@ export declare const GuardrailsConfigSchema: z.ZodObject<{
|
|
|
315
317
|
max_duration_minutes: z.ZodDefault<z.ZodNumber>;
|
|
316
318
|
max_repetitions: z.ZodDefault<z.ZodNumber>;
|
|
317
319
|
max_consecutive_errors: z.ZodDefault<z.ZodNumber>;
|
|
320
|
+
max_transient_retries: z.ZodDefault<z.ZodNumber>;
|
|
318
321
|
warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
319
322
|
idle_timeout_minutes: z.ZodDefault<z.ZodNumber>;
|
|
320
323
|
no_op_warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
@@ -331,6 +334,7 @@ export declare const GuardrailsConfigSchema: z.ZodObject<{
|
|
|
331
334
|
max_consecutive_errors: z.ZodOptional<z.ZodNumber>;
|
|
332
335
|
warning_threshold: z.ZodOptional<z.ZodNumber>;
|
|
333
336
|
idle_timeout_minutes: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
max_transient_retries: z.ZodOptional<z.ZodNumber>;
|
|
334
338
|
}, z.core.$strip>>>;
|
|
335
339
|
block_destructive_commands: z.ZodDefault<z.ZodBoolean>;
|
|
336
340
|
interpreter_allowed_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -758,6 +762,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
758
762
|
max_duration_minutes: z.ZodDefault<z.ZodNumber>;
|
|
759
763
|
max_repetitions: z.ZodDefault<z.ZodNumber>;
|
|
760
764
|
max_consecutive_errors: z.ZodDefault<z.ZodNumber>;
|
|
765
|
+
max_transient_retries: z.ZodDefault<z.ZodNumber>;
|
|
761
766
|
warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
762
767
|
idle_timeout_minutes: z.ZodDefault<z.ZodNumber>;
|
|
763
768
|
no_op_warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
@@ -774,6 +779,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
774
779
|
max_consecutive_errors: z.ZodOptional<z.ZodNumber>;
|
|
775
780
|
warning_threshold: z.ZodOptional<z.ZodNumber>;
|
|
776
781
|
idle_timeout_minutes: z.ZodOptional<z.ZodNumber>;
|
|
782
|
+
max_transient_retries: z.ZodOptional<z.ZodNumber>;
|
|
777
783
|
}, z.core.$strip>>>;
|
|
778
784
|
block_destructive_commands: z.ZodDefault<z.ZodBoolean>;
|
|
779
785
|
interpreter_allowed_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
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: "6.86.
|
|
36
|
+
version: "6.86.14",
|
|
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",
|
|
@@ -15078,7 +15078,8 @@ var init_schema = __esm(() => {
|
|
|
15078
15078
|
max_repetitions: exports_external.number().min(3).max(50).optional(),
|
|
15079
15079
|
max_consecutive_errors: exports_external.number().min(2).max(20).optional(),
|
|
15080
15080
|
warning_threshold: exports_external.number().min(0.1).max(0.9).optional(),
|
|
15081
|
-
idle_timeout_minutes: exports_external.number().min(5).max(240).optional()
|
|
15081
|
+
idle_timeout_minutes: exports_external.number().min(5).max(240).optional(),
|
|
15082
|
+
max_transient_retries: exports_external.number().min(0).max(20).optional()
|
|
15082
15083
|
});
|
|
15083
15084
|
DEFAULT_AGENT_PROFILES = {
|
|
15084
15085
|
architect: {
|
|
@@ -15139,6 +15140,7 @@ var init_schema = __esm(() => {
|
|
|
15139
15140
|
max_duration_minutes: exports_external.number().min(0).max(480).default(30),
|
|
15140
15141
|
max_repetitions: exports_external.number().min(3).max(50).default(10),
|
|
15141
15142
|
max_consecutive_errors: exports_external.number().min(2).max(20).default(5),
|
|
15143
|
+
max_transient_retries: exports_external.number().min(0).max(20).default(5),
|
|
15142
15144
|
warning_threshold: exports_external.number().min(0.1).max(0.9).default(0.75),
|
|
15143
15145
|
idle_timeout_minutes: exports_external.number().min(5).max(240).default(60),
|
|
15144
15146
|
no_op_warning_threshold: exports_external.number().min(1).max(100).default(15),
|
|
@@ -24106,11 +24108,14 @@ function createGuardrailsHooks(directory, directoryOrConfig, config2, authorityC
|
|
|
24106
24108
|
if (hasError) {
|
|
24107
24109
|
const outputStr = typeof output.output === "string" ? output.output : "";
|
|
24108
24110
|
const errorContent = output.error ?? outputStr;
|
|
24109
|
-
const
|
|
24111
|
+
const isTransientPatternMatch = typeof errorContent === "string" && TRANSIENT_MODEL_ERROR_PATTERN.test(errorContent);
|
|
24112
|
+
const isTransient = !!session && isTransientPatternMatch && window2.transientRetryCount < cfg.max_transient_retries;
|
|
24110
24113
|
if (!isTransient) {
|
|
24111
24114
|
window2.consecutiveErrors++;
|
|
24115
|
+
} else {
|
|
24116
|
+
window2.transientRetryCount++;
|
|
24112
24117
|
}
|
|
24113
|
-
if (session &&
|
|
24118
|
+
if (session && isTransientPatternMatch && !session.modelFallbackExhausted) {
|
|
24114
24119
|
session.model_fallback_index++;
|
|
24115
24120
|
const baseAgentName = session.agentName ? session.agentName.replace(/^[^_]+[_]/, "") : "";
|
|
24116
24121
|
const swarmAgents = getSwarmAgents();
|
|
@@ -24133,6 +24138,7 @@ function createGuardrailsHooks(directory, directoryOrConfig, config2, authorityC
|
|
|
24133
24138
|
}
|
|
24134
24139
|
} else {
|
|
24135
24140
|
window2.consecutiveErrors = 0;
|
|
24141
|
+
window2.transientRetryCount = 0;
|
|
24136
24142
|
window2.lastSuccessTimeMs = Date.now();
|
|
24137
24143
|
if (session) {
|
|
24138
24144
|
if (session.model_fallback_index > 0) {
|
|
@@ -24721,7 +24727,7 @@ var init_guardrails = __esm(() => {
|
|
|
24721
24727
|
init_normalize_tool_name();
|
|
24722
24728
|
import_picomatch = __toESM(require_picomatch2(), 1);
|
|
24723
24729
|
storedInputArgs = new Map;
|
|
24724
|
-
TRANSIENT_MODEL_ERROR_PATTERN = /rate.?limit|429|503|timeout|overloaded|model.?not.?found|temporarily unavailable|server error/i;
|
|
24730
|
+
TRANSIENT_MODEL_ERROR_PATTERN = /rate.?limit|429|503|529|timeout|overloaded|model.?not.?found|temporarily unavailable|server error/i;
|
|
24725
24731
|
toolCallsSinceLastWrite = new Map;
|
|
24726
24732
|
noOpWarningIssued = new Set;
|
|
24727
24733
|
consecutiveNoToolTurns = new Map;
|
|
@@ -26018,7 +26024,8 @@ function beginInvocation(sessionId, agentName) {
|
|
|
26018
26024
|
lastSuccessTimeMs: now,
|
|
26019
26025
|
recentToolCalls: [],
|
|
26020
26026
|
warningIssued: false,
|
|
26021
|
-
warningReason: ""
|
|
26027
|
+
warningReason: "",
|
|
26028
|
+
transientRetryCount: 0
|
|
26022
26029
|
};
|
|
26023
26030
|
const key = `${stripped}:${newId}`;
|
|
26024
26031
|
session.windows[key] = window2;
|
|
@@ -41134,7 +41141,8 @@ function serializeAgentSession(s) {
|
|
|
41134
41141
|
lastSuccessTimeMs: win.lastSuccessTimeMs,
|
|
41135
41142
|
recentToolCalls: win.recentToolCalls,
|
|
41136
41143
|
warningIssued: win.warningIssued,
|
|
41137
|
-
warningReason: win.warningReason
|
|
41144
|
+
warningReason: win.warningReason,
|
|
41145
|
+
transientRetryCount: win.transientRetryCount ?? 0
|
|
41138
41146
|
};
|
|
41139
41147
|
}
|
|
41140
41148
|
return {
|
|
@@ -72774,6 +72782,13 @@ function deserializeAgentSession(s) {
|
|
|
72774
72782
|
const catastrophicPhaseWarnings = new Set(s.catastrophicPhaseWarnings ?? []);
|
|
72775
72783
|
const phaseAgentsDispatched = new Set(s.phaseAgentsDispatched ?? []);
|
|
72776
72784
|
const lastCompletedPhaseAgentsDispatched = new Set(s.lastCompletedPhaseAgentsDispatched ?? []);
|
|
72785
|
+
const windows = {};
|
|
72786
|
+
for (const [key, win] of Object.entries(s.windows ?? {})) {
|
|
72787
|
+
windows[key] = {
|
|
72788
|
+
...win,
|
|
72789
|
+
transientRetryCount: win.transientRetryCount ?? 0
|
|
72790
|
+
};
|
|
72791
|
+
}
|
|
72777
72792
|
return {
|
|
72778
72793
|
agentName: s.agentName,
|
|
72779
72794
|
lastToolCallTime: s.lastToolCallTime,
|
|
@@ -72781,7 +72796,7 @@ function deserializeAgentSession(s) {
|
|
|
72781
72796
|
delegationActive: s.delegationActive,
|
|
72782
72797
|
activeInvocationId: s.activeInvocationId,
|
|
72783
72798
|
lastInvocationIdByAgent: s.lastInvocationIdByAgent ?? {},
|
|
72784
|
-
windows
|
|
72799
|
+
windows,
|
|
72785
72800
|
lastCompactionHint: s.lastCompactionHint ?? 0,
|
|
72786
72801
|
architectWriteCount: s.architectWriteCount ?? 0,
|
|
72787
72802
|
lastCoderDelegationTaskId: s.lastCoderDelegationTaskId ?? null,
|
|
@@ -63,7 +63,7 @@ export interface SerializedAgentSession {
|
|
|
63
63
|
/**
|
|
64
64
|
* Minimal interface for serialized InvocationWindow
|
|
65
65
|
*/
|
|
66
|
-
interface SerializedInvocationWindow {
|
|
66
|
+
export interface SerializedInvocationWindow {
|
|
67
67
|
id: number;
|
|
68
68
|
agentName: string;
|
|
69
69
|
startedAtMs: number;
|
|
@@ -78,6 +78,7 @@ interface SerializedInvocationWindow {
|
|
|
78
78
|
}>;
|
|
79
79
|
warningIssued: boolean;
|
|
80
80
|
warningReason: string;
|
|
81
|
+
transientRetryCount: number;
|
|
81
82
|
}
|
|
82
83
|
/**
|
|
83
84
|
* Snapshot data structure written to disk
|
|
@@ -112,4 +113,3 @@ export declare function createSnapshotWriterHook(directory: string): (input: unk
|
|
|
112
113
|
* are persisted before returning.
|
|
113
114
|
*/
|
|
114
115
|
export declare function flushPendingSnapshot(directory: string): Promise<void>;
|
|
115
|
-
export {};
|
package/dist/state.d.ts
CHANGED
|
@@ -231,6 +231,8 @@ export interface InvocationWindow {
|
|
|
231
231
|
warningIssued: boolean;
|
|
232
232
|
/** Human-readable warning reason */
|
|
233
233
|
warningReason: string;
|
|
234
|
+
/** Transient model error retry count for this invocation (resets per window) */
|
|
235
|
+
transientRetryCount: number;
|
|
234
236
|
}
|
|
235
237
|
/**
|
|
236
238
|
* Default run context — the single active run for current single-threaded behavior.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression tests for Issue #691 — transient LLM error continuation (v6.34)
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* 1. TRANSIENT_MODEL_ERROR_PATTERN regex (529 addition and pre-existing terms)
|
|
6
|
+
* 2. GuardrailsConfigSchema and GuardrailsProfileSchema max_transient_retries field
|
|
7
|
+
* 3. InvocationWindow.transientRetryCount initialization via beginInvocation
|
|
8
|
+
* 4. transientRetryCount resets at the start of each new invocation window
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.86.
|
|
3
|
+
"version": "6.86.14",
|
|
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",
|