opencode-swarm 7.114.4 → 7.114.6

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 (39) hide show
  1. package/.opencode/skills/execute/SKILL.md +12 -14
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +136 -78
  3. package/README.md +2 -1
  4. package/dist/agents/explorer.d.ts +1 -1
  5. package/dist/background/candidate-parser.d.ts +30 -0
  6. package/dist/background/candidate-sidecar-store.d.ts +4 -3
  7. package/dist/cli/{config-doctor-xbdfrbwt.js → config-doctor-jy3mdh9t.js} +2 -2
  8. package/dist/cli/{curator-llm-factory-5ewe7qy1.js → curator-llm-factory-jrnqg90s.js} +10 -10
  9. package/dist/cli/{curator-15zwszy5.js → curator-vk9ec2kf.js} +10 -10
  10. package/dist/cli/{explorer-t5srbq64.js → explorer-jp0nen03.js} +1 -1
  11. package/dist/cli/{guardrail-explain-3156qxy0.js → guardrail-explain-vf89cv01.js} +11 -11
  12. package/dist/cli/{guardrail-log-qfc2j0tb.js → guardrail-log-84wnx273.js} +3 -3
  13. package/dist/cli/{hive-promoter-g2tkarz8.js → hive-promoter-0b4ny2mp.js} +10 -10
  14. package/dist/cli/{index-hg82gptk.js → index-5ac7rv03.js} +42 -34
  15. package/dist/cli/{index-xbe1wtme.js → index-7jmrbp68.js} +1 -1
  16. package/dist/cli/{index-h7q1bvzm.js → index-7stsmndb.js} +3 -3
  17. package/dist/cli/{index-0q7rrh59.js → index-91qesget.js} +14 -9
  18. package/dist/cli/{index-2148358e.js → index-9bsmzfk3.js} +1 -1
  19. package/dist/cli/{index-147ja18h.js → index-a45jq4b7.js} +4 -0
  20. package/dist/cli/{index-qzqx2qky.js → index-kjbfry6m.js} +1 -1
  21. package/dist/cli/{index-1gcw6azm.js → index-pzhkry3t.js} +12 -12
  22. package/dist/cli/{index-43khae15.js → index-qrnhvhmg.js} +1 -1
  23. package/dist/cli/{index-g59h53s6.js → index-tmcr6svp.js} +2 -2
  24. package/dist/cli/{index-mr4whary.js → index-vjvdvjd3.js} +3 -3
  25. package/dist/cli/{index-jt58s751.js → index-vxv732ex.js} +8 -4
  26. package/dist/cli/{index-g6va6n3t.js → index-yfedche9.js} +1 -1
  27. package/dist/cli/index.js +10 -10
  28. package/dist/cli/{knowledge-escalator-0q1p6br7.js → knowledge-escalator-qn7ew687.js} +3 -3
  29. package/dist/cli/{knowledge-events-9518gzsp.js → knowledge-events-k2xsz5bh.js} +1 -1
  30. package/dist/cli/{knowledge-store-k5rab79h.js → knowledge-store-ksa1dr2z.js} +1 -1
  31. package/dist/cli/{knowledge-validator-csay9wqj.js → knowledge-validator-2knz0d2t.js} +2 -2
  32. package/dist/cli/{schema-e5kd993s.js → schema-aymfdrsb.js} +1 -1
  33. package/dist/cli/{skill-generator-z01sjppf.js → skill-generator-w6qd9mde.js} +4 -4
  34. package/dist/index.js +45 -37
  35. package/dist/tools/index.d.ts +1 -0
  36. package/dist/tools/manifest.d.ts +1 -0
  37. package/dist/tools/tool-metadata.d.ts +4 -0
  38. package/dist/tools/write-pr-review-trigger-eval.d.ts +74 -0
  39. package/package.json +1 -1
