opencode-swarm 7.109.2 → 7.109.3

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.
Files changed (31) hide show
  1. package/.opencode/skills/ci-failure-batching/SKILL.md +39 -0
  2. package/.opencode/skills/gate-attribution/SKILL.md +31 -0
  3. package/.opencode/skills/merge-queue-readiness/SKILL.md +37 -0
  4. package/.opencode/skills/skill-edit-validation/SKILL.md +29 -0
  5. package/.opencode/skills/worktree-retry-cleanup/SKILL.md +24 -0
  6. package/dist/cli/{curator-6p9tpprq.js → curator-9q3m25va.js} +6 -6
  7. package/dist/cli/{curator-llm-factory-wqbm9mwr.js → curator-llm-factory-78dyv010.js} +6 -6
  8. package/dist/cli/{guardrail-explain-ynge4ww3.js → guardrail-explain-csnawe0d.js} +7 -7
  9. package/dist/cli/{hive-promoter-qh2rh8x2.js → hive-promoter-xnx734y3.js} +6 -6
  10. package/dist/cli/{index-3qwaydq1.js → index-3nd7bz90.js} +7 -7
  11. package/dist/cli/{index-fz1jgbvw.js → index-41fgssqr.js} +22 -2
  12. package/dist/cli/{index-wg0665ft.js → index-8f10r7ay.js} +2 -2
  13. package/dist/cli/{index-9qxntjtx.js → index-b15qbvph.js} +190 -41
  14. package/dist/cli/{index-5gnp8fyw.js → index-mtzjbaaa.js} +3 -3
  15. package/dist/cli/{index-8a8b5wjf.js → index-r9dbs4zr.js} +1 -1
  16. package/dist/cli/{index-cqbqynzp.js → index-xyz8epk6.js} +643 -548
  17. package/dist/cli/{index-mmny81g1.js → index-y5z2qdvk.js} +1 -1
  18. package/dist/cli/index.js +6 -6
  19. package/dist/cli/{knowledge-escalator-6v7sjprx.js → knowledge-escalator-9ksrgq7h.js} +3 -3
  20. package/dist/cli/{knowledge-events-6n3x3he2.js → knowledge-events-ymysgtrr.js} +1 -1
  21. package/dist/cli/{knowledge-store-exkw6yb1.js → knowledge-store-562fefjy.js} +1 -1
  22. package/dist/cli/{knowledge-validator-exymfcb9.js → knowledge-validator-b9nvmzjc.js} +4 -2
  23. package/dist/cli/{skill-generator-mx9br4ty.js → skill-generator-mjfqvnn0.js} +15 -5
  24. package/dist/config/bundled-skills.d.ts +1 -1
  25. package/dist/hooks/knowledge-types.d.ts +6 -0
  26. package/dist/hooks/knowledge-validator.d.ts +5 -0
  27. package/dist/hooks/skill-invalidator.d.ts +48 -0
  28. package/dist/index.js +215 -214
  29. package/dist/services/skill-generator.d.ts +47 -2
  30. package/dist/tools/knowledge-remove.d.ts +3 -8
  31. package/package.json +6 -1
@@ -14,13 +14,39 @@
14
14
  */
15
15
  import { unlinkSync } from 'node:fs';
16
16
  import type { KnowledgeEntryBase } from '../hooks/knowledge-types.js';
17
- import { type SkillEvaluationResult } from './skill-evaluator.js';
17
+ import { type SkillEvalCase, type SkillEvaluationResult } from './skill-evaluator.js';
18
18
  export declare function sanitizeSlug(input: string): string;
19
19
  export declare function isValidSlug(slug: string): boolean;
20
20
  export declare function proposalPath(directory: string, slug: string): string;
21
21
  export declare function activePath(directory: string, slug: string): string;
22
22
  /** Repo-relative path used inside SKILLS: file: references and entry metadata. */
23
23
  export declare function activeRepoRelativePath(slug: string): string;
