opencode-swarm 7.126.5 → 7.127.0

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 (26) hide show
  1. package/.opencode/skills/issue-tracer/SKILL.md +7 -6
  2. package/.opencode/skills/issue-tracer/references/install.md +5 -3
  3. package/.opencode/skills/swarm-pr-feedback/SKILL.md +85 -11
  4. package/.opencode/skills/swarm-pr-review/SKILL.md +325 -107
  5. package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +5 -3
  6. package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +5 -5
  7. package/dist/background/candidate-parser.d.ts +1 -0
  8. package/dist/background/pending-delegations.d.ts +7 -0
  9. package/dist/background/workspace-snapshot.d.ts +20 -0
  10. package/dist/cli/{curator-llm-factory-y24xw3j4.js → curator-llm-factory-xmwgrfr0.js} +3 -3
  11. package/dist/cli/{curator-5crbtfm1.js → curator-x0sqv6ye.js} +3 -3
  12. package/dist/cli/{guardrail-explain-3r26pm2s.js → guardrail-explain-g3tgjv9a.js} +4 -4
  13. package/dist/cli/{hive-promoter-9d2g1xf3.js → hive-promoter-d11sk30x.js} +3 -3
  14. package/dist/cli/{index-mg54y5gc.js → index-40zn444p.js} +38 -1
  15. package/dist/cli/{index-0cz1ws47.js → index-ecxwhwz7.js} +2 -0
  16. package/dist/cli/{index-hczdkknj.js → index-fcsnw12w.js} +52 -27
  17. package/dist/cli/{index-0543dz3t.js → index-hjkczwqm.js} +4 -4
  18. package/dist/cli/{index-0y19k18q.js → index-xq0etzbh.js} +1 -1
  19. package/dist/cli/index.js +3 -3
  20. package/dist/cli/{pending-delegations-7j8xqg5f.js → pending-delegations-a1bbpp8b.js} +1 -1
  21. package/dist/cli/{workspace-snapshot-c9pxxt9a.js → workspace-snapshot-aa0ggevw.js} +3 -1
  22. package/dist/commands/registry.d.ts +1 -1
  23. package/dist/hooks/pr-workflow-gate.d.ts +57 -2
  24. package/dist/index.js +17 -14
  25. package/dist/tools/dispatch-lanes.d.ts +5 -0
  26. package/package.json +1 -1
@@ -1,8 +1,10 @@
1
1
  # Dry-Run: Parser-Based Candidate Extraction
2
2
 
3
- This section demonstrates the new parser-based extraction path end-to-end
4
- using synthetic data. It is concrete enough to implement the same pattern in
5
- another skill.
3
+ This section demonstrates the Profile A (structured controller) extraction
4
+ path end-to-end using synthetic data. It is concrete enough to implement the
5
+ same pattern in another skill. On Profiles B/C the `[CANDIDATE]` row format in
6
+ the lane reports is the extraction contract itself; this parser flow does not
7
+ apply.
6
8
 
7
9
  ### Scenario
8
10
 
@@ -94,10 +94,10 @@ For a clean micro-lane, emit `[CLEAN] | micro_lane | coverage_scope | evidence`.
94
94
  For a clean base lane, emit `[CLEAN] | workflow_lane | coverage_scope | evidence`.
