opencode-swarm 7.191.2 → 7.191.4

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 (72) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/cli/{auto-checkpoint-fdwx53m3.js → auto-checkpoint-mfevgppc.js} +5 -5
  4. package/dist/cli/{checkpoint-53c1zafe.js → checkpoint-ft7x9hh4.js} +9 -9
  5. package/dist/cli/{coder-settlement-fyh6tt0j.js → coder-settlement-a8v2w1gw.js} +3 -3
  6. package/dist/cli/{config-doctor-fgb4e34g.js → config-doctor-5jpt3aj0.js} +7 -7
  7. package/dist/cli/{core-apkb4h4r.js → core-9sekbwxm.js} +1 -1
  8. package/dist/cli/{curator-drift-fz1s4mja.js → curator-drift-mqcfwm24.js} +5 -5
  9. package/dist/cli/{curator-llm-factory-mfnac4ay.js → curator-llm-factory-nm91t6p1.js} +26 -26
  10. package/dist/cli/{curator-frc99gz3.js → curator-venskykb.js} +26 -26
  11. package/dist/cli/{doctor-knowledge-receipt-phase-id-jwvzyje6.js → doctor-knowledge-receipt-phase-id-0ewtqwxk.js} +5 -5
  12. package/dist/cli/{evidence-summary-service-w18gkp8p.js → evidence-summary-service-rr3rb5n2.js} +10 -10
  13. package/dist/cli/{gate-evidence-36w61c05.js → gate-evidence-sjp73rfv.js} +2 -2
  14. package/dist/cli/{guardrail-explain-vqgjc2ed.js → guardrail-explain-r5x9khp3.js} +27 -27
  15. package/dist/cli/{guardrail-log-935f17ge.js → guardrail-log-87qgtbxw.js} +3 -3
  16. package/dist/cli/{guardrail-reset-xjnvgqah.js → guardrail-reset-z1rhagdh.js} +26 -26
  17. package/dist/cli/{hive-promoter-xsns8ajv.js → hive-promoter-hy0gm4z7.js} +26 -26
  18. package/dist/cli/{index-kme2f9w9.js → index-02gmv98q.js} +4 -4
  19. package/dist/cli/{index-n95ea1jf.js → index-1gv6ja3m.js} +2 -2
  20. package/dist/cli/{index-aqjn8pax.js → index-1y1fgtd0.js} +91 -66
  21. package/dist/cli/{index-h2y7bwje.js → index-2afvf0hr.js} +2 -2
  22. package/dist/cli/{index-tx5vtg1t.js → index-633j6d5z.js} +1 -1
  23. package/dist/cli/{index-tdwm85ng.js → index-7tkkhbcw.js} +1 -1
  24. package/dist/cli/{index-xbnb7anq.js → index-8nac5633.js} +2 -2
  25. package/dist/cli/{index-8mr9p76r.js → index-9nh7fhh9.js} +3 -3
  26. package/dist/cli/{index-gfterbs7.js → index-9ved57n0.js} +3 -3
  27. package/dist/cli/{index-jxhf5r26.js → index-bs8yvx1k.js} +1 -1
  28. package/dist/cli/{index-np6phn34.js → index-ce4skcpr.js} +2 -2
  29. package/dist/cli/{index-g5acbfgk.js → index-chdc1wv3.js} +1 -1
  30. package/dist/cli/{index-bd6zxkwg.js → index-d4rm6r3c.js} +1 -1
  31. package/dist/cli/{index-2rtms4nt.js → index-ez6sczc7.js} +1 -1
  32. package/dist/cli/{index-j5nhx6e8.js → index-g22dps7x.js} +3 -0
  33. package/dist/cli/{index-r6xewjr5.js → index-jfk0yzr6.js} +1 -1
  34. package/dist/cli/{index-xpwcg1rd.js → index-kcx2f95c.js} +6 -6
  35. package/dist/cli/{index-76086gkg.js → index-knqvkxc4.js} +26 -26
  36. package/dist/cli/{index-n23cya25.js → index-p4f47xhj.js} +3 -3
  37. package/dist/cli/{index-m0j9e1gt.js → index-p4vdas8e.js} +1 -1
  38. package/dist/cli/{index-b36p4kn3.js → index-q0y8e1db.js} +2 -2
  39. package/dist/cli/{index-hbnrvd8w.js → index-qgzyj2vt.js} +5 -5
  40. package/dist/cli/{index-nfnrxyvb.js → index-t775as8a.js} +1 -1
  41. package/dist/cli/{index-qwrbyb3c.js → index-v7bjb1ta.js} +1 -1
  42. package/dist/cli/{index-55xfbnvy.js → index-w8fbnqhe.js} +1 -1
  43. package/dist/cli/{index-vwvtmqvw.js → index-xbhs0kp0.js} +1 -1
  44. package/dist/cli/{index-vn3emgm3.js → index-xgfmzmey.js} +4 -4
  45. package/dist/cli/{index-6y359eht.js → index-xgy7wakm.js} +28 -28
  46. package/dist/cli/{index-1xt5gth0.js → index-xrhhjeas.js} +2 -2
  47. package/dist/cli/{index-99v2k5sy.js → index-y7668dn6.js} +3 -3
  48. package/dist/cli/{index-tzq81dcp.js → index-ydnfnzdq.js} +1 -1
  49. package/dist/cli/index.js +27 -27
  50. package/dist/cli/{knowledge-escalator-p05gp6vc.js → knowledge-escalator-901znnke.js} +8 -8
  51. package/dist/cli/{knowledge-events-m875rjq2.js → knowledge-events-y2x5c5xe.js} +6 -6
  52. package/dist/cli/{knowledge-store-4h6pebmp.js → knowledge-store-jkzkgsnw.js} +1 -1
  53. package/dist/cli/{knowledge-validator-5vyfp4q6.js → knowledge-validator-dar3799k.js} +2 -2
  54. package/dist/cli/{mcp-xwpwyzx7.js → mcp-7baqvsr2.js} +1 -1
  55. package/dist/cli/{model-preflight-jgehvs3v.js → model-preflight-gk2dtfw4.js} +26 -26
  56. package/dist/cli/{pending-delegations-d55bv8sb.js → pending-delegations-aean4z99.js} +2 -2
  57. package/dist/cli/{pr-subscriptions-f0p41qek.js → pr-subscriptions-zmv0gtv7.js} +1 -1
  58. package/dist/cli/{pr-workflow-gate-50kkf6y3.js → pr-workflow-gate-50avx71j.js} +26 -26
  59. package/dist/cli/{scan-cursor-hhsd1pk3.js → scan-cursor-7vnj82v4.js} +2 -2
  60. package/dist/cli/{schema-8ymp10e6.js → schema-4v7pnknw.js} +1 -1
  61. package/dist/cli/{scope-persistence-gsn67p3k.js → scope-persistence-xd30y1ym.js} +5 -5
  62. package/dist/cli/{server-2p7pqctr.js → server-mkvhdc5k.js} +26 -26
  63. package/dist/cli/{skill-generator-vhdxbs1t.js → skill-generator-mt61qg5f.js} +9 -9
  64. package/dist/cli/{snapshot-coordination-init-yzqj7px3.js → snapshot-coordination-init-c7r5443q.js} +26 -26
  65. package/dist/cli/{speckit-checkoff-73nmf206.js → speckit-checkoff-t17g4ej6.js} +3 -3
  66. package/dist/cli/{worktree-collision-ownership-1ranptpe.js → worktree-collision-ownership-negbpp72.js} +2 -2
  67. package/dist/cli/{worktree-isolation-heftcwdv.js → worktree-isolation-hhftse76.js} +26 -26
  68. package/dist/config/evidence-schema.d.ts +9 -0
  69. package/dist/index.js +8 -8
  70. package/dist/tools/pre-check-batch.d.ts +64 -1
  71. package/dist/tools/secretscan.d.ts +15 -0
  72. package/package.json +1 -1