24
+ /** G10 (issue #1717): repo-relative path of a draft proposal. */
25
+ export declare function proposalRepoRelativePath(slug: string): string;
26
+ /**
27
+ * G8 (issue #1717): derive an eval case from a cluster's directive fields.
28
+ * The stub verifies the generated SKILL.md actually contains the required
29
+ * procedure and omits the forbidden shortcuts it was compiled from. Returns
30
+ * [] when the cluster has no directive fields.
31
+ *
32
+ * Phrase truncation aligns with skill-evaluator.ts MAX_PHRASE_LENGTH=160: the
33
+ * evaluator's normalizePhrase re-truncates to 160 on load, so capping here at
34
+ * 160 guarantees the stub phrase is a prefix of the rendered directive (which
35
+ * escapeMarkdown truncates to 280). includesPhrase does case-insensitive
36
+ * substring matching, so a 160-char stub phrase always matches the first 160
37
+ * chars of the 280-char rendered directive — no false reject on long directives.
38
+ */
39
+ export declare function generateEvalStub(cluster: KnowledgeCluster): SkillEvalCase[];
40
+ /**
41
+ * G8 (issue #1717): write an auto-derived eval stub to
42
+ * .swarm/skills/evals/<slug>/auto-stub.json. Idempotent (overwrites the prior
43
+ * stub). Never touches a human-authored fixture. Fail-open.
44
+ */
45
+ export declare function writeEvalStub(directory: string, slug: string, cases: SkillEvalCase[]): Promise<{
46
+ written: boolean;
47
+ path: string;
48
+ reason?: string;
49
+ }>;
24
50
  export interface CandidateSelectionOptions {
25
51
  minConfidence: number;
26
52
  minConfirmations: number;
@@ -100,7 +126,7 @@ export declare function generateSkills(req: GenerateRequest): Promise<GenerateRe
100
126
  * Returns the IDs that were successfully stamped and the IDs that were not
101
127
  * found in swarm/hive knowledge (so callers can surface staleness).
102
128
  */
103
- declare function stampSourceEntries(directory: string, slug: string, ids: string[]): Promise<{
129
+ declare function stampSourceEntries(directory: string, slug: string, ids: string[], mode?: 'active' | 'draft'): Promise<{
104
130
  stamped: string[];
105
131
  missing: string[];
106
132
  }>;
@@ -124,6 +150,7 @@ export declare function parseDraftFrontmatter(content: string): {
124
150
  export declare function activateProposal(directory: string, slug: string, force?: boolean, options?: {
125
151
  evaluate?: boolean;
126
152
  operation?: string;
153
+ confirmUnevaluated?: boolean;
127
154
  }): Promise<{
128
155
  activated: boolean;
129
156
  from: string;
@@ -183,7 +210,20 @@ export declare function retireSkill(directory: string, slug: string, reason?: st
183
210
  path: string;
184
211
  markerPath: string;
185
212
  reason?: string;
213
+ clearedLinks?: string[];
186
214
  }>;
215
+ /**
216
+ * G10 (issue #1717): clear draft_generated_skill_* on source entries pointing
217
+ * at a draft proposal. Used by autoApplyProposals REJECT so the cluster can be
218
+ * recompiled. Best-effort; never touches the active generated_skill_* stamp.
219
+ */
220
+ export declare function clearDraftSkillLinks(directory: string, proposalFilePath: string, slug: string): Promise<string[]>;
221
+ /**
222
+ * G12 (issue #1717): clear generated_skill_* on source entries pointing at a
223
+ * retired skill, and record the slug in retired_skill_history (capped at 50).
224
+ * Called from retireSkill so all retire callers benefit. Best-effort.
225
+ */
226
+ export declare function clearRetiredSkillLinks(directory: string, skillFilePath: string, slug: string): Promise<string[]>;
187
227
  /**
188
228
  * Mark a skill as stale by writing a stale.marker file in its directory.
189
229
  */
@@ -240,5 +280,10 @@ export declare const _internals: {
240
280
  clearSkillStale: typeof clearSkillStale;
241
281
  autoApplyProposals: typeof autoApplyProposals;
242
282
  unlinkSync: typeof unlinkSync;
283
+ proposalRepoRelativePath: typeof proposalRepoRelativePath;
284
+ generateEvalStub: typeof generateEvalStub;
285
+ writeEvalStub: typeof writeEvalStub;
286
+ clearDraftSkillLinks: typeof clearDraftSkillLinks;
287
+ clearRetiredSkillLinks: typeof clearRetiredSkillLinks;
243
288
  };
244
289
  export {};
@@ -1,13 +1,8 @@
1
- import { recordKnowledgeEvent } from '../hooks/knowledge-events.js';
2
- import { getArchivedKnowledgeIds, transactKnowledge } from '../hooks/knowledge-store.js';
3
- import { findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, retireOrMarkStale } from '../services/skill-generator.js';
1
+ import { transactKnowledge } from '../hooks/knowledge-store.js';
2
+ import { writeArchiveTombstoneAndInvalidateSkills } from '../hooks/skill-invalidator.js';
4
3
  import { createSwarmTool } from './create-tool.js';
5
4
  export declare const _internals: {
6
5
  transactKnowledge: typeof transactKnowledge;
7
- getArchivedKnowledgeIds: typeof getArchivedKnowledgeIds;
8
- findSkillsBySourceKnowledgeId: typeof findSkillsBySourceKnowledgeId;
9
- findStaleSkillsBySourceKnowledgeId: typeof findStaleSkillsBySourceKnowledgeId;
10
- retireOrMarkStale: typeof retireOrMarkStale;
11
- recordKnowledgeEvent: typeof recordKnowledgeEvent;
6
+ writeArchiveTombstoneAndInvalidateSkills: typeof writeArchiveTombstoneAndInvalidateSkills;
12
7
  };
13
8
  export declare const knowledge_remove: ReturnType<typeof createSwarmTool>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.109.2",
3
+ "version": "7.109.3",
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",
@@ -67,6 +67,11 @@
67
67
  ".opencode/skills/running-tests",
68
68
  ".opencode/skills/engineering-conventions",
69
69
  ".opencode/skills/commit-pr",
70
+ ".opencode/skills/worktree-retry-cleanup",
71
+ ".opencode/skills/skill-edit-validation",
72
+ ".opencode/skills/merge-queue-readiness",
73
+ ".opencode/skills/gate-attribution",
74
+ ".opencode/skills/ci-failure-batching",
70
75
  "tests/fixtures/memory-recall",
71
76
  "README.md",
72
77
  "LICENSE"