opencode-swarm 7.138.1 → 7.138.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 (40) hide show
  1. package/dist/background/candidate-contract.d.ts +31 -0
  2. package/dist/background/pending-delegations.d.ts +7 -0
  3. package/dist/cli/{config-doctor-m79sx8b2.js → config-doctor-hzb0bck9.js} +2 -2
  4. package/dist/cli/{curation-policy-dkx4s5va.js → curation-policy-aj37yvz8.js} +2 -2
  5. package/dist/cli/{curator-jjf5x6bn.js → curator-jt6dza8y.js} +13 -13
  6. package/dist/cli/{curator-llm-factory-sprc6pm3.js → curator-llm-factory-m9f4h8t4.js} +13 -13
  7. package/dist/cli/{guardrail-explain-zs3hq02c.js → guardrail-explain-rks41rpx.js} +14 -14
  8. package/dist/cli/{guardrail-log-90dnv508.js → guardrail-log-h39jxftx.js} +3 -3
  9. package/dist/cli/{hive-promoter-zkay2ffy.js → hive-promoter-34y2x4vt.js} +13 -13
  10. package/dist/cli/{index-8xqnp3gw.js → index-49ygvqvm.js} +4 -4
  11. package/dist/cli/{index-mnw8g9bs.js → index-89dwrz8n.js} +139 -56
  12. package/dist/cli/{index-vmff7b40.js → index-8emf08eb.js} +2 -2
  13. package/dist/cli/{index-06zw53mf.js → index-bakfqtye.js} +1 -1
  14. package/dist/cli/{index-d4t92fa3.js → index-d01d4102.js} +2 -2
  15. package/dist/cli/{index-vp3mwsd1.js → index-da98750t.js} +1 -1
  16. package/dist/cli/{index-e78pqbkj.js → index-exq36v6w.js} +1 -1
  17. package/dist/cli/{index-5fdztrpt.js → index-gpxg7wx8.js} +2 -2
  18. package/dist/cli/{index-p7fn5byt.js → index-k6cq9wwh.js} +1 -1
  19. package/dist/cli/{index-0s4gr6qh.js → index-q344kj84.js} +2 -1
  20. package/dist/cli/{index-mzqgtzxq.js → index-qg5smxv9.js} +3 -3
  21. package/dist/cli/{index-e2eedz1b.js → index-qt3jjjw9.js} +1 -1
  22. package/dist/cli/{index-kqzzdxc1.js → index-r9pn41rj.js} +1 -1
  23. package/dist/cli/{index-6f6nt0c9.js → index-s7ac0xrf.js} +15 -15
  24. package/dist/cli/{index-navw2ezf.js → index-xm07cqy2.js} +5 -5
  25. package/dist/cli/{index-aeyktf9q.js → index-yxswbd1t.js} +1 -1
  26. package/dist/cli/{index-9vvskh03.js → index-ze4we97d.js} +1 -1
  27. package/dist/cli/index.js +13 -13
  28. package/dist/cli/{knowledge-escalator-6y5x8vat.js → knowledge-escalator-qmpfh5yz.js} +3 -3
  29. package/dist/cli/{knowledge-events-bnr4weyn.js → knowledge-events-7neg8x0p.js} +1 -1
  30. package/dist/cli/{knowledge-store-4mcmb2rj.js → knowledge-store-a6d4625r.js} +1 -1
  31. package/dist/cli/{knowledge-validator-pf377mtx.js → knowledge-validator-q1qrdyvx.js} +4 -4
  32. package/dist/cli/{pending-delegations-ztb67amh.js → pending-delegations-7dbc0j2a.js} +1 -1
  33. package/dist/cli/{scan-cursor-we0561wc.js → scan-cursor-3tqshkb2.js} +2 -2
  34. package/dist/cli/{schema-1xtxr4d9.js → schema-mtyaeh18.js} +1 -1
  35. package/dist/cli/{skill-generator-kns0dae2.js → skill-generator-t3m5qajm.js} +5 -5
  36. package/dist/cli/{worktree-collision-ownership-rc6pe17g.js → worktree-collision-ownership-hjrt5hx2.js} +1 -1
  37. package/dist/hooks/pr-workflow-gate.d.ts +41 -1
  38. package/dist/index.js +22 -9
  39. package/dist/tools/dispatch-lanes.d.ts +7 -0
  40. package/package.json +1 -1
@@ -16,13 +16,13 @@ import {
16
16
  } from "./index-rrxcfxrd.js";
