opencode-swarm 7.93.1 → 7.94.0
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/{config-doctor-fkwyrtpq.js → config-doctor-ecmx9scq.js} +2 -2
- package/dist/cli/{guardrail-explain-bjsc2ydm.js → guardrail-explain-0xdn6krd.js} +7 -7
- package/dist/cli/{guardrail-log-x3w800x5.js → guardrail-log-0q6pvbpx.js} +3 -3
- package/dist/cli/{index-xsbtbffr.js → index-79dcqsg9.js} +4 -0
- package/dist/cli/{index-dy6zs70b.js → index-d3dngtfy.js} +8 -8
- package/dist/cli/{index-ne4g3mk1.js → index-dgjsa6hy.js} +1 -1
- package/dist/cli/{index-5hrexm02.js → index-fjxjb66n.js} +166 -5
- package/dist/cli/{index-mv27v975.js → index-ftf7fby8.js} +17 -13
- package/dist/cli/{index-w7gkpmq8.js → index-hb10a2g8.js} +35 -2
- package/dist/cli/{index-9j1xvd8m.js → index-mk0jc9aw.js} +2 -2
- package/dist/cli/{index-yykcmn6m.js → index-tx5czwpd.js} +1 -1
- package/dist/cli/{index-2jpbaedv.js → index-vqg905es.js} +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{knowledge-store-eqans52j.js → knowledge-store-pa58msy5.js} +3 -1
- package/dist/cli/{schema-1kndsf0c.js → schema-jy18ftky.js} +1 -1
- package/dist/cli/{skill-generator-d0jzw6n2.js → skill-generator-3tkwcg4x.js} +12 -2
- package/dist/hooks/curator.d.ts +8 -3
- package/dist/hooks/knowledge-events.d.ts +12 -1
- package/dist/hooks/knowledge-store.d.ts +2 -0
- package/dist/index.js +855 -422
- package/dist/services/skill-generator.d.ts +46 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/stale-reconciliation.d.ts +23 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/package.json +1 -1
|
@@ -133,6 +133,15 @@ export declare function activateProposal(directory: string, slug: string, force?
|
|
|
133
133
|
stampedIds?: string[];
|
|
134
134
|
evaluation?: SkillEvaluationResult;
|
|
135
135
|
}>;
|
|
136
|
+
export declare function findSkillsBySourceKnowledgeId(directory: string, sourceId: string): Promise<string[]>;
|
|
137
|
+
/**
|
|
138
|
+
* Scan for stale skills (those with a stale.marker) whose ALL sourceKnowledgeIds
|
|
139
|
+
* are in the archivedIds set. These skills should be retired rather than left stale.
|
|
140
|
+
*
|
|
141
|
+
* This handles the case where a multi-source skill was marked stale after one
|
|
142
|
+
* source was archived, but all sources are now archived.
|
|
143
|
+
*/
|
|
144
|
+
export declare function findStaleSkillsBySourceKnowledgeId(directory: string, archivedIds: Set<string>): Promise<string[]>;
|
|
136
145
|
export declare function listSkills(directory: string): Promise<{
|
|
137
146
|
proposals: Array<{
|
|
138
147
|
slug: string;
|
|
@@ -142,6 +151,10 @@ export declare function listSkills(directory: string): Promise<{
|
|
|
142
151
|
slug: string;
|
|
143
152
|
path: string;
|
|
144
153
|
}>;
|
|
154
|
+
stale: Array<{
|
|
155
|
+
slug: string;
|
|
156
|
+
reason: string;
|
|
157
|
+
}>;
|
|
145
158
|
}>;
|
|
146
159
|
export interface AutoApplyResult {
|
|
147
160
|
approved: string[];
|
|
@@ -159,6 +172,11 @@ export declare function inspectSkill(directory: string, slug: string, prefer?: '
|
|
|
159
172
|
path?: string;
|
|
160
173
|
content?: string;
|
|
161
174
|
mode?: GenerateMode;
|
|
175
|
+
source_knowledge_status?: Array<{
|
|
176
|
+
id: string;
|
|
177
|
+
status: 'active' | 'archived' | 'deleted';
|
|
178
|
+
}>;
|
|
179
|
+
stale_reason?: string;
|
|
162
180
|
}>;
|
|
163
181
|
export declare function retireSkill(directory: string, slug: string, reason?: string): Promise<{
|
|
164
182
|
retired: boolean;
|
|
@@ -166,6 +184,30 @@ export declare function retireSkill(directory: string, slug: string, reason?: st
|
|
|
166
184
|
markerPath: string;
|
|
167
185
|
reason?: string;
|
|
168
186
|
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Mark a skill as stale by writing a stale.marker file in its directory.
|
|
189
|
+
*/
|
|
190
|
+
export declare function markSkillStale(skillDir: string, reason: string): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Remove the stale.marker file from a skill directory.
|
|
193
|
+
* Succeeds silently if the marker does not exist.
|
|
194
|
+
*/
|
|
195
|
+
export declare function clearSkillStale(skillDir: string): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Determine whether to retire or mark stale a skill whose source knowledge ID was archived,
|
|
198
|
+
* then perform the action.
|
|
199
|
+
*
|
|
200
|
+
* Reads the skill's SKILL.md frontmatter to check all its sourceKnowledgeIds.
|
|
201
|
+
* If ALL source knowledge IDs are now archived/deleted → retireSkill
|
|
202
|
+
* Otherwise → markSkillStale
|
|
203
|
+
*
|
|
204
|
+
* Returns { action: 'retire' | 'stale', slug, skillDir }
|
|
205
|
+
*/
|
|
206
|
+
export declare function retireOrMarkStale(directory: string, skillDir: string, archivedKnowledgeIds: Set<string>): Promise<{
|
|
207
|
+
action: 'retire' | 'stale';
|
|
208
|
+
slug: string;
|
|
209
|
+
skillDir: string;
|
|
210
|
+
}>;
|
|
169
211
|
export declare function regenerateSkill(directory: string, slug: string, options?: {
|
|
170
212
|
evaluate?: boolean;
|
|
171
213
|
}): Promise<{
|
|
@@ -187,11 +229,15 @@ export declare const _internals: {
|
|
|
187
229
|
generateSkills: typeof generateSkills;
|
|
188
230
|
activateProposal: typeof activateProposal;
|
|
189
231
|
listSkills: typeof listSkills;
|
|
232
|
+
findSkillsBySourceKnowledgeId: typeof findSkillsBySourceKnowledgeId;
|
|
233
|
+
findStaleSkillsBySourceKnowledgeId: typeof findStaleSkillsBySourceKnowledgeId;
|
|
190
234
|
inspectSkill: typeof inspectSkill;
|
|
191
235
|
stampSourceEntries: typeof stampSourceEntries;
|
|
192
236
|
parseDraftFrontmatter: typeof parseDraftFrontmatter;
|
|
193
237
|
retireSkill: typeof retireSkill;
|
|
238
|
+
retireOrMarkStale: typeof retireOrMarkStale;
|
|
194
239
|
regenerateSkill: typeof regenerateSkill;
|
|
240
|
+
clearSkillStale: typeof clearSkillStale;
|
|
195
241
|
autoApplyProposals: typeof autoApplyProposals;
|
|
196
242
|
unlinkSync: typeof unlinkSync;
|
|
197
243
|
};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export { skill_list } from './skill-list';
|
|
|
66
66
|
export { skill_regenerate } from './skill-regenerate';
|
|
67
67
|
export { skill_retire } from './skill-retire';
|
|
68
68
|
export { spec_write } from './spec-write';
|
|
69
|
+
export { run_stale_reconciliation } from './stale-reconciliation';
|
|
69
70
|
export { submit_phase_council_verdicts } from './submit-phase-council-verdicts';
|
|
70
71
|
export { summarize_work } from './summarize-work';
|
|
71
72
|
export { createSwarmCommandTool, swarm_command } from './swarm-command';
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare const TOOL_MANIFEST: {
|
|
|
92
92
|
skill_list: () => ToolDefinition;
|
|
93
93
|
skill_apply: () => ToolDefinition;
|
|
94
94
|
skill_inspect: () => ToolDefinition;
|
|
95
|
+
run_stale_reconciliation: () => ToolDefinition;
|
|
95
96
|
skill_regenerate: () => ToolDefinition;
|
|
96
97
|
skill_retire: () => ToolDefinition;
|
|
97
98
|
skill_improve: () => ToolDefinition;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* run_stale_reconciliation — Reconcile skills against the knowledge store.
|
|
3
|
+
* Marks skills stale when their source knowledge entries are archived or deleted.
|
|
4
|
+
*/
|
|
5
|
+
import { existsSync } from 'node:fs';
|
|
6
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
7
|
+
import { getArchivedKnowledgeIds, readKnowledge, resolveHiveKnowledgePath, resolveSwarmKnowledgePath } from '../hooks/knowledge-store.js';
|
|
8
|
+
import { clearSkillStale, parseDraftFrontmatter, retireOrMarkStale } from '../services/skill-generator.js';
|
|
9
|
+
import { createSwarmTool } from './create-tool.js';
|
|
10
|
+
export declare const run_stale_reconciliation: ReturnType<typeof createSwarmTool>;
|
|
11
|
+
export declare const _internals: {
|
|
12
|
+
run_stale_reconciliation: typeof run_stale_reconciliation;
|
|
13
|
+
clearSkillStale: typeof clearSkillStale;
|
|
14
|
+
retireOrMarkStale: typeof retireOrMarkStale;
|
|
15
|
+
parseDraftFrontmatter: typeof parseDraftFrontmatter;
|
|
16
|
+
getArchivedKnowledgeIds: typeof getArchivedKnowledgeIds;
|
|
17
|
+
readKnowledge: typeof readKnowledge;
|
|
18
|
+
resolveSwarmKnowledgePath: typeof resolveSwarmKnowledgePath;
|
|
19
|
+
resolveHiveKnowledgePath: typeof resolveHiveKnowledgePath;
|
|
20
|
+
readdir: typeof readdir;
|
|
21
|
+
readFile: typeof readFile;
|
|
22
|
+
existsSync: typeof existsSync;
|
|
23
|
+
};
|
|
@@ -299,6 +299,10 @@ export declare const TOOL_METADATA: {
|
|
|
299
299
|
description: string;
|
|
300
300
|
agents: ("architect" | "skill_improver")[];
|
|
301
301
|
};
|
|
302
|
+
run_stale_reconciliation: {
|
|
303
|
+
description: string;
|
|
304
|
+
agents: "architect"[];
|
|
305
|
+
};
|
|
302
306
|
skill_regenerate: {
|
|
303
307
|
description: string;
|
|
304
308
|
agents: "architect"[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.94.0",
|
|
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",
|