opencode-swarm 7.136.0 → 7.136.2

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 (68) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +41 -1
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +83 -24
  3. package/README.md +18 -0
  4. package/dist/background/candidate-contract.d.ts +13 -0
  5. package/dist/background/workspace-snapshot.d.ts +54 -0
  6. package/dist/cli/{config-doctor-q0krbxwv.js → config-doctor-b67nb84b.js} +2 -2
  7. package/dist/cli/{curation-policy-v6ywe8qd.js → curation-policy-kvzhfaj1.js} +2 -2
  8. package/dist/cli/{curator-llm-factory-mhwje8rf.js → curator-llm-factory-x7kvry9x.js} +17 -14
  9. package/dist/cli/{curator-tqedvpy1.js → curator-nrmj8bds.js} +17 -14
  10. package/dist/cli/{evidence-summary-service-w006jnpg.js → evidence-summary-service-cf8sz2bq.js} +3 -1
  11. package/dist/cli/{guardrail-explain-m0m74hvr.js → guardrail-explain-5kd44rcj.js} +18 -15
  12. package/dist/cli/{guardrail-log-5g8x6qc6.js → guardrail-log-aksrzqdx.js} +3 -3
  13. package/dist/cli/hashing-mjwn6j4y.js +34 -0
  14. package/dist/cli/{hive-promoter-s804newd.js → hive-promoter-cy21rhnd.js} +17 -14
  15. package/dist/cli/{index-n8j0cnp1.js → index-0755132s.js} +4 -4
  16. package/dist/cli/{index-1kjg590p.js → index-1kn24ja0.js} +1 -1
  17. package/dist/cli/{index-j08trvny.js → index-21115szq.js} +5 -5
  18. package/dist/cli/{index-2cv1j3rf.js → index-37v2wxqe.js} +1 -1
  19. package/dist/cli/{index-cfz5750k.js → index-7ayaq27q.js} +5 -1
  20. package/dist/cli/{index-9bk16zkv.js → index-84nz7bhe.js} +1 -1
  21. package/dist/cli/{index-bwfzq91q.js → index-ad6j0m7k.js} +12 -6
  22. package/dist/cli/{index-qh9466j3.js → index-azghvnja.js} +2 -2
  23. package/dist/cli/{index-cxq1t7j1.js → index-ckybsn6p.js} +19 -16
  24. package/dist/cli/{index-cggqh2dz.js → index-kwwxevne.js} +53 -996
  25. package/dist/cli/{index-nw9cn84t.js → index-m5fw4mer.js} +19 -2
  26. package/dist/cli/{index-2w4tsmva.js → index-rw3f73aq.js} +1 -1
  27. package/dist/cli/{index-wpqypdge.js → index-s0rbdp61.js} +2 -2
  28. package/dist/cli/{index-bbejqagj.js → index-s0vahtdm.js} +1 -1
  29. package/dist/cli/{index-81dkzncr.js → index-sr2cynyw.js} +4535 -2325
  30. package/dist/cli/index-wjm896ey.js +1100 -0
  31. package/dist/cli/{index-w58bmwyq.js → index-wnz282j3.js} +2 -2
  32. package/dist/cli/{index-y6a7gjtj.js → index-wsdnttf4.js} +228 -81
  33. package/dist/cli/{index-m1hew17b.js → index-y0xaq4f3.js} +39 -4
  34. package/dist/cli/index-y8552snf.js +264 -0
  35. package/dist/cli/index-z1tm47nj.js +783 -0
  36. package/dist/cli/index.js +17 -14
  37. package/dist/cli/{knowledge-escalator-f1m2xp5x.js → knowledge-escalator-ta3xjrdj.js} +3 -3
  38. package/dist/cli/{knowledge-events-rksgem6f.js → knowledge-events-dk6banmz.js} +1 -1
  39. package/dist/cli/{knowledge-store-t6d6fr8b.js → knowledge-store-h3jz10bv.js} +1 -1
  40. package/dist/cli/{knowledge-validator-5ggzb3j1.js → knowledge-validator-jsz1dxkr.js} +4 -4
  41. package/dist/cli/runner-2v413r74.js +21 -0
  42. package/dist/cli/{scan-cursor-18fnwr58.js → scan-cursor-48gwzh9c.js} +2 -2
  43. package/dist/cli/{schema-jw15d8bt.js → schema-f937b9cs.js} +5 -1
  44. package/dist/cli/{skill-generator-3n5y902z.js → skill-generator-4p10ktw1.js} +5 -5
  45. package/dist/cli/{workspace-snapshot-jmyamqnv.js → workspace-snapshot-h5rzw37b.js} +5 -1
  46. package/dist/commands/registry.d.ts +72 -0
  47. package/dist/commands/skill-opt.d.ts +41 -0
  48. package/dist/config/schema.d.ts +47 -0
  49. package/dist/hooks/guardrails/file-authority.d.ts +11 -2
  50. package/dist/hooks/pr-workflow-gate.d.ts +261 -4
  51. package/dist/hooks/pr-workflow-response-gate.d.ts +27 -9
  52. package/dist/hooks/write-target-resolver.d.ts +19 -0
  53. package/dist/index.js +355 -320
  54. package/dist/services/skill-evaluator.d.ts +17 -0
  55. package/dist/services/skill-optimizer/activation.d.ts +58 -0
  56. package/dist/services/skill-optimizer/candidates.d.ts +88 -0
  57. package/dist/services/skill-optimizer/controller.d.ts +146 -0
  58. package/dist/services/skill-optimizer/deterministic-seed.d.ts +29 -0
  59. package/dist/services/skill-optimizer/lifecycle.d.ts +70 -0
  60. package/dist/services/skill-optimizer/promoted-external-staleness.d.ts +98 -0
  61. package/dist/services/skill-optimizer/retirement.d.ts +54 -0
  62. package/dist/services/skill-optimizer/skill-eval-tasks.d.ts +47 -0
  63. package/dist/services/skill-optimizer/smoke.d.ts +46 -0
  64. package/dist/services/skill-optimizer/store.d.ts +118 -0
  65. package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -1
  66. package/dist/utils/stable-stringify.d.ts +46 -0
  67. package/evaluation-fixtures/skill-eval/scoring/score-skill-eval.cjs +97 -0
  68. package/package.json +1 -1