@@ -8,6 +8,10 @@ import {
8
8
  import {
9
9
  readCachedParsedFile
10
10
  } from "./index-jtqkh8jf.js";
11
+ import {
12
+ init_logger,
13
+ log
14
+ } from "./index-zgwm4ryv.js";
11
15
  import {
12
16
  atomicWriteFile
13
17
  } from "./index-0p660a87.js";
@@ -25,6 +29,7 @@ import { existsSync } from "fs";
25
29
  import { appendFile, mkdir, readFile } from "fs/promises";
26
30
  import * as os from "os";
27
31
  import * as path from "path";
32
+ init_logger();
28
33
 
29
34
  // src/hooks/knowledge-reinforcement.ts
30
35
  function isActiveSwarmKnowledgeEntry(entry) {
@@ -115,7 +120,7 @@ function parseKnowledgeContent(content, max) {
115
120
  try {
116
121
  results.push(normalizeEntry(JSON.parse(trimmed)));
117
122
  } catch {
118
- console.warn(`[knowledge-store] Skipping corrupted JSONL line: ${trimmed.slice(0, 80)}`);
123
+ log(`[knowledge-store] Skipping corrupted JSONL line: ${trimmed.slice(0, 80)}`);
119
124
  }
120
125
  }
121
126
  return results;
@@ -573,10 +578,10 @@ async function bumpKnowledgeConfidenceBatch(directory, deltas, options) {
573
578
  touchedHive.push(...await applyConfidenceDeltas(hivePath, hiveOnly));
574
579
  }
575
580
  await applyConfidenceFloorAction(directory, [...touchedSwarm, ...touchedHive], options).catch((err) => {
576
- console.warn("[knowledge-store] confidence-floor action sweep failed (best-effort):", err instanceof Error ? err.message : String(err));
581
+ log("[knowledge-store] confidence-floor action sweep failed (best-effort):", err instanceof Error ? err.message : String(err));
577
582
  });
578
583
  } catch (err) {
579
- console.warn("[knowledge-store] bumpKnowledgeConfidenceBatch failed (fail-open):", err instanceof Error ? err.message : String(err));
584
+ log("[knowledge-store] bumpKnowledgeConfidenceBatch failed (fail-open):", err instanceof Error ? err.message : String(err));
580
585
  }
581
586
  }
582
587
  async function applyConfidenceFloorAction(directory, touched, options) {
@@ -590,7 +595,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
590
595
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
591
596
  if (atFloor.length === 0 && recovered.length === 0)
592
597
  return;
593
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-9518gzsp.js");
598
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-k2xsz5bh.js");
594
599
  const rollups = await readKnowledgeCounterRollups(directory);
595
600
  const flagIds = new Set;
596
601
  for (const e of atFloor) {
@@ -626,7 +631,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
626
631
  }
627
632
  return swarmEntries;
628
633
  }).catch((err) => {
629
- console.warn("[knowledge-store] confidence-floor swarm flag transaction failed (best-effort):", err instanceof Error ? err.message : String(err));
634
+ log("[knowledge-store] confidence-floor swarm flag transaction failed (best-effort):", err instanceof Error ? err.message : String(err));
630
635
  });
631
636
  const hiveFlagIds = new Set;
632
637
  for (const e of atFloor) {
@@ -653,14 +658,14 @@ async function applyConfidenceFloorAction(directory, touched, options) {
653
658
  }
654
659
  return hiveEntries;
655
660
  }).catch((err) => {
656
- console.warn("[knowledge-store] confidence-floor hive flag transaction failed (best-effort):", err instanceof Error ? err.message : String(err));
661
+ log("[knowledge-store] confidence-floor hive flag transaction failed (best-effort):", err instanceof Error ? err.message : String(err));
657
662
  });
658
663
  }
