opencode-swarm 7.140.5 → 7.140.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 (45) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +2 -4
  2. package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +54 -0
  3. package/dist/background/candidate-contract.d.ts +1 -1
  4. package/dist/background/pr-review-trigger-contract.d.ts +36 -0
  5. package/dist/cli/{config-doctor-5vzpq4qa.js → config-doctor-y5qeh18c.js} +2 -2
  6. package/dist/cli/{core-xjzdc56e.js → core-pwd9604e.js} +1 -1
  7. package/dist/cli/{curator-llm-factory-rds75zhj.js → curator-llm-factory-96pnc23w.js} +16 -16
  8. package/dist/cli/{curator-5nytvg7p.js → curator-q1nchgpg.js} +16 -16
  9. package/dist/cli/{evidence-summary-service-zq4gyx6g.js → evidence-summary-service-18142mr3.js} +4 -4
  10. package/dist/cli/{guardrail-explain-an7jvam1.js → guardrail-explain-kyd89z8z.js} +17 -17
  11. package/dist/cli/{guardrail-log-0hnd2k9v.js → guardrail-log-cahp1ews.js} +3 -3
  12. package/dist/cli/{hive-promoter-qe8pqg79.js → hive-promoter-vcbcvcsh.js} +16 -16
  13. package/dist/cli/{index-ptn13xjn.js → index-1p72dtym.js} +1 -1
  14. package/dist/cli/{index-ex7r16gc.js → index-2778hhh7.js} +2 -2
  15. package/dist/cli/{index-0rx9t9w8.js → index-4s7xgzbm.js} +1 -1
  16. package/dist/cli/{index-wrb0gykj.js → index-4zxrkk1h.js} +1 -1
  17. package/dist/cli/{index-2bg901qt.js → index-56rqw2hs.js} +2 -2
  18. package/dist/cli/{index-mm2egvdt.js → index-5qd5vt2d.js} +18 -18
  19. package/dist/cli/{index-affh1gtg.js → index-92n3d5ky.js} +3 -3
  20. package/dist/cli/{index-wkt9fj06.js → index-bjqpdr83.js} +2 -2
  21. package/dist/cli/{index-8rp1y4ab.js → index-dtqjxfw9.js} +1 -1
  22. package/dist/cli/{index-0r2m0vbq.js → index-e58e3v0v.js} +3 -3
  23. package/dist/cli/{index-01ggt2mj.js → index-fejfzy2j.js} +4 -4
  24. package/dist/cli/{index-ztgn70jz.js → index-h01wb18g.js} +1 -1
  25. package/dist/cli/{index-z90nvqj3.js → index-nakkgkkt.js} +151 -63
  26. package/dist/cli/{index-nyjtzmsj.js → index-p04qrwck.js} +2 -2
  27. package/dist/cli/{index-z7h37d63.js → index-p2ty3eee.js} +1 -1
  28. package/dist/cli/{index-jm4cpp4n.js → index-thp186x0.js} +1 -1
  29. package/dist/cli/{index-386ts4tm.js → index-y9q9f6ms.js} +1 -1
  30. package/dist/cli/{index-e0mpz2j3.js → index-z0z9pe7b.js} +5 -5
  31. package/dist/cli/{index-kb5q9v34.js → index-z3s0a44b.js} +3 -3
  32. package/dist/cli/{index-nwrwy8eb.js → index-zd4qhnr7.js} +1 -1
  33. package/dist/cli/index.js +16 -16
  34. package/dist/cli/{knowledge-escalator-4pfrc902.js → knowledge-escalator-gj58za4g.js} +6 -6
  35. package/dist/cli/{knowledge-events-3zkfnksk.js → knowledge-events-3m5jnnv6.js} +4 -4
  36. package/dist/cli/{knowledge-store-dpqgvvjt.js → knowledge-store-0vy8wbzd.js} +1 -1
  37. package/dist/cli/{knowledge-validator-2c7w87dk.js → knowledge-validator-mvcs8wf6.js} +2 -2
  38. package/dist/cli/{scan-cursor-1z60gwrw.js → scan-cursor-wznc7p7p.js} +2 -2
  39. package/dist/cli/{schema-vpnkwvez.js → schema-k596bhds.js} +1 -1
  40. package/dist/cli/{scope-persistence-p9dmprry.js → scope-persistence-0ny5fn07.js} +4 -4
  41. package/dist/cli/{skill-generator-yx7ka1cj.js → skill-generator-vrks0jjj.js} +7 -7
  42. package/dist/cli/{worktree-isolation-bwc6ra8e.js → worktree-isolation-zgk7314k.js} +16 -16
  43. package/dist/hooks/pr-workflow-gate.d.ts +20 -0
  44. package/dist/index.js +12 -10
  45. package/package.json +1 -1
@@ -19,7 +19,7 @@ import {
19
19
  } from "./index-c432knmy.js";
20
20
  import {
21
21
  stableCanonicalStringify
22
- } from "./index-ptn13xjn.js";
22
+ } from "./index-1p72dtym.js";
23
23
  import {
24
24
  getGlobalEventBus
25
25
  } from "./index-c8s9a3zh.js";
