opencode-swarm 7.136.1 → 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 (67) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +41 -1
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +72 -24
  3. package/README.md +18 -0
  4. package/dist/background/workspace-snapshot.d.ts +54 -0
  5. package/dist/cli/{config-doctor-6fphg5xm.js → config-doctor-b67nb84b.js} +2 -2
  6. package/dist/cli/{curation-policy-m24jbyag.js → curation-policy-kvzhfaj1.js} +2 -2
  7. package/dist/cli/{curator-llm-factory-w5arq7tr.js → curator-llm-factory-x7kvry9x.js} +17 -14
  8. package/dist/cli/{curator-zrt5sqj2.js → curator-nrmj8bds.js} +17 -14
  9. package/dist/cli/{evidence-summary-service-w006jnpg.js → evidence-summary-service-cf8sz2bq.js} +3 -1
  10. package/dist/cli/{guardrail-explain-462jwhbh.js → guardrail-explain-5kd44rcj.js} +18 -15
  11. package/dist/cli/{guardrail-log-ax21jd9e.js → guardrail-log-aksrzqdx.js} +3 -3
  12. package/dist/cli/hashing-mjwn6j4y.js +34 -0
  13. package/dist/cli/{hive-promoter-2vacnbws.js → hive-promoter-cy21rhnd.js} +17 -14
  14. package/dist/cli/{index-hzkvbycn.js → index-0755132s.js} +4 -4
  15. package/dist/cli/{index-9gxp450h.js → index-1kn24ja0.js} +1 -1
  16. package/dist/cli/{index-h3bweb88.js → index-21115szq.js} +5 -5
  17. package/dist/cli/{index-g7g4hqh3.js → index-37v2wxqe.js} +1 -1
  18. package/dist/cli/{index-gf7hqbmz.js → index-7ayaq27q.js} +5 -1
  19. package/dist/cli/{index-kzc2ygea.js → index-84nz7bhe.js} +1 -1
  20. package/dist/cli/{index-1sq47n6t.js → index-ad6j0m7k.js} +12 -6
  21. package/dist/cli/{index-zkddc5ye.js → index-azghvnja.js} +2 -2
  22. package/dist/cli/{index-rhgctfn3.js → index-ckybsn6p.js} +19 -16
  23. package/dist/cli/{index-cggqh2dz.js → index-kwwxevne.js} +53 -996
  24. package/dist/cli/{index-tfa40hwb.js → index-m5fw4mer.js} +19 -2
  25. package/dist/cli/{index-jwrydqjp.js → index-rw3f73aq.js} +1 -1
  26. package/dist/cli/{index-dyy3hvk3.js → index-s0rbdp61.js} +2 -2
  27. package/dist/cli/{index-p1pqqwgp.js → index-s0vahtdm.js} +1 -1
  28. package/dist/cli/{index-prnjt2jr.js → index-sr2cynyw.js} +4509 -2306
  29. package/dist/cli/index-wjm896ey.js +1100 -0
  30. package/dist/cli/{index-f4cmtd89.js → index-wnz282j3.js} +2 -2
  31. package/dist/cli/{index-y6a7gjtj.js → index-wsdnttf4.js} +228 -81
  32. package/dist/cli/{index-r9v98d0y.js → index-y0xaq4f3.js} +39 -4
  33. package/dist/cli/index-y8552snf.js +264 -0
  34. package/dist/cli/index-z1tm47nj.js +783 -0
  35. package/dist/cli/index.js +17 -14
  36. package/dist/cli/{knowledge-escalator-1zt8qy1c.js → knowledge-escalator-ta3xjrdj.js} +3 -3
  37. package/dist/cli/{knowledge-events-ej3s9tsm.js → knowledge-events-dk6banmz.js} +1 -1
  38. package/dist/cli/{knowledge-store-ey4cbkp4.js → knowledge-store-h3jz10bv.js} +1 -1
  39. package/dist/cli/{knowledge-validator-zwmq7s2c.js → knowledge-validator-jsz1dxkr.js} +4 -4
  40. package/dist/cli/runner-2v413r74.js +21 -0
  41. package/dist/cli/{scan-cursor-809hf2n1.js → scan-cursor-48gwzh9c.js} +2 -2
  42. package/dist/cli/{schema-mhd7xqwr.js → schema-f937b9cs.js} +5 -1
  43. package/dist/cli/{skill-generator-yyc8zd9j.js → skill-generator-4p10ktw1.js} +5 -5
  44. package/dist/cli/{workspace-snapshot-jmyamqnv.js → workspace-snapshot-h5rzw37b.js} +5 -1
  45. package/dist/commands/registry.d.ts +72 -0
  46. package/dist/commands/skill-opt.d.ts +41 -0
  47. package/dist/config/schema.d.ts +47 -0
  48. package/dist/hooks/guardrails/file-authority.d.ts +11 -2
  49. package/dist/hooks/pr-workflow-gate.d.ts +261 -4
  50. package/dist/hooks/pr-workflow-response-gate.d.ts +27 -9
  51. package/dist/hooks/write-target-resolver.d.ts +19 -0
  52. package/dist/index.js +353 -318
  53. package/dist/services/skill-evaluator.d.ts +17 -0
  54. package/dist/services/skill-optimizer/activation.d.ts +58 -0
  55. package/dist/services/skill-optimizer/candidates.d.ts +88 -0
  56. package/dist/services/skill-optimizer/controller.d.ts +146 -0
  57. package/dist/services/skill-optimizer/deterministic-seed.d.ts +29 -0
  58. package/dist/services/skill-optimizer/lifecycle.d.ts +70 -0
  59. package/dist/services/skill-optimizer/promoted-external-staleness.d.ts +98 -0
  60. package/dist/services/skill-optimizer/retirement.d.ts +54 -0
  61. package/dist/services/skill-optimizer/skill-eval-tasks.d.ts +47 -0
  62. package/dist/services/skill-optimizer/smoke.d.ts +46 -0
  63. package/dist/services/skill-optimizer/store.d.ts +118 -0
  64. package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -1
  65. package/dist/utils/stable-stringify.d.ts +46 -0
  66. package/evaluation-fixtures/skill-eval/scoring/score-skill-eval.cjs +97 -0
  67. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-hzkvbycn.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-hzkvbycn.js";