95
95
  ```
96
96
 
97
- The orchestrator extracts candidates from the full lane artifact via
98
- `parse_lane_candidates` as the primary mechanism. The `[CANDIDATE]` row
99
- format above is a fallback convention for environments where the parser is
100
- unavailable. Explorers should still emit structured records regardless of
101
- whether the parser is present.
97
+ Under Profile A the orchestrator extracts candidates from the full lane
98
+ artifact via `parse_lane_candidates` as the primary mechanism. On Profiles
99
+ B/C and as a Profile A fallback when the parser is unavailable — the
100
+ `[CANDIDATE]` row format above IS the extraction contract. Explorers emit
101
+ structured records regardless of which harness runs them.
102
102
 
103
103
  Do not let speed degrade validation quality.
@@ -32,6 +32,7 @@ declare const ParseFlagsSchema: z.ZodObject<{
32
32
  base_explorer: "base_explorer";
33
33
  }>>;
34
34
  expected_micro_lane: z.ZodOptional<z.ZodString>;
35
+ expected_micro_lanes: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
36
  }, z.core.$strict>;
36
37
  export type ArtifactInput = z.infer<typeof ArtifactInputSchema>;
37
38
  export type ParseFlags = z.infer<typeof ParseFlagsSchema>;
@@ -54,6 +54,12 @@ export interface BackgroundDelegationRecord {
54
54
  mode?: string;
55
55
  /** Mechanical PR workflow obligation identifier, distinct from retry-safe laneId. */
56
56
  workflowLane?: string;
57
+ /**
58
+ * Complete set of PR-review dimensions/risk families this lane covers when a
59
+ * depth tier consolidates dispatch. Always contains workflowLane. Absent for
60
+ * singleton lanes (legacy and tier-L dispatches).
61
+ */
62
+ ownedWorkflowLanes?: string[];
57
63
  /** Canonical hash of prompt/provenance inputs captured at dispatch time. */
58
64
  promptHash?: string;
59
65
  /** Project/root provenance captured at dispatch time. */
@@ -122,6 +128,7 @@ export interface RecordPendingInput {
122
128
  laneId?: string;
123
129
  mode?: string;
124
130
  workflowLane?: string;
131
+ ownedWorkflowLanes?: string[];
125
132
  promptHash?: string;
126
133
  workspace?: BackgroundWorkspaceSnapshot;
127
134
  taskChangeContext?: BackgroundTaskChangeContext;
@@ -21,6 +21,26 @@ export declare function readGitTextAtRevision(directory: string, revision: strin
21
21
  export declare function resolveCurrentGitHead(directory: string): string | null;
22
22
  /** Resolve one exact PR merge base without shell interpolation or unbounded I/O. */
23
23
  export declare function resolveExactMergeBase(directory: string, baseRef: string, prHeadSha: string): string | null;
24
+ export interface PrReviewDiffStats {
25
+ changedLines: number;
26
+ changedFiles: number;
27
+ /**
28
+ * True when the range contains any gitlink (submodule) pointer change.
29
+ * Git's numstat reports a submodule bump as a fixed 1-added/1-deleted row
30
+ * regardless of the referenced repository's actual diff size, so size
31
+ * thresholds cannot bound this case; callers must escalate unconditionally.
32
+ */
33
+ hasSubmoduleChange: boolean;
34
+ }
35
+ /**
36
+ * Compute bounded changed-line/file totals for the exact reviewed PR range.
37
+ * Returns null on any Git failure, malformed numstat row, or buffer overflow
38
+ * so callers can fail strict (treat unknown size as the largest tier).
39
+ * Rename detection is pinned off (`--no-renames`) so the same logical diff
40
+ * produces the same totals regardless of the executing machine's ambient
41
+ * git version/config.
42
+ */
43
+ export declare function resolvePrReviewDiffStats(directory: string, baseSha: string, prHeadSha: string): PrReviewDiffStats | null;
24
44
  /** Resolve the current branch's exact remote-tracking publication target. */
25
45
  export declare function resolveCurrentUpstreamRemoteRef(directory: string): string | null;
26
46
  export interface PrUpstreamPushTarget {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-hczdkknj.js";
4
+ } from "./index-fcsnw12w.js";
5
5
  import"./index-v4n224r1.js";
6
6
  import"./index-cpssctv1.js";
7
7
  import"./index-kk1scggc.js";
@@ -34,12 +34,12 @@ import"./index-2tn5h2zp.js";
34
34
  import"./index-1kz6da87.js";
35
35
  import"./index-w9cb5zwh.js";
36
36
  import"./index-4rhhvd1a.js";
37
- import"./index-0cz1ws47.js";
37
+ import"./index-ecxwhwz7.js";
38
38
  import"./index-2445sx3d.js";
39
39
  import"./index-z6xqpmqg.js";
40
40
  import"./index-zjygnfay.js";
41
41
  import"./index-zgwm4ryv.js";
42
- import"./index-mg54y5gc.js";
42
+ import"./index-40zn444p.js";
43
43
  import"./index-3x761jqv.js";
44
44
  import"./index-7mkpsw6g.js";
45
45
  import"./index-fsrp8wp3.js";
@@ -14,7 +14,7 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-hczdkknj.js";
17
+ } from "./index-fcsnw12w.js";
18
18
  import"./index-v4n224r1.js";
19
19
  import"./index-cpssctv1.js";
20
20
  import"./index-kk1scggc.js";
@@ -47,12 +47,12 @@ import"./index-2tn5h2zp.js";
47
47
  import"./index-1kz6da87.js";
48
48
  import"./index-w9cb5zwh.js";
49
49
  import"./index-4rhhvd1a.js";
50
- import"./index-0cz1ws47.js";
50
+ import"./index-ecxwhwz7.js";
51
51
  import"./index-2445sx3d.js";
52
52
  import"./index-z6xqpmqg.js";
53
53
  import"./index-zjygnfay.js";
54
54
  import"./index-zgwm4ryv.js";
55
- import"./index-mg54y5gc.js";
55
+ import"./index-40zn444p.js";
56
56
  import"./index-3x761jqv.js";
57
57
  import"./index-7mkpsw6g.js";
58
58
  import"./index-fsrp8wp3.js";
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-0y19k18q.js";
5
- import"./index-hczdkknj.js";
4
+ } from "./index-xq0etzbh.js";
5
+ import"./index-fcsnw12w.js";
6
6
  import"./index-v4n224r1.js";
7
7
  import"./index-cpssctv1.js";
8
8
  import"./index-kk1scggc.js";
@@ -35,12 +35,12 @@ import"./index-2tn5h2zp.js";
35
35
  import"./index-1kz6da87.js";
36
36
  import"./index-w9cb5zwh.js";
37
37
  import"./index-4rhhvd1a.js";
38
- import"./index-0cz1ws47.js";
38
+ import"./index-ecxwhwz7.js";
39
39
  import"./index-2445sx3d.js";
40
40
  import"./index-z6xqpmqg.js";
41
41
  import"./index-zjygnfay.js";
42
42
  import"./index-zgwm4ryv.js";
43
- import"./index-mg54y5gc.js";
43
+ import"./index-40zn444p.js";
44
44
  import"./index-3x761jqv.js";
45
45
  import"./index-7mkpsw6g.js";
46
46
  import"./index-fsrp8wp3.js";
@@ -7,7 +7,7 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-hczdkknj.js";
10
+ } from "./index-fcsnw12w.js";
11
11
  import"./index-v4n224r1.js";
12
12
  import"./index-cpssctv1.js";
13
13
  import"./index-kk1scggc.js";
@@ -42,12 +42,12 @@ import"./index-2tn5h2zp.js";
42
42
  import"./index-1kz6da87.js";
43
43
  import"./index-w9cb5zwh.js";
44
44
  import"./index-4rhhvd1a.js";
45
- import"./index-0cz1ws47.js";
45
+ import"./index-ecxwhwz7.js";
46
46
  import"./index-2445sx3d.js";
47
47
  import"./index-z6xqpmqg.js";
48
48
  import"./index-zjygnfay.js";
49
49
  import"./index-zgwm4ryv.js";
50
- import"./index-mg54y5gc.js";
50
+ import"./index-40zn444p.js";
51
51
  import"./index-3x761jqv.js";
52
52
  import"./index-7mkpsw6g.js";
53
53
  import"./index-fsrp8wp3.js";
@@ -92,6 +92,43 @@ function resolveExactMergeBase(directory, baseRef, prHeadSha) {
92
92
  const mergeBase = runGit(directory, ["merge-base", "--", baseRef, prHeadSha]);
93
93
  return mergeBase && /^[0-9a-f]{6,64}$/i.test(mergeBase) ? mergeBase : null;
94
94
  }
95
+ var GITLINK_MODE_PATTERN = /^:\d{6} 160000 |^:160000 \d{6} /;
96
+ function resolvePrReviewDiffStats(directory, baseSha, prHeadSha) {
97
+ if (!isSafeGitRevisionToken(baseSha) || !isSafeGitRevisionToken(prHeadSha))
98
+ return null;
99
+ const range = `${baseSha}...${prHeadSha}`;
100
+ const output = runGit(directory, [
101
+ "diff",
102
+ "--no-renames",
103
+ "--numstat",
104
+ range
105
+ ]);
106
+ if (output === null)
107
+ return null;
108
+ let changedLines = 0;
109
+ let changedFiles = 0;
110
+ for (const line of output.split(`
111
+ `)) {
112
+ const trimmed = line.trim();
113
+ if (trimmed.length === 0)
114
+ continue;
115
+ const fields = trimmed.split("\t");
116
+ if (fields.length < 3)
117
+ return null;
118
+ const added = fields[0] === "-" ? 0 : Number.parseInt(fields[0], 10);
119
+ const deleted = fields[1] === "-" ? 0 : Number.parseInt(fields[1], 10);
120
+ if (Number.isNaN(added) || Number.isNaN(deleted))
121
+ return null;
122
+ changedFiles += 1;
123
+ changedLines += added + deleted;
124
+ }
125
+ const rawOutput = runGit(directory, ["diff", "--raw", range]);
126
+ if (rawOutput === null)
127
+ return null;
128
+ const hasSubmoduleChange = rawOutput.split(`
129
+ `).some((line) => GITLINK_MODE_PATTERN.test(line.trim()));
130
+ return { changedLines, changedFiles, hasSubmoduleChange };
131
+ }
95
132
  function isSafeGitRevisionToken(value) {
96
133
  return /^(?!-)[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$/.test(value) && !value.includes("..") && !value.includes("//") && !value.includes("@{");
97
134
  }
@@ -561,4 +598,4 @@ var _internals = {
561
598
  parsePorcelainV2Snapshot
562
599
  };
563
600
 
564
- export { readGitTextAtRevision, resolveCurrentGitHead, resolveExactMergeBase, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveExactRemoteBranchHead, resolveGitControlStateDigest, resolveIsWorkingTreeClean, resolveCommitCountSince, resolveIsExactSingleChildCommit, resolveRemoteRefsContainingHead, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
601
+ export { readGitTextAtRevision, resolveCurrentGitHead, resolveExactMergeBase, resolvePrReviewDiffStats, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveExactRemoteBranchHead, resolveGitControlStateDigest, resolveIsWorkingTreeClean, resolveCommitCountSince, resolveIsExactSingleChildCommit, resolveRemoteRefsContainingHead, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
@@ -81,6 +81,7 @@ var RecordSchema = exports_external.object({
81
81
  laneId: exports_external.string().optional(),
82
82
  mode: exports_external.string().optional(),
83
83
  workflowLane: exports_external.string().optional(),
84
+ ownedWorkflowLanes: exports_external.array(exports_external.string().min(1).max(120)).min(1).max(11).optional(),
84
85
  promptHash: exports_external.string().optional(),
85
86
  workspace: WorkspaceSchema.optional(),
86
87
  taskChangeContext: TaskChangeContextSchema.optional(),
@@ -158,6 +159,7 @@ async function recordPendingDelegation(directory, input, options = {}) {
158
159
  ...input.laneId ? { laneId: input.laneId } : {},
159
160
  ...input.mode ? { mode: input.mode } : {},
160
161
  ...input.workflowLane ? { workflowLane: input.workflowLane } : {},
162
+ ...input.ownedWorkflowLanes?.length ? { ownedWorkflowLanes: [...input.ownedWorkflowLanes] } : {},
161
163
  ...input.promptHash ? { promptHash: input.promptHash } : {},
162
164
  ...input.workspace ? { workspace: input.workspace } : {},
163
165
  ...input.taskChangeContext ? { taskChangeContext: input.taskChangeContext } : {},
@@ -253,7 +253,7 @@ import {
253
253
  } from "./index-4rhhvd1a.js";
254
254
  import {
255
255
  readDelegations
256
- } from "./index-0cz1ws47.js";
256
+ } from "./index-ecxwhwz7.js";
257
257
  import {
258
258
  readSwarmFileAsync,
259
259
  safeHook,
@@ -274,9 +274,10 @@ import {
274
274
  resolveExactRemoteBranchHead,
275
275
  resolveIsExactSingleChildCommit,
276
276
  resolveIsWorkingTreeClean,
277
+ resolvePrReviewDiffStats,
277
278
  resolvePrWorkflowRevisionDigest,
278
279
  resolveRemoteRefsContainingHead
279
- } from "./index-mg54y5gc.js";
280
+ } from "./index-40zn444p.js";
280
281
  import {
281
282
  atomicWriteFile
282
283
  } from "./index-7mkpsw6g.js";
@@ -715,6 +716,19 @@ var LaneOutputArtifactSchema = exports_external.object({
715
716
  init_constants();
716
717
  init_schema();
717
718
  init_tool_metadata();
719
+ var PR_REVIEW_BASE_DIMENSION_IDS = [
720
+ "intent-architecture",
721
+ "correctness-state",
722
+ "tests-falsifiability",
723
+ "security-trust",
724
+ "reliability-performance",
725
+ "compatibility-delivery"
726
+ ];
727
+ var PR_REVIEW_BASE_LANE_FLOORS = {
728
+ S: 1,
729
+ M: 3,
730
+ L: PR_REVIEW_BASE_DIMENSION_IDS.length
731
+ };
718
732
  var GATE_SCHEMA_VERSION = 1;
719
733
  var MAX_TRACKED_SESSIONS = 200;
720
734
  var MAX_WORKFLOW_BATCHES = 128;
@@ -726,18 +740,20 @@ var STATE_MUTATION_LOCK_UNINITIALIZED_STALE_MS = 30000;
726
740
  var WORKFLOW_GATE_DIR = "pr-workflow-gates";
727
741
  var trackedStatesByProjectSession = new Map;
728
742
  var pendingStateMutationsByProjectSession = new Map;
743
+ var PrReviewBaseDimensionIdSchema = exports_external.enum([
744
+ "intent-architecture",
745
+ "correctness-state",
746
+ "tests-falsifiability",
747
+ "security-trust",
748
+ "reliability-performance",
749
+ "compatibility-delivery"
750
+ ]);
729
751
  var PrReviewBaseDispatchRecordSchema = exports_external.object({
730
752
  batchId: exports_external.string().min(1),
731
753
  lanes: exports_external.array(exports_external.object({
732
754
  laneId: exports_external.string().min(1),
733
- workflowLane: exports_external.enum([
734
- "intent-architecture",
735
- "correctness-state",
736
- "tests-falsifiability",
737
- "security-trust",
738
- "reliability-performance",
739
- "compatibility-delivery"
740
- ])
755
+ workflowLane: PrReviewBaseDimensionIdSchema,
756
+ ownedWorkflowLanes: exports_external.array(PrReviewBaseDimensionIdSchema).min(1).max(PR_REVIEW_BASE_DIMENSION_IDS.length).optional()
741
757
  }).strict()).min(1),
742
758
  validatedAt: exports_external.string().min(1)
743
759
  }).strict();
@@ -832,6 +848,12 @@ var PrWorkflowGateStateSchema = exports_external.object({
832
848
  prHeadSha: exports_external.string().min(1).optional(),
833
849
  prReviewBaseRef: exports_external.string().min(1).optional(),
834
850
  prReviewBaseSha: exports_external.string().min(1).optional(),
851
+ prReviewDepthTier: exports_external.enum(["S", "M", "L"]).optional(),
852
+ prReviewDiffStats: exports_external.object({
853
+ changedLines: exports_external.number().int().nonnegative(),
854
+ changedFiles: exports_external.number().int().nonnegative(),
855
+ hasSubmoduleChange: exports_external.boolean().default(false)
856
+ }).strict().optional(),
835
857
  prReviewBaseDispatches: exports_external.array(PrReviewBaseDispatchRecordSchema).max(MAX_WORKFLOW_BATCHES).optional(),
836
858
  prReviewBaseDispatch: PrReviewBaseDispatchRecordSchema.optional(),
837
859
  prReviewTriggerEvalPath: exports_external.string().min(1).optional(),
@@ -848,7 +870,7 @@ var PrWorkflowGateStateSchema = exports_external.object({
848
870
  prFeedbackGateBatches: exports_external.array(PrFeedbackGateBatchRecordSchema).max(MAX_WORKFLOW_BATCHES).optional(),
849
871
  prFeedbackReadyToPublish: PrFeedbackReadyToPublishRecordSchema.optional(),
850
872
  prFeedbackScopes: exports_external.array(PrFeedbackScopeDeclarationRecordSchema).max(MAX_WORKFLOW_BATCHES).optional()
851
- }).strict();
873
+ }).passthrough();
852
874
  async function activatePrWorkflow(directory, sessionID, mode, options = {}) {
853
875
  const normalizedSessionID = normalizeSessionID(sessionID);
854
876
  const existing = await readPrWorkflowGateState(directory, normalizedSessionID);
@@ -885,9 +907,11 @@ async function readPrWorkflowGateState(directory, sessionID) {
885
907
  async function clearPrWorkflowGateState(directory, sessionID, expectedRevision) {
886
908
  const normalizedSessionID = normalizeSessionID(sessionID);
887
909
  await withSessionStateMutation(directory, normalizedSessionID, async () => {
888
- const current = await readPrWorkflowGateStateFromDisk(directory, normalizedSessionID);
889
- if (expectedRevision !== undefined && (!current || current.revision !== expectedRevision)) {
890
- throw new Error("BLOCKED: PR workflow gate state changed during terminal completion; revalidate the current session state before retrying");
910
+ if (expectedRevision !== undefined) {
911
+ const current = await readPrWorkflowGateStateFromDisk(directory, normalizedSessionID);
912
+ if (!current || current.revision !== expectedRevision) {
913
+ throw new Error("BLOCKED: PR workflow gate state changed during terminal completion; revalidate the current session state before retrying");
914
+ }
891
915
  }
892
916
  try {
893
917
  await fsp.rm(workflowGateStatePath(directory, normalizedSessionID), {
@@ -962,10 +986,10 @@ function assertCurrentCheckoutHead(directory, expectedHead) {
962
986
  const normalizedExpected = normalizePrHeadSha(expectedHead);
963
987
  const currentHead = _test_exports.resolveCurrentGitHead(directory)?.trim();
964
988
  if (!currentHead) {
965
- throw new Error(`BLOCKED: cannot verify the current Git HEAD against PR head "${normalizedExpected}"`);
989
+ throw new Error(`BLOCKED: cannot resolve the current Git HEAD in "${directory}" to verify against PR head "${normalizedExpected}". ` + `This means Git could not resolve HEAD (the working directory may not be a Git repository, ` + `HEAD may be unborn, the commit object may be missing in a shallow clone, the Git binary may not be on PATH, ` + `or the bounded Git invocation may have timed out). ` + `Verify with: git -C "${directory}" rev-parse --verify HEAD^{commit}`);
966
990
  }
967
991
  if (currentHead.toLowerCase() !== normalizedExpected.toLowerCase()) {
968
- throw new Error(`BLOCKED: current checkout HEAD "${currentHead}" does not match PR head "${normalizedExpected}"`);
992
+ throw new Error(`BLOCKED: current checkout HEAD "${currentHead}" does not match PR head "${normalizedExpected}" ` + `(working directory: "${directory}"). ` + `Check out the exact PR head with: git -C "${directory}" switch --detach ${normalizedExpected}`);
969
993
  }
970
994
  return normalizedExpected;
971
995
  }
@@ -1000,6 +1024,7 @@ var _test_exports = {
1000
1024
  resolveCommitCountSince,
1001
1025
  resolveIsWorkingTreeClean,
1002
1026
  resolveIsExactSingleChildCommit,
1027
+ resolvePrReviewDiffStats,
1003
1028
  resolvePrWorkflowRevisionDigest,
1004
1029
  resolveRemoteRefsContainingHead,
1005
1030
  parseCriticVerdict,
@@ -1010,7 +1035,7 @@ var _test_exports = {
1010
1035
  async function requireAnyActiveState(directory, sessionID) {
1011
1036
  const state = await readPrWorkflowGateState(directory, sessionID);
1012
1037
  if (!state) {
1013
- throw new Error(`BLOCKED: no active PR workflow gate for session "${normalizeSessionID(sessionID)}"`);
1038
+ throw new Error(`BLOCKED: no active PR workflow gate for session "${normalizeSessionID(sessionID)}". ` + `The gate is activated by running \`/swarm pr-review <pr-ref>\` (PR_REVIEW) or \`/swarm pr-feedback <pr-ref>\` (PR_FEEDBACK), ` + `or by the first dispatch_lanes_async call with mode "swarm-pr-review:*" / "swarm-pr-feedback:*".`);
1014
1039
  }
