opencode-swarm 7.129.2 → 7.129.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.
- package/dist/background/workspace-snapshot.d.ts +30 -0
- package/dist/cli/{curation-policy-vn1ybh31.js → curation-policy-s08pg90f.js} +2 -2
- package/dist/cli/{curator-rtpbkffc.js → curator-6ggzktne.js} +11 -11
- package/dist/cli/{curator-llm-factory-5dcetzsz.js → curator-llm-factory-w6ep20tm.js} +11 -11
- package/dist/cli/{dispatch-f4hj1cj7.js → dispatch-3mhgqj2x.js} +1 -1
- package/dist/cli/{guardrail-explain-27xbz1h2.js → guardrail-explain-0gr9wkj0.js} +12 -12
- package/dist/cli/{hive-promoter-7x33c575.js → hive-promoter-4x3470c9.js} +11 -11
- package/dist/cli/{index-s7tsx4v9.js → index-803bqrzq.js} +12 -12
- package/dist/cli/{index-wy5jy3m9.js → index-8fy8q1px.js} +3 -3
- package/dist/cli/{index-6n2jpz7x.js → index-9f71ye47.js} +2 -2
- package/dist/cli/{index-kj86tyrs.js → index-bz814zsm.js} +1 -1
- package/dist/cli/{index-40zn444p.js → index-f2y46pda.js} +179 -1
- package/dist/cli/{index-5fnc76da.js → index-hbbj7ktj.js} +1 -1
- package/dist/cli/{index-vpjvqkdq.js → index-hn1dxcr3.js} +1 -1
- package/dist/cli/{index-ate4rw9q.js → index-jke1z4f2.js} +59 -43
- package/dist/cli/{index-m8vrw3pt.js → index-mgz9nm4a.js} +4 -4
- package/dist/cli/{index-w2kp2zvf.js → index-n08cksd6.js} +3 -3
- package/dist/cli/{index-kxw2sx1d.js → index-nbdge8b6.js} +1 -1
- package/dist/cli/{index-pgyp3tta.js → index-nhexgq4a.js} +1 -1
- package/dist/cli/{index-waqvy9a5.js → index-x7wt1g4w.js} +2 -2
- package/dist/cli/{index-6w02qz7t.js → index-yxz0c97p.js} +10 -8
- package/dist/cli/index.js +11 -11
- package/dist/cli/{knowledge-escalator-5ytt2y9n.js → knowledge-escalator-jjyn29ht.js} +3 -3
- package/dist/cli/{knowledge-events-qnyfrsfv.js → knowledge-events-f75n3916.js} +1 -1
- package/dist/cli/{knowledge-store-yeybvcqw.js → knowledge-store-7sahm702.js} +1 -1
- package/dist/cli/{knowledge-validator-g2c4mbwa.js → knowledge-validator-rjwvafv3.js} +4 -4
- package/dist/cli/{scan-cursor-c5mcce5r.js → scan-cursor-518rhxyd.js} +2 -2
- package/dist/cli/{skill-generator-c77e0y98.js → skill-generator-hk6mc7pc.js} +5 -5
- package/dist/cli/{workspace-snapshot-aa0ggevw.js → workspace-snapshot-jwkjg790.js} +21 -1
- package/dist/hooks/pr-workflow-gate.d.ts +11 -3
- package/dist/index.js +13 -11
- package/dist/services/directive-predicate-runner.d.ts +6 -0
- package/dist/tools/dispatch-lanes.d.ts +3 -3
- package/dist/tools/run-pr-feedback-stage-a.d.ts +5 -1
- package/package.json +1 -1
- package/dist/config/loader-recovery.d.ts +0 -95
|
@@ -19,8 +19,18 @@ interface CaptureWorkspaceSnapshotOptions {
|
|
|
19
19
|
export declare function readGitTextAtRevision(directory: string, revision: string, relativePath: string): string | null;
|
|
20
20
|
/** Resolve the exact checked-out commit through the bounded Git snapshot path. */
|
|
21
21
|
export declare function resolveCurrentGitHead(directory: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Async twin of {@link resolveCurrentGitHead}. PR-workflow gate/dispatch binding
|
|
24
|
+
* runs on the host tool/hook path, so HEAD verification must resolve Git off the
|
|
25
|
+
* blocking `spawnSync` path — a synchronous spawn on the long-running host (most
|
|
26
|
+
* acutely under Bun on Windows) can hang to its bound instead of returning, which
|
|
27
|
+
* a fail-closed gate would surface as a spurious "cannot resolve HEAD" block.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveCurrentGitHeadAsync(directory: string): Promise<string | null>;
|
|
22
30
|
/** Resolve one exact PR merge base without shell interpolation or unbounded I/O. */
|
|
23
31
|
export declare function resolveExactMergeBase(directory: string, baseRef: string, prHeadSha: string): string | null;
|
|
32
|
+
/** Async twin of {@link resolveExactMergeBase} for the gate/dispatch bind path. */
|
|
33
|
+
export declare function resolveExactMergeBaseAsync(directory: string, baseRef: string, prHeadSha: string): Promise<string | null>;
|
|
24
34
|
export interface PrReviewDiffStats {
|
|
25
35
|
changedLines: number;
|
|
26
36
|
changedFiles: number;
|
|
@@ -41,6 +51,8 @@ export interface PrReviewDiffStats {
|
|
|
41
51
|
* git version/config.
|
|
42
52
|
*/
|
|
43
53
|
export declare function resolvePrReviewDiffStats(directory: string, baseSha: string, prHeadSha: string): PrReviewDiffStats | null;
|
|
54
|
+
/** Async twin of {@link resolvePrReviewDiffStats} used off the blocking spawn on the gate/dispatch bind path. */
|
|
55
|
+
export declare function resolvePrReviewDiffStatsAsync(directory: string, baseSha: string, prHeadSha: string): Promise<PrReviewDiffStats | null>;
|
|
44
56
|
/** Resolve the current branch's exact remote-tracking publication target. */
|
|
45
57
|
export declare function resolveCurrentUpstreamRemoteRef(directory: string): string | null;
|
|
46
58
|
export interface PrUpstreamPushTarget {
|
|
@@ -50,22 +62,40 @@ export interface PrUpstreamPushTarget {
|
|
|
50
62
|
}
|
|
51
63
|
/** Resolve a branch's upstream without guessing where a remote name ends. */
|
|
52
64
|
export declare function resolveCurrentUpstreamPushTarget(directory: string): PrUpstreamPushTarget | null;
|
|
65
|
+
/** Async twin of {@link resolveCurrentUpstreamPushTarget} used off the blocking spawn on the gate/dispatch bind path. */
|
|
66
|
+
export declare function resolveCurrentUpstreamPushTargetAsync(directory: string): Promise<PrUpstreamPushTarget | null>;
|
|
53
67
|
/** Query the actual remote ref; local tracking refs are not publication proof. */
|
|
54
68
|
export declare function resolveExactRemoteBranchHead(directory: string, remoteName: string, remoteBranchRef: string): string | null;
|
|
69
|
+
/** Async twin of {@link resolveExactRemoteBranchHead} for the gate bind/publish path. */
|
|
70
|
+
export declare function resolveExactRemoteBranchHeadAsync(directory: string, remoteName: string, remoteBranchRef: string): Promise<string | null>;
|
|
55
71
|
/** Bind Stage-A execution to Git refs, config, HEAD, and index metadata. */
|
|
56
72
|
export declare function resolveGitControlStateDigest(directory: string): string | null;
|
|
73
|
+
/** Async twin of {@link resolveGitControlStateDigest} used off the blocking spawn on the gate/dispatch bind path. */
|
|
74
|
+
export declare function resolveGitControlStateDigestAsync(directory: string): Promise<string | null>;
|
|
57
75
|
/** Require all independently reviewed content to be captured by the commit. */
|
|
58
76
|
export declare function resolveIsWorkingTreeClean(directory: string): boolean | null;
|
|
77
|
+
/**
|
|
78
|
+
* Async twin of {@link resolveIsWorkingTreeClean} for the gate/dispatch bind path.
|
|
79
|
+
* `git status` emits far more output than `rev-parse`, so it is the most exposed
|
|
80
|
+
* of the bind-path checks to a blocking synchronous spawn stalling the host.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveIsWorkingTreeCleanAsync(directory: string): Promise<boolean | null>;
|
|
59
83
|
/** Count commits on the ancestry path from the immutable intake head to HEAD. */
|
|
60
84
|
export declare function resolveCommitCountSince(directory: string, baseHeadSha: string, currentHeadSha: string): number | null;
|
|
85
|
+
/** Async twin of {@link resolveCommitCountSince} used off the blocking spawn on the gate/dispatch bind path. */
|
|
86
|
+
export declare function resolveCommitCountSinceAsync(directory: string, baseHeadSha: string, currentHeadSha: string): Promise<number | null>;
|
|
61
87
|
/** Prove the publication commit is a non-merge direct child of intake HEAD. */
|
|
62
88
|
export declare function resolveIsExactSingleChildCommit(directory: string, baseHeadSha: string, currentHeadSha: string): boolean | null;
|
|
89
|
+
/** Async twin of {@link resolveIsExactSingleChildCommit} used off the blocking spawn on the gate/dispatch bind path. */
|
|
90
|
+
export declare function resolveIsExactSingleChildCommitAsync(directory: string, baseHeadSha: string, currentHeadSha: string): Promise<boolean | null>;
|
|
63
91
|
/**
|
|
64
92
|
* Return remote-tracking refs whose tip equals the exact checked-out commit.
|
|
65
93
|
* Publication closeout uses this bounded local observation after a successful
|
|
66
94
|
* push; an empty list is not proof that the approved revision was published.
|
|
67
95
|
*/
|
|
68
96
|
export declare function resolveRemoteRefsContainingHead(directory: string, headSha: string): string[] | null;
|
|
97
|
+
/** Async twin of {@link resolveRemoteRefsContainingHead} used off the blocking spawn on the gate/dispatch bind path. */
|
|
98
|
+
export declare function resolveRemoteRefsContainingHeadAsync(directory: string, headSha: string): Promise<string[] | null>;
|
|
69
99
|
/**
|
|
70
100
|
* Bind a mutable working tree to its actual content, not merely porcelain status.
|
|
71
101
|
* This lets PR-feedback approvals fail closed when a same-path edit occurs after a
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-nhexgq4a.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-bz814zsm.js";
|
|
10
10
|
import"./index-ae75rja9.js";
|
|
11
11
|
import"./index-q27bajqb.js";
|
|
12
12
|
import"./index-zgwm4ryv.js";
|
|
@@ -14,28 +14,28 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-jke1z4f2.js";
|
|
18
18
|
import"./index-v4n224r1.js";
|
|
19
19
|
import"./index-cpssctv1.js";
|
|
20
20
|
import"./index-kzvwb2se.js";
|
|
21
21
|
import"./index-4905hd2m.js";
|
|
22
22
|
import"./index-134d35c1.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
23
|
+
import"./index-9f71ye47.js";
|
|
24
|
+
import"./index-8fy8q1px.js";
|
|
25
|
+
import"./index-mgz9nm4a.js";
|
|
26
|
+
import"./index-hbbj7ktj.js";
|
|
27
27
|
import"./index-vxv732ex.js";
|
|
28
28
|
import"./index-c8s9a3zh.js";
|
|
29
29
|
import"./index-9ss2m4rs.js";
|
|
30
30
|
import"./index-g4mnf3p5.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
31
|
+
import"./index-x7wt1g4w.js";
|
|
32
|
+
import"./index-nhexgq4a.js";
|
|
33
33
|
import"./index-rtry5xyf.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-n08cksd6.js";
|
|
35
|
+
import"./index-bz814zsm.js";
|
|
36
36
|
import"./index-ae75rja9.js";
|
|
37
37
|
import"./index-q27bajqb.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-yxz0c97p.js";
|
|
39
39
|
import"./index-k5jrywpr.js";
|
|
40
40
|
import"./index-n832052r.js";
|
|
41
41
|
import"./index-7ttstfv6.js";
|
|
@@ -52,7 +52,7 @@ import"./index-s80bsjkj.js";
|
|
|
52
52
|
import"./index-z6xqpmqg.js";
|
|
53
53
|
import"./index-zjygnfay.js";
|
|
54
54
|
import"./index-zgwm4ryv.js";
|
|
55
|
-
import"./index-
|
|
55
|
+
import"./index-f2y46pda.js";
|
|
56
56
|
import"./index-3x761jqv.js";
|
|
57
57
|
import"./index-7mkpsw6g.js";
|
|
58
58
|
import"./index-fsrp8wp3.js";
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jke1z4f2.js";
|
|
5
5
|
import"./index-v4n224r1.js";
|
|
6
6
|
import"./index-cpssctv1.js";
|
|
7
7
|
import"./index-kzvwb2se.js";
|
|
8
8
|
import"./index-4905hd2m.js";
|
|
9
9
|
import"./index-134d35c1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
import"./index-9f71ye47.js";
|
|
11
|
+
import"./index-8fy8q1px.js";
|
|
12
|
+
import"./index-mgz9nm4a.js";
|
|
13
|
+
import"./index-hbbj7ktj.js";
|
|
14
14
|
import"./index-vxv732ex.js";
|
|
15
15
|
import"./index-c8s9a3zh.js";
|
|
16
16
|
import"./index-9ss2m4rs.js";
|
|
17
17
|
import"./index-g4mnf3p5.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-x7wt1g4w.js";
|
|
19
|
+
import"./index-nhexgq4a.js";
|
|
20
20
|
import"./index-rtry5xyf.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
import"./index-n08cksd6.js";
|
|
22
|
+
import"./index-bz814zsm.js";
|
|
23
23
|
import"./index-ae75rja9.js";
|
|
24
24
|
import"./index-q27bajqb.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-yxz0c97p.js";
|
|
26
26
|
import"./index-k5jrywpr.js";
|
|
27
27
|
import"./index-n832052r.js";
|
|
28
28
|
import"./index-7ttstfv6.js";
|
|
@@ -39,7 +39,7 @@ import"./index-s80bsjkj.js";
|
|
|
39
39
|
import"./index-z6xqpmqg.js";
|
|
40
40
|
import"./index-zjygnfay.js";
|
|
41
41
|
import"./index-zgwm4ryv.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-f2y46pda.js";
|
|
43
43
|
import"./index-3x761jqv.js";
|
|
44
44
|
import"./index-7mkpsw6g.js";
|
|
45
45
|
import"./index-fsrp8wp3.js";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-hn1dxcr3.js";
|
|
5
|
+
import"./index-jke1z4f2.js";
|
|
6
6
|
import"./index-v4n224r1.js";
|
|
7
7
|
import"./index-cpssctv1.js";
|
|
8
8
|
import"./index-kzvwb2se.js";
|
|
9
9
|
import"./index-4905hd2m.js";
|
|
10
10
|
import"./index-134d35c1.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
11
|
+
import"./index-9f71ye47.js";
|
|
12
|
+
import"./index-8fy8q1px.js";
|
|
13
|
+
import"./index-mgz9nm4a.js";
|
|
14
|
+
import"./index-hbbj7ktj.js";
|
|
15
15
|
import"./index-vxv732ex.js";
|
|
16
16
|
import"./index-c8s9a3zh.js";
|
|
17
17
|
import"./index-9ss2m4rs.js";
|
|
18
18
|
import"./index-g4mnf3p5.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-x7wt1g4w.js";
|
|
20
|
+
import"./index-nhexgq4a.js";
|
|
21
21
|
import"./index-rtry5xyf.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-n08cksd6.js";
|
|
23
|
+
import"./index-bz814zsm.js";
|
|
24
24
|
import"./index-ae75rja9.js";
|
|
25
25
|
import"./index-q27bajqb.js";
|
|
26
|
-
import"./index-
|
|
26
|
+
import"./index-yxz0c97p.js";
|
|
27
27
|
import"./index-k5jrywpr.js";
|
|
28
28
|
import"./index-n832052r.js";
|
|
29
29
|
import"./index-7ttstfv6.js";
|
|
@@ -40,7 +40,7 @@ import"./index-s80bsjkj.js";
|
|
|
40
40
|
import"./index-z6xqpmqg.js";
|
|
41
41
|
import"./index-zjygnfay.js";
|
|
42
42
|
import"./index-zgwm4ryv.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-f2y46pda.js";
|
|
44
44
|
import"./index-3x761jqv.js";
|
|
45
45
|
import"./index-7mkpsw6g.js";
|
|
46
46
|
import"./index-fsrp8wp3.js";
|
|
@@ -7,30 +7,30 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-jke1z4f2.js";
|
|
11
11
|
import"./index-v4n224r1.js";
|
|
12
12
|
import"./index-cpssctv1.js";
|
|
13
13
|
import"./index-kzvwb2se.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
16
|
+
import"./index-9f71ye47.js";
|
|
17
|
+
import"./index-8fy8q1px.js";
|
|
18
|
+
import"./index-mgz9nm4a.js";
|
|
19
|
+
import"./index-hbbj7ktj.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-g4mnf3p5.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-x7wt1g4w.js";
|
|
25
|
+
import"./index-nhexgq4a.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveHiveKnowledgePath
|
|
29
|
-
} from "./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
} from "./index-n08cksd6.js";
|
|
30
|
+
import"./index-bz814zsm.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-yxz0c97p.js";
|
|
34
34
|
import"./index-k5jrywpr.js";
|
|
35
35
|
import"./index-n832052r.js";
|
|
36
36
|
import"./index-7ttstfv6.js";
|
|
@@ -47,7 +47,7 @@ import"./index-s80bsjkj.js";
|
|
|
47
47
|
import"./index-z6xqpmqg.js";
|
|
48
48
|
import"./index-zjygnfay.js";
|
|
49
49
|
import"./index-zgwm4ryv.js";
|
|
50
|
-
import"./index-
|
|
50
|
+
import"./index-f2y46pda.js";
|
|
51
51
|
import"./index-3x761jqv.js";
|
|
52
52
|
import"./index-7mkpsw6g.js";
|
|
53
53
|
import"./index-fsrp8wp3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-hn1dxcr3.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
7
|
} from "./index-8etcyr9r.js";
|
|
@@ -83,28 +83,28 @@ import {
|
|
|
83
83
|
handleWriteRetroCommand,
|
|
84
84
|
normalizeSwarmCommandInput,
|
|
85
85
|
resolveCommand
|
|
86
|
-
} from "./index-
|
|
86
|
+
} from "./index-jke1z4f2.js";
|
|
87
87
|
import"./index-v4n224r1.js";
|
|
88
88
|
import"./index-cpssctv1.js";
|
|
89
89
|
import"./index-kzvwb2se.js";
|
|
90
90
|
import"./index-4905hd2m.js";
|
|
91
91
|
import"./index-134d35c1.js";
|
|
92
|
-
import"./index-
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
92
|
+
import"./index-9f71ye47.js";
|
|
93
|
+
import"./index-8fy8q1px.js";
|
|
94
|
+
import"./index-mgz9nm4a.js";
|
|
95
|
+
import"./index-hbbj7ktj.js";
|
|
96
96
|
import"./index-vxv732ex.js";
|
|
97
97
|
import"./index-c8s9a3zh.js";
|
|
98
98
|
import"./index-9ss2m4rs.js";
|
|
99
99
|
import"./index-g4mnf3p5.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
100
|
+
import"./index-x7wt1g4w.js";
|
|
101
|
+
import"./index-nhexgq4a.js";
|
|
102
102
|
import"./index-rtry5xyf.js";
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
103
|
+
import"./index-n08cksd6.js";
|
|
104
|
+
import"./index-bz814zsm.js";
|
|
105
105
|
import"./index-ae75rja9.js";
|
|
106
106
|
import"./index-q27bajqb.js";
|
|
107
|
-
import"./index-
|
|
107
|
+
import"./index-yxz0c97p.js";
|
|
108
108
|
import"./index-k5jrywpr.js";
|
|
109
109
|
import"./index-n832052r.js";
|
|
110
110
|
import {
|
|
@@ -127,7 +127,7 @@ import"./index-s80bsjkj.js";
|
|
|
127
127
|
import"./index-z6xqpmqg.js";
|
|
128
128
|
import"./index-zjygnfay.js";
|
|
129
129
|
import"./index-zgwm4ryv.js";
|
|
130
|
-
import"./index-
|
|
130
|
+
import"./index-f2y46pda.js";
|
|
131
131
|
import"./index-3x761jqv.js";
|
|
132
132
|
import"./index-7mkpsw6g.js";
|
|
133
133
|
import"./index-fsrp8wp3.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-x7wt1g4w.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-n08cksd6.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-bz814zsm.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -13676,9 +13676,9 @@ function isCommandAvailable(command) {
|
|
|
13676
13676
|
return toolchainCache.get(command);
|
|
13677
13677
|
}
|
|
13678
13678
|
const isWindows = process.platform === "win32";
|
|
13679
|
-
const cmd = isWindows ? `${command}.exe` : command;
|
|
13680
13679
|
try {
|
|
13681
|
-
const
|
|
13680
|
+
const searchName = isWindows ? command : command;
|
|
13681
|
+
const result = _internals.spawnSyncImpl(isWindows ? ["where", searchName] : ["which", searchName], {
|
|
13682
13682
|
cwd: process.cwd(),
|
|
13683
13683
|
stdin: "ignore",
|
|
13684
13684
|
stdout: "ignore",
|
|
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
608
|
deltas.push({ id, delta });
|
|
609
609
|
}
|
|
610
610
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
611
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-7sahm702.js");
|
|
612
612
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
@@ -86,12 +86,30 @@ function readGitTextAtRevision(directory, revision, relativePath) {
|
|
|
86
86
|
function resolveCurrentGitHead(directory) {
|
|
87
87
|
return runGit(directory, ["rev-parse", "--verify", "HEAD^{commit}"]);
|
|
88
88
|
}
|
|
89
|
+
async function resolveCurrentGitHeadAsync(directory) {
|
|
90
|
+
return await runGitAsync(directory, [
|
|
91
|
+
"rev-parse",
|
|
92
|
+
"--verify",
|
|
93
|
+
"HEAD^{commit}"
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
89
96
|
function resolveExactMergeBase(directory, baseRef, prHeadSha) {
|
|
90
97
|
if (!isSafeGitRevisionToken(baseRef) || !isSafeGitRevisionToken(prHeadSha))
|
|
91
98
|
return null;
|
|
92
99
|
const mergeBase = runGit(directory, ["merge-base", "--", baseRef, prHeadSha]);
|
|
93
100
|
return mergeBase && /^[0-9a-f]{6,64}$/i.test(mergeBase) ? mergeBase : null;
|
|
94
101
|
}
|
|
102
|
+
async function resolveExactMergeBaseAsync(directory, baseRef, prHeadSha) {
|
|
103
|
+
if (!isSafeGitRevisionToken(baseRef) || !isSafeGitRevisionToken(prHeadSha))
|
|
104
|
+
return null;
|
|
105
|
+
const mergeBase = await runGitAsync(directory, [
|
|
106
|
+
"merge-base",
|
|
107
|
+
"--",
|
|
108
|
+
baseRef,
|
|
109
|
+
prHeadSha
|
|
110
|
+
]);
|
|
111
|
+
return mergeBase && /^[0-9a-f]{6,64}$/i.test(mergeBase) ? mergeBase : null;
|
|
112
|
+
}
|
|
95
113
|
var GITLINK_MODE_PATTERN = /^:\d{6} 160000 |^:160000 \d{6} /;
|
|
96
114
|
function resolvePrReviewDiffStats(directory, baseSha, prHeadSha) {
|
|
97
115
|
if (!isSafeGitRevisionToken(baseSha) || !isSafeGitRevisionToken(prHeadSha))
|
|
@@ -129,6 +147,42 @@ function resolvePrReviewDiffStats(directory, baseSha, prHeadSha) {
|
|
|
129
147
|
`).some((line) => GITLINK_MODE_PATTERN.test(line.trim()));
|
|
130
148
|
return { changedLines, changedFiles, hasSubmoduleChange };
|
|
131
149
|
}
|
|
150
|
+
async function resolvePrReviewDiffStatsAsync(directory, baseSha, prHeadSha) {
|
|
151
|
+
if (!isSafeGitRevisionToken(baseSha) || !isSafeGitRevisionToken(prHeadSha))
|
|
152
|
+
return null;
|
|
153
|
+
const range = `${baseSha}...${prHeadSha}`;
|
|
154
|
+
const output = await runGitAsync(directory, [
|
|
155
|
+
"diff",
|
|
156
|
+
"--no-renames",
|
|
157
|
+
"--numstat",
|
|
158
|
+
range
|
|
159
|
+
]);
|
|
160
|
+
if (output === null)
|
|
161
|
+
return null;
|
|
162
|
+
let changedLines = 0;
|
|
163
|
+
let changedFiles = 0;
|
|
164
|
+
for (const line of output.split(`
|
|
165
|
+
`)) {
|
|
166
|
+
const trimmed = line.trim();
|
|
167
|
+
if (trimmed.length === 0)
|
|
168
|
+
continue;
|
|
169
|
+
const fields = trimmed.split("\t");
|
|
170
|
+
if (fields.length < 3)
|
|
171
|
+
return null;
|
|
172
|
+
const added = fields[0] === "-" ? 0 : Number.parseInt(fields[0], 10);
|
|
173
|
+
const deleted = fields[1] === "-" ? 0 : Number.parseInt(fields[1], 10);
|
|
174
|
+
if (Number.isNaN(added) || Number.isNaN(deleted))
|
|
175
|
+
return null;
|
|
176
|
+
changedFiles += 1;
|
|
177
|
+
changedLines += added + deleted;
|
|
178
|
+
}
|
|
179
|
+
const rawOutput = await runGitAsync(directory, ["diff", "--raw", range]);
|
|
180
|
+
if (rawOutput === null)
|
|
181
|
+
return null;
|
|
182
|
+
const hasSubmoduleChange = rawOutput.split(`
|
|
183
|
+
`).some((line) => GITLINK_MODE_PATTERN.test(line.trim()));
|
|
184
|
+
return { changedLines, changedFiles, hasSubmoduleChange };
|
|
185
|
+
}
|
|
132
186
|
function isSafeGitRevisionToken(value) {
|
|
133
187
|
return /^(?!-)[A-Za-z0-9][A-Za-z0-9._/-]{0,255}$/.test(value) && !value.includes("..") && !value.includes("//") && !value.includes("@{");
|
|
134
188
|
}
|
|
@@ -160,6 +214,27 @@ function resolveCurrentUpstreamPushTarget(directory) {
|
|
|
160
214
|
}
|
|
161
215
|
return { remoteName, remoteBranchRef, remoteTrackingRef };
|
|
162
216
|
}
|
|
217
|
+
async function resolveCurrentUpstreamPushTargetAsync(directory) {
|
|
218
|
+
const localBranchRef = await runGitAsync(directory, [
|
|
219
|
+
"symbolic-ref",
|
|
220
|
+
"--quiet",
|
|
221
|
+
"HEAD"
|
|
222
|
+
]);
|
|
223
|
+
if (!localBranchRef?.startsWith("refs/heads/"))
|
|
224
|
+
return null;
|
|
225
|
+
const encoded = await runGitAsync(directory, [
|
|
226
|
+
"for-each-ref",
|
|
227
|
+
"--format=%(upstream:remotename)%00%(upstream:remoteref)%00%(upstream)",
|
|
228
|
+
localBranchRef
|
|
229
|
+
]);
|
|
230
|
+
if (!encoded)
|
|
231
|
+
return null;
|
|
232
|
+
const [remoteName, remoteBranchRef, remoteTrackingRef, ...extras] = encoded.split("\x00");
|
|
233
|
+
if (extras.length > 0 || !remoteName || remoteName.startsWith("-") || /[\s;&|<>`]/.test(remoteName) || !remoteBranchRef?.startsWith("refs/heads/") || remoteBranchRef === "refs/heads/" || /[\s;&|<>`]/.test(remoteBranchRef) || !remoteTrackingRef?.startsWith("refs/remotes/") || remoteTrackingRef.endsWith("/HEAD")) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return { remoteName, remoteBranchRef, remoteTrackingRef };
|
|
237
|
+
}
|
|
163
238
|
function resolveExactRemoteBranchHead(directory, remoteName, remoteBranchRef) {
|
|
164
239
|
if (!remoteName || remoteName.startsWith("-") || /[\s;&|<>`]/.test(remoteName) || !remoteBranchRef.startsWith("refs/heads/") || remoteBranchRef === "refs/heads/" || /[\s;&|<>`]/.test(remoteBranchRef)) {
|
|
165
240
|
return null;
|
|
@@ -176,6 +251,22 @@ function resolveExactRemoteBranchHead(directory, remoteName, remoteBranchRef) {
|
|
|
176
251
|
}
|
|
177
252
|
return objectName;
|
|
178
253
|
}
|
|
254
|
+
async function resolveExactRemoteBranchHeadAsync(directory, remoteName, remoteBranchRef) {
|
|
255
|
+
if (!remoteName || remoteName.startsWith("-") || /[\s;&|<>`]/.test(remoteName) || !remoteBranchRef.startsWith("refs/heads/") || remoteBranchRef === "refs/heads/" || /[\s;&|<>`]/.test(remoteBranchRef)) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
const output = await runGitAsync(directory, ["ls-remote", "--exit-code", "--heads", remoteName, remoteBranchRef], 20000);
|
|
259
|
+
if (!output)
|
|
260
|
+
return null;
|
|
261
|
+
const rows = output.split(/\r?\n/).filter(Boolean);
|
|
262
|
+
if (rows.length !== 1)
|
|
263
|
+
return null;
|
|
264
|
+
const [objectName, refName, ...extras] = rows[0].split(/\s+/);
|
|
265
|
+
if (extras.length > 0 || refName !== remoteBranchRef || !objectName || !(/^[0-9a-f]{40}$/i.test(objectName) || /^[0-9a-f]{64}$/i.test(objectName))) {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
return objectName;
|
|
269
|
+
}
|
|
179
270
|
function resolveGitControlStateDigest(directory) {
|
|
180
271
|
const head = runGit(directory, ["rev-parse", "--verify", "HEAD^{commit}"]);
|
|
181
272
|
const symbolicHead = runGit(directory, ["symbolic-ref", "--quiet", "HEAD"]);
|
|
@@ -200,6 +291,38 @@ function resolveGitControlStateDigest(directory) {
|
|
|
200
291
|
}
|
|
201
292
|
return digest(`head\x00${head}\x00symbolic\x00${symbolicHead}\x00upstream\x00${upstream.remoteName}\x00${upstream.remoteBranchRef}\x00${upstream.remoteTrackingRef}\x00refs\x00${refs}\x00config\x00${config}\x00index\x00${index}`);
|
|
202
293
|
}
|
|
294
|
+
async function resolveGitControlStateDigestAsync(directory) {
|
|
295
|
+
const head = await runGitAsync(directory, [
|
|
296
|
+
"rev-parse",
|
|
297
|
+
"--verify",
|
|
298
|
+
"HEAD^{commit}"
|
|
299
|
+
]);
|
|
300
|
+
const symbolicHead = await runGitAsync(directory, [
|
|
301
|
+
"symbolic-ref",
|
|
302
|
+
"--quiet",
|
|
303
|
+
"HEAD"
|
|
304
|
+
]);
|
|
305
|
+
const upstream = await resolveCurrentUpstreamPushTargetAsync(directory);
|
|
306
|
+
const refs = await runGitAsync(directory, [
|
|
307
|
+
"for-each-ref",
|
|
308
|
+
"--format=%(refname)%00%(objectname)",
|
|
309
|
+
"refs/heads",
|
|
310
|
+
"refs/remotes",
|
|
311
|
+
"refs/tags"
|
|
312
|
+
]);
|
|
313
|
+
const config = await runGitAsync(directory, [
|
|
314
|
+
"config",
|
|
315
|
+
"--null",
|
|
316
|
+
"--show-origin",
|
|
317
|
+
"--show-scope",
|
|
318
|
+
"--list"
|
|
319
|
+
]);
|
|
320
|
+
const index = await runGitAsync(directory, ["ls-files", "--stage", "-z"]);
|
|
321
|
+
if (head === null || symbolicHead === null || !upstream || refs === null || config === null || index === null) {
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
return digest(`head\x00${head}\x00symbolic\x00${symbolicHead}\x00upstream\x00${upstream.remoteName}\x00${upstream.remoteBranchRef}\x00${upstream.remoteTrackingRef}\x00refs\x00${refs}\x00config\x00${config}\x00index\x00${index}`);
|
|
325
|
+
}
|
|
203
326
|
function resolveIsWorkingTreeClean(directory) {
|
|
204
327
|
const status = runGit(directory, [
|
|
205
328
|
"status",
|
|
@@ -208,6 +331,14 @@ function resolveIsWorkingTreeClean(directory) {
|
|
|
208
331
|
]);
|
|
209
332
|
return status === null ? null : status.length === 0;
|
|
210
333
|
}
|
|
334
|
+
async function resolveIsWorkingTreeCleanAsync(directory) {
|
|
335
|
+
const status = await runGitAsync(directory, [
|
|
336
|
+
"status",
|
|
337
|
+
"--porcelain=v1",
|
|
338
|
+
"--untracked-files=all"
|
|
339
|
+
]);
|
|
340
|
+
return status === null ? null : status.length === 0;
|
|
341
|
+
}
|
|
211
342
|
function resolveCommitCountSince(directory, baseHeadSha, currentHeadSha) {
|
|
212
343
|
const output = runGit(directory, [
|
|
213
344
|
"rev-list",
|
|
@@ -220,6 +351,18 @@ function resolveCommitCountSince(directory, baseHeadSha, currentHeadSha) {
|
|
|
220
351
|
const count = Number(output);
|
|
221
352
|
return Number.isSafeInteger(count) ? count : null;
|
|
222
353
|
}
|
|
354
|
+
async function resolveCommitCountSinceAsync(directory, baseHeadSha, currentHeadSha) {
|
|
355
|
+
const output = await runGitAsync(directory, [
|
|
356
|
+
"rev-list",
|
|
357
|
+
"--count",
|
|
358
|
+
"--ancestry-path",
|
|
359
|
+
`${baseHeadSha}..${currentHeadSha}`
|
|
360
|
+
]);
|
|
361
|
+
if (!output || !/^\d+$/.test(output))
|
|
362
|
+
return null;
|
|
363
|
+
const count = Number(output);
|
|
364
|
+
return Number.isSafeInteger(count) ? count : null;
|
|
365
|
+
}
|
|
223
366
|
function resolveIsExactSingleChildCommit(directory, baseHeadSha, currentHeadSha) {
|
|
224
367
|
const base = runGit(directory, [
|
|
225
368
|
"rev-parse",
|
|
@@ -245,6 +388,31 @@ function resolveIsExactSingleChildCommit(directory, baseHeadSha, currentHeadSha)
|
|
|
245
388
|
const fields = commitAndParents.trim().split(/\s+/);
|
|
246
389
|
return fields.length === 2 && fields[0]?.toLowerCase() === current.toLowerCase() && fields[1]?.toLowerCase() === base.toLowerCase();
|
|
247
390
|
}
|
|
391
|
+
async function resolveIsExactSingleChildCommitAsync(directory, baseHeadSha, currentHeadSha) {
|
|
392
|
+
const base = await runGitAsync(directory, [
|
|
393
|
+
"rev-parse",
|
|
394
|
+
"--verify",
|
|
395
|
+
`${baseHeadSha}^{commit}`
|
|
396
|
+
]);
|
|
397
|
+
const current = await runGitAsync(directory, [
|
|
398
|
+
"rev-parse",
|
|
399
|
+
"--verify",
|
|
400
|
+
`${currentHeadSha}^{commit}`
|
|
401
|
+
]);
|
|
402
|
+
if (!base || !current)
|
|
403
|
+
return null;
|
|
404
|
+
const commitAndParents = await runGitAsync(directory, [
|
|
405
|
+
"rev-list",
|
|
406
|
+
"--parents",
|
|
407
|
+
"-n",
|
|
408
|
+
"1",
|
|
409
|
+
current
|
|
410
|
+
]);
|
|
411
|
+
if (commitAndParents === null)
|
|
412
|
+
return null;
|
|
413
|
+
const fields = commitAndParents.trim().split(/\s+/);
|
|
414
|
+
return fields.length === 2 && fields[0]?.toLowerCase() === current.toLowerCase() && fields[1]?.toLowerCase() === base.toLowerCase();
|
|
415
|
+
}
|
|
248
416
|
function resolveRemoteRefsContainingHead(directory, headSha) {
|
|
249
417
|
const output = runGit(directory, [
|
|
250
418
|
"for-each-ref",
|
|
@@ -255,6 +423,16 @@ function resolveRemoteRefsContainingHead(directory, headSha) {
|
|
|
255
423
|
return null;
|
|
256
424
|
return output.split(/\r?\n/).map((line) => line.trim().split("\t")).filter(([ref, objectName]) => ref?.startsWith("refs/remotes/") && !ref.endsWith("/HEAD") && objectName?.toLowerCase() === headSha.toLowerCase()).map(([ref]) => ref);
|
|
257
425
|
}
|
|
426
|
+
async function resolveRemoteRefsContainingHeadAsync(directory, headSha) {
|
|
427
|
+
const output = await runGitAsync(directory, [
|
|
428
|
+
"for-each-ref",
|
|
429
|
+
"--format=%(refname)%09%(objectname)",
|
|
430
|
+
"refs/remotes"
|
|
431
|
+
]);
|
|
432
|
+
if (output === null)
|
|
433
|
+
return null;
|
|
434
|
+
return output.split(/\r?\n/).map((line) => line.trim().split("\t")).filter(([ref, objectName]) => ref?.startsWith("refs/remotes/") && !ref.endsWith("/HEAD") && objectName?.toLowerCase() === headSha.toLowerCase()).map(([ref]) => ref);
|
|
435
|
+
}
|
|
258
436
|
function resolvePrWorkflowRevisionDigest(directory, baseHeadSha) {
|
|
259
437
|
const projectRoot = path.resolve(directory);
|
|
260
438
|
const baseHead = runGit(projectRoot, [
|
|
@@ -598,4 +776,4 @@ var _internals = {
|
|
|
598
776
|
parsePorcelainV2Snapshot
|
|
599
777
|
};
|
|
600
778
|
|
|
601
|
-
export { readGitTextAtRevision, resolveCurrentGitHead, resolveExactMergeBase, resolvePrReviewDiffStats, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveExactRemoteBranchHead, resolveGitControlStateDigest, resolveIsWorkingTreeClean, resolveCommitCountSince, resolveIsExactSingleChildCommit, resolveRemoteRefsContainingHead, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|
|
779
|
+
export { readGitTextAtRevision, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveGitControlStateDigest, resolveGitControlStateDigestAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|