9
+ } from "./index-0755132s.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-kzc2ygea.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-zwmq7s2c.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-jsz1dxkr.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-mhd7xqwr.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-f4cmtd89.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-tfa40hwb.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-r9v98d0y.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-ey4cbkp4.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-dyy3hvk3.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-hzkvbycn.js";
12
+ } from "./index-0755132s.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-kzc2ygea.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-prnjt2jr.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-tfa40hwb.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-zkddc5ye.js";
4
+ } from "./index-azghvnja.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-g7g4hqh3.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-prnjt2jr.js";
87
+ } from "./index-sr2cynyw.js";
88
88
  import"./index-vm4xw9z3.js";
89
- import"./index-tfa40hwb.js";
90
- import"./index-gf7hqbmz.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-1sq47n6t.js";
95
- import"./index-h3bweb88.js";
96
- import"./index-9gxp450h.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-dyy3hvk3.js";
103
- import"./index-jwrydqjp.js";
105
+ import"./index-s0rbdp61.js";
106
+ import"./index-rw3f73aq.js";
104
107
  import"./index-rtry5xyf.js";
105
- import"./index-hzkvbycn.js";
106
- import"./index-kzc2ygea.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-p1pqqwgp.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-r9v98d0y.js";
119
+ } from "./index-y0xaq4f3.js";
117
120
  import"./index-bk5tah7q.js";
118
121
  import"./index-8fwhhayc.js";
119
122
  import"./index-q1exe2b3.js";