opencode-swarm 7.163.1 → 7.164.0
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-84je6bza.js} +8 -8
- package/dist/cli/{config-doctor-0fnqzqz1.js → config-doctor-vfze38e1.js} +2 -2
- package/dist/cli/{core-w81fk5sc.js → core-q5hv8e2w.js} +1 -1
- package/dist/cli/{curation-policy-j12j2gvc.js → curation-policy-a2zty4br.js} +5 -5
- package/dist/cli/{curator-as495r18.js → curator-4pckmmyf.js} +32 -32
- package/dist/cli/{curator-drift-g6w4ga1q.js → curator-drift-wy7ejcvw.js} +105 -37
- package/dist/cli/{curator-llm-factory-v8vwz20c.js → curator-llm-factory-msbj3hpn.js} +32 -32
- package/dist/cli/{evidence-summary-service-51dxfcn5.js → evidence-summary-service-b15yes21.js} +14 -14
- package/dist/cli/{gate-evidence-nb1e8hz0.js → gate-evidence-70h0w4tb.js} +5 -5
- package/dist/cli/{guardrail-explain-z2qb6v67.js → guardrail-explain-kksdy032.js} +33 -33
- package/dist/cli/{guardrail-log-2kwntcqw.js → guardrail-log-7rxbd20p.js} +6 -6
- package/dist/cli/{guardrail-reset-mrxrc56j.js → guardrail-reset-3b4gs357.js} +32 -32
- package/dist/cli/{hive-promoter-c62x2ncb.js → hive-promoter-s80g1gwb.js} +32 -32
- package/dist/cli/index-0515j0cz.js +403 -0
- package/dist/cli/{index-ma52g2pq.js → index-12f1tsn2.js} +3 -3
- package/dist/cli/{index-2zgjcmmc.js → index-1b1h770t.js} +3 -3
- package/dist/cli/{index-9ss2m4rs.js → index-1hpjwz3s.js} +410 -1
- package/dist/cli/{index-kvra3nv1.js → index-1z4jzwja.js} +3 -3
- package/dist/cli/{index-0103w5pf.js → index-2s4s9n82.js} +2 -2
- package/dist/cli/{index-9crtmnqg.js → index-36nt17m8.js} +1 -1
- package/dist/cli/{index-g3znh2yd.js → index-4afh2cz7.js} +5 -5
- package/dist/cli/{index-2n1ym7jb.js → index-4jersar8.js} +4 -4
- package/dist/cli/{index-n67vx5zw.js → index-70bfj3v1.js} +1 -1
- package/dist/cli/{index-zjme8atd.js → index-7r9vpkwa.js} +4 -4
- package/dist/cli/{index-8ada7ag7.js → index-93sepnc9.js} +2 -2
- package/dist/cli/{index-qynqyfgj.js → index-9sy65e94.js} +3 -3
- package/dist/cli/{index-f923njwh.js → index-bm73pych.js} +6 -6
- package/dist/cli/{index-xyhmt813.js → index-c4pynht5.js} +1 -1
- package/dist/cli/{index-m1fvbah1.js → index-c69jbpex.js} +2 -2
- package/dist/cli/{index-t34daffb.js → index-e3hwzcjv.js} +2 -2
- package/dist/cli/{index-r56f3f81.js → index-g64154pd.js} +1 -1
- package/dist/cli/{index-08y8pccg.js → index-gxd8fwyt.js} +4 -4
- package/dist/cli/{index-d3azve4r.js → index-hyq20s2v.js} +118 -296
- package/dist/cli/{index-7n9jznv0.js → index-ma8w6pfp.js} +3 -3
- package/dist/cli/{index-tnpf9wwv.js → index-nhxaa9j5.js} +1 -1
- package/dist/cli/{index-d9gdwh34.js → index-nzrhw31r.js} +1 -1
- package/dist/cli/{index-n985274d.js → index-pvgcex0d.js} +3 -3
- package/dist/cli/{index-etvq73mp.js → index-qkk2skff.js} +34 -34
- package/dist/cli/{index-2v06a1yh.js → index-t5t82jy8.js} +5 -5
- package/dist/cli/{index-5056zmpt.js → index-t90gjc0k.js} +1 -1
- package/dist/cli/{index-66073kej.js → index-t9rhtvy9.js} +2 -2
- package/dist/cli/{index-hm239n1p.js → index-tb1k8jya.js} +1 -1
- package/dist/cli/{index-x2f1f011.js → index-td6n935w.js} +3 -2
- package/dist/cli/{index-swgy9xvk.js → index-v3a9rmyh.js} +3 -3
- package/dist/cli/{index-cqgpvx2d.js → index-wdtckfnf.js} +1 -1
- package/dist/cli/{index-0tervb1m.js → index-xk0kc1py.js} +522 -358
- package/dist/cli/{index-n2mhyect.js → index-ynqp3jb6.js} +1 -1
- package/dist/cli/{index-n249fbw7.js → index-zaab1wz9.js} +5 -0
- package/dist/cli/{index-4p0wyz5p.js → index-zbpcpsk0.js} +8 -8
- package/dist/cli/index.js +32 -32
- package/dist/cli/{knowledge-escalator-fq7dm2g4.js → knowledge-escalator-sttdnwf8.js} +11 -11
- package/dist/cli/{knowledge-events-3zanyfkr.js → knowledge-events-4h88stj7.js} +9 -9
- package/dist/cli/{knowledge-link-vmdj5e5d.js → knowledge-link-yykmxdyw.js} +4 -4
- package/dist/cli/{knowledge-store-vhehnw52.js → knowledge-store-j832fxpx.js} +5 -5
- package/dist/cli/{knowledge-validator-0tt0pe6b.js → knowledge-validator-edbg761g.js} +7 -7
- package/dist/cli/{pending-delegations-b92pecbj.js → pending-delegations-sphntrs0.js} +4 -4
- package/dist/cli/{pr-subscriptions-2mkdt0ak.js → pr-subscriptions-1a4gcnzv.js} +4 -4
- package/dist/cli/{runner-3gw2njnx.js → runner-d294h1by.js} +5 -5
- package/dist/cli/{scan-cursor-1c8a3b0m.js → scan-cursor-5frvp7nb.js} +6 -6
- package/dist/cli/{schema-c554j5c8.js → schema-9xkt5hvd.js} +1 -1
- package/dist/cli/{scope-persistence-vtbcszvv.js → scope-persistence-gk55h3sp.js} +8 -8
- package/dist/cli/{skill-generator-0es21fck.js → skill-generator-sxxf7jbb.js} +13 -13
- 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-7kj2ryt1.js} +4 -4
- package/dist/cli/{worktree-isolation-hk42yxw7.js → worktree-isolation-67fs6rz9.js} +32 -32
- 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/knowledge-curator.d.ts +5 -3
- package/dist/hooks/micro-reflector.d.ts +12 -7
- package/dist/index.js +619 -567
- package/dist/memory/schema.d.ts +4 -4
- package/dist/prm/index.d.ts +3 -1
- package/package.json +3 -2
- package/dist/cli/index-c8s9a3zh.js +0 -73
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,26 +13,26 @@ import {
|
|
|
13
13
|
releaseCoderDispatchOwnership,
|
|
14
14
|
settleCoderDispatch,
|
|
15
15
|
transferCoderSettlementToBackground
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-4afh2cz7.js";
|
|
17
17
|
import"./index-3f7hqtgg.js";
|
|
18
18
|
import"./index-fckfgptr.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-7r9vpkwa.js";
|
|
20
|
+
import"./index-nzrhw31r.js";
|
|
21
21
|
import"./index-ddszzne4.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-93sepnc9.js";
|
|
23
23
|
import"./index-556ja8an.js";
|
|
24
24
|
import"./index-dtn0pne5.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-
|
|
29
|
+
import"./index-wdtckfnf.js";
|
|
30
30
|
import"./index-9xd073d4.js";
|
|
31
31
|
import"./index-zjygnfay.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-70bfj3v1.js";
|
|
33
|
+
import"./index-36nt17m8.js";
|
|
34
34
|
import"./index-3b762978.js";
|
|
35
|
-
import"./index-
|
|
35
|
+
import"./index-1b1h770t.js";
|
|
36
36
|
import"./index-ed5ykebp.js";
|
|
37
37
|
import"./index-7g4c7s5r.js";
|
|
38
38
|
import"./index-bpmtbmy9.js";
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-g64154pd.js";
|
|
16
16
|
import"./index-z6xqpmqg.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-td6n935w.js";
|
|
18
18
|
import"./index-9xd073d4.js";
|
|
19
19
|
import"./index-zjygnfay.js";
|
|
20
20
|
import"./index-bk5tah7q.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-tb1k8jya.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
9
|
+
import"./index-ynqp3jb6.js";
|
|
10
|
+
import"./index-70bfj3v1.js";
|
|
11
|
+
import"./index-36nt17m8.js";
|
|
12
12
|
import"./index-3b762978.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-1b1h770t.js";
|
|
14
14
|
import"./index-ed5ykebp.js";
|
|
15
15
|
import"./index-7g4c7s5r.js";
|
|
16
16
|
import"./index-bpmtbmy9.js";
|
|
@@ -14,64 +14,64 @@ 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-xk0kc1py.js";
|
|
18
|
+
import"./index-c4pynht5.js";
|
|
19
|
+
import"./index-9sy65e94.js";
|
|
20
|
+
import"./index-g64154pd.js";
|
|
21
|
+
import"./index-hyq20s2v.js";
|
|
22
|
+
import"./index-2s4s9n82.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-pvgcex0d.js";
|
|
26
|
+
import"./index-t5t82jy8.js";
|
|
27
|
+
import"./index-e3hwzcjv.js";
|
|
29
28
|
import"./index-70ha9e09.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
29
|
+
import"./index-0515j0cz.js";
|
|
30
|
+
import"./index-1hpjwz3s.js";
|
|
31
|
+
import"./index-zaab1wz9.js";
|
|
32
|
+
import"./index-ma8w6pfp.js";
|
|
33
33
|
import"./index-zsrtt42s.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-4afh2cz7.js";
|
|
35
35
|
import"./index-3f7hqtgg.js";
|
|
36
36
|
import"./index-fckfgptr.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-gxd8fwyt.js";
|
|
38
|
+
import"./index-tb1k8jya.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
import"./index-7r9vpkwa.js";
|
|
41
|
+
import"./index-nzrhw31r.js";
|
|
42
|
+
import"./index-12f1tsn2.js";
|
|
43
43
|
import"./index-ddszzne4.js";
|
|
44
44
|
import"./index-mmngnxev.js";
|
|
45
45
|
import"./index-w7ekntej.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
46
|
+
import"./index-4jersar8.js";
|
|
47
|
+
import"./index-1z4jzwja.js";
|
|
48
|
+
import"./index-93sepnc9.js";
|
|
49
49
|
import"./index-556ja8an.js";
|
|
50
50
|
import"./index-4fwbbad3.js";
|
|
51
51
|
import"./index-b43rt5ph.js";
|
|
52
52
|
import"./index-q7sjgr1y.js";
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
53
|
+
import"./index-bm73pych.js";
|
|
54
|
+
import"./index-zbpcpsk0.js";
|
|
55
|
+
import"./index-t9rhtvy9.js";
|
|
56
56
|
import"./index-zg9d392c.js";
|
|
57
57
|
import"./index-n832052r.js";
|
|
58
58
|
import"./index-dtn0pne5.js";
|
|
59
59
|
import"./index-z6xqpmqg.js";
|
|
60
60
|
import"./index-r3mvsbtq.js";
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
61
|
+
import"./index-nhxaa9j5.js";
|
|
62
|
+
import"./index-td6n935w.js";
|
|
63
63
|
import"./index-9e6fdz2h.js";
|
|
64
64
|
import"./index-4rhhvd1a.js";
|
|
65
|
-
import"./index-
|
|
65
|
+
import"./index-wdtckfnf.js";
|
|
66
66
|
import"./index-9xd073d4.js";
|
|
67
67
|
import"./index-zjygnfay.js";
|
|
68
68
|
import"./index-ae75rja9.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
import"./index-ynqp3jb6.js";
|
|
70
|
+
import"./index-70bfj3v1.js";
|
|
71
71
|
import"./index-bk5tah7q.js";
|
|
72
|
-
import"./index-
|
|
72
|
+
import"./index-36nt17m8.js";
|
|
73
73
|
import"./index-3b762978.js";
|
|
74
|
-
import"./index-
|
|
74
|
+
import"./index-1b1h770t.js";
|
|
75
75
|
import"./index-ed5ykebp.js";
|
|
76
76
|
import"./index-7g4c7s5r.js";
|
|
77
77
|
import"./index-bpmtbmy9.js";
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
getGlobalEventBus
|
|
4
|
-
|
|
3
|
+
getGlobalEventBus,
|
|
4
|
+
getGroupCommitWriter,
|
|
5
|
+
importLegacyJsonFiles
|
|
6
|
+
} from "./index-0515j0cz.js";
|
|
5
7
|
import {
|
|
8
|
+
DURABILITY_CLASSES,
|
|
9
|
+
canonicalProjectKey,
|
|
10
|
+
getProjectDb,
|
|
11
|
+
projectDbExists,
|
|
6
12
|
readEffectiveSpecSync
|
|
7
|
-
} from "./index-
|
|
13
|
+
} from "./index-1hpjwz3s.js";
|
|
14
|
+
import"./index-zaab1wz9.js";
|
|
8
15
|
import"./index-n832052r.js";
|
|
9
16
|
import {
|
|
10
|
-
readSwarmFileAsync
|
|
11
|
-
validateSwarmPath
|
|
17
|
+
readSwarmFileAsync
|
|
12
18
|
} from "./index-dtn0pne5.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
|
-
|
|
19
|
-
} from "./index-ed5ykebp.js";
|
|
23
|
+
import"./index-3b762978.js";
|
|
24
|
+
import"./index-ed5ykebp.js";
|
|
20
25
|
import"./index-bpmtbmy9.js";
|
|
21
26
|
import {
|
|
22
27
|
init_logger,
|
|
@@ -24,48 +29,111 @@ import {
|
|
|
24
29
|
} from "./index-zgwm4ryv.js";
|
|
25
30
|
import"./index-a76rekgs.js";
|
|
26
31
|
|
|
32
|
+
// src/db/phase-report-store.ts
|
|
33
|
+
import { readdirSync } from "fs";
|
|
34
|
+
import { join } from "path";
|
|
35
|
+
var PHASE_REPORT_LEGACY_PREFIXES = {
|
|
36
|
+
curator_drift: "drift-report-phase-",
|
|
37
|
+
design_doc_drift: "doc-drift-phase-"
|
|
38
|
+
};
|
|
39
|
+
var importedRoots = new Set;
|
|
40
|
+
function hasAnyPhaseReportState(directory) {
|
|
41
|
+
if (projectDbExists(directory))
|
|
42
|
+
return true;
|
|
43
|
+
const root = canonicalProjectKey(directory);
|
|
44
|
+
let entries;
|
|
45
|
+
try {
|
|
46
|
+
entries = readdirSync(join(root, ".swarm"));
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
for (const prefix of Object.values(PHASE_REPORT_LEGACY_PREFIXES)) {
|
|
51
|
+
if (entries.some((name) => name.startsWith(prefix) && name.endsWith(".json") && !name.includes(".imported"))) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
function kindCount(db, kind) {
|
|
58
|
+
return db.query("SELECT COUNT(*) as count FROM phase_report WHERE kind = ?").get(kind)?.count ?? 0;
|
|
59
|
+
}
|
|
60
|
+
function ensurePhaseReportsImported(directory) {
|
|
61
|
+
const root = canonicalProjectKey(directory);
|
|
62
|
+
if (importedRoots.has(root))
|
|
63
|
+
return;
|
|
64
|
+
for (const kind of Object.keys(PHASE_REPORT_LEGACY_PREFIXES)) {
|
|
65
|
+
importLegacyJsonFiles(directory, {
|
|
66
|
+
filePrefix: PHASE_REPORT_LEGACY_PREFIXES[kind],
|
|
67
|
+
kind,
|
|
68
|
+
kindCount: (db) => kindCount(db, kind),
|
|
69
|
+
upsertRow: (db, phase, payload) => {
|
|
70
|
+
db.run(`INSERT INTO phase_report (kind, phase, payload, updated_at)
|
|
71
|
+
VALUES (?, ?, ?, datetime('now'))
|
|
72
|
+
ON CONFLICT(kind, phase) DO UPDATE SET
|
|
73
|
+
payload = excluded.payload,
|
|
74
|
+
updated_at = datetime('now')`, [kind, phase, payload]);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
importedRoots.add(root);
|
|
79
|
+
}
|
|
80
|
+
async function upsertPhaseReportDb(directory, kind, phase, payload) {
|
|
81
|
+
ensurePhaseReportsImported(directory);
|
|
82
|
+
const writer = getGroupCommitWriter(directory);
|
|
83
|
+
writer.enqueue({
|
|
84
|
+
durability: DURABILITY_CLASSES.phase_report,
|
|
85
|
+
run: (db) => {
|
|
86
|
+
db.run(`INSERT INTO phase_report (kind, phase, payload, updated_at)
|
|
87
|
+
VALUES (?, ?, ?, datetime('now'))
|
|
88
|
+
ON CONFLICT(kind, phase) DO UPDATE SET
|
|
89
|
+
payload = excluded.payload,
|
|
90
|
+
updated_at = datetime('now')`, [kind, phase, payload]);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
await writer.flush();
|
|
94
|
+
}
|
|
95
|
+
function readPhaseReportsDb(directory, kind) {
|
|
96
|
+
if (!hasAnyPhaseReportState(directory))
|
|
97
|
+
return [];
|
|
98
|
+
ensurePhaseReportsImported(directory);
|
|
99
|
+
const db = getProjectDb(directory);
|
|
100
|
+
return db.query("SELECT phase, payload FROM phase_report WHERE kind = ? ORDER BY phase").all(kind).map((row) => ({ phase: row.phase, payload: row.payload }));
|
|
101
|
+
}
|
|
102
|
+
function phaseReportLocator(kind, phase) {
|
|
103
|
+
return `swarm.db:phase_report(${kind},${phase})`;
|
|
104
|
+
}
|
|
105
|
+
|
|
27
106
|
// src/hooks/curator-drift.ts
|
|
28
|
-
import * as fs from "fs";
|
|
29
|
-
import * as path from "path";
|
|
30
107
|
init_logger();
|
|
31
|
-
var DRIFT_REPORT_PREFIX = "drift-report-phase-";
|
|
32
108
|
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
109
|
const reports = [];
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
110
|
+
try {
|
|
111
|
+
for (const row of readPhaseReportsDb(directory, "curator_drift")) {
|
|
112
|
+
try {
|
|
113
|
+
const report = JSON.parse(row.payload);
|
|
114
|
+
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)) {
|
|
115
|
+
warn(`[curator-drift] Skipping corrupt drift report: phase ${row.phase}`);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
reports.push(report);
|
|
119
|
+
} catch {
|
|
120
|
+
warn(`[curator-drift] Skipping unreadable drift report: phase ${row.phase}`);
|
|
48
121
|
}
|
|
49
|
-
reports.push(report);
|
|
50
|
-
} catch {
|
|
51
|
-
warn(`[curator-drift] Skipping unreadable drift report: ${filename}`);
|
|
52
122
|
}
|
|
123
|
+
} catch {
|
|
124
|
+
return [];
|
|
53
125
|
}
|
|
54
126
|
reports.sort((a, b) => a.phase - b.phase);
|
|
55
127
|
return reports;
|
|
56
128
|
}
|
|
57
129
|
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 });
|
|
130
|
+
const locator = phaseReportLocator("curator_drift", report.phase);
|
|
62
131
|
try {
|
|
63
|
-
await
|
|
64
|
-
invalidateCachedArtifact(filePath);
|
|
132
|
+
await upsertPhaseReportDb(directory, "curator_drift", report.phase, JSON.stringify(report, null, 2));
|
|
65
133
|
} catch (err) {
|
|
66
|
-
throw new Error(`[curator-drift] Failed to write drift report to ${
|
|
134
|
+
throw new Error(`[curator-drift] Failed to write drift report to ${locator}: ${String(err)}`);
|
|
67
135
|
}
|
|
68
|
-
return
|
|
136
|
+
return locator;
|
|
69
137
|
}
|
|
70
138
|
var _internals = {
|
|
71
139
|
readPriorDriftReports,
|
|
@@ -153,7 +221,7 @@ async function runDeterministicDriftCheck(directory, phase, curatorResult, confi
|
|
|
153
221
|
});
|
|
154
222
|
if (injectAdvisory && alignment !== "ALIGNED" && driftScore > 0) {
|
|
155
223
|
try {
|
|
156
|
-
const advisoryText = `CURATOR DRIFT DETECTED (phase ${phase}, score ${driftScore.toFixed(2)}): ${injectionSummary.slice(0, 300)}. Review .swarm
|
|
224
|
+
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
225
|
injectAdvisory(advisoryText);
|
|
158
226
|
} catch {}
|
|
159
227
|
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
4
|
+
} from "./index-xk0kc1py.js";
|
|
5
|
+
import"./index-c4pynht5.js";
|
|
6
|
+
import"./index-9sy65e94.js";
|
|
7
|
+
import"./index-g64154pd.js";
|
|
8
|
+
import"./index-hyq20s2v.js";
|
|
9
|
+
import"./index-2s4s9n82.js";
|
|
10
10
|
import"./index-txdagbh7.js";
|
|
11
|
-
import"./index-n249fbw7.js";
|
|
12
11
|
import"./index-3146wmgv.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
12
|
+
import"./index-pvgcex0d.js";
|
|
13
|
+
import"./index-t5t82jy8.js";
|
|
14
|
+
import"./index-e3hwzcjv.js";
|
|
16
15
|
import"./index-70ha9e09.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
16
|
+
import"./index-0515j0cz.js";
|
|
17
|
+
import"./index-1hpjwz3s.js";
|
|
18
|
+
import"./index-zaab1wz9.js";
|
|
19
|
+
import"./index-ma8w6pfp.js";
|
|
20
20
|
import"./index-zsrtt42s.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-4afh2cz7.js";
|
|
22
22
|
import"./index-3f7hqtgg.js";
|
|
23
23
|
import"./index-fckfgptr.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-gxd8fwyt.js";
|
|
25
|
+
import"./index-tb1k8jya.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
27
|
+
import"./index-7r9vpkwa.js";
|
|
28
|
+
import"./index-nzrhw31r.js";
|
|
29
|
+
import"./index-12f1tsn2.js";
|
|
30
30
|
import"./index-ddszzne4.js";
|
|
31
31
|
import"./index-mmngnxev.js";
|
|
32
32
|
import"./index-w7ekntej.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-4jersar8.js";
|
|
34
|
+
import"./index-1z4jzwja.js";
|
|
35
|
+
import"./index-93sepnc9.js";
|
|
36
36
|
import"./index-556ja8an.js";
|
|
37
37
|
import"./index-4fwbbad3.js";
|
|
38
38
|
import"./index-b43rt5ph.js";
|
|
39
39
|
import"./index-q7sjgr1y.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
import"./index-bm73pych.js";
|
|
41
|
+
import"./index-zbpcpsk0.js";
|
|
42
|
+
import"./index-t9rhtvy9.js";
|
|
43
43
|
import"./index-zg9d392c.js";
|
|
44
44
|
import"./index-n832052r.js";
|
|
45
45
|
import"./index-dtn0pne5.js";
|
|
46
46
|
import"./index-z6xqpmqg.js";
|
|
47
47
|
import"./index-r3mvsbtq.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
48
|
+
import"./index-nhxaa9j5.js";
|
|
49
|
+
import"./index-td6n935w.js";
|
|
50
50
|
import"./index-9e6fdz2h.js";
|
|
51
51
|
import"./index-4rhhvd1a.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-wdtckfnf.js";
|
|
53
53
|
import"./index-9xd073d4.js";
|
|
54
54
|
import"./index-zjygnfay.js";
|
|
55
55
|
import"./index-ae75rja9.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
56
|
+
import"./index-ynqp3jb6.js";
|
|
57
|
+
import"./index-70bfj3v1.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
|
-
import"./index-
|
|
59
|
+
import"./index-36nt17m8.js";
|
|
60
60
|
import"./index-3b762978.js";
|
|
61
|
-
import"./index-
|
|
61
|
+
import"./index-1b1h770t.js";
|
|
62
62
|
import"./index-ed5ykebp.js";
|
|
63
63
|
import"./index-7g4c7s5r.js";
|
|
64
64
|
import"./index-bpmtbmy9.js";
|
package/dist/cli/{evidence-summary-service-51dxfcn5.js → evidence-summary-service-b15yes21.js}
RENAMED
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
loadPlanJsonOnly,
|
|
7
7
|
mergeDurableGateEntriesFromEvidence,
|
|
8
8
|
readDurableGateEvidence
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-hyq20s2v.js";
|
|
10
|
+
import"./index-2s4s9n82.js";
|
|
11
11
|
import"./index-txdagbh7.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-1hpjwz3s.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-7r9vpkwa.js";
|
|
16
|
+
import"./index-nzrhw31r.js";
|
|
17
|
+
import"./index-1z4jzwja.js";
|
|
18
|
+
import"./index-93sepnc9.js";
|
|
19
19
|
import"./index-556ja8an.js";
|
|
20
20
|
import"./index-4fwbbad3.js";
|
|
21
21
|
import"./index-zg9d392c.js";
|
|
@@ -23,18 +23,18 @@ import"./index-n832052r.js";
|
|
|
23
23
|
import"./index-dtn0pne5.js";
|
|
24
24
|
import"./index-z6xqpmqg.js";
|
|
25
25
|
import"./index-r3mvsbtq.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-nhxaa9j5.js";
|
|
27
|
+
import"./index-td6n935w.js";
|
|
28
28
|
import"./index-9e6fdz2h.js";
|
|
29
29
|
import"./index-4rhhvd1a.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-wdtckfnf.js";
|
|
31
31
|
import"./index-9xd073d4.js";
|
|
32
32
|
import"./index-zjygnfay.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-70bfj3v1.js";
|
|
34
34
|
import"./index-bk5tah7q.js";
|
|
35
|
-
import"./index-
|
|
35
|
+
import"./index-36nt17m8.js";
|
|
36
36
|
import"./index-3b762978.js";
|
|
37
|
-
import"./index-
|
|
37
|
+
import"./index-1b1h770t.js";
|
|
38
38
|
import"./index-ed5ykebp.js";
|
|
39
39
|
import"./index-7g4c7s5r.js";
|
|
40
40
|
import"./index-bpmtbmy9.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
reduceTaskWorkflowSnapshot,
|
|
18
18
|
transitionTaskWorkflowEvidence,
|
|
19
19
|
withTaskEvidenceTransaction
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
} from "./index-7r9vpkwa.js";
|
|
21
|
+
import"./index-nzrhw31r.js";
|
|
22
22
|
import"./index-556ja8an.js";
|
|
23
23
|
import"./index-dtn0pne5.js";
|
|
24
24
|
import"./index-z6xqpmqg.js";
|
|
@@ -27,10 +27,10 @@ import"./index-9e6fdz2h.js";
|
|
|
27
27
|
import"./index-4rhhvd1a.js";
|
|
28
28
|
import"./index-9xd073d4.js";
|
|
29
29
|
import"./index-zjygnfay.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-70bfj3v1.js";
|
|
31
|
+
import"./index-36nt17m8.js";
|
|
32
32
|
import"./index-3b762978.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-1b1h770t.js";
|
|
34
34
|
import"./index-ed5ykebp.js";
|
|
35
35
|
import"./index-7g4c7s5r.js";
|
|
36
36
|
import"./index-bpmtbmy9.js";
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
4
|
+
} from "./index-c69jbpex.js";
|
|
5
|
+
import"./index-xk0kc1py.js";
|
|
6
|
+
import"./index-c4pynht5.js";
|
|
7
|
+
import"./index-9sy65e94.js";
|
|
8
|
+
import"./index-g64154pd.js";
|
|
9
|
+
import"./index-hyq20s2v.js";
|
|
10
|
+
import"./index-2s4s9n82.js";
|
|
11
11
|
import"./index-txdagbh7.js";
|
|
12
|
-
import"./index-n249fbw7.js";
|
|
13
12
|
import"./index-3146wmgv.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
13
|
+
import"./index-pvgcex0d.js";
|
|
14
|
+
import"./index-t5t82jy8.js";
|
|
15
|
+
import"./index-e3hwzcjv.js";
|
|
17
16
|
import"./index-70ha9e09.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
17
|
+
import"./index-0515j0cz.js";
|
|
18
|
+
import"./index-1hpjwz3s.js";
|
|
19
|
+
import"./index-zaab1wz9.js";
|
|
20
|
+
import"./index-ma8w6pfp.js";
|
|
21
21
|
import"./index-zsrtt42s.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-4afh2cz7.js";
|
|
23
23
|
import"./index-3f7hqtgg.js";
|
|
24
24
|
import"./index-fckfgptr.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-gxd8fwyt.js";
|
|
26
|
+
import"./index-tb1k8jya.js";
|
|
27
27
|
import"./index-rtry5xyf.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
28
|
+
import"./index-7r9vpkwa.js";
|
|
29
|
+
import"./index-nzrhw31r.js";
|
|
30
|
+
import"./index-12f1tsn2.js";
|
|
31
31
|
import"./index-ddszzne4.js";
|
|
32
32
|
import"./index-mmngnxev.js";
|
|
33
33
|
import"./index-w7ekntej.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-4jersar8.js";
|
|
35
|
+
import"./index-1z4jzwja.js";
|
|
36
|
+
import"./index-93sepnc9.js";
|
|
37
37
|
import"./index-556ja8an.js";
|
|
38
38
|
import"./index-4fwbbad3.js";
|
|
39
39
|
import"./index-b43rt5ph.js";
|
|
40
40
|
import"./index-q7sjgr1y.js";
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
41
|
+
import"./index-bm73pych.js";
|
|
42
|
+
import"./index-zbpcpsk0.js";
|
|
43
|
+
import"./index-t9rhtvy9.js";
|
|
44
44
|
import"./index-zg9d392c.js";
|
|
45
45
|
import"./index-n832052r.js";
|
|
46
46
|
import"./index-dtn0pne5.js";
|
|
47
47
|
import"./index-z6xqpmqg.js";
|
|
48
48
|
import"./index-r3mvsbtq.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
49
|
+
import"./index-nhxaa9j5.js";
|
|
50
|
+
import"./index-td6n935w.js";
|
|
51
51
|
import"./index-9e6fdz2h.js";
|
|
52
52
|
import"./index-4rhhvd1a.js";
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-wdtckfnf.js";
|
|
54
54
|
import"./index-9xd073d4.js";
|
|
55
55
|
import"./index-zjygnfay.js";
|
|
56
56
|
import"./index-ae75rja9.js";
|
|
57
|
-
import"./index-
|
|
58
|
-
import"./index-
|
|
57
|
+
import"./index-ynqp3jb6.js";
|
|
58
|
+
import"./index-70bfj3v1.js";
|
|
59
59
|
import"./index-bk5tah7q.js";
|
|
60
|
-
import"./index-
|
|
60
|
+
import"./index-36nt17m8.js";
|
|
61
61
|
import"./index-3b762978.js";
|
|
62
|
-
import"./index-
|
|
62
|
+
import"./index-1b1h770t.js";
|
|
63
63
|
import"./index-ed5ykebp.js";
|
|
64
64
|
import"./index-7g4c7s5r.js";
|
|
65
65
|
import"./index-bpmtbmy9.js";
|