@@ -7,35 +7,38 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-81dkzncr.js";
10
+ } from "./index-sr2cynyw.js";
11
11
  import"./index-vm4xw9z3.js";
12
- import"./index-nw9cn84t.js";
13
- import"./index-cfz5750k.js";
14
- import"./index-cggqh2dz.js";
12
+ import"./index-wjm896ey.js";
13
+ import"./index-m5fw4mer.js";
14
+ import"./index-7ayaq27q.js";
15
+ import"./index-kwwxevne.js";
16
+ import"./index-z1tm47nj.js";
17
+ import"./index-y8552snf.js";
15
18
  import"./index-4905hd2m.js";
16
19
  import"./index-134d35c1.js";
17
- import"./index-bwfzq91q.js";
18
- import"./index-j08trvny.js";
19
- import"./index-1kjg590p.js";
20
+ import"./index-ad6j0m7k.js";
21
+ import"./index-21115szq.js";
22
+ import"./index-1kn24ja0.js";
20
23
  import"./index-6mjf4vr1.js";
21
24
  import"./index-c8s9a3zh.js";
22
25
  import"./index-9ss2m4rs.js";
23
- import"./index-y6a7gjtj.js";
26
+ import"./index-wsdnttf4.js";
24
27
  import"./index-mrtms113.js";
25
- import"./index-wpqypdge.js";
26
- import"./index-2w4tsmva.js";
28
+ import"./index-s0rbdp61.js";
29
+ import"./index-rw3f73aq.js";
27
30
  import"./index-rtry5xyf.js";
28
31
  import {
29
32
  resolveHiveKnowledgePath
30
- } from "./index-n8j0cnp1.js";
31
- import"./index-9bk16zkv.js";
33
+ } from "./index-0755132s.js";
34
+ import"./index-84nz7bhe.js";
32
35
  import"./index-ae75rja9.js";
33
36
  import"./index-dzyjb33e.js";
34
37
  import"./index-ey29aap6.js";
35
- import"./index-bbejqagj.js";
38
+ import"./index-s0vahtdm.js";
36
39
  import"./index-k5jrywpr.js";
37
40
  import"./index-n832052r.js";
38
- import"./index-m1hew17b.js";
41
+ import"./index-y0xaq4f3.js";
39
42
  import"./index-bk5tah7q.js";
40
43
  import"./index-8fwhhayc.js";
41
44
  import"./index-q1exe2b3.js";
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
702
702
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
703
703
  if (atFloor.length === 0 && recovered.length === 0)
704
704
  return;
705
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-rksgem6f.js");
705
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-dk6banmz.js");
706
706
  const rollups = await readKnowledgeCounterRollups(directory);
707
707
  const flagIds = new Set;
708
708
  for (const e of atFloor) {
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
769
769
  });
770
770
  }
771
771
  if (action === "quarantine" && toQuarantine.length > 0) {
772
- const { quarantineEntry } = await import("./knowledge-validator-5ggzb3j1.js");
773
- const { KnowledgeConfigSchema } = await import("./schema-jw15d8bt.js");
772
+ const { quarantineEntry } = await import("./knowledge-validator-jsz1dxkr.js");
773
+ const { KnowledgeConfigSchema } = await import("./schema-f937b9cs.js");
774
774
  let config;
775
775
  try {
776
- const { loadPluginConfigWithMeta } = await import("./index-w58bmwyq.js");
776
+ const { loadPluginConfigWithMeta } = await import("./index-wnz282j3.js");
777
777
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
778
778
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
779
779
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-n8j0cnp1.js";
5
+ } from "./index-0755132s.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-dzyjb33e.js";
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-n8j0cnp1.js";
9
+ } from "./index-0755132s.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-9bk16zkv.js";
15
+ } from "./index-84nz7bhe.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-5ggzb3j1.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-jsz1dxkr.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-jw15d8bt.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-w58bmwyq.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-f937b9cs.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-wnz282j3.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-nw9cn84t.js";
5
+ } from "./index-m5fw4mer.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-m1hew17b.js";
9
+ } from "./index-y0xaq4f3.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants
@@ -1110,6 +1110,10 @@ function validateConfigKey(path2, value) {
1110
1110
  emitObjectTypeMismatch("external_skills", value, findings);
1111
1111
  break;
1112
1112
  }
