opencode-swarm 7.148.0 → 7.148.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/swarm-pr-review/SKILL.md +6 -4
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +33 -1
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +2 -2
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +1 -2
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +11 -3
- package/dist/background/pending-delegations.d.ts +1 -1
- package/dist/background/pr-review-collection-receipt.d.ts +2 -2
- package/dist/background/pr-review-contract.d.ts +148 -0
- package/dist/background/pr-review-trigger-contract.d.ts +1 -0
- package/dist/cli/{config-doctor-z2wam5wn.js → config-doctor-6danhdcy.js} +2 -2
- package/dist/cli/{core-k7m76ce0.js → core-0ghwny8q.js} +1 -1
- package/dist/cli/{curation-policy-kd8j8cne.js → curation-policy-hkdghd3a.js} +6 -6
- package/dist/cli/{curator-llm-factory-4qt8b15s.js → curator-llm-factory-6n47j5qn.js} +27 -27
- package/dist/cli/{curator-jwpm52kg.js → curator-wvm7qbkk.js} +27 -27
- package/dist/cli/{evidence-summary-service-90z295j3.js → evidence-summary-service-0xwrkmf9.js} +11 -11
- package/dist/cli/{gate-evidence-3q6q71fw.js → gate-evidence-6e5yhcy6.js} +6 -6
- package/dist/cli/{guardrail-explain-44xt373y.js → guardrail-explain-tgv7rvap.js} +28 -28
- package/dist/cli/{guardrail-log-kbp5jztb.js → guardrail-log-k0zk6rbs.js} +3 -3
- package/dist/cli/{guardrail-reset-vpazhh8k.js → guardrail-reset-4fw16xmb.js} +27 -27
- package/dist/cli/{hive-promoter-tdrkz9nh.js → hive-promoter-zemwxxw1.js} +27 -27
- package/dist/cli/{index-dfvh1r8g.js → index-03wz9h63.js} +29 -29
- package/dist/cli/{index-d3bdr78h.js → index-092deqxs.js} +2 -1
- package/dist/cli/{index-pgvx3rkq.js → index-2n9rwvcc.js} +1 -1
- package/dist/cli/{index-7hctrdk8.js → index-2zz8b0rb.js} +2 -2
- package/dist/cli/{index-qwj7qjjp.js → index-3pbvdde0.js} +2 -2
- package/dist/cli/{index-ykjjqg79.js → index-5vyej8pc.js} +6 -6
- package/dist/cli/{index-9pmmexsd.js → index-7jaq84cg.js} +1 -1
- package/dist/cli/{index-52gnz782.js → index-84ytts36.js} +4 -4
- package/dist/cli/{index-k6h5yc1j.js → index-crpkb5x6.js} +5 -5
- package/dist/cli/{index-p62we2ar.js → index-ebt47fnp.js} +1 -1
- package/dist/cli/{index-q81s0m8k.js → index-ghbkknjz.js} +79 -38
- package/dist/cli/{index-crpb0qke.js → index-hsq8nyen.js} +4522 -2938
- package/dist/cli/{index-sycndcwd.js → index-k2ad2vtb.js} +1 -1
- package/dist/cli/{index-qcm97jfh.js → index-m5z2fgs4.js} +1 -1
- package/dist/cli/{index-n96wwf56.js → index-mbcyz77e.js} +4 -4
- package/dist/cli/{index-702zx3rk.js → index-mgcffsk0.js} +1 -1
- package/dist/cli/{index-7ac5z627.js → index-ndqhtgrc.js} +1 -1
- package/dist/cli/{index-ffevkn7k.js → index-nqwn8sf0.js} +1 -1
- package/dist/cli/{index-016708th.js → index-nxydm56k.js} +2 -2
- package/dist/cli/{index-dmbaaz6d.js → index-pzt7ed53.js} +4 -4
- package/dist/cli/{index-n0fpefqx.js → index-q6kscnts.js} +4 -4
- package/dist/cli/{index-zwpttdgn.js → index-r9g7ymv2.js} +1 -1
- package/dist/cli/{index-6q35swn2.js → index-rsn4jm90.js} +1 -1
- package/dist/cli/{index-jpa03jcc.js → index-s0nss8c4.js} +1 -1
- package/dist/cli/{index-gwrv6c56.js → index-s0s1e5jp.js} +7 -7
- package/dist/cli/{index-07zgs6y0.js → index-wgrvq2bc.js} +14 -10
- package/dist/cli/{index-y586zet4.js → index-x4kgn37c.js} +2 -2
- package/dist/cli/{index-h879g4r4.js → index-x9jppg8b.js} +3 -3
- package/dist/cli/{index-rcjq8dm4.js → index-x9q0b3a8.js} +2 -2
- package/dist/cli/{index-x4rxh8j9.js → index-xn7h24x4.js} +3 -3
- package/dist/cli/{index-2y14mjfn.js → index-zpn3wqvp.js} +10 -7
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-0qnm48g8.js → knowledge-escalator-rfw35yt1.js} +11 -11
- package/dist/cli/{knowledge-events-3zv81nzp.js → knowledge-events-wmjm5wn6.js} +9 -9
- package/dist/cli/{knowledge-link-w91bcyx2.js → knowledge-link-5dctq0ax.js} +5 -5
- package/dist/cli/{knowledge-store-njtx6wj1.js → knowledge-store-f2ev6s5p.js} +8 -6
- package/dist/cli/{knowledge-validator-7eqj5afv.js → knowledge-validator-6cmwpx9e.js} +8 -8
- package/dist/cli/{pending-delegations-k4x00mqc.js → pending-delegations-h4gr264y.js} +3 -3
- package/dist/cli/{pr-subscriptions-x2mqc3f1.js → pr-subscriptions-9mg6mwc0.js} +3 -3
- package/dist/cli/{runner-gfzkp9nv.js → runner-9g2pcg10.js} +6 -6
- package/dist/cli/{scan-cursor-a6dhyf55.js → scan-cursor-x1ma7edk.js} +7 -7
- package/dist/cli/{schema-p0vn1zgh.js → schema-g5ggmb47.js} +1 -1
- package/dist/cli/{scope-persistence-zs97zkt7.js → scope-persistence-gt0zpp6a.js} +7 -7
- package/dist/cli/{skill-generator-5qg15q1j.js → skill-generator-q6m110d5.js} +13 -13
- package/dist/cli/{telemetry-xzy0qeap.js → telemetry-1pnsftp0.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-q2gswg16.js → worktree-collision-ownership-e0p490vw.js} +3 -3
- package/dist/cli/{worktree-isolation-ndb5fwys.js → worktree-isolation-akwwt8n5.js} +27 -27
- package/dist/consensus/contracts.d.ts +5 -1
- package/dist/consensus/corpus.d.ts +26 -3
- package/dist/consensus/miner.d.ts +5 -1
- package/dist/hooks/curator.d.ts +41 -1
- package/dist/hooks/knowledge-store.d.ts +26 -2
- package/dist/hooks/pr-workflow-gate.d.ts +26 -1
- package/dist/hooks/skill-scoring.d.ts +13 -3
- package/dist/hooks/skill-usage-log.d.ts +140 -17
- package/dist/hooks/skill-usage-pending.d.ts +392 -0
- package/dist/index.js +513 -505
- package/dist/observability/catalog.d.ts +6 -4
- package/dist/telemetry.d.ts +35 -1
- package/dist/tools/write-pr-review-artifact.d.ts +7 -0
- package/dist/tools/write-pr-review-trigger-eval.d.ts +3 -1
- package/package.json +1 -1
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-mbcyz77e.js";
|
|
27
|
+
import"./index-r9g7ymv2.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-wgrvq2bc.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
31
|
+
import"./index-m5z2fgs4.js";
|
|
32
|
+
import"./index-2zz8b0rb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-zpn3wqvp.js";
|
|
35
|
+
import"./index-rsn4jm90.js";
|
|
36
|
+
import"./index-ghbkknjz.js";
|
|
37
37
|
import"./index-7g4c7s5r.js";
|
|
38
38
|
import"./index-bpmtbmy9.js";
|
|
39
39
|
import"./index-ed5ykebp.js";
|
|
@@ -54,13 +54,13 @@ import {
|
|
|
54
54
|
sweepStaleDelegations,
|
|
55
55
|
updateCoderSettlement,
|
|
56
56
|
writeDelegationFallback
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-092deqxs.js";
|
|
58
58
|
import"./index-4cgee5vh.js";
|
|
59
59
|
import"./index-z6xqpmqg.js";
|
|
60
60
|
import"./index-r3mvsbtq.js";
|
|
61
61
|
import"./index-zjygnfay.js";
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
62
|
+
import"./index-rsn4jm90.js";
|
|
63
|
+
import"./index-ghbkknjz.js";
|
|
64
64
|
import"./index-7g4c7s5r.js";
|
|
65
65
|
import"./index-bpmtbmy9.js";
|
|
66
66
|
import"./index-ed5ykebp.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
sweepStale,
|
|
10
10
|
unsubscribe,
|
|
11
11
|
updateSnapshot
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-2n9rwvcc.js";
|
|
13
13
|
import"./index-4cgee5vh.js";
|
|
14
14
|
import"./index-z6xqpmqg.js";
|
|
15
15
|
import"./index-r3mvsbtq.js";
|
|
16
16
|
import"./index-zjygnfay.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-rsn4jm90.js";
|
|
18
|
+
import"./index-ghbkknjz.js";
|
|
19
19
|
import"./index-7g4c7s5r.js";
|
|
20
20
|
import"./index-bpmtbmy9.js";
|
|
21
21
|
import"./index-ed5ykebp.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
_internals,
|
|
4
4
|
createModelEvaluationExecutor,
|
|
5
5
|
runEvaluation
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
6
|
+
} from "./index-ebt47fnp.js";
|
|
7
|
+
import"./index-x4kgn37c.js";
|
|
8
8
|
import"./index-y8552snf.js";
|
|
9
9
|
import"./index-r3mvsbtq.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
import"./index-2zz8b0rb.js";
|
|
11
|
+
import"./index-zpn3wqvp.js";
|
|
12
|
+
import"./index-rsn4jm90.js";
|
|
13
|
+
import"./index-ghbkknjz.js";
|
|
14
14
|
import"./index-7g4c7s5r.js";
|
|
15
15
|
import"./index-bpmtbmy9.js";
|
|
16
16
|
import"./index-ed5ykebp.js";
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-nxydm56k.js";
|
|
8
|
+
import"./index-wgrvq2bc.js";
|
|
9
9
|
import"./index-9e6fdz2h.js";
|
|
10
10
|
import"./index-4rhhvd1a.js";
|
|
11
11
|
import"./index-ae75rja9.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-m5z2fgs4.js";
|
|
13
|
+
import"./index-2zz8b0rb.js";
|
|
14
14
|
import"./index-bk5tah7q.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-zpn3wqvp.js";
|
|
16
|
+
import"./index-rsn4jm90.js";
|
|
17
|
+
import"./index-ghbkknjz.js";
|
|
18
18
|
import"./index-7g4c7s5r.js";
|
|
19
19
|
import"./index-bpmtbmy9.js";
|
|
20
20
|
import"./index-ed5ykebp.js";
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
resolveGeneratedAgentRole,
|
|
100
100
|
resolveGuardrailsConfig,
|
|
101
101
|
stripKnownSwarmPrefix
|
|
102
|
-
} from "./index-
|
|
102
|
+
} from "./index-mgcffsk0.js";
|
|
103
103
|
import"./index-cpg98bh1.js";
|
|
104
104
|
import"./index-zjygnfay.js";
|
|
105
105
|
import"./index-bk5tah7q.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
tombstoneScopeBinding,
|
|
24
24
|
writeScopeBindingToDisk,
|
|
25
25
|
writeScopeToDisk
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-84ytts36.js";
|
|
27
|
+
import"./index-x9jppg8b.js";
|
|
28
28
|
import"./index-556ja8an.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-nqwn8sf0.js";
|
|
30
|
+
import"./index-mgcffsk0.js";
|
|
31
31
|
import"./index-cpg98bh1.js";
|
|
32
32
|
import"./index-9e6fdz2h.js";
|
|
33
33
|
import"./index-4rhhvd1a.js";
|
|
@@ -36,9 +36,9 @@ import"./index-z6xqpmqg.js";
|
|
|
36
36
|
import"./index-r3mvsbtq.js";
|
|
37
37
|
import"./index-zjygnfay.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
39
|
+
import"./index-zpn3wqvp.js";
|
|
40
|
+
import"./index-rsn4jm90.js";
|
|
41
|
+
import"./index-ghbkknjz.js";
|
|
42
42
|
import"./index-7g4c7s5r.js";
|
|
43
43
|
import"./index-bpmtbmy9.js";
|
|
44
44
|
import"./index-ed5ykebp.js";
|
|
@@ -33,18 +33,18 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-pzt7ed53.js";
|
|
37
|
+
import"./index-mbcyz77e.js";
|
|
38
|
+
import"./index-r9g7ymv2.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
40
|
import"./index-q7sjgr1y.js";
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
41
|
+
import"./index-wgrvq2bc.js";
|
|
42
|
+
import"./index-s0s1e5jp.js";
|
|
43
|
+
import"./index-x9q0b3a8.js";
|
|
44
44
|
import"./index-gprxjmm7.js";
|
|
45
45
|
import"./index-n832052r.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
46
|
+
import"./index-nqwn8sf0.js";
|
|
47
|
+
import"./index-mgcffsk0.js";
|
|
48
48
|
import"./index-cpg98bh1.js";
|
|
49
49
|
import"./index-9e6fdz2h.js";
|
|
50
50
|
import"./index-4rhhvd1a.js";
|
|
@@ -53,12 +53,12 @@ import"./index-z6xqpmqg.js";
|
|
|
53
53
|
import"./index-r3mvsbtq.js";
|
|
54
54
|
import"./index-zjygnfay.js";
|
|
55
55
|
import"./index-ae75rja9.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
56
|
+
import"./index-m5z2fgs4.js";
|
|
57
|
+
import"./index-2zz8b0rb.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
59
|
+
import"./index-zpn3wqvp.js";
|
|
60
|
+
import"./index-rsn4jm90.js";
|
|
61
|
+
import"./index-ghbkknjz.js";
|
|
62
62
|
import"./index-7g4c7s5r.js";
|
|
63
63
|
import"./index-bpmtbmy9.js";
|
|
64
64
|
import"./index-ed5ykebp.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
scanDelegationFallbacksForRecovery,
|
|
7
7
|
scanDelegationsForRecovery
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-092deqxs.js";
|
|
9
9
|
import {
|
|
10
10
|
WORKTREE_PROVISIONING_OWNER_LEASE_MS,
|
|
11
11
|
removeWorktreeProvisioningOwner,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
bunSpawn
|
|
23
23
|
} from "./index-r3mvsbtq.js";
|
|
24
24
|
import"./index-zjygnfay.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-rsn4jm90.js";
|
|
26
|
+
import"./index-ghbkknjz.js";
|
|
27
27
|
import"./index-7g4c7s5r.js";
|
|
28
28
|
import"./index-bpmtbmy9.js";
|
|
29
29
|
import"./index-ed5ykebp.js";
|
|
@@ -21,47 +21,47 @@ import {
|
|
|
21
21
|
sanitizeWorktreeTaskId,
|
|
22
22
|
standardWorktreeByCallID,
|
|
23
23
|
standardWorktreeSerializationSessions
|
|
24
|
-
} from "./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
24
|
+
} from "./index-hsq8nyen.js";
|
|
25
|
+
import"./index-ebt47fnp.js";
|
|
26
|
+
import"./index-s0nss8c4.js";
|
|
27
|
+
import"./index-7jaq84cg.js";
|
|
28
|
+
import"./index-5vyej8pc.js";
|
|
29
|
+
import"./index-x4kgn37c.js";
|
|
30
30
|
import"./index-134d35c1.js";
|
|
31
31
|
import"./index-nj6rmyeh.js";
|
|
32
32
|
import"./index-y8552snf.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
33
|
+
import"./index-crpkb5x6.js";
|
|
34
|
+
import"./index-nxydm56k.js";
|
|
35
35
|
import"./index-70ha9e09.js";
|
|
36
36
|
import"./index-c8s9a3zh.js";
|
|
37
37
|
import"./index-9ss2m4rs.js";
|
|
38
38
|
import"./index-g8wwj0sz.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
39
|
+
import"./index-2n9rwvcc.js";
|
|
40
|
+
import"./index-pzt7ed53.js";
|
|
41
|
+
import"./index-mbcyz77e.js";
|
|
42
|
+
import"./index-r9g7ymv2.js";
|
|
43
43
|
import"./index-rtry5xyf.js";
|
|
44
44
|
import"./index-zsrtt42s.js";
|
|
45
|
-
import"./index-
|
|
45
|
+
import"./index-092deqxs.js";
|
|
46
46
|
import"./index-fxvgaeq4.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
47
|
+
import"./index-q6kscnts.js";
|
|
48
|
+
import"./index-ndqhtgrc.js";
|
|
49
|
+
import"./index-84ytts36.js";
|
|
50
|
+
import"./index-x9jppg8b.js";
|
|
51
51
|
import"./index-556ja8an.js";
|
|
52
52
|
import"./index-b43rt5ph.js";
|
|
53
53
|
import"./index-q7sjgr1y.js";
|
|
54
54
|
import"./index-3g0xk6tk.js";
|
|
55
55
|
import"./index-85gkedsf.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
56
|
+
import"./index-wgrvq2bc.js";
|
|
57
|
+
import"./index-s0s1e5jp.js";
|
|
58
58
|
import {
|
|
59
59
|
resolveWorktreeIsolationConfig
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-x9q0b3a8.js";
|
|
61
61
|
import"./index-gprxjmm7.js";
|
|
62
62
|
import"./index-n832052r.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
63
|
+
import"./index-nqwn8sf0.js";
|
|
64
|
+
import"./index-mgcffsk0.js";
|
|
65
65
|
import"./index-cpg98bh1.js";
|
|
66
66
|
import"./index-9e6fdz2h.js";
|
|
67
67
|
import"./index-4rhhvd1a.js";
|
|
@@ -70,12 +70,12 @@ import"./index-z6xqpmqg.js";
|
|
|
70
70
|
import"./index-r3mvsbtq.js";
|
|
71
71
|
import"./index-zjygnfay.js";
|
|
72
72
|
import"./index-ae75rja9.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
73
|
+
import"./index-m5z2fgs4.js";
|
|
74
|
+
import"./index-2zz8b0rb.js";
|
|
75
75
|
import"./index-bk5tah7q.js";
|
|
76
|
-
import"./index-
|
|
77
|
-
import"./index-
|
|
78
|
-
import"./index-
|
|
76
|
+
import"./index-zpn3wqvp.js";
|
|
77
|
+
import"./index-rsn4jm90.js";
|
|
78
|
+
import"./index-ghbkknjz.js";
|
|
79
79
|
import"./index-7g4c7s5r.js";
|
|
80
80
|
import"./index-bpmtbmy9.js";
|
|
81
81
|
import"./index-ed5ykebp.js";
|
|
@@ -292,7 +292,11 @@ export interface ConsensusCorpusHash {
|
|
|
292
292
|
* the difference between an incomplete report and a misleading one.
|
|
293
293
|
*/
|
|
294
294
|
export interface ConsensusTruncationV1 {
|
|
295
|
-
/**
|
|
295
|
+
/**
|
|
296
|
+
* `maxEvidenceItems` cut the corpus before tallying, OR skill-usage
|
|
297
|
+
* compaction evicted history the corpus would otherwise have covered
|
|
298
|
+
* (issue #2038).
|
|
299
|
+
*/
|
|
296
300
|
corpus: boolean;
|
|
297
301
|
/** Observations actually tallied, after filtering and after the corpus cut. */
|
|
298
302
|
observations: number;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* `task_complexity` remap, which happens in `wrapFlatRetrospective` before the
|
|
30
30
|
* write branch — so the corpus reads normalized values while the file on disk
|
|
31
31
|
* keeps its legacy ones.
|
|
32
|
-
*
|
|
32
|
+
* Four upstream readers do populate PROCESS-LOCAL caches, which is worth
|
|
33
33
|
* stating rather than hiding behind the word "read-only": `readTrajectory`
|
|
34
34
|
* fills the PRM in-memory trajectory cache (`src/prm/trajectory-store.ts`),
|
|
35
35
|
* while `readKnowledge` and `loadEvidence` fill the two SEPARATE maps in
|
|
@@ -44,6 +44,13 @@
|
|
|
44
44
|
* `floor(maxLines / 2)` = 500 ENTRIES. That 500 is unrelated to
|
|
45
45
|
* `MAX_TRACKED_TRAJECTORY_SESSIONS` = 500, which bounds how many SESSIONS the
|
|
46
46
|
* cache holds at once; the two constants merely happen to share a value.
|
|
47
|
+
* The fourth is `readPendingManifest` (issue #2038), which the skill-usage
|
|
48
|
+
* source calls for its coverage verdict: it memoizes the parsed sidecar
|
|
49
|
+
* manifest keyed by the resolved path and validated against that file's mtime
|
|
50
|
+
* and size, so a stale entry can never be served, and it holds one entry per
|
|
51
|
+
* project directory the process has touched. It takes no lock, never
|
|
52
|
+
* migrates, and never quarantines a corrupt sidecar — quarantine is reserved
|
|
53
|
+
* for lock-taking paths, so mining still cannot mutate what it counts.
|
|
47
54
|
* None of these caches is on disk: nothing about them writes a file, and none
|
|
48
55
|
* survives the process. (The readers themselves obviously do read files — the
|
|
49
56
|
* claim above is that nothing here WRITES, not that nothing here touches the
|
|
@@ -73,7 +80,7 @@ import { readGateGroundTruth } from '../evaluation/gate-ground-truth.js';
|
|
|
73
80
|
import { type GateAuditReadSummary } from '../evaluation/store.js';
|
|
74
81
|
import { type LoadEvidenceResult } from '../evidence/manager.js';
|
|
75
82
|
import type { RetrievalOutcome } from '../hooks/knowledge-types.js';
|
|
76
|
-
import { readSkillUsageEntries } from '../hooks/skill-usage-log.js';
|
|
83
|
+
import { readSkillUsageEntries, type readSkillUsageEntriesWithCoverage } from '../hooks/skill-usage-log.js';
|
|
77
84
|
import type { TrajectoryEntry } from '../prm/types.js';
|
|
78
85
|
import type { ConsensusCorpusHash, ConsensusSourceKind } from './contracts.js';
|
|
79
86
|
/**
|
|
@@ -99,7 +106,11 @@ export interface CorpusObservation {
|
|
|
99
106
|
export interface ConsensusCorpus {
|
|
100
107
|
observations: CorpusObservation[];
|
|
101
108
|
hashes: ConsensusCorpusHash[];
|
|
102
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* True when the returned stream is not the complete corpus — either
|
|
111
|
+
* `maxEvidenceItems` cut it, or a source could only return a bounded window
|
|
112
|
+
* (skill-usage under the issue #2038 compaction budget).
|
|
113
|
+
*/
|
|
103
114
|
truncated: boolean;
|
|
104
115
|
/** Sources that threw while being read. Never fatal — the corpus degrades. */
|
|
105
116
|
unreadableSources: ConsensusSourceKind[];
|
|
@@ -119,6 +130,18 @@ export interface CorpusReaders {
|
|
|
119
130
|
listTrajectorySessions: (directory: string) => Promise<string[]>;
|
|
120
131
|
readTrajectory: (sessionId: string, directory: string) => Promise<TrajectoryEntry[]>;
|
|
121
132
|
readSkillUsageEntries: typeof readSkillUsageEntries;
|
|
133
|
+
/**
|
|
134
|
+
* Additive coverage seam (issue #2038 §7). Optional, and deliberately NOT
|
|
135
|
+
* part of `defaultReaders()`.
|
|
136
|
+
*
|
|
137
|
+
* The entries themselves keep coming from `readSkillUsageEntries` — which is
|
|
138
|
+
* already the bounded read funnel, so the observations are byte-identical —
|
|
139
|
+
* because `loadConsensusCorpus` merges as `{...defaultReaders(), ...options.readers}`.
|
|
140
|
+
* A default entry-bearing coverage reader would therefore silently outrank a
|
|
141
|
+
* caller that overrode only `readSkillUsageEntries`, turning an injected
|
|
142
|
+
* fixture into an empty corpus. Injecting this member overrides BOTH.
|
|
143
|
+
*/
|
|
144
|
+
readSkillUsageEntriesWithCoverage?: typeof readSkillUsageEntriesWithCoverage;
|
|
122
145
|
readKnowledgeEntries: (directory: string) => Promise<KnowledgeLike[]>;
|
|
123
146
|
loadEvidence: (directory: string, taskId: string) => Promise<LoadEvidenceResult>;
|
|
124
147
|
readRejectedLessons: (directory: string) => Promise<RejectedLessonLike[]>;
|
|
@@ -133,7 +133,11 @@ export interface MineConsensusDeps {
|
|
|
133
133
|
}
|
|
134
134
|
export interface MineConsensusResult {
|
|
135
135
|
report: ConsensusReportV1;
|
|
136
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* True when `maxEvidenceItems` truncated the corpus, OR skill-usage
|
|
138
|
+
* compaction evicted history the corpus would otherwise have covered
|
|
139
|
+
* (issue #2038).
|
|
140
|
+
*/
|
|
137
141
|
truncated: boolean;
|
|
138
142
|
/** Corpus sources that could not be read. */
|
|
139
143
|
unreadableSources: string[];
|
package/dist/hooks/curator.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { getSkillVersion, reviseSkill } from '../services/skill-reviser.js';
|
|
|
30
30
|
import type { ComplianceObservation, CuratorConfig, CuratorInitResult, CuratorPhaseResult, CuratorSummary, KnowledgeRecommendation, PhaseDigestEntry } from './curator-types.js';
|
|
31
31
|
import { getArchivedKnowledgeIds, readKnowledge, transactFile } from './knowledge-store.js';
|
|
32
32
|
import type { KnowledgeConfig } from './knowledge-types.js';
|
|
33
|
-
import { readSkillUsageEntries } from './skill-usage-log.js';
|
|
33
|
+
import { readSkillUsageEntries, readSkillUsageEntriesWithCoverage } from './skill-usage-log.js';
|
|
34
34
|
/**
|
|
35
35
|
* Optional LLM delegate callback type.
|
|
36
36
|
* Takes a system prompt and user input, returns the LLM output text.
|
|
@@ -51,7 +51,16 @@ export declare const _internals: {
|
|
|
51
51
|
checkPhaseCompliance: typeof checkPhaseCompliance;
|
|
52
52
|
normalizeAgentName: typeof normalizeAgentName;
|
|
53
53
|
autoRetireSkills: typeof autoRetireSkills;
|
|
54
|
+
/**
|
|
55
|
+
* Retained deliberately (issue #2038 §7). The three curator decision sites
|
|
56
|
+
* now read through `readSkillUsageEntriesWithCoverage` because a coverage
|
|
57
|
+
* verdict and the entries it describes must come from ONE read, but this
|
|
58
|
+
* member keeps the `typeof readSkillUsageEntries` seam contract intact for
|
|
59
|
+
* existing callers and stubs rather than changing an exported symbol's type.
|
|
60
|
+
*/
|
|
54
61
|
readSkillUsageEntries: typeof readSkillUsageEntries;
|
|
62
|
+
readSkillUsageEntriesWithCoverage: typeof readSkillUsageEntriesWithCoverage;
|
|
63
|
+
recordCuratorSkips: typeof recordCuratorSkips;
|
|
55
64
|
listSkills: typeof listSkills;
|
|
56
65
|
parseDraftFrontmatter: typeof parseDraftFrontmatter;
|
|
57
66
|
retireOrMarkStale: typeof retireOrMarkStale;
|
|
@@ -71,6 +80,37 @@ export interface RecommendationParseDiagnostic {
|
|
|
71
80
|
reason: string;
|
|
72
81
|
}
|
|
73
82
|
export declare function normalizeRecommendationEntryIdToken(token: string): string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Fold one curator pass's skipped decisions into the durable `curator_skipped`
|
|
85
|
+
* counter in `.swarm/skill-usage-pending.json`.
|
|
86
|
+
*
|
|
87
|
+
* Called ONCE per site with the pass total — never inside the per-skill loop,
|
|
88
|
+
* because it takes the skill-usage lock and a lock per skill would be O(skills)
|
|
89
|
+
* synchronous I/O on the curator path.
|
|
90
|
+
*
|
|
91
|
+
* Two deliberate non-behaviors:
|
|
92
|
+
* - **No health emit.** `emitSkillUsageHealth`'s trigger union has no curator
|
|
93
|
+
* value. `curator_skipped` is a lifetime counter, so the next compaction or
|
|
94
|
+
* consumption emit carries it; inventing a trigger here would widen a
|
|
95
|
+
* contract this change does not own.
|
|
96
|
+
* - **Lock failure drops the write.** Acquisition is non-blocking by design
|
|
97
|
+
* (approved plan §9): maintenance is skipped, never forced. An observability
|
|
98
|
+
* counter must never be the thing that blocks a curator pass.
|
|
99
|
+
*
|
|
100
|
+
* The `.swarm` guard is not defensiveness: the counter lives inside the store,
|
|
101
|
+
* and when the store directory does not exist there is no usage log either, so
|
|
102
|
+
* there is nothing to count into and nothing should be created on the way.
|
|
103
|
+
*
|
|
104
|
+
* **Why this lock-taking path does not run the legacy migration.** Approved plan
|
|
105
|
+
* §6/BLK-13 says `needsMigration` is evaluated on first touch by any path that
|
|
106
|
+
* takes the lock. This one deliberately does not: `ensureMigrated` is private to
|
|
107
|
+
* `skill-usage-log.ts`, and it is benign to omit here because the document this
|
|
108
|
+
* writes keeps whatever `migrated` value it loaded — `false` for an un-migrated
|
|
109
|
+
* store — so the next `pruneSkillUsageLog` / `applySkillUsageFeedback` still
|
|
110
|
+
* migrates on its own first touch. This path can advance a counter; it can never
|
|
111
|
+
* mark a store migrated, and therefore can never strand one.
|
|
112
|
+
*/
|
|
113
|
+
declare function recordCuratorSkips(directory: string, skipped: number): void;
|
|
74
114
|
/**
|
|
75
115
|
* Auto-retire generated skills whose violation rate exceeds 30% or
|
|
76
116
|
* whose source knowledge entries are all archived.
|
|
@@ -170,7 +170,9 @@ export declare function inferTags(lesson: string): string[];
|
|
|
170
170
|
* @param directory - Project root directory (used to resolve `.swarm/knowledge.jsonl`).
|
|
171
171
|
* @param deltas - Array of {id, delta} tuples. Delta may be positive (boost) or negative (decay).
|
|
172
172
|
*/
|
|
173
|
-
export declare function bumpKnowledgeConfidenceBatch(directory: string, deltas:
|
|
173
|
+
export declare function bumpKnowledgeConfidenceBatch(directory: string, deltas: KnowledgeConfidenceDelta[], options?: ConfidenceFloorOptions): Promise<number>;
|
|
174
|
+
/** A single confidence adjustment request. */
|
|
175
|
+
export interface KnowledgeConfidenceDelta {
|
|
174
176
|
id: string;
|
|
175
177
|
delta: number;
|
|
176
178
|
receipt_events?: Array<{
|
|
@@ -178,7 +180,29 @@ export declare function bumpKnowledgeConfidenceBatch(directory: string, deltas:
|
|
|
178
180
|
timestamp: string;
|
|
179
181
|
outcome: 'applied' | 'violated' | 'ignored';
|
|
180
182
|
}>;
|
|
181
|
-
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Discriminated result of a batch confidence bump (issue #2038, BLK-4).
|
|
186
|
+
*
|
|
187
|
+
* `bumpKnowledgeConfidenceBatch` returns `0` both for "no matching knowledge
|
|
188
|
+
* IDs" (permanent — the ids are archived, deleted, or mistyped) and for
|
|
189
|
+
* "threw / lock failed" (transient — contention or I/O). A single counter
|
|
190
|
+
* cannot decide dequeue-vs-retain for the skill-usage pending queue: dequeuing
|
|
191
|
+
* on the transient case silently drops feedback, retaining on the permanent
|
|
192
|
+
* case creates an unbounded exempt set. `failed` separates them.
|
|
193
|
+
*/
|
|
194
|
+
export interface BumpKnowledgeConfidenceResult {
|
|
195
|
+
/** Number of knowledge entries actually touched. */
|
|
196
|
+
applied: number;
|
|
197
|
+
/** True when the batch threw or its lock could not be acquired. */
|
|
198
|
+
failed: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Additive variant of {@link bumpKnowledgeConfidenceBatch} that distinguishes
|
|
202
|
+
* "applied nothing" from "failed to run". Existing consumers are unchanged;
|
|
203
|
+
* `bumpKnowledgeConfidenceBatch` is a thin wrapper over this function.
|
|
204
|
+
*/
|
|
205
|
+
export declare function bumpKnowledgeConfidenceBatchResult(directory: string, deltas: KnowledgeConfidenceDelta[], options?: ConfidenceFloorOptions): Promise<BumpKnowledgeConfidenceResult>;
|
|
182
206
|
/** Options for the G2 confidence-floor action in bumpKnowledgeConfidenceBatch. */
|
|
183
207
|
export interface ConfidenceFloorOptions {
|
|
184
208
|
/** Action when a just-bumped entry sits at the confidence floor with a
|
|
@@ -383,6 +383,13 @@ export interface PrWorkflowGateState {
|
|
|
383
383
|
* already spent.
|
|
384
384
|
*/
|
|
385
385
|
prReviewRetiredConsolidatedLanes?: string[];
|
|
386
|
+
/**
|
|
387
|
+
* Durably reserved run_id for the current PR_REVIEW workflow before either
|
|
388
|
+
* writer has successfully committed its artifact. This lets omitted run_id
|
|
389
|
+
* calls infer the same run across retries/restarts and keeps the reservation
|
|
390
|
+
* separate from the trigger/findings completion receipts.
|
|
391
|
+
*/
|
|
392
|
+
prReviewReservedRunId?: string;
|
|
386
393
|
prReviewArtifactRunId?: string;
|
|
387
394
|
prReviewFindingsPath?: string;
|
|
388
395
|
prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
|
|
@@ -824,6 +831,7 @@ export declare function recordPrFeedbackGateBatch(directory: string, sessionID:
|
|
|
824
831
|
export declare function assertPrFeedbackGatePhaseSettled(directory: string, sessionID: string, phase: PrFeedbackGatePhase): Promise<PrWorkflowGateState>;
|
|
825
832
|
/** Require every ordered feedback gate on one unchanged revision. */
|
|
826
833
|
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
834
|
+
export declare function resolvePrReviewWriterRunId(directory: string, sessionID: string, requestedRunId?: string): Promise<string>;
|
|
827
835
|
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
828
836
|
/** Freeze one exact inline trigger ledger across every micro dispatch. */
|
|
829
837
|
export declare function bindPrReviewTriggerLedger(directory: string, sessionID: string, input: unknown): Promise<PrWorkflowGateState>;
|
|
@@ -838,11 +846,16 @@ export declare function assertPrReviewArtifactBoundary(directory: string, sessio
|
|
|
838
846
|
*/
|
|
839
847
|
export declare function assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts(directory: string, sessionID: string, boundary: PrReviewArtifactBoundary, records: readonly PrReviewArtifactRecord[]): Promise<void>;
|
|
840
848
|
export declare function markPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, artifactPath: string, findingIds: string[], handoffRequired: boolean): Promise<PrWorkflowGateState>;
|
|
841
|
-
export declare function markPrReviewHandoffComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<
|
|
849
|
+
export declare function markPrReviewHandoffComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<{
|
|
850
|
+
state: PrWorkflowGateState;
|
|
851
|
+
alreadyOffered: boolean;
|
|
852
|
+
}>;
|
|
842
853
|
export declare function transitionPrReviewToFeedback(directory: string, sessionID: string, request: {
|
|
843
854
|
runId: string;
|
|
844
855
|
handoffPath: string;
|
|
845
856
|
prUrl?: string;
|
|
857
|
+
exactCommand?: string;
|
|
858
|
+
confirmedByUser?: boolean;
|
|
846
859
|
}): Promise<PrWorkflowGateState>;
|
|
847
860
|
export declare function declarePrFeedbackScope(directory: string, sessionID: string, taskId: string, files: string[]): Promise<PrWorkflowGateState>;
|
|
848
861
|
export declare function resolvePrFeedbackScopeDeclaration(directory: string, sessionID: string, taskId: string): Promise<PrFeedbackScopeDeclarationRecord | null>;
|
|
@@ -865,6 +878,7 @@ export declare const _test_exports: {
|
|
|
865
878
|
parseCanonicalCandidateRows: typeof parseCanonicalCandidateRows;
|
|
866
879
|
resolvePrReviewRowFamily: typeof resolvePrReviewRowFamily;
|
|
867
880
|
pipeFieldsCapped: typeof pipeFieldsCapped;
|
|
881
|
+
indexVerdictRows: typeof indexVerdictRows;
|
|
868
882
|
reviewerVerdictRowDigest: typeof reviewerVerdictRowDigest;
|
|
869
883
|
workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
|
|
870
884
|
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
@@ -1223,6 +1237,16 @@ export declare function validatePrReviewDiscoveryLaneCompletion(input: PrReviewD
|
|
|
1223
1237
|
export declare function validatePrWorkflowTransportRecovery(input: PrWorkflowTransportRecoveryValidationInput): Promise<PrWorkflowTransportRecoveryValidationResult>;
|
|
1224
1238
|
/** Require at least one semantically valid discovery row or CLEAN attestation. */
|
|
1225
1239
|
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string, ownedWorkflowLanes?: readonly string[], mode?: string): boolean;
|
|
1240
|
+
interface IndexedVerdictRows {
|
|
1241
|
+
markerRows: string[][];
|
|
1242
|
+
rowsByItemId: Map<string, string[][]>;
|
|
1243
|
+
recoveries: Array<{
|
|
1244
|
+
marker: '[REVIEWED]' | '[CRITIC]';
|
|
1245
|
+
itemId: string;
|
|
1246
|
+
recovery: 'legacy-fidelity-safe' | 'legacy-lossy';
|
|
1247
|
+
}>;
|
|
1248
|
+
}
|
|
1249
|
+
declare function indexVerdictRows(text: string, marker: '[REVIEWED]' | '[CRITIC]'): IndexedVerdictRows;
|
|
1226
1250
|
/**
|
|
1227
1251
|
* Digest of the FULL canonical reviewer row, not the classification/severity
|
|
1228
1252
|
* pair a reviewer verdict projects to. Only 2 of the 10 required fields survive
|
|
@@ -1246,6 +1270,7 @@ declare function analyzePrReviewVerdictRowContract(text: string, itemIds: readon
|
|
|
1246
1270
|
ok: boolean;
|
|
1247
1271
|
expected: string;
|
|
1248
1272
|
actual: string;
|
|
1273
|
+
recoveries: IndexedVerdictRows['recoveries'];
|
|
1249
1274
|
};
|
|
1250
1275
|
declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
|
|
1251
1276
|
status: string;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* usage data from `.swarm/skill-usage.jsonl`.
|
|
4
4
|
*
|
|
5
5
|
* All public functions are pure over their inputs. File I/O goes through
|
|
6
|
-
* `
|
|
6
|
+
* `readSkillUsageEntriesWithCoverage` (imported from `skill-usage-log.ts`), the
|
|
7
|
+
* bounded read funnel of issue #2038: it reports whether the window it returned
|
|
8
|
+
* is the full history, which `formatSkillIndexWithContext` discloses.
|
|
7
9
|
* An `_internals` DI seam mirrors the pattern in `skill-usage-log.ts`
|
|
8
10
|
* and `skill-propagation-gate.ts` for testability.
|
|
9
11
|
*/
|
|
10
|
-
import { type SkillUsageEntry } from './skill-usage-log.js';
|
|
12
|
+
import { type SkillUsageEntry, type SkillUsageReadCoverage } from './skill-usage-log.js';
|
|
11
13
|
/** Per-skill ranking entry returned by `rankSkillsForContext`. */
|
|
12
14
|
export interface SkillRankEntry {
|
|
13
15
|
/** Repo-relative path to the skill file. */
|
|
@@ -32,6 +34,13 @@ export interface SkillStats {
|
|
|
32
34
|
agent: string;
|
|
33
35
|
count: number;
|
|
34
36
|
}>;
|
|
37
|
+
/**
|
|
38
|
+
* What the window these stats were computed from could and could not see
|
|
39
|
+
* (issue #2038 §7). Absent only on a `SkillStats` built by hand; every
|
|
40
|
+
* value produced by {@link getSkillStats} carries it, so a consumer can tell
|
|
41
|
+
* "0% compliance" from "compaction evicted the compliant half".
|
|
42
|
+
*/
|
|
43
|
+
coverage?: SkillUsageReadCoverage;
|
|
35
44
|
}
|
|
36
45
|
export type SkillRunner = 'opencode' | 'claude' | 'codex';
|
|
37
46
|
/** Parsed state of an explicit (or absent) top-level audience declaration. */
|
|
@@ -158,7 +167,8 @@ export declare function rankSkillsForContext(skills: string[], taskContext: stri
|
|
|
158
167
|
*
|
|
159
168
|
* @param skillPath - Repo-relative path to the skill file.
|
|
160
169
|
* @param directory - Project root directory.
|
|
161
|
-
* @returns `SkillStats` with aggregate metrics
|
|
170
|
+
* @returns `SkillStats` with aggregate metrics, carrying the coverage of the
|
|
171
|
+
* window they were computed from. Returns zeros/empty when log is missing.
|
|
162
172
|
*/
|
|
163
173
|
export declare function getSkillStats(skillPath: string, directory: string): SkillStats;
|
|
164
174
|
/**
|