opencode-swarm 7.163.1 → 7.164.1
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/README.md +1 -1
- package/dist/cli/{coder-settlement-f1gtvcy8.js → coder-settlement-w4qk90kh.js} +12 -13
- package/dist/cli/{config-doctor-0fnqzqz1.js → config-doctor-r81bp1nd.js} +3 -3
- package/dist/cli/{core-w81fk5sc.js → core-xfw4s9b9.js} +2 -2
- package/dist/cli/{curation-policy-j12j2gvc.js → curation-policy-2h37sd6p.js} +6 -7
- package/dist/cli/{curator-as495r18.js → curator-7zy6bdmw.js} +36 -39
- package/dist/cli/{curator-drift-g6w4ga1q.js → curator-drift-ykrdf08r.js} +105 -38
- package/dist/cli/curator-llm-factory-7gjvm4ds.js +66 -0
- package/dist/cli/{evidence-summary-service-51dxfcn5.js → evidence-summary-service-519ny6b1.js} +17 -18
- package/dist/cli/{gate-evidence-nb1e8hz0.js → gate-evidence-a7st3vbc.js} +8 -9
- package/dist/cli/guardrail-explain-ewcm37em.js +67 -0
- package/dist/cli/{guardrail-log-2kwntcqw.js → guardrail-log-kp51by1v.js} +8 -9
- package/dist/cli/{guardrail-reset-mrxrc56j.js → guardrail-reset-reyfwtwn.js} +36 -39
- package/dist/cli/hive-promoter-zf2vf5sw.js +81 -0
- package/dist/cli/{index-4p0wyz5p.js → index-1af3rb5n.js} +9 -9
- package/dist/cli/{index-2zgjcmmc.js → index-1b1h770t.js} +3 -3
- package/dist/cli/{index-0tervb1m.js → index-2ee2g27m.js} +7795 -2724
- package/dist/cli/{index-x2f1f011.js → index-2s40e3b0.js} +4 -3
- package/dist/cli/{index-9xd073d4.js → index-2yd732fd.js} +7 -1
- package/dist/cli/{index-9crtmnqg.js → index-36nt17m8.js} +1 -1
- package/dist/cli/{index-d3azve4r.js → index-5084szce.js} +122 -300
- package/dist/cli/{index-d9gdwh34.js → index-5bza8nxz.js} +2 -2
- package/dist/cli/{index-xyhmt813.js → index-6097tx05.js} +1 -1
- package/dist/cli/{index-5056zmpt.js → index-644t46hr.js} +1 -1
- package/dist/cli/{index-2v06a1yh.js → index-6ay5zp1v.js} +5 -5
- package/dist/cli/{index-n2mhyect.js → index-6kd3jnaf.js} +1 -1
- package/dist/cli/{index-n67vx5zw.js → index-6t35714n.js} +2 -2
- package/dist/cli/{index-tnpf9wwv.js → index-862c0xhc.js} +1 -1
- package/dist/cli/{index-2n1ym7jb.js → index-b98r3pyv.js} +5 -5
- package/dist/cli/{index-8ada7ag7.js → index-dhzsvmx6.js} +2 -2
- package/dist/cli/{index-n985274d.js → index-e630pvvw.js} +4 -4
- package/dist/cli/{index-3b762978.js → index-f9nfknjg.js} +182 -37
- package/dist/cli/{index-m1fvbah1.js → index-fwfhbs27.js} +2 -2
- package/dist/cli/{index-t34daffb.js → index-h2f21caa.js} +2 -2
- package/dist/cli/{index-9ss2m4rs.js → index-hcn69kp0.js} +410 -1
- package/dist/cli/{index-g3znh2yd.js → index-hzaw10zh.js} +7 -7
- package/dist/cli/{index-cqgpvx2d.js → index-j0ajeary.js} +2 -2
- package/dist/cli/{index-f923njwh.js → index-jczbtx2x.js} +7 -7
- package/dist/cli/{index-hm239n1p.js → index-k8j7m0e2.js} +1 -1
- package/dist/cli/{index-zjme8atd.js → index-n1wcq816.js} +5 -5
- package/dist/cli/{index-66073kej.js → index-pmmfhzsp.js} +3 -3
- package/dist/cli/{index-fckfgptr.js → index-qbr05tbw.js} +2 -2
- package/dist/cli/{index-r56f3f81.js → index-r5jn0ah5.js} +2 -2
- package/dist/cli/{index-dtn0pne5.js → index-v56mhyhs.js} +1 -1
- package/dist/cli/{index-etvq73mp.js → index-vc3zmtxb.js} +38 -41
- package/dist/cli/{index-kvra3nv1.js → index-vdgw2k4c.js} +3 -3
- package/dist/cli/{index-0103w5pf.js → index-vkckf2ch.js} +2 -2
- package/dist/cli/{index-swgy9xvk.js → index-vrxx0ea4.js} +4 -4
- package/dist/cli/{index-08y8pccg.js → index-wnf1ej2q.js} +4 -4
- package/dist/cli/{index-qynqyfgj.js → index-wv4b01ex.js} +32 -34
- package/dist/cli/{index-7n9jznv0.js → index-x2qmpkth.js} +5 -5
- package/dist/cli/index-y2f5s2cf.js +403 -0
- package/dist/cli/{index-ma52g2pq.js → index-yc415pzf.js} +655 -16
- package/dist/cli/{index-n249fbw7.js → index-zaab1wz9.js} +5 -0
- package/dist/cli/index.js +36 -39
- package/dist/cli/{knowledge-escalator-fq7dm2g4.js → knowledge-escalator-wwkbsgvw.js} +14 -15
- package/dist/cli/{knowledge-events-3zanyfkr.js → knowledge-events-vmmgwfmc.js} +12 -13
- package/dist/cli/{knowledge-link-vmdj5e5d.js → knowledge-link-bvra01zv.js} +5 -6
- package/dist/cli/{knowledge-store-vhehnw52.js → knowledge-store-6wbagbqm.js} +6 -7
- package/dist/cli/{knowledge-validator-0tt0pe6b.js → knowledge-validator-q1z4fmeg.js} +8 -9
- package/dist/cli/{model-preflight-c3mc8njg.js → model-preflight-1ecjbg73.js} +1 -1
- package/dist/cli/{pending-delegations-b92pecbj.js → pending-delegations-cq5g4rr4.js} +6 -8
- package/dist/cli/{pr-subscriptions-2mkdt0ak.js → pr-subscriptions-m0z5wxkb.js} +6 -7
- package/dist/cli/pr-workflow-gate-0zvp0qs9.js +221 -0
- package/dist/cli/{runner-3gw2njnx.js → runner-s55g5233.js} +6 -7
- package/dist/cli/{scan-cursor-1c8a3b0m.js → scan-cursor-z6zepy3r.js} +7 -8
- package/dist/cli/{schema-c554j5c8.js → schema-skf0ckh4.js} +2 -2
- package/dist/cli/{scope-persistence-vtbcszvv.js → scope-persistence-f6davq7x.js} +10 -11
- package/dist/cli/{skill-generator-0es21fck.js → skill-generator-wqbazppk.js} +16 -17
- package/dist/cli/{sqlite-loader-c92413n7.js → sqlite-loader-8zefc142.js} +1 -1
- package/dist/cli/{telemetry-x4zggfd7.js → telemetry-q51s6tyt.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-043dg8gg.js → worktree-collision-ownership-c0030qbm.js} +7 -9
- package/dist/cli/{worktree-isolation-hk42yxw7.js → worktree-isolation-09qq8066.js} +36 -39
- package/dist/db/canonical-project.d.ts +31 -0
- package/dist/db/db-errors.d.ts +24 -0
- package/dist/db/driver-parity.d.ts +31 -0
- package/dist/db/durability.d.ts +40 -0
- package/dist/db/group-commit-writer.d.ts +117 -0
- package/dist/db/health.d.ts +35 -0
- package/dist/db/insight-candidate-store.d.ts +61 -0
- package/dist/db/legacy-import.d.ts +77 -0
- package/dist/db/phase-report-store.d.ts +45 -0
- package/dist/db/project-db.d.ts +35 -8
- package/dist/db/qa-gate-profile.d.ts +2 -0
- package/dist/hooks/curator-drift.d.ts +9 -5
- package/dist/hooks/curator-types.d.ts +1 -0
- package/dist/hooks/delegation-gate.d.ts +1 -0
- package/dist/hooks/knowledge-curator.d.ts +5 -3
- package/dist/hooks/micro-reflector.d.ts +12 -7
- package/dist/hooks/pr-workflow-gate.d.ts +14 -8
- package/dist/hooks/pr-workflow-response-gate.d.ts +9 -12
- package/dist/index.js +627 -574
- package/dist/memory/schema.d.ts +4 -4
- package/dist/pr-review/authorization.d.ts +18 -12
- package/dist/prm/index.d.ts +3 -1
- package/dist/tools/authorize-pr-review-reentry.d.ts +12 -8
- package/package.json +3 -2
- package/dist/cli/authorization-vstrh7ra.js +0 -23
- package/dist/cli/curator-llm-factory-v8vwz20c.js +0 -69
- package/dist/cli/guardrail-explain-z2qb6v67.js +0 -70
- package/dist/cli/hive-promoter-c62x2ncb.js +0 -84
- package/dist/cli/index-c8s9a3zh.js +0 -73
- package/dist/cli/index-ed5ykebp.js +0 -151
- package/dist/cli/index-mmngnxev.js +0 -883
- package/dist/cli/index-w7ekntej.js +0 -643
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ OpenCode Swarm is a plugin for [OpenCode](https://opencode.ai) that turns a sing
|
|
|
22
22
|
bunx opencode-swarm install
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
> This single command installs the package, registers it as an OpenCode plugin, disables conflicting default agents, and creates a ready-to-edit config at `~/.config/opencode/opencode-swarm.json`. Requires [Bun](https://bun.sh) (`bun --version` to check). If you must use npm: `npm install -g opencode-swarm && opencode-swarm install`.
|
|
25
|
+
> This single command installs the package, registers it as an OpenCode plugin, disables conflicting default agents, and creates a ready-to-edit config at `~/.config/opencode/opencode-swarm.json`. Requires [Bun](https://bun.sh) >= 1.3.13 (`bun --version` to check), or Node.js >= 22.13 for npm installs (the Node-hosted sidecar uses the built-in `node:sqlite`). If you must use npm: `npm install -g opencode-swarm && opencode-swarm install`.
|
|
26
26
|
|
|
27
27
|
> **First-run note:** the installer registers the plugin, writes the global plugin config, creates a project override when missing, and disables the native `explore` and `general` agents in `opencode.json`. If you are not using a Swarm architect, the Swarm gates, reviewers, and test agents are bypassed. Open the OpenCode agent or mode picker and choose the Swarm architect when needed.
|
|
28
28
|
|
|
@@ -13,27 +13,26 @@ import {
|
|
|
13
13
|
releaseCoderDispatchOwnership,
|
|
14
14
|
settleCoderDispatch,
|
|
15
15
|
transferCoderSettlementToBackground
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-hzaw10zh.js";
|
|
17
17
|
import"./index-3f7hqtgg.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-qbr05tbw.js";
|
|
19
|
+
import"./index-n1wcq816.js";
|
|
20
|
+
import"./index-5bza8nxz.js";
|
|
21
21
|
import"./index-ddszzne4.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-dhzsvmx6.js";
|
|
23
23
|
import"./index-556ja8an.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-v56mhyhs.js";
|
|
25
25
|
import"./index-z6xqpmqg.js";
|
|
26
26
|
import"./index-r3mvsbtq.js";
|
|
27
27
|
import"./index-9e6fdz2h.js";
|
|
28
28
|
import"./index-4rhhvd1a.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-j0ajeary.js";
|
|
30
|
+
import"./index-2yd732fd.js";
|
|
31
31
|
import"./index-zjygnfay.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-ed5ykebp.js";
|
|
32
|
+
import"./index-6t35714n.js";
|
|
33
|
+
import"./index-36nt17m8.js";
|
|
34
|
+
import"./index-f9nfknjg.js";
|
|
35
|
+
import"./index-1b1h770t.js";
|
|
37
36
|
import"./index-7g4c7s5r.js";
|
|
38
37
|
import"./index-bpmtbmy9.js";
|
|
39
38
|
import"./index-zgwm4ryv.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-r5jn0ah5.js";
|
|
16
16
|
import"./index-z6xqpmqg.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-2s40e3b0.js";
|
|
18
|
+
import"./index-2yd732fd.js";
|
|
19
19
|
import"./index-zjygnfay.js";
|
|
20
20
|
import"./index-bk5tah7q.js";
|
|
21
21
|
import"./index-bpmtbmy9.js";
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
resolveWorktreeBaseDir,
|
|
15
15
|
shortenWorktreePath,
|
|
16
16
|
writeLaneProfileToDiskReal
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-5bza8nxz.js";
|
|
18
18
|
import"./index-z6xqpmqg.js";
|
|
19
19
|
import"./index-r3mvsbtq.js";
|
|
20
20
|
import"./index-9e6fdz2h.js";
|
|
21
21
|
import"./index-4rhhvd1a.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-2yd732fd.js";
|
|
23
23
|
import"./index-zjygnfay.js";
|
|
24
24
|
import"./index-zgwm4ryv.js";
|
|
25
25
|
import"./index-a76rekgs.js";
|
|
@@ -4,14 +4,13 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-k8j7m0e2.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-ed5ykebp.js";
|
|
9
|
+
import"./index-6kd3jnaf.js";
|
|
10
|
+
import"./index-6t35714n.js";
|
|
11
|
+
import"./index-36nt17m8.js";
|
|
12
|
+
import"./index-f9nfknjg.js";
|
|
13
|
+
import"./index-1b1h770t.js";
|
|
15
14
|
import"./index-7g4c7s5r.js";
|
|
16
15
|
import"./index-bpmtbmy9.js";
|
|
17
16
|
import"./index-zgwm4ryv.js";
|
|
@@ -14,65 +14,62 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
17
|
+
} from "./index-2ee2g27m.js";
|
|
18
|
+
import"./index-6097tx05.js";
|
|
19
|
+
import"./index-wv4b01ex.js";
|
|
20
|
+
import"./index-r5jn0ah5.js";
|
|
21
|
+
import"./index-5084szce.js";
|
|
22
|
+
import"./index-vkckf2ch.js";
|
|
23
23
|
import"./index-txdagbh7.js";
|
|
24
|
-
import"./index-n249fbw7.js";
|
|
25
24
|
import"./index-3146wmgv.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
25
|
+
import"./index-e630pvvw.js";
|
|
26
|
+
import"./index-6ay5zp1v.js";
|
|
27
|
+
import"./index-h2f21caa.js";
|
|
29
28
|
import"./index-70ha9e09.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
29
|
+
import"./index-y2f5s2cf.js";
|
|
30
|
+
import"./index-hcn69kp0.js";
|
|
31
|
+
import"./index-zaab1wz9.js";
|
|
32
|
+
import"./index-x2qmpkth.js";
|
|
33
33
|
import"./index-zsrtt42s.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-hzaw10zh.js";
|
|
35
35
|
import"./index-3f7hqtgg.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
import"./index-qbr05tbw.js";
|
|
37
|
+
import"./index-wnf1ej2q.js";
|
|
38
|
+
import"./index-k8j7m0e2.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
import"./index-n1wcq816.js";
|
|
41
|
+
import"./index-5bza8nxz.js";
|
|
42
|
+
import"./index-yc415pzf.js";
|
|
43
43
|
import"./index-ddszzne4.js";
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-kvra3nv1.js";
|
|
48
|
-
import"./index-8ada7ag7.js";
|
|
44
|
+
import"./index-b98r3pyv.js";
|
|
45
|
+
import"./index-vdgw2k4c.js";
|
|
46
|
+
import"./index-dhzsvmx6.js";
|
|
49
47
|
import"./index-556ja8an.js";
|
|
50
48
|
import"./index-4fwbbad3.js";
|
|
51
49
|
import"./index-b43rt5ph.js";
|
|
52
50
|
import"./index-q7sjgr1y.js";
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
51
|
+
import"./index-jczbtx2x.js";
|
|
52
|
+
import"./index-1af3rb5n.js";
|
|
53
|
+
import"./index-pmmfhzsp.js";
|
|
56
54
|
import"./index-zg9d392c.js";
|
|
57
55
|
import"./index-n832052r.js";
|
|
58
|
-
import"./index-
|
|
56
|
+
import"./index-v56mhyhs.js";
|
|
59
57
|
import"./index-z6xqpmqg.js";
|
|
60
58
|
import"./index-r3mvsbtq.js";
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
59
|
+
import"./index-862c0xhc.js";
|
|
60
|
+
import"./index-2s40e3b0.js";
|
|
63
61
|
import"./index-9e6fdz2h.js";
|
|
64
62
|
import"./index-4rhhvd1a.js";
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
63
|
+
import"./index-j0ajeary.js";
|
|
64
|
+
import"./index-2yd732fd.js";
|
|
67
65
|
import"./index-zjygnfay.js";
|
|
68
66
|
import"./index-ae75rja9.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
67
|
+
import"./index-6kd3jnaf.js";
|
|
68
|
+
import"./index-6t35714n.js";
|
|
71
69
|
import"./index-bk5tah7q.js";
|
|
72
|
-
import"./index-
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-ed5ykebp.js";
|
|
70
|
+
import"./index-36nt17m8.js";
|
|
71
|
+
import"./index-f9nfknjg.js";
|
|
72
|
+
import"./index-1b1h770t.js";
|
|
76
73
|
import"./index-7g4c7s5r.js";
|
|
77
74
|
import"./index-bpmtbmy9.js";
|
|
78
75
|
import"./index-zgwm4ryv.js";
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
getGlobalEventBus
|
|
4
|
-
|
|
3
|
+
getGlobalEventBus,
|
|
4
|
+
getGroupCommitWriter,
|
|
5
|
+
importLegacyJsonFiles
|
|
6
|
+
} from "./index-y2f5s2cf.js";
|
|
5
7
|
import {
|
|
8
|
+
DURABILITY_CLASSES,
|
|
9
|
+
canonicalProjectKey,
|
|
10
|
+
getProjectDb,
|
|
11
|
+
projectDbExists,
|
|
6
12
|
readEffectiveSpecSync
|
|
7
|
-
} from "./index-
|
|
13
|
+
} from "./index-hcn69kp0.js";
|
|
14
|
+
import"./index-zaab1wz9.js";
|
|
8
15
|
import"./index-n832052r.js";
|
|
9
16
|
import {
|
|
10
|
-
readSwarmFileAsync
|
|
11
|
-
|
|
12
|
-
} from "./index-dtn0pne5.js";
|
|
17
|
+
readSwarmFileAsync
|
|
18
|
+
} from "./index-v56mhyhs.js";
|
|
13
19
|
import"./index-z6xqpmqg.js";
|
|
14
20
|
import"./index-r3mvsbtq.js";
|
|
15
21
|
import"./index-4rhhvd1a.js";
|
|
16
22
|
import"./index-zjygnfay.js";
|
|
17
|
-
import
|
|
18
|
-
invalidateCachedArtifact
|
|
19
|
-
} from "./index-ed5ykebp.js";
|
|
23
|
+
import"./index-f9nfknjg.js";
|
|
20
24
|
import"./index-bpmtbmy9.js";
|
|
21
25
|
import {
|
|
22
26
|
init_logger,
|
|
@@ -24,48 +28,111 @@ import {
|
|
|
24
28
|
} from "./index-zgwm4ryv.js";
|
|
25
29
|
import"./index-a76rekgs.js";
|
|
26
30
|
|
|
31
|
+
// src/db/phase-report-store.ts
|
|
32
|
+
import { readdirSync } from "fs";
|
|
33
|
+
import { join } from "path";
|
|
34
|
+
var PHASE_REPORT_LEGACY_PREFIXES = {
|
|
35
|
+
curator_drift: "drift-report-phase-",
|
|
36
|
+
design_doc_drift: "doc-drift-phase-"
|
|
37
|
+
};
|
|
38
|
+
var importedRoots = new Set;
|
|
39
|
+
function hasAnyPhaseReportState(directory) {
|
|
40
|
+
if (projectDbExists(directory))
|
|
41
|
+
return true;
|
|
42
|
+
const root = canonicalProjectKey(directory);
|
|
43
|
+
let entries;
|
|
44
|
+
try {
|
|
45
|
+
entries = readdirSync(join(root, ".swarm"));
|
|
46
|
+
} catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
for (const prefix of Object.values(PHASE_REPORT_LEGACY_PREFIXES)) {
|
|
50
|
+
if (entries.some((name) => name.startsWith(prefix) && name.endsWith(".json") && !name.includes(".imported"))) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
function kindCount(db, kind) {
|
|
57
|
+
return db.query("SELECT COUNT(*) as count FROM phase_report WHERE kind = ?").get(kind)?.count ?? 0;
|
|
58
|
+
}
|
|
59
|
+
function ensurePhaseReportsImported(directory) {
|
|
60
|
+
const root = canonicalProjectKey(directory);
|
|
61
|
+
if (importedRoots.has(root))
|
|
62
|
+
return;
|
|
63
|
+
for (const kind of Object.keys(PHASE_REPORT_LEGACY_PREFIXES)) {
|
|
64
|
+
importLegacyJsonFiles(directory, {
|
|
65
|
+
filePrefix: PHASE_REPORT_LEGACY_PREFIXES[kind],
|
|
66
|
+
kind,
|
|
67
|
+
kindCount: (db) => kindCount(db, kind),
|
|
68
|
+
upsertRow: (db, phase, payload) => {
|
|
69
|
+
db.run(`INSERT INTO phase_report (kind, phase, payload, updated_at)
|
|
70
|
+
VALUES (?, ?, ?, datetime('now'))
|
|
71
|
+
ON CONFLICT(kind, phase) DO UPDATE SET
|
|
72
|
+
payload = excluded.payload,
|
|
73
|
+
updated_at = datetime('now')`, [kind, phase, payload]);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
importedRoots.add(root);
|
|
78
|
+
}
|
|
79
|
+
async function upsertPhaseReportDb(directory, kind, phase, payload) {
|
|
80
|
+
ensurePhaseReportsImported(directory);
|
|
81
|
+
const writer = getGroupCommitWriter(directory);
|
|
82
|
+
writer.enqueue({
|
|
83
|
+
durability: DURABILITY_CLASSES.phase_report,
|
|
84
|
+
run: (db) => {
|
|
85
|
+
db.run(`INSERT INTO phase_report (kind, phase, payload, updated_at)
|
|
86
|
+
VALUES (?, ?, ?, datetime('now'))
|
|
87
|
+
ON CONFLICT(kind, phase) DO UPDATE SET
|
|
88
|
+
payload = excluded.payload,
|
|
89
|
+
updated_at = datetime('now')`, [kind, phase, payload]);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
await writer.flush();
|
|
93
|
+
}
|
|
94
|
+
function readPhaseReportsDb(directory, kind) {
|
|
95
|
+
if (!hasAnyPhaseReportState(directory))
|
|
96
|
+
return [];
|
|
97
|
+
ensurePhaseReportsImported(directory);
|
|
98
|
+
const db = getProjectDb(directory);
|
|
99
|
+
return db.query("SELECT phase, payload FROM phase_report WHERE kind = ? ORDER BY phase").all(kind).map((row) => ({ phase: row.phase, payload: row.payload }));
|
|
100
|
+
}
|
|
101
|
+
function phaseReportLocator(kind, phase) {
|
|
102
|
+
return `swarm.db:phase_report(${kind},${phase})`;
|
|
103
|
+
}
|
|
104
|
+
|
|
27
105
|
// src/hooks/curator-drift.ts
|
|
28
|
-
import * as fs from "fs";
|
|
29
|
-
import * as path from "path";
|
|
30
106
|
init_logger();
|
|
31
|
-
var DRIFT_REPORT_PREFIX = "drift-report-phase-";
|
|
32
107
|
async function readPriorDriftReports(directory) {
|
|
33
|
-
const swarmDir = path.join(directory, ".swarm");
|
|
34
|
-
const entries = await fs.promises.readdir(swarmDir).catch(() => null);
|
|
35
|
-
if (entries === null)
|
|
36
|
-
return [];
|
|
37
|
-
const reportFiles = entries.filter((name) => name.startsWith(DRIFT_REPORT_PREFIX) && name.endsWith(".json")).sort();
|
|
38
108
|
const reports = [];
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
109
|
+
try {
|
|
110
|
+
for (const row of readPhaseReportsDb(directory, "curator_drift")) {
|
|
111
|
+
try {
|
|
112
|
+
const report = JSON.parse(row.payload);
|
|
113
|
+
if (typeof report.phase !== "number" || typeof report.alignment !== "string" || typeof report.timestamp !== "string" || typeof report.drift_score !== "number" || typeof report.schema_version !== "number" || !Array.isArray(report.compounding_effects)) {
|
|
114
|
+
warn(`[curator-drift] Skipping corrupt drift report: phase ${row.phase}`);
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
reports.push(report);
|
|
118
|
+
} catch {
|
|
119
|
+
warn(`[curator-drift] Skipping unreadable drift report: phase ${row.phase}`);
|
|
48
120
|
}
|
|
49
|
-
reports.push(report);
|
|
50
|
-
} catch {
|
|
51
|
-
warn(`[curator-drift] Skipping unreadable drift report: ${filename}`);
|
|
52
121
|
}
|
|
122
|
+
} catch {
|
|
123
|
+
return [];
|
|
53
124
|
}
|
|
54
125
|
reports.sort((a, b) => a.phase - b.phase);
|
|
55
126
|
return reports;
|
|
56
127
|
}
|
|
57
128
|
async function writeDriftReport(directory, report) {
|
|
58
|
-
const
|
|
59
|
-
const filePath = validateSwarmPath(directory, filename);
|
|
60
|
-
const swarmDir = path.dirname(filePath);
|
|
61
|
-
await fs.promises.mkdir(swarmDir, { recursive: true });
|
|
129
|
+
const locator = phaseReportLocator("curator_drift", report.phase);
|
|
62
130
|
try {
|
|
63
|
-
await
|
|
64
|
-
invalidateCachedArtifact(filePath);
|
|
131
|
+
await upsertPhaseReportDb(directory, "curator_drift", report.phase, JSON.stringify(report, null, 2));
|
|
65
132
|
} catch (err) {
|
|
66
|
-
throw new Error(`[curator-drift] Failed to write drift report to ${
|
|
133
|
+
throw new Error(`[curator-drift] Failed to write drift report to ${locator}: ${String(err)}`);
|
|
67
134
|
}
|
|
68
|
-
return
|
|
135
|
+
return locator;
|
|
69
136
|
}
|
|
70
137
|
var _internals = {
|
|
71
138
|
readPriorDriftReports,
|
|
@@ -153,7 +220,7 @@ async function runDeterministicDriftCheck(directory, phase, curatorResult, confi
|
|
|
153
220
|
});
|
|
154
221
|
if (injectAdvisory && alignment !== "ALIGNED" && driftScore > 0) {
|
|
155
222
|
try {
|
|
156
|
-
const advisoryText = `CURATOR DRIFT DETECTED (phase ${phase}, score ${driftScore.toFixed(2)}): ${injectionSummary.slice(0, 300)}. Review .swarm
|
|
223
|
+
const advisoryText = `CURATOR DRIFT DETECTED (phase ${phase}, score ${driftScore.toFixed(2)}): ${injectionSummary.slice(0, 300)}. Review the phase-${phase} drift report stored in .swarm/swarm.db (${phaseReportLocator("curator_drift", phase)}) and address spec alignment before proceeding. Consider running critic_drift_verifier before phase completion to get a proper drift review.`;
|
|
157
224
|
injectAdvisory(advisoryText);
|
|
158
225
|
} catch {}
|
|
159
226
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createCuratorLLMDelegate
|
|
4
|
+
} from "./index-2ee2g27m.js";
|
|
5
|
+
import"./index-6097tx05.js";
|
|
6
|
+
import"./index-wv4b01ex.js";
|
|
7
|
+
import"./index-r5jn0ah5.js";
|
|
8
|
+
import"./index-5084szce.js";
|
|
9
|
+
import"./index-vkckf2ch.js";
|
|
10
|
+
import"./index-txdagbh7.js";
|
|
11
|
+
import"./index-3146wmgv.js";
|
|
12
|
+
import"./index-e630pvvw.js";
|
|
13
|
+
import"./index-6ay5zp1v.js";
|
|
14
|
+
import"./index-h2f21caa.js";
|
|
15
|
+
import"./index-70ha9e09.js";
|
|
16
|
+
import"./index-y2f5s2cf.js";
|
|
17
|
+
import"./index-hcn69kp0.js";
|
|
18
|
+
import"./index-zaab1wz9.js";
|
|
19
|
+
import"./index-x2qmpkth.js";
|
|
20
|
+
import"./index-zsrtt42s.js";
|
|
21
|
+
import"./index-hzaw10zh.js";
|
|
22
|
+
import"./index-3f7hqtgg.js";
|
|
23
|
+
import"./index-qbr05tbw.js";
|
|
24
|
+
import"./index-wnf1ej2q.js";
|
|
25
|
+
import"./index-k8j7m0e2.js";
|
|
26
|
+
import"./index-rtry5xyf.js";
|
|
27
|
+
import"./index-n1wcq816.js";
|
|
28
|
+
import"./index-5bza8nxz.js";
|
|
29
|
+
import"./index-yc415pzf.js";
|
|
30
|
+
import"./index-ddszzne4.js";
|
|
31
|
+
import"./index-b98r3pyv.js";
|
|
32
|
+
import"./index-vdgw2k4c.js";
|
|
33
|
+
import"./index-dhzsvmx6.js";
|
|
34
|
+
import"./index-556ja8an.js";
|
|
35
|
+
import"./index-4fwbbad3.js";
|
|
36
|
+
import"./index-b43rt5ph.js";
|
|
37
|
+
import"./index-q7sjgr1y.js";
|
|
38
|
+
import"./index-jczbtx2x.js";
|
|
39
|
+
import"./index-1af3rb5n.js";
|
|
40
|
+
import"./index-pmmfhzsp.js";
|
|
41
|
+
import"./index-zg9d392c.js";
|
|
42
|
+
import"./index-n832052r.js";
|
|
43
|
+
import"./index-v56mhyhs.js";
|
|
44
|
+
import"./index-z6xqpmqg.js";
|
|
45
|
+
import"./index-r3mvsbtq.js";
|
|
46
|
+
import"./index-862c0xhc.js";
|
|
47
|
+
import"./index-2s40e3b0.js";
|
|
48
|
+
import"./index-9e6fdz2h.js";
|
|
49
|
+
import"./index-4rhhvd1a.js";
|
|
50
|
+
import"./index-j0ajeary.js";
|
|
51
|
+
import"./index-2yd732fd.js";
|
|
52
|
+
import"./index-zjygnfay.js";
|
|
53
|
+
import"./index-ae75rja9.js";
|
|
54
|
+
import"./index-6kd3jnaf.js";
|
|
55
|
+
import"./index-6t35714n.js";
|
|
56
|
+
import"./index-bk5tah7q.js";
|
|
57
|
+
import"./index-36nt17m8.js";
|
|
58
|
+
import"./index-f9nfknjg.js";
|
|
59
|
+
import"./index-1b1h770t.js";
|
|
60
|
+
import"./index-7g4c7s5r.js";
|
|
61
|
+
import"./index-bpmtbmy9.js";
|
|
62
|
+
import"./index-zgwm4ryv.js";
|
|
63
|
+
import"./index-a76rekgs.js";
|
|
64
|
+
export {
|
|
65
|
+
createCuratorLLMDelegate
|
|
66
|
+
};
|
package/dist/cli/{evidence-summary-service-51dxfcn5.js → evidence-summary-service-519ny6b1.js}
RENAMED
|
@@ -6,36 +6,35 @@ import {
|
|
|
6
6
|
loadPlanJsonOnly,
|
|
7
7
|
mergeDurableGateEntriesFromEvidence,
|
|
8
8
|
readDurableGateEvidence
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-5084szce.js";
|
|
10
|
+
import"./index-vkckf2ch.js";
|
|
11
11
|
import"./index-txdagbh7.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-hcn69kp0.js";
|
|
13
|
+
import"./index-zaab1wz9.js";
|
|
14
14
|
import"./index-zsrtt42s.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
15
|
+
import"./index-n1wcq816.js";
|
|
16
|
+
import"./index-5bza8nxz.js";
|
|
17
|
+
import"./index-vdgw2k4c.js";
|
|
18
|
+
import"./index-dhzsvmx6.js";
|
|
19
19
|
import"./index-556ja8an.js";
|
|
20
20
|
import"./index-4fwbbad3.js";
|
|
21
21
|
import"./index-zg9d392c.js";
|
|
22
22
|
import"./index-n832052r.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-v56mhyhs.js";
|
|
24
24
|
import"./index-z6xqpmqg.js";
|
|
25
25
|
import"./index-r3mvsbtq.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-862c0xhc.js";
|
|
27
|
+
import"./index-2s40e3b0.js";
|
|
28
28
|
import"./index-9e6fdz2h.js";
|
|
29
29
|
import"./index-4rhhvd1a.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-j0ajeary.js";
|
|
31
|
+
import"./index-2yd732fd.js";
|
|
32
32
|
import"./index-zjygnfay.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-6t35714n.js";
|
|
34
34
|
import"./index-bk5tah7q.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-ed5ykebp.js";
|
|
35
|
+
import"./index-36nt17m8.js";
|
|
36
|
+
import"./index-f9nfknjg.js";
|
|
37
|
+
import"./index-1b1h770t.js";
|
|
39
38
|
import"./index-7g4c7s5r.js";
|
|
40
39
|
import"./index-bpmtbmy9.js";
|
|
41
40
|
import {
|
|
@@ -17,21 +17,20 @@ import {
|
|
|
17
17
|
reduceTaskWorkflowSnapshot,
|
|
18
18
|
transitionTaskWorkflowEvidence,
|
|
19
19
|
withTaskEvidenceTransaction
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
} from "./index-n1wcq816.js";
|
|
21
|
+
import"./index-5bza8nxz.js";
|
|
22
22
|
import"./index-556ja8an.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-v56mhyhs.js";
|
|
24
24
|
import"./index-z6xqpmqg.js";
|
|
25
25
|
import"./index-r3mvsbtq.js";
|
|
26
26
|
import"./index-9e6fdz2h.js";
|
|
27
27
|
import"./index-4rhhvd1a.js";
|
|
28
|
-
import"./index-
|
|
28
|
+
import"./index-2yd732fd.js";
|
|
29
29
|
import"./index-zjygnfay.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-ed5ykebp.js";
|
|
30
|
+
import"./index-6t35714n.js";
|
|
31
|
+
import"./index-36nt17m8.js";
|
|
32
|
+
import"./index-f9nfknjg.js";
|
|
33
|
+
import"./index-1b1h770t.js";
|
|
35
34
|
import"./index-7g4c7s5r.js";
|
|
36
35
|
import"./index-bpmtbmy9.js";
|
|
37
36
|
import"./index-zgwm4ryv.js";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
handleGuardrailExplain
|
|
4
|
+
} from "./index-fwfhbs27.js";
|
|
5
|
+
import"./index-2ee2g27m.js";
|
|
6
|
+
import"./index-6097tx05.js";
|
|
7
|
+
import"./index-wv4b01ex.js";
|
|
8
|
+
import"./index-r5jn0ah5.js";
|
|
9
|
+
import"./index-5084szce.js";
|
|
10
|
+
import"./index-vkckf2ch.js";
|
|
11
|
+
import"./index-txdagbh7.js";
|
|
12
|
+
import"./index-3146wmgv.js";
|
|
13
|
+
import"./index-e630pvvw.js";
|
|
14
|
+
import"./index-6ay5zp1v.js";
|
|
15
|
+
import"./index-h2f21caa.js";
|
|
16
|
+
import"./index-70ha9e09.js";
|
|
17
|
+
import"./index-y2f5s2cf.js";
|
|
18
|
+
import"./index-hcn69kp0.js";
|
|
19
|
+
import"./index-zaab1wz9.js";
|
|
20
|
+
import"./index-x2qmpkth.js";
|
|
21
|
+
import"./index-zsrtt42s.js";
|
|
22
|
+
import"./index-hzaw10zh.js";
|
|
23
|
+
import"./index-3f7hqtgg.js";
|
|
24
|
+
import"./index-qbr05tbw.js";
|
|
25
|
+
import"./index-wnf1ej2q.js";
|
|
26
|
+
import"./index-k8j7m0e2.js";
|
|
27
|
+
import"./index-rtry5xyf.js";
|
|
28
|
+
import"./index-n1wcq816.js";
|
|
29
|
+
import"./index-5bza8nxz.js";
|
|
30
|
+
import"./index-yc415pzf.js";
|
|
31
|
+
import"./index-ddszzne4.js";
|
|
32
|
+
import"./index-b98r3pyv.js";
|
|
33
|
+
import"./index-vdgw2k4c.js";
|
|
34
|
+
import"./index-dhzsvmx6.js";
|
|
35
|
+
import"./index-556ja8an.js";
|
|
36
|
+
import"./index-4fwbbad3.js";
|
|
37
|
+
import"./index-b43rt5ph.js";
|
|
38
|
+
import"./index-q7sjgr1y.js";
|
|
39
|
+
import"./index-jczbtx2x.js";
|
|
40
|
+
import"./index-1af3rb5n.js";
|
|
41
|
+
import"./index-pmmfhzsp.js";
|
|
42
|
+
import"./index-zg9d392c.js";
|
|
43
|
+
import"./index-n832052r.js";
|
|
44
|
+
import"./index-v56mhyhs.js";
|
|
45
|
+
import"./index-z6xqpmqg.js";
|
|
46
|
+
import"./index-r3mvsbtq.js";
|
|
47
|
+
import"./index-862c0xhc.js";
|
|
48
|
+
import"./index-2s40e3b0.js";
|
|
49
|
+
import"./index-9e6fdz2h.js";
|
|
50
|
+
import"./index-4rhhvd1a.js";
|
|
51
|
+
import"./index-j0ajeary.js";
|
|
52
|
+
import"./index-2yd732fd.js";
|
|
53
|
+
import"./index-zjygnfay.js";
|
|
54
|
+
import"./index-ae75rja9.js";
|
|
55
|
+
import"./index-6kd3jnaf.js";
|
|
56
|
+
import"./index-6t35714n.js";
|
|
57
|
+
import"./index-bk5tah7q.js";
|
|
58
|
+
import"./index-36nt17m8.js";
|
|
59
|
+
import"./index-f9nfknjg.js";
|
|
60
|
+
import"./index-1b1h770t.js";
|
|
61
|
+
import"./index-7g4c7s5r.js";
|
|
62
|
+
import"./index-bpmtbmy9.js";
|
|
63
|
+
import"./index-zgwm4ryv.js";
|
|
64
|
+
import"./index-a76rekgs.js";
|
|
65
|
+
export {
|
|
66
|
+
handleGuardrailExplain
|
|
67
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailLog
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-644t46hr.js";
|
|
5
|
+
import"./index-wv4b01ex.js";
|
|
6
|
+
import"./index-dhzsvmx6.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-2s40e3b0.js";
|
|
11
|
+
import"./index-j0ajeary.js";
|
|
12
|
+
import"./index-2yd732fd.js";
|
|
13
13
|
import"./index-zjygnfay.js";
|
|
14
14
|
import"./index-bk5tah7q.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-ed5ykebp.js";
|
|
15
|
+
import"./index-f9nfknjg.js";
|
|
16
|
+
import"./index-1b1h770t.js";
|
|
18
17
|
import"./index-bpmtbmy9.js";
|
|
19
18
|
import"./index-zgwm4ryv.js";
|
|
20
19
|
import"./index-a76rekgs.js";
|