1113
+ case "skill_opt": {
1114
+ emitObjectTypeMismatch("skill_opt", value, findings);
1115
+ break;
1116
+ }
1113
1117
  default: {
1114
1118
  const topLevel = path2.split(".")[0];
1115
1119
  if (KNOWN_TOP_LEVEL_KEYS.has(topLevel)) {
@@ -625,7 +625,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
625
625
  deltas.push({ id, delta });
626
626
  }
627
627
  if (deltas.length > 0) {
628
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-t6d6fr8b.js");
628
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-h3jz10bv.js");
629
629
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
630
630
  }
631
631
  return {
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-wpqypdge.js";
5
+ } from "./index-s0rbdp61.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-n8j0cnp1.js";
12
+ } from "./index-0755132s.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-9bk16zkv.js";
16
+ } from "./index-84nz7bhe.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -588,9 +588,15 @@ function includesPhrase(content, phrase) {
588
588
  return content.toLowerCase().includes(phrase.toLowerCase());
589
589
  }
590
590
  function evaluateContent(content, testCase) {
591
+ return scoreSkillPhrases({
592
+ content,
593
+ required: testCase.required_phrases,
594
+ forbidden: testCase.forbidden_phrases
595
+ });
596
+ }
597
+ function scoreSkillPhrases(args) {
598
+ const { content, required = [], forbidden = [] } = args;
591
599
  const failures = [];
592
- const required = testCase.required_phrases ?? [];
593
- const forbidden = testCase.forbidden_phrases ?? [];
594
600
  let requiredHits = 0;
595
601
  for (const phrase of required) {
596
602
  if (includesPhrase(content, phrase)) {
@@ -2135,4 +2141,4 @@ var _internals = {
2135
2141
  clearRetiredSkillLinks
2136
2142
  };
2137
2143
 
2138
- export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
2144
+ export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, isRejectedSkillContent, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-81dkzncr.js";
15
+ } from "./index-sr2cynyw.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-nw9cn84t.js";
22
+ } from "./index-m5fw4mer.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-qh9466j3.js";
4
+ } from "./index-azghvnja.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-2cv1j3rf.js";
7
+ } from "./index-37v2wxqe.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -84,36 +84,39 @@ import {
84
84
  handleWriteRetroCommand,
85
85
  normalizeSwarmCommandInput,
86
86
  resolveCommand
87
- } from "./index-81dkzncr.js";
87
+ } from "./index-sr2cynyw.js";
88
88
  import"./index-vm4xw9z3.js";
89
- import"./index-nw9cn84t.js";
90
- import"./index-cfz5750k.js";
91
- import"./index-cggqh2dz.js";
89
+ import"./index-wjm896ey.js";
90
+ import"./index-m5fw4mer.js";
91
+ import"./index-7ayaq27q.js";
92
+ import"./index-kwwxevne.js";
93
+ import"./index-z1tm47nj.js";
94
+ import"./index-y8552snf.js";
92
95
  import"./index-4905hd2m.js";
93
96
  import"./index-134d35c1.js";
94
- import"./index-bwfzq91q.js";
95
- import"./index-j08trvny.js";
96
- import"./index-1kjg590p.js";
97
+ import"./index-ad6j0m7k.js";
98
+ import"./index-21115szq.js";
99
+ import"./index-1kn24ja0.js";
97
100
  import"./index-6mjf4vr1.js";
98
101
  import"./index-c8s9a3zh.js";
99
102
  import"./index-9ss2m4rs.js";
100
- import"./index-y6a7gjtj.js";
103
+ import"./index-wsdnttf4.js";
101
104
  import"./index-mrtms113.js";
102
- import"./index-wpqypdge.js";
103
- import"./index-2w4tsmva.js";
105
+ import"./index-s0rbdp61.js";
106
+ import"./index-rw3f73aq.js";
104
107
  import"./index-rtry5xyf.js";
105
- import"./index-n8j0cnp1.js";
106
- import"./index-9bk16zkv.js";
108
+ import"./index-0755132s.js";
109
+ import"./index-84nz7bhe.js";
107
110
  import"./index-ae75rja9.js";
108
111
  import"./index-dzyjb33e.js";
109
112
  import"./index-ey29aap6.js";
110
- import"./index-bbejqagj.js";
113
+ import"./index-s0vahtdm.js";
111
114
  import"./index-k5jrywpr.js";
112
115
  import"./index-n832052r.js";
113
116
  import {
114
117
  init_schema,
115
118
  stripKnownSwarmPrefix
116
- } from "./index-m1hew17b.js";
119
+ } from "./index-y0xaq4f3.js";
117
120
  import"./index-bk5tah7q.js";
118
121
  import"./index-8fwhhayc.js";
119
122
  import"./index-q1exe2b3.js";