opencode-swarm 7.166.1 → 7.166.3
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-nx8ff9k1.js} +13 -13
- package/dist/cli/{config-doctor-pjcjeh8f.js → config-doctor-n9cjh11e.js} +4 -4
- package/dist/cli/{core-v11pd1yk.js → core-cbwrwhcz.js} +2 -2
- package/dist/cli/{curation-policy-jtzwz6bc.js → curation-policy-bvxf5pxv.js} +11 -6
- package/dist/cli/{curator-ssvd7evd.js → curator-c7amtass.js} +40 -39
- package/dist/cli/{curator-drift-jpdfwae9.js → curator-drift-20m2ab5w.js} +6 -6
- package/dist/cli/curator-llm-factory-2gv6kt1v.js +71 -0
- package/dist/cli/{dispatch-591v13pp.js → dispatch-tmb929w8.js} +2 -2
- package/dist/cli/{evidence-summary-service-mw6tnsp9.js → evidence-summary-service-5th3zm9c.js} +17 -17
- package/dist/cli/{gate-evidence-jymaxb82.js → gate-evidence-py8v0w28.js} +9 -8
- package/dist/cli/guardrail-explain-qzhjhtyk.js +72 -0
- package/dist/cli/{guardrail-log-kzq2sktb.js → guardrail-log-rtdpk545.js} +9 -9
- package/dist/cli/{guardrail-reset-ea1g3g7d.js → guardrail-reset-s27fehv6.js} +40 -39
- package/dist/cli/{hive-promoter-ghjbgsms.js → hive-promoter-56mfysq6.js} +40 -39
- package/dist/cli/{index-52xdezsh.js → index-0jpv5z94.js} +5 -5
- package/dist/cli/{index-8hqkrd2j.js → index-1aex5zd9.js} +1 -1
- package/dist/cli/{index-6chhqq2n.js → index-251vrmge.js} +94 -3
- package/dist/cli/{index-w11whwn3.js → index-2c7eabkr.js} +9 -9
- package/dist/cli/{index-edm41q4j.js → index-2w0beg3s.js} +2 -2
- package/dist/cli/{index-nph5g4em.js → index-3a2xznmd.js} +2 -2
- package/dist/cli/{index-2y4kargd.js → index-3f1tr4ha.js} +4 -4
- package/dist/cli/{index-xezfx7ge.js → index-3nm1b3t2.js} +47 -13
- package/dist/cli/{index-gr8ppbq3.js → index-4c50tm9j.js} +3 -3
- package/dist/cli/{index-wf12wckd.js → index-4mgggb8x.js} +8 -3
- package/dist/cli/{index-17yszqs5.js → index-5bd84nxc.js} +1 -1
- package/dist/cli/{index-jx9f4ke1.js → index-6d4dc99f.js} +1 -1
- package/dist/cli/{index-79sr3fd1.js → index-75f9jj3h.js} +2 -2
- package/dist/cli/{index-ybcxvv17.js → index-87wqes24.js} +2 -2
- package/dist/cli/{index-bkd3450m.js → index-8cky7ksv.js} +36 -10
- package/dist/cli/{index-1zqf2pny.js → index-9wv6a3jx.js} +2 -2
- package/dist/cli/{index-fc1dqzjp.js → index-b7ra4hwj.js} +1 -1
- package/dist/cli/{index-6rff2h8x.js → index-bwvbj3fp.js} +4 -4
- package/dist/cli/{index-j29nkq5d.js → index-ch293kd3.js} +4 -4
- package/dist/cli/{index-gerkwyrr.js → index-d5gvr6z4.js} +1 -1
- package/dist/cli/{index-399nq780.js → index-dvhecfa9.js} +3839 -3182
- package/dist/cli/{index-hwj25q9r.js → index-f6zgz02s.js} +70 -53
- package/dist/cli/{index-3tyym20r.js → index-gbv76wf7.js} +2 -2
- package/dist/cli/{index-8fr2wn18.js → index-gk1w1h9k.js} +5 -1
- package/dist/cli/{index-13egyjgv.js → index-h92cqbqa.js} +5 -5
- package/dist/cli/{index-k5w284js.js → index-hfrb77tj.js} +17 -17
- package/dist/cli/{index-gy0nyfbw.js → index-m21x1bkx.js} +78 -25
- package/dist/cli/{index-hvk3zs62.js → index-m3tx1q9v.js} +1 -1
- package/dist/cli/{index-xwkn5hse.js → index-ms16gaa4.js} +7 -7
- package/dist/cli/{index-066xxa4q.js → index-qa7t42e7.js} +96 -31
- package/dist/cli/{index-2v17wb75.js → index-qd619x3r.js} +2 -2
- package/dist/cli/{index-axf65x87.js → index-qd726agw.js} +5 -5
- package/dist/cli/{index-c20gf089.js → index-qww0h314.js} +11 -6
- package/dist/cli/{index-aftapk6j.js → index-rk10x4zr.js} +3 -3
- package/dist/cli/{index-bfr392e7.js → index-sahf5yz3.js} +13 -6
- package/dist/cli/{index-a7rw4g4s.js → index-t8tw1bhs.js} +3 -3
- package/dist/cli/{index-0g5v4s0x.js → index-t9kjxzdr.js} +14 -14
- package/dist/cli/{index-zha9bdj9.js → index-tzq6t9wc.js} +11 -11
- package/dist/cli/index-vzm6zre7.js +167 -0
- package/dist/cli/{index-crjx4sx0.js → index-w50dk71y.js} +42 -41
- package/dist/cli/{index-yt25kpvz.js → index-xn16akay.js} +4 -4
- package/dist/cli/index.js +40 -39
- package/dist/cli/{knowledge-escalator-3pjed4tq.js → knowledge-escalator-stnveccq.js} +15 -14
- package/dist/cli/{knowledge-events-a5dwkg30.js → knowledge-events-ph6txm8h.js} +12 -12
- package/dist/cli/{knowledge-link-1zykfk1p.js → knowledge-link-w1fwqts4.js} +6 -4
- package/dist/cli/{knowledge-store-h85efsak.js → knowledge-store-tgyhr9nf.js} +10 -5
- package/dist/cli/{knowledge-validator-76qrf1ev.js → knowledge-validator-2g547bcn.js} +10 -7
- package/dist/cli/{pending-delegations-zgwfqfac.js → pending-delegations-873dtyw6.js} +14 -13
- package/dist/cli/{pr-subscriptions-fzy3ks1k.js → pr-subscriptions-xmxdrj1z.js} +20 -13
- package/dist/cli/{pr-workflow-gate-1gtsn7f0.js → pr-workflow-gate-h7644byf.js} +40 -39
- package/dist/cli/{runner-j3acybhs.js → runner-nmrjv7te.js} +8 -5
- package/dist/cli/{scan-cursor-ahwkxa8j.js → scan-cursor-tx72gxp0.js} +9 -6
- package/dist/cli/{schema-27sedbfk.js → schema-cpc92vq0.js} +4 -2
- package/dist/cli/{scope-persistence-q792yfxh.js → scope-persistence-xy3xs55f.js} +17 -15
- package/dist/cli/{skill-generator-g8wbjw6v.js → skill-generator-4f1v5zwx.js} +17 -16
- package/dist/cli/{snapshot-coordination-init-y6spakwm.js → snapshot-coordination-init-w2nw33pn.js} +40 -39
- package/dist/cli/{telemetry-9h1z2w9d.js → telemetry-ce0tx41h.js} +5 -1
- package/dist/cli/{workspace-snapshot-6z9rk7xw.js → workspace-snapshot-0kxj2grt.js} +11 -1
- package/dist/cli/{worktree-collision-ownership-pmpnftkd.js → worktree-collision-ownership-1g1qz8wc.js} +15 -14
- package/dist/cli/{worktree-isolation-4053n0px.js → worktree-isolation-jwxtrh3z.js} +40 -39
- package/dist/commands/close.d.ts +82 -0
- package/dist/config/schema.d.ts +9 -0
- package/dist/context-map/capsule-persistence.d.ts +13 -8
- package/dist/evidence/phase-participation.d.ts +1 -1
- package/dist/hooks/delegate-ack-collector.d.ts +7 -0
- package/dist/hooks/guardrails/execution-stall.d.ts +10 -5
- package/dist/hooks/hive-promoter.d.ts +28 -5
- package/dist/hooks/knowledge-store.d.ts +7 -0
- package/dist/hooks/repo-graph-builder.d.ts +14 -0
- package/dist/hooks/review-receipt.d.ts +29 -1
- package/dist/hooks/system-enhancer.d.ts +21 -0
- package/dist/index.js +578 -573
- package/dist/knowledge/curation-policy.d.ts +7 -0
- package/dist/memory/consolidation-log.d.ts +9 -0
- package/dist/memory/injector.d.ts +7 -0
- package/dist/memory/run-log.d.ts +8 -0
- package/dist/observability/catalog.d.ts +1 -1
- package/dist/retention/caps.d.ts +33 -0
- package/dist/retention/dir-prune.d.ts +72 -0
- package/dist/retention/jsonl-cap.d.ts +84 -0
- package/dist/retention/sweep.d.ts +67 -0
- package/dist/services/compaction-service.d.ts +14 -0
- package/dist/services/skill-changelog.d.ts +20 -0
- package/dist/session/snapshot-writer.d.ts +42 -0
- package/dist/summaries/manager.d.ts +41 -4
- package/dist/telemetry.d.ts +31 -1
- package/dist/test-impact/history-store.d.ts +16 -0
- package/dist/turbo/epic/calibration.d.ts +16 -1
- package/dist/turbo/epic/divergence-recorder.d.ts +11 -0
- package/dist/utils/atomic-write.d.ts +32 -0
- package/dist/utils/swarm-artifact-cache.d.ts +6 -0
- package/opencode-swarm.schema.json +15 -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,67 @@ 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-dvhecfa9.js";
|
|
7
|
+
import"./index-d5qf7hvh.js";
|
|
8
|
+
import"./index-m3tx1q9v.js";
|
|
9
|
+
import"./index-4c50tm9j.js";
|
|
10
|
+
import"./index-gk1w1h9k.js";
|
|
11
|
+
import"./index-t9kjxzdr.js";
|
|
12
|
+
import"./index-5bd84nxc.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-qa7t42e7.js";
|
|
16
|
+
import"./index-h92cqbqa.js";
|
|
17
|
+
import"./index-87wqes24.js";
|
|
18
18
|
import"./index-70ha9e09.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-1aex5zd9.js";
|
|
20
20
|
import"./index-9ss2m4rs.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-3nm1b3t2.js";
|
|
22
22
|
import"./index-zsrtt42s.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
23
|
+
import"./index-hfrb77tj.js";
|
|
24
|
+
import"./index-251vrmge.js";
|
|
25
|
+
import"./index-9wv6a3jx.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-xn16akay.js";
|
|
29
|
+
import"./index-b7ra4hwj.js";
|
|
30
|
+
import"./index-2c7eabkr.js";
|
|
31
|
+
import"./index-tzq6t9wc.js";
|
|
32
|
+
import"./index-sahf5yz3.js";
|
|
34
33
|
import"./index-p612v1mv.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-bwvbj3fp.js";
|
|
35
|
+
import"./index-qww0h314.js";
|
|
37
36
|
import"./index-rtry5xyf.js";
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-3a2xznmd.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-ms16gaa4.js";
|
|
41
|
+
import"./index-3f1tr4ha.js";
|
|
42
|
+
import"./index-qd619x3r.js";
|
|
43
|
+
import"./index-75f9jj3h.js";
|
|
44
|
+
import"./index-6d4dc99f.js";
|
|
45
|
+
import"./index-rk10x4zr.js";
|
|
47
46
|
import"./index-ry16d01s.js";
|
|
48
47
|
import"./index-n4fzmqz8.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
48
|
+
import"./index-qd726agw.js";
|
|
49
|
+
import"./index-8cky7ksv.js";
|
|
50
|
+
import"./index-vzm6zre7.js";
|
|
51
51
|
import"./index-ae75rja9.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-t8tw1bhs.js";
|
|
53
|
+
import"./index-2w0beg3s.js";
|
|
54
|
+
import"./index-m21x1bkx.js";
|
|
55
|
+
import"./index-f6zgz02s.js";
|
|
53
56
|
import"./index-7qefgq4j.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-gy0nyfbw.js";
|
|
56
|
-
import"./index-hwj25q9r.js";
|
|
57
|
+
import"./index-ee6ydtfe.js";
|
|
57
58
|
import"./index-7g4c7s5r.js";
|
|
58
|
-
import"./index-
|
|
59
|
+
import"./index-0jpv5z94.js";
|
|
59
60
|
import"./index-9e6fdz2h.js";
|
|
60
61
|
import"./index-4rhhvd1a.js";
|
|
61
|
-
import"./index-
|
|
62
|
+
import"./index-4mgggb8x.js";
|
|
62
63
|
import"./index-0tc0pcmh.js";
|
|
63
|
-
import"./index-zpsr8rpc.js";
|
|
64
64
|
import"./index-bk5tah7q.js";
|
|
65
65
|
import"./index-bpmtbmy9.js";
|
|
66
|
+
import"./index-zpsr8rpc.js";
|
|
66
67
|
import"./index-q1r1cfww.js";
|
|
67
68
|
import"./index-yzjaj53h.js";
|
|
68
69
|
import"./index-zgwm4ryv.js";
|
|
@@ -7,68 +7,69 @@ 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-dvhecfa9.js";
|
|
11
|
+
import"./index-d5qf7hvh.js";
|
|
12
|
+
import"./index-m3tx1q9v.js";
|
|
13
|
+
import"./index-4c50tm9j.js";
|
|
14
|
+
import"./index-gk1w1h9k.js";
|
|
15
|
+
import"./index-t9kjxzdr.js";
|
|
16
|
+
import"./index-5bd84nxc.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-qa7t42e7.js";
|
|
20
|
+
import"./index-h92cqbqa.js";
|
|
21
|
+
import"./index-87wqes24.js";
|
|
22
22
|
import"./index-70ha9e09.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-1aex5zd9.js";
|
|
24
24
|
import"./index-9ss2m4rs.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-3nm1b3t2.js";
|
|
26
26
|
import"./index-zsrtt42s.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
27
|
+
import"./index-hfrb77tj.js";
|
|
28
|
+
import"./index-251vrmge.js";
|
|
29
|
+
import"./index-9wv6a3jx.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-xn16akay.js";
|
|
33
|
+
import"./index-b7ra4hwj.js";
|
|
34
|
+
import"./index-2c7eabkr.js";
|
|
35
|
+
import"./index-tzq6t9wc.js";
|
|
36
|
+
import"./index-sahf5yz3.js";
|
|
38
37
|
import"./index-p612v1mv.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
38
|
+
import"./index-bwvbj3fp.js";
|
|
39
|
+
import"./index-qww0h314.js";
|
|
41
40
|
import"./index-rtry5xyf.js";
|
|
42
|
-
import"./index-
|
|
41
|
+
import"./index-3a2xznmd.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-ms16gaa4.js";
|
|
45
|
+
import"./index-3f1tr4ha.js";
|
|
46
|
+
import"./index-qd619x3r.js";
|
|
47
|
+
import"./index-75f9jj3h.js";
|
|
48
|
+
import"./index-6d4dc99f.js";
|
|
49
|
+
import"./index-rk10x4zr.js";
|
|
51
50
|
import"./index-ry16d01s.js";
|
|
52
51
|
import"./index-n4fzmqz8.js";
|
|
53
|
-
import"./index-
|
|
52
|
+
import"./index-qd726agw.js";
|
|
54
53
|
import {
|
|
55
54
|
resolveHiveKnowledgePath
|
|
56
|
-
} from "./index-
|
|
55
|
+
} from "./index-8cky7ksv.js";
|
|
56
|
+
import"./index-vzm6zre7.js";
|
|
57
57
|
import"./index-ae75rja9.js";
|
|
58
|
-
import"./index-
|
|
58
|
+
import"./index-t8tw1bhs.js";
|
|
59
|
+
import"./index-2w0beg3s.js";
|
|
60
|
+
import"./index-m21x1bkx.js";
|
|
61
|
+
import"./index-f6zgz02s.js";
|
|
59
62
|
import"./index-7qefgq4j.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-gy0nyfbw.js";
|
|
62
|
-
import"./index-hwj25q9r.js";
|
|
63
|
+
import"./index-ee6ydtfe.js";
|
|
63
64
|
import"./index-7g4c7s5r.js";
|
|
64
|
-
import"./index-
|
|
65
|
+
import"./index-0jpv5z94.js";
|
|
65
66
|
import"./index-9e6fdz2h.js";
|
|
66
67
|
import"./index-4rhhvd1a.js";
|
|
67
|
-
import"./index-
|
|
68
|
+
import"./index-4mgggb8x.js";
|
|
68
69
|
import"./index-0tc0pcmh.js";
|
|
69
|
-
import"./index-zpsr8rpc.js";
|
|
70
70
|
import"./index-bk5tah7q.js";
|
|
71
71
|
import"./index-bpmtbmy9.js";
|
|
72
|
+
import"./index-zpsr8rpc.js";
|
|
72
73
|
import"./index-q1r1cfww.js";
|
|
73
74
|
import"./index-yzjaj53h.js";
|
|
74
75
|
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-4mgggb8x.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
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
validateSwarmPath
|
|
4
|
+
} from "./index-sahf5yz3.js";
|
|
2
5
|
import {
|
|
3
6
|
bunSpawn
|
|
4
7
|
} from "./index-p612v1mv.js";
|
|
5
8
|
import {
|
|
9
|
+
atomicWriteSwarmFile
|
|
10
|
+
} from "./index-m21x1bkx.js";
|
|
11
|
+
import {
|
|
12
|
+
canonicalRootKey,
|
|
6
13
|
sameProjectRoot
|
|
7
14
|
} from "./index-7qefgq4j.js";
|
|
8
15
|
import {
|
|
@@ -1105,7 +1112,8 @@ function porcelainV2PathAfterFields(record, fields) {
|
|
|
1105
1112
|
const pathValue = record.slice(offset);
|
|
1106
1113
|
return pathValue || null;
|
|
1107
1114
|
}
|
|
1108
|
-
|
|
1115
|
+
var SNAPSHOT_DIGEST_MARKER_FILENAME = "workspace-snapshot.digest";
|
|
1116
|
+
function parseCaptureOptions(optionsOrScope, prHeadShaArg) {
|
|
1109
1117
|
const scope = typeof optionsOrScope === "object" && optionsOrScope !== null ? optionsOrScope.scope ?? null : optionsOrScope;
|
|
1110
1118
|
const configuredPrHeadSha = (() => {
|
|
1111
1119
|
if (typeof optionsOrScope !== "object" || optionsOrScope === null) {
|
|
@@ -1114,6 +1122,16 @@ function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg
|
|
|
1114
1122
|
return optionsOrScope.prHeadSha ?? null;
|
|
1115
1123
|
})();
|
|
1116
1124
|
const resolveCurrentPrHeadSha = typeof optionsOrScope === "object" && optionsOrScope !== null && optionsOrScope.resolveCurrentPrHeadSha === true;
|
|
1125
|
+
return { scope, configuredPrHeadSha, resolveCurrentPrHeadSha };
|
|
1126
|
+
}
|
|
1127
|
+
function snapshotContentDigest(snapshot) {
|
|
1128
|
+
if (snapshot.gitHead === null || snapshot.dirtyHash === null)
|
|
1129
|
+
return null;
|
|
1130
|
+
return digest(`${snapshot.gitHead}
|
|
1131
|
+
${snapshot.dirtyHash}`);
|
|
1132
|
+
}
|
|
1133
|
+
function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg = null) {
|
|
1134
|
+
const { scope, configuredPrHeadSha, resolveCurrentPrHeadSha } = parseCaptureOptions(optionsOrScope, prHeadShaArg);
|
|
1117
1135
|
const upstreamBefore = resolveCurrentPrHeadSha ? runGit(directory, ["rev-parse", "@{upstream}"]) : null;
|
|
1118
1136
|
const porcelainRaw = runGit(directory, [
|
|
1119
1137
|
"status",
|
|
@@ -1127,7 +1145,7 @@ function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg
|
|
|
1127
1145
|
const upstreamAfter = resolveCurrentPrHeadSha ? runGit(directory, ["rev-parse", "@{upstream}"]) : null;
|
|
1128
1146
|
const prHeadSha = resolveCurrentPrHeadSha ? upstreamBefore && upstreamBefore === upstreamAfter ? upstreamBefore : null : configuredPrHeadSha;
|
|
1129
1147
|
return {
|
|
1130
|
-
directory:
|
|
1148
|
+
directory: canonicalRootKey(directory),
|
|
1131
1149
|
gitHead: snapshot?.gitHead ?? null,
|
|
1132
1150
|
dirtyHash: porcelain === null ? null : digest(porcelain),
|
|
1133
1151
|
changedFiles: snapshot ? [
|
|
@@ -1140,6 +1158,52 @@ function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg
|
|
|
1140
1158
|
scope
|
|
1141
1159
|
};
|
|
1142
1160
|
}
|
|
1161
|
+
async function captureWorkspaceSnapshotAsync(directory, optionsOrScope = null, prHeadShaArg = null) {
|
|
1162
|
+
const { scope, configuredPrHeadSha, resolveCurrentPrHeadSha } = parseCaptureOptions(optionsOrScope, prHeadShaArg);
|
|
1163
|
+
const upstreamBefore = resolveCurrentPrHeadSha ? await runGitAsync(directory, ["rev-parse", "@{upstream}"]) : null;
|
|
1164
|
+
const porcelainRaw = await runGitAsync(directory, [
|
|
1165
|
+
"status",
|
|
1166
|
+
"--porcelain=v2",
|
|
1167
|
+
"--branch",
|
|
1168
|
+
"-z",
|
|
1169
|
+
"--untracked-files=all"
|
|
1170
|
+
]);
|
|
1171
|
+
const porcelain = porcelainRaw === null ? null : filterSwarmRuntimePorcelain(porcelainRaw);
|
|
1172
|
+
const snapshot = porcelain === null ? null : parsePorcelainV2Snapshot(porcelain);
|
|
1173
|
+
const upstreamAfter = resolveCurrentPrHeadSha ? await runGitAsync(directory, ["rev-parse", "@{upstream}"]) : null;
|
|
1174
|
+
const prHeadSha = resolveCurrentPrHeadSha ? upstreamBefore && upstreamBefore === upstreamAfter ? upstreamBefore : null : configuredPrHeadSha;
|
|
1175
|
+
const captured = {
|
|
1176
|
+
directory: canonicalRootKey(directory),
|
|
1177
|
+
gitHead: snapshot?.gitHead ?? null,
|
|
1178
|
+
dirtyHash: porcelain === null ? null : digest(porcelain),
|
|
1179
|
+
changedFiles: snapshot ? [
|
|
1180
|
+
...new Set([
|
|
1181
|
+
...snapshot.dirtyTrackedPaths,
|
|
1182
|
+
...snapshot.untrackedPaths
|
|
1183
|
+
])
|
|
1184
|
+
] : null,
|
|
1185
|
+
prHeadSha,
|
|
1186
|
+
scope
|
|
1187
|
+
};
|
|
1188
|
+
const contentDigest = snapshotContentDigest(captured);
|
|
1189
|
+
if (contentDigest !== null && !shouldSkipSnapshot(directory, contentDigest)) {
|
|
1190
|
+
try {
|
|
1191
|
+
await atomicWriteSwarmFile(validateSwarmPath(directory, SNAPSHOT_DIGEST_MARKER_FILENAME), `${contentDigest}
|
|
1192
|
+
`);
|
|
1193
|
+
} catch {}
|
|
1194
|
+
}
|
|
1195
|
+
return captured;
|
|
1196
|
+
}
|
|
1197
|
+
function shouldSkipSnapshot(directory, digestText) {
|
|
1198
|
+
if (!/^[0-9a-f]{64}$/.test(digestText))
|
|
1199
|
+
return false;
|
|
1200
|
+
try {
|
|
1201
|
+
const stored = fs.readFileSync(validateSwarmPath(directory, SNAPSHOT_DIGEST_MARKER_FILENAME), "utf-8");
|
|
1202
|
+
return stored.trim() === digestText;
|
|
1203
|
+
} catch {
|
|
1204
|
+
return false;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1143
1207
|
function changedFilesSinceSnapshot(directory, baseline) {
|
|
1144
1208
|
if (!baseline?.gitHead || baseline.changedFiles == null)
|
|
1145
1209
|
return null;
|
|
@@ -1167,6 +1231,33 @@ function changedFilesSinceSnapshot(directory, baseline) {
|
|
|
1167
1231
|
}
|
|
1168
1232
|
return [...changed];
|
|
1169
1233
|
}
|
|
1234
|
+
async function changedFilesSinceSnapshotAsync(directory, baseline) {
|
|
1235
|
+
if (!baseline?.gitHead || baseline.changedFiles == null)
|
|
1236
|
+
return null;
|
|
1237
|
+
const baselineDirt = baseline.changedFiles.filter((p) => !isSwarmRuntimePath(p));
|
|
1238
|
+
if (baselineDirt.length > 0)
|
|
1239
|
+
return null;
|
|
1240
|
+
const current = await captureWorkspaceSnapshotAsync(directory);
|
|
1241
|
+
if (!current.gitHead || current.changedFiles == null)
|
|
1242
|
+
return null;
|
|
1243
|
+
const changed = new Set(current.changedFiles);
|
|
1244
|
+
if (baseline.gitHead !== current.gitHead) {
|
|
1245
|
+
const committed = await runGitAsync(directory, [
|
|
1246
|
+
"diff",
|
|
1247
|
+
"--name-only",
|
|
1248
|
+
"-z",
|
|
1249
|
+
baseline.gitHead,
|
|
1250
|
+
current.gitHead
|
|
1251
|
+
]);
|
|
1252
|
+
if (committed === null)
|
|
1253
|
+
return null;
|
|
1254
|
+
for (const changedPath of parseNulPaths(committed)) {
|
|
1255
|
+
if (!isSwarmRuntimePath(changedPath))
|
|
1256
|
+
changed.add(changedPath);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
return [...changed];
|
|
1260
|
+
}
|
|
1170
1261
|
function workspaceSnapshotMatches(expected, current) {
|
|
1171
1262
|
if (!expected)
|
|
1172
1263
|
return { ok: true };
|
|
@@ -1214,4 +1305,4 @@ var _internals = {
|
|
|
1214
1305
|
readChangedFileSync: (filePath) => fs.readFileSync(filePath)
|
|
1215
1306
|
};
|
|
1216
1307
|
|
|
1217
|
-
export { readGitTextAtRevision, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentLocalHeadRefAsync, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, redactRemoteUrlIdentity, resolveRemoteUrlIdentity, resolveRemoteUrlIdentityAsync, resolveGitControlStateDigest, resolveGitControlStateDigestAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolvePrFeedbackTrackingCandidatesAsync, switchPrFeedbackTrackingCandidateAsync, resolvePrWorkflowRevisionDigestDetailed, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailedAsync, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, isSwarmRuntimePath, parsePorcelainV2Snapshot, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|
|
1308
|
+
export { readGitTextAtRevision, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveExactMergeBase, resolveExactMergeBaseAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolveCurrentUpstreamRemoteRef, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentLocalHeadRefAsync, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, redactRemoteUrlIdentity, resolveRemoteUrlIdentity, resolveRemoteUrlIdentityAsync, resolveGitControlStateDigest, resolveGitControlStateDigestAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolvePrFeedbackTrackingCandidatesAsync, switchPrFeedbackTrackingCandidateAsync, resolvePrWorkflowRevisionDigestDetailed, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailedAsync, resolvePrWorkflowRevisionDigestAsync, parsePorcelainPaths, isSwarmRuntimePath, parsePorcelainV2Snapshot, captureWorkspaceSnapshot, captureWorkspaceSnapshotAsync, shouldSkipSnapshot, changedFilesSinceSnapshot, changedFilesSinceSnapshotAsync, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sahf5yz3.js";
|
|
5
5
|
import {
|
|
6
6
|
bunWrite
|
|
7
7
|
} from "./index-p612v1mv.js";
|
|
@@ -18,22 +18,22 @@ import {
|
|
|
18
18
|
releaseCoordinationLease,
|
|
19
19
|
transitionCoordinationState,
|
|
20
20
|
withCoordinationTransaction
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-6d4dc99f.js";
|
|
22
22
|
import {
|
|
23
23
|
getProjectDb,
|
|
24
24
|
projectDbExists
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-rk10x4zr.js";
|
|
26
26
|
import {
|
|
27
27
|
observeDelegationLedgerPressure
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-qd726agw.js";
|
|
29
|
+
import {
|
|
30
|
+
EvidenceLockTimeoutError,
|
|
31
|
+
withEvidenceLock
|
|
32
|
+
} from "./index-2w0beg3s.js";
|
|
29
33
|
import {
|
|
30
34
|
canonicalRootKeyFresh,
|
|
31
35
|
sameProjectRoot
|
|
32
36
|
} from "./index-7qefgq4j.js";
|
|
33
|
-
import {
|
|
34
|
-
EvidenceLockTimeoutError,
|
|
35
|
-
withEvidenceLock
|
|
36
|
-
} from "./index-edm41q4j.js";
|
|
37
37
|
import {
|
|
38
38
|
exports_external,
|
|
39
39
|
init_zod
|
|
@@ -4524,7 +4524,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
4524
4524
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
4525
4525
|
if (candidates.length === 0)
|
|
4526
4526
|
return 0;
|
|
4527
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
4527
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-nx8ff9k1.js");
|
|
4528
4528
|
let transferred = 0;
|
|
4529
4529
|
for (const record of candidates) {
|
|
4530
4530
|
try {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
atomicWriteFileAnyRoot
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-m21x1bkx.js";
|
|
5
5
|
import {
|
|
6
6
|
emit
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-f6zgz02s.js";
|
|
8
8
|
import {
|
|
9
9
|
require_proper_lockfile
|
|
10
10
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-0jpv5z94.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-4mgggb8x.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import {
|
|
3
3
|
derivePlanId,
|
|
4
4
|
derivePlanIdentityHash
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-6d4dc99f.js";
|
|
6
6
|
import {
|
|
7
7
|
assertProjectRoot,
|
|
8
8
|
withEvidenceLock
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-2w0beg3s.js";
|
|
10
10
|
import {
|
|
11
11
|
emit
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-f6zgz02s.js";
|
|
13
13
|
import {
|
|
14
14
|
ExecutionProfileSchema,
|
|
15
15
|
PlanSchema,
|
|
16
16
|
TaskStatusSchema,
|
|
17
17
|
init_loader
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-0jpv5z94.js";
|
|
19
19
|
import {
|
|
20
20
|
criticalWarn,
|
|
21
21
|
init_logger,
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sahf5yz3.js";
|
|
5
5
|
import {
|
|
6
6
|
deleteCoordinationState,
|
|
7
7
|
importCoordinationOnce,
|
|
8
8
|
listCoordinationStates,
|
|
9
9
|
transitionCoordinationState,
|
|
10
10
|
withCoordinationTransaction
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-6d4dc99f.js";
|
|
12
12
|
import {
|
|
13
13
|
getProjectDb,
|
|
14
14
|
projectDbExists
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-rk10x4zr.js";
|
|
16
16
|
import {
|
|
17
17
|
observeStoreHealth
|
|
18
|
-
} from "./index-
|
|
19
|
-
import {
|
|
20
|
-
canonicalRootKey,
|
|
21
|
-
canonicalRootKeyFresh,
|
|
22
|
-
sameProjectRoot
|
|
23
|
-
} from "./index-7qefgq4j.js";
|
|
18
|
+
} from "./index-qd726agw.js";
|
|
24
19
|
import {
|
|
25
20
|
withEvidenceLock
|
|
26
|
-
} from "./index-
|
|
21
|
+
} from "./index-2w0beg3s.js";
|
|
27
22
|
import {
|
|
28
23
|
atomicWriteSwarmFileSync
|
|
29
|
-
} from "./index-
|
|
24
|
+
} from "./index-m21x1bkx.js";
|
|
30
25
|
import {
|
|
31
26
|
telemetry
|
|
32
|
-
} from "./index-
|
|
27
|
+
} from "./index-f6zgz02s.js";
|
|
28
|
+
import {
|
|
29
|
+
canonicalRootKey,
|
|
30
|
+
canonicalRootKeyFresh,
|
|
31
|
+
sameProjectRoot
|
|
32
|
+
} from "./index-7qefgq4j.js";
|
|
33
33
|
import {
|
|
34
34
|
exports_external,
|
|
35
35
|
init_zod
|
|
@@ -75,7 +75,41 @@ var PR_SUBSCRIPTION_LIMITS = {
|
|
|
75
75
|
};
|
|
76
76
|
var onSubscriptionCreated = null;
|
|
77
77
|
function setOnSubscriptionCreated(callback) {
|
|
78
|
+
const previous = onSubscriptionCreated;
|
|
78
79
|
onSubscriptionCreated = callback;
|
|
80
|
+
return previous;
|
|
81
|
+
}
|
|
82
|
+
var prMonitorWorkerHandlers = new Map;
|
|
83
|
+
var MAX_PR_MONITOR_WORKER_HANDLERS = 64;
|
|
84
|
+
function registerPrMonitorWorkerHandler(directory, handler) {
|
|
85
|
+
const key = canonicalRootKey(directory);
|
|
86
|
+
while (prMonitorWorkerHandlers.size >= MAX_PR_MONITOR_WORKER_HANDLERS && !prMonitorWorkerHandlers.has(key)) {
|
|
87
|
+
const oldest = prMonitorWorkerHandlers.keys().next().value;
|
|
88
|
+
if (oldest === undefined)
|
|
89
|
+
break;
|
|
90
|
+
prMonitorWorkerHandlers.delete(oldest);
|
|
91
|
+
}
|
|
92
|
+
prMonitorWorkerHandlers.set(key, handler);
|
|
93
|
+
}
|
|
94
|
+
function removePrMonitorWorkerHandler(directory, expectedHandler) {
|
|
95
|
+
const key = canonicalRootKey(directory);
|
|
96
|
+
if (expectedHandler !== undefined && prMonitorWorkerHandlers.get(key) !== expectedHandler) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
prMonitorWorkerHandlers.delete(key);
|
|
100
|
+
}
|
|
101
|
+
function dispatchPrMonitorWorkerHandler(directory, record) {
|
|
102
|
+
const handler = prMonitorWorkerHandlers.get(canonicalRootKey(directory));
|
|
103
|
+
if (handler)
|
|
104
|
+
handler(directory, record);
|
|
105
|
+
}
|
|
106
|
+
function ensurePrSubscriptionDispatcherInstalled() {
|
|
107
|
+
if (onSubscriptionCreated === dispatchPrMonitorWorkerHandler)
|
|
108
|
+
return;
|
|
109
|
+
const previous = setOnSubscriptionCreated(dispatchPrMonitorWorkerHandler);
|
|
110
|
+
if (previous !== null) {
|
|
111
|
+
log("[pr-monitor] superseded a previous on-subscription-created callback (installing the per-project dispatcher)");
|
|
112
|
+
}
|
|
79
113
|
}
|
|
80
114
|
var RecordSchema = exports_external.object({
|
|
81
115
|
correlationId: exports_external.string().min(1),
|
|
@@ -2429,4 +2463,4 @@ var _internals = {
|
|
|
2429
2463
|
writeCheckpointFile
|
|
2430
2464
|
};
|
|
2431
2465
|
|
|
2432
|
-
export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, PrSubscriptionCapacityError, isPrSubscriptionCapacityError, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
|
|
2466
|
+
export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, registerPrMonitorWorkerHandler, removePrMonitorWorkerHandler, ensurePrSubscriptionDispatcherInstalled, PrSubscriptionCapacityError, isPrSubscriptionCapacityError, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
observeStoreHealth
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-qd726agw.js";
|
|
5
5
|
import {
|
|
6
6
|
telemetry
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-f6zgz02s.js";
|
|
8
8
|
import {
|
|
9
9
|
init_schema,
|
|
10
10
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-4mgggb8x.js";
|
|
12
12
|
import {
|
|
13
13
|
init_constants
|
|
14
14
|
} from "./index-0tc0pcmh.js";
|