1015
1040
  return state;
1016
1041
  }
@@ -12280,11 +12305,11 @@ var _internals15 = {
12280
12305
  }
12281
12306
  },
12282
12307
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
12283
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-5crbtfm1.js");
12308
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-x0sqv6ye.js");
12284
12309
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
12285
12310
  },
12286
12311
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
12287
- const { checkHivePromotions } = await import("./hive-promoter-9d2g1xf3.js");
12312
+ const { checkHivePromotions } = await import("./hive-promoter-d11sk30x.js");
12288
12313
  return checkHivePromotions(entries, knowledgeConfig, directory);
12289
12314
  },
12290
12315
  applyProposalTriage: async (directory, triage) => {
@@ -20151,8 +20176,8 @@ var _internals28 = {
20151
20176
  loadCuratorDeps: async () => {
20152
20177
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
20153
20178
  import("./schema-2x7wsb0n.js"),
20154
- import("./curator-5crbtfm1.js"),
20155
- import("./curator-llm-factory-y24xw3j4.js")
20179
+ import("./curator-x0sqv6ye.js"),
20180
+ import("./curator-llm-factory-xmwgrfr0.js")
20156
20181
  ]);
20157
20182
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
20158
20183
  }
@@ -20651,7 +20676,7 @@ import { fileURLToPath } from "url";
20651
20676
  // package.json