659
664
  if (action === "quarantine" && toQuarantine.length > 0) {
660
- const { quarantineEntry } = await import("./knowledge-validator-csay9wqj.js");
665
+ const { quarantineEntry } = await import("./knowledge-validator-2knz0d2t.js");
661
666
  for (const { id } of toQuarantine) {
662
667
  await quarantineEntry(directory, id, "confidence_floor_negative_outcome", "auto").catch((err) => {
663
- console.warn("[knowledge-store] confidence-floor quarantine failed (best-effort):", err instanceof Error ? err.message : String(err));
668
+ log("[knowledge-store] confidence-floor quarantine failed (best-effort):", err instanceof Error ? err.message : String(err));
664
669
  });
665
670
  }
666
671
  }
@@ -701,7 +706,7 @@ async function applyConfidenceDeltas(filePath, deltas) {
701
706
  await atomicWriteFile(filePath, content);
702
707
  }
703
708
  } catch (err) {
704
- console.warn(`[knowledge-store] applyConfidenceDeltas failed on ${filePath} (fail-open):`, err instanceof Error ? err.message : String(err));
709
+ log(`[knowledge-store] applyConfidenceDeltas failed on ${filePath} (fail-open):`, err instanceof Error ? err.message : String(err));
705
710
  } finally {
706
711
  if (release) {
707
712
  try {
@@ -5,7 +5,7 @@ import {
5
5
  GateConfigSchema,
6
6
  PluginConfigSchema,
7
7
  stripKnownSwarmPrefix
8
- } from "./index-147ja18h.js";
8
+ } from "./index-a45jq4b7.js";
9
9
  import {
10
10
  log
11
11
  } from "./index-zgwm4ryv.js";
@@ -191,6 +191,10 @@ var TOOL_METADATA = {
191
191
  description: "Parse [CANDIDATE] rows from a dispatch_lanes or collect_lane_results artifact (by output_ref), produce structured records with provenance, optionally persist to a per-batch sidecar JSONL. Pure-parser variant exists as internal module.",
192
192
  agents: ["architect"]
193
193
  },
194
+ write_pr_review_trigger_eval: {
195
+ description: "persist the complete PR-review trigger evaluation with exact-set validation and dispatch provenance",
196
+ agents: ["architect"]
197
+ },
194
198
  test_runner: {
195
199
  description: "auto-detect and run tests",
196
200
  agents: ["architect", "reviewer", "test_engineer"]
@@ -594,7 +594,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
594
594
  deltas.push({ id, delta });
595
595
  }
596
596
  if (deltas.length > 0) {
597
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-k5rab79h.js");
597
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-ksa1dr2z.js");
598
598
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
599
599
  }
600
600
  return {
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-g59h53s6.js";
4
+ } from "./index-tmcr6svp.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-xbe1wtme.js";
7
+ } from "./index-7jmrbp68.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -81,27 +81,27 @@ import {
81
81
  handleWriteRetroCommand,
82
82
  normalizeSwarmCommandInput,
83
83
  resolveCommand
84
- } from "./index-hg82gptk.js";
85
- import"./index-g6va6n3t.js";
84
+ } from "./index-5ac7rv03.js";
85
+ import"./index-yfedche9.js";
86
86
  import"./index-c8s9a3zh.js";
87
- import"./index-2148358e.js";
87
+ import"./index-9bsmzfk3.js";
88
88
  import {
89
89
  AGENT_TOOL_MAP,
90
90
  ORCHESTRATOR_NAME,
91
91
  stripKnownSwarmPrefix
92
- } from "./index-147ja18h.js";
92
+ } from "./index-a45jq4b7.js";
93
93
  import"./index-f6y341yk.js";
94
94
  import"./index-scww5b77.js";
95
95
  import"./index-ga4ta3cr.js";
96
96
  import"./index-80jkseqw.js";
97
- import"./index-mr4whary.js";
98
- import"./index-43khae15.js";
99
- import"./index-h7q1bvzm.js";
100
- import"./index-qzqx2qky.js";
101
- import"./index-0q7rrh59.js";
97
+ import"./index-vjvdvjd3.js";
98
+ import"./index-qrnhvhmg.js";
99
+ import"./index-7stsmndb.js";
100
+ import"./index-kjbfry6m.js";
101
+ import"./index-91qesget.js";
102
102
  import"./index-bfwt3abw.js";
