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.
Files changed (26) hide show
  1. package/dist/cli/{config-doctor-fkwyrtpq.js → config-doctor-ecmx9scq.js} +2 -2
  2. package/dist/cli/{guardrail-explain-bjsc2ydm.js → guardrail-explain-0xdn6krd.js} +7 -7
  3. package/dist/cli/{guardrail-log-x3w800x5.js → guardrail-log-0q6pvbpx.js} +3 -3
  4. package/dist/cli/{index-xsbtbffr.js → index-79dcqsg9.js} +4 -0
  5. package/dist/cli/{index-dy6zs70b.js → index-d3dngtfy.js} +8 -8
  6. package/dist/cli/{index-ne4g3mk1.js → index-dgjsa6hy.js} +1 -1
  7. package/dist/cli/{index-5hrexm02.js → index-fjxjb66n.js} +166 -5
  8. package/dist/cli/{index-mv27v975.js → index-ftf7fby8.js} +17 -13
  9. package/dist/cli/{index-w7gkpmq8.js → index-hb10a2g8.js} +35 -2
  10. package/dist/cli/{index-9j1xvd8m.js → index-mk0jc9aw.js} +2 -2
  11. package/dist/cli/{index-yykcmn6m.js → index-tx5czwpd.js} +1 -1
  12. package/dist/cli/{index-2jpbaedv.js → index-vqg905es.js} +1 -1
  13. package/dist/cli/index.js +6 -6
  14. package/dist/cli/{knowledge-store-eqans52j.js → knowledge-store-pa58msy5.js} +3 -1
  15. package/dist/cli/{schema-1kndsf0c.js → schema-jy18ftky.js} +1 -1
  16. package/dist/cli/{skill-generator-d0jzw6n2.js → skill-generator-3tkwcg4x.js} +12 -2
  17. package/dist/hooks/curator.d.ts +8 -3
  18. package/dist/hooks/knowledge-events.d.ts +12 -1
  19. package/dist/hooks/knowledge-store.d.ts +2 -0
  20. package/dist/index.js +855 -422
  21. package/dist/services/skill-generator.d.ts +46 -0
  22. package/dist/tools/index.d.ts +1 -0
  23. package/dist/tools/manifest.d.ts +1 -0
  24. package/dist/tools/stale-reconciliation.d.ts +23 -0
  25. package/dist/tools/tool-metadata.d.ts +4 -0
  26. package/package.json +1 -1
@@ -24,10 +24,10 @@
24
24
  * This dual dispatch means agent lists are incomplete — they capture factory-dispatched
25
25
  * curators but omit hook-dispatched ones. This is by design for hook-internal operations.
26
26
  */
27
- import { listSkills, parseDraftFrontmatter, retireSkill } from '../services/skill-generator.js';
27
+ import { listSkills, parseDraftFrontmatter, retireOrMarkStale, retireSkill } from '../services/skill-generator.js';
28
28
  import { getSkillVersion, reviseSkill } from '../services/skill-reviser.js';
29
29
  import type { ComplianceObservation, CuratorConfig, CuratorInitResult, CuratorPhaseResult, CuratorSummary, KnowledgeRecommendation } from './curator-types.js';
30
- import { readKnowledge } from './knowledge-store.js';
30
+ import { getArchivedKnowledgeIds, readKnowledge } from './knowledge-store.js';
31
31
  import type { KnowledgeConfig } from './knowledge-types.js';
32
32
  import { readSkillUsageEntries } from './skill-usage-log.js';
