opencode-swarm 6.86.12 → 6.86.13
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 +21 -6
- package/dist/config/schema.d.ts +2 -0
- package/dist/index.js +28 -11
- package/dist/utils/gitignore-warning.d.ts +2 -2
- 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.13",
|
|
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",
|
|
@@ -19472,7 +19472,8 @@ var PlanCursorConfigSchema = exports_external.object({
|
|
|
19472
19472
|
});
|
|
19473
19473
|
var CheckpointConfigSchema = exports_external.object({
|
|
19474
19474
|
enabled: exports_external.boolean().default(true),
|
|
19475
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3)
|
|
19475
|
+
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
19476
|
+
allow_empty_commits: exports_external.boolean().default(false)
|
|
19476
19477
|
}).strict();
|
|
19477
19478
|
var AutomationModeSchema = exports_external.enum(["manual", "hybrid", "auto"]);
|
|
19478
19479
|
var AutomationCapabilitiesSchema = exports_external.object({
|
|
@@ -19683,7 +19684,7 @@ var PluginConfigSchema = exports_external.object({
|
|
|
19683
19684
|
council: CouncilConfigSchema.optional(),
|
|
19684
19685
|
parallelization: ParallelizationConfigSchema.optional(),
|
|
19685
19686
|
turbo_mode: exports_external.boolean().default(false).optional(),
|
|
19686
|
-
quiet: exports_external.boolean().default(
|
|
19687
|
+
quiet: exports_external.boolean().default(true).optional(),
|
|
19687
19688
|
version_check: exports_external.boolean().default(true).optional(),
|
|
19688
19689
|
full_auto: exports_external.object({
|
|
19689
19690
|
enabled: exports_external.boolean().default(false),
|
|
@@ -33500,9 +33501,11 @@ function isGitRepo() {
|
|
|
33500
33501
|
function handleSave(label, directory) {
|
|
33501
33502
|
try {
|
|
33502
33503
|
let maxCheckpoints = 20;
|
|
33504
|
+
let allowEmptyCommits = false;
|
|
33503
33505
|
try {
|
|
33504
33506
|
const { config: config3 } = loadPluginConfigWithMeta(directory);
|
|
33505
33507
|
maxCheckpoints = config3.checkpoint?.auto_checkpoint_threshold ?? maxCheckpoints;
|
|
33508
|
+
allowEmptyCommits = config3.checkpoint?.allow_empty_commits === true;
|
|
33506
33509
|
} catch {}
|
|
33507
33510
|
const log2 = readCheckpointLog(directory);
|
|
33508
33511
|
const existingCheckpoint = log2.checkpoints.find((c) => c.label === label);
|
|
@@ -33513,9 +33516,21 @@ function handleSave(label, directory) {
|
|
|
33513
33516
|
error: `duplicate label: "${label}" already exists. Use a different label or delete the existing checkpoint first.`
|
|
33514
33517
|
}, null, 2);
|
|
33515
33518
|
}
|
|
33516
|
-
const _sha = getCurrentSha();
|
|
33517
33519
|
const timestamp = new Date().toISOString();
|
|
33518
|
-
gitExec(["
|
|
33520
|
+
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
33521
|
+
const hasStagedChanges = (() => {
|
|
33522
|
+
try {
|
|
33523
|
+
gitExec(["diff", "--cached", "--quiet"]);
|
|
33524
|
+
return false;
|
|
33525
|
+
} catch {
|
|
33526
|
+
return true;
|
|
33527
|
+
}
|
|
33528
|
+
})();
|
|
33529
|
+
if (hasStagedChanges) {
|
|
33530
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
33531
|
+
} else if (allowEmptyCommits) {
|
|
33532
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
33533
|
+
}
|
|
33519
33534
|
const newSha = getCurrentSha();
|
|
33520
33535
|
log2.checkpoints.push({
|
|
33521
33536
|
label,
|
|
@@ -33594,7 +33609,7 @@ function handleDelete(label, directory) {
|
|
|
33594
33609
|
action: "delete",
|
|
33595
33610
|
success: true,
|
|
33596
33611
|
label,
|
|
33597
|
-
message: `Checkpoint deleted: "${label}"
|
|
33612
|
+
message: `Checkpoint deleted: "${label}"`
|
|
33598
33613
|
}, null, 2);
|
|
33599
33614
|
} catch (e) {
|
|
33600
33615
|
const errorMessage = e instanceof Error ? `delete failed: ${e.message}` : "delete failed: unknown error";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -380,6 +380,7 @@ export type PlanCursorConfig = z.infer<typeof PlanCursorConfigSchema>;
|
|
|
380
380
|
export declare const CheckpointConfigSchema: z.ZodObject<{
|
|
381
381
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
382
382
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
383
|
+
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
383
384
|
}, z.core.$strict>;
|
|
384
385
|
export type CheckpointConfig = z.infer<typeof CheckpointConfigSchema>;
|
|
385
386
|
export declare const AutomationModeSchema: z.ZodEnum<{
|
|
@@ -885,6 +886,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
885
886
|
checkpoint: z.ZodOptional<z.ZodObject<{
|
|
886
887
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
887
888
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
889
|
+
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
888
890
|
}, z.core.$strict>>;
|
|
889
891
|
automation: z.ZodOptional<z.ZodType<{
|
|
890
892
|
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.13",
|
|
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",
|
|
@@ -15179,7 +15179,8 @@ var init_schema = __esm(() => {
|
|
|
15179
15179
|
});
|
|
15180
15180
|
CheckpointConfigSchema = exports_external.object({
|
|
15181
15181
|
enabled: exports_external.boolean().default(true),
|
|
15182
|
-
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3)
|
|
15182
|
+
auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
|
|
15183
|
+
allow_empty_commits: exports_external.boolean().default(false)
|
|
15183
15184
|
}).strict();
|
|
15184
15185
|
AutomationModeSchema = exports_external.enum(["manual", "hybrid", "auto"]);
|
|
15185
15186
|
AutomationCapabilitiesSchema = exports_external.object({
|
|
@@ -15390,7 +15391,7 @@ var init_schema = __esm(() => {
|
|
|
15390
15391
|
council: CouncilConfigSchema.optional(),
|
|
15391
15392
|
parallelization: ParallelizationConfigSchema.optional(),
|
|
15392
15393
|
turbo_mode: exports_external.boolean().default(false).optional(),
|
|
15393
|
-
quiet: exports_external.boolean().default(
|
|
15394
|
+
quiet: exports_external.boolean().default(true).optional(),
|
|
15394
15395
|
version_check: exports_external.boolean().default(true).optional(),
|
|
15395
15396
|
full_auto: exports_external.object({
|
|
15396
15397
|
enabled: exports_external.boolean().default(false),
|
|
@@ -39551,9 +39552,11 @@ function isGitRepo() {
|
|
|
39551
39552
|
function handleSave(label, directory) {
|
|
39552
39553
|
try {
|
|
39553
39554
|
let maxCheckpoints = 20;
|
|
39555
|
+
let allowEmptyCommits = false;
|
|
39554
39556
|
try {
|
|
39555
39557
|
const { config: config3 } = loadPluginConfigWithMeta(directory);
|
|
39556
39558
|
maxCheckpoints = config3.checkpoint?.auto_checkpoint_threshold ?? maxCheckpoints;
|
|
39559
|
+
allowEmptyCommits = config3.checkpoint?.allow_empty_commits === true;
|
|
39557
39560
|
} catch {}
|
|
39558
39561
|
const log2 = readCheckpointLog(directory);
|
|
39559
39562
|
const existingCheckpoint = log2.checkpoints.find((c) => c.label === label);
|
|
@@ -39564,9 +39567,21 @@ function handleSave(label, directory) {
|
|
|
39564
39567
|
error: `duplicate label: "${label}" already exists. Use a different label or delete the existing checkpoint first.`
|
|
39565
39568
|
}, null, 2);
|
|
39566
39569
|
}
|
|
39567
|
-
const _sha = getCurrentSha();
|
|
39568
39570
|
const timestamp = new Date().toISOString();
|
|
39569
|
-
gitExec(["
|
|
39571
|
+
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
39572
|
+
const hasStagedChanges = (() => {
|
|
39573
|
+
try {
|
|
39574
|
+
gitExec(["diff", "--cached", "--quiet"]);
|
|
39575
|
+
return false;
|
|
39576
|
+
} catch {
|
|
39577
|
+
return true;
|
|
39578
|
+
}
|
|
39579
|
+
})();
|
|
39580
|
+
if (hasStagedChanges) {
|
|
39581
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
39582
|
+
} else if (allowEmptyCommits) {
|
|
39583
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
39584
|
+
}
|
|
39570
39585
|
const newSha = getCurrentSha();
|
|
39571
39586
|
log2.checkpoints.push({
|
|
39572
39587
|
label,
|
|
@@ -39645,7 +39660,7 @@ function handleDelete(label, directory) {
|
|
|
39645
39660
|
action: "delete",
|
|
39646
39661
|
success: true,
|
|
39647
39662
|
label,
|
|
39648
|
-
message: `Checkpoint deleted: "${label}"
|
|
39663
|
+
message: `Checkpoint deleted: "${label}"`
|
|
39649
39664
|
}, null, 2);
|
|
39650
39665
|
} catch (e) {
|
|
39651
39666
|
const errorMessage = e instanceof Error ? `delete failed: ${e.message}` : "delete failed: unknown error";
|
|
@@ -58184,7 +58199,7 @@ function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig) {
|
|
|
58184
58199
|
const prefix = isDefault ? "" : `${swarmId}_`;
|
|
58185
58200
|
const swarmPrefix = isDefault ? undefined : swarmId;
|
|
58186
58201
|
const qaRetryLimit = pluginConfig?.qa_retry_limit ?? 3;
|
|
58187
|
-
const quiet = pluginConfig?.quiet ??
|
|
58202
|
+
const quiet = pluginConfig?.quiet ?? true;
|
|
58188
58203
|
const getModel = (baseName) => getModelForAgent(baseName, swarmAgents, swarmPrefix, quiet);
|
|
58189
58204
|
const getPrompts = (name2) => loadAgentPrompt(name2);
|
|
58190
58205
|
const prefixName = (name2) => `${prefix}${name2}`;
|
|
@@ -58334,7 +58349,7 @@ function getAgentConfigs(config3, directory, sessionId) {
|
|
|
58334
58349
|
const agents = createAgents(config3);
|
|
58335
58350
|
const toolFilterEnabled = config3?.tool_filter?.enabled ?? true;
|
|
58336
58351
|
const toolFilterOverrides = config3?.tool_filter?.overrides ?? {};
|
|
58337
|
-
const quiet = config3?.quiet ??
|
|
58352
|
+
const quiet = config3?.quiet ?? true;
|
|
58338
58353
|
const warnedMissingWhitelist = new Set;
|
|
58339
58354
|
const agentToolSnapshot = {};
|
|
58340
58355
|
const result = Object.fromEntries(agents.map((agent) => {
|
|
@@ -88702,7 +88717,7 @@ function readFileSafe(filePath) {
|
|
|
88702
88717
|
return null;
|
|
88703
88718
|
}
|
|
88704
88719
|
}
|
|
88705
|
-
function warnIfSwarmNotGitignored(directory) {
|
|
88720
|
+
function warnIfSwarmNotGitignored(directory, quiet = false) {
|
|
88706
88721
|
if (_gitignoreWarningEmitted)
|
|
88707
88722
|
return;
|
|
88708
88723
|
try {
|
|
@@ -88720,7 +88735,9 @@ function warnIfSwarmNotGitignored(directory) {
|
|
|
88720
88735
|
return;
|
|
88721
88736
|
}
|
|
88722
88737
|
_gitignoreWarningEmitted = true;
|
|
88723
|
-
|
|
88738
|
+
if (!quiet) {
|
|
88739
|
+
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.');
|
|
88740
|
+
}
|
|
88724
88741
|
} catch {}
|
|
88725
88742
|
}
|
|
88726
88743
|
|
|
@@ -88836,7 +88853,7 @@ async function initializeOpenCodeSwarm(ctx) {
|
|
|
88836
88853
|
await loadSnapshot(ctx.directory);
|
|
88837
88854
|
initTelemetry(ctx.directory);
|
|
88838
88855
|
writeSwarmConfigExampleIfNew(ctx.directory);
|
|
88839
|
-
warnIfSwarmNotGitignored(ctx.directory);
|
|
88856
|
+
warnIfSwarmNotGitignored(ctx.directory, config3.quiet);
|
|
88840
88857
|
if (config3.version_check !== false) {
|
|
88841
88858
|
scheduleVersionCheck(package_default.version, (msg) => {
|
|
88842
88859
|
if (config3.quiet) {
|
|
@@ -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.13",
|
|
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",
|