103
103
  import"./index-g40r5d08.js";
104
- import"./index-jt58s751.js";
104
+ import"./index-vxv732ex.js";
105
105
  import"./index-8fwhhayc.js";
106
106
  import"./index-q1exe2b3.js";
107
107
  import"./index-n6fa2hhk.js";
@@ -6,7 +6,7 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  resolveSwarmRejectedPath,
8
8
  transactKnowledge
9
- } from "./index-0q7rrh59.js";
9
+ } from "./index-91qesget.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
12
  } from "./index-g40r5d08.js";
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-hg82gptk.js";
15
+ } from "./index-5ac7rv03.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-g6va6n3t.js";
22
+ } from "./index-yfedche9.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-43khae15.js";
5
+ } from "./index-qrnhvhmg.js";
6
6
  import {
7
7
  effectiveRetrievalOutcomes,
8
8
  readKnowledgeCounterRollups
9
- } from "./index-qzqx2qky.js";
9
+ } from "./index-kjbfry6m.js";
10
10
  import {
11
11
  computeOutcomeSignal,
12
12
  readKnowledge,
13
13
  resolveHiveKnowledgePath,
14
14
  resolveSwarmKnowledgePath,
15
15
  transactKnowledge
16
- } from "./index-0q7rrh59.js";
16
+ } from "./index-91qesget.js";
17
17
  import {
18
18
  isActiveStatus
19
19
  } from "./index-bfwt3abw.js";
@@ -126,7 +126,8 @@ src/tools/declare-scope.ts \u2014 function has 12 parameters, consider splitting
126
126
  Activates when your prompt contains "[CANDIDATE]" anywhere in its text.
127
127
 
128
128
  When active, replace the default OUTPUT FORMAT above with structured pipe-delimited
129
- candidate rows. Emit exactly one row per finding:
129
+ candidate rows. Emit the marker-bearing header, then exactly one unprefixed data
130
+ row per finding:
130
131
 
131
132
  [CANDIDATE] | candidate_id | lane | severity | category | file:line | claim | evidence_summary | impact_context | confidence
132
133
 
@@ -141,11 +142,14 @@ Field rules:
141
142
  - impact_context: who or what is affected downstream
142
143
  - confidence: LOW | MEDIUM | HIGH
143
144
 
144
- Emit a header row first, then one [CANDIDATE] row per finding. Use pipe (|) to
145
+ Emit a header row first, then one unprefixed data row per finding. Use pipe (|) to
145
146
  separate fields; escape literal pipe characters inside field values as \\|.
146
147
 
147
- If you find zero issues, emit the header row with no data rows. Do NOT fall back
148
- to the default PROJECT/STRUCTURE format when in candidate reporting mode.
148
+ If a standard explorer finds zero issues, emit the header row with no data rows.
149
+ If a micro-lane finds zero issues, emit the header followed by exactly:
150
+ [CLEAN] | micro_lane | coverage_scope | evidence
151
+ Fill every CLEAN field with the assigned micro-lane, checks completed, and the
152
+ negative evidence. Do NOT fall back to the default PROJECT/STRUCTURE format.
149
153
 
150
154
  For micro-lane dispatches, use the micro-lane variant:
151
155
  [CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  stripKnownSwarmPrefix
4
- } from "./index-147ja18h.js";
4
+ } from "./index-a45jq4b7.js";
5
5
  import {
6
6
  init_logger,
7
7
  warn
package/dist/cli/index.js CHANGED
@@ -7,25 +7,25 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-hg82gptk.js";
11
- import"./index-g6va6n3t.js";
10
+ } from "./index-5ac7rv03.js";
11
+ import"./index-yfedche9.js";
12
12
  import"./index-c8s9a3zh.js";
