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,13 +1,47 @@
1
1
  import * as fsp from 'node:fs/promises';
2
- import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
2
+ import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrReviewDiffStats, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
3
3
  export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
4
4
  export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: readonly ["auth-identity-secrets", "untrusted-input-boundaries", "subprocess-platform", "concurrency-state", "dependencies-build-release", "api-schema-migrations", "test-infrastructure", "ui-accessibility-i18n", "privacy-observability", "generated-provenance", "unclassified-risk"];
5
5
  export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
6
6
  export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
7
+ export type PrReviewDepthTier = 'S' | 'M' | 'L';
8
+ /**
9
+ * Objective size thresholds for the controller-computed PR-review depth tier.
10
+ * Risk-trigger escalation is semantic and stays caller-side: callers may
11
+ * always dispatch more lanes than a tier's floor, never fewer.
12
+ */
13
+ export declare const PR_REVIEW_DEPTH_TIER_THRESHOLDS: {
14
+ readonly smallMaxChangedLines: 50;
15
+ readonly smallMaxChangedFiles: 3;
16
+ readonly mediumMaxChangedLines: 500;
17
+ readonly mediumMaxChangedFiles: 20;
18
+ };
19
+ /**
20
+ * Minimum initial base-wave lane counts per depth tier. Tier L preserves the
21
+ * historical exact-six singleton wave; S/M permit consolidated lanes that own
22
+ * multiple dimensions while every dimension stays mandatory to evaluate.
23
+ */
24
+ export declare const PR_REVIEW_BASE_LANE_FLOORS: Record<PrReviewDepthTier, number>;
25
+ /**
26
+ * Unknown or uncomputable diff size fails strict to the deepest tier, as does
27
+ * any range containing a submodule pointer change: git's numstat reports a
28
+ * gitlink bump as a fixed 1-added/1-deleted row regardless of the referenced
29
+ * repository's actual diff size, so no line/file threshold can bound it.
30
+ */
31
+ export declare function computePrReviewDepthTier(stats: {
32
+ changedLines: number;
33
+ changedFiles: number;
34
+ hasSubmoduleChange?: boolean;
35
+ } | null | undefined): PrReviewDepthTier;
7
36
  export interface PrWorkflowLaneSpec {
8
37
  laneId?: string;
9
38
  workflowLane?: string;
10
39
  reviewItemIds?: string[];
40
+ /**
41
+ * Complete dimension/family set this lane covers under a consolidated depth
42
+ * tier. Must contain workflowLane. Absent means the singleton [workflowLane].
43
+ */
44
+ ownedWorkflowLanes?: string[];
11
45
  }
12
46
  export interface PrFeedbackLaneOwnership {
13
47
  laneId: string;
@@ -18,6 +52,7 @@ interface PrReviewBaseDispatchRecord {
18
52
  lanes: Array<{
19
53
  laneId: string;
20
54
  workflowLane: PrReviewBaseDimensionId;
55
+ ownedWorkflowLanes?: PrReviewBaseDimensionId[];
21
56
  }>;
22
57
  validatedAt: string;
23
58
  }
@@ -115,6 +150,14 @@ export interface PrWorkflowGateState {
115
150
  prHeadSha?: string;
116
151
  prReviewBaseRef?: string;
117
152
  prReviewBaseSha?: string;
153
+ /** Controller-computed size tier for the bound merge-base scope. */
154
+ prReviewDepthTier?: PrReviewDepthTier;
155
+ /** Audit record of the bounded numstat totals behind prReviewDepthTier. */
156
+ prReviewDiffStats?: {
157
+ changedLines: number;
158
+ changedFiles: number;
159
+ hasSubmoduleChange: boolean;
160
+ };
118
161
  prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
119
162
  /** @deprecated Compatibility projection of the most recent base dispatch. */
120
163
  prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
@@ -188,7 +231,18 @@ export declare function bindPrReviewBase(directory: string, sessionID: string, o
188
231
  baseRef: string;
189
232
  baseSha: string;
190
233
  }): Promise<PrWorkflowGateState>;
191
- /** Prove that caller-provided PR identity equals the actual checked-out commit. */
234
+ /**
235
+ * Prove that caller-provided PR identity equals the actual checked-out commit.
236
+ *
237
+ * Two distinct failure modes are reported with separate, diagnostic-rich
238
+ * messages (issue #1931): a null HEAD means Git could not resolve HEAD at all
239
+ * (the directory may not be a repository, HEAD may be unborn, the commit may
240
+ * be missing from a shallow clone, the `git` binary may not be on PATH, or
241
+ * the bounded Git invocation may have timed out); a non-matching HEAD means
242
+ * a different commit is checked out. Both messages name `directory` and the
243
+ * exact remediation command so callers can self-diagnose instead of
244
+ * cascading into fictional root causes.
245
+ */
192
246
  export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): string;
193
247
  /** Prove that every PR-review lane reads the immutable checked-out PR tree. */
194
248
  export declare function assertPrReviewCleanCheckout(directory: string, mode?: PrWorkflowMode): void;
@@ -274,6 +328,7 @@ export declare const _test_exports: {
274
328
  resolveCommitCountSince: typeof resolveCommitCountSince;
275
329
  resolveIsWorkingTreeClean: typeof resolveIsWorkingTreeClean;
276
330
  resolveIsExactSingleChildCommit: typeof resolveIsExactSingleChildCommit;
331
+ resolvePrReviewDiffStats: typeof resolvePrReviewDiffStats;
277
332
  resolvePrWorkflowRevisionDigest: typeof resolvePrWorkflowRevisionDigest;
278
333
  resolveRemoteRefsContainingHead: typeof resolveRemoteRefsContainingHead;
279
334
  parseCriticVerdict: typeof parseCriticVerdict;