20652
20677
  var package_default = {
20653
20678
  name: "opencode-swarm",
20654
- version: "7.126.5",
20679
+ version: "7.127.0",
20655
20680
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
20656
20681
  main: "dist/index.js",
20657
20682
  types: "dist/index.d.ts",
@@ -41213,7 +41238,7 @@ function buildDetailedHelp(commandName, entry) {
41213
41238
  async function handleHelpCommand(ctx) {
41214
41239
  const targetCommand = ctx.args.join(" ");
41215
41240
  if (!targetCommand) {
41216
- const { buildHelpText } = await import("./index-0543dz3t.js");
41241
+ const { buildHelpText } = await import("./index-hjkczwqm.js");
41217
41242
  return buildHelpText();
41218
41243
  }
41219
41244
  const tokens = targetCommand.split(/\s+/);
@@ -41222,7 +41247,7 @@ async function handleHelpCommand(ctx) {
41222
41247
  return _internals63.buildDetailedHelp(resolved.key, resolved.entry);
41223
41248
  }
41224
41249
  const similar = _internals63.findSimilarCommands(targetCommand);
41225
- const { buildHelpText: fullHelp } = await import("./index-0543dz3t.js");
41250
+ const { buildHelpText: fullHelp } = await import("./index-hjkczwqm.js");
41226
41251
  if (similar.length > 0) {
41227
41252
  return `Command '/swarm ${targetCommand}' not found.
41228
41253
 
@@ -41361,7 +41386,7 @@ var COMMAND_REGISTRY = {
41361
41386
  },
41362
41387
  "guardrail explain": {
41363
41388
  handler: async (ctx) => {
41364
- const { handleGuardrailExplain } = await import("./guardrail-explain-3r26pm2s.js");
41389
+ const { handleGuardrailExplain } = await import("./guardrail-explain-g3tgjv9a.js");
41365
41390
  return handleGuardrailExplain(ctx.directory, ctx.args);
41366
41391
  },
41367
41392
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41371,7 +41396,7 @@ var COMMAND_REGISTRY = {
41371
41396
  },
41372
41397
  "guardrail-explain": {
41373
41398
  handler: async (ctx) => {
41374
- const { handleGuardrailExplain } = await import("./guardrail-explain-3r26pm2s.js");
41399
+ const { handleGuardrailExplain } = await import("./guardrail-explain-g3tgjv9a.js");
41375
41400
  return handleGuardrailExplain(ctx.directory, ctx.args);
41376
41401
  },
41377
41402
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41746,7 +41771,7 @@ Subcommands:
41746
41771
  handler: (ctx) => handleModeCommandWithBundledSkills(ctx, handlePrReviewCommand, "PR_REVIEW"),
41747
41772
  description: "Launch deep PR review with multi-lane analysis [url] [--council]",
41748
41773
  args: "<pr-url|owner/repo#N|N> [--council]",
41749
- details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs all 11 mandatory repository-agnostic micro-lanes without applicability waivers, validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).",
41774
+ details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, computes a depth tier (S/M/L) from the bound merge-base diff, launches the base explorer wave through dispatch_lanes_async (all 6 review dimensions covered on every PR \u2014 six singleton lanes at tier L, consolidated owned_workflow_lanes partitions at tiers S/M) while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, evaluates all 11 mandatory repository-agnostic risk families without applicability waivers (dedicated micro-lanes at tier L, consolidated sweeps at S/M), validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).",
41750
41775
  category: "agent",
41751
41776
  toolPolicy: "none"
41752
41777
  },
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-0y19k18q.js";
4
+ } from "./index-xq0etzbh.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-8etcyr9r.js";
@@ -83,7 +83,7 @@ import {
83
83
  handleWriteRetroCommand,
84
84
  normalizeSwarmCommandInput,
85
85
  resolveCommand
86
- } from "./index-hczdkknj.js";
86
+ } from "./index-fcsnw12w.js";
87
87
  import"./index-v4n224r1.js";
88
88
  import"./index-cpssctv1.js";
89
89
  import"./index-kk1scggc.js";
@@ -122,12 +122,12 @@ import"./index-2tn5h2zp.js";
122
122
  import"./index-1kz6da87.js";
123
123
  import"./index-w9cb5zwh.js";
124
124
  import"./index-4rhhvd1a.js";
125
- import"./index-0cz1ws47.js";
125
+ import"./index-ecxwhwz7.js";
126
126
  import"./index-2445sx3d.js";
127
127
  import"./index-z6xqpmqg.js";
128
128
  import"./index-zjygnfay.js";
129
129
  import"./index-zgwm4ryv.js";
130
- import"./index-mg54y5gc.js";
130
+ import"./index-40zn444p.js";
131
131
  import"./index-3x761jqv.js";
132
132
  import"./index-7mkpsw6g.js";
133
133
  import"./index-fsrp8wp3.js";
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-hczdkknj.js";
15
+ } from "./index-fcsnw12w.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
package/dist/cli/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-hczdkknj.js";
10
+ } from "./index-fcsnw12w.js";
11
11
  import"./index-v4n224r1.js";
12
12
  import"./index-cpssctv1.js";
13
13
  import"./index-kk1scggc.js";
@@ -43,12 +43,12 @@ import"./index-2tn5h2zp.js";
43
43
  import"./index-1kz6da87.js";
44
44
  import"./index-w9cb5zwh.js";
45
45
  import"./index-4rhhvd1a.js";
46
- import"./index-0cz1ws47.js";
46
+ import"./index-ecxwhwz7.js";
47
47
  import"./index-2445sx3d.js";
48
48
  import"./index-z6xqpmqg.js";
49
49
  import"./index-zjygnfay.js";
50
50
  import"./index-zgwm4ryv.js";
51
- import"./index-mg54y5gc.js";
51
+ import"./index-40zn444p.js";
52
52
  import"./index-3x761jqv.js";
53
53
  import"./index-7mkpsw6g.js";
54
54
  import"./index-fsrp8wp3.js";
@@ -9,7 +9,7 @@ import {
9
9
  readDelegations,
10
10
  recordPendingDelegation,
11
11
  sweepStaleDelegations
12
- } from "./index-0cz1ws47.js";
12
+ } from "./index-ecxwhwz7.js";
13
13
  import"./index-2445sx3d.js";
14
14
  import"./index-z6xqpmqg.js";
15
15
  import"./index-zjygnfay.js";
@@ -17,17 +17,19 @@ import {
17
17
  resolveGitControlStateDigest,
18
18
  resolveIsExactSingleChildCommit,
19
19
  resolveIsWorkingTreeClean,
20
+ resolvePrReviewDiffStats,
20
21
  resolvePrWorkflowRevisionDigest,
21
22
  resolvePrWorkflowRevisionDigestAsync,
22
23
  resolveRemoteRefsContainingHead,
23
24
  workspaceSnapshotMatches
24
- } from "./index-mg54y5gc.js";
25
+ } from "./index-40zn444p.js";
25
26
  import"./index-a76rekgs.js";
26
27
  export {
27
28
  workspaceSnapshotMatches,
28
29
  resolveRemoteRefsContainingHead,
29
30
  resolvePrWorkflowRevisionDigestAsync,
30
31
  resolvePrWorkflowRevisionDigest,
32
+ resolvePrReviewDiffStats,
31
33
  resolveIsWorkingTreeClean,
32
34
  resolveIsExactSingleChildCommit,
33
35
  resolveGitControlStateDigest,
@@ -525,7 +525,7 @@ export declare const COMMAND_REGISTRY: {
525
525
  readonly handler: (ctx: CommandContext) => CommandResult;
526
526
  readonly description: "Launch deep PR review with multi-lane analysis [url] [--council]";
527
527
  readonly args: "<pr-url|owner/repo#N|N> [--council]";
528
- readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, launches all 6 fixed base explorer lanes through dispatch_lanes_async while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, runs all 11 mandatory repository-agnostic micro-lanes without applicability waivers, validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
528
+ readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, computes a depth tier (S/M/L) from the bound merge-base diff, launches the base explorer wave through dispatch_lanes_async (all 6 review dimensions covered on every PR — six singleton lanes at tier L, consolidated owned_workflow_lanes partitions at tiers S/M) while the architect keeps doing non-dependent work, polls collect_lane_results incrementally, evaluates all 11 mandatory repository-agnostic risk families without applicability waivers (dedicated micro-lanes at tier L, consolidated sweeps at S/M), validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, then synthesizes only after coverage is closed. Failed obligations retry through the same structured async mode and exact PR head; blocking or direct-Task dispatch is not provenance-equivalent, so unclosed coverage leaves the review BLOCKED rather than degraded. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
529
529
  readonly category: "agent";
530
530
  readonly toolPolicy: "none";
531
531
  };