opencode-swarm 6.73.0 → 6.73.1
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/index.js +16 -11
- package/dist/tools/save-plan.d.ts +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16734,7 +16734,7 @@ async function updateTaskStatus(directory, taskId, status) {
|
|
|
16734
16734
|
const updatedPlan = { ...plan, phases: updatedPhases };
|
|
16735
16735
|
try {
|
|
16736
16736
|
await savePlan(directory, updatedPlan, {
|
|
16737
|
-
preserveCompletedStatuses:
|
|
16737
|
+
preserveCompletedStatuses: false
|
|
16738
16738
|
});
|
|
16739
16739
|
return updatedPlan;
|
|
16740
16740
|
} catch (error49) {
|
|
@@ -79374,16 +79374,18 @@ async function executeSavePlan(args2, fallbackDir) {
|
|
|
79374
79374
|
}
|
|
79375
79375
|
const dir = targetWorkspace;
|
|
79376
79376
|
const existingStatusMap = new Map;
|
|
79377
|
-
|
|
79378
|
-
|
|
79379
|
-
|
|
79380
|
-
|
|
79381
|
-
for (const
|
|
79382
|
-
|
|
79377
|
+
if (!args2.reset_statuses) {
|
|
79378
|
+
try {
|
|
79379
|
+
const existing = await loadPlanJsonOnly(dir);
|
|
79380
|
+
if (existing) {
|
|
79381
|
+
for (const phase of existing.phases) {
|
|
79382
|
+
for (const task of phase.tasks) {
|
|
79383
|
+
existingStatusMap.set(task.id, task.status);
|
|
79384
|
+
}
|
|
79383
79385
|
}
|
|
79384
79386
|
}
|
|
79385
|
-
}
|
|
79386
|
-
}
|
|
79387
|
+
} catch {}
|
|
79388
|
+
}
|
|
79387
79389
|
const plan = {
|
|
79388
79390
|
schema_version: "1.0.0",
|
|
79389
79391
|
title: args2.title,
|
|
@@ -79428,7 +79430,9 @@ async function executeSavePlan(args2, fallbackDir) {
|
|
|
79428
79430
|
};
|
|
79429
79431
|
}
|
|
79430
79432
|
try {
|
|
79431
|
-
await savePlan(dir, plan
|
|
79433
|
+
await savePlan(dir, plan, {
|
|
79434
|
+
preserveCompletedStatuses: !args2.reset_statuses
|
|
79435
|
+
});
|
|
79432
79436
|
const savedPlan = await loadPlanJsonOnly(dir);
|
|
79433
79437
|
if (savedPlan) {
|
|
79434
79438
|
await takeSnapshotEvent(dir, savedPlan).catch(() => {});
|
|
@@ -79493,7 +79497,8 @@ var save_plan = createSwarmTool({
|
|
|
79493
79497
|
acceptance: tool.schema.string().optional().describe("Acceptance criteria for this task")
|
|
79494
79498
|
})).min(1).describe("Tasks in this phase")
|
|
79495
79499
|
})).min(1).describe("Implementation phases"),
|
|
79496
|
-
working_directory: tool.schema.string().optional().describe("Working directory (explicit path, required - no fallback)")
|
|
79500
|
+
working_directory: tool.schema.string().optional().describe("Working directory (explicit path, required - no fallback)"),
|
|
79501
|
+
reset_statuses: tool.schema.boolean().optional().describe("When true, reset ALL task statuses to pending regardless of prior completion state. " + "Use only when deliberately re-planning a phase from scratch. " + "Default false (preserves existing task statuses across plan revisions).")
|
|
79497
79502
|
},
|
|
79498
79503
|
execute: async (args2, _directory) => {
|
|
79499
79504
|
return JSON.stringify(await executeSavePlan(args2, _directory), null, 2);
|
|
@@ -21,6 +21,13 @@ export interface SavePlanArgs {
|
|
|
21
21
|
}>;
|
|
22
22
|
}>;
|
|
23
23
|
working_directory?: string;
|
|
24
|
+
/**
|
|
25
|
+
* When true, all task statuses are reset to 'pending' and existing completed
|
|
26
|
+
* statuses are NOT preserved. Use this when creating a fresh revision of a
|
|
27
|
+
* plan where prior completion state should no longer apply (e.g., re-planning
|
|
28
|
+
* after a failed phase). Defaults to false (existing statuses preserved).
|
|
29
|
+
*/
|
|
30
|
+
reset_statuses?: boolean;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Result from executing save_plan
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.73.
|
|
3
|
+
"version": "6.73.1",
|
|
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",
|