opencode-swarm 7.190.1 → 7.191.1
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/.opencode/skills/swarm-pr-review/SKILL.md +2 -2
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{auto-checkpoint-26m3h5f4.js → auto-checkpoint-h5tx9byj.js} +6 -6
- package/dist/cli/{capability-probe-8k8ebeyp.js → capability-probe-3mgxcfr9.js} +1 -1
- package/dist/cli/{checkpoint-7a0achpv.js → checkpoint-2c81m4xa.js} +10 -10
- package/dist/cli/{coder-settlement-dsb1t39t.js → coder-settlement-y4vvm54h.js} +4 -4
- package/dist/cli/{config-doctor-9txawzng.js → config-doctor-a4p5cww3.js} +8 -8
- package/dist/cli/{core-kv7jz9ty.js → core-f3y6gyee.js} +2 -2
- package/dist/cli/{curator-26yzg8wp.js → curator-b06jh4rr.js} +28 -28
- package/dist/cli/{curator-drift-kxn5sk3z.js → curator-drift-wx0cznhr.js} +6 -6
- package/dist/cli/{curator-llm-factory-hs2y9kmw.js → curator-llm-factory-svkd3e1q.js} +28 -28
- package/dist/cli/{doctor-knowledge-receipt-phase-id-z8wea03e.js → doctor-knowledge-receipt-phase-id-4p73sc97.js} +6 -6
- package/dist/cli/{evidence-summary-service-bg5zq78s.js → evidence-summary-service-jdadnykk.js} +11 -11
- package/dist/cli/{gate-evidence-0beg9c7r.js → gate-evidence-1erf1pcq.js} +3 -3
- package/dist/cli/{guardrail-explain-n8bm0hpm.js → guardrail-explain-pybn311d.js} +29 -29
- package/dist/cli/{guardrail-log-r2zazmbn.js → guardrail-log-cvq6ad1w.js} +4 -4
- package/dist/cli/{guardrail-reset-0q54t44w.js → guardrail-reset-66v0j7as.js} +28 -28
- package/dist/cli/{hive-promoter-7dr5b9zv.js → hive-promoter-vpj59psh.js} +28 -28
- package/dist/cli/{index-m28dzyy8.js → index-0mqt7sww.js} +3 -3
- package/dist/cli/{index-bcwmn4d7.js → index-295pmq23.js} +1 -1
- package/dist/cli/{index-ha0w0a7t.js → index-2pt0mp8y.js} +2 -2
- package/dist/cli/{index-dnp4qtpf.js → index-2regfmre.js} +1 -1
- package/dist/cli/{index-4a15347d.js → index-3bg4kvq2.js} +1 -1
- package/dist/cli/{index-bfyh3gpe.js → index-3jwbef40.js} +4 -4
- package/dist/cli/{index-xdq6mak1.js → index-4b1kqhss.js} +1 -1
- package/dist/cli/{index-26e2s6r1.js → index-64wkwjbk.js} +1 -1
- package/dist/cli/{index-gqb8etv4.js → index-8b646njq.js} +3 -3
- package/dist/cli/{index-s9cgnd2z.js → index-8zma3w32.js} +1 -1
- package/dist/cli/{index-spgfs5y7.js → index-cg1x3c1y.js} +1 -1
- package/dist/cli/{index-1f084tqn.js → index-d6fyje3w.js} +103 -64
- package/dist/cli/{index-cewpxcwm.js → index-d83h3e62.js} +5 -5
- package/dist/cli/{index-dbdkh7pq.js → index-e4853kax.js} +2 -2
- package/dist/cli/{index-0yrg10jx.js → index-f2ywye8g.js} +2 -2
- package/dist/cli/{index-rjzn7hf0.js → index-f59vtveg.js} +4 -4
- package/dist/cli/{index-enq166kw.js → index-fgybs0bj.js} +2 -2
- package/dist/cli/{index-yy5yyyst.js → index-gyef13gy.js} +5 -5
- package/dist/cli/{index-2c47efpt.js → index-h2shj0an.js} +2 -2
- package/dist/cli/{index-0z8vdkvg.js → index-hr2bewwk.js} +2 -2
- package/dist/cli/{index-67a6mk20.js → index-hvp5w0sg.js} +1 -1
- package/dist/cli/{index-pkhbd2t5.js → index-j5nhx6e8.js} +1 -0
- package/dist/cli/{index-ay8ggtgr.js → index-jjf10ffw.js} +2 -2
- package/dist/cli/{index-0gve0mkj.js → index-kagywq83.js} +3 -3
- package/dist/cli/{index-v3j9fk16.js → index-md7nyq0w.js} +1 -1
- package/dist/cli/{index-sc7t1tev.js → index-nj33ng1b.js} +6 -6
- package/dist/cli/{index-s8b67e6h.js → index-pksy4nzv.js} +4 -0
- package/dist/cli/{index-f46dbyew.js → index-r2ws4yy9.js} +3 -3
- package/dist/cli/{index-efztf4yw.js → index-r54w3hx4.js} +1 -1
- package/dist/cli/{index-wvghb3x6.js → index-sgxbqba0.js} +12 -3
- package/dist/cli/{index-fthhppnc.js → index-sh6g041x.js} +30 -30
- package/dist/cli/{index-hx1fmywk.js → index-wbq1e5x0.js} +2 -2
- package/dist/cli/{index-sfjpbnqs.js → index-wn3vs2se.js} +28 -28
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-hdrqt5pj.js → knowledge-escalator-8qctawbk.js} +9 -9
- package/dist/cli/{knowledge-events-ttebc8gn.js → knowledge-events-gzdnpfa6.js} +7 -7
- package/dist/cli/{knowledge-store-8cxv6w2n.js → knowledge-store-mgeayyef.js} +1 -1
- package/dist/cli/{knowledge-validator-kr5xmqpa.js → knowledge-validator-z09ftbjj.js} +2 -2
- package/dist/cli/{mcp-jtk79ygp.js → mcp-yx243bq2.js} +1 -1
- package/dist/cli/{model-preflight-d6tt7479.js → model-preflight-ns0whkma.js} +28 -28
- package/dist/cli/{pending-delegations-ttk09f50.js → pending-delegations-edq3bwx6.js} +2 -2
- package/dist/cli/{pr-subscriptions-2kbeezsr.js → pr-subscriptions-10pdbdsf.js} +1 -1
- package/dist/cli/{pr-workflow-gate-3ra6p7k4.js → pr-workflow-gate-0rb4y8vk.js} +28 -28
- package/dist/cli/{scan-cursor-zzccy117.js → scan-cursor-xs4x2bvz.js} +2 -2
- package/dist/cli/{schema-9prswg1x.js → schema-4f61fj3p.js} +2 -2
- package/dist/cli/{scope-persistence-eqm8vwnx.js → scope-persistence-fs298zn8.js} +6 -6
- package/dist/cli/{server-swjre81h.js → server-1ya91y3b.js} +28 -28
- package/dist/cli/{skill-generator-d8dk9vps.js → skill-generator-hj0n9m7c.js} +10 -10
- package/dist/cli/{snapshot-coordination-init-f49y0zr0.js → snapshot-coordination-init-3zj91epv.js} +28 -28
- package/dist/cli/{speckit-checkoff-pnb6q9gd.js → speckit-checkoff-3a3ryxzq.js} +4 -4
- package/dist/cli/{worktree-collision-ownership-3c7xyc4p.js → worktree-collision-ownership-7d2nsh1h.js} +2 -2
- package/dist/cli/{worktree-isolation-jggdf28m.js → worktree-isolation-wrkjhrdv.js} +28 -28
- package/dist/config/evidence-schema.d.ts +3 -0
- package/dist/index.js +244 -236
- package/dist/pr-review/render-review-body.d.ts +53 -0
- package/dist/sandbox/executor.d.ts +16 -1
- package/dist/sandbox/linux/bubblewrap-executor.d.ts +8 -5
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/pr-review-submission.d.ts +10 -0
- package/dist/tools/secretscan.d.ts +26 -4
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure PR-review submission body renderer (issue #3096, Workstream C PR 1/2).
|
|
3
|
+
*
|
|
4
|
+
* Renders settled PR-review findings into the GitHub PR Review submission body
|
|
5
|
+
* plus the inline-comment plan. STRICTLY pure: no filesystem, no network, no
|
|
6
|
+
* clock — authorization and transport live in `src/tools/pr-review-submission.ts`
|
|
7
|
+
* so any future preview surface (e.g. #3097 post-abort export) can reuse this
|
|
8
|
+
* module without submission authority.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PR_REVIEW_INLINE_COMMENT_CAP = 20;
|
|
11
|
+
/** GitHub rejects oversized review bodies (~64 KiB); cap the rendered body below it. */
|
|
12
|
+
export declare const PR_REVIEW_BODY_CHAR_CAP = 60000;
|
|
13
|
+
export interface RendererFinding {
|
|
14
|
+
finding_id: string;
|
|
15
|
+
status: string;
|
|
16
|
+
file_line: string;
|
|
17
|
+
evidence: string;
|
|
18
|
+
next_action: string;
|
|
19
|
+
severity?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RendererCoverage {
|
|
22
|
+
kind: string;
|
|
23
|
+
unresolved_dimensions: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface RenderReviewBodyInput {
|
|
26
|
+
run_id: string;
|
|
27
|
+
pr_head_sha: string;
|
|
28
|
+
verdict?: string;
|
|
29
|
+
base_verification?: string;
|
|
30
|
+
coverage: RendererCoverage;
|
|
31
|
+
findings: RendererFinding[];
|
|
32
|
+
/** Previously posted comment/review bodies; findings whose rendered marker already appears are skipped (AC4 dedupe). */
|
|
33
|
+
existingComments?: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface RenderedInlineComment {
|
|
36
|
+
path: string;
|
|
37
|
+
line: number;
|
|
38
|
+
body: string;
|
|
39
|
+
finding_id: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RenderedReviewBody {
|
|
42
|
+
body: string;
|
|
43
|
+
inlineComments: RenderedInlineComment[];
|
|
44
|
+
/** finding ids skipped because their rendered marker already appears in existingComments. */
|
|
45
|
+
skippedAsPosted: string[];
|
|
46
|
+
/** inline comments dropped by the cap (disclosed in the body). */
|
|
47
|
+
truncatedInlineComments: number;
|
|
48
|
+
/** findings omitted from the body as dismissed (severity NONE at settlement). */
|
|
49
|
+
dismissedCount: number;
|
|
50
|
+
/** true when the body exceeded PR_REVIEW_BODY_CHAR_CAP and was truncated with a disclosure. */
|
|
51
|
+
bodyTruncated: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare function renderPrReviewSubmissionBody(input: RenderReviewBodyInput): RenderedReviewBody;
|
|
@@ -66,7 +66,22 @@ export interface SandboxPolicyOptions {
|
|
|
66
66
|
network_mode?: 'off' | 'on';
|
|
67
67
|
network_allowlist?: readonly string[];
|
|
68
68
|
writable_roots?: readonly string[];
|
|
69
|
+
/**
|
|
70
|
+
* Absolute roots the sandboxed command may READ but not write, mounted
|
|
71
|
+
* before the writable scope paths so a scope path inside one of them
|
|
72
|
+
* stays writable. The guardrails hook passes the session workspace here:
|
|
73
|
+
* without it a Linux coder sandbox contained only its declared scope, so
|
|
74
|
+
* `node tests/x.test.js` could not even load `../src/x.js`. Executors
|
|
75
|
+
* whose containment is write-only (macOS sandbox-exec) ignore it.
|
|
76
|
+
*/
|
|
77
|
+
readonly_roots?: readonly string[];
|
|
69
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The policy fields that come from configuration and take part in the
|
|
81
|
+
* enforcement assessment and its cache key. `readonly_roots` is derived per
|
|
82
|
+
* call from the session workspace and is deliberately not part of it.
|
|
83
|
+
*/
|
|
84
|
+
export type SandboxConfigPolicy = Omit<SandboxPolicyOptions, 'readonly_roots'>;
|
|
70
85
|
declare function detectSandboxCapability(): Promise<SandboxCapabilityV1>;
|
|
71
86
|
export declare const _internals: {
|
|
72
87
|
detectSandboxCapability: typeof detectSandboxCapability;
|
|
@@ -74,7 +89,7 @@ export declare const _internals: {
|
|
|
74
89
|
export interface SandboxEnforcementAssessment {
|
|
75
90
|
capability: SandboxCapabilityV1;
|
|
76
91
|
requirements: Required<SandboxRequirements>;
|
|
77
|
-
policy: Required<
|
|
92
|
+
policy: Required<SandboxConfigPolicy>;
|
|
78
93
|
satisfied: boolean;
|
|
79
94
|
missing: string[];
|
|
80
95
|
supported: boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* for essential read-only system paths. Drops all capabilities via --cap-drop ALL
|
|
7
7
|
* for defense-in-depth within the user namespace.
|
|
8
8
|
*/
|
|
9
|
-
import { type SandboxExecutor } from '../executor';
|
|
9
|
+
import { type SandboxExecutor, type SandboxPolicyOptions } from '../executor';
|
|
10
10
|
/**
|
|
11
11
|
* Resolve the bwrap binary: absolute base-OS path when present, bare-name
|
|
12
12
|
* (PATH resolution) fallback otherwise. Never throws.
|
|
@@ -32,7 +32,12 @@ export declare const _internals: {
|
|
|
32
32
|
*
|
|
33
33
|
* Instantiated with scope paths and an optional temp directory override.
|
|
34
34
|
* wrapCommand() returns a bwrap-wrapped command string that:
|
|
35
|
-
* - bind-mounts each
|
|
35
|
+
* - bind-mounts each policy.readonly_roots path read-only (the session
|
|
36
|
+
* workspace), FIRST, so the command can read the project it is working in
|
|
37
|
+
* - bind-mounts each scope path read-write, after the read-only roots so a
|
|
38
|
+
* scope path inside the workspace is writable (bwrap mounts in argument
|
|
39
|
+
* order and a later bind sits on top of an earlier one; the reverse order
|
|
40
|
+
* would leave the scope path read-only)
|
|
36
41
|
* - mounts a tmpfs at /tmp (writable temporary storage)
|
|
37
42
|
* - bind-mounts essential system paths read-only
|
|
38
43
|
* - spawns the raw command via `bash -c '<command>'`
|
|
@@ -75,9 +80,7 @@ export declare class BubblewrapSandboxExecutor implements SandboxExecutor {
|
|
|
75
80
|
* @returns A bwrap-wrapped command string ready for shell execution,
|
|
76
81
|
* or the raw command string when the sandbox is unavailable (passthrough mode)
|
|
77
82
|
*/
|
|
78
|
-
wrapCommand(command: string, scopePaths: string[], tempDir?: string, envOverrides?: Record<string, string | null>, policy?:
|
|
79
|
-
network_mode?: 'off' | 'on';
|
|
80
|
-
}): string;
|
|
83
|
+
wrapCommand(command: string, scopePaths: string[], tempDir?: string, envOverrides?: Record<string, string | null>, policy?: Pick<SandboxPolicyOptions, 'network_mode' | 'readonly_roots'>): string;
|
|
81
84
|
/**
|
|
82
85
|
* Return environment variable overrides required for the bubblewrap sandbox.
|
|
83
86
|
*
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export { lean_turbo_runner_status } from './lean-turbo-runner-status';
|
|
|
117
117
|
export { lean_turbo_status } from './lean-turbo-status';
|
|
118
118
|
export { lint_spec } from './lint-spec';
|
|
119
119
|
export { mutation_test } from './mutation-test';
|
|
120
|
+
export { executePrReviewSubmission, pr_review_submission, } from './pr-review-submission';
|
|
120
121
|
export { executePreparePrWorkflowCheckout, prepare_pr_workflow_checkout, } from './prepare-pr-workflow-checkout';
|
|
121
122
|
export { executeRebindPrFeedbackHead, rebind_pr_feedback_head, } from './rebind-pr-feedback-head';
|
|
122
123
|
export { executeRecordBranchFreshness, record_branch_freshness, } from './record-branch-freshness';
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare const TOOL_MANIFEST: {
|
|
|
72
72
|
plan_conflict_check: () => ToolDefinition;
|
|
73
73
|
prepare_pr_feedback_scope: () => ToolDefinition;
|
|
74
74
|
write_pr_review_artifact: () => ToolDefinition;
|
|
75
|
+
pr_review_submission: () => ToolDefinition;
|
|
75
76
|
write_pr_review_trigger_eval: () => ToolDefinition;
|
|
76
77
|
test_runner: () => ToolDefinition;
|
|
77
78
|
test_impact: () => ToolDefinition;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExternalToolRunOptions, ExternalToolRunResult } from '../utils/external-tool-runner.js';
|
|
2
|
+
import { createSwarmTool } from './create-tool.js';
|
|
3
|
+
export declare const _internals: {
|
|
4
|
+
resolveGhBinary: () => string | null;
|
|
5
|
+
runExternalTool: (options: ExternalToolRunOptions) => Promise<ExternalToolRunResult>;
|
|
6
|
+
};
|
|
7
|
+
export declare function executePrReviewSubmission(args: unknown, directory: string, context?: {
|
|
8
|
+
sessionID?: string;
|
|
9
|
+
}): Promise<string>;
|
|
10
|
+
export declare const pr_review_submission: ReturnType<typeof createSwarmTool>;
|
|
@@ -18,14 +18,26 @@ export interface SecretscanResult {
|
|
|
18
18
|
count: number;
|
|
19
19
|
files_scanned: number;
|
|
20
20
|
skipped_files: number;
|
|
21
|
+
/**
|
|
22
|
+
* Files suppressed by `.secretscanignore` patterns (#3107, explicit-files
|
|
23
|
+
* path only; optional for legacy producers, treated as 0). Audit/
|
|
24
|
+
* diagnosability counter — never part of the #2918 vacuous-coverage
|
|
25
|
+
* predicate, which keys on policy_skipped_files. The directory path emits
|
|
26
|
+
* literal 0 (traversal prunes at visitation and does not track
|
|
27
|
+
* per-suppression counts — see the caution on policy_skipped_files).
|
|
28
|
+
*/
|
|
29
|
+
ignored_files?: number;
|
|
21
30
|
/**
|
|
22
31
|
* Skips attributable specifically to scan-policy extension exclusion
|
|
23
32
|
* (#2918). The extension-exclusion site in runSecretscanOnFiles is the
|
|
24
33
|
* ONLY increment site: binary-content skips, missing files, invalid
|
|
25
|
-
* entries, and every incomplete
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* allows scanning was
|
|
34
|
+
* entries, .secretscanignore suppressions (#3107), and every incomplete
|
|
35
|
+
* route deliberately do NOT count, so `policy_skipped_files ===
|
|
36
|
+
* requested_files` with zero findings and zero incomplete coverage proves
|
|
37
|
+
* vacuous coverage (nothing the scan policy allows scanning was
|
|
38
|
+
* requested). Ignore-file suppressions count toward skipped_files only —
|
|
39
|
+
* a repo-writable ignore file can never satisfy the vacuous-coverage
|
|
40
|
+
* predicate of the changed-file gate.
|
|
29
41
|
*/
|
|
30
42
|
policy_skipped_files: number;
|
|
31
43
|
/**
|
|
@@ -70,6 +82,16 @@ export declare function runSecretscan(directory: string): Promise<SecretscanResu
|
|
|
70
82
|
* Run secretscan over an explicit, already-selected file set.
|
|
71
83
|
* Used by pre_check_batch so changed-file hard gates share the same detector
|
|
72
84
|
* registry and entropy logic as the standalone scanner.
|
|
85
|
+
*
|
|
86
|
+
* #3107: also reads `.secretscanignore` at the scan root with the same pattern
|
|
87
|
+
* language and precedence as the directory scan (exact names + globs; comments,
|
|
88
|
+
* blanks, and unsafe patterns skipped; ancestor directories prune like
|
|
89
|
+
* traversal). Ignore-matched files that reach the ignore check count toward
|
|
90
|
+
* `skipped_files` only — never `policy_skipped_files` — so the #2918
|
|
91
|
+
* vacuous-coverage fail-closed arm keeps biting on all-ignored batches. One
|
|
92
|
+
* deliberate carve-out: the docs-safe extension-exclusion route is evaluated
|
|
93
|
+
* FIRST (#2918, pinned by test), so an ignore-matched `.md`/`.markdown`/`.mdx`
|
|
94
|
+
* file keeps its extension accounting and the ignore file is inert for it.
|
|
73
95
|
*/
|
|
74
96
|
export declare function runSecretscanOnFiles(files: string[], directory: string,
|
|
75
97
|
/**
|
|
@@ -273,6 +273,10 @@ export declare const TOOL_METADATA: {
|
|
|
273
273
|
description: string;
|
|
274
274
|
agents: "architect"[];
|
|
275
275
|
};
|
|
276
|
+
pr_review_submission: {
|
|
277
|
+
description: string;
|
|
278
|
+
agents: "architect"[];
|
|
279
|
+
};
|
|
276
280
|
prepare_pr_feedback_scope: {
|
|
277
281
|
description: string;
|
|
278
282
|
agents: "architect"[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.191.1",
|
|
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",
|