opencode-swarm 7.106.0 → 7.107.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.
Files changed (40) hide show
  1. package/.opencode/skills/critic-gate/SKILL.md +19 -5
  2. package/.opencode/skills/plan/SKILL.md +18 -3
  3. package/.opencode/skills/resume/SKILL.md +4 -1
  4. package/.opencode/skills/writing-tests/SKILL.md +31 -0
  5. package/dist/agents/critic.d.ts +1 -1
  6. package/dist/agents/explorer.d.ts +2 -2
  7. package/dist/cli/curator-drift-6ad8mxxb.js +211 -0
  8. package/dist/cli/curator-llm-factory-gdhtm1hh.js +31 -0
  9. package/dist/cli/curator-np2ky29t.js +51 -0
  10. package/dist/cli/{evidence-summary-service-v9kmv783.js → evidence-summary-service-dh44gevz.js} +4 -3
  11. package/dist/cli/{explorer-rwfvbbx5.js → explorer-ksr3xq7n.js} +1 -1
  12. package/dist/cli/{guardrail-explain-fvjc90wa.js → guardrail-explain-414smfg4.js} +13 -11
  13. package/dist/cli/hive-promoter-y9r8d315.js +39 -0
  14. package/dist/cli/{index-ydgy7vg5.js → index-09xpycan.js} +31 -5
  15. package/dist/cli/index-357p0baj.js +719 -0
  16. package/dist/cli/{index-7dtekwvd.js → index-7v734syt.js} +1 -1
  17. package/dist/cli/{index-z4t3w4xf.js → index-87d4wsv9.js} +14 -12
  18. package/dist/cli/{index-vwyjkzgs.js → index-9wstcavp.js} +1 -1
  19. package/dist/cli/index-c8s9a3zh.js +73 -0
  20. package/dist/cli/{index-f4yjypa4.js → index-gt514nt1.js} +29028 -27099
  21. package/dist/cli/{index-k2rmw9sz.js → index-jjp5qrjv.js} +265 -843
  22. package/dist/cli/{index-e9n3xsk0.js → index-t4hbye3v.js} +1 -1
  23. package/dist/cli/index.js +12 -10
  24. package/dist/cli/{pending-delegations-dvprsdfy.js → pending-delegations-46xf2n2e.js} +2 -2
  25. package/dist/cli/{pr-subscriptions-zfxjtyzw.js → pr-subscriptions-3c34rnm1.js} +3 -3
  26. package/dist/cli/{skill-generator-99rrfwae.js → skill-generator-y6mmq8n5.js} +1 -1
  27. package/dist/commands/curate.d.ts +38 -1
  28. package/dist/commands/registry.d.ts +2 -2
  29. package/dist/commands/reset-session.d.ts +10 -0
  30. package/dist/hooks/curator-postmortem.d.ts +52 -3
  31. package/dist/hooks/curator.d.ts +2 -1
  32. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +3 -1
  33. package/dist/hooks/guardrails/index.d.ts +3 -1
  34. package/dist/hooks/system-enhancer.d.ts +4 -0
  35. package/dist/index.js +458 -386
  36. package/dist/plan/manager.d.ts +15 -1
  37. package/dist/tools/update-task-status.d.ts +1 -0
  38. package/dist/utils/spec-hash.d.ts +36 -0
  39. package/package.json +1 -1
  40. package/dist/cli/{index-7ztmmqpt.js → index-mpe0yk9s.js} +3 -3
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-f4yjypa4.js";
15
+ } from "./index-gt514nt1.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-7dtekwvd.js";
4
+ } from "./index-7v734syt.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-w8dzxnx4.js";
@@ -10,7 +10,7 @@ import {
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
11
11
  SWARM_COMMAND_TOOL_COMMANDS,
12
12
  VALID_COMMANDS,
13
- _internals,
13
+ _internals1 as _internals,
14
14
  canonicalCommandKey,
15
15
  classifySwarmCommandChatFallbackUse,
16
16
  classifySwarmCommandToolUse,
@@ -80,27 +80,29 @@ import {
80
80
  handleWriteRetroCommand,
81
81
  normalizeSwarmCommandInput,
82
82
  resolveCommand
83
- } from "./index-f4yjypa4.js";
84
- import"./index-fxtrk7y8.js";
85
- import"./index-ydgy7vg5.js";
86
- import"./index-vwyjkzgs.js";
87
- import"./index-f7nma02k.js";
83
+ } from "./index-gt514nt1.js";
88
84
  import"./index-esg1554h.js";
