opencode-swarm 7.164.5 → 7.164.7
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 +12 -12
- package/README.md +1 -1
- package/dist/background/pending-delegations.d.ts +12 -2
- package/dist/background/pr-review-contract.d.ts +9 -0
- package/dist/background/pr-subscriptions.d.ts +1 -8
- package/dist/cli/{coder-settlement-x9wbqx46.js → coder-settlement-p8wwmtnn.js} +14 -14
- package/dist/cli/{config-doctor-axd9d6hs.js → config-doctor-wxf488mw.js} +5 -3
- package/dist/cli/{core-f1a1fk13.js → core-671ybpbt.js} +2 -2
- package/dist/cli/{curation-policy-2cy7wejw.js → curation-policy-de7emfqc.js} +7 -6
- package/dist/cli/{curator-drift-3s3q4wsy.js → curator-drift-nvxv8xkk.js} +7 -5
- package/dist/cli/{curator-b104f7a7.js → curator-eaz5rj6k.js} +39 -37
- package/dist/cli/curator-llm-factory-swzyfnh6.js +68 -0
- package/dist/cli/{dispatch-q4v8x2pk.js → dispatch-dqybvj8v.js} +10 -6
- package/dist/cli/{evidence-summary-service-5xsjs3x3.js → evidence-summary-service-deqsc8hj.js} +19 -16
- package/dist/cli/{gate-evidence-ypja4156.js → gate-evidence-mafg71qb.js} +14 -8
- package/dist/cli/guardrail-explain-ygq7cx9w.js +69 -0
- package/dist/cli/{guardrail-log-6t4e2j5f.js → guardrail-log-k3w9dq6x.js} +9 -8
- package/dist/cli/{guardrail-reset-es0bg976.js → guardrail-reset-ae2step4.js} +39 -37
- package/dist/cli/hive-promoter-a4cs5sbr.js +83 -0
- package/dist/cli/{index-hnjkpk57.js → index-0zjwnbze.js} +1 -1
- package/dist/cli/{index-er8ba9be.js → index-1ekzd5wf.js} +56 -15
- package/dist/cli/{index-fxxja498.js → index-2czt53wz.js} +1 -1
- package/dist/cli/{index-wbnyc50b.js → index-388sxv1b.js} +17 -8
- package/dist/cli/{index-1q2dwv69.js → index-3kgg2n6z.js} +12 -6
- package/dist/cli/{index-50s9q4c1.js → index-3sv8t7ca.js} +2 -2
- package/dist/cli/{index-4jmtdtm9.js → index-46yrz972.js} +3 -3
- package/dist/cli/{index-s09b63xg.js → index-4vx89ymn.js} +5 -5
- package/dist/cli/{index-aaqbhn9h.js → index-581bcqp9.js} +2 -2
- package/dist/cli/{index-0trtcm9n.js → index-63enf73z.js} +20 -15
- package/dist/cli/index-7qefgq4j.js +71 -0
- package/dist/cli/{index-yrsag0vs.js → index-8ck1jkhd.js} +3 -2
- package/dist/cli/{index-y42pra05.js → index-8ntf8jnj.js} +19 -18
- package/dist/cli/{index-m1nrd3yd.js → index-8psybzzf.js} +1 -1
- package/dist/cli/{index-rz87mx1c.js → index-8tqqmsav.js} +1 -1
- package/dist/cli/{index-25z5qwkk.js → index-93znbdam.js} +9 -5
- package/dist/cli/{index-maxz22c1.js → index-9qkytpwa.js} +185 -376
- package/dist/cli/{index-164m995b.js → index-9ydhzegh.js} +28 -17
- package/dist/cli/{index-3gb7bw7h.js → index-bvjwmmdc.js} +1332 -1217
- package/dist/cli/{index-ywtcznk2.js → index-c4j9sjcs.js} +4 -4
- package/dist/cli/index-cw912re7.js +200 -0
- package/dist/cli/{index-8h9nng7f.js → index-fq1wfsmw.js} +100 -97
- package/dist/cli/{index-7rat6nyh.js → index-gm65h7bh.js} +9 -6
- package/dist/cli/{index-rc6hec4j.js → index-h3k3rgyr.js} +4 -4
- package/dist/cli/{index-ea7sehgy.js → index-jkwfajh1.js} +4 -4
- package/dist/cli/{index-1dz8hv7p.js → index-kvq1e82k.js} +3 -3
- package/dist/cli/{index-4emx8hhh.js → index-mr3h3sm5.js} +2 -2
- package/dist/cli/{index-q0gtgwyr.js → index-rey1tzcw.js} +7 -7
- package/dist/cli/index-ry16d01s.js +107 -0
- package/dist/cli/{index-aper29nf.js → index-ry4mwbc2.js} +1 -1
- package/dist/cli/{index-xj4kbtdw.js → index-sxxh4ams.js} +2 -2
- package/dist/cli/{index-tfa2p4y4.js → index-t1qzjhnj.js} +13 -13
- package/dist/cli/{index-xm7dc14y.js → index-v1fj9exz.js} +12 -5
- package/dist/cli/{index-3f7hqtgg.js → index-w3gtqey0.js} +4 -1
- package/dist/cli/{index-4krjn1gn.js → index-wgqeqy68.js} +2 -2
- package/dist/cli/{index-3rrc5x4v.js → index-x2t2tbm2.js} +2 -2
- package/dist/cli/{index-0zbze3n6.js → index-x3qzt684.js} +71 -47
- package/dist/cli/{index-j9a4fsxg.js → index-xc3q62ev.js} +2 -2
- package/dist/cli/{index-553veay1.js → index-xy59dnvq.js} +1 -1
- package/dist/cli/{index-fwebva1m.js → index-y75xd50f.js} +36 -27
- package/dist/cli/{index-25jze7sf.js → index-yzn1fm9a.js} +1 -1
- package/dist/cli/{index-1f4nandk.js → index-zg34ngdf.js} +21 -11
- package/dist/cli/{index-ssb67ff6.js → index-zg8tvjb0.js} +41 -39
- package/dist/cli/index.js +39 -37
- package/dist/cli/{knowledge-escalator-evjd8g7y.js → knowledge-escalator-t532h2ym.js} +15 -14
- package/dist/cli/{knowledge-events-q46z1wy6.js → knowledge-events-hdtc0cxe.js} +13 -12
- package/dist/cli/{knowledge-link-ffmzf72f.js → knowledge-link-hhnmc4g1.js} +6 -5
- package/dist/cli/{knowledge-store-z82f5x9k.js → knowledge-store-45jadhmb.js} +7 -6
- package/dist/cli/{knowledge-validator-19gbnxx2.js → knowledge-validator-5e6qbq6h.js} +9 -8
- package/dist/cli/{model-preflight-pmnbfzjv.js → model-preflight-bq035tfh.js} +1 -1
- package/dist/cli/{pending-delegations-t4cqk5ha.js → pending-delegations-z0crvst3.js} +7 -7
- package/dist/cli/{pr-subscriptions-3enjtq0k.js → pr-subscriptions-73fs8y3n.js} +7 -6
- package/dist/cli/{pr-workflow-gate-3ecgfsge.js → pr-workflow-gate-rpdts7wy.js} +41 -37
- package/dist/cli/{runner-wqy2hbxn.js → runner-5qqh83e2.js} +6 -6
- package/dist/cli/{scan-cursor-8wcy0dvf.js → scan-cursor-t75qznf3.js} +8 -7
- package/dist/cli/{schema-hsw9r2tm.js → schema-8dfjsrk6.js} +2 -2
- package/dist/cli/{scope-persistence-mbwt4grd.js → scope-persistence-zfmz4sws.js} +12 -10
- package/dist/cli/{skill-generator-kg32a5jy.js → skill-generator-psdb10jw.js} +17 -16
- package/dist/cli/{telemetry-j14cj552.js → telemetry-85gxedng.js} +1 -1
- package/dist/cli/{workspace-snapshot-yq0tc49d.js → workspace-snapshot-eh18vgkn.js} +2 -1
- package/dist/cli/{worktree-collision-ownership-0rfw6kp3.js → worktree-collision-ownership-xrqssqzd.js} +12 -15
- package/dist/cli/{worktree-isolation-qcwt09ve.js → worktree-isolation-s9m3bgah.js} +39 -37
- package/dist/db/canonical-project.d.ts +10 -3
- package/dist/db/project-db.d.ts +4 -0
- package/dist/evidence/task-gate-repair.d.ts +1 -1
- package/dist/gate-evidence.d.ts +19 -1
- package/dist/hooks/delegation-gate.d.ts +3 -1
- package/dist/hooks/pr-workflow-gate.d.ts +10 -2
- package/dist/index.js +593 -590
- package/dist/plan/ledger.d.ts +2 -0
- package/dist/pr-review/authorization.d.ts +13 -3
- package/dist/tools/authorize-pr-review-reentry.d.ts +5 -4
- package/dist/tools/dispatch-lanes.d.ts +1 -0
- package/dist/tools/pr-workflow-status.d.ts +2 -0
- package/dist/tools/pre-check-batch.d.ts +1 -1
- package/dist/utils/canonical-root.d.ts +21 -1
- package/dist/utils/filesystem-identity.d.ts +59 -0
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-cv7ft0mb.js +0 -66
- package/dist/cli/guardrail-explain-cvha7b9p.js +0 -67
- package/dist/cli/hive-promoter-yzv5g7jy.js +0 -81
- package/dist/cli/index-ddszzne4.js +0 -42
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
handleGuardrailExplain
|
|
4
|
+
} from "./index-x2t2tbm2.js";
|
|
5
|
+
import"./index-bvjwmmdc.js";
|
|
6
|
+
import"./index-yzn1fm9a.js";
|
|
7
|
+
import"./index-jkwfajh1.js";
|
|
8
|
+
import"./index-3kgg2n6z.js";
|
|
9
|
+
import"./index-9qkytpwa.js";
|
|
10
|
+
import"./index-wgqeqy68.js";
|
|
11
|
+
import"./index-txdagbh7.js";
|
|
12
|
+
import"./index-cw912re7.js";
|
|
13
|
+
import"./index-3146wmgv.js";
|
|
14
|
+
import"./index-gm65h7bh.js";
|
|
15
|
+
import"./index-4vx89ymn.js";
|
|
16
|
+
import"./index-581bcqp9.js";
|
|
17
|
+
import"./index-70ha9e09.js";
|
|
18
|
+
import"./index-zg34ngdf.js";
|
|
19
|
+
import"./index-x3qzt684.js";
|
|
20
|
+
import"./index-zaab1wz9.js";
|
|
21
|
+
import"./index-8ntf8jnj.js";
|
|
22
|
+
import"./index-zsrtt42s.js";
|
|
23
|
+
import"./index-y75xd50f.js";
|
|
24
|
+
import"./index-w3gtqey0.js";
|
|
25
|
+
import"./index-sxxh4ams.js";
|
|
26
|
+
import"./index-h3k3rgyr.js";
|
|
27
|
+
import"./index-0zjwnbze.js";
|
|
28
|
+
import"./index-rtry5xyf.js";
|
|
29
|
+
import"./index-388sxv1b.js";
|
|
30
|
+
import"./index-xc3q62ev.js";
|
|
31
|
+
import"./index-1ekzd5wf.js";
|
|
32
|
+
import"./index-fq1wfsmw.js";
|
|
33
|
+
import"./index-v1fj9exz.js";
|
|
34
|
+
import"./index-ry16d01s.js";
|
|
35
|
+
import"./index-3sv8t7ca.js";
|
|
36
|
+
import"./index-556ja8an.js";
|
|
37
|
+
import"./index-4fwbbad3.js";
|
|
38
|
+
import"./index-b43rt5ph.js";
|
|
39
|
+
import"./index-q7sjgr1y.js";
|
|
40
|
+
import"./index-rey1tzcw.js";
|
|
41
|
+
import"./index-63enf73z.js";
|
|
42
|
+
import"./index-46yrz972.js";
|
|
43
|
+
import"./index-zg9d392c.js";
|
|
44
|
+
import"./index-n832052r.js";
|
|
45
|
+
import"./index-8tqqmsav.js";
|
|
46
|
+
import"./index-z6xqpmqg.js";
|
|
47
|
+
import"./index-r3mvsbtq.js";
|
|
48
|
+
import"./index-xy59dnvq.js";
|
|
49
|
+
import"./index-8ck1jkhd.js";
|
|
50
|
+
import"./index-9e6fdz2h.js";
|
|
51
|
+
import"./index-4rhhvd1a.js";
|
|
52
|
+
import"./index-9ydhzegh.js";
|
|
53
|
+
import"./index-8psybzzf.js";
|
|
54
|
+
import"./index-zjygnfay.js";
|
|
55
|
+
import"./index-ae75rja9.js";
|
|
56
|
+
import"./index-93znbdam.js";
|
|
57
|
+
import"./index-mr3h3sm5.js";
|
|
58
|
+
import"./index-bk5tah7q.js";
|
|
59
|
+
import"./index-7qefgq4j.js";
|
|
60
|
+
import"./index-2czt53wz.js";
|
|
61
|
+
import"./index-t1qzjhnj.js";
|
|
62
|
+
import"./index-kvq1e82k.js";
|
|
63
|
+
import"./index-7g4c7s5r.js";
|
|
64
|
+
import"./index-bpmtbmy9.js";
|
|
65
|
+
import"./index-zgwm4ryv.js";
|
|
66
|
+
import"./index-a76rekgs.js";
|
|
67
|
+
export {
|
|
68
|
+
handleGuardrailExplain
|
|
69
|
+
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailLog
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-ry4mwbc2.js";
|
|
5
|
+
import"./index-jkwfajh1.js";
|
|
6
|
+
import"./index-3sv8t7ca.js";
|
|
7
7
|
import"./index-556ja8an.js";
|
|
8
8
|
import"./index-z6xqpmqg.js";
|
|
9
9
|
import"./index-r3mvsbtq.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
import"./index-8ck1jkhd.js";
|
|
11
|
+
import"./index-9ydhzegh.js";
|
|
12
|
+
import"./index-8psybzzf.js";
|
|
13
13
|
import"./index-zjygnfay.js";
|
|
14
14
|
import"./index-bk5tah7q.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-7qefgq4j.js";
|
|
16
|
+
import"./index-t1qzjhnj.js";
|
|
17
|
+
import"./index-kvq1e82k.js";
|
|
17
18
|
import"./index-bpmtbmy9.js";
|
|
18
19
|
import"./index-zgwm4ryv.js";
|
|
19
20
|
import"./index-a76rekgs.js";
|
|
@@ -3,62 +3,64 @@ import {
|
|
|
3
3
|
getAgentSession,
|
|
4
4
|
getBlockingActionCircuit,
|
|
5
5
|
resetActionCircuitExternally
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
6
|
+
} from "./index-bvjwmmdc.js";
|
|
7
|
+
import"./index-yzn1fm9a.js";
|
|
8
|
+
import"./index-jkwfajh1.js";
|
|
9
|
+
import"./index-3kgg2n6z.js";
|
|
10
|
+
import"./index-9qkytpwa.js";
|
|
11
|
+
import"./index-wgqeqy68.js";
|
|
12
12
|
import"./index-txdagbh7.js";
|
|
13
|
+
import"./index-cw912re7.js";
|
|
13
14
|
import"./index-3146wmgv.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-gm65h7bh.js";
|
|
16
|
+
import"./index-4vx89ymn.js";
|
|
17
|
+
import"./index-581bcqp9.js";
|
|
17
18
|
import"./index-70ha9e09.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-zg34ngdf.js";
|
|
20
|
+
import"./index-x3qzt684.js";
|
|
20
21
|
import"./index-zaab1wz9.js";
|
|
21
|
-
import"./index-
|
|
22
|
+
import"./index-8ntf8jnj.js";
|
|
22
23
|
import"./index-zsrtt42s.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
24
|
+
import"./index-y75xd50f.js";
|
|
25
|
+
import"./index-w3gtqey0.js";
|
|
26
|
+
import"./index-sxxh4ams.js";
|
|
27
|
+
import"./index-h3k3rgyr.js";
|
|
28
|
+
import"./index-0zjwnbze.js";
|
|
28
29
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
30
|
+
import"./index-388sxv1b.js";
|
|
31
|
+
import"./index-xc3q62ev.js";
|
|
32
|
+
import"./index-1ekzd5wf.js";
|
|
33
|
+
import"./index-fq1wfsmw.js";
|
|
34
|
+
import"./index-v1fj9exz.js";
|
|
35
|
+
import"./index-ry16d01s.js";
|
|
36
|
+
import"./index-3sv8t7ca.js";
|
|
36
37
|
import"./index-556ja8an.js";
|
|
37
38
|
import"./index-4fwbbad3.js";
|
|
38
39
|
import"./index-b43rt5ph.js";
|
|
39
40
|
import"./index-q7sjgr1y.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
41
|
+
import"./index-rey1tzcw.js";
|
|
42
|
+
import"./index-63enf73z.js";
|
|
43
|
+
import"./index-46yrz972.js";
|
|
43
44
|
import"./index-zg9d392c.js";
|
|
44
45
|
import"./index-n832052r.js";
|
|
45
|
-
import"./index-
|
|
46
|
+
import"./index-8tqqmsav.js";
|
|
46
47
|
import"./index-z6xqpmqg.js";
|
|
47
48
|
import"./index-r3mvsbtq.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-xy59dnvq.js";
|
|
50
|
+
import"./index-8ck1jkhd.js";
|
|
50
51
|
import"./index-9e6fdz2h.js";
|
|
51
52
|
import"./index-4rhhvd1a.js";
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-9ydhzegh.js";
|
|
54
|
+
import"./index-8psybzzf.js";
|
|
54
55
|
import"./index-zjygnfay.js";
|
|
55
56
|
import"./index-ae75rja9.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
57
|
+
import"./index-93znbdam.js";
|
|
58
|
+
import"./index-mr3h3sm5.js";
|
|
58
59
|
import"./index-bk5tah7q.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
60
|
+
import"./index-7qefgq4j.js";
|
|
61
|
+
import"./index-2czt53wz.js";
|
|
62
|
+
import"./index-t1qzjhnj.js";
|
|
63
|
+
import"./index-kvq1e82k.js";
|
|
62
64
|
import"./index-7g4c7s5r.js";
|
|
63
65
|
import"./index-bpmtbmy9.js";
|
|
64
66
|
import"./index-zgwm4ryv.js";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
_internals2 as _internals,
|
|
4
|
+
checkHivePromotions,
|
|
5
|
+
countDistinctProjects,
|
|
6
|
+
createHivePromoterHook,
|
|
7
|
+
isHiveEligible,
|
|
8
|
+
promoteFromSwarm,
|
|
9
|
+
promoteToHive
|
|
10
|
+
} from "./index-bvjwmmdc.js";
|
|
11
|
+
import"./index-yzn1fm9a.js";
|
|
12
|
+
import"./index-jkwfajh1.js";
|
|
13
|
+
import"./index-3kgg2n6z.js";
|
|
14
|
+
import"./index-9qkytpwa.js";
|
|
15
|
+
import"./index-wgqeqy68.js";
|
|
16
|
+
import"./index-txdagbh7.js";
|
|
17
|
+
import"./index-cw912re7.js";
|
|
18
|
+
import"./index-3146wmgv.js";
|
|
19
|
+
import"./index-gm65h7bh.js";
|
|
20
|
+
import"./index-4vx89ymn.js";
|
|
21
|
+
import"./index-581bcqp9.js";
|
|
22
|
+
import"./index-70ha9e09.js";
|
|
23
|
+
import"./index-zg34ngdf.js";
|
|
24
|
+
import"./index-x3qzt684.js";
|
|
25
|
+
import"./index-zaab1wz9.js";
|
|
26
|
+
import"./index-8ntf8jnj.js";
|
|
27
|
+
import"./index-zsrtt42s.js";
|
|
28
|
+
import"./index-y75xd50f.js";
|
|
29
|
+
import"./index-w3gtqey0.js";
|
|
30
|
+
import"./index-sxxh4ams.js";
|
|
31
|
+
import"./index-h3k3rgyr.js";
|
|
32
|
+
import"./index-0zjwnbze.js";
|
|
33
|
+
import"./index-rtry5xyf.js";
|
|
34
|
+
import"./index-388sxv1b.js";
|
|
35
|
+
import"./index-xc3q62ev.js";
|
|
36
|
+
import"./index-1ekzd5wf.js";
|
|
37
|
+
import"./index-fq1wfsmw.js";
|
|
38
|
+
import"./index-v1fj9exz.js";
|
|
39
|
+
import"./index-ry16d01s.js";
|
|
40
|
+
import"./index-3sv8t7ca.js";
|
|
41
|
+
import"./index-556ja8an.js";
|
|
42
|
+
import"./index-4fwbbad3.js";
|
|
43
|
+
import"./index-b43rt5ph.js";
|
|
44
|
+
import"./index-q7sjgr1y.js";
|
|
45
|
+
import {
|
|
46
|
+
resolveHiveKnowledgePath
|
|
47
|
+
} from "./index-rey1tzcw.js";
|
|
48
|
+
import"./index-63enf73z.js";
|
|
49
|
+
import"./index-46yrz972.js";
|
|
50
|
+
import"./index-zg9d392c.js";
|
|
51
|
+
import"./index-n832052r.js";
|
|
52
|
+
import"./index-8tqqmsav.js";
|
|
53
|
+
import"./index-z6xqpmqg.js";
|
|
54
|
+
import"./index-r3mvsbtq.js";
|
|
55
|
+
import"./index-xy59dnvq.js";
|
|
56
|
+
import"./index-8ck1jkhd.js";
|
|
57
|
+
import"./index-9e6fdz2h.js";
|
|
58
|
+
import"./index-4rhhvd1a.js";
|
|
59
|
+
import"./index-9ydhzegh.js";
|
|
60
|
+
import"./index-8psybzzf.js";
|
|
61
|
+
import"./index-zjygnfay.js";
|
|
62
|
+
import"./index-ae75rja9.js";
|
|
63
|
+
import"./index-93znbdam.js";
|
|
64
|
+
import"./index-mr3h3sm5.js";
|
|
65
|
+
import"./index-bk5tah7q.js";
|
|
66
|
+
import"./index-7qefgq4j.js";
|
|
67
|
+
import"./index-2czt53wz.js";
|
|
68
|
+
import"./index-t1qzjhnj.js";
|
|
69
|
+
import"./index-kvq1e82k.js";
|
|
70
|
+
import"./index-7g4c7s5r.js";
|
|
71
|
+
import"./index-bpmtbmy9.js";
|
|
72
|
+
import"./index-zgwm4ryv.js";
|
|
73
|
+
import"./index-a76rekgs.js";
|
|
74
|
+
export {
|
|
75
|
+
resolveHiveKnowledgePath,
|
|
76
|
+
promoteToHive,
|
|
77
|
+
promoteFromSwarm,
|
|
78
|
+
isHiveEligible,
|
|
79
|
+
createHivePromoterHook,
|
|
80
|
+
countDistinctProjects,
|
|
81
|
+
checkHivePromotions,
|
|
82
|
+
_internals
|
|
83
|
+
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readLinkPointer,
|
|
8
8
|
resolveKnowledgeStoreDir,
|
|
9
9
|
resolveLinkDir
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-93znbdam.js";
|
|
11
11
|
|
|
12
12
|
// src/knowledge/curation-policy.ts
|
|
13
13
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
canonicalRootKeyFresh
|
|
4
|
-
} from "./index-ddszzne4.js";
|
|
5
2
|
import {
|
|
6
3
|
validateSwarmPath
|
|
7
|
-
} from "./index-
|
|
4
|
+
} from "./index-8tqqmsav.js";
|
|
8
5
|
import {
|
|
9
6
|
bunWrite
|
|
10
7
|
} from "./index-r3mvsbtq.js";
|
|
11
8
|
import {
|
|
12
9
|
observeDelegationLedgerPressure
|
|
13
|
-
} from "./index-
|
|
10
|
+
} from "./index-9ydhzegh.js";
|
|
11
|
+
import {
|
|
12
|
+
canonicalRootKeyFresh,
|
|
13
|
+
sameProjectRoot
|
|
14
|
+
} from "./index-7qefgq4j.js";
|
|
14
15
|
import {
|
|
15
16
|
EvidenceLockTimeoutError,
|
|
16
17
|
withEvidenceLock
|
|
17
|
-
} from "./index-
|
|
18
|
+
} from "./index-2czt53wz.js";
|
|
18
19
|
import {
|
|
19
20
|
exports_external,
|
|
20
21
|
init_zod
|
|
@@ -695,6 +696,31 @@ var PrReviewLaneResultEnvelopeSchema = exports_external.object({
|
|
|
695
696
|
});
|
|
696
697
|
}
|
|
697
698
|
});
|
|
699
|
+
var PR_REVIEW_WORKFLOW_BINDING_PREFIX = "pr-review-workflow:v1:";
|
|
700
|
+
var MAX_PR_REVIEW_WORKFLOW_INSTANCE_ID_CHARS = 128;
|
|
701
|
+
function encodePrReviewWorkflowBinding(workflowInstanceId) {
|
|
702
|
+
const normalized = workflowInstanceId.trim();
|
|
703
|
+
if (!normalized || normalized.length > MAX_PR_REVIEW_WORKFLOW_INSTANCE_ID_CHARS) {
|
|
704
|
+
throw new Error("invalid PR-review workflow instance id");
|
|
705
|
+
}
|
|
706
|
+
return `${PR_REVIEW_WORKFLOW_BINDING_PREFIX}${Buffer.from(normalized, "utf8").toString("base64url")}`;
|
|
707
|
+
}
|
|
708
|
+
function decodePrReviewWorkflowBinding(value) {
|
|
709
|
+
if (!value?.startsWith(PR_REVIEW_WORKFLOW_BINDING_PREFIX))
|
|
710
|
+
return null;
|
|
711
|
+
const encoded = value.slice(PR_REVIEW_WORKFLOW_BINDING_PREFIX.length);
|
|
712
|
+
if (!encoded)
|
|
713
|
+
return null;
|
|
714
|
+
try {
|
|
715
|
+
const decoded = Buffer.from(encoded, "base64url").toString("utf8");
|
|
716
|
+
if (!decoded || decoded.length > MAX_PR_REVIEW_WORKFLOW_INSTANCE_ID_CHARS || encodePrReviewWorkflowBinding(decoded) !== value) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
return decoded;
|
|
720
|
+
} catch {
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
698
724
|
function serializedPrReviewResultReceiptBytes(value) {
|
|
699
725
|
return new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
700
726
|
}
|
|
@@ -1350,7 +1376,14 @@ var RecordSchema = exports_external.object({
|
|
|
1350
1376
|
ingestion: DelegationIngestionSchema.optional(),
|
|
1351
1377
|
result: ResultSchema.optional(),
|
|
1352
1378
|
completedAt: exports_external.number().optional()
|
|
1353
|
-
}).strict()
|
|
1379
|
+
}).strict().superRefine((value, context) => {
|
|
1380
|
+
if (value.mode?.startsWith("swarm-pr-review:") && value.correlationId !== value.subagentSessionId) {
|
|
1381
|
+
context.addIssue({
|
|
1382
|
+
code: exports_external.ZodIssueCode.custom,
|
|
1383
|
+
message: "PR-review delegation identity requires correlationId to equal subagentSessionId"
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1354
1387
|
var FallbackArtifactSchema = exports_external.object({
|
|
1355
1388
|
schemaVersion: exports_external.literal(1),
|
|
1356
1389
|
correlationId: exports_external.string().min(1).max(256),
|
|
@@ -1546,7 +1579,7 @@ function loadFoldedState(directory, options) {
|
|
|
1546
1579
|
return loadLegacyLedger(directory, options.strict);
|
|
1547
1580
|
}
|
|
1548
1581
|
const manifest = manifestRead.manifest;
|
|
1549
|
-
if (manifest.rootPath
|
|
1582
|
+
if (!sameProjectRoot(manifest.rootPath, directory)) {
|
|
1550
1583
|
return {
|
|
1551
1584
|
status: "uncertain",
|
|
1552
1585
|
reason: "background delegation checkpoint is bound to a different project root",
|
|
@@ -2480,7 +2513,8 @@ async function publishPrReviewResultReceipt(directory, input) {
|
|
|
2480
2513
|
}
|
|
2481
2514
|
const owned = current.ownedWorkflowLanes?.length ? current.ownedWorkflowLanes : current.workflowLane ? [current.workflowLane] : [];
|
|
2482
2515
|
const sameOwned = owned.length === parsed.data.ownedWorkflowLanes.length && owned.every((lane) => parsed.data.ownedWorkflowLanes.includes(lane));
|
|
2483
|
-
|
|
2516
|
+
const dispatchWorkflowInstanceId = decodePrReviewWorkflowBinding(current.jobId);
|
|
2517
|
+
if (!dispatchWorkflowInstanceId || current.workflowGeneration === undefined || dispatchWorkflowInstanceId !== parsed.data.workflowInstanceId || current.workflowGeneration !== parsed.data.workflowRevision || parsed.data.workflowInstanceId !== input.expectedWorkflowInstanceId || parsed.data.workflowRevision !== input.expectedWorkflowRevision || parsed.data.baseSha !== input.expectedBaseSha || current.mode !== parsed.data.mode || current.workflowLane !== parsed.data.workflowLane || !sameOwned || current.workspace?.prHeadSha !== parsed.data.headSha || current.workspace?.gitHead !== parsed.data.headSha || (current.generation ?? 1) !== parsed.data.generation) {
|
|
2484
2518
|
outcome = {
|
|
2485
2519
|
status: "conflict",
|
|
2486
2520
|
reason: "receipt does not match immutable delegation identity"
|
|
@@ -2859,6 +2893,9 @@ var RETRYABLE_LEGACY_SETTLEMENT_ERROR_CODES = new Set([
|
|
|
2859
2893
|
]);
|
|
2860
2894
|
var legacyCoderSettlementReconcilers = new Map;
|
|
2861
2895
|
var legacyCoderSettlementReconcilerOrder = [];
|
|
2896
|
+
function compareCodeUnits(a, b) {
|
|
2897
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
2898
|
+
}
|
|
2862
2899
|
function registerLegacyCoderSettlementReconciler(directory, reconciler) {
|
|
2863
2900
|
const key = canonicalRootKeyFresh(directory);
|
|
2864
2901
|
if (legacyCoderSettlementReconcilers.has(key)) {
|
|
@@ -2883,6 +2920,7 @@ function getLegacyCoderSettlementReconciler(directory) {
|
|
|
2883
2920
|
}
|
|
2884
2921
|
var _internals = {
|
|
2885
2922
|
getLegacyCoderSettlementReconciler,
|
|
2923
|
+
readFallbackDirectory,
|
|
2886
2924
|
getLegacyCoderSettlementReconcilerOrder: () => [
|
|
2887
2925
|
...legacyCoderSettlementReconcilerOrder
|
|
2888
2926
|
],
|
|
@@ -3338,6 +3376,11 @@ function fallbackPath(directory, correlationId) {
|
|
|
3338
3376
|
function fallbackDirectoryPath(directory) {
|
|
3339
3377
|
return path2.dirname(validateSwarmPath(directory, path2.join(BACKGROUND_DELEGATION_FALLBACK_DIR, ".containment-anchor")));
|
|
3340
3378
|
}
|
|
3379
|
+
function readFallbackDirectory(directory) {
|
|
3380
|
+
return fs2.readdirSync(fallbackDirectoryPath(directory), {
|
|
3381
|
+
withFileTypes: true
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3341
3384
|
async function readFallbackFile(directory, correlationId) {
|
|
3342
3385
|
for (let attempt = 0;attempt < 5; attempt++) {
|
|
3343
3386
|
try {
|
|
@@ -3367,9 +3410,7 @@ async function readDelegationFallback(directory, correlationId) {
|
|
|
3367
3410
|
async function listDelegationFallbacks(directory) {
|
|
3368
3411
|
let entries;
|
|
3369
3412
|
try {
|
|
3370
|
-
entries =
|
|
3371
|
-
withFileTypes: true
|
|
3372
|
-
}).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
|
|
3413
|
+
entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
|
|
3373
3414
|
} catch {
|
|
3374
3415
|
return [];
|
|
3375
3416
|
}
|
|
@@ -3389,7 +3430,7 @@ async function scanDelegationFallbacksForRecovery(directory) {
|
|
|
3389
3430
|
let entries;
|
|
3390
3431
|
try {
|
|
3391
3432
|
fallbackDir = fallbackDirectoryPath(directory);
|
|
3392
|
-
entries =
|
|
3433
|
+
entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json"));
|
|
3393
3434
|
} catch (error) {
|
|
3394
3435
|
if (error.code === "ENOENT") {
|
|
3395
3436
|
return { status: "ok", owners: [] };
|
|
@@ -3947,7 +3988,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
3947
3988
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
3948
3989
|
if (candidates.length === 0)
|
|
3949
3990
|
return 0;
|
|
3950
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
3991
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-p8wwmtnn.js");
|
|
3951
3992
|
let transferred = 0;
|
|
3952
3993
|
for (const record of candidates) {
|
|
3953
3994
|
try {
|
|
@@ -4304,4 +4345,4 @@ async function maintainBackgroundDelegations(directory, options = {}) {
|
|
|
4304
4345
|
return emitObservation("ok");
|
|
4305
4346
|
}
|
|
4306
4347
|
|
|
4307
|
-
export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
|
|
4348
|
+
export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, decodePrReviewWorkflowBinding, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-xc3q62ev.js";
|
|
6
6
|
import {
|
|
7
7
|
isPathWithinDeclaredScope,
|
|
8
8
|
unsafePathTextReason
|
|
9
9
|
} from "./index-556ja8an.js";
|
|
10
10
|
import {
|
|
11
11
|
validateSwarmPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8tqqmsav.js";
|
|
13
13
|
import {
|
|
14
14
|
bunSpawn,
|
|
15
15
|
classifySpawnFailure
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
atomicWriteFile,
|
|
27
27
|
taskEvidencePath,
|
|
28
28
|
withTaskEvidenceLock
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-mr3h3sm5.js";
|
|
30
30
|
import {
|
|
31
31
|
assertProjectRoot
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-2czt53wz.js";
|
|
33
33
|
import {
|
|
34
34
|
telemetry
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-kvq1e82k.js";
|
|
36
36
|
import {
|
|
37
37
|
exports_external,
|
|
38
38
|
init_zod
|
|
@@ -1557,6 +1557,9 @@ async function writeWorkflowWalFile(kind, filePath, wal) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
|
|
1559
1559
|
// src/gate-evidence.ts
|
|
1560
|
+
var _internals3 = {
|
|
1561
|
+
appendTaskGateRequirementsReceiptIfNeeded
|
|
1562
|
+
};
|
|
1560
1563
|
var TASK_WORKFLOW_SCHEMA_MARKER = "exact-task-v1";
|
|
1561
1564
|
var TASK_WORKFLOW_STATES = [
|
|
1562
1565
|
"idle",
|
|
@@ -1585,6 +1588,7 @@ var TASK_WORKFLOW_OUTCOMES = [
|
|
|
1585
1588
|
"task_closed",
|
|
1586
1589
|
"repair_idle"
|
|
1587
1590
|
];
|
|
1591
|
+
var TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL = "requirements_reconstruction";
|
|
1588
1592
|
function assertTaskEvidenceWriteAllowed(directory, taskId, event) {
|
|
1589
1593
|
assertValidTaskId(taskId);
|
|
1590
1594
|
const coderWalPath = validateSwarmPath(directory, `coder-settlements/${taskId}.json`);
|
|
@@ -1720,7 +1724,7 @@ function maybeExpandRequiredGates(existing, event) {
|
|
|
1720
1724
|
if (event.type === "accepted_mutation") {
|
|
1721
1725
|
const agentType = event.agentType;
|
|
1722
1726
|
if (typeof agentType === "string" && agentType.trim() !== "") {
|
|
1723
|
-
return existing ? expandRequiredGates(existing.required_gates, agentType, event.context ?? {}) : deriveRequiredGates(agentType, event.context ?? {});
|
|
1727
|
+
return existing ? expandRequiredGates(existing.required_gates.filter((gate) => gate !== TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL), agentType, event.context ?? {}) : deriveRequiredGates(agentType, event.context ?? {});
|
|
1724
1728
|
}
|
|
1725
1729
|
}
|
|
1726
1730
|
if (event.type === "stage_b_completed" && event.ensureDefaultStageB === true) {
|
|
@@ -2031,7 +2035,7 @@ async function withTaskEvidenceTransaction(directory, taskId, agent, callback) {
|
|
|
2031
2035
|
});
|
|
2032
2036
|
await atomicWriteFile(evidencePath, JSON.stringify(validated, null, 2));
|
|
2033
2037
|
if (event) {
|
|
2034
|
-
await appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, current, validated, event);
|
|
2038
|
+
await _internals3.appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, current, validated, event);
|
|
2035
2039
|
}
|
|
2036
2040
|
current = validated;
|
|
2037
2041
|
return validated;
|
|
@@ -2048,6 +2052,11 @@ async function withTaskEvidenceTransaction(directory, taskId, agent, callback) {
|
|
|
2048
2052
|
});
|
|
2049
2053
|
});
|
|
2050
2054
|
}
|
|
2055
|
+
async function ensureTaskGateRequirementsReceiptForSettledTransition(directory, taskId, evidence, event) {
|
|
2056
|
+
assertValidTaskId(taskId);
|
|
2057
|
+
const validated = TaskEvidenceSchema.parse({ ...evidence, taskId });
|
|
2058
|
+
await _internals3.appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, null, validated, event);
|
|
2059
|
+
}
|
|
2051
2060
|
async function recordGateEvidence(directory, taskId, gate, sessionId, turbo, options = {}) {
|
|
2052
2061
|
assertValidTaskId(taskId);
|
|
2053
2062
|
if (shouldTreatGateAsStageB(gate) && typeof options.expectedGeneration !== "number") {
|
|
@@ -2121,4 +2130,4 @@ function compareTaskWorkflowStateRank(left, right) {
|
|
|
2121
2130
|
return WORKFLOW_STATE_RANK[left] - WORKFLOW_STATE_RANK[right];
|
|
2122
2131
|
}
|
|
2123
2132
|
|
|
2124
|
-
export { isStrictTaskId, sanitizeTaskId, listRecoveryRecords, GitBinaryMissingError, GitSpawnCwdError, isGitBinaryMissing, isSpawnCwdMissing, isSpawnCwdUnreadable, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, TASK_WORKFLOW_SCHEMA_MARKER, assertTaskEvidenceWriteAllowed, parseTaskEvidence, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, withTaskEvidenceTransaction, recordGateEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
|
|
2133
|
+
export { isStrictTaskId, sanitizeTaskId, listRecoveryRecords, GitBinaryMissingError, GitSpawnCwdError, isGitBinaryMissing, isSpawnCwdMissing, isSpawnCwdUnreadable, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, _internals3 as _internals1, TASK_WORKFLOW_SCHEMA_MARKER, TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL, assertTaskEvidenceWriteAllowed, parseTaskEvidence, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, withTaskEvidenceTransaction, ensureTaskGateRequirementsReceiptForSettledTransition, recordGateEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
isCanonicalPathWithinRoot
|
|
4
|
+
} from "./index-cw912re7.js";
|
|
5
|
+
import {
|
|
6
|
+
sameExistingFilesystemPath
|
|
7
|
+
} from "./index-ry16d01s.js";
|
|
2
8
|
import {
|
|
3
9
|
FALLBACK_MODELS_MAX,
|
|
4
10
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
@@ -6,11 +12,11 @@ import {
|
|
|
6
12
|
PluginConfigSchema,
|
|
7
13
|
init_schema,
|
|
8
14
|
stripKnownSwarmPrefix
|
|
9
|
-
} from "./index-
|
|
15
|
+
} from "./index-8ck1jkhd.js";
|
|
10
16
|
import {
|
|
11
17
|
ALL_AGENT_NAMES,
|
|
12
18
|
init_constants
|
|
13
|
-
} from "./index-
|
|
19
|
+
} from "./index-8psybzzf.js";
|
|
14
20
|
import {
|
|
15
21
|
log
|
|
16
22
|
} from "./index-zgwm4ryv.js";
|
|
@@ -499,9 +505,9 @@ function restoreFromBackup(backupPath, directory) {
|
|
|
499
505
|
if (!fs.existsSync(backupPath)) {
|
|
500
506
|
return null;
|
|
501
507
|
}
|
|
502
|
-
const swarmDir = path.resolve(
|
|
508
|
+
const swarmDir = path.resolve(directory, ".swarm");
|
|
503
509
|
const resolvedBackup = path.resolve(backupPath);
|
|
504
|
-
if (!
|
|
510
|
+
if (!isCanonicalPathWithinRoot(resolvedBackup, swarmDir)) {
|
|
505
511
|
return null;
|
|
506
512
|
}
|
|
507
513
|
try {
|
|
@@ -1725,13 +1731,13 @@ function removeStraySwarmDir(projectRoot, strayPath) {
|
|
|
1725
1731
|
};
|
|
1726
1732
|
}
|
|
1727
1733
|
const rootSwarm = path.join(canonicalRoot, ".swarm");
|
|
1728
|
-
if (canonicalStray
|
|
1734
|
+
if (sameExistingFilesystemPath(canonicalStray, rootSwarm) || sameExistingFilesystemPath(canonicalStray, canonicalRoot)) {
|
|
1729
1735
|
return {
|
|
1730
1736
|
success: false,
|
|
1731
1737
|
message: "Refusing to remove root .swarm/ directory"
|
|
1732
1738
|
};
|
|
1733
1739
|
}
|
|
1734
|
-
if (!canonicalStray
|
|
1740
|
+
if (!isCanonicalPathWithinRoot(canonicalStray, canonicalRoot)) {
|
|
1735
1741
|
return {
|
|
1736
1742
|
success: false,
|
|
1737
1743
|
message: "Path is outside project root \u2014 refusing to remove"
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-xy59dnvq.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-8ck1jkhd.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8psybzzf.js";
|
|
13
13
|
|
|
14
14
|
// src/config/index.ts
|
|
15
15
|
init_constants();
|