33
33
  /**
@@ -48,7 +48,9 @@ export declare const _internals: {
48
48
  readSkillUsageEntries: typeof readSkillUsageEntries;
49
49
  listSkills: typeof listSkills;
50
50
  parseDraftFrontmatter: typeof parseDraftFrontmatter;
51
+ retireOrMarkStale: typeof retireOrMarkStale;
51
52
  retireSkill: typeof retireSkill;
53
+ getArchivedKnowledgeIds: typeof getArchivedKnowledgeIds;
52
54
  readFileAsync: (filePath: string, encoding: string) => Promise<string>;
53
55
  readKnowledge: typeof readKnowledge;
54
56
  reviseSkill: typeof reviseSkill;
@@ -63,10 +65,13 @@ export interface RecommendationParseDiagnostic {
63
65
  * Auto-retire generated skills whose violation rate exceeds 30% or
64
66
  * whose source knowledge entries are all archived.
65
67
  *
68
+ * Also marks skills stale when some (but not all) source knowledge entries
69
+ * are archived.
70
+ *
66
71
  * Non-blocking: errors are caught and logged but never propagated.
67
72
  * Returns an array of observation strings to include in the phase digest.
68
73
  */
69
- declare function autoRetireSkills(directory: string, curatorKnowledgePath: string, excludeSlugs?: ReadonlySet<string>): Promise<string[]>;
74
+ declare function autoRetireSkills(directory: string, _curatorKnowledgePath: string, excludeSlugs?: ReadonlySet<string>): Promise<string[]>;
70
75
  /**
71
76
  * Parse OBSERVATIONS section from curator LLM output.
72
77
  * Expected format per line: "- entry <uuid> (<observable>): [text]"
@@ -132,7 +132,18 @@ export interface EscalationEvent {
132
132
  reason: string;
133
133
  enforcement_mode?: string;
134
134
  }
135
- export type KnowledgeEvent = RetrievedEvent | ReceiptEvent | OutcomeEvent | ArchivedEvent | EscalationEvent;
135
+ /** A batch of skills were invalidated after a knowledge entry was archived/purged. */
136
+ export interface SkillStaleBatchEvent {
137
+ type: 'skill-stale-batch';
138
+ schema_version?: number;
139
+ event_id?: string;
140
+ timestamp?: string;
141
+ skillIds: string[];
142
+ archivedIds: string[];
143
+ retiredCount: number;
144
+ staleCount: number;
145
+ }
146
+ export type KnowledgeEvent = RetrievedEvent | ReceiptEvent | OutcomeEvent | ArchivedEvent | EscalationEvent | SkillStaleBatchEvent;
136
147
  export type KnowledgeEventType = KnowledgeEvent['type'];
137
148
  /**
138
149
  * Event shape accepted by {@link appendKnowledgeEvent} / {@link recordKnowledgeEvent}.
@@ -26,6 +26,7 @@ export declare function appendKnowledge<T>(filePath: string, entry: T): Promise<
26
26
  export declare function rewriteKnowledge<T>(filePath: string, entries: T[]): Promise<void>;
27
27
  export declare function transactFile<T>(filePath: string, read: (filePath: string) => Promise<T>, write: (filePath: string, data: T) => Promise<void>, mutate: (data: T) => T | null): Promise<boolean>;
28
28
  export declare function transactKnowledge<T>(filePath: string, mutate: (entries: T[]) => T[] | null): Promise<boolean>;
29
+ export declare function getArchivedKnowledgeIds(directory: string): Promise<Set<string>>;
29
30
  export declare function appendKnowledgeWithCapEnforcement<T>(filePath: string, entry: T, maxEntries: number): Promise<boolean>;
30
31
  export declare function enforceKnowledgeCap<T>(filePath: string, maxEntries: number): Promise<void>;
31
32
  declare function selectKnowledgeCapSurvivors<T>(entries: T[], maxEntries: number): T[];
@@ -95,5 +96,6 @@ export declare const _internals: {
95
96
  selectKnowledgeCapSurvivors: typeof selectKnowledgeCapSurvivors;
96
97
  inferTags: typeof inferTags;
97
98
  bumpKnowledgeConfidenceBatch: typeof bumpKnowledgeConfidenceBatch;
99
+ getArchivedKnowledgeIds: typeof getArchivedKnowledgeIds;
98
100
  };
99
101
  export {};