85
+ import"./index-jjp5qrjv.js";
86
+ import"./index-8w4d325g.js";
87
+ import"./index-fxtrk7y8.js";
88
+ import"./index-09xpycan.js";
89
89
  import {
90
90
  AGENT_TOOL_MAP,
91
91
  ORCHESTRATOR_NAME,
92
92
  stripKnownSwarmPrefix
93
93
  } from "./index-2560cctg.js";
94
- import"./index-k2rmw9sz.js";
95
- import"./index-8w4d325g.js";
94
+ import"./index-9wstcavp.js";
95
+ import"./index-f7nma02k.js";
96
+ import"./index-c8s9a3zh.js";
97
+ import"./index-357p0baj.js";
96
98
  import"./index-v4fcn4tr.js";
97
99
  import"./index-r8f89sm9.js";
98
100
  import"./index-9b7qp18e.js";
99
- import"./index-e9n3xsk0.js";
100
- import"./index-7ztmmqpt.js";
101
- import"./index-jtqkh8jf.js";
101
+ import"./index-t4hbye3v.js";
102
+ import"./index-mpe0yk9s.js";
102
103
  import"./index-5e4e2hvv.js";
103
104
  import"./index-p0arc26j.js";
105
+ import"./index-jtqkh8jf.js";
104
106
  import"./index-zgwm4ryv.js";
105
107
  import"./index-3naa2ajc.js";
106
108
  import"./index-293f68mj.js";
@@ -2561,4 +2561,4 @@ var _internals = {
2561
2561
  unlinkSync
2562
2562
  };
2563
2563
 
2564
- export { resolveKnowledgeEventsPath, readKnowledgeEvents, readKnowledgeCounterRollups, effectiveRetrievalOutcomes, validateLesson, validateActionableFields, validateActionability, resolveUnactionablePath, appendUnactionable, quarantineEntry, restoreEntry, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
2564
+ export { resolveKnowledgeEventsPath, readKnowledgeEvents, readKnowledgeCounterRollups, effectiveRetrievalOutcomes, validateLesson, validateActionableFields, validateActionability, resolveUnactionablePath, appendUnactionable, quarantineEntry, restoreEntry, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
@@ -0,0 +1,73 @@
1
+ // @bun
2
+ import {
3
+ log
4
+ } from "./index-zgwm4ryv.js";
5
+
6
+ // src/background/event-bus.ts
7
+ class AutomationEventBus {
8
+ listeners = new Map;
9
+ eventHistory = [];
10
+ maxHistorySize;
11
+ constructor(options) {
12
+ this.maxHistorySize = options?.maxHistorySize ?? 100;
13
+ }
14
+ subscribe(type, listener) {
15
+ if (!this.listeners.has(type)) {
16
+ this.listeners.set(type, new Set);
17
+ }
18
+ this.listeners.get(type).add(listener);
19
+ return () => {
20
+ this.listeners.get(type)?.delete(listener);
21
+ };
22
+ }
23
+ async publish(type, payload, source) {
24
+ const event = {
25
+ type,
26
+ timestamp: Date.now(),
27
+ payload,
28
+ source
29
+ };
30
+ this.eventHistory.push(event);
31
+ if (this.eventHistory.length > this.maxHistorySize) {
32
+ this.eventHistory.shift();
33
+ }
34
+ log(`[EventBus] ${type}`, {
35
+ source,
36
+ payload: typeof payload === "object" ? "..." : payload
37
+ });
38
+ const listeners = this.listeners.get(type);
39
+ if (listeners) {
40
+ await Promise.all(Array.from(listeners).map(async (listener) => {
41
+ try {
42
+ await listener(event);
43
+ } catch (error) {
44
+ log(`[EventBus] Listener error for ${type}`, { error });
45
+ }
46
+ }));
47
+ }
48
+ }
49
+ getHistory(types) {
50
+ if (!types || types.length === 0) {
51
+ return [...this.eventHistory];
52
+ }
53
+ return this.eventHistory.filter((e) => types.includes(e.type));
54
+ }
55
+ clearHistory() {
56
+ this.eventHistory = [];
57
+ }
58
+ getListenerCount(type) {
59
+ return this.listeners.get(type)?.size ?? 0;
60
+ }
61
+ hasListeners(type) {
62
+ return this.getListenerCount(type) > 0;
63
+ }
64
+ }
65
+ var globalEventBus = null;
66
+ function getGlobalEventBus() {
67
+ if (!globalEventBus) {
68
+ globalEventBus = new AutomationEventBus;
69
+ }
70
+ return globalEventBus;
71
+ }
72
+
73
+ export { getGlobalEventBus };