opencode-swarm 6.53.5 → 6.53.6
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 +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45923,15 +45923,19 @@ ${phaseDigest.summary}`,
|
|
|
45923
45923
|
async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledgeConfig) {
|
|
45924
45924
|
let applied = 0;
|
|
45925
45925
|
let skipped = 0;
|
|
45926
|
-
if (recommendations.length === 0) {
|
|
45926
|
+
if (!recommendations || recommendations.length === 0) {
|
|
45927
45927
|
return { applied, skipped };
|
|
45928
45928
|
}
|
|
45929
|
+
if (knowledgeConfig == null) {
|
|
45930
|
+
return { applied: 0, skipped: 0 };
|
|
45931
|
+
}
|
|
45932
|
+
const validRecommendations = recommendations.filter((rec) => rec != null);
|
|
45929
45933
|
const knowledgePath = resolveSwarmKnowledgePath(directory);
|
|
45930
45934
|
const entries = await readKnowledge(knowledgePath);
|
|
45931
45935
|
let modified = false;
|
|
45932
45936
|
const appliedIds = new Set;
|
|
45933
45937
|
const updatedEntries = entries.map((entry) => {
|
|
45934
|
-
const rec =
|
|
45938
|
+
const rec = validRecommendations.find((r) => r.entry_id === entry.id);
|
|
45935
45939
|
if (!rec)
|
|
45936
45940
|
return entry;
|
|
45937
45941
|
switch (rec.action) {
|
|
@@ -45985,7 +45989,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
45985
45989
|
return entry;
|
|
45986
45990
|
}
|
|
45987
45991
|
});
|
|
45988
|
-
for (const rec of
|
|
45992
|
+
for (const rec of validRecommendations) {
|
|
45989
45993
|
if (rec.entry_id !== undefined && !appliedIds.has(rec.entry_id)) {
|
|
45990
45994
|
const found = entries.some((e) => e.id === rec.entry_id);
|
|
45991
45995
|
if (!found) {
|
|
@@ -45998,7 +46002,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
|
|
|
45998
46002
|
await rewriteKnowledge(knowledgePath, updatedEntries);
|
|
45999
46003
|
}
|
|
46000
46004
|
const existingLessons = entries.map((e) => e.lesson);
|
|
46001
|
-
for (const rec of
|
|
46005
|
+
for (const rec of validRecommendations) {
|
|
46002
46006
|
if (rec.entry_id !== undefined)
|
|
46003
46007
|
continue;
|
|
46004
46008
|
if (rec.action !== "promote") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.53.
|
|
3
|
+
"version": "6.53.6",
|
|
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",
|