17
17
  import {
18
18
  stableCanonicalStringify
19
- } from "./index-e2eedz1b.js";
19
+ } from "./index-qt3jjjw9.js";
20
20
  import {
21
21
  detectStraySwarmDirs,
22
22
  readDoctorArtifact,
23
23
  removeStraySwarmDir,
24
24
  runConfigDoctor
25
- } from "./index-vp3mwsd1.js";
25
+ } from "./index-da98750t.js";
26
26
  import {
27
27
  MAX_TRANSIENT_RETRIES,
28
28
  archiveEvidence,
@@ -114,15 +114,15 @@ import {
114
114
  retireSkill,
115
115
  selectCandidateEntries,
116
116
  syncBundledProjectSkillsIfMissingAsync
117
- } from "./index-mzqgtzxq.js";
117
+ } from "./index-qg5smxv9.js";
118
118
  import {
119
119
  readRecentEscalations
120
- } from "./index-navw2ezf.js";
120
+ } from "./index-xm07cqy2.js";
121
121
  import {
122
122
  alreadyCuratedThisGeneration,
123
123
  claimNextScanBatch,
124
124
  resolveCohortId
125
- } from "./index-aeyktf9q.js";
125
+ } from "./index-yxswbd1t.js";
126
126
  import {
127
127
  CURATOR_INIT_PROMPT,
128
128
  CURATOR_PHASE_PROMPT,
@@ -175,11 +175,11 @@ import {
175
175
  validateActionableFields,
176
176
  validateLesson,
177
177
  validateSkillPath
178
- } from "./index-d4t92fa3.js";
178
+ } from "./index-d01d4102.js";
179
179
  import {
180
180
  authorizeCuration,
181
181
  buildConfigFingerprintInput
182
- } from "./index-9vvskh03.js";
182
+ } from "./index-ze4we97d.js";
183
183
  import {
184
184
  cohortConfigFingerprint
185
185
  } from "./index-rtry5xyf.js";
@@ -212,7 +212,7 @@ import {
212
212
  transactFile,
213
213
  transactKnowledge,
214
214
  wordBigrams
215
- } from "./index-8xqnp3gw.js";
215
+ } from "./index-49ygvqvm.js";
216
216
  import {
217
217
  MAX_EVENT_LOG_ENTRIES,
218
218
  _internals,
@@ -222,7 +222,7 @@ import {
222
222
  recordHiveKnowledgeEvent,
223
223
  recordKnowledgeEvent,
224
224
  resolveKnowledgeEventsPath
225
- } from "./index-kqzzdxc1.js";
225
+ } from "./index-r9pn41rj.js";
226
226
  import {
227
227
  resolveHiveDataDir,
228
228
  resolveHiveEventsPath,
@@ -247,7 +247,7 @@ import {
247
247
  init_loader,
248
248
  loadPluginConfig,
249
249
  loadPluginConfigWithMeta
250
- } from "./index-p7fn5byt.js";
250
+ } from "./index-k6cq9wwh.js";
251
251
  import {
252
252
  RetrospectiveEvidenceSchema
253
253
  } from "./index-gprxjmm7.js";
