opencode-swarm 7.164.4 → 7.164.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 (91) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +12 -12
  2. package/dist/background/pending-delegations.d.ts +9 -2
  3. package/dist/background/pr-review-contract.d.ts +9 -0
  4. package/dist/cli/{coder-settlement-zzy2egsx.js → coder-settlement-6qgvzx40.js} +11 -11
  5. package/dist/cli/{config-doctor-62xd5far.js → config-doctor-d1cbh67h.js} +2 -2
  6. package/dist/cli/{core-7kdmc7h9.js → core-g0cvvj3b.js} +1 -1
  7. package/dist/cli/{curation-policy-913dnxqq.js → curation-policy-7f8x9yg6.js} +6 -6
  8. package/dist/cli/{curator-drift-3s3q4wsy.js → curator-drift-0r0scc8r.js} +4 -4
  9. package/dist/cli/curator-llm-factory-dw7md4nr.js +66 -0
  10. package/dist/cli/{curator-4s6ekk85.js → curator-q3qn89wn.js} +34 -34
  11. package/dist/cli/{evidence-summary-service-gw936xgz.js → evidence-summary-service-3meyb8rc.js} +15 -15
  12. package/dist/cli/{gate-evidence-4we18rhr.js → gate-evidence-mhc0w7vp.js} +7 -7
  13. package/dist/cli/guardrail-explain-6cbszhw1.js +67 -0
  14. package/dist/cli/{guardrail-log-9d4f09qt.js → guardrail-log-0nd1eqvz.js} +7 -7
  15. package/dist/cli/{guardrail-reset-1hpd6bkj.js → guardrail-reset-mzeyd6jh.js} +34 -34
  16. package/dist/cli/{hive-promoter-nr8dsxhe.js → hive-promoter-w7g879cm.js} +34 -34
  17. package/dist/cli/{index-pztdbtgw.js → index-12xzj0hm.js} +3 -3
  18. package/dist/cli/{index-k1m9214q.js → index-1dz8hv7p.js} +3 -3
  19. package/dist/cli/{index-rz87mx1c.js → index-2c3np82d.js} +1 -1
  20. package/dist/cli/{index-08e6x59x.js → index-4k16cz8r.js} +7 -7
  21. package/dist/cli/{index-4tgtbptw.js → index-59hvr3f4.js} +4 -4
  22. package/dist/cli/{index-wzmchqry.js → index-5p1tzpwh.js} +31 -52
  23. package/dist/cli/{index-x63jqvj3.js → index-6f9yvd67.js} +2 -2
  24. package/dist/cli/{index-x9ayhkkx.js → index-7v3bb0h3.js} +1 -1
  25. package/dist/cli/{index-qkwx4rrc.js → index-935ww10s.js} +185 -102
  26. package/dist/cli/{index-jba9jgse.js → index-9qvmsyab.js} +2 -2
  27. package/dist/cli/{index-nwpg81ke.js → index-ay9cr8tr.js} +1 -1
  28. package/dist/cli/{index-xj4kbtdw.js → index-b0m3efpf.js} +2 -2
  29. package/dist/cli/{index-tfa2p4y4.js → index-cyhw0der.js} +1 -1
  30. package/dist/cli/{index-vx28633q.js → index-ew99d4y6.js} +75 -23
  31. package/dist/cli/{index-gt6p21cs.js → index-fxxja498.js} +1 -1
  32. package/dist/cli/{index-0m94jsss.js → index-g5714mpv.js} +5 -5
  33. package/dist/cli/{index-ne38vr77.js → index-g94qqwnz.js} +2 -2
  34. package/dist/cli/{index-7zbk1e24.js → index-gwg7a00b.js} +9 -9
  35. package/dist/cli/{index-v7a8e7rv.js → index-hdapetg1.js} +2 -2
  36. package/dist/cli/{index-q9yz8da4.js → index-j3hsjynw.js} +5 -5
  37. package/dist/cli/{index-yx3xqb0w.js → index-j645xpsm.js} +3 -3
  38. package/dist/cli/{index-t2tqbq62.js → index-jzvrvdmr.js} +4 -4
  39. package/dist/cli/{index-k8vy89vm.js → index-kvb4dwgf.js} +1 -1
  40. package/dist/cli/{index-stj85yx1.js → index-p56xc59p.js} +2 -2
  41. package/dist/cli/{index-z408nj03.js → index-pvp5tnn2.js} +2 -2
  42. package/dist/cli/{index-cf54ftj1.js → index-qdbgc16x.js} +40 -7
  43. package/dist/cli/{index-eh2k07pp.js → index-rysxqae0.js} +7 -7
  44. package/dist/cli/{index-8fjx6k2s.js → index-t1nkr7cz.js} +1 -1
  45. package/dist/cli/{index-qfrrcdhj.js → index-tegp2mny.js} +1 -1
  46. package/dist/cli/{index-a0jhxx5q.js → index-ty3vtqe2.js} +12 -4
  47. package/dist/cli/{index-prammvxb.js → index-x6zyc38w.js} +1 -1
  48. package/dist/cli/{index-vzs3st30.js → index-x76mprg2.js} +10 -10
  49. package/dist/cli/{index-et9y4ga8.js → index-y4z0rhsa.js} +36 -36
  50. package/dist/cli/{index-1f4nandk.js → index-yh8wxegw.js} +1 -1
  51. package/dist/cli/{index-5k226hxp.js → index-ze5zyv28.js} +2 -2
  52. package/dist/cli/{index-tme2kjvq.js → index-zfwd65c2.js} +5 -5
  53. package/dist/cli/{index-0zbze3n6.js → index-zjg5ajf5.js} +1 -1
  54. package/dist/cli/{index-xjw7j7et.js → index-zypacgjc.js} +5 -5
  55. package/dist/cli/index.js +34 -34
  56. package/dist/cli/{knowledge-escalator-hp1ctjpe.js → knowledge-escalator-aca0nhqg.js} +13 -13
  57. package/dist/cli/{knowledge-events-0qrenmng.js → knowledge-events-n5t313ht.js} +11 -11
  58. package/dist/cli/{knowledge-link-f5g5d171.js → knowledge-link-8ea4ksda.js} +5 -5
  59. package/dist/cli/{knowledge-store-8er824g9.js → knowledge-store-j97ejf6a.js} +6 -6
  60. package/dist/cli/{knowledge-validator-0jd3htcj.js → knowledge-validator-01evhydg.js} +8 -8
  61. package/dist/cli/{pending-delegations-d1n5faxg.js → pending-delegations-w73abdk3.js} +6 -6
  62. package/dist/cli/{pr-subscriptions-s2b2yvbd.js → pr-subscriptions-05dzvavk.js} +6 -6
  63. package/dist/cli/{pr-workflow-gate-51s842yy.js → pr-workflow-gate-t0tnkx5f.js} +36 -34
  64. package/dist/cli/{runner-nkh65pcm.js → runner-fh7t0mn9.js} +6 -6
  65. package/dist/cli/{scan-cursor-gt55f3d6.js → scan-cursor-63zx2qd8.js} +7 -7
  66. package/dist/cli/{schema-rpdz901j.js → schema-t1scx08g.js} +5 -1
  67. package/dist/cli/{scope-persistence-js1ywq04.js → scope-persistence-1a5qmchf.js} +9 -9
  68. package/dist/cli/{skill-generator-xsxes2w0.js → skill-generator-7werbwgv.js} +15 -15
  69. package/dist/cli/{telemetry-9tfts5q2.js → telemetry-j14cj552.js} +1 -1
  70. package/dist/cli/{worktree-collision-ownership-54ca6mb8.js → worktree-collision-ownership-wzdzky33.js} +7 -7
  71. package/dist/cli/{worktree-isolation-haesnft8.js → worktree-isolation-m02ay3kg.js} +34 -34
  72. package/dist/config/index.d.ts +3 -3
  73. package/dist/config/loader.d.ts +34 -1
  74. package/dist/config/schema.d.ts +61 -7
  75. package/dist/hooks/delegation-gate.d.ts +3 -1
  76. package/dist/hooks/pr-workflow-gate.d.ts +10 -2
  77. package/dist/index.js +80 -77
  78. package/dist/pr-review/authorization.d.ts +13 -3
  79. package/dist/tools/authorize-pr-review-reentry.d.ts +5 -4
  80. package/dist/tools/build-check.d.ts +8 -0
  81. package/dist/tools/dispatch-lanes.d.ts +1 -0
  82. package/dist/tools/placeholder-scan.d.ts +10 -1
  83. package/dist/tools/pr-workflow-status.d.ts +2 -0
  84. package/dist/tools/pre-check-batch.d.ts +20 -8
  85. package/dist/tools/quality-budget.d.ts +2 -0
  86. package/dist/tools/sast-scan.d.ts +10 -2
  87. package/dist/tools/sbom-generate.d.ts +14 -0
  88. package/dist/tools/syntax-check.d.ts +11 -3
  89. package/package.json +1 -1
  90. package/dist/cli/curator-llm-factory-q3t3r632.js +0 -66
  91. package/dist/cli/guardrail-explain-jjbnrcqn.js +0 -67