13
- import"./index-2148358e.js";
13
+ import"./index-9bsmzfk3.js";
14
14
  import {
15
15
  DEFAULT_AGENT_CONFIGS
16
- } from "./index-147ja18h.js";
16
+ } from "./index-a45jq4b7.js";
17
17
  import"./index-f6y341yk.js";
18
18
  import"./index-scww5b77.js";
19
19
  import"./index-ga4ta3cr.js";
20
20
  import"./index-80jkseqw.js";
21
- import"./index-mr4whary.js";
22
- import"./index-43khae15.js";
23
- import"./index-h7q1bvzm.js";
24
- import"./index-qzqx2qky.js";
25
- import"./index-0q7rrh59.js";
21
+ import"./index-vjvdvjd3.js";
22
+ import"./index-qrnhvhmg.js";
23
+ import"./index-7stsmndb.js";
24
+ import"./index-kjbfry6m.js";
25
+ import"./index-91qesget.js";
26
26
  import"./index-bfwt3abw.js";
27
27
  import"./index-g40r5d08.js";
28
- import"./index-jt58s751.js";
28
+ import"./index-vxv732ex.js";
29
29
  import"./index-8fwhhayc.js";
30
30
  import"./index-q1exe2b3.js";
31
31
  import"./index-n6fa2hhk.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-h7q1bvzm.js";
12
- import"./index-qzqx2qky.js";
13
- import"./index-0q7rrh59.js";
11
+ } from "./index-7stsmndb.js";
12
+ import"./index-kjbfry6m.js";
13
+ import"./index-91qesget.js";
14
14
  import"./index-bfwt3abw.js";
15
15
  import"./index-g40r5d08.js";
16
16
  import"./index-jtqkh8jf.js";
@@ -25,7 +25,7 @@ import {
25
25
  resolveKnowledgeCounterBaselinePath,
26
26
  resolveKnowledgeEventsPath,
27
27
  resolveLegacyApplicationLogPath
28
- } from "./index-qzqx2qky.js";
28
+ } from "./index-kjbfry6m.js";
29
29
  import"./index-g40r5d08.js";
30
30
  import"./index-zgwm4ryv.js";
31
31
  import"./index-0p660a87.js";
@@ -34,7 +34,7 @@ import {
34
34
  transactFile,
35
35
  transactKnowledge,
36
36
  wordBigrams
37
- } from "./index-0q7rrh59.js";
37
+ } from "./index-91qesget.js";
38
38
  import"./index-bfwt3abw.js";
39
39
  import"./index-g40r5d08.js";
40
40
  import"./index-jtqkh8jf.js";
@@ -22,8 +22,8 @@ import {
22
22
  validateLesson,
23
23
  validateSkillCandidatePath,
24
24
  validateSkillPath
25
- } from "./index-43khae15.js";
26
- import"./index-0q7rrh59.js";
25
+ } from "./index-qrnhvhmg.js";
26
+ import"./index-91qesget.js";
27
27
  import"./index-bfwt3abw.js";
28
28
  import"./index-g40r5d08.js";
29
29
  import"./index-jtqkh8jf.js";
@@ -86,7 +86,7 @@ import {
86
86
  resolveGeneratedAgentRole,
87
87
  resolveGuardrailsConfig,
88
88
  stripKnownSwarmPrefix
89
- } from "./index-147ja18h.js";
89
+ } from "./index-a45jq4b7.js";
90
90
  import"./index-bfwt3abw.js";
91
91
  import"./index-p0arc26j.js";
92
92
  import"./index-293f68mj.js";
@@ -33,10 +33,10 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-mr4whary.js";
37
- import"./index-43khae15.js";
38
- import"./index-qzqx2qky.js";
39
- import"./index-0q7rrh59.js";
36
+ } from "./index-vjvdvjd3.js";
37
+ import"./index-qrnhvhmg.js";
38
+ import"./index-kjbfry6m.js";
39
+ import"./index-91qesget.js";
40
40
  import"./index-bfwt3abw.js";
41
41
  import"./index-g40r5d08.js";
42
42
  import"./index-jtqkh8jf.js";