@@ -14,7 +14,7 @@ import { resolveGatePreamble } from './phase-complete/gates/gate-helpers';
14
14
  import type { QualityBudgetResult } from './quality-budget';
15
15
  import { qualityBudget } from './quality-budget';
16
16
  import type { SastScanFinding, SastScanResult } from './sast-scan';
17
- import type { SecretscanErrorResult, SecretscanResult } from './secretscan';
17
+ import type { SecretFinding, SecretscanErrorResult, SecretscanResult } from './secretscan';
18
18
  export declare const _internals: {
19
19
  qualityBudget: typeof qualityBudget;
20
20
  runLintWrapped: typeof runLintWrapped;
@@ -23,6 +23,7 @@ export declare const _internals: {
23
23
  runQualityBudgetWrapped: typeof runQualityBudgetWrapped;
24
24
  runWithTimeout: typeof runWithTimeout;
25
25
  getChangedLineRanges: typeof getChangedLineRanges;
26
+ getChangedLineAmbiguousFiles: typeof getChangedLineAmbiguousFiles;
26
27
  saveEvidence: typeof saveEvidence;
27
28
  runExternalTool: typeof runExternalTool;
28
29
  detectResolvedLinter: typeof detectResolvedLinter;
@@ -76,6 +77,12 @@ export interface ToolResult<T> {
76
77
  /** Duration in milliseconds */
77
78
  duration_ms: number;
78
79
  }
80
+ /** #3092: diff-scoped classification input for evaluateSecretscanGate. */
81
+ export interface SecretscanClassification {
82
+ newFindings: SecretFinding[];
83
+ preexistingFindings: SecretFinding[];
84
+ diffScoped: boolean;
85
+ }
79
86
  export interface PreCheckBatchResult {
80
87
  /** Structured producer status. Optional only for legacy serialized results. */
81
88
  batch_status?: 'completed' | 'skipped' | 'invalid';
@@ -93,6 +100,12 @@ export interface PreCheckBatchResult {
93
100
  total_duration_ms: number;
94
101
  /** Pre-existing SAST findings on unchanged lines, requiring reviewer triage */
95
102
  sast_preexisting_findings?: SastScanFinding[];
103
+ /**
104
+ * #3092: pre-existing secret findings on unchanged lines — visible in the
105
+ * scan result and persisted evidence, never gating; reviewer triage input
106
+ * and the hook decoder's diff-scope proof.
107
+ */
108
+ secretscan_preexisting_findings?: SecretFinding[];
96
109
  /** Optional Semgrep exited nonzero with no findings; SAST coverage is incomplete. */
97
110
  sast_degraded?: boolean;
98
111
  /** SAST was intentionally disabled by the effective QA profile. */
@@ -144,6 +157,23 @@ declare function runQualityBudgetWrapped(changedFiles: string[], directory: stri
144
157
  * Returns a Map from normalised file path → Set of changed line numbers.
145
158
  */
146
159
  export declare function parseDiffLineRanges(diffOutput: string): Map<string, Set<number>>;
160
+ /**
161
+ * Files whose changed-line evidence mixes more than one Git hop (#3092).
162
+ *
163
+ * `getChangedLineRanges` unions three diffs written in different coordinate
164
+ * systems — `mergeBase..HEAD` in HEAD coordinates, `--cached HEAD` in index
165
+ * coordinates, and the worktree diff — while secretscan findings carry
166
+ * WORKTREE line numbers (the file on disk). A file changed in a committed or
167
+ * staged hop and then edited again (staged and/or unstaged) can have its
168
+ * committed/staged line numbers shifted in the worktree, so the union's
169
+ * membership test alone cannot prove a finding pre-existing: a staged secret
170
+ * with an unstaged insertion above it lands outside the union and would read
171
+ * as untouched. Every finding in such a multi-hop file classifies as NEW.
172
+ * The set is keyed by `normalizeRepoPathKey`, matching the changed-line map.
173
+ * Returns null when a Git source is unavailable — callers must then treat
174
+ * every finding as NEW (fail-closed).
175
+ */
176
+ export declare function getChangedLineAmbiguousFiles(directory: string, abortSignal?: AbortSignal, requestedFiles?: string[]): Promise<Set<string> | null>;
147
177
  /**
148
178
  * Get the union of committed, staged, unstaged, and untracked changed lines.
149
179
  * A known empty union is authoritative; null means a required Git source was
@@ -159,6 +189,39 @@ export declare function classifySastFindings(findings: SastScanFinding[], change
159
189
  newFindings: SastScanFinding[];
160
190
  preexistingFindings: SastScanFinding[];
161
191
  };
192
+ /**
193
+ * Classify secret findings as "new" (on coder-changed lines) or "pre-existing"
194
+ * (unchanged lines) for the diff-scoped secretscan gate (#3092).
195
+ *
196
+ * Strictly fail-closed — unlike `classifySastFindings`, whose missing-key and
197
+ * empty-set arms deliberately read as pre-existing (pinned by
198
+ * tests/unit/tools/pre-check-batch-sast-preexisting.test.ts), a secret
199
+ * finding is PRE-EXISTING only when EVERY condition holds:
200
+ *
201
+ * - the changed-line map is non-null,
202
+ * - the finding's normalized repo-relative key is present in the map,
203
+ * - the file's changed-line set is non-empty,
204
+ * - the set does not carry the ALL_LINES_CHANGED sentinel (a fully-changed
205
+ * file makes every finding new), and
206
+ * - the finding's line is a safe positive integer and NOT a member of the
207
+ * changed set — the secret sits on a line the coder did not touch.
208
+ *
209
+ * Everything else is NEW: null map, missing key, empty set, ALL-set, a line
210
+ * that IS a changed line, unresolvable / zero / negative / non-integer lines,
211
+ * malformed or root-escaping paths, and any resolution error. Never throws —
212
+ * a failure to resolve classifies the finding as NEW.
213
+ */
214
+ export declare function classifySecretFindings(findings: SecretFinding[], changedLineRanges: Map<string, Set<number>> | null, directory: string,
215
+ /**
216
+ * #3092: files whose changed-line evidence mixes more than one Git hop
217
+ * (`getChangedLineAmbiguousFiles`). Findings in these files classify as
218
+ * NEW — the unioned map's line numbers for them are not in worktree
219
+ * coordinates, so non-membership cannot prove a line untouched.
220
+ */
221
+ ambiguousFiles?: Set<string>): {
222
+ newFindings: SecretFinding[];
223
+ preexistingFindings: SecretFinding[];
224
+ };
162
225
  /**
163
226
  * Run all 4 pre-check tools in parallel with concurrency limit
164
227
  * @param input - The pre-check batch input
@@ -1,5 +1,10 @@
1
1
  import * as fs from 'node:fs';
2
2
  import { createSwarmTool } from './create-tool';
3
+ /**
4
+ * Findings cap shared by both scan paths. Exported for gate-side summary
5
+ * wording (#3092) — the value is a frozen contract, not a tunable.
6
+ */
7
+ export declare const SECRETSCAN_MAX_FINDINGS = 100;
3
8
  type SecretType = 'api_key' | 'aws_access_key' | 'aws_secret_key' | 'private_key' | 'password' | 'secret_token' | 'bearer_token' | 'basic_auth' | 'database_url' | 'jwt' | 'github_token' | 'slack_token' | 'stripe_key' | 'sendgrid_key' | 'twilio_key' | 'generic_token' | 'high_entropy';
4
9
  type Confidence = 'high' | 'medium' | 'low';
5
10
  type Severity = 'critical' | 'high' | 'medium' | 'low';
@@ -50,6 +55,16 @@ export interface SecretscanResult {
50
55
  /** Files requested or discovered but not completely examined. */
51
56
  incomplete_files: number;
52
57
  incomplete_paths: IncompletePath[];
58
+ /**
59
+ * Findings were capped at MAX_FINDINGS and some results were discarded
60
+ * (#3092). Both paths set this alongside their truncation disclosure; the
61
+ * explicit-files path also pushes the `Results limited to ... findings`
62
+ * sentence into `message` exactly like the directory path. Enforcing sites
63
+ * treat `truncated === true` as fail-closed: findings beyond the cap were
64
+ * never classified, so a gate decision over the visible set cannot prove
65
+ * absence of new secrets.
66
+ */
67
+ truncated?: boolean;
53
68
  message?: string;
54
69
  }
55
70
  export interface IncompletePath {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.191.2",
3
+ "version": "7.191.4",
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",