@@ -28,7 +28,7 @@ import {
28
28
  readDoctorArtifact,
29
29
  removeStraySwarmDir,
30
30
  runConfigDoctor
31
- } from "./index-z7h37d63.js";
31
+ } from "./index-p2ty3eee.js";
32
32
  import {
33
33
  MAX_TRANSIENT_RETRIES,
34
34
  archiveEvidence,
@@ -74,7 +74,7 @@ import {
74
74
  transientBackoff,
75
75
  updateTaskCheckpointReceipt,
76
76
  validateProjectRoot
77
- } from "./index-2bg901qt.js";
77
+ } from "./index-56rqw2hs.js";
78
78
  import {
79
79
  loadDatabaseCtor
80
80
  } from "./index-134d35c1.js";
@@ -160,15 +160,15 @@ import {
160
160
  retireSkill,
161
161
  selectCandidateEntries,
162
162
  syncBundledProjectSkillsIfMissingAsync
163
- } from "./index-kb5q9v34.js";
163
+ } from "./index-z3s0a44b.js";
164
164
  import {
165
165
  readRecentEscalations
166
- } from "./index-e0mpz2j3.js";
166
+ } from "./index-z0z9pe7b.js";
167
167
  import {
168
168
  alreadyCuratedThisGeneration,
169
169
  claimNextScanBatch,
170
170
  resolveCohortId
171
- } from "./index-ztgn70jz.js";
171
+ } from "./index-h01wb18g.js";
172
172
  import {
173
173
  CURATOR_INIT_PROMPT,
174
174
  CURATOR_PHASE_PROMPT,
@@ -185,7 +185,7 @@ import {
185
185
  clearAllScopes,
186
186
  clearScopeBindingFromDisk,
187
187
  clearScopeBindings
188
- } from "./index-wkt9fj06.js";
188
+ } from "./index-bjqpdr83.js";
189
189
  import {
190
190
  appendLedgerEvent,
191
191
  computePlanHash,
@@ -195,7 +195,7 @@ import {
195
195
  initLedger,
196
196
  readLedgerEvents,
197
197
  takeSnapshotEvent
198
- } from "./index-wrb0gykj.js";
198
+ } from "./index-4zxrkk1h.js";
199
199
  import {
200
200
  clearWorktreeMergeStatus,
201
201
  getAllWorktreeMergeFailures,
@@ -207,7 +207,7 @@ import {
207
207
  cleanUntrackedFiles,
208
208
  provisionWorktree,
209
209
  removeWorktree
210
- } from "./index-8rp1y4ab.js";
210
+ } from "./index-dtqjxfw9.js";
211
211
  import {
212
212
  WORKTREE_LIFECYCLE_LOCK_FILE,
213
213
  recordWorktreeProvisioningOwner,
@@ -240,7 +240,7 @@ import {
240
240
  recordKnowledgeEvent,
241
241
  recordPhaseCloseIntent,
242
242
  resolveKnowledgeEventsPath
243
- } from "./index-affh1gtg.js";
243
+ } from "./index-92n3d5ky.js";
244
244
  import {
245
245
  readSwarmFileAsync,
246
246
  safeHook,
@@ -256,7 +256,7 @@ import {
256
256
  validateActionableFields,
257
257
  validateLesson,
258
258
  validateSkillPath
259
- } from "./index-386ts4tm.js";
259
+ } from "./index-y9q9f6ms.js";
260
260
  import {
261
261
  authorizeCuration,
262
262
  buildConfigFingerprintInput
@@ -293,7 +293,7 @@ import {
293
293
  transactFile,
294
294
  transactKnowledge,
295
295
  wordBigrams
296
- } from "./index-01ggt2mj.js";
296
+ } from "./index-fejfzy2j.js";
297
297
  import {
298
298
  resolveHiveDataDir,
299
299
  resolveHiveEventsPath,
@@ -334,7 +334,7 @@ import {
334
334
  } from "./index-4nt52yr9.js";
335
335
  import {
336
336
  resolveWorktreeIsolationConfig
337
- } from "./index-nyjtzmsj.js";
337
+ } from "./index-p04qrwck.js";
338
338
  import {
339
339
  RetrospectiveEvidenceSchema
340
340
  } from "./index-gprxjmm7.js";