@@ -82,9 +82,9 @@ declare function reentryAuthorizationFilePath(directory: string, sessionID: stri
82
82
  declare function renameWithRetryAsync(tempPath: string, targetPath: string): Promise<void>;
83
83
  declare function writeAuthorizationFile(filePath: string, file: AuthorizationFile): Promise<void>;
84
84
  /**
85
- * Drop expired records past the retention bound; keep newest first. A burst
86
- * of consumed records must never evict a still-live unconsumed authorization
87
- * before its TTL, so unconsumed records take priority within the cap.
85
+ * Drop expired records past the retention bound while preserving every live
86
+ * authorization. Consumed records are retained only as same-call replay
87
+ * evidence, so they fill the remaining bounded capacity after live records.
88
88
  */
89
89
  declare function pruneAuthorizations(records: readonly PrReviewReentryAuthorizationRecord[], nowMs: number): PrReviewReentryAuthorizationRecord[];
90
90
  /**
@@ -99,6 +99,15 @@ export declare function issuePrReviewReentryAuthorization(directory: string, ses
99
99
  role: PrReviewReentryRole;
100
100
  }): Promise<PrReviewReentryAuthorizationRecord>;
101
101
  declare function authorizationMatchesBinding(record: PrReviewReentryAuthorizationRecord, binding: PrReviewReentryBindingContext): boolean;
102
+ /**
103
+ * Read-only admission check for the PR workflow hook. The workflow-session
104
+ * lock is held by the caller while this authorization-store lock is acquired,
105
+ * so the binding used for the check cannot change underneath the read. The
106
+ * token remains unconsumed until the delegation gate has accepted the Task.
107
+ */
108
+ export declare function hasPrReviewReentryAuthorizationAgainstBinding(directory: string, sessionID: string, request: {
109
+ role: PrReviewReentryRole;
110
+ }, binding: PrReviewReentryBindingContext): Promise<boolean>;
102
111
  /**
103
112
  * Reserve or verify one authorization against a binding whose owning workflow
104
113
  * lock is held by the caller. The authorization-file lock is always acquired
@@ -115,6 +124,7 @@ export declare const _internals: {
115
124
  reentryAuthorizationFilePath: typeof reentryAuthorizationFilePath;
116
125
  pruneAuthorizations: typeof pruneAuthorizations;
117
126
  authorizationMatchesBinding: typeof authorizationMatchesBinding;
127
+ hasPrReviewReentryAuthorizationAgainstBinding: typeof hasPrReviewReentryAuthorizationAgainstBinding;
118
128
  /** DI seam: the rename implementation (tests inject failure modes). */
119
129
  renameImpl: (from: string, to: string) => Promise<void>;
120
130
  /** DI seam: retry backoff schedule (tests shrink to avoid real sleeps). */
@@ -9,10 +9,11 @@ import { createSwarmTool } from './create-tool.js';
9
9
  * requirement; every other delegation gate stays authoritative. Bindings are
10
10
  * exact (session, workflow, run, head SHA, worktree revision digest, role,
11
11
  * gate generation): replay, cross-session use, wrong role, expiry, or any
12
- * workflow progress since issuance fails closed. A Task the delegation gate
13
- * later rejects for an unrelated reason still burns the authorization
14
- * issue a fresh one before retrying. Issue immediately before the Task
15
- * dispatchauthorizations are not stockpilable.
12
+ * workflow progress since issuance fails closed. If a plan or task workflow
13
+ * state exists, the dispatch must identify the exact task; taskless dispatches
14
+ * are limited to plan-free standalone review. A later unrelated gate rejection
15
+ * still burns the authorization issue a fresh one before retrying. Issue
16
+ * immediately before the Task dispatch — authorizations are not stockpilable.
16
17
  */
17
18
  export declare function executeAuthorizePrReviewReentry(args: unknown, directory: string, context?: {
18
19
  sessionID?: string;
@@ -5,7 +5,15 @@
5
5
  */
6
6
  import type { tool } from '@opencode-ai/plugin';
7
7
  import { type BuildDiscoverySkip } from '../build/discovery';
8
+ import { loadGateOverrides } from '../config';
8
9
  import type { EvidenceVerdict } from '../config/evidence-schema';
10
+ /**
11
+ * DI seam (issue #2524): the tool boundary self-loads the user's gate
12
+ * overrides; tests substitute this instead of touching the config loader.
13
+ */
14
+ export declare const _internals: {
15
+ loadGateOverrides: typeof loadGateOverrides;
16
+ };
9
17
  export declare const DEFAULT_TIMEOUT_MS = 300000;
10
18
  export declare const MAX_OUTPUT_BYTES: number;
11
19
  export declare const MAX_OUTPUT_LINES = 100;
@@ -676,6 +676,7 @@ declare function applyExplorerFormatSuffix(lanes: DispatchLaneSpec[], options?:
676
676
  declare function prReviewLaneResponseBudgetChars(mode: string, lane: DispatchLaneSpec): number | undefined;
677
677
  declare function applyPrWorkflowPromptContract(lanes: DispatchLaneSpec[], options: {
678
678
  mode?: string;
679
+ batchId?: string;
679
680
  prHeadSha?: string;
680
681
  revisionDigest?: string;
681
682
  scope?: string;
@@ -1,4 +1,6 @@
1
1
  import type { tool } from '@opencode-ai/plugin';
2
+ import type { GateConfigOverrides } from '../config';
3
+ import { loadGateOverrides } from '../config';
2
4
  import type { EvidenceVerdict } from '../config/evidence-schema';
3
5
  import { saveEvidence } from '../evidence/manager';
4
6
  export interface PlaceholderScanInput {
@@ -35,6 +37,12 @@ export interface PlaceholderScanResult {
35
37
  files_scanned: number;
36
38
  findings_count: number;
37
39
  files_with_findings: number;
40
+ /**
41
+ * Present only when the gate was skipped via
42
+ * `gates.placeholder_scan.enabled: false` (issue #2524) — distinguishes
43
+ * a config-disabled run from a genuinely clean scan.
44
+ */
45
+ disabled_reason?: string;
38
46
  };
39
47
  }
40
48
  /**
@@ -92,7 +100,7 @@ declare function collectNonStubBodyLines(rootNode: any): Set<number>;
92
100
  /**
93
101
  * Scan files for placeholder content (TODO/FIXME comments, stub implementations, etc.)
94
102
  */
95
- export declare function placeholderScan(input: PlaceholderScanInput, directory: string): Promise<PlaceholderScanResult>;
103
+ export declare function placeholderScan(input: PlaceholderScanInput, directory: string, gateOverrides?: GateConfigOverrides['placeholder_scan']): Promise<PlaceholderScanResult>;
96
104
  export declare const placeholder_scan: ReturnType<typeof tool>;
97
105
  /**
98
106
  * Internal seam for direct testing of the body-shape walker without
@@ -105,5 +113,6 @@ export declare const _internals: {
105
113
  isStubSkeletonFunction: typeof isStubSkeletonFunction;
106
114
  isConstantLiteralNode: typeof isConstantLiteralNode;
107
115
  saveEvidence: typeof saveEvidence;
116
+ loadGateOverrides: typeof loadGateOverrides;
108
117
  };
109
118
  export {};
@@ -17,6 +17,7 @@ declare function truncateToByteBudget(value: string, maxBytes: number): string;
17
17
  * finally. Never runs a PR-controlled script — only fixed read verbs are passed.
18
18
  */
19
19
  declare function runGitCapture(directory: string, args: string[]): Promise<string | null>;
20
+ declare function resolveWorkflowGateSession(directory: string, sessionID: string): Promise<string | null>;
20
21
  export declare const pr_workflow_status: ReturnType<typeof createSwarmTool>;
21
22
  /** Test seam mirroring gh-evidence's `_internals` (issue #507 DI convention). */
22
23
  export declare const _internals: {
@@ -26,5 +27,6 @@ export declare const _internals: {
26
27
  runGitCapture: typeof runGitCapture;
27
28
  classifyGitState: typeof classifyPrWorkflowGitState;
28
29
  truncateToByteBudget: typeof truncateToByteBudget;
30
+ resolveWorkflowGateSession: typeof resolveWorkflowGateSession;
29
31
  };
30
32
  export {};
@@ -4,7 +4,8 @@
4
4
  * Returns unified result with gates_passed status
5
5
  */
6
6
  import type { tool } from '@opencode-ai/plugin';
7
- import type { PluginConfig } from '../config';
7
+ import type { GateConfigOverrides, PluginConfig } from '../config';
8
+ import { loadGateOverrides } from '../config';
8
9
  import { saveEvidence } from '../evidence/manager.js';
9
10
  import { runExternalTool } from '../utils/external-tool-runner';
10
11
  import type { LintResult, ResolvedLinterCommand } from './lint';
@@ -30,6 +31,7 @@ export declare const _internals: {
30
31
  serializePreCheckResult: typeof serializePreCheckResult;
31
32
  resolveGatePreamble: typeof resolveGatePreamble;
32
33
  runPreCheckBatch: typeof runPreCheckBatch;
34
+ loadGateOverrides: typeof loadGateOverrides;
33
35
  MAX_COMBINED_BYTES: number;
34
36
  };
35
37
  export interface PreCheckBatchInput {
@@ -39,12 +41,22 @@ export interface PreCheckBatchInput {
39
41
  directory: string;
40
42
  /** SAST severity threshold (default: medium) */
41
43
  sast_threshold?: 'low' | 'medium' | 'high' | 'critical';
42
- /** Optional plugin config */
44
+ /**
45
+ * Optional legacy plugin-config carrier for the gates slices. The public
46
+ * tool boundary no longer populates it (agents cannot pass config); direct
47
+ * callers/tests may. `gates` below takes precedence.
48
+ * @deprecated prefer the `gates` field (issue #2524).
49
+ */
43
50
  config?: PluginConfig;
51
+ /**
52
+ * User-written gate overrides (issue #2524) — loaded from the project/user
53
+ * config files by the public tool boundary via `loadGateOverrides`.
54
+ */
55
+ gates?: GateConfigOverrides;
44
56
  /**
45
57
  * Current phase number (positive integer >= 1).
46
- * When provided, enables SAST baseline diffing: only findings absent from the
47
- * phase-scoped baseline (.swarm/evidence/{phase}/sast-baseline.json) drive the
58
+ * When provided, enables SAST baseline diffing: only findings absent from
59
+ * the phase-scoped baseline (.swarm/evidence/{phase}/sast-baseline.json) drive the
48
60
  * fail verdict. Capture the baseline before first coder delegation via sast_scan
49
61
  * with capture_baseline:true.
50
62
  */
@@ -103,7 +115,7 @@ declare function runWithTimeout<T>(operation: (abortSignal: AbortSignal) => Prom
103
115
  /**
104
116
  * Run lint with detection and timeout
105
117
  */
106
- declare function runLintWrapped(files: string[] | undefined, directory: string, _config?: PluginConfig, abortSignal?: AbortSignal): Promise<ToolResult<LintResult>>;
118
+ declare function runLintWrapped(files: string[] | undefined, directory: string, _gates?: GateConfigOverrides, abortSignal?: AbortSignal): Promise<ToolResult<LintResult>>;
107
119
  /**
108
120
  * Run lint on specific files only
109
121
  */
@@ -111,15 +123,15 @@ declare function runLintOnFiles(resolvedLinter: ResolvedLinterCommand, files: st
111
123
  /**
112
124
  * Run secretscan with timeout
113
125
  */
114
- declare function runSecretscanWrapped(files: string[] | undefined, directory: string, _config?: PluginConfig, abortSignal?: AbortSignal): Promise<ToolResult<SecretscanResult | SecretscanErrorResult>>;
126
+ declare function runSecretscanWrapped(files: string[] | undefined, directory: string, _gates?: GateConfigOverrides, abortSignal?: AbortSignal): Promise<ToolResult<SecretscanResult | SecretscanErrorResult>>;
115
127
  /**
116
128
  * Run SAST scan with timeout
117
129
  */
118
- declare function runSastScanWrapped(changedFiles: string[], directory: string, severityThreshold: 'low' | 'medium' | 'high' | 'critical', config?: PluginConfig, phase?: number, abortSignal?: AbortSignal): Promise<ToolResult<SastScanResult>>;
130
+ declare function runSastScanWrapped(changedFiles: string[], directory: string, severityThreshold: 'low' | 'medium' | 'high' | 'critical', gates?: GateConfigOverrides, phase?: number, abortSignal?: AbortSignal): Promise<ToolResult<SastScanResult>>;
119
131
  /**
120
132
  * Run quality budget with timeout
121
133
  */
122
- declare function runQualityBudgetWrapped(changedFiles: string[], directory: string, config?: PluginConfig, abortSignal?: AbortSignal): Promise<ToolResult<QualityBudgetResult>>;
134
+ declare function runQualityBudgetWrapped(changedFiles: string[], directory: string, gates?: GateConfigOverrides, abortSignal?: AbortSignal): Promise<ToolResult<QualityBudgetResult>>;
123
135
  /**
124
136
  * Parse unified diff output (with -U0) to extract added/modified line numbers per file.
125
137
  * Returns a Map from normalised file path → Set of changed line numbers.
@@ -1,4 +1,5 @@
1
1
  import type { tool } from '@opencode-ai/plugin';
2
+ import { loadGateOverrides } from '../config';
2
3
  import type { QualityBudgetConfig } from '../config/schema';
3
4
  import { computeQualityMetrics, type QualityMetrics, type QualityViolation } from '../quality/metrics';
4
5
  export interface QualityBudgetInput {
@@ -31,4 +32,5 @@ export declare const quality_budget: ReturnType<typeof tool>;
31
32
  export declare const _internals: {
32
33
  qualityBudget: typeof qualityBudget;
33
34
  computeQualityMetrics: typeof computeQualityMetrics;
35
+ loadGateOverrides: typeof loadGateOverrides;
34
36
  };
@@ -3,7 +3,8 @@
3
3
  * Integrates Tier A rules (offline) and optional Semgrep (Tier B)
4
4
  */
5
5
  import type { ToolDefinition } from '@opencode-ai/plugin/tool';
6
- import type { PluginConfig } from '../config';
6
+ import type { GateConfigOverrides } from '../config';
7
+ import { loadGateOverrides } from '../config';
7
8
  import type { EvidenceVerdict } from '../config/evidence-schema';
8
9
  import { checkSemgrepAvailable, isSemgrepAvailable, runSemgrep } from '../sast/semgrep';
9
10
  export interface SastScanInput {
@@ -56,6 +57,12 @@ export interface SastScanResult {
56
57
  findings: SastScanFinding[];
57
58
  /** Summary information */
58
59
  summary: {
60
+ /**
61
+ * Present only when the gate was skipped via
62
+ * `gates.sast_scan.enabled: false` (issue #2524) — distinguishes a
63
+ * config-disabled run from a genuinely clean scan.
64
+ */
65
+ disabled_reason?: string;
59
66
  /** Engine used for scanning */
60
67
  engine: 'tier_a' | 'tier_a+tier_b';
61
68
  /** Number of files scanned */
@@ -121,7 +128,7 @@ export interface SastScanFinding {
121
128
  * - Tier A: Built-in pattern-based rules (always runs)
122
129
  * - Tier B: Semgrep (optional, if available on PATH)
123
130
  */
124
- export declare function sastScan(input: SastScanInput, directory: string, config?: PluginConfig): Promise<SastScanResult>;
131
+ export declare function sastScan(input: SastScanInput, directory: string, gates?: GateConfigOverrides): Promise<SastScanResult>;
125
132
  /**
126
133
  * SAST Scan tool - Static Application Security Testing
127
134
  * Scans changed files for security vulnerabilities using:
@@ -139,4 +146,5 @@ export declare const _internals: {
139
146
  checkSemgrepAvailable: typeof checkSemgrepAvailable;
140
147
  isSemgrepAvailable: typeof isSemgrepAvailable;
141
148
  runSemgrep: typeof runSemgrep;
149
+ loadGateOverrides: typeof loadGateOverrides;
142
150
  };
@@ -5,6 +5,14 @@
5
5
  * for manifest/lock files and generating CycloneDX format output.
6
6
  */
7
7
  import type { tool } from '@opencode-ai/plugin';
8
+ import { loadGateOverrides } from '../config';
9
+ /**
10
+ * DI seam (issue #2524): the tool boundary self-loads the user's gate
11
+ * overrides; tests substitute this instead of touching the config loader.
12
+ */
13
+ export declare const _internals: {
14
+ loadGateOverrides: typeof loadGateOverrides;
15
+ };
8
16
  export interface SbomGenerateInput {
9
17
  /** Scope of the scan: 'changed' for modified files only, 'all' for entire project */
10
18
  scope: 'changed' | 'all';
@@ -22,5 +30,11 @@ export interface SbomGenerateResult {
22
30
  components_count: number;
23
31
  /** Path to the generated SBOM file */
24
32
  output_path: string;
33
+ /**
34
+ * Present only when the gate was skipped because the user disabled it via
35
+ * `gates.sbom_generate.enabled: false` (issue #2524) — distinguishes a
36
+ * config skip from "no manifests found".
37
+ */
38
+ disabled_reason?: string;
25
39
  }
26
40
  export declare const sbom_generate: ReturnType<typeof tool>;
@@ -1,6 +1,14 @@
1
1
  import type { tool } from '@opencode-ai/plugin';
2
- import type { PluginConfig } from '../config';
2
+ import type { GateConfigOverrides } from '../config';
3
+ import { loadGateOverrides } from '../config';
3
4
  import type { EvidenceVerdict } from '../config/evidence-schema';
5
+ /**
6
+ * DI seam (issue #2524): the tool boundary self-loads the user's gate
7
+ * overrides; tests substitute this instead of touching the config loader.
8
+ */
9
+ export declare const _internals: {
10
+ loadGateOverrides: typeof loadGateOverrides;
11
+ };
4
12
  export interface SyntaxCheckInput {
5
13
  /** Files to check (from diff gate) */
6
14
  changed_files: Array<{
@@ -31,7 +39,7 @@ export interface SyntaxCheckResult {
31
39
  /**
32
40
  * Run syntax check on changed files
33
41
  *
34
- * Respects config.gates.syntax_check.enabled - returns skipped if disabled
42
+ * Respects gates.syntax_check.enabled - returns skipped if disabled
35
43
  */
36
- export declare function syntaxCheck(input: SyntaxCheckInput, directory: string, config?: PluginConfig): Promise<SyntaxCheckResult>;
44
+ export declare function syntaxCheck(input: SyntaxCheckInput, directory: string, gates?: GateConfigOverrides): Promise<SyntaxCheckResult>;
37
45
  export declare const syntax_check: ReturnType<typeof tool>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.164.4",
3
+ "version": "7.164.6",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,66 +0,0 @@
1
- // @bun
2
- import {
3
- createCuratorLLMDelegate
4
- } from "./index-qkwx4rrc.js";
5
- import"./index-x9ayhkkx.js";
6
- import"./index-pztdbtgw.js";
7
- import"./index-k8vy89vm.js";
8
- import"./index-vzs3st30.js";
9
- import"./index-jba9jgse.js";
10
- import"./index-txdagbh7.js";
11
- import"./index-3146wmgv.js";
12
- import"./index-4tgtbptw.js";
13
- import"./index-xjw7j7et.js";
14
- import"./index-x63jqvj3.js";
15
- import"./index-70ha9e09.js";
16
- import"./index-1f4nandk.js";
17
- import"./index-0zbze3n6.js";
18
- import"./index-zaab1wz9.js";
19
- import"./index-tme2kjvq.js";
20
- import"./index-zsrtt42s.js";
21
- import"./index-08e6x59x.js";
22
- import"./index-3f7hqtgg.js";
23
- import"./index-xj4kbtdw.js";
24
- import"./index-t2tqbq62.js";
25
- import"./index-prammvxb.js";
26
- import"./index-rtry5xyf.js";
27
- import"./index-0m94jsss.js";
28
- import"./index-8fjx6k2s.js";
29
- import"./index-cf54ftj1.js";
30
- import"./index-ddszzne4.js";
31
- import"./index-q9yz8da4.js";
32
- import"./index-yx3xqb0w.js";
33
- import"./index-z408nj03.js";
34
- import"./index-556ja8an.js";
35
- import"./index-4fwbbad3.js";
36
- import"./index-b43rt5ph.js";
37
- import"./index-q7sjgr1y.js";
38
- import"./index-eh2k07pp.js";
39
- import"./index-7zbk1e24.js";
40
- import"./index-v7a8e7rv.js";
41
- import"./index-zg9d392c.js";
42
- import"./index-n832052r.js";
43
- import"./index-rz87mx1c.js";
44
- import"./index-z6xqpmqg.js";
45
- import"./index-r3mvsbtq.js";
46
- import"./index-vx28633q.js";
47
- import"./index-wzmchqry.js";
48
- import"./index-9e6fdz2h.js";
49
- import"./index-4rhhvd1a.js";
50
- import"./index-stj85yx1.js";
51
- import"./index-m1nrd3yd.js";
52
- import"./index-zjygnfay.js";
53
- import"./index-ae75rja9.js";
54
- import"./index-qfrrcdhj.js";
55
- import"./index-5k226hxp.js";
56
- import"./index-bk5tah7q.js";
57
- import"./index-gt6p21cs.js";
58
- import"./index-tfa2p4y4.js";
59
- import"./index-k1m9214q.js";
60
- import"./index-7g4c7s5r.js";
61
- import"./index-bpmtbmy9.js";
62
- import"./index-zgwm4ryv.js";
63
- import"./index-a76rekgs.js";
64
- export {
65
- createCuratorLLMDelegate
66
- };
@@ -1,67 +0,0 @@
1
- // @bun
2
- import {
3
- handleGuardrailExplain
4
- } from "./index-ne38vr77.js";
5
- import"./index-qkwx4rrc.js";
6
- import"./index-x9ayhkkx.js";
7
- import"./index-pztdbtgw.js";
8
- import"./index-k8vy89vm.js";
9
- import"./index-vzs3st30.js";
10
- import"./index-jba9jgse.js";
11
- import"./index-txdagbh7.js";
12
- import"./index-3146wmgv.js";
13
- import"./index-4tgtbptw.js";
14
- import"./index-xjw7j7et.js";
15
- import"./index-x63jqvj3.js";
16
- import"./index-70ha9e09.js";
17
- import"./index-1f4nandk.js";
18
- import"./index-0zbze3n6.js";
19
- import"./index-zaab1wz9.js";
20
- import"./index-tme2kjvq.js";
21
- import"./index-zsrtt42s.js";
22
- import"./index-08e6x59x.js";
23
- import"./index-3f7hqtgg.js";
24
- import"./index-xj4kbtdw.js";
25
- import"./index-t2tqbq62.js";
26
- import"./index-prammvxb.js";
27
- import"./index-rtry5xyf.js";
28
- import"./index-0m94jsss.js";
29
- import"./index-8fjx6k2s.js";
30
- import"./index-cf54ftj1.js";
31
- import"./index-ddszzne4.js";
32
- import"./index-q9yz8da4.js";
33
- import"./index-yx3xqb0w.js";
34
- import"./index-z408nj03.js";
35
- import"./index-556ja8an.js";
36
- import"./index-4fwbbad3.js";
37
- import"./index-b43rt5ph.js";
38
- import"./index-q7sjgr1y.js";
39
- import"./index-eh2k07pp.js";
40
- import"./index-7zbk1e24.js";
41
- import"./index-v7a8e7rv.js";
42
- import"./index-zg9d392c.js";
43
- import"./index-n832052r.js";
44
- import"./index-rz87mx1c.js";
45
- import"./index-z6xqpmqg.js";
46
- import"./index-r3mvsbtq.js";
47
- import"./index-vx28633q.js";
48
- import"./index-wzmchqry.js";
49
- import"./index-9e6fdz2h.js";
50
- import"./index-4rhhvd1a.js";
51
- import"./index-stj85yx1.js";
52
- import"./index-m1nrd3yd.js";
53
- import"./index-zjygnfay.js";
54
- import"./index-ae75rja9.js";
55
- import"./index-qfrrcdhj.js";
56
- import"./index-5k226hxp.js";
57
- import"./index-bk5tah7q.js";
58
- import"./index-gt6p21cs.js";
59
- import"./index-tfa2p4y4.js";
60
- import"./index-k1m9214q.js";
61
- import"./index-7g4c7s5r.js";
62
- import"./index-bpmtbmy9.js";
63
- import"./index-zgwm4ryv.js";
64
- import"./index-a76rekgs.js";
65
- export {
66
- handleGuardrailExplain
67
- };