opencode-swarm 7.164.4 → 7.164.5
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.
- package/dist/cli/{coder-settlement-zzy2egsx.js → coder-settlement-x9wbqx46.js} +8 -8
- package/dist/cli/{config-doctor-62xd5far.js → config-doctor-axd9d6hs.js} +2 -2
- package/dist/cli/{core-7kdmc7h9.js → core-f1a1fk13.js} +1 -1
- package/dist/cli/{curation-policy-913dnxqq.js → curation-policy-2cy7wejw.js} +5 -5
- package/dist/cli/{curator-4s6ekk85.js → curator-b104f7a7.js} +29 -29
- package/dist/cli/{curator-llm-factory-q3t3r632.js → curator-llm-factory-cv7ft0mb.js} +29 -29
- package/dist/cli/{evidence-summary-service-gw936xgz.js → evidence-summary-service-5xsjs3x3.js} +12 -12
- package/dist/cli/{gate-evidence-4we18rhr.js → gate-evidence-ypja4156.js} +5 -5
- package/dist/cli/{guardrail-explain-jjbnrcqn.js → guardrail-explain-cvha7b9p.js} +30 -30
- package/dist/cli/{guardrail-log-9d4f09qt.js → guardrail-log-6t4e2j5f.js} +6 -6
- package/dist/cli/{guardrail-reset-1hpd6bkj.js → guardrail-reset-es0bg976.js} +29 -29
- package/dist/cli/{hive-promoter-nr8dsxhe.js → hive-promoter-yzv5g7jy.js} +29 -29
- package/dist/cli/{index-7zbk1e24.js → index-0trtcm9n.js} +8 -8
- package/dist/cli/{index-stj85yx1.js → index-164m995b.js} +1 -1
- package/dist/cli/{index-k1m9214q.js → index-1dz8hv7p.js} +3 -3
- package/dist/cli/{index-k8vy89vm.js → index-1q2dwv69.js} +1 -1
- package/dist/cli/{index-x9ayhkkx.js → index-25jze7sf.js} +1 -1
- package/dist/cli/{index-qfrrcdhj.js → index-25z5qwkk.js} +1 -1
- package/dist/cli/{index-qkwx4rrc.js → index-3gb7bw7h.js} +80 -69
- package/dist/cli/{index-ne38vr77.js → index-3rrc5x4v.js} +2 -2
- package/dist/cli/{index-5k226hxp.js → index-4emx8hhh.js} +1 -1
- package/dist/cli/{index-v7a8e7rv.js → index-4jmtdtm9.js} +2 -2
- package/dist/cli/{index-jba9jgse.js → index-4krjn1gn.js} +2 -2
- package/dist/cli/{index-z408nj03.js → index-50s9q4c1.js} +2 -2
- package/dist/cli/{index-vx28633q.js → index-553veay1.js} +75 -23
- package/dist/cli/{index-4tgtbptw.js → index-7rat6nyh.js} +3 -3
- package/dist/cli/{index-q9yz8da4.js → index-8h9nng7f.js} +4 -4
- package/dist/cli/{index-x63jqvj3.js → index-aaqbhn9h.js} +2 -2
- package/dist/cli/{index-nwpg81ke.js → index-aper29nf.js} +1 -1
- package/dist/cli/{index-pztdbtgw.js → index-ea7sehgy.js} +3 -3
- package/dist/cli/{index-cf54ftj1.js → index-er8ba9be.js} +3 -3
- package/dist/cli/{index-08e6x59x.js → index-fwebva1m.js} +5 -5
- package/dist/cli/{index-gt6p21cs.js → index-fxxja498.js} +1 -1
- package/dist/cli/{index-prammvxb.js → index-hnjkpk57.js} +1 -1
- package/dist/cli/{index-8fjx6k2s.js → index-j9a4fsxg.js} +1 -1
- package/dist/cli/{index-vzs3st30.js → index-maxz22c1.js} +7 -7
- package/dist/cli/{index-eh2k07pp.js → index-q0gtgwyr.js} +6 -6
- package/dist/cli/{index-t2tqbq62.js → index-rc6hec4j.js} +4 -4
- package/dist/cli/{index-xjw7j7et.js → index-s09b63xg.js} +5 -5
- package/dist/cli/{index-et9y4ga8.js → index-ssb67ff6.js} +31 -31
- package/dist/cli/{index-0m94jsss.js → index-wbnyc50b.js} +4 -4
- package/dist/cli/{index-yx3xqb0w.js → index-xm7dc14y.js} +3 -3
- package/dist/cli/{index-tme2kjvq.js → index-y42pra05.js} +3 -3
- package/dist/cli/{index-wzmchqry.js → index-yrsag0vs.js} +31 -52
- package/dist/cli/{index-a0jhxx5q.js → index-ywtcznk2.js} +12 -4
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-hp1ctjpe.js → knowledge-escalator-evjd8g7y.js} +11 -11
- package/dist/cli/{knowledge-events-0qrenmng.js → knowledge-events-q46z1wy6.js} +9 -9
- package/dist/cli/{knowledge-link-f5g5d171.js → knowledge-link-ffmzf72f.js} +4 -4
- package/dist/cli/{knowledge-store-8er824g9.js → knowledge-store-z82f5x9k.js} +5 -5
- package/dist/cli/{knowledge-validator-0jd3htcj.js → knowledge-validator-19gbnxx2.js} +7 -7
- package/dist/cli/{pending-delegations-d1n5faxg.js → pending-delegations-t4cqk5ha.js} +4 -4
- package/dist/cli/{pr-subscriptions-s2b2yvbd.js → pr-subscriptions-3enjtq0k.js} +4 -4
- package/dist/cli/{pr-workflow-gate-51s842yy.js → pr-workflow-gate-3ecgfsge.js} +29 -29
- package/dist/cli/{runner-nkh65pcm.js → runner-wqy2hbxn.js} +5 -5
- package/dist/cli/{scan-cursor-gt55f3d6.js → scan-cursor-8wcy0dvf.js} +6 -6
- package/dist/cli/{schema-rpdz901j.js → schema-hsw9r2tm.js} +5 -1
- package/dist/cli/{scope-persistence-js1ywq04.js → scope-persistence-mbwt4grd.js} +8 -8
- package/dist/cli/{skill-generator-xsxes2w0.js → skill-generator-kg32a5jy.js} +13 -13
- package/dist/cli/{telemetry-9tfts5q2.js → telemetry-j14cj552.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-54ca6mb8.js → worktree-collision-ownership-0rfw6kp3.js} +4 -4
- package/dist/cli/{worktree-isolation-haesnft8.js → worktree-isolation-qcwt09ve.js} +29 -29
- package/dist/config/index.d.ts +3 -3
- package/dist/config/loader.d.ts +34 -1
- package/dist/config/schema.d.ts +61 -7
- package/dist/index.js +59 -59
- package/dist/tools/build-check.d.ts +8 -0
- package/dist/tools/placeholder-scan.d.ts +10 -1
- package/dist/tools/pre-check-batch.d.ts +20 -8
- package/dist/tools/quality-budget.d.ts +2 -0
- package/dist/tools/sast-scan.d.ts +10 -2
- package/dist/tools/sbom-generate.d.ts +14 -0
- package/dist/tools/syntax-check.d.ts +11 -3
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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 {};
|
|
@@ -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
|
-
/**
|
|
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
|
|
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,
|
|
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,
|
|
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',
|
|
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,
|
|
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 {
|
|
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,
|
|
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 {
|
|
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
|
|
42
|
+
* Respects gates.syntax_check.enabled - returns skipped if disabled
|
|
35
43
|
*/
|
|
36
|
-
export declare function syntaxCheck(input: SyntaxCheckInput, directory: string,
|
|
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.
|
|
3
|
+
"version": "7.164.5",
|
|
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",
|