@@ -344,7 +344,7 @@ import {
344
344
  init_loader,
345
345
  loadPluginConfig,
346
346
  loadPluginConfigWithMeta
347
- } from "./index-nwrwy8eb.js";
347
+ } from "./index-zd4qhnr7.js";
348
348
  import {
349
349
  advisoryWarn,
350
350
  getDeferredWarnings,
@@ -370,7 +370,7 @@ import {
370
370
  package_default,
371
371
  resolveAutoReviewConfig,
372
372
  stripKnownSwarmPrefix
373
- } from "./index-jm4cpp4n.js";
373
+ } from "./index-thp186x0.js";
374
374
  import {
375
375
  AGENT_TOOL_MAP,
376
376
  ALL_AGENT_NAMES,
@@ -4512,6 +4512,53 @@ function repairRedundantCleanConfidence(text, family) {
4512
4512
  return { text: lines.join(`
4513
4513
  `), repaired };
4514
4514
  }
4515
+ var NON_CONTRACT_MARKER_LINE = /^\[(?!(?:CANDIDATE|CLEAN)\])[A-Z][A-Z0-9_-]*\]/;
4516
+ function dropNonContractMarkerRows(text) {
4517
+ const lines = text.split(/\r?\n/);
4518
+ const kept = lines.filter((line) => {
4519
+ if (!line.includes("|"))
4520
+ return true;
4521
+ const firstField = splitPipeFields(line.trim())[0]?.trim() ?? "";
4522
+ return !NON_CONTRACT_MARKER_LINE.test(firstField);
4523
+ });
4524
+ return {
4525
+ text: kept.join(`
4526
+ `),
4527
+ dropped: kept.length !== lines.length
4528
+ };
4529
+ }
4530
+ function repairCleanEvidencePipesLine(line) {
4531
+ if (splitPipeFields(line)[0]?.trim() !== CLEAN_MARKER) {
4532
+ return { line, repaired: false };
4533
+ }
4534
+ let separatorCount = 0;
4535
+ let out = "";
4536
+ for (let index = 0;index < line.length; index += 1) {
4537
+ const char = line[index];
4538
+ if (char === "\\" && line[index + 1] === "|") {
4539
+ out += "\\|";
4540
+ index += 1;
4541
+ continue;
4542
+ }
4543
+ if (char === "|") {
4544
+ separatorCount += 1;
4545
+ out += separatorCount <= CLEAN_FIELD_COUNT - 1 ? "|" : "\\|";
4546
+ continue;
4547
+ }
4548
+ out += char;
4549
+ }
4550
+ return separatorCount > CLEAN_FIELD_COUNT - 1 ? { line: out, repaired: true } : { line, repaired: false };
4551
+ }
4552
+ function repairCleanEvidencePipes(text) {
4553
+ let repaired = false;
4554
+ const lines = text.split(/\r?\n/).map((line) => {
4555
+ const result = repairCleanEvidencePipesLine(line);
4556
+ repaired ||= result.repaired;
4557
+ return result.line;
4558
+ });
4559
+ return { text: lines.join(`
4560
+ `), repaired };
4561
+ }
4515
4562
  function isStrictProtocolDataLine(line, family) {
4516
4563
  const clean = repairRedundantCleanConfidenceLine(line, family).line;
4517
4564
  const fields = splitPipeFields(clean).map((field) => field.trim());
@@ -4568,13 +4615,19 @@ function declaredCanonicalFamilies(source) {
4568
4615
  }
4569
4616
  function normalizeCandidateArtifact(rawText, fallbackFamily) {
4570
4617
  const repairKinds = [];
4571
- const recoveredFence = recoverTerminalProtocolFence(rawText, fallbackFamily);
4618
+ const summaryDrop = dropNonContractMarkerRows(rawText);
4619
+ if (summaryDrop.dropped)
4620
+ repairKinds.push("summary-row-dropped");
4621
+ const recoveredFence = recoverTerminalProtocolFence(summaryDrop.text, fallbackFamily);
4572
4622
  if (recoveredFence !== null)
4573
4623
  repairKinds.push("terminal-protocol-fence");
4574
- const cleanRepair = repairRedundantCleanConfidence(recoveredFence ?? removeCandidateCodeFences(rawText), fallbackFamily);
4624
+ const cleanRepair = repairRedundantCleanConfidence(recoveredFence ?? removeCandidateCodeFences(summaryDrop.text), fallbackFamily);
4575
4625
  if (cleanRepair.repaired)
4576
4626
  repairKinds.push("redundant-clean-confidence");
4577
- const text = cleanRepair.text;
4627
+ const pipeRepair = repairCleanEvidencePipes(cleanRepair.text);
4628
+ if (pipeRepair.repaired)
4629
+ repairKinds.push("clean-evidence-pipe-tail-merge");
4630
+ const text = pipeRepair.text;
4578
4631
  const header = selectCandidateHeader(text.split(/\r?\n/));
4579
4632
  if (header?.markerBearing && header.family !== null) {
4580
4633
  return { text, synthesizedHeader: false, repairKinds };
@@ -4582,7 +4635,7 @@ function normalizeCandidateArtifact(rawText, fallbackFamily) {
4582
4635
  if (declaredCanonicalFamilies(text).length > 0) {
4583
4636
  return { text, synthesizedHeader: false, repairKinds };
4584
4637
  }
4585
- if (declaredCanonicalFamilies(rawText).some((family) => family !== fallbackFamily)) {
4638
+ if (declaredCanonicalFamilies(summaryDrop.text).some((family) => family !== fallbackFamily)) {
4586
4639
  return { text, synthesizedHeader: false, repairKinds };
4587
4640
  }
4588
4641
  const lines = text.split(/\r?\n/);
@@ -5167,6 +5220,9 @@ function parseText(input, flags) {
5167
5220
  continue;
5168
5221
  }
5169
5222
  const cleanAnalysis = cleanFamily ? analyzeCleanFields(cleanFields, cleanFamily, cleanLane) : undefined;
5223
+ if (pendingClean !== undefined && cleanAnalysis?.valid === true && cleanAnalysis.lane !== (pendingClean.row_format_family === "base_explorer" ? pendingClean.lane : pendingClean.micro_lane)) {
5224
+ continue;
5225
+ }
5170
5226
  if (pendingClean !== undefined) {
5171
5227
  cleanErrorCode = "invalid-clean-attestation";
5172
5228
  cleanErrorMessage = "Only one CLEAN attestation is allowed per artifact";
@@ -5395,14 +5451,18 @@ ${trimmed}`;
5395
5451
  });
5396
5452
  }
5397
5453
  }
5398
- if (pendingClean && candidates.length > 0) {
5399
- cleanErrorCode = "conflicting-clean-attestation";
5400
- cleanErrorMessage = "CLEAN attestation cannot appear with candidate rows";
5401
- parseErrorDetails.push({
5402
- row_index: headerIndex,
5403
- field: "clean_attestation",
5404
- message: cleanErrorMessage
5405
- });
5454
+ const pendingCleanLane = pendingClean ? pendingClean.row_format_family === "base_explorer" ? pendingClean.lane : pendingClean.micro_lane : null;
5455
+ if (pendingClean && pendingCleanLane !== null) {
5456
+ const conflictingCandidate = candidates.find((candidate) => (candidate.lane ?? candidate.micro_lane) === pendingCleanLane);
5457
+ if (conflictingCandidate) {
5458
+ cleanErrorCode = "conflicting-clean-attestation";
5459
+ cleanErrorMessage = `CLEAN attestation cannot appear with candidate rows for the same lane (${pendingCleanLane})`;
5460
+ parseErrorDetails.push({
5461
+ row_index: headerIndex,
5462
+ field: "clean_attestation",
5463
+ message: cleanErrorMessage
5464
+ });
5465
+ }
5406
5466
  }
5407
5467
  if (pendingClean && !cleanErrorCode && (malformedRows > 0 || parseErrorDetails.length > 0)) {
5408
5468
  cleanErrorCode = "untrusted-clean-attestation";
@@ -5413,7 +5473,7 @@ ${trimmed}`;
5413
5473
  message: cleanErrorMessage
5414
5474
  });
5415
5475
  }
5416
- const cleanAttestation = pendingClean && !cleanErrorCode && candidates.length === 0 ? pendingClean : undefined;
5476
+ const cleanAttestation = pendingClean && !cleanErrorCode ? pendingClean : undefined;
5417
5477
  if (cleanAttestation) {
5418
5478
  formatFamiliesDetected.add(cleanAttestation.row_format_family);
5419
5479
  }
@@ -5772,6 +5832,12 @@ var V2NotTriggeredRowSchema = exports_external.object({
5772
5832
  evidence: TriggerEvidenceSchema
5773
5833
  }).strict();
5774
5834
  var V2RowSchema = exports_external.union([V2MatchedRowSchema, V2NotTriggeredRowSchema]);
5835
+ var TriggerCoverageDegradationSchema = exports_external.object({
5836
+ trigger_id: TriggerIdSchema,
5837
+ source_batch_id: exports_external.string().trim().min(1),
5838
+ source_lane_id: exports_external.string().trim().min(1),
5839
+ reason: exports_external.string().trim().min(1)
5840
+ }).strict();
5775
5841
  var ReceiptEnvelopeSchema = exports_external.object({
5776
5842
  run_id: exports_external.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/),
5777
5843
  pr_head_sha: exports_external.string().trim().regex(/^[0-9a-f]{6,64}$/i),
@@ -5786,7 +5852,8 @@ var V2ReceiptSchema = ReceiptEnvelopeSchema.extend({
5786
5852
  matched_count: exports_external.number().int().min(0),
5787
5853
  not_triggered_count: exports_external.number().int().min(0),
5788
5854
  no_match_count: exports_external.number().int().min(0),
5789
- rows: exports_external.array(V2RowSchema)
5855
+ rows: exports_external.array(V2RowSchema),
5856
+ coverage_degradations: exports_external.array(TriggerCoverageDegradationSchema).default([])
5790
5857
  }).strict();
5791
5858
  function assertCanonicalDefinitionFields(rows) {
5792
5859
  const definitions = new Map(PR_REVIEW_TRIGGER_DEFINITIONS.map((definition) => [
@@ -5828,12 +5895,13 @@ var V1ReceiptSchema = ReceiptEnvelopeSchema.extend({
5828
5895
  rows: exports_external.array(LegacyRowSchema)
5829
5896
  }).strict();
5830
5897
  var UnversionedRowOnlyReceiptSchema = exports_external.object({ rows: exports_external.array(exports_external.unknown()) }).strict();
5831
- function parsedReceipt(schemaVersion, rows) {
5898
+ function parsedReceipt(schemaVersion, rows, coverageDegradations = []) {
5832
5899
  return {
5833
5900
  schemaVersion,
5834
5901
  rows,
5835
5902
  matchedRows: rows.filter((row) => row.result === "MATCHED"),
5836
- notTriggeredRows: rows.filter((row) => row.result === "NOT_TRIGGERED")
5903
+ notTriggeredRows: rows.filter((row) => row.result === "NOT_TRIGGERED"),
5904
+ coverageDegradations
5837
5905
  };
5838
5906
  }
5839
5907
  function parsePrReviewTriggerReceipt(input) {
@@ -5866,7 +5934,7 @@ function parsePrReviewTriggerReceipt(input) {
5866
5934
  throw new Error(`PR_REVIEW trigger receipt ${field} is inconsistent: expected ${expected}`);
5867
5935
  }
5868
5936
  }
5869
- return parsedReceipt(2, validated2.rows);
5937
+ return parsedReceipt(2, validated2.rows, receipt.coverage_degradations);
5870
5938
  }
5871
5939
  if (schemaVersion !== undefined && schemaVersion !== 1) {
5872
5940
  throw new Error(`Unsupported PR_REVIEW trigger schema_version: ${schemaVersion}`);
@@ -7002,6 +7070,8 @@ var _test_exports = {
7002
7070
  extractCandidateIds,
7003
7071
  parseCanonicalCandidateRows,
7004
7072
  resolvePrReviewRowFamily,
7073
+ pipeFieldsCapped,
7074
+ reviewerVerdictRowDigest,
7005
7075
  workflowGateStateRelativePath,
7006
7076
  workflowGateStateLockRelativePath,
7007
7077
  workflowCheckoutMutationLockRelativePath,
@@ -7414,6 +7484,7 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
7414
7484
  }
7415
7485
  }
7416
7486
  }
7487
+ const degradedSourceKeys = new Set;
7417
7488
  if (state.prReviewTriggerEvalPath) {
7418
7489
  const triggerPath = validateSwarmPath(directory, state.prReviewTriggerEvalPath);
7419
7490
  let triggerArtifact;
@@ -7436,6 +7507,9 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
7436
7507
  workflowLane: row.trigger_id
7437
7508
  });
7438
7509
  }
7510
+ for (const degradation of receipt.coverageDegradations) {
7511
+ degradedSourceKeys.add(`${degradation.source_batch_id}\x00${degradation.source_lane_id}`);
7512
+ }
7439
7513
  }
7440
7514
  const candidateIds = [];
7441
7515
  const extractedLaneKeys = new Set;
@@ -7444,7 +7518,7 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
7444
7518
  for (const record of findByBatchId(directory, source.batchId, {
7445
7519
  parentSessionId: state.sessionID
7446
7520
  })) {
7447
- if (record.laneId !== source.laneId || record.mode !== source.mode || record.status !== "completed" || record.workspace?.prHeadSha !== state.prHeadSha || record.workspace?.gitHead !== state.prHeadSha || record.result?.outputDegraded === true || record.result?.transcriptIncomplete === true || record.result?.truncated === true)
7521
+ if (record.laneId !== source.laneId || record.mode !== source.mode || record.workspace?.prHeadSha !== state.prHeadSha || record.workspace?.gitHead !== state.prHeadSha)
7448
7522
  continue;
7449
7523
  const ref = record.result?.outputRef?.trim();
7450
7524
  const artifact = ref ? readLaneOutput(directory, ref)?.artifact : undefined;
@@ -7461,6 +7535,9 @@ function derivePrReviewCandidateInventory(directory, state, ctx) {
7461
7535
  }
7462
7536
  }
7463
7537
  if (source.mode === "swarm-pr-review:micro" && !resolvedArtifact) {
7538
+ if (degradedSourceKeys.has(`${source.batchId}\x00${source.laneId}`)) {
7539
+ continue;
7540
+ }
7464
7541
  throw new Error(`BLOCKED: PR_REVIEW mandatory micro-lane provenance is missing or invalid for ${source.workflowLane ?? source.laneId}`);
7465
7542
  }
7466
7543
  }
@@ -8259,7 +8336,7 @@ var FEEDBACK_NO_CHANGE_CLASSIFICATIONS = new Set([
8259
8336
  "NEEDS_USER_DECISION"
8260
8337
  ]);
8261
8338
  function parseReviewerVerdictFields(text, itemId) {
8262
- const rows = text.split(/\r?\n/).map(pipeFields).filter((fields2) => fields2[0] === "[REVIEWED]" && fields2[1] === itemId);
8339
+ const rows = text.split(/\r?\n/).map((line) => pipeFieldsCapped(line, 10)).filter((fields2) => fields2[0] === "[REVIEWED]" && fields2[1] === itemId);
8263
8340
  if (rows.length !== 1)
8264
8341
  return null;
8265
8342
  const fields = rows[0];
@@ -8300,7 +8377,7 @@ function parseLaneItemVerdicts(text, itemIds, phase, reviewerClaims) {
8300
8377
  return parsed;
8301
8378
  }
8302
8379
  function parseCriticVerdict(text, itemId, reviewerSeverity) {
8303
- const rows = text.split(/\r?\n/).map(pipeFields).filter((fields2) => fields2[0] === "[CRITIC]" && fields2[1] === itemId);
8380
+ const rows = text.split(/\r?\n/).map((line) => pipeFieldsCapped(line, 6)).filter((fields2) => fields2[0] === "[CRITIC]" && fields2[1] === itemId);
8304
8381
  if (rows.length !== 1)
8305
8382
  return null;
8306
8383
  const fields = rows[0];
@@ -8337,7 +8414,7 @@ function parseCriticVerdict(text, itemId, reviewerSeverity) {
8337
8414
  return { status: fields[2], severity: fields[3] };
8338
8415
  }
8339
8416
  function artifactHasExactPositiveVerdictRow(text, marker, itemId, positiveVerdict) {
8340
- const rows = text.split(/\r?\n/).map(pipeFields).filter((fields) => fields[0] === marker && fields[1] === itemId);
8417
+ const rows = text.split(/\r?\n/).map((line) => pipeFieldsCapped(line, 4)).filter((fields) => fields[0] === marker && fields[1] === itemId);
8341
8418
  return rows.length === 1 && rows[0].length >= 4 && rows[0][2] === positiveVerdict && rows[0].slice(1, 4).every(Boolean);
8342
8419
  }
8343
8420
  function pipeFields(line) {
@@ -8345,6 +8422,17 @@ function pipeFields(line) {
8345
8422
  return [];
8346
8423
  return line.split("|").map((field) => field.trim());
8347
8424
  }
8425
+ function pipeFieldsCapped(line, expectedFieldCount) {
8426
+ const fields = pipeFields(line);
8427
+ if (fields.length <= expectedFieldCount)
8428
+ return fields;
8429
+ const capped = [
8430
+ ...fields.slice(0, expectedFieldCount - 1),
8431
+ fields.slice(expectedFieldCount - 1).join("|")
8432
+ ];
8433
+ warn(`[pr-workflow-gate] verdict row pipe tail-merge applied (expected ${expectedFieldCount} fields, received ${fields.length}); leading machine fields preserved, trailing prose fields merged: ${line.slice(0, 120)}`);
8434
+ return capped;
8435
+ }
8348
8436
  async function writeStateWhileLocked(directory, state, options = {}) {
8349
8437
  const validated = PrWorkflowGateStateSchema.parse(state);
8350
8438
  const current = await readPrWorkflowGateStateFromDisk(directory, validated.sessionID);
@@ -14304,7 +14392,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
14304
14392
  };
14305
14393
  }
14306
14394
  async function sweepActiveNearDuplicates(directory, options = {}) {
14307
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0r2m0vbq.js");
14395
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-e58e3v0v.js");
14308
14396
  const { config } = loadPluginConfigWithMeta2(directory);
14309
14397
  const sweepConfig = config.learning?.dedup_sweep;
14310
14398
  if (sweepConfig?.enabled === false)
@@ -15388,7 +15476,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
15388
15476
  }
15389
15477
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
15390
15478
  try {
15391
- const skillModule = await import("./skill-generator-yx7ka1cj.js");
15479
+ const skillModule = await import("./skill-generator-vrks0jjj.js");
15392
15480
  for (const cand of skillCandidates) {
15393
15481
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
15394
15482
  continue;
@@ -15848,7 +15936,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
15848
15936
  } catch {}
15849
15937
  }
15850
15938
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
15851
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-4pfrc902.js");
15939
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-gj58za4g.js");
15852
15940
  for (const { id } of contradictedEntries) {
15853
15941
  try {
15854
15942
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -16667,7 +16755,7 @@ async function runCuratorPostMortem(directory, options = {}) {
16667
16755
  warnings.push("Failed to collect knowledge summary.");
16668
16756
  }
16669
16757
  try {
16670
- const { getScanStatus } = await import("./scan-cursor-1z60gwrw.js");
16758
+ const { getScanStatus } = await import("./scan-cursor-wznc7p7p.js");
16671
16759
  const scanStatus = await getScanStatus(directory);
16672
16760
  if (scanStatus.remaining_estimate > 0) {
16673
16761
  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.`);
@@ -16839,9 +16927,9 @@ var _internals22 = {
16839
16927
  verifyPostMortemKnowledgeActions,
16840
16928
  repairPostMortemActions,
16841
16929
  loadDefaultKnowledgeConfig: async (directory) => {
16842
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vpnkwvez.js");
16930
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-k596bhds.js");
16843
16931
  try {
16844
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0r2m0vbq.js");
16932
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-e58e3v0v.js");
16845
16933
  const loaded = loadPluginConfigWithMeta2(directory);
16846
16934
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
16847
16935
  } catch {
@@ -16849,11 +16937,11 @@ var _internals22 = {
16849
16937
  }
16850
16938
  },
16851
16939
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
16852
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-5nytvg7p.js");
16940
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-q1nchgpg.js");
16853
16941
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
16854
16942
  },
16855
16943
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
16856
- const { checkHivePromotions } = await import("./hive-promoter-qe8pqg79.js");
16944
+ const { checkHivePromotions } = await import("./hive-promoter-vcbcvcsh.js");
16857
16945
  return checkHivePromotions(entries, knowledgeConfig, directory);
16858
16946
  },
16859
16947
  applyProposalTriage: async (directory, triage) => {
@@ -16862,7 +16950,7 @@ var _internals22 = {
16862
16950
  activateProposal,
16863
16951
  listSkills: listSkills2,
16864
16952
  sanitizeSlug
16865
- } = await import("./skill-generator-yx7ka1cj.js");
16953
+ } = await import("./skill-generator-vrks0jjj.js");
16866
16954
  const result = {
16867
16955
  approved: [],
16868
16956
  rejected: [],
@@ -18134,9 +18222,9 @@ function hashContent(content) {
18134
18222
  return createHash7("sha1").update(content).digest("hex");
18135
18223
  }
18136
18224
  async function loadConfigForPolicyCurator(directory) {
18137
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vpnkwvez.js");
18225
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-k596bhds.js");
18138
18226
  try {
18139
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0r2m0vbq.js");
18227
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-e58e3v0v.js");
18140
18228
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
18141
18229
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
18142
18230
  } catch {
@@ -26729,7 +26817,7 @@ async function runFinalizeStage(ctx) {
26729
26817
  }
26730
26818
  }
26731
26819
  try {
26732
- const { CuratorConfigSchema: CCS } = await import("./schema-vpnkwvez.js");
26820
+ const { CuratorConfigSchema: CCS } = await import("./schema-k596bhds.js");
26733
26821
  const { config: pmLoadedConfig } = _internals35.loadPluginConfigWithMeta(ctx.directory);
26734
26822
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
26735
26823
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -29002,9 +29090,9 @@ var _internals40 = {
29002
29090
  loadPluginConfigWithMeta,
29003
29091
  loadCuratorDeps: async () => {
29004
29092
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
29005
- import("./schema-vpnkwvez.js"),
29006
- import("./curator-5nytvg7p.js"),
29007
- import("./curator-llm-factory-rds75zhj.js")
29093
+ import("./schema-k596bhds.js"),
29094
+ import("./curator-q1nchgpg.js"),
29095
+ import("./curator-llm-factory-96pnc23w.js")
29008
29096
  ]);
29009
29097
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
29010
29098
  }
@@ -29909,7 +29997,7 @@ async function computeCurationDiagnostics(directory, entries) {
29909
29997
  let scanCompleted = false;
29910
29998
  let scanRemaining = 0;
29911
29999
  try {
29912
- const { getScanStatus } = await import("./scan-cursor-1z60gwrw.js");
30000
+ const { getScanStatus } = await import("./scan-cursor-wznc7p7p.js");
29913
30001
  const status = await getScanStatus(directory);
29914
30002
  scanGeneration = status.generation;
29915
30003
  scanCompleted = status.completed;
@@ -29919,10 +30007,10 @@ async function computeCurationDiagnostics(directory, entries) {
29919
30007
  try {
29920
30008
  const { isLinked: isLinked2 } = await import("./knowledge-link-m9p80f4r.js");
29921
30009
  if (isLinked2(directory)) {
29922
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-vpnkwvez.js");
30010
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-k596bhds.js");
29923
30011
  let config;
29924
30012
  try {
29925
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-0r2m0vbq.js");
30013
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-e58e3v0v.js");
29926
30014
  const loaded = loadPluginConfigWithMeta2(directory);
29927
30015
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
29928
30016
  } catch {
@@ -31140,7 +31228,7 @@ async function handleDoctorCommand(directory, args) {
31140
31228
  const result = runConfigDoctor(config, directory);
31141
31229
  let output;
31142
31230
  if (enableAutoFix && result.hasAutoFixableIssues) {
31143
- const { runConfigDoctorWithFixes } = await import("./config-doctor-5vzpq4qa.js");
31231
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-y5qeh18c.js");
31144
31232
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
31145
31233
  applyLossy: true
31146
31234
  });
@@ -31977,7 +32065,7 @@ async function handleEvidenceCommand(directory, args) {
31977
32065
  return formatTaskEvidenceMarkdown(evidenceData);
31978
32066
  }
31979
32067
  async function handleEvidenceSummaryCommand(directory) {
31980
- const { buildEvidenceSummary } = await import("./evidence-summary-service-zq4gyx6g.js");
32068
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-18142mr3.js");
31981
32069
  const artifact = await buildEvidenceSummary(directory);
31982
32070
  if (!artifact) {
31983
32071
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -55440,7 +55528,7 @@ function buildDetailedHelp(commandName, entry) {
55440
55528
  async function handleHelpCommand(ctx) {
55441
55529
  const targetCommand = ctx.args.join(" ");
55442
55530
  if (!targetCommand) {
55443
- const { buildHelpText } = await import("./index-mm2egvdt.js");
55531
+ const { buildHelpText } = await import("./index-5qd5vt2d.js");
55444
55532
  return buildHelpText();
55445
55533
  }
55446
55534
  const tokens = targetCommand.split(/\s+/);
@@ -55449,7 +55537,7 @@ async function handleHelpCommand(ctx) {
55449
55537
  return _internals85.buildDetailedHelp(resolved.key, resolved.entry);
55450
55538
  }
55451
55539
  const similar = _internals85.findSimilarCommands(targetCommand);
55452
- const { buildHelpText: fullHelp } = await import("./index-mm2egvdt.js");
55540
+ const { buildHelpText: fullHelp } = await import("./index-5qd5vt2d.js");
55453
55541
  if (similar.length > 0) {
55454
55542
  return `Command '/swarm ${targetCommand}' not found.
55455
55543
 
@@ -55626,7 +55714,7 @@ var COMMAND_REGISTRY = {
55626
55714
  },
55627
55715
  "guardrail explain": {
55628
55716
  handler: async (ctx) => {
55629
- const { handleGuardrailExplain } = await import("./guardrail-explain-an7jvam1.js");
55717
+ const { handleGuardrailExplain } = await import("./guardrail-explain-kyd89z8z.js");
55630
55718
  return handleGuardrailExplain(ctx.directory, ctx.args);
55631
55719
  },
55632
55720
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -55636,7 +55724,7 @@ var COMMAND_REGISTRY = {
55636
55724
  },
55637
55725
  "guardrail-explain": {
55638
55726
  handler: async (ctx) => {
55639
- const { handleGuardrailExplain } = await import("./guardrail-explain-an7jvam1.js");
55727
+ const { handleGuardrailExplain } = await import("./guardrail-explain-kyd89z8z.js");
55640
55728
  return handleGuardrailExplain(ctx.directory, ctx.args);
55641
55729
  },
55642
55730
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -55646,7 +55734,7 @@ var COMMAND_REGISTRY = {
55646
55734
  },
55647
55735
  "guardrail-log": {
55648
55736
  handler: async (ctx) => {
55649
- const { handleGuardrailLog } = await import("./guardrail-log-0hnd2k9v.js");
55737
+ const { handleGuardrailLog } = await import("./guardrail-log-cahp1ews.js");
55650
55738
  return handleGuardrailLog(ctx.directory, ctx.args);
55651
55739
  },
55652
55740
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -62968,7 +63056,7 @@ async function precreateStandardWorktreeSession(args) {
62968
63056
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, provisionResult.worktreePath);
62969
63057
  if (laneProfile) {
62970
63058
  try {
62971
- const { writeLaneProfileToDiskReal } = await import("./core-xjzdc56e.js");
63059
+ const { writeLaneProfileToDiskReal } = await import("./core-pwd9604e.js");
62972
63060
  await writeLaneProfileToDiskReal(provisionResult.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
62973
63061
  } catch {}
62974
63062
  }
@@ -63467,7 +63555,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
63467
63555
  }
63468
63556
  clearWorktreeMergeStatus(statusKey);
63469
63557
  try {
63470
- const { removeLaneProfileFromDiskReal } = await import("./core-xjzdc56e.js");
63558
+ const { removeLaneProfileFromDiskReal } = await import("./core-pwd9604e.js");
63471
63559
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
63472
63560
  } catch {}
63473
63561
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-nwrwy8eb.js";
5
+ } from "./index-zd4qhnr7.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-jm4cpp4n.js";
8
+ } from "./index-thp186x0.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -9,7 +9,7 @@ import {
9
9
  PluginConfigSchema,
10
10
  init_schema,
11
11
  stripKnownSwarmPrefix
12
- } from "./index-jm4cpp4n.js";
12
+ } from "./index-thp186x0.js";
13
13
  import {
14
14
  ALL_AGENT_NAMES,
15
15
  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.140.5",
24
+ version: "7.140.6",
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",
@@ -9,7 +9,7 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-01ggt2mj.js";
12
+ } from "./index-fejfzy2j.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-vh05t3w5.js";
@@ -3,7 +3,7 @@ import {
3
3
  queryHistoricalOutcomes,
4
4
  readKnowledgeEvents,
5
5
  recordKnowledgeEvent
6
- } from "./index-affh1gtg.js";
6
+ } from "./index-92n3d5ky.js";
7
7
  import {
8
8
  jaccardBigram,
9
9
  readKnowledge,
@@ -11,7 +11,7 @@ import {
11
11
  resolveSwarmKnowledgePath,
12
12
  transactKnowledge,
13
13
  wordBigrams
14
- } from "./index-01ggt2mj.js";
14
+ } from "./index-fejfzy2j.js";
15
15
  import {
16
16
  init_knowledge_types,
17
17
  isActiveStatus
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
224
224
  alreadyInactive: true
225
225
  };
226
226
  }
227
- const { quarantineEntry } = await import("./knowledge-validator-2c7w87dk.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-mvcs8wf6.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-vpnkwvez.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-0r2m0vbq.js");
230
+ const { KnowledgeConfigSchema } = await import("./schema-k596bhds.js");
231
+ const { loadPluginConfigWithMeta } = await import("./index-e58e3v0v.js");
232
232
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
233
233
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
234
234
  } catch {