@@ -263,7 +263,7 @@ import {
263
263
  package_default,
264
264
  resolveAutoReviewConfig,
265
265
  stripKnownSwarmPrefix
266
- } from "./index-e78pqbkj.js";
266
+ } from "./index-exq36v6w.js";
267
267
  import {
268
268
  KNOWLEDGE_SCHEMA_VERSION,
269
269
  OUTCOME_BLOCK_THRESHOLD,
@@ -320,7 +320,7 @@ import {
320
320
  import {
321
321
  findByBatchId,
322
322
  readDelegations
323
- } from "./index-0s4gr6qh.js";
323
+ } from "./index-q344kj84.js";
324
324
  import {
325
325
  readSwarmFileAsync,
326
326
  safeHook,
@@ -477,6 +477,52 @@ function removeCandidateCodeFences(text) {
477
477
  return lines.join(`
478
478
  `);
479
479
  }
480
+ function declaredCanonicalFamilies(source) {
481
+ const families = [];
482
+ for (const line of source.split(/\r?\n/)) {
483
+ const family = candidateHeaderFamily(splitPipeFields(line).map((field) => field.trim()));
484
+ if (family && !families.includes(family))
485
+ families.push(family);
486
+ }
487
+ return families;
488
+ }
489
+ function normalizeCandidateArtifact(rawText, fallbackFamily) {
490
+ const text = removeCandidateCodeFences(rawText);
491
+ const header = selectCandidateHeader(text.split(/\r?\n/));
492
+ if (header?.markerBearing && header.family !== null) {
493
+ return { text, synthesizedHeader: false };
494
+ }
495
+ if (declaredCanonicalFamilies(text).length > 0) {
496
+ return { text, synthesizedHeader: false };
497
+ }
498
+ if (declaredCanonicalFamilies(rawText).some((family) => family !== fallbackFamily)) {
499
+ return { text, synthesizedHeader: false };
500
+ }
501
+ const lines = text.split(/\r?\n/);
502
+ const hasSalvageableRow = lines.some((line) => {
503
+ if (analyzeCandidateLine(line, fallbackFamily)?.valid === true)
504
+ return true;
505
+ const fields = splitPipeFields(line).map((field) => field.trim());
506
+ if (fields[0] !== CLEAN_MARKER)
507
+ return false;
508
+ return analyzeCleanFields(fields, fallbackFamily).valid;
509
+ });
510
+ if (!hasSalvageableRow)
511
+ return { text, synthesizedHeader: false };
512
+ const firstSalvageableIndex = lines.findIndex((line) => {
513
+ const marker = splitPipeFields(line)[0]?.trim();
514
+ return marker === CANDIDATE_MARKER || marker === CLEAN_MARKER;
515
+ });
516
+ return {
517
+ text: [
518
+ ...lines.slice(0, firstSalvageableIndex),
519
+ CANDIDATE_HEADERS[fallbackFamily],
520
+ ...lines.slice(firstSalvageableIndex)
521
+ ].join(`
522
+ `),
523
+ synthesizedHeader: true
524
+ };
525
+ }
480
526
  function analyzeCandidateLaneContext(context) {
481
527
  const issues = [];
482
528
  const baseBound = Boolean(context.expected_lane || context.expected_lanes);
@@ -687,6 +733,12 @@ function analyzeCleanFields(fields, family, expectedLane) {
687
733
  evidence
688
734
  };
689
735
  }
736
+ function analyzeCandidateLine(line, family) {
737
+ const fields = splitPipeFields(line).map((field) => field.trim());
738
+ if (fields[0] !== "[CANDIDATE]")
739
+ return null;
740
+ return analyzeCandidateFields(fields.slice(1), family);
741
+ }
690
742
 
691
743
  // src/background/candidate-parser.ts
692
744
  init_zod();
@@ -1276,7 +1328,7 @@ ${trimmed}`;
1276
1328
  if (cleanAttestation) {
1277
1329
  formatFamiliesDetected.add(cleanAttestation.row_format_family);
1278
1330
  }
1279
- const acceptedCandidates = cleanErrorCode ? [] : candidates;
1331
+ const acceptedCandidates = candidates;
1280
1332
  const parseErrors = parseErrorDetails.length;
1281
1333
  const envelope = buildInvocationEnvelope(input, flags, Array.from(formatFamiliesDetected), acceptedCandidates.length, parseErrors, malformedRows, cleanAttestation ? 1 : 0);
1282
1334
  const diagnostics = {
@@ -2811,6 +2863,9 @@ var _test_exports = {
2811
2863
  minimumConsolidatedLaneCover,
2812
2864
  analyzePrReviewBatchRecordIntegrity,
2813
2865
  MAX_COVER_UNIVERSE_BITS,
2866
+ extractCandidateIds,
2867
+ parseCanonicalCandidateRows,
2868
+ resolvePrReviewRowFamily,
2814
2869
  workflowGateStateRelativePath,
2815
2870
  workflowGateStateLockRelativePath,
2816
2871
  workflowCheckoutMutationLockRelativePath,
@@ -3138,13 +3193,13 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
3138
3193
  const recordOwnedLanes = record.ownedWorkflowLanes?.length ? record.ownedWorkflowLanes : record.workflowLane ? [record.workflowLane] : undefined;
3139
3194
  if (!artifact || !workflowArtifactHasContractMarker(directory, state, record, source.mode, record.workflowLane ?? source.workflowLane ?? source.laneId, undefined, ctx.revisionDigest, recordOwnedLanes))
3140
3195
  continue;
3141
- if (source.workflowLane && (!recordOwnedLanes?.includes(source.workflowLane) || !prReviewDiscoveryArtifactCoversLane(artifact.text, source.workflowLane, recordOwnedLanes)))
3196
+ if (source.workflowLane && (!recordOwnedLanes?.includes(source.workflowLane) || !prReviewDiscoveryArtifactCoversLane(artifact.text, source.workflowLane, recordOwnedLanes, source.mode)))
3142
3197
  continue;
3143
3198
  resolvedArtifact = true;
3144
3199
  const laneKey = `${source.batchId}\x00${source.laneId}`;
3145
3200
  if (!extractedLaneKeys.has(laneKey)) {
3146
3201
  extractedLaneKeys.add(laneKey);
3147
- candidateIds.push(...extractCandidateIds(artifact.text, source.mode === "swarm-pr-review:micro" ? "micro_lane" : "base_explorer", source.creditedLanes));
3202
+ candidateIds.push(...extractCandidateIds(artifact.text, resolvePrReviewRowFamily(source.workflowLane, source.mode), source.creditedLanes));
3148
3203
  }
3149
3204
  }
3150
3205
  if (source.mode === "swarm-pr-review:micro" && !resolvedArtifact) {
@@ -3164,11 +3219,19 @@ function appendBoundedCandidateIssue(issues, message) {
3164
3219
  issues.push("additional malformed candidate diagnostics omitted");
3165
3220
  }
3166
3221
  }
3222
+ function resolvePrReviewRowFamily(workflowLane, mode) {
3223
+ if (mode === "swarm-pr-review:base")
3224
+ return "base_explorer";
3225
+ if (mode === "swarm-pr-review:micro" || mode === "swarm-pr-review:council") {
3226
+ return "micro_lane";
3227
+ }
3228
+ return workflowLane !== undefined && PR_REVIEW_BASE_DIMENSION_IDS.includes(workflowLane) ? "base_explorer" : "micro_lane";
3229
+ }
3167
3230
  function parseCanonicalCandidateRows(text, fallbackFamily) {
3168
3231
  const rows = [];
3169
3232
  const issues = [];
3170
3233
  let headerFamily = null;
3171
- for (const [index, line] of removeCandidateCodeFences(text).split(/\r?\n/).entries()) {
3234
+ for (const [index, line] of normalizeCandidateArtifact(text, fallbackFamily).text.split(/\r?\n/).entries()) {
3172
3235
  const fields = splitPipeFields(line).map((field) => field.trim());
3173
3236
  const detectedHeaderFamily = candidateHeaderFamily(fields);
3174
3237
  if (detectedHeaderFamily) {
@@ -3699,7 +3762,7 @@ function workflowArtifactHasContractMarker(directory, state, record, expectedMod
3699
3762
  const coveredLanes = ownedWorkflowLanes?.length ? ownedWorkflowLanes : [expectedWorkflowLane];
3700
3763
  const coverageAnalyses = coveredLanes.map((coveredLane) => ({
3701
3764
  coveredLane,
3702
- analysis: analyzePrReviewDiscoveryArtifact(artifact.text, coveredLane, coveredLanes)
3765
+ analysis: analyzePrReviewDiscoveryArtifact(artifact.text, coveredLane, coveredLanes, expectedMode)
3703
3766
  }));
3704
3767
  if (coverageAnalyses.some(({ analysis }) => !analysis.covered)) {
3705
3768
  for (const { coveredLane, analysis } of coverageAnalyses) {
@@ -3715,7 +3778,7 @@ function workflowArtifactHasContractMarker(directory, state, record, expectedMod
3715
3778
  if (coveredLanes.length > 1) {
3716
3779
  const seenEvidence = new Map;
3717
3780
  for (const coveredLane of coveredLanes) {
3718
- const evidence2 = extractLaneCoverageEvidenceText(artifact.text, coveredLane, coveredLanes);
3781
+ const evidence2 = extractLaneCoverageEvidenceText(artifact.text, coveredLane, coveredLanes, expectedMode);
3719
3782
  if (evidence2 === null)
3720
3783
  continue;
3721
3784
  const priorLane = seenEvidence.get(evidence2);
@@ -3726,10 +3789,12 @@ function workflowArtifactHasContractMarker(directory, state, record, expectedMod
3726
3789
  }
3727
3790
  return true;
3728
3791
  }
3729
- function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane]) {
3730
- const fallbackFamily = PR_REVIEW_BASE_DIMENSION_IDS.includes(expectedWorkflowLane) ? "base_explorer" : "micro_lane";
3792
+ function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane], mode) {
3793
+ const fallbackFamily = resolvePrReviewRowFamily(expectedWorkflowLane, mode);
3731
3794
  const issues = [];
3732
- const canonicalText = removeCandidateCodeFences(text);
3795
+ const normalized = normalizeCandidateArtifact(text, fallbackFamily);
3796
+ const canonicalText = normalized.text;
3797
+ const salvaged = normalized.synthesizedHeader;
3733
3798
  const header = selectCandidateHeader(canonicalText.split(/\r?\n/));
3734
3799
  if (header === null || !header.markerBearing || header.family !== fallbackFamily) {
3735
3800
  appendBoundedCandidateIssue(issues, `field header: expected one exact canonical ${fallbackFamily} [CANDIDATE] header before discovery rows`);
@@ -3737,6 +3802,7 @@ function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkf
3737
3802
  covered: false,
3738
3803
  evidence: null,
3739
3804
  issues,
3805
+ salvaged,
3740
3806
  failurePredicate: "discovery.header"
3741
3807
  };
3742
3808
  }
@@ -3771,11 +3837,15 @@ function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkf
3771
3837
  for (const detail of parsed.diagnostics.parse_error_details) {
3772
3838
  appendBoundedCandidateIssue(issues, `row ${detail.row_index + 1} field ${detail.field}: ${detail.message}`);
3773
3839
  }
3774
- if (parsed.error || parsed.diagnostics.parse_error_details.length > 0) {
3840
+ const hasParseFailure = Boolean(parsed.error) || parsed.diagnostics.parse_error_details.length > 0;
3841
+ const extractedCandidateIds = parseCanonicalCandidateRows(canonicalText, fallbackFamily).rows.map((row) => row.candidateId);
3842
+ const hasDuplicateCandidateId = new Set(extractedCandidateIds).size !== extractedCandidateIds.length;
3843
+ if (hasDuplicateCandidateId) {
3775
3844
  return {
3776
3845
  covered: false,
3777
3846
  evidence: null,
3778
3847
  issues,
3848
+ salvaged,
3779
3849
  failurePredicate: "discovery.row"
3780
3850
  };
3781
3851
  }
@@ -3792,7 +3862,8 @@ function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkf
3792
3862
  matchingCandidate.impact_context ?? matchingCandidate.invariant_violated,
3793
3863
  matchingCandidate.confidence
3794
3864
  ].join("\x00"),
3795
- issues
3865
+ issues,
3866
+ salvaged
3796
3867
  };
3797
3868
  }
3798
3869
  const clean = parsed.clean_attestation;
@@ -3800,14 +3871,16 @@ function analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkf
3800
3871
  return {
3801
3872
  covered: true,
3802
3873
  evidence: `${clean.coverage_scope}\x00${clean.evidence}`,
3803
- issues
3874
+ issues,
3875
+ salvaged
3804
3876
  };
3805
3877
  }
3806
3878
  return {
3807
3879
  covered: false,
3808
3880
  evidence: null,
3809
3881
  issues,
3810
- failurePredicate: "discovery.coverage"
3882
+ salvaged,
3883
+ failurePredicate: hasParseFailure ? "discovery.row" : "discovery.coverage"
3811
3884
  };
3812
3885
  }
3813
3886
  function validatePrReviewDiscoveryLaneCompletion(input) {
@@ -3845,8 +3918,18 @@ function validatePrReviewDiscoveryLaneCompletion(input) {
3845
3918
  const artifact = input.artifact;
3846
3919
  const analyses = ownedWorkflowLanes.map((workflowLane) => ({
3847
3920
  workflowLane,
3848
- analysis: analyzePrReviewDiscoveryArtifact(artifact.text, workflowLane, ownedWorkflowLanes)
3921
+ analysis: analyzePrReviewDiscoveryArtifact(artifact.text, workflowLane, ownedWorkflowLanes, input.expected.mode)
3849
3922
  }));
3923
+ const salvagedLanes = [];
3924
+ for (const { workflowLane, analysis } of analyses) {
3925
+ if (!analysis.covered)
3926
+ continue;
3927
+ if (!analysis.salvaged && analysis.issues.length === 0)
3928
+ continue;
3929
+ salvagedLanes.push(workflowLane);
3930
+ const reason = analysis.salvaged ? `canonical ${resolvePrReviewRowFamily(workflowLane, input.expected.mode)} header was absent and was synthesized from valid marker rows` : "one or more rows were dropped as malformed or out-of-ownership";
3931
+ warn(`[pr-workflow-gate] discovery artifact salvaged: batch=${input.record.batchId ?? "(missing)"} lane=${input.record.laneId ?? "(missing)"} workflow_lane=${workflowLane} \u2014 ${reason}; retained coverage from the valid rows. Dropped-row diagnostics: ${analysis.issues.join("; ") || "(none)"}`);
3932
+ }
3850
3933
  const failedCoverage = analyses.find(({ analysis }) => !analysis.covered);
3851
3934
  if (failedCoverage) {
3852
3935
  return failedLaneValidation(failedCoverage.analysis.failurePredicate ?? "discovery.coverage", `one valid ${input.expected.mode === "swarm-pr-review:base" ? "base_explorer" : "micro_lane"} [CANDIDATE] row or [CLEAN] attestation for ${failedCoverage.workflowLane}`, failedCoverage.analysis.issues.join("; ") || "no matching lane row");
@@ -3863,13 +3946,13 @@ function validatePrReviewDiscoveryLaneCompletion(input) {
3863
3946
  seenEvidence.set(analysis.evidence, workflowLane);
3864
3947
  }
3865
3948
  }
3866
- return { ok: true };
3949
+ return salvagedLanes.length > 0 ? { ok: true, salvaged: salvagedLanes } : { ok: true };
3867
3950
  }
3868
- function prReviewDiscoveryArtifactCoversLane(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane]) {
3869
- return analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes).covered;
3951
+ function prReviewDiscoveryArtifactCoversLane(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane], mode) {
3952
+ return analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes, mode).covered;
3870
3953
  }
3871
- function extractLaneCoverageEvidenceText(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane]) {
3872
- return analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes).evidence;
3954
+ function extractLaneCoverageEvidenceText(text, expectedWorkflowLane, ownedWorkflowLanes = [expectedWorkflowLane], mode) {
3955
+ return analyzePrReviewDiscoveryArtifact(text, expectedWorkflowLane, ownedWorkflowLanes, mode).evidence;
3873
3956
  }
3874
3957
  var REVIEWER_CLASSIFICATIONS = new Set([
3875
3958
  "CONFIRMED",
@@ -18784,7 +18867,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
18784
18867
  };
18785
18868
  }
18786
18869
  async function sweepActiveNearDuplicates(directory, options = {}) {
18787
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vmff7b40.js");
18870
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-8emf08eb.js");
18788
18871
  const { config } = loadPluginConfigWithMeta2(directory);
18789
18872
  const sweepConfig = config.learning?.dedup_sweep;
18790
18873
  if (sweepConfig?.enabled === false)
@@ -20377,7 +20460,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
20377
20460
  }
20378
20461
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
20379
20462
  try {
20380
- const skillModule = await import("./skill-generator-kns0dae2.js");
20463
+ const skillModule = await import("./skill-generator-t3m5qajm.js");
20381
20464
  for (const cand of skillCandidates) {
20382
20465
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
20383
20466
  continue;
@@ -20837,7 +20920,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
20837
20920
  } catch {}
20838
20921
  }
20839
20922
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
20840
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-6y5x8vat.js");
20923
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-qmpfh5yz.js");
20841
20924
  for (const { id } of contradictedEntries) {
20842
20925
  try {
20843
20926
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -21656,7 +21739,7 @@ async function runCuratorPostMortem(directory, options = {}) {
21656
21739
  warnings.push("Failed to collect knowledge summary.");
21657
21740
  }
21658
21741
  try {
21659
- const { getScanStatus } = await import("./scan-cursor-we0561wc.js");
21742
+ const { getScanStatus } = await import("./scan-cursor-3tqshkb2.js");
21660
21743
  const scanStatus = await getScanStatus(directory);
21661
21744
  if (scanStatus.remaining_estimate > 0) {
21662
21745
  warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
@@ -21828,9 +21911,9 @@ var _internals24 = {
21828
21911
  verifyPostMortemKnowledgeActions,
21829
21912
  repairPostMortemActions,
21830
21913
  loadDefaultKnowledgeConfig: async (directory) => {
21831
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-1xtxr4d9.js");
21914
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-mtyaeh18.js");
21832
21915
  try {
21833
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vmff7b40.js");
21916
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-8emf08eb.js");
21834
21917
  const loaded = loadPluginConfigWithMeta2(directory);
21835
21918
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
21836
21919
  } catch {
@@ -21838,11 +21921,11 @@ var _internals24 = {
21838
21921
  }
21839
21922
  },
21840
21923
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
21841
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-jjf5x6bn.js");
21924
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-jt6dza8y.js");
21842
21925
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
21843
21926
  },
21844
21927
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
21845
- const { checkHivePromotions } = await import("./hive-promoter-zkay2ffy.js");
21928
+ const { checkHivePromotions } = await import("./hive-promoter-34y2x4vt.js");
21846
21929
  return checkHivePromotions(entries, knowledgeConfig, directory);
21847
21930
  },
21848
21931
  applyProposalTriage: async (directory, triage) => {
@@ -21851,7 +21934,7 @@ var _internals24 = {
21851
21934
  activateProposal,
21852
21935
  listSkills: listSkills2,
21853
21936
  sanitizeSlug
21854
- } = await import("./skill-generator-kns0dae2.js");
21937
+ } = await import("./skill-generator-t3m5qajm.js");
21855
21938
  const result = {
21856
21939
  approved: [],
21857
21940
  rejected: [],
@@ -24478,9 +24561,9 @@ function hashContent(content) {
24478
24561
  return createHash9("sha1").update(content).digest("hex");
24479
24562
  }
24480
24563
  async function loadConfigForPolicyCurator(directory) {
24481
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-1xtxr4d9.js");
24564
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-mtyaeh18.js");
24482
24565
  try {
24483
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vmff7b40.js");
24566
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-8emf08eb.js");
24484
24567
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
24485
24568
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
24486
24569
  } catch {
@@ -28440,7 +28523,7 @@ async function runFinalizeStage(ctx) {
28440
28523
  }
28441
28524
  }
28442
28525
  try {
28443
- const { CuratorConfigSchema: CCS } = await import("./schema-1xtxr4d9.js");
28526
+ const { CuratorConfigSchema: CCS } = await import("./schema-mtyaeh18.js");
28444
28527
  const { config: pmLoadedConfig } = _internals36.loadPluginConfigWithMeta(ctx.directory);
28445
28528
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
28446
28529
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -30711,9 +30794,9 @@ var _internals41 = {
30711
30794
  loadPluginConfigWithMeta,
30712
30795
  loadCuratorDeps: async () => {
30713
30796
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
30714
- import("./schema-1xtxr4d9.js"),
30715
- import("./curator-jjf5x6bn.js"),
30716
- import("./curator-llm-factory-sprc6pm3.js")
30797
+ import("./schema-mtyaeh18.js"),
30798
+ import("./curator-jt6dza8y.js"),
30799
+ import("./curator-llm-factory-m9f4h8t4.js")
30717
30800
  ]);
30718
30801
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
30719
30802
  }
@@ -31618,7 +31701,7 @@ async function computeCurationDiagnostics(directory, entries) {
31618
31701
  let scanCompleted = false;
31619
31702
  let scanRemaining = 0;
31620
31703
  try {
31621
- const { getScanStatus } = await import("./scan-cursor-we0561wc.js");
31704
+ const { getScanStatus } = await import("./scan-cursor-3tqshkb2.js");
31622
31705
  const status = await getScanStatus(directory);
31623
31706
  scanGeneration = status.generation;
31624
31707
  scanCompleted = status.completed;
@@ -31628,17 +31711,17 @@ async function computeCurationDiagnostics(directory, entries) {
31628
31711
  try {
31629
31712
  const { isLinked: isLinked2 } = await import("./knowledge-link-xc6yhxmz.js");
31630
31713
  if (isLinked2(directory)) {
31631
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-1xtxr4d9.js");
31714
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-mtyaeh18.js");
31632
31715
  let config;
31633
31716
  try {
31634
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vmff7b40.js");
31717
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-8emf08eb.js");
31635
31718
  const loaded = loadPluginConfigWithMeta2(directory);
31636
31719
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
31637
31720
  } catch {
31638
31721
  config = KnowledgeConfigSchema2.parse({});
31639
31722
  }
31640
31723
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
31641
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-dkx4s5va.js");
31724
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-aj37yvz8.js");
31642
31725
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
31643
31726
  const cohortFp = await readCohortConfigFingerprint(directory);
31644
31727
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -32849,7 +32932,7 @@ async function handleDoctorCommand(directory, args) {
32849
32932
  const result = runConfigDoctor(config, directory);
32850
32933
  let output;
32851
32934
  if (enableAutoFix && result.hasAutoFixableIssues) {
32852
- const { runConfigDoctorWithFixes } = await import("./config-doctor-m79sx8b2.js");
32935
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-hzb0bck9.js");
32853
32936
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
32854
32937
  applyLossy: true
32855
32938
  });
@@ -55992,7 +56075,7 @@ function buildDetailedHelp(commandName, entry) {
55992
56075
  async function handleHelpCommand(ctx) {
55993
56076
  const targetCommand = ctx.args.join(" ");
55994
56077
  if (!targetCommand) {
55995
- const { buildHelpText } = await import("./index-6f6nt0c9.js");
56078
+ const { buildHelpText } = await import("./index-s7ac0xrf.js");
55996
56079
  return buildHelpText();
55997
56080
  }
55998
56081
  const tokens = targetCommand.split(/\s+/);
@@ -56001,7 +56084,7 @@ async function handleHelpCommand(ctx) {
56001
56084
  return _internals14.buildDetailedHelp(resolved.key, resolved.entry);
56002
56085
  }
56003
56086
  const similar = _internals14.findSimilarCommands(targetCommand);
56004
- const { buildHelpText: fullHelp } = await import("./index-6f6nt0c9.js");
56087
+ const { buildHelpText: fullHelp } = await import("./index-s7ac0xrf.js");
56005
56088
  if (similar.length > 0) {
56006
56089
  return `Command '/swarm ${targetCommand}' not found.
56007
56090
 
@@ -56178,7 +56261,7 @@ var COMMAND_REGISTRY = {
56178
56261
  },
56179
56262
  "guardrail explain": {
56180
56263
  handler: async (ctx) => {
56181
- const { handleGuardrailExplain } = await import("./guardrail-explain-zs3hq02c.js");
56264
+ const { handleGuardrailExplain } = await import("./guardrail-explain-rks41rpx.js");
56182
56265
  return handleGuardrailExplain(ctx.directory, ctx.args);
56183
56266
  },
56184
56267
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -56188,7 +56271,7 @@ var COMMAND_REGISTRY = {
56188
56271
  },
56189
56272
  "guardrail-explain": {
56190
56273
  handler: async (ctx) => {
56191
- const { handleGuardrailExplain } = await import("./guardrail-explain-zs3hq02c.js");
56274
+ const { handleGuardrailExplain } = await import("./guardrail-explain-rks41rpx.js");
56192
56275
  return handleGuardrailExplain(ctx.directory, ctx.args);
56193
56276
  },
56194
56277
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -56198,7 +56281,7 @@ var COMMAND_REGISTRY = {
56198
56281
  },
56199
56282
  "guardrail-log": {
56200
56283
  handler: async (ctx) => {
56201
- const { handleGuardrailLog } = await import("./guardrail-log-90dnv508.js");
56284
+ const { handleGuardrailLog } = await import("./guardrail-log-h39jxftx.js");
56202
56285
  return handleGuardrailLog(ctx.directory, ctx.args);
56203
56286
  },
56204
56287
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -7,7 +7,7 @@ import {
7
7
  loadPluginConfigWithMeta,
8
8
  loadPluginConfigWithMetaAsync,
9
9
  resolveWorktreeIsolationConfig
10
- } from "./index-p7fn5byt.js";
10
+ } from "./index-k6cq9wwh.js";
11
11
  import {
12
12
  ApprovalEvidenceSchema,
13
13
  BaseEvidenceSchema,
@@ -54,7 +54,7 @@ import {
54
54
  TurboConfigSchema,
55
55
  WorktreeIsolationConfigSchema,
56
56
  resolveAutoReviewConfig
57
- } from "./index-e78pqbkj.js";
57
+ } from "./index-exq36v6w.js";
58
58
  import"./index-bk5tah7q.js";
59
59
  import {
60
60
  MigrationStatusSchema,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-e2eedz1b.js";
5
+ } from "./index-qt3jjjw9.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-9vvskh03.js";
4
+ } from "./index-ze4we97d.js";
5
5
  import {
6
6
  findNearDuplicate,
7
7
  inferTags,
@@ -9,7 +9,7 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-8xqnp3gw.js";
12
+ } from "./index-49ygvqvm.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-en4fb04r.js";
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-e78pqbkj.js";
9
+ } from "./index-exq36v6w.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.138.1",
24
+ version: "7.138.2",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-mnw8g9bs.js";
15
+ } from "./index-89dwrz8n.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-e2eedz1b.js";
22
+ } from "./index-qt3jjjw9.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  resolveExternalSkillsConfig
9
- } from "./index-e78pqbkj.js";
9
+ } from "./index-exq36v6w.js";
10
10
  import {
11
11
  advisoryWarn,
12
12
  init_warning_buffer
@@ -52,7 +52,8 @@ var ResultSchema = exports_external.object({
52
52
  outputDegraded: exports_external.boolean().optional(),
53
53
  outputArtifactError: exports_external.string().optional(),
54
54
  transcriptIncomplete: exports_external.boolean().optional(),
55
- messageCount: exports_external.number().optional()
55
+ messageCount: exports_external.number().optional(),
56
+ salvagedWorkflowLanes: exports_external.array(exports_external.string()).optional()
56
57
  }).strict();
57
58
  var WorkspaceSchema = exports_external.object({
58
59
  directory: exports_external.string(),
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-d4t92fa3.js";
5
+ } from "./index-d01d4102.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-8xqnp3gw.js";
12
+ } from "./index-49ygvqvm.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-kqzzdxc1.js";
16
+ } from "./index-r9pn41rj.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  init_schema,
4
4
  stripKnownSwarmPrefix
5
- } from "./index-e78pqbkj.js";
5
+ } from "./index-exq36v6w.js";
6
6
  import {
7
7
  init_constants
8
8
  } from "./index-3jcyn8g6.js";