opencode-swarm 7.143.0 → 7.143.2
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/loop/SKILL.md +4 -2
- package/dist/cli/ast-diff-ypptrcan.js +422 -0
- package/dist/cli/{config-doctor-t1r5qwxk.js → config-doctor-xadt4kv5.js} +4 -4
- package/dist/cli/{core-e30p4vz9.js → core-vpefadja.js} +4 -4
- package/dist/cli/curation-policy-pkb2eeb1.js +1 -1
- package/dist/cli/{curator-drift-49p3jnte.js → curator-drift-2jbjv03a.js} +6 -6
- package/dist/cli/{curator-llm-factory-y9xg7k6k.js → curator-llm-factory-xjw5j2jj.js} +36 -35
- package/dist/cli/{curator-ctasdmmq.js → curator-wahbxxw9.js} +36 -35
- package/dist/cli/{dispatch-rd10kdk1.js → dispatch-1y1rnv1h.js} +3 -3
- package/dist/cli/{evidence-summary-service-7bmg5r8y.js → evidence-summary-service-m0jes2yb.js} +16 -16
- package/dist/cli/{gate-evidence-1v0cj4c6.js → gate-evidence-sf9hbhm0.js} +9 -9
- package/dist/cli/{guardrail-explain-6x9psbwz.js → guardrail-explain-9vdjkz5x.js} +37 -36
- package/dist/cli/{guardrail-log-pma4m8vr.js → guardrail-log-xr0cv07v.js} +6 -6
- package/dist/cli/{hive-promoter-g16grej1.js → hive-promoter-ften3m3h.js} +36 -35
- package/dist/cli/{index-6texwk9p.js → index-2pxq133w.js} +5 -5
- package/dist/cli/{index-9v53ez3a.js → index-4g1bnzma.js} +4 -4
- package/dist/cli/{runtime-ykafcwc6.js → index-5n69863d.js} +2 -10
- package/dist/cli/{index-m4v9kab1.js → index-6f80e8r5.js} +355 -357
- package/dist/cli/{index-x6qq39e9.js → index-6hwedxn7.js} +10 -10
- package/dist/cli/{index-q8st0mtw.js → index-6q3wx600.js} +1 -1
- package/dist/cli/{index-fhxh447f.js → index-700yppfy.js} +15 -15
- package/dist/cli/{index-htmsm37t.js → index-7e91cs99.js} +5 -5
- package/dist/cli/index-7sy3aa9m.js +115 -0
- package/dist/cli/{index-7c4bxgdh.js → index-8aabbfhv.js} +5 -5
- package/dist/cli/{index-n96ay8w4.js → index-8hxbjgyk.js} +5 -5
- package/dist/cli/{index-ebwznsfy.js → index-b6e016tv.js} +1 -1
- package/dist/cli/{index-keskta0w.js → index-fq0b44vq.js} +8 -8
- package/dist/cli/{index-82m5kwtd.js → index-gdd4jt6b.js} +4 -4
- package/dist/cli/{index-1g473508.js → index-h5fmwg5b.js} +43 -42
- package/dist/cli/{index-28jr28fg.js → index-je3jmcc1.js} +9 -9
- package/dist/cli/{index-fprxtq3q.js → index-jvbqryky.js} +32 -32
- package/dist/cli/{index-qwm6vdyv.js → index-k3cxyk66.js} +1 -1
- package/dist/cli/{index-15h4dpsn.js → index-kc9tfc7e.js} +5 -5
- package/dist/cli/{index-sb16w4wj.js → index-kjgma6hg.js} +6 -6
- package/dist/cli/{index-g0pbvfhw.js → index-nvt1152n.js} +56 -21
- package/dist/cli/{index-336ra397.js → index-qswsp6s3.js} +5 -5
- package/dist/cli/{index-96h1v2jw.js → index-r0j1sh38.js} +1 -1
- package/dist/cli/{index-k46me75h.js → index-rn0eq85g.js} +1 -1
- package/dist/cli/{index-2n8y67b4.js → index-x0ja3n3g.js} +2 -2
- package/dist/cli/{index-s89y08tk.js → index-xacfcpyn.js} +2 -2
- package/dist/cli/{index-r0tn9kpa.js → index-yr997mhn.js} +4 -4
- package/dist/cli/{index-kxpz3ncd.js → index-yw4atzww.js} +1 -1
- package/dist/cli/index.js +45 -41
- package/dist/cli/{knowledge-escalator-1b2hmcgn.js → knowledge-escalator-9xesv2xx.js} +15 -15
- package/dist/cli/{knowledge-events-vx4fqjzb.js → knowledge-events-s8nvbdyk.js} +13 -13
- package/dist/cli/knowledge-link-fn5j3r4q.js +1 -1
- package/dist/cli/{knowledge-store-t2qyr4yr.js → knowledge-store-2zt0b10b.js} +3 -3
- package/dist/cli/{knowledge-validator-c7871bjc.js → knowledge-validator-nt955tw0.js} +4 -4
- package/dist/cli/{pending-delegations-0hb97ps1.js → pending-delegations-b3pt3w5w.js} +5 -5
- package/dist/cli/{pr-subscriptions-b63t252j.js → pr-subscriptions-jyav582d.js} +5 -5
- package/dist/cli/{runner-hrg7h2h4.js → runner-pde6b5sx.js} +2 -2
- package/dist/cli/runtime-te94z1zb.js +23 -0
- package/dist/cli/{scan-cursor-pnbpfjjc.js → scan-cursor-emrg35t0.js} +4 -4
- package/dist/cli/{schema-47xpcghn.js → schema-tpbz8f0x.js} +1 -1
- package/dist/cli/{scope-persistence-wxx1jpfw.js → scope-persistence-1hf839ys.js} +9 -9
- package/dist/cli/semantic-classifier-ygqk0me1.js +147 -0
- package/dist/cli/{skill-generator-s456hfta.js → skill-generator-fja22m4q.js} +16 -16
- package/dist/cli/{worktree-collision-ownership-ymdxetnn.js → worktree-collision-ownership-bfz3drxm.js} +6 -6
- package/dist/cli/{worktree-isolation-d0xgp705.js → worktree-isolation-gnqvy10j.js} +38 -37
- package/dist/cli/{worktree-provisioning-owner-sjh7te1h.js → worktree-provisioning-owner-g24xd417.js} +4 -4
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/constants.d.ts +2 -2
- package/dist/hooks/delegation-gate.d.ts +19 -2
- package/dist/index.js +379 -370
- package/dist/parallel/review-router.d.ts +16 -0
- package/dist/parallel/tier3-classifier.d.ts +11 -0
- package/dist/utils/patch-dedent.d.ts +33 -0
- package/dist/workflow/coder-settlement.d.ts +30 -0
- package/dist/workflow/workflow-wal-schema.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cli/{index-y9h2vqf6.js → index-4q9vfav6.js} +3 -3
- package/dist/cli/{index-ee3x66a5.js → index-z6xqpmqg.js} +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ClassifiedChange } from '../diff/semantic-classifier.js';
|
|
1
2
|
export type ReviewDepth = 'single' | 'double';
|
|
2
3
|
export interface ReviewRouting {
|
|
3
4
|
reviewerCount: number;
|
|
@@ -11,6 +12,10 @@ export interface ComplexityMetrics {
|
|
|
11
12
|
astChangeCount: number;
|
|
12
13
|
maxFileComplexity: number;
|
|
13
14
|
}
|
|
15
|
+
export interface SemanticRoutingResult {
|
|
16
|
+
routing: ReviewRouting;
|
|
17
|
+
classifications: ClassifiedChange[];
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
20
|
* Compute complexity metrics for a set of files
|
|
16
21
|
*/
|
|
@@ -19,6 +24,17 @@ export declare function computeComplexity(directory: string, changedFiles: strin
|
|
|
19
24
|
* Determine review routing based on complexity
|
|
20
25
|
*/
|
|
21
26
|
export declare function routeReview(metrics: ComplexityMetrics): ReviewRouting;
|
|
27
|
+
/**
|
|
28
|
+
* Attempt AST-based semantic classification of changes.
|
|
29
|
+
* Returns null if AST analysis is unavailable, times out, or exceeds bounds.
|
|
30
|
+
*/
|
|
31
|
+
export declare function computeSemanticClassifications(directory: string, changedFiles: string[]): Promise<ClassifiedChange[] | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Route review based on semantic classifications.
|
|
34
|
+
* High-risk categories (GUARD_REMOVED, SIGNATURE_CHANGE, API_CHANGE,
|
|
35
|
+
* DELETED_FUNCTION) trigger double review regardless of heuristic metrics.
|
|
36
|
+
*/
|
|
37
|
+
export declare function routeReviewSemantic(metrics: ComplexityMetrics, classifications: ClassifiedChange[]): ReviewRouting;
|
|
22
38
|
/**
|
|
23
39
|
* Route review with full analysis
|
|
24
40
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare function normalizeToForwardSlash(filePath: string): string;
|
|
2
|
+
export declare function matchesTier3(files: string[]): boolean;
|
|
3
|
+
export declare function isTier3Path(filePath: string): boolean;
|
|
4
|
+
export declare const _internals: {
|
|
5
|
+
TIER_3_BASENAME_PATTERNS: RegExp[];
|
|
6
|
+
TIER_3_EXACT_BASENAMES: Set<string>;
|
|
7
|
+
TIER_3_KEYWORD_PREFIX_RE: RegExp;
|
|
8
|
+
TIER_3_DIRECTORY_SEGMENTS: Set<string>;
|
|
9
|
+
normalizeToForwardSlash: typeof normalizeToForwardSlash;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue #2206: models routinely emit unified diffs / native patches indented
|
|
3
|
+
* inside a fenced markdown, YAML, or JSON block (e.g. ` --- a/file`). Every
|
|
4
|
+
* diff parser in this repo anchors `diff --git` / `---` / `+++` / `@@` at
|
|
5
|
+
* column 0, so an indented payload is not recognized — the write-target
|
|
6
|
+
* resolver reports "no recognizable write targets", `swarm_apply_patch` fails
|
|
7
|
+
* to parse hunks, and a stray `*** End Patch` trailer misclassifies the payload
|
|
8
|
+
* as a malformed native patch.
|
|
9
|
+
*
|
|
10
|
+
* This normalizer strips the MINIMUM COMMON leading whitespace across all
|
|
11
|
+
* non-empty lines, restoring column-0 semantics in one place instead of
|
|
12
|
+
* widening every anchored regex (which would misclassify hunk context lines
|
|
13
|
+
* whose file content itself starts with `---` — see the plan-critic analysis
|
|
14
|
+
* for #2206).
|
|
15
|
+
*
|
|
16
|
+
* Properties:
|
|
17
|
+
* - A column-0 patch has minIndent 0 → returned byte-identical (after \r\n
|
|
18
|
+
* normalization), so existing behavior is unchanged.
|
|
19
|
+
* - A uniformly indented patch (wrapper indent N) has every line stripped by
|
|
20
|
+
* exactly N chars: `+`/`-`/`\` markers return to column 0 and context lines
|
|
21
|
+
* keep their structural space marker (position N+1 is content, not wrapper).
|
|
22
|
+
* - Empty lines (and whitespace-only lines) are skipped when computing the
|
|
23
|
+
* minimum indent. Truly empty lines (`line.length === 0`) carry no
|
|
24
|
+
* characters so the length-guarded slice leaves them intact. Whitespace-only
|
|
25
|
+
* lines whose length is >= minIndent ARE sliced to the prefix-stripped
|
|
26
|
+
* remainder (e.g. a 3-space line with minIndent=3 becomes ''), which is
|
|
27
|
+
* safe for downstream parsers because they treat whitespace-only lines as
|
|
28
|
+
* no-content.
|
|
29
|
+
* - Mixed indentation (some lines shallower than others) yields minIndent 0 →
|
|
30
|
+
* no-op; the payload fails to parse exactly as it does today (fail-clean,
|
|
31
|
+
* no corruption).
|
|
32
|
+
*/
|
|
33
|
+
export declare function normalizePatchIndentation(text: string): string;
|
|
@@ -23,6 +23,36 @@ export declare function settleCoderDispatch(options: {
|
|
|
23
23
|
testEngineerExempt: boolean;
|
|
24
24
|
settlementFailed?: boolean;
|
|
25
25
|
}): Promise<CoderSettlementResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Abort a DISPATCHED settlement (issue #2214): the settlement's launch
|
|
28
|
+
* baseline can never support attribution, so the dispatch must reach a
|
|
29
|
+
* terminal state instead of wedging at DISPATCHED with an un-releasable
|
|
30
|
+
* in-memory ownership key. Idempotent: an already-ABORTED WAL is a no-op;
|
|
31
|
+
* PREPARED/COMMITTED WALs are recoverable/terminal and are left untouched.
|
|
32
|
+
*
|
|
33
|
+
* Callers already holding the settlement lock must use
|
|
34
|
+
* `abortDispatchedWalUnderLock` instead — this entry point acquires the lock.
|
|
35
|
+
*/
|
|
36
|
+
export declare function abortCoderSettlement(options: {
|
|
37
|
+
directory: string;
|
|
38
|
+
taskId: string;
|
|
39
|
+
transitionId: string;
|
|
40
|
+
reason: string;
|
|
41
|
+
}): Promise<'aborted' | 'not-dispatched' | 'already-aborted'>;
|
|
42
|
+
/**
|
|
43
|
+
* Abort a DISPATCHED settlement only when its own recorded launch baseline
|
|
44
|
+
* was structurally attribution-doomed (non-git or dirty at dispatch — the
|
|
45
|
+
* pre-fix #2214 wedge class). Transient capture failures (gitHead present)
|
|
46
|
+
* stay recoverable and are NOT aborted. Returns the terminal outcome so
|
|
47
|
+
* callers can distinguish a fresh abort, an already-terminal settlement, and
|
|
48
|
+
* a WAL that must stay recoverable (PRR-009: the already-aborted case is
|
|
49
|
+
* terminal, not a durability failure).
|
|
50
|
+
*/
|
|
51
|
+
export declare function abortCoderSettlementIfDoomed(options: {
|
|
52
|
+
directory: string;
|
|
53
|
+
taskId: string;
|
|
54
|
+
transitionId: string;
|
|
55
|
+
}): Promise<'aborted' | 'already-aborted' | 'not-doomed'>;
|
|
26
56
|
export declare function recordCoderMergeProvenance(options: {
|
|
27
57
|
directory: string;
|
|
28
58
|
taskId: string;
|
|
@@ -19,6 +19,8 @@ export interface CoderSettlementWal {
|
|
|
19
19
|
testEngineerExempt?: boolean;
|
|
20
20
|
settlementFailed?: boolean;
|
|
21
21
|
cleanupComplete?: boolean;
|
|
22
|
+
/** Human-readable abort explanation; string of 1..512 chars, present on ABORTED WALs (issue #2214). */
|
|
23
|
+
abortReason?: string;
|
|
22
24
|
recordedAt: string;
|
|
23
25
|
}
|
|
24
26
|
export type RepairWalState = 'ABORTED' | 'COMMITTED' | 'PREPARED';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.143.
|
|
3
|
+
"version": "7.143.2",
|
|
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",
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
computeTaskSetContentHash,
|
|
19
19
|
resolveContainedExistingPath
|
|
20
20
|
} from "./index-y8552snf.js";
|
|
21
|
-
import {
|
|
22
|
-
bunSpawn
|
|
23
|
-
} from "./index-4nt52yr9.js";
|
|
24
21
|
import {
|
|
25
22
|
exports_external,
|
|
26
23
|
init_zod
|
|
27
24
|
} from "./index-bpmtbmy9.js";
|
|
25
|
+
import {
|
|
26
|
+
bunSpawn
|
|
27
|
+
} from "./index-4nt52yr9.js";
|
|
28
28
|
|
|
29
29
|
// src/evaluation/runner.ts
|
|
30
30
|
import * as fs3 from "fs";
|