opencode-swarm 6.86.12 → 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
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),
|
|
@@ -19472,7 +19474,8 @@ var PlanCursorConfigSchema = exports_external.object({
|
|
|
19472
19474
|
});
|
|
19473
19475
|
var CheckpointConfigSchema = exports_external.object({
|
|
19474
19476
|
enabled: exports_external.boolean().default(true),
|
|
19475
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3)
|
|
19477
|
+
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
19478
|
+
allow_empty_commits: exports_external.boolean().default(false)
|
|
19476
19479
|
}).strict();
|
|
19477
19480
|
var AutomationModeSchema = exports_external.enum(["manual", "hybrid", "auto"]);
|
|
19478
19481
|
var AutomationCapabilitiesSchema = exports_external.object({
|
|
@@ -19683,7 +19686,7 @@ var PluginConfigSchema = exports_external.object({
|
|
|
19683
19686
|
council: CouncilConfigSchema.optional(),
|
|
19684
19687
|
parallelization: ParallelizationConfigSchema.optional(),
|
|
19685
19688
|
turbo_mode: exports_external.boolean().default(false).optional(),
|
|
19686
|
-
quiet: exports_external.boolean().default(
|
|
19689
|
+
quiet: exports_external.boolean().default(true).optional(),
|
|
19687
19690
|
version_check: exports_external.boolean().default(true).optional(),
|
|
19688
19691
|
full_auto: exports_external.object({
|
|
19689
19692
|
enabled: exports_external.boolean().default(false),
|
|
@@ -33500,9 +33503,11 @@ function isGitRepo() {
|
|
|
33500
33503
|
function handleSave(label, directory) {
|
|
33501
33504
|
try {
|
|
33502
33505
|
let maxCheckpoints = 20;
|
|
33506
|
+
let allowEmptyCommits = false;
|
|
33503
33507
|
try {
|
|
33504
33508
|
const { config: config3 } = loadPluginConfigWithMeta(directory);
|
|
33505
33509
|
maxCheckpoints = config3.checkpoint?.auto_checkpoint_threshold ?? maxCheckpoints;
|
|
33510
|
+
allowEmptyCommits = config3.checkpoint?.allow_empty_commits === true;
|
|
33506
33511
|
} catch {}
|
|
33507
33512
|
const log2 = readCheckpointLog(directory);
|
|
33508
33513
|
const existingCheckpoint = log2.checkpoints.find((c) => c.label === label);
|
|
@@ -33513,9 +33518,21 @@ function handleSave(label, directory) {
|
|
|
33513
33518
|
error: `duplicate label: "${label}" already exists. Use a different label or delete the existing checkpoint first.`
|
|
33514
33519
|
}, null, 2);
|
|
33515
33520
|
}
|
|
33516
|
-
const _sha = getCurrentSha();
|
|
33517
33521
|
const timestamp = new Date().toISOString();
|
|
33518
|
-
gitExec(["
|
|
33522
|
+
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
33523
|
+
const hasStagedChanges = (() => {
|
|
33524
|
+
try {
|
|
33525
|
+
gitExec(["diff", "--cached", "--quiet"]);
|
|
33526
|
+
return false;
|
|
33527
|
+
} catch {
|
|
33528
|
+
return true;
|
|
33529
|
+
}
|
|
33530
|
+
})();
|
|
33531
|
+
if (hasStagedChanges) {
|
|
33532
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
33533
|
+
} else if (allowEmptyCommits) {
|
|
33534
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
33535
|
+
}
|
|
33519
33536
|
const newSha = getCurrentSha();
|
|
33520
33537
|
log2.checkpoints.push({
|
|
33521
33538
|
label,
|
|
@@ -33594,7 +33611,7 @@ function handleDelete(label, directory) {
|
|
|
33594
33611
|
action: "delete",
|
|
33595
33612
|
success: true,
|
|
33596
33613
|
label,
|
|
33597
|
-
message: `Checkpoint deleted: "${label}"
|
|
33614
|
+
message: `Checkpoint deleted: "${label}"`
|
|
33598
33615
|
}, null, 2);
|
|
33599
33616
|
} catch (e) {
|
|
33600
33617
|
const errorMessage = e instanceof Error ? `delete failed: ${e.message}` : "delete failed: unknown error";
|
|
@@ -34530,7 +34547,8 @@ function serializeAgentSession(s) {
|
|
|
34530
34547
|
lastSuccessTimeMs: win.lastSuccessTimeMs,
|
|
34531
34548
|
recentToolCalls: win.recentToolCalls,
|
|
34532
34549
|
warningIssued: win.warningIssued,
|
|
34533
|
-
warningReason: win.warningReason
|
|
34550
|
+
warningReason: win.warningReason,
|
|
34551
|
+
transientRetryCount: win.transientRetryCount ?? 0
|
|
34534
34552
|
};
|
|
34535
34553
|
}
|
|
34536
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>>;
|
|
@@ -380,6 +384,7 @@ export type PlanCursorConfig = z.infer<typeof PlanCursorConfigSchema>;
|
|
|
380
384
|
export declare const CheckpointConfigSchema: z.ZodObject<{
|
|
381
385
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
382
386
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
387
|
+
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
383
388
|
}, z.core.$strict>;
|
|
384
389
|
export type CheckpointConfig = z.infer<typeof CheckpointConfigSchema>;
|
|
385
390
|
export declare const AutomationModeSchema: z.ZodEnum<{
|
|
@@ -757,6 +762,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
757
762
|
max_duration_minutes: z.ZodDefault<z.ZodNumber>;
|
|
758
763
|
max_repetitions: z.ZodDefault<z.ZodNumber>;
|
|
759
764
|
max_consecutive_errors: z.ZodDefault<z.ZodNumber>;
|
|
765
|
+
max_transient_retries: z.ZodDefault<z.ZodNumber>;
|
|
760
766
|
warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
761
767
|
idle_timeout_minutes: z.ZodDefault<z.ZodNumber>;
|
|
762
768
|
no_op_warning_threshold: z.ZodDefault<z.ZodNumber>;
|
|
@@ -773,6 +779,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
773
779
|
max_consecutive_errors: z.ZodOptional<z.ZodNumber>;
|
|
774
780
|
warning_threshold: z.ZodOptional<z.ZodNumber>;
|
|
775
781
|
idle_timeout_minutes: z.ZodOptional<z.ZodNumber>;
|
|
782
|
+
max_transient_retries: z.ZodOptional<z.ZodNumber>;
|
|
776
783
|
}, z.core.$strip>>>;
|
|
777
784
|
block_destructive_commands: z.ZodDefault<z.ZodBoolean>;
|
|
778
785
|
interpreter_allowed_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -885,6 +892,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
885
892
|
checkpoint: z.ZodOptional<z.ZodObject<{
|
|
886
893
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
887
894
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
895
|
+
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
888
896
|
}, z.core.$strict>>;
|
|
889
897
|
automation: z.ZodOptional<z.ZodType<{
|
|
890
898
|
mode: "auto" | "manual" | "hybrid";
|
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),
|
|
@@ -15179,7 +15181,8 @@ var init_schema = __esm(() => {
|
|
|
15179
15181
|
});
|
|
15180
15182
|
CheckpointConfigSchema = exports_external.object({
|
|
15181
15183
|
enabled: exports_external.boolean().default(true),
|
|
15182
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3)
|
|
15184
|
+
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
15185
|
+
allow_empty_commits: exports_external.boolean().default(false)
|
|
15183
15186
|
}).strict();
|
|
15184
15187
|
AutomationModeSchema = exports_external.enum(["manual", "hybrid", "auto"]);
|
|
15185
15188
|
AutomationCapabilitiesSchema = exports_external.object({
|
|
@@ -15390,7 +15393,7 @@ var init_schema = __esm(() => {
|
|
|
15390
15393
|
council: CouncilConfigSchema.optional(),
|
|
15391
15394
|
parallelization: ParallelizationConfigSchema.optional(),
|
|
15392
15395
|
turbo_mode: exports_external.boolean().default(false).optional(),
|
|
15393
|
-
quiet: exports_external.boolean().default(
|
|
15396
|
+
quiet: exports_external.boolean().default(true).optional(),
|
|
15394
15397
|
version_check: exports_external.boolean().default(true).optional(),
|
|
15395
15398
|
full_auto: exports_external.object({
|
|
15396
15399
|
enabled: exports_external.boolean().default(false),
|
|
@@ -24105,11 +24108,14 @@ function createGuardrailsHooks(directory, directoryOrConfig, config2, authorityC
|
|
|
24105
24108
|
if (hasError) {
|
|
24106
24109
|
const outputStr = typeof output.output === "string" ? output.output : "";
|
|
24107
24110
|
const errorContent = output.error ?? outputStr;
|
|
24108
|
-
const
|
|
24111
|
+
const isTransientPatternMatch = typeof errorContent === "string" && TRANSIENT_MODEL_ERROR_PATTERN.test(errorContent);
|
|
24112
|
+
const isTransient = !!session && isTransientPatternMatch && window2.transientRetryCount < cfg.max_transient_retries;
|
|
24109
24113
|
if (!isTransient) {
|
|
24110
24114
|
window2.consecutiveErrors++;
|
|
24115
|
+
} else {
|
|
24116
|
+
window2.transientRetryCount++;
|
|
24111
24117
|
}
|
|
24112
|
-
if (session &&
|
|
24118
|
+
if (session && isTransientPatternMatch && !session.modelFallbackExhausted) {
|
|
24113
24119
|
session.model_fallback_index++;
|
|
24114
24120
|
const baseAgentName = session.agentName ? session.agentName.replace(/^[^_]+[_]/, "") : "";
|
|
24115
24121
|
const swarmAgents = getSwarmAgents();
|
|
@@ -24132,6 +24138,7 @@ function createGuardrailsHooks(directory, directoryOrConfig, config2, authorityC
|
|
|
24132
24138
|
}
|
|
24133
24139
|
} else {
|
|
24134
24140
|
window2.consecutiveErrors = 0;
|
|
24141
|
+
window2.transientRetryCount = 0;
|
|
24135
24142
|
window2.lastSuccessTimeMs = Date.now();
|
|
24136
24143
|
if (session) {
|
|
24137
24144
|
if (session.model_fallback_index > 0) {
|
|
@@ -24720,7 +24727,7 @@ var init_guardrails = __esm(() => {
|
|
|
24720
24727
|
init_normalize_tool_name();
|
|
24721
24728
|
import_picomatch = __toESM(require_picomatch2(), 1);
|
|
24722
24729
|
storedInputArgs = new Map;
|
|
24723
|
-
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;
|
|
24724
24731
|
toolCallsSinceLastWrite = new Map;
|
|
24725
24732
|
noOpWarningIssued = new Set;
|
|
24726
24733
|
consecutiveNoToolTurns = new Map;
|
|
@@ -26017,7 +26024,8 @@ function beginInvocation(sessionId, agentName) {
|
|
|
26017
26024
|
lastSuccessTimeMs: now,
|
|
26018
26025
|
recentToolCalls: [],
|
|
26019
26026
|
warningIssued: false,
|
|
26020
|
-
warningReason: ""
|
|
26027
|
+
warningReason: "",
|
|
26028
|
+
transientRetryCount: 0
|
|
26021
26029
|
};
|
|
26022
26030
|
const key = `${stripped}:${newId}`;
|
|
26023
26031
|
session.windows[key] = window2;
|
|
@@ -39551,9 +39559,11 @@ function isGitRepo() {
|
|
|
39551
39559
|
function handleSave(label, directory) {
|
|
39552
39560
|
try {
|
|
39553
39561
|
let maxCheckpoints = 20;
|
|
39562
|
+
let allowEmptyCommits = false;
|
|
39554
39563
|
try {
|
|
39555
39564
|
const { config: config3 } = loadPluginConfigWithMeta(directory);
|
|
39556
39565
|
maxCheckpoints = config3.checkpoint?.auto_checkpoint_threshold ?? maxCheckpoints;
|
|
39566
|
+
allowEmptyCommits = config3.checkpoint?.allow_empty_commits === true;
|
|
39557
39567
|
} catch {}
|
|
39558
39568
|
const log2 = readCheckpointLog(directory);
|
|
39559
39569
|
const existingCheckpoint = log2.checkpoints.find((c) => c.label === label);
|
|
@@ -39564,9 +39574,21 @@ function handleSave(label, directory) {
|
|
|
39564
39574
|
error: `duplicate label: "${label}" already exists. Use a different label or delete the existing checkpoint first.`
|
|
39565
39575
|
}, null, 2);
|
|
39566
39576
|
}
|
|
39567
|
-
const _sha = getCurrentSha();
|
|
39568
39577
|
const timestamp = new Date().toISOString();
|
|
39569
|
-
gitExec(["
|
|
39578
|
+
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
39579
|
+
const hasStagedChanges = (() => {
|
|
39580
|
+
try {
|
|
39581
|
+
gitExec(["diff", "--cached", "--quiet"]);
|
|
39582
|
+
return false;
|
|
39583
|
+
} catch {
|
|
39584
|
+
return true;
|
|
39585
|
+
}
|
|
39586
|
+
})();
|
|
39587
|
+
if (hasStagedChanges) {
|
|
39588
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
39589
|
+
} else if (allowEmptyCommits) {
|
|
39590
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
39591
|
+
}
|
|
39570
39592
|
const newSha = getCurrentSha();
|
|
39571
39593
|
log2.checkpoints.push({
|
|
39572
39594
|
label,
|
|
@@ -39645,7 +39667,7 @@ function handleDelete(label, directory) {
|
|
|
39645
39667
|
action: "delete",
|
|
39646
39668
|
success: true,
|
|
39647
39669
|
label,
|
|
39648
|
-
message: `Checkpoint deleted: "${label}"
|
|
39670
|
+
message: `Checkpoint deleted: "${label}"`
|
|
39649
39671
|
}, null, 2);
|
|
39650
39672
|
} catch (e) {
|
|
39651
39673
|
const errorMessage = e instanceof Error ? `delete failed: ${e.message}` : "delete failed: unknown error";
|
|
@@ -41119,7 +41141,8 @@ function serializeAgentSession(s) {
|
|
|
41119
41141
|
lastSuccessTimeMs: win.lastSuccessTimeMs,
|
|
41120
41142
|
recentToolCalls: win.recentToolCalls,
|
|
41121
41143
|
warningIssued: win.warningIssued,
|
|
41122
|
-
warningReason: win.warningReason
|
|
41144
|
+
warningReason: win.warningReason,
|
|
41145
|
+
transientRetryCount: win.transientRetryCount ?? 0
|
|
41123
41146
|
};
|
|
41124
41147
|
}
|
|
41125
41148
|
return {
|
|
@@ -58184,7 +58207,7 @@ function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig) {
|
|
|
58184
58207
|
const prefix = isDefault ? "" : `${swarmId}_`;
|
|
58185
58208
|
const swarmPrefix = isDefault ? undefined : swarmId;
|
|
58186
58209
|
const qaRetryLimit = pluginConfig?.qa_retry_limit ?? 3;
|
|
58187
|
-
const quiet = pluginConfig?.quiet ??
|
|
58210
|
+
const quiet = pluginConfig?.quiet ?? true;
|
|
58188
58211
|
const getModel = (baseName) => getModelForAgent(baseName, swarmAgents, swarmPrefix, quiet);
|
|
58189
58212
|
const getPrompts = (name2) => loadAgentPrompt(name2);
|
|
58190
58213
|
const prefixName = (name2) => `${prefix}${name2}`;
|
|
@@ -58334,7 +58357,7 @@ function getAgentConfigs(config3, directory, sessionId) {
|
|
|
58334
58357
|
const agents = createAgents(config3);
|
|
58335
58358
|
const toolFilterEnabled = config3?.tool_filter?.enabled ?? true;
|
|
58336
58359
|
const toolFilterOverrides = config3?.tool_filter?.overrides ?? {};
|
|
58337
|
-
const quiet = config3?.quiet ??
|
|
58360
|
+
const quiet = config3?.quiet ?? true;
|
|
58338
58361
|
const warnedMissingWhitelist = new Set;
|
|
58339
58362
|
const agentToolSnapshot = {};
|
|
58340
58363
|
const result = Object.fromEntries(agents.map((agent) => {
|
|
@@ -72759,6 +72782,13 @@ function deserializeAgentSession(s) {
|
|
|
72759
72782
|
const catastrophicPhaseWarnings = new Set(s.catastrophicPhaseWarnings ?? []);
|
|
72760
72783
|
const phaseAgentsDispatched = new Set(s.phaseAgentsDispatched ?? []);
|
|
72761
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
|
+
}
|
|
72762
72792
|
return {
|
|
72763
72793
|
agentName: s.agentName,
|
|
72764
72794
|
lastToolCallTime: s.lastToolCallTime,
|
|
@@ -72766,7 +72796,7 @@ function deserializeAgentSession(s) {
|
|
|
72766
72796
|
delegationActive: s.delegationActive,
|
|
72767
72797
|
activeInvocationId: s.activeInvocationId,
|
|
72768
72798
|
lastInvocationIdByAgent: s.lastInvocationIdByAgent ?? {},
|
|
72769
|
-
windows
|
|
72799
|
+
windows,
|
|
72770
72800
|
lastCompactionHint: s.lastCompactionHint ?? 0,
|
|
72771
72801
|
architectWriteCount: s.architectWriteCount ?? 0,
|
|
72772
72802
|
lastCoderDelegationTaskId: s.lastCoderDelegationTaskId ?? null,
|
|
@@ -88702,7 +88732,7 @@ function readFileSafe(filePath) {
|
|
|
88702
88732
|
return null;
|
|
88703
88733
|
}
|
|
88704
88734
|
}
|
|
88705
|
-
function warnIfSwarmNotGitignored(directory) {
|
|
88735
|
+
function warnIfSwarmNotGitignored(directory, quiet = false) {
|
|
88706
88736
|
if (_gitignoreWarningEmitted)
|
|
88707
88737
|
return;
|
|
88708
88738
|
try {
|
|
@@ -88720,7 +88750,9 @@ function warnIfSwarmNotGitignored(directory) {
|
|
|
88720
88750
|
return;
|
|
88721
88751
|
}
|
|
88722
88752
|
_gitignoreWarningEmitted = true;
|
|
88723
|
-
|
|
88753
|
+
if (!quiet) {
|
|
88754
|
+
console.warn('[opencode-swarm] WARNING: .swarm/ is not in your .gitignore. Shell audit logs may contain API keys. Add ".swarm/" to your .gitignore to prevent accidental commits.');
|
|
88755
|
+
}
|
|
88724
88756
|
} catch {}
|
|
88725
88757
|
}
|
|
88726
88758
|
|
|
@@ -88836,7 +88868,7 @@ async function initializeOpenCodeSwarm(ctx) {
|
|
|
88836
88868
|
await loadSnapshot(ctx.directory);
|
|
88837
88869
|
initTelemetry(ctx.directory);
|
|
88838
88870
|
writeSwarmConfigExampleIfNew(ctx.directory);
|
|
88839
|
-
warnIfSwarmNotGitignored(ctx.directory);
|
|
88871
|
+
warnIfSwarmNotGitignored(ctx.directory, config3.quiet);
|
|
88840
88872
|
if (config3.version_check !== false) {
|
|
88841
88873
|
scheduleVersionCheck(package_default.version, (msg) => {
|
|
88842
88874
|
if (config3.quiet) {
|
|
@@ -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 {};
|
|
@@ -10,8 +10,8 @@ export declare function resetGitignoreWarningState(): void;
|
|
|
10
10
|
/**
|
|
11
11
|
* Checks whether `.swarm/` is covered by `.gitignore` or `.git/info/exclude`
|
|
12
12
|
* in the git repo rooted at or above `directory`. If not covered, emits a
|
|
13
|
-
* single `console.warn
|
|
13
|
+
* single `console.warn` (unless `quiet` is true). Fires at most once per process.
|
|
14
14
|
*
|
|
15
15
|
* Never throws — any file-system error silently skips the check.
|
|
16
16
|
*/
|
|
17
|
-
export declare function warnIfSwarmNotGitignored(directory: string): void;
|
|
17
|
+
export declare function warnIfSwarmNotGitignored(directory: string, quiet?: boolean): void;
|
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",
|