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.
- package/.opencode/skills/critic-gate/SKILL.md +19 -5
- package/.opencode/skills/plan/SKILL.md +18 -3
- package/.opencode/skills/resume/SKILL.md +4 -1
- package/.opencode/skills/writing-tests/SKILL.md +31 -0
- package/dist/agents/critic.d.ts +1 -1
- package/dist/agents/explorer.d.ts +2 -2
- package/dist/cli/curator-drift-6ad8mxxb.js +211 -0
- package/dist/cli/curator-llm-factory-gdhtm1hh.js +31 -0
- package/dist/cli/curator-np2ky29t.js +51 -0
- package/dist/cli/{evidence-summary-service-v9kmv783.js → evidence-summary-service-dh44gevz.js} +4 -3
- package/dist/cli/{explorer-rwfvbbx5.js → explorer-ksr3xq7n.js} +1 -1
- package/dist/cli/{guardrail-explain-fvjc90wa.js → guardrail-explain-414smfg4.js} +13 -11
- package/dist/cli/hive-promoter-y9r8d315.js +39 -0
- package/dist/cli/{index-ydgy7vg5.js → index-09xpycan.js} +31 -5
- package/dist/cli/index-357p0baj.js +719 -0
- package/dist/cli/{index-7dtekwvd.js → index-7v734syt.js} +1 -1
- package/dist/cli/{index-z4t3w4xf.js → index-87d4wsv9.js} +14 -12
- package/dist/cli/{index-vwyjkzgs.js → index-9wstcavp.js} +1 -1
- package/dist/cli/index-c8s9a3zh.js +73 -0
- package/dist/cli/{index-f4yjypa4.js → index-gt514nt1.js} +29028 -27099
- package/dist/cli/{index-k2rmw9sz.js → index-jjp5qrjv.js} +265 -843
- package/dist/cli/{index-e9n3xsk0.js → index-t4hbye3v.js} +1 -1
- package/dist/cli/index.js +12 -10
- package/dist/cli/{pending-delegations-dvprsdfy.js → pending-delegations-46xf2n2e.js} +2 -2
- package/dist/cli/{pr-subscriptions-zfxjtyzw.js → pr-subscriptions-3c34rnm1.js} +3 -3
- package/dist/cli/{skill-generator-99rrfwae.js → skill-generator-y6mmq8n5.js} +1 -1
- package/dist/commands/curate.d.ts +38 -1
- package/dist/commands/registry.d.ts +2 -2
- package/dist/commands/reset-session.d.ts +10 -0
- package/dist/hooks/curator-postmortem.d.ts +52 -3
- package/dist/hooks/curator.d.ts +2 -1
- package/dist/hooks/delegation-gate/worktree-isolation.d.ts +3 -1
- package/dist/hooks/guardrails/index.d.ts +3 -1
- package/dist/hooks/system-enhancer.d.ts +4 -0
- package/dist/index.js +458 -386
- package/dist/plan/manager.d.ts +15 -1
- package/dist/tools/update-task-status.d.ts +1 -0
- package/dist/utils/spec-hash.d.ts +36 -0
- package/package.json +1 -1
- package/dist/cli/{index-7ztmmqpt.js → index-mpe0yk9s.js} +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
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-
|
|
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-
|
|
95
|
-
import"./index-
|
|
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-
|
|
100
|
-
import"./index-
|
|
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 };
|