opencode-swarm 7.166.1 → 7.166.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/candidate-contract.d.ts +14 -0
- package/dist/background/pr-subscriptions.d.ts +33 -1
- package/dist/background/workspace-snapshot.d.ts +41 -0
- package/dist/cli/{coder-settlement-x0h3h6vd.js → coder-settlement-pv86n7n4.js} +13 -13
- package/dist/cli/{config-doctor-pjcjeh8f.js → config-doctor-fy1aytwt.js} +4 -4
- package/dist/cli/{core-v11pd1yk.js → core-1d9vqbt4.js} +2 -2
- package/dist/cli/{curation-policy-jtzwz6bc.js → curation-policy-gnpgc3z7.js} +7 -5
- package/dist/cli/{curator-ssvd7evd.js → curator-a4rbehfr.js} +39 -39
- package/dist/cli/{curator-drift-jpdfwae9.js → curator-drift-efmgp1v2.js} +6 -6
- package/dist/cli/curator-llm-factory-cwg62ynw.js +70 -0
- package/dist/cli/{dispatch-591v13pp.js → dispatch-tmb929w8.js} +2 -2
- package/dist/cli/{evidence-summary-service-mw6tnsp9.js → evidence-summary-service-dvp1kbm4.js} +17 -17
- package/dist/cli/{gate-evidence-jymaxb82.js → gate-evidence-qf27gdfx.js} +9 -8
- package/dist/cli/guardrail-explain-zskpzgsr.js +71 -0
- package/dist/cli/{guardrail-log-kzq2sktb.js → guardrail-log-qhw3knjt.js} +9 -9
- package/dist/cli/{guardrail-reset-ea1g3g7d.js → guardrail-reset-84ydxdg3.js} +39 -39
- package/dist/cli/{hive-promoter-ghjbgsms.js → hive-promoter-y2daybf6.js} +39 -39
- package/dist/cli/{index-52xdezsh.js → index-0a0jsbhg.js} +5 -5
- package/dist/cli/{index-a7rw4g4s.js → index-14z9en94.js} +3 -3
- package/dist/cli/{index-gy0nyfbw.js → index-19hjpqsy.js} +61 -16
- package/dist/cli/{index-bkd3450m.js → index-22sannyk.js} +7 -7
- package/dist/cli/{index-8fr2wn18.js → index-2n1v8ft1.js} +1 -1
- package/dist/cli/{index-zha9bdj9.js → index-3nww2vnx.js} +11 -11
- package/dist/cli/{index-gr8ppbq3.js → index-3wtfrjcx.js} +3 -3
- package/dist/cli/{index-bfr392e7.js → index-4kwxpnf8.js} +13 -6
- package/dist/cli/{index-xwkn5hse.js → index-7mxrqy4r.js} +7 -7
- package/dist/cli/{index-jx9f4ke1.js → index-7pp8fz4j.js} +1 -1
- package/dist/cli/{index-6rff2h8x.js → index-8nv3bc9h.js} +4 -4
- package/dist/cli/{index-2y4kargd.js → index-9ccxcjdm.js} +4 -4
- package/dist/cli/{index-hwj25q9r.js → index-bks56jbg.js} +70 -53
- package/dist/cli/{index-8hqkrd2j.js → index-bysyj3z4.js} +1 -1
- package/dist/cli/{index-yt25kpvz.js → index-c0eyq4rp.js} +4 -4
- package/dist/cli/{index-c20gf089.js → index-c23w8t46.js} +1 -1
- package/dist/cli/{index-wf12wckd.js → index-e0bjbadr.js} +1 -1
- package/dist/cli/{index-axf65x87.js → index-fkk7x6sy.js} +5 -5
- package/dist/cli/{index-17yszqs5.js → index-ft1tnx0e.js} +1 -1
- package/dist/cli/{index-399nq780.js → index-gy55mc55.js} +285 -177
- package/dist/cli/{index-k5w284js.js → index-hbjax6hy.js} +17 -17
- package/dist/cli/{index-2v17wb75.js → index-hgphhnrp.js} +2 -2
- package/dist/cli/{index-hvk3zs62.js → index-j81kpway.js} +1 -1
- package/dist/cli/{index-066xxa4q.js → index-jgtje76m.js} +7 -7
- package/dist/cli/{index-xezfx7ge.js → index-jr6tppv9.js} +47 -13
- package/dist/cli/{index-nph5g4em.js → index-kd68b6mg.js} +2 -2
- package/dist/cli/{index-crjx4sx0.js → index-nrdj94za.js} +41 -41
- package/dist/cli/{index-79sr3fd1.js → index-nthqfxzz.js} +2 -2
- package/dist/cli/{index-6chhqq2n.js → index-p0r5fn7y.js} +94 -3
- package/dist/cli/{index-fc1dqzjp.js → index-qmp4gxac.js} +1 -1
- package/dist/cli/{index-j29nkq5d.js → index-st47knj6.js} +4 -4
- package/dist/cli/{index-edm41q4j.js → index-sxe3t040.js} +2 -2
- package/dist/cli/{index-w11whwn3.js → index-sxsyd7kf.js} +9 -9
- package/dist/cli/{index-13egyjgv.js → index-ty0wg9yp.js} +5 -5
- package/dist/cli/{index-0g5v4s0x.js → index-wz258yje.js} +14 -14
- package/dist/cli/{index-ybcxvv17.js → index-x4azb6qj.js} +2 -2
- package/dist/cli/{index-1zqf2pny.js → index-x8cvbkjs.js} +2 -2
- package/dist/cli/{index-aftapk6j.js → index-y3dtdn2f.js} +3 -3
- package/dist/cli/{index-gerkwyrr.js → index-ytsts0zj.js} +1 -1
- package/dist/cli/{index-3tyym20r.js → index-z1kmkh72.js} +2 -2
- package/dist/cli/index.js +39 -39
- package/dist/cli/{knowledge-escalator-3pjed4tq.js → knowledge-escalator-aq7gzhpd.js} +14 -14
- package/dist/cli/{knowledge-events-a5dwkg30.js → knowledge-events-9z5sskyv.js} +12 -12
- package/dist/cli/{knowledge-link-1zykfk1p.js → knowledge-link-ps2v4s18.js} +6 -4
- package/dist/cli/{knowledge-store-h85efsak.js → knowledge-store-1hzt2a0t.js} +7 -5
- package/dist/cli/{knowledge-validator-76qrf1ev.js → knowledge-validator-xe1fza7c.js} +9 -7
- package/dist/cli/{pending-delegations-zgwfqfac.js → pending-delegations-0nfjg7vp.js} +13 -13
- package/dist/cli/{pr-subscriptions-fzy3ks1k.js → pr-subscriptions-8974hwa0.js} +19 -13
- package/dist/cli/{pr-workflow-gate-1gtsn7f0.js → pr-workflow-gate-xgak5wvz.js} +39 -39
- package/dist/cli/{runner-j3acybhs.js → runner-7zqbp81n.js} +8 -5
- package/dist/cli/{scan-cursor-ahwkxa8j.js → scan-cursor-hc4v0c90.js} +8 -6
- package/dist/cli/{schema-27sedbfk.js → schema-w1hsvw1h.js} +2 -2
- package/dist/cli/{scope-persistence-q792yfxh.js → scope-persistence-k17003v4.js} +16 -15
- package/dist/cli/{skill-generator-g8wbjw6v.js → skill-generator-tbxgpc9x.js} +16 -16
- package/dist/cli/{snapshot-coordination-init-y6spakwm.js → snapshot-coordination-init-vaf34wf0.js} +39 -39
- package/dist/cli/{telemetry-9h1z2w9d.js → telemetry-8qn4eag5.js} +5 -1
- package/dist/cli/{workspace-snapshot-6z9rk7xw.js → workspace-snapshot-y85jy6gs.js} +11 -1
- package/dist/cli/{worktree-collision-ownership-pmpnftkd.js → worktree-collision-ownership-r3jdke7h.js} +14 -14
- package/dist/cli/{worktree-isolation-4053n0px.js → worktree-isolation-sa1tbqff.js} +39 -39
- package/dist/evidence/phase-participation.d.ts +1 -1
- package/dist/hooks/guardrails/execution-stall.d.ts +10 -5
- package/dist/hooks/hive-promoter.d.ts +28 -5
- package/dist/hooks/repo-graph-builder.d.ts +14 -0
- package/dist/hooks/system-enhancer.d.ts +21 -0
- package/dist/index.js +124 -122
- package/dist/observability/catalog.d.ts +1 -1
- package/dist/session/snapshot-writer.d.ts +42 -0
- package/dist/telemetry.d.ts +31 -1
- package/dist/utils/atomic-write.d.ts +32 -0
- package/dist/utils/swarm-artifact-cache.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-da5q3gg6.js +0 -70
- package/dist/cli/guardrail-explain-eva1yrtf.js +0 -71
- package/dist/cli/{index-2sqgbmtq.js → index-d5qf7hvh.js} +3 -3
|
@@ -3,66 +3,66 @@ 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-
|
|
12
|
-
import"./index-
|
|
6
|
+
} from "./index-gy55mc55.js";
|
|
7
|
+
import"./index-d5qf7hvh.js";
|
|
8
|
+
import"./index-j81kpway.js";
|
|
9
|
+
import"./index-3wtfrjcx.js";
|
|
10
|
+
import"./index-2n1v8ft1.js";
|
|
11
|
+
import"./index-wz258yje.js";
|
|
12
|
+
import"./index-ft1tnx0e.js";
|
|
13
13
|
import"./index-txdagbh7.js";
|
|
14
14
|
import"./index-cw912re7.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-jgtje76m.js";
|
|
16
|
+
import"./index-ty0wg9yp.js";
|
|
17
|
+
import"./index-x4azb6qj.js";
|
|
18
18
|
import"./index-70ha9e09.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-bysyj3z4.js";
|
|
20
20
|
import"./index-9ss2m4rs.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-jr6tppv9.js";
|
|
22
22
|
import"./index-zsrtt42s.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
23
|
+
import"./index-hbjax6hy.js";
|
|
24
|
+
import"./index-p0r5fn7y.js";
|
|
25
|
+
import"./index-x8cvbkjs.js";
|
|
26
26
|
import"./index-b43rt5ph.js";
|
|
27
27
|
import"./index-q7sjgr1y.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-ee6ydtfe.js";
|
|
28
|
+
import"./index-c0eyq4rp.js";
|
|
29
|
+
import"./index-qmp4gxac.js";
|
|
30
|
+
import"./index-sxsyd7kf.js";
|
|
31
|
+
import"./index-3nww2vnx.js";
|
|
32
|
+
import"./index-4kwxpnf8.js";
|
|
34
33
|
import"./index-p612v1mv.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-8nv3bc9h.js";
|
|
35
|
+
import"./index-c23w8t46.js";
|
|
37
36
|
import"./index-rtry5xyf.js";
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-kd68b6mg.js";
|
|
39
38
|
import"./index-3qf1vxtb.js";
|
|
40
39
|
import"./index-n832052r.js";
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
40
|
+
import"./index-7mxrqy4r.js";
|
|
41
|
+
import"./index-9ccxcjdm.js";
|
|
42
|
+
import"./index-hgphhnrp.js";
|
|
43
|
+
import"./index-nthqfxzz.js";
|
|
44
|
+
import"./index-7pp8fz4j.js";
|
|
45
|
+
import"./index-y3dtdn2f.js";
|
|
47
46
|
import"./index-ry16d01s.js";
|
|
48
47
|
import"./index-n4fzmqz8.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
48
|
+
import"./index-fkk7x6sy.js";
|
|
49
|
+
import"./index-22sannyk.js";
|
|
51
50
|
import"./index-ae75rja9.js";
|
|
52
|
-
import"./index-
|
|
51
|
+
import"./index-14z9en94.js";
|
|
52
|
+
import"./index-sxe3t040.js";
|
|
53
|
+
import"./index-19hjpqsy.js";
|
|
54
|
+
import"./index-bks56jbg.js";
|
|
53
55
|
import"./index-7qefgq4j.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-gy0nyfbw.js";
|
|
56
|
-
import"./index-hwj25q9r.js";
|
|
56
|
+
import"./index-ee6ydtfe.js";
|
|
57
57
|
import"./index-7g4c7s5r.js";
|
|
58
|
-
import"./index-
|
|
58
|
+
import"./index-0a0jsbhg.js";
|
|
59
59
|
import"./index-9e6fdz2h.js";
|
|
60
60
|
import"./index-4rhhvd1a.js";
|
|
61
|
-
import"./index-
|
|
61
|
+
import"./index-e0bjbadr.js";
|
|
62
62
|
import"./index-0tc0pcmh.js";
|
|
63
|
-
import"./index-zpsr8rpc.js";
|
|
64
63
|
import"./index-bk5tah7q.js";
|
|
65
64
|
import"./index-bpmtbmy9.js";
|
|
65
|
+
import"./index-zpsr8rpc.js";
|
|
66
66
|
import"./index-q1r1cfww.js";
|
|
67
67
|
import"./index-yzjaj53h.js";
|
|
68
68
|
import"./index-zgwm4ryv.js";
|
|
@@ -7,68 +7,68 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
10
|
+
} from "./index-gy55mc55.js";
|
|
11
|
+
import"./index-d5qf7hvh.js";
|
|
12
|
+
import"./index-j81kpway.js";
|
|
13
|
+
import"./index-3wtfrjcx.js";
|
|
14
|
+
import"./index-2n1v8ft1.js";
|
|
15
|
+
import"./index-wz258yje.js";
|
|
16
|
+
import"./index-ft1tnx0e.js";
|
|
17
17
|
import"./index-txdagbh7.js";
|
|
18
18
|
import"./index-cw912re7.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
19
|
+
import"./index-jgtje76m.js";
|
|
20
|
+
import"./index-ty0wg9yp.js";
|
|
21
|
+
import"./index-x4azb6qj.js";
|
|
22
22
|
import"./index-70ha9e09.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-bysyj3z4.js";
|
|
24
24
|
import"./index-9ss2m4rs.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-jr6tppv9.js";
|
|
26
26
|
import"./index-zsrtt42s.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
27
|
+
import"./index-hbjax6hy.js";
|
|
28
|
+
import"./index-p0r5fn7y.js";
|
|
29
|
+
import"./index-x8cvbkjs.js";
|
|
30
30
|
import"./index-b43rt5ph.js";
|
|
31
31
|
import"./index-q7sjgr1y.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-ee6ydtfe.js";
|
|
32
|
+
import"./index-c0eyq4rp.js";
|
|
33
|
+
import"./index-qmp4gxac.js";
|
|
34
|
+
import"./index-sxsyd7kf.js";
|
|
35
|
+
import"./index-3nww2vnx.js";
|
|
36
|
+
import"./index-4kwxpnf8.js";
|
|
38
37
|
import"./index-p612v1mv.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
38
|
+
import"./index-8nv3bc9h.js";
|
|
39
|
+
import"./index-c23w8t46.js";
|
|
41
40
|
import"./index-rtry5xyf.js";
|
|
42
|
-
import"./index-
|
|
41
|
+
import"./index-kd68b6mg.js";
|
|
43
42
|
import"./index-3qf1vxtb.js";
|
|
44
43
|
import"./index-n832052r.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
44
|
+
import"./index-7mxrqy4r.js";
|
|
45
|
+
import"./index-9ccxcjdm.js";
|
|
46
|
+
import"./index-hgphhnrp.js";
|
|
47
|
+
import"./index-nthqfxzz.js";
|
|
48
|
+
import"./index-7pp8fz4j.js";
|
|
49
|
+
import"./index-y3dtdn2f.js";
|
|
51
50
|
import"./index-ry16d01s.js";
|
|
52
51
|
import"./index-n4fzmqz8.js";
|
|
53
|
-
import"./index-
|
|
52
|
+
import"./index-fkk7x6sy.js";
|
|
54
53
|
import {
|
|
55
54
|
resolveHiveKnowledgePath
|
|
56
|
-
} from "./index-
|
|
55
|
+
} from "./index-22sannyk.js";
|
|
57
56
|
import"./index-ae75rja9.js";
|
|
58
|
-
import"./index-
|
|
57
|
+
import"./index-14z9en94.js";
|
|
58
|
+
import"./index-sxe3t040.js";
|
|
59
|
+
import"./index-19hjpqsy.js";
|
|
60
|
+
import"./index-bks56jbg.js";
|
|
59
61
|
import"./index-7qefgq4j.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-gy0nyfbw.js";
|
|
62
|
-
import"./index-hwj25q9r.js";
|
|
62
|
+
import"./index-ee6ydtfe.js";
|
|
63
63
|
import"./index-7g4c7s5r.js";
|
|
64
|
-
import"./index-
|
|
64
|
+
import"./index-0a0jsbhg.js";
|
|
65
65
|
import"./index-9e6fdz2h.js";
|
|
66
66
|
import"./index-4rhhvd1a.js";
|
|
67
|
-
import"./index-
|
|
67
|
+
import"./index-e0bjbadr.js";
|
|
68
68
|
import"./index-0tc0pcmh.js";
|
|
69
|
-
import"./index-zpsr8rpc.js";
|
|
70
69
|
import"./index-bk5tah7q.js";
|
|
71
70
|
import"./index-bpmtbmy9.js";
|
|
71
|
+
import"./index-zpsr8rpc.js";
|
|
72
72
|
import"./index-q1r1cfww.js";
|
|
73
73
|
import"./index-yzjaj53h.js";
|
|
74
74
|
import"./index-zgwm4ryv.js";
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
PluginConfigSchema,
|
|
15
15
|
init_schema,
|
|
16
16
|
resolveExternalSkillsConfig
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-e0bjbadr.js";
|
|
18
|
+
import {
|
|
19
|
+
exports_external,
|
|
20
|
+
init_zod
|
|
21
|
+
} from "./index-bpmtbmy9.js";
|
|
18
22
|
import {
|
|
19
23
|
DangerousMergeKeyError,
|
|
20
24
|
MAX_MERGE_DEPTH,
|
|
21
25
|
deepMerge,
|
|
22
26
|
init_merge
|
|
23
27
|
} from "./index-zpsr8rpc.js";
|
|
24
|
-
import {
|
|
25
|
-
exports_external,
|
|
26
|
-
init_zod
|
|
27
|
-
} from "./index-bpmtbmy9.js";
|
|
28
28
|
import {
|
|
29
29
|
__esm,
|
|
30
30
|
__export
|
|
@@ -6,6 +6,21 @@ import * as path from "path";
|
|
|
6
6
|
var MAX_CACHE_ENTRIES = 128;
|
|
7
7
|
var textCache = new Map;
|
|
8
8
|
var parsedCache = new Map;
|
|
9
|
+
var MAX_KNOWN_TO_EXIST_PATHS = 512;
|
|
10
|
+
var knownToExist = new Set;
|
|
11
|
+
function noteKnownToExist(resolvedPath) {
|
|
12
|
+
if (knownToExist.has(resolvedPath))
|
|
13
|
+
return;
|
|
14
|
+
knownToExist.add(resolvedPath);
|
|
15
|
+
if (knownToExist.size > MAX_KNOWN_TO_EXIST_PATHS) {
|
|
16
|
+
const oldest = knownToExist.values().next().value;
|
|
17
|
+
if (oldest !== undefined)
|
|
18
|
+
knownToExist.delete(oldest);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function wasObservedToExist(filePath) {
|
|
22
|
+
return knownToExist.has(path.resolve(filePath));
|
|
23
|
+
}
|
|
9
24
|
var stats = {
|
|
10
25
|
textReadCount: 0,
|
|
11
26
|
textCacheHitCount: 0,
|
|
@@ -76,6 +91,7 @@ async function readCachedTextFile(filePath, directRead) {
|
|
|
76
91
|
stats.textReadCount++;
|
|
77
92
|
return directRead();
|
|
78
93
|
}
|
|
94
|
+
noteKnownToExist(cacheKey);
|
|
79
95
|
const cached = textCache.get(cacheKey);
|
|
80
96
|
if (cached && sameStamp(cached, stamp)) {
|
|
81
97
|
stats.textCacheHitCount++;
|
|
@@ -574,6 +590,28 @@ function assertSwarmContainedTarget(targetPath) {
|
|
|
574
590
|
var MAX_ATOMIC_WRITE_BYTES = 256 * 1024 * 1024;
|
|
575
591
|
var RENAME_RETRY_DELAYS_MS = [10, 25, 50, 100, 200];
|
|
576
592
|
var RETRYABLE_RENAME_CODES = new Set(["EPERM", "EBUSY", "EACCES", "EEXIST"]);
|
|
593
|
+
var MAX_RECENT_WRITE_TRACKED_PATHS = 256;
|
|
594
|
+
var RECENT_WRITE_WINDOW_MS = 500;
|
|
595
|
+
var recentWriteActivity = new Map;
|
|
596
|
+
function noteRecentWriteActivity(resolvedTarget) {
|
|
597
|
+
recentWriteActivity.delete(resolvedTarget);
|
|
598
|
+
recentWriteActivity.set(resolvedTarget, Date.now());
|
|
599
|
+
while (recentWriteActivity.size > MAX_RECENT_WRITE_TRACKED_PATHS) {
|
|
600
|
+
const oldest = recentWriteActivity.keys().next().value;
|
|
601
|
+
if (oldest === undefined)
|
|
602
|
+
break;
|
|
603
|
+
recentWriteActivity.delete(oldest);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
function clearRecentWriteActivity(targetPath) {
|
|
607
|
+
return recentWriteActivity.delete(path2.resolve(targetPath));
|
|
608
|
+
}
|
|
609
|
+
function wasRecentlyWrittenByThisProcess(targetPath, withinMs = RECENT_WRITE_WINDOW_MS) {
|
|
610
|
+
const last = recentWriteActivity.get(path2.resolve(targetPath));
|
|
611
|
+
if (last === undefined)
|
|
612
|
+
return false;
|
|
613
|
+
return Date.now() - last <= withinMs;
|
|
614
|
+
}
|
|
577
615
|
var _internals2 = {
|
|
578
616
|
randomSuffix: () => randomBytes(16).toString("hex"),
|
|
579
617
|
writeSync: (fd, buffer, offset, length) => fs2.writeSync(fd, buffer, offset, length),
|
|
@@ -619,6 +657,7 @@ function writeAtomicSync(targetPath, content, options) {
|
|
|
619
657
|
assertWellFormedTargetPath(targetPath);
|
|
620
658
|
}
|
|
621
659
|
const resolvedTarget = path2.resolve(targetPath);
|
|
660
|
+
noteRecentWriteActivity(resolvedTarget);
|
|
622
661
|
const buffer = toBuffer(content);
|
|
623
662
|
const maxBytes = options?.maxBytes ?? MAX_ATOMIC_WRITE_BYTES;
|
|
624
663
|
if (buffer.byteLength > maxBytes) {
|
|
@@ -627,25 +666,30 @@ function writeAtomicSync(targetPath, content, options) {
|
|
|
627
666
|
const tempPath = `${resolvedTarget}.${_internals2.randomSuffix()}.tmp`;
|
|
628
667
|
fs2.mkdirSync(path2.dirname(tempPath), { recursive: true });
|
|
629
668
|
try {
|
|
630
|
-
const fd = fs2.openSync(tempPath, "wx", options?.mode);
|
|
631
669
|
try {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
670
|
+
const fd = fs2.openSync(tempPath, "wx", options?.mode);
|
|
671
|
+
try {
|
|
672
|
+
let written = 0;
|
|
673
|
+
while (written < buffer.byteLength) {
|
|
674
|
+
written += _internals2.writeSync(fd, buffer, written, buffer.byteLength - written);
|
|
675
|
+
}
|
|
676
|
+
if (options?.skipFsync !== true) {
|
|
677
|
+
try {
|
|
678
|
+
_internals2.fsyncSync(fd);
|
|
679
|
+
} catch {}
|
|
680
|
+
}
|
|
681
|
+
} finally {
|
|
682
|
+
fs2.closeSync(fd);
|
|
640
683
|
}
|
|
684
|
+
renameWithRetry(tempPath, resolvedTarget);
|
|
641
685
|
} finally {
|
|
642
|
-
|
|
686
|
+
try {
|
|
687
|
+
_internals2.unlinkSync(tempPath);
|
|
688
|
+
} catch {}
|
|
643
689
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
_internals2.unlinkSync(tempPath);
|
|
648
|
-
} catch {}
|
|
690
|
+
} catch (error) {
|
|
691
|
+
clearRecentWriteActivity(resolvedTarget);
|
|
692
|
+
throw error;
|
|
649
693
|
}
|
|
650
694
|
try {
|
|
651
695
|
const dirFd = fs2.openSync(path2.dirname(resolvedTarget), "r");
|
|
@@ -656,6 +700,7 @@ function writeAtomicSync(targetPath, content, options) {
|
|
|
656
700
|
}
|
|
657
701
|
} catch {}
|
|
658
702
|
invalidateCachedArtifact(resolvedTarget);
|
|
703
|
+
noteRecentWriteActivity(resolvedTarget);
|
|
659
704
|
}
|
|
660
705
|
async function atomicWriteSwarmFile(targetPath, content, options) {
|
|
661
706
|
await new Promise((resolve3) => setImmediate(resolve3));
|
|
@@ -669,4 +714,4 @@ async function atomicWriteFileAnyRoot(targetPath, content, options) {
|
|
|
669
714
|
writeAtomicSync(targetPath, content, { ...options, contained: false });
|
|
670
715
|
}
|
|
671
716
|
|
|
672
|
-
export { readCachedTextFile, readCachedParsedFile, invalidateCachedArtifact, resetSwarmArtifactCache, matchTempGrammar, parseTargetBasename, atomicWriteSwarmFile, atomicWriteSwarmFileSync, atomicWriteFileAnyRoot };
|
|
717
|
+
export { wasObservedToExist, readCachedTextFile, readCachedParsedFile, invalidateCachedArtifact, resetSwarmArtifactCache, matchTempGrammar, parseTargetBasename, RECENT_WRITE_WINDOW_MS, wasRecentlyWrittenByThisProcess, atomicWriteSwarmFile, atomicWriteSwarmFileSync, atomicWriteFileAnyRoot };
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./index-ae75rja9.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveKnowledgeStoreDir
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-14z9en94.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteFile
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-sxe3t040.js";
|
|
13
13
|
import {
|
|
14
14
|
readCachedParsedFile
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-19hjpqsy.js";
|
|
16
16
|
import {
|
|
17
17
|
require_proper_lockfile
|
|
18
18
|
} from "./index-7g4c7s5r.js";
|
|
@@ -713,7 +713,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
713
713
|
const {
|
|
714
714
|
readAuthoritativeKnowledgeCounterRollups,
|
|
715
715
|
effectiveRetrievalOutcomes
|
|
716
|
-
} = await import("./knowledge-events-
|
|
716
|
+
} = await import("./knowledge-events-9z5sskyv.js");
|
|
717
717
|
const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
|
|
718
718
|
const flagIds = new Set;
|
|
719
719
|
for (const e of atFloor) {
|
|
@@ -780,11 +780,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
783
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
784
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
783
|
+
const { quarantineEntry } = await import("./knowledge-validator-xe1fza7c.js");
|
|
784
|
+
const { KnowledgeConfigSchema } = await import("./schema-w1hsvw1h.js");
|
|
785
785
|
let config;
|
|
786
786
|
try {
|
|
787
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
787
|
+
const { loadPluginConfigWithMeta } = await import("./index-st47knj6.js");
|
|
788
788
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
789
789
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
790
790
|
} catch {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-4kwxpnf8.js";
|
|
5
5
|
import {
|
|
6
6
|
observeReceiptTransition
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-fkk7x6sy.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveHiveEventsPath
|
|
10
10
|
} from "./index-ae75rja9.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveKnowledgeStoreDir
|
|
13
|
-
} from "./index-
|
|
14
|
-
import {
|
|
15
|
-
canonicalRootKey
|
|
16
|
-
} from "./index-7qefgq4j.js";
|
|
13
|
+
} from "./index-14z9en94.js";
|
|
17
14
|
import {
|
|
18
15
|
assertProjectRoot,
|
|
19
16
|
atomicWriteFile
|
|
20
|
-
} from "./index-
|
|
17
|
+
} from "./index-sxe3t040.js";
|
|
21
18
|
import {
|
|
22
19
|
emit
|
|
23
|
-
} from "./index-
|
|
20
|
+
} from "./index-bks56jbg.js";
|
|
21
|
+
import {
|
|
22
|
+
canonicalRootKey
|
|
23
|
+
} from "./index-7qefgq4j.js";
|
|
24
24
|
import {
|
|
25
25
|
require_proper_lockfile
|
|
26
26
|
} from "./index-7g4c7s5r.js";
|
|
27
27
|
import {
|
|
28
28
|
loadPluginConfigWithMeta
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-0a0jsbhg.js";
|
|
30
30
|
import {
|
|
31
31
|
KnowledgeConfigSchema,
|
|
32
32
|
init_schema
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-e0bjbadr.js";
|
|
34
34
|
import {
|
|
35
35
|
init_logger,
|
|
36
36
|
warn
|
|
@@ -2813,7 +2813,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
let bumps = 0;
|
|
2815
2815
|
if (deltas.length > 0) {
|
|
2816
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2816
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-1hzt2a0t.js");
|
|
2817
2817
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2818
2818
|
}
|
|
2819
2819
|
return {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
observeStoreHealth
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-fkk7x6sy.js";
|
|
5
5
|
import {
|
|
6
6
|
telemetry
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-bks56jbg.js";
|
|
8
8
|
import {
|
|
9
9
|
init_schema,
|
|
10
10
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-e0bjbadr.js";
|
|
12
12
|
import {
|
|
13
13
|
init_constants
|
|
14
14
|
} from "./index-0tc0pcmh.js";
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
SwarmError
|
|
4
|
-
} from "./index-ee6ydtfe.js";
|
|
5
2
|
import {
|
|
6
3
|
bunFile
|
|
7
4
|
} from "./index-p612v1mv.js";
|
|
8
5
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
RECENT_WRITE_WINDOW_MS,
|
|
7
|
+
readCachedTextFile,
|
|
8
|
+
wasObservedToExist,
|
|
9
|
+
wasRecentlyWrittenByThisProcess
|
|
10
|
+
} from "./index-19hjpqsy.js";
|
|
11
|
+
import {
|
|
12
|
+
SwarmError
|
|
13
|
+
} from "./index-ee6ydtfe.js";
|
|
11
14
|
import {
|
|
12
15
|
warn
|
|
13
16
|
} from "./index-zgwm4ryv.js";
|
|
@@ -144,8 +147,9 @@ async function readSwarmFileAsync(directory, filename, cache) {
|
|
|
144
147
|
const ENOENT_RETRY_DELAY_MS = 10;
|
|
145
148
|
const maxAttempts = 6;
|
|
146
149
|
for (let attempt = 0;attempt < maxAttempts; attempt++) {
|
|
150
|
+
let resolvedPath = "";
|
|
147
151
|
try {
|
|
148
|
-
|
|
152
|
+
resolvedPath = _internals.validateSwarmPath(directory, filename);
|
|
149
153
|
return await _internals.readCachedTextFile(resolvedPath, async () => {
|
|
150
154
|
const file = bunFile(resolvedPath);
|
|
151
155
|
return await file.text();
|
|
@@ -153,6 +157,9 @@ async function readSwarmFileAsync(directory, filename, cache) {
|
|
|
153
157
|
} catch (err) {
|
|
154
158
|
const code = err?.code;
|
|
155
159
|
if (code === "ENOENT") {
|
|
160
|
+
const retryWorthy = resolvedPath !== "" && (wasRecentlyWrittenByThisProcess(resolvedPath, RECENT_WRITE_WINDOW_MS) || wasObservedToExist(resolvedPath));
|
|
161
|
+
if (!retryWorthy)
|
|
162
|
+
return null;
|
|
156
163
|
if (attempt >= ENOENT_MAX_ATTEMPTS - 1)
|
|
157
164
|
return null;
|
|
158
165
|
await new Promise((resolve2) => setTimeout(resolve2, ENOENT_RETRY_DELAY_MS));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-9ccxcjdm.js";
|
|
5
5
|
import {
|
|
6
6
|
appendCoreEventSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-hgphhnrp.js";
|
|
8
8
|
import {
|
|
9
9
|
deleteCoordinationState,
|
|
10
10
|
derivePlanId,
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
transitionCoordinationState,
|
|
14
14
|
transitionCoordinationStateWithinTransaction,
|
|
15
15
|
withCoordinationTransaction
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-7pp8fz4j.js";
|
|
17
17
|
import {
|
|
18
18
|
getProjectDb
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-y3dtdn2f.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalExistingFilesystemPath,
|
|
22
22
|
legacyCanonicalExistingFilesystemPath
|
|
23
23
|
} from "./index-ry16d01s.js";
|
|
24
24
|
import {
|
|
25
25
|
assertProjectRoot
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-sxe3t040.js";
|
|
27
27
|
import {
|
|
28
28
|
atomicWriteSwarmFile,
|
|
29
29
|
atomicWriteSwarmFileSync
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-19hjpqsy.js";
|
|
31
31
|
import {
|
|
32
32
|
require_proper_lockfile
|
|
33
33
|
} from "./index-7g4c7s5r.js";
|
|
34
34
|
import {
|
|
35
35
|
PlanSchema
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-0a0jsbhg.js";
|
|
37
37
|
import {
|
|
38
38
|
init_path_identity,
|
|
39
39
|
unsafePathTextReason
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-c23w8t46.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-22sannyk.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-14z9en94.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-sxe3t040.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import {
|
|
3
3
|
derivePlanId,
|
|
4
4
|
derivePlanIdentityHash
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-7pp8fz4j.js";
|
|
6
6
|
import {
|
|
7
7
|
assertProjectRoot,
|
|
8
8
|
withEvidenceLock
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-sxe3t040.js";
|
|
10
10
|
import {
|
|
11
11
|
emit
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-bks56jbg.js";
|
|
13
13
|
import {
|
|
14
14
|
ExecutionProfileSchema,
|
|
15
15
|
PlanSchema,
|
|
16
16
|
TaskStatusSchema,
|
|
17
17
|
init_loader
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-0a0jsbhg.js";
|
|
19
19
|
import {
|
|
20
20
|
criticalWarn,
|
|
21
21
|
init_logger,
|