opencode-swarm 7.164.6 → 7.164.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/background/pending-delegations.d.ts +3 -0
- package/dist/background/pr-subscriptions.d.ts +1 -8
- package/dist/cli/{coder-settlement-6qgvzx40.js → coder-settlement-p8wwmtnn.js} +14 -14
- package/dist/cli/{config-doctor-d1cbh67h.js → config-doctor-wxf488mw.js} +5 -3
- package/dist/cli/{core-g0cvvj3b.js → core-671ybpbt.js} +2 -2
- package/dist/cli/{curation-policy-7f8x9yg6.js → curation-policy-de7emfqc.js} +7 -6
- package/dist/cli/{curator-drift-0r0scc8r.js → curator-drift-nvxv8xkk.js} +7 -5
- package/dist/cli/{curator-q3qn89wn.js → curator-eaz5rj6k.js} +39 -37
- package/dist/cli/curator-llm-factory-swzyfnh6.js +68 -0
- package/dist/cli/{dispatch-q4v8x2pk.js → dispatch-dqybvj8v.js} +10 -6
- package/dist/cli/{evidence-summary-service-3meyb8rc.js → evidence-summary-service-deqsc8hj.js} +19 -16
- package/dist/cli/{gate-evidence-mhc0w7vp.js → gate-evidence-mafg71qb.js} +14 -8
- package/dist/cli/guardrail-explain-ygq7cx9w.js +69 -0
- package/dist/cli/{guardrail-log-0nd1eqvz.js → guardrail-log-k3w9dq6x.js} +9 -8
- package/dist/cli/{guardrail-reset-mzeyd6jh.js → guardrail-reset-ae2step4.js} +39 -37
- package/dist/cli/hive-promoter-a4cs5sbr.js +83 -0
- package/dist/cli/{index-x6zyc38w.js → index-0zjwnbze.js} +1 -1
- package/dist/cli/{index-qdbgc16x.js → index-1ekzd5wf.js} +20 -12
- package/dist/cli/{index-fxxja498.js → index-2czt53wz.js} +1 -1
- package/dist/cli/{index-g5714mpv.js → index-388sxv1b.js} +17 -8
- package/dist/cli/{index-kvb4dwgf.js → index-3kgg2n6z.js} +12 -6
- package/dist/cli/{index-pvp5tnn2.js → index-3sv8t7ca.js} +2 -2
- package/dist/cli/{index-hdapetg1.js → index-46yrz972.js} +3 -3
- package/dist/cli/{index-zypacgjc.js → index-4vx89ymn.js} +5 -5
- package/dist/cli/{index-6f9yvd67.js → index-581bcqp9.js} +2 -2
- package/dist/cli/{index-gwg7a00b.js → index-63enf73z.js} +20 -15
- package/dist/cli/index-7qefgq4j.js +71 -0
- package/dist/cli/{index-5p1tzpwh.js → index-8ck1jkhd.js} +3 -2
- package/dist/cli/{index-zfwd65c2.js → index-8ntf8jnj.js} +19 -18
- package/dist/cli/{index-m1nrd3yd.js → index-8psybzzf.js} +1 -1
- package/dist/cli/{index-2c3np82d.js → index-8tqqmsav.js} +1 -1
- package/dist/cli/{index-tegp2mny.js → index-93znbdam.js} +9 -5
- package/dist/cli/{index-x76mprg2.js → index-9qkytpwa.js} +185 -376
- package/dist/cli/{index-p56xc59p.js → index-9ydhzegh.js} +28 -17
- package/dist/cli/{index-935ww10s.js → index-bvjwmmdc.js} +1233 -1190
- package/dist/cli/{index-ty3vtqe2.js → index-c4j9sjcs.js} +4 -4
- package/dist/cli/index-cw912re7.js +200 -0
- package/dist/cli/{index-j3hsjynw.js → index-fq1wfsmw.js} +100 -97
- package/dist/cli/{index-59hvr3f4.js → index-gm65h7bh.js} +9 -6
- package/dist/cli/{index-jzvrvdmr.js → index-h3k3rgyr.js} +4 -4
- package/dist/cli/{index-12xzj0hm.js → index-jkwfajh1.js} +4 -4
- package/dist/cli/{index-1dz8hv7p.js → index-kvq1e82k.js} +3 -3
- package/dist/cli/{index-ze5zyv28.js → index-mr3h3sm5.js} +2 -2
- package/dist/cli/{index-rysxqae0.js → index-rey1tzcw.js} +7 -7
- package/dist/cli/index-ry16d01s.js +107 -0
- package/dist/cli/{index-ay9cr8tr.js → index-ry4mwbc2.js} +1 -1
- package/dist/cli/{index-b0m3efpf.js → index-sxxh4ams.js} +2 -2
- package/dist/cli/{index-cyhw0der.js → index-t1qzjhnj.js} +13 -13
- package/dist/cli/{index-j645xpsm.js → index-v1fj9exz.js} +12 -5
- package/dist/cli/{index-3f7hqtgg.js → index-w3gtqey0.js} +4 -1
- package/dist/cli/{index-9qvmsyab.js → index-wgqeqy68.js} +2 -2
- package/dist/cli/{index-g94qqwnz.js → index-x2t2tbm2.js} +2 -2
- package/dist/cli/{index-zjg5ajf5.js → index-x3qzt684.js} +71 -47
- package/dist/cli/{index-t1nkr7cz.js → index-xc3q62ev.js} +2 -2
- package/dist/cli/{index-ew99d4y6.js → index-xy59dnvq.js} +1 -1
- package/dist/cli/{index-4k16cz8r.js → index-y75xd50f.js} +36 -27
- package/dist/cli/{index-7v3bb0h3.js → index-yzn1fm9a.js} +1 -1
- package/dist/cli/{index-yh8wxegw.js → index-zg34ngdf.js} +21 -11
- package/dist/cli/{index-y4z0rhsa.js → index-zg8tvjb0.js} +41 -39
- package/dist/cli/index.js +39 -37
- package/dist/cli/{knowledge-escalator-aca0nhqg.js → knowledge-escalator-t532h2ym.js} +15 -14
- package/dist/cli/{knowledge-events-n5t313ht.js → knowledge-events-hdtc0cxe.js} +13 -12
- package/dist/cli/{knowledge-link-8ea4ksda.js → knowledge-link-hhnmc4g1.js} +6 -5
- package/dist/cli/{knowledge-store-j97ejf6a.js → knowledge-store-45jadhmb.js} +7 -6
- package/dist/cli/{knowledge-validator-01evhydg.js → knowledge-validator-5e6qbq6h.js} +9 -8
- package/dist/cli/{model-preflight-pmnbfzjv.js → model-preflight-bq035tfh.js} +1 -1
- package/dist/cli/{pending-delegations-w73abdk3.js → pending-delegations-z0crvst3.js} +7 -7
- package/dist/cli/{pr-subscriptions-05dzvavk.js → pr-subscriptions-73fs8y3n.js} +7 -6
- package/dist/cli/{pr-workflow-gate-t0tnkx5f.js → pr-workflow-gate-rpdts7wy.js} +39 -37
- package/dist/cli/{runner-fh7t0mn9.js → runner-5qqh83e2.js} +6 -6
- package/dist/cli/{scan-cursor-63zx2qd8.js → scan-cursor-t75qznf3.js} +8 -7
- package/dist/cli/{schema-t1scx08g.js → schema-8dfjsrk6.js} +2 -2
- package/dist/cli/{scope-persistence-1a5qmchf.js → scope-persistence-zfmz4sws.js} +12 -10
- package/dist/cli/{skill-generator-7werbwgv.js → skill-generator-psdb10jw.js} +17 -16
- package/dist/cli/{telemetry-j14cj552.js → telemetry-85gxedng.js} +1 -1
- package/dist/cli/{workspace-snapshot-yq0tc49d.js → workspace-snapshot-eh18vgkn.js} +2 -1
- package/dist/cli/{worktree-collision-ownership-wzdzky33.js → worktree-collision-ownership-xrqssqzd.js} +12 -15
- package/dist/cli/{worktree-isolation-m02ay3kg.js → worktree-isolation-s9m3bgah.js} +39 -37
- package/dist/db/canonical-project.d.ts +10 -3
- package/dist/db/project-db.d.ts +4 -0
- package/dist/evidence/task-gate-repair.d.ts +1 -1
- package/dist/gate-evidence.d.ts +19 -1
- package/dist/index.js +581 -581
- package/dist/plan/ledger.d.ts +2 -0
- package/dist/tools/pre-check-batch.d.ts +1 -1
- package/dist/utils/canonical-root.d.ts +21 -1
- package/dist/utils/filesystem-identity.d.ts +59 -0
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-dw7md4nr.js +0 -66
- package/dist/cli/guardrail-explain-6cbszhw1.js +0 -67
- package/dist/cli/hive-promoter-w7g879cm.js +0 -81
- package/dist/cli/index-ddszzne4.js +0 -42
|
@@ -3,62 +3,64 @@ import {
|
|
|
3
3
|
getAgentSession,
|
|
4
4
|
getBlockingActionCircuit,
|
|
5
5
|
resetActionCircuitExternally
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
6
|
+
} from "./index-bvjwmmdc.js";
|
|
7
|
+
import"./index-yzn1fm9a.js";
|
|
8
|
+
import"./index-jkwfajh1.js";
|
|
9
|
+
import"./index-3kgg2n6z.js";
|
|
10
|
+
import"./index-9qkytpwa.js";
|
|
11
|
+
import"./index-wgqeqy68.js";
|
|
12
12
|
import"./index-txdagbh7.js";
|
|
13
|
+
import"./index-cw912re7.js";
|
|
13
14
|
import"./index-3146wmgv.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-gm65h7bh.js";
|
|
16
|
+
import"./index-4vx89ymn.js";
|
|
17
|
+
import"./index-581bcqp9.js";
|
|
17
18
|
import"./index-70ha9e09.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-zg34ngdf.js";
|
|
20
|
+
import"./index-x3qzt684.js";
|
|
20
21
|
import"./index-zaab1wz9.js";
|
|
21
|
-
import"./index-
|
|
22
|
+
import"./index-8ntf8jnj.js";
|
|
22
23
|
import"./index-zsrtt42s.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
24
|
+
import"./index-y75xd50f.js";
|
|
25
|
+
import"./index-w3gtqey0.js";
|
|
26
|
+
import"./index-sxxh4ams.js";
|
|
27
|
+
import"./index-h3k3rgyr.js";
|
|
28
|
+
import"./index-0zjwnbze.js";
|
|
28
29
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
30
|
+
import"./index-388sxv1b.js";
|
|
31
|
+
import"./index-xc3q62ev.js";
|
|
32
|
+
import"./index-1ekzd5wf.js";
|
|
33
|
+
import"./index-fq1wfsmw.js";
|
|
34
|
+
import"./index-v1fj9exz.js";
|
|
35
|
+
import"./index-ry16d01s.js";
|
|
36
|
+
import"./index-3sv8t7ca.js";
|
|
36
37
|
import"./index-556ja8an.js";
|
|
37
38
|
import"./index-4fwbbad3.js";
|
|
38
39
|
import"./index-b43rt5ph.js";
|
|
39
40
|
import"./index-q7sjgr1y.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
41
|
+
import"./index-rey1tzcw.js";
|
|
42
|
+
import"./index-63enf73z.js";
|
|
43
|
+
import"./index-46yrz972.js";
|
|
43
44
|
import"./index-zg9d392c.js";
|
|
44
45
|
import"./index-n832052r.js";
|
|
45
|
-
import"./index-
|
|
46
|
+
import"./index-8tqqmsav.js";
|
|
46
47
|
import"./index-z6xqpmqg.js";
|
|
47
48
|
import"./index-r3mvsbtq.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-xy59dnvq.js";
|
|
50
|
+
import"./index-8ck1jkhd.js";
|
|
50
51
|
import"./index-9e6fdz2h.js";
|
|
51
52
|
import"./index-4rhhvd1a.js";
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-9ydhzegh.js";
|
|
54
|
+
import"./index-8psybzzf.js";
|
|
54
55
|
import"./index-zjygnfay.js";
|
|
55
56
|
import"./index-ae75rja9.js";
|
|
56
|
-
import"./index-
|
|
57
|
-
import"./index-
|
|
57
|
+
import"./index-93znbdam.js";
|
|
58
|
+
import"./index-mr3h3sm5.js";
|
|
58
59
|
import"./index-bk5tah7q.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
60
|
+
import"./index-7qefgq4j.js";
|
|
61
|
+
import"./index-2czt53wz.js";
|
|
62
|
+
import"./index-t1qzjhnj.js";
|
|
63
|
+
import"./index-kvq1e82k.js";
|
|
62
64
|
import"./index-7g4c7s5r.js";
|
|
63
65
|
import"./index-bpmtbmy9.js";
|
|
64
66
|
import"./index-zgwm4ryv.js";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
_internals2 as _internals,
|
|
4
|
+
checkHivePromotions,
|
|
5
|
+
countDistinctProjects,
|
|
6
|
+
createHivePromoterHook,
|
|
7
|
+
isHiveEligible,
|
|
8
|
+
promoteFromSwarm,
|
|
9
|
+
promoteToHive
|
|
10
|
+
} from "./index-bvjwmmdc.js";
|
|
11
|
+
import"./index-yzn1fm9a.js";
|
|
12
|
+
import"./index-jkwfajh1.js";
|
|
13
|
+
import"./index-3kgg2n6z.js";
|
|
14
|
+
import"./index-9qkytpwa.js";
|
|
15
|
+
import"./index-wgqeqy68.js";
|
|
16
|
+
import"./index-txdagbh7.js";
|
|
17
|
+
import"./index-cw912re7.js";
|
|
18
|
+
import"./index-3146wmgv.js";
|
|
19
|
+
import"./index-gm65h7bh.js";
|
|
20
|
+
import"./index-4vx89ymn.js";
|
|
21
|
+
import"./index-581bcqp9.js";
|
|
22
|
+
import"./index-70ha9e09.js";
|
|
23
|
+
import"./index-zg34ngdf.js";
|
|
24
|
+
import"./index-x3qzt684.js";
|
|
25
|
+
import"./index-zaab1wz9.js";
|
|
26
|
+
import"./index-8ntf8jnj.js";
|
|
27
|
+
import"./index-zsrtt42s.js";
|
|
28
|
+
import"./index-y75xd50f.js";
|
|
29
|
+
import"./index-w3gtqey0.js";
|
|
30
|
+
import"./index-sxxh4ams.js";
|
|
31
|
+
import"./index-h3k3rgyr.js";
|
|
32
|
+
import"./index-0zjwnbze.js";
|
|
33
|
+
import"./index-rtry5xyf.js";
|
|
34
|
+
import"./index-388sxv1b.js";
|
|
35
|
+
import"./index-xc3q62ev.js";
|
|
36
|
+
import"./index-1ekzd5wf.js";
|
|
37
|
+
import"./index-fq1wfsmw.js";
|
|
38
|
+
import"./index-v1fj9exz.js";
|
|
39
|
+
import"./index-ry16d01s.js";
|
|
40
|
+
import"./index-3sv8t7ca.js";
|
|
41
|
+
import"./index-556ja8an.js";
|
|
42
|
+
import"./index-4fwbbad3.js";
|
|
43
|
+
import"./index-b43rt5ph.js";
|
|
44
|
+
import"./index-q7sjgr1y.js";
|
|
45
|
+
import {
|
|
46
|
+
resolveHiveKnowledgePath
|
|
47
|
+
} from "./index-rey1tzcw.js";
|
|
48
|
+
import"./index-63enf73z.js";
|
|
49
|
+
import"./index-46yrz972.js";
|
|
50
|
+
import"./index-zg9d392c.js";
|
|
51
|
+
import"./index-n832052r.js";
|
|
52
|
+
import"./index-8tqqmsav.js";
|
|
53
|
+
import"./index-z6xqpmqg.js";
|
|
54
|
+
import"./index-r3mvsbtq.js";
|
|
55
|
+
import"./index-xy59dnvq.js";
|
|
56
|
+
import"./index-8ck1jkhd.js";
|
|
57
|
+
import"./index-9e6fdz2h.js";
|
|
58
|
+
import"./index-4rhhvd1a.js";
|
|
59
|
+
import"./index-9ydhzegh.js";
|
|
60
|
+
import"./index-8psybzzf.js";
|
|
61
|
+
import"./index-zjygnfay.js";
|
|
62
|
+
import"./index-ae75rja9.js";
|
|
63
|
+
import"./index-93znbdam.js";
|
|
64
|
+
import"./index-mr3h3sm5.js";
|
|
65
|
+
import"./index-bk5tah7q.js";
|
|
66
|
+
import"./index-7qefgq4j.js";
|
|
67
|
+
import"./index-2czt53wz.js";
|
|
68
|
+
import"./index-t1qzjhnj.js";
|
|
69
|
+
import"./index-kvq1e82k.js";
|
|
70
|
+
import"./index-7g4c7s5r.js";
|
|
71
|
+
import"./index-bpmtbmy9.js";
|
|
72
|
+
import"./index-zgwm4ryv.js";
|
|
73
|
+
import"./index-a76rekgs.js";
|
|
74
|
+
export {
|
|
75
|
+
resolveHiveKnowledgePath,
|
|
76
|
+
promoteToHive,
|
|
77
|
+
promoteFromSwarm,
|
|
78
|
+
isHiveEligible,
|
|
79
|
+
createHivePromoterHook,
|
|
80
|
+
countDistinctProjects,
|
|
81
|
+
checkHivePromotions,
|
|
82
|
+
_internals
|
|
83
|
+
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readLinkPointer,
|
|
8
8
|
resolveKnowledgeStoreDir,
|
|
9
9
|
resolveLinkDir
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-93znbdam.js";
|
|
11
11
|
|
|
12
12
|
// src/knowledge/curation-policy.ts
|
|
13
13
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
canonicalRootKeyFresh
|
|
4
|
-
} from "./index-ddszzne4.js";
|
|
5
2
|
import {
|
|
6
3
|
validateSwarmPath
|
|
7
|
-
} from "./index-
|
|
4
|
+
} from "./index-8tqqmsav.js";
|
|
8
5
|
import {
|
|
9
6
|
bunWrite
|
|
10
7
|
} from "./index-r3mvsbtq.js";
|
|
11
8
|
import {
|
|
12
9
|
observeDelegationLedgerPressure
|
|
13
|
-
} from "./index-
|
|
10
|
+
} from "./index-9ydhzegh.js";
|
|
11
|
+
import {
|
|
12
|
+
canonicalRootKeyFresh,
|
|
13
|
+
sameProjectRoot
|
|
14
|
+
} from "./index-7qefgq4j.js";
|
|
14
15
|
import {
|
|
15
16
|
EvidenceLockTimeoutError,
|
|
16
17
|
withEvidenceLock
|
|
17
|
-
} from "./index-
|
|
18
|
+
} from "./index-2czt53wz.js";
|
|
18
19
|
import {
|
|
19
20
|
exports_external,
|
|
20
21
|
init_zod
|
|
@@ -1578,7 +1579,7 @@ function loadFoldedState(directory, options) {
|
|
|
1578
1579
|
return loadLegacyLedger(directory, options.strict);
|
|
1579
1580
|
}
|
|
1580
1581
|
const manifest = manifestRead.manifest;
|
|
1581
|
-
if (manifest.rootPath
|
|
1582
|
+
if (!sameProjectRoot(manifest.rootPath, directory)) {
|
|
1582
1583
|
return {
|
|
1583
1584
|
status: "uncertain",
|
|
1584
1585
|
reason: "background delegation checkpoint is bound to a different project root",
|
|
@@ -2892,6 +2893,9 @@ var RETRYABLE_LEGACY_SETTLEMENT_ERROR_CODES = new Set([
|
|
|
2892
2893
|
]);
|
|
2893
2894
|
var legacyCoderSettlementReconcilers = new Map;
|
|
2894
2895
|
var legacyCoderSettlementReconcilerOrder = [];
|
|
2896
|
+
function compareCodeUnits(a, b) {
|
|
2897
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
2898
|
+
}
|
|
2895
2899
|
function registerLegacyCoderSettlementReconciler(directory, reconciler) {
|
|
2896
2900
|
const key = canonicalRootKeyFresh(directory);
|
|
2897
2901
|
if (legacyCoderSettlementReconcilers.has(key)) {
|
|
@@ -2916,6 +2920,7 @@ function getLegacyCoderSettlementReconciler(directory) {
|
|
|
2916
2920
|
}
|
|
2917
2921
|
var _internals = {
|
|
2918
2922
|
getLegacyCoderSettlementReconciler,
|
|
2923
|
+
readFallbackDirectory,
|
|
2919
2924
|
getLegacyCoderSettlementReconcilerOrder: () => [
|
|
2920
2925
|
...legacyCoderSettlementReconcilerOrder
|
|
2921
2926
|
],
|
|
@@ -3371,6 +3376,11 @@ function fallbackPath(directory, correlationId) {
|
|
|
3371
3376
|
function fallbackDirectoryPath(directory) {
|
|
3372
3377
|
return path2.dirname(validateSwarmPath(directory, path2.join(BACKGROUND_DELEGATION_FALLBACK_DIR, ".containment-anchor")));
|
|
3373
3378
|
}
|
|
3379
|
+
function readFallbackDirectory(directory) {
|
|
3380
|
+
return fs2.readdirSync(fallbackDirectoryPath(directory), {
|
|
3381
|
+
withFileTypes: true
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3374
3384
|
async function readFallbackFile(directory, correlationId) {
|
|
3375
3385
|
for (let attempt = 0;attempt < 5; attempt++) {
|
|
3376
3386
|
try {
|
|
@@ -3400,9 +3410,7 @@ async function readDelegationFallback(directory, correlationId) {
|
|
|
3400
3410
|
async function listDelegationFallbacks(directory) {
|
|
3401
3411
|
let entries;
|
|
3402
3412
|
try {
|
|
3403
|
-
entries =
|
|
3404
|
-
withFileTypes: true
|
|
3405
|
-
}).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
|
|
3413
|
+
entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
|
|
3406
3414
|
} catch {
|
|
3407
3415
|
return [];
|
|
3408
3416
|
}
|
|
@@ -3422,7 +3430,7 @@ async function scanDelegationFallbacksForRecovery(directory) {
|
|
|
3422
3430
|
let entries;
|
|
3423
3431
|
try {
|
|
3424
3432
|
fallbackDir = fallbackDirectoryPath(directory);
|
|
3425
|
-
entries =
|
|
3433
|
+
entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json"));
|
|
3426
3434
|
} catch (error) {
|
|
3427
3435
|
if (error.code === "ENOENT") {
|
|
3428
3436
|
return { status: "ok", owners: [] };
|
|
@@ -3980,7 +3988,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
3980
3988
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
3981
3989
|
if (candidates.length === 0)
|
|
3982
3990
|
return 0;
|
|
3983
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
3991
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-p8wwmtnn.js");
|
|
3984
3992
|
let transferred = 0;
|
|
3985
3993
|
for (const record of candidates) {
|
|
3986
3994
|
try {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-xc3q62ev.js";
|
|
6
6
|
import {
|
|
7
7
|
isPathWithinDeclaredScope,
|
|
8
8
|
unsafePathTextReason
|
|
9
9
|
} from "./index-556ja8an.js";
|
|
10
10
|
import {
|
|
11
11
|
validateSwarmPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8tqqmsav.js";
|
|
13
13
|
import {
|
|
14
14
|
bunSpawn,
|
|
15
15
|
classifySpawnFailure
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
atomicWriteFile,
|
|
27
27
|
taskEvidencePath,
|
|
28
28
|
withTaskEvidenceLock
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-mr3h3sm5.js";
|
|
30
30
|
import {
|
|
31
31
|
assertProjectRoot
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-2czt53wz.js";
|
|
33
33
|
import {
|
|
34
34
|
telemetry
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-kvq1e82k.js";
|
|
36
36
|
import {
|
|
37
37
|
exports_external,
|
|
38
38
|
init_zod
|
|
@@ -1557,6 +1557,9 @@ async function writeWorkflowWalFile(kind, filePath, wal) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
|
|
1559
1559
|
// src/gate-evidence.ts
|
|
1560
|
+
var _internals3 = {
|
|
1561
|
+
appendTaskGateRequirementsReceiptIfNeeded
|
|
1562
|
+
};
|
|
1560
1563
|
var TASK_WORKFLOW_SCHEMA_MARKER = "exact-task-v1";
|
|
1561
1564
|
var TASK_WORKFLOW_STATES = [
|
|
1562
1565
|
"idle",
|
|
@@ -1585,6 +1588,7 @@ var TASK_WORKFLOW_OUTCOMES = [
|
|
|
1585
1588
|
"task_closed",
|
|
1586
1589
|
"repair_idle"
|
|
1587
1590
|
];
|
|
1591
|
+
var TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL = "requirements_reconstruction";
|
|
1588
1592
|
function assertTaskEvidenceWriteAllowed(directory, taskId, event) {
|
|
1589
1593
|
assertValidTaskId(taskId);
|
|
1590
1594
|
const coderWalPath = validateSwarmPath(directory, `coder-settlements/${taskId}.json`);
|
|
@@ -1720,7 +1724,7 @@ function maybeExpandRequiredGates(existing, event) {
|
|
|
1720
1724
|
if (event.type === "accepted_mutation") {
|
|
1721
1725
|
const agentType = event.agentType;
|
|
1722
1726
|
if (typeof agentType === "string" && agentType.trim() !== "") {
|
|
1723
|
-
return existing ? expandRequiredGates(existing.required_gates, agentType, event.context ?? {}) : deriveRequiredGates(agentType, event.context ?? {});
|
|
1727
|
+
return existing ? expandRequiredGates(existing.required_gates.filter((gate) => gate !== TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL), agentType, event.context ?? {}) : deriveRequiredGates(agentType, event.context ?? {});
|
|
1724
1728
|
}
|
|
1725
1729
|
}
|
|
1726
1730
|
if (event.type === "stage_b_completed" && event.ensureDefaultStageB === true) {
|
|
@@ -2031,7 +2035,7 @@ async function withTaskEvidenceTransaction(directory, taskId, agent, callback) {
|
|
|
2031
2035
|
});
|
|
2032
2036
|
await atomicWriteFile(evidencePath, JSON.stringify(validated, null, 2));
|
|
2033
2037
|
if (event) {
|
|
2034
|
-
await appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, current, validated, event);
|
|
2038
|
+
await _internals3.appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, current, validated, event);
|
|
2035
2039
|
}
|
|
2036
2040
|
current = validated;
|
|
2037
2041
|
return validated;
|
|
@@ -2048,6 +2052,11 @@ async function withTaskEvidenceTransaction(directory, taskId, agent, callback) {
|
|
|
2048
2052
|
});
|
|
2049
2053
|
});
|
|
2050
2054
|
}
|
|
2055
|
+
async function ensureTaskGateRequirementsReceiptForSettledTransition(directory, taskId, evidence, event) {
|
|
2056
|
+
assertValidTaskId(taskId);
|
|
2057
|
+
const validated = TaskEvidenceSchema.parse({ ...evidence, taskId });
|
|
2058
|
+
await _internals3.appendTaskGateRequirementsReceiptIfNeeded(directory, taskId, null, validated, event);
|
|
2059
|
+
}
|
|
2051
2060
|
async function recordGateEvidence(directory, taskId, gate, sessionId, turbo, options = {}) {
|
|
2052
2061
|
assertValidTaskId(taskId);
|
|
2053
2062
|
if (shouldTreatGateAsStageB(gate) && typeof options.expectedGeneration !== "number") {
|
|
@@ -2121,4 +2130,4 @@ function compareTaskWorkflowStateRank(left, right) {
|
|
|
2121
2130
|
return WORKFLOW_STATE_RANK[left] - WORKFLOW_STATE_RANK[right];
|
|
2122
2131
|
}
|
|
2123
2132
|
|
|
2124
|
-
export { isStrictTaskId, sanitizeTaskId, listRecoveryRecords, GitBinaryMissingError, GitSpawnCwdError, isGitBinaryMissing, isSpawnCwdMissing, isSpawnCwdUnreadable, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, TASK_WORKFLOW_SCHEMA_MARKER, assertTaskEvidenceWriteAllowed, parseTaskEvidence, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, withTaskEvidenceTransaction, recordGateEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
|
|
2133
|
+
export { isStrictTaskId, sanitizeTaskId, listRecoveryRecords, GitBinaryMissingError, GitSpawnCwdError, isGitBinaryMissing, isSpawnCwdMissing, isSpawnCwdUnreadable, _internals, SOURCE_WORKTREE_GONE_STAGE, SOURCE_WORKTREE_UNCERTAIN_STAGE, getMergeStrategy, recoverMergeBackFromImmutableCoordinates, reconcileLandedMerge, postMergeCleanup, pruneStaleWorktreeMetadata, attemptMergeBackFromDirty, cleanupOrphanedBranches, startupOrphanRecovery, readWorkflowWalFile, writeWorkflowWalFile, _internals3 as _internals1, TASK_WORKFLOW_SCHEMA_MARKER, TASK_GATE_REQUIREMENTS_RECONSTRUCTION_SENTINEL, assertTaskEvidenceWriteAllowed, parseTaskEvidence, DEFAULT_REQUIRED_GATES, isValidTaskId, getTaskWorkflowSnapshot, reduceTaskWorkflowSnapshot, deriveRequiredGates, expandRequiredGates, transitionTaskWorkflowEvidence, withTaskEvidenceTransaction, ensureTaskGateRequirementsReceiptForSettledTransition, recordGateEvidence, recordAgentDispatch, readTaskEvidence, readTaskEvidenceRaw, hasPassedAllGates, compareTaskWorkflowStateRank };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
isCanonicalPathWithinRoot
|
|
4
|
+
} from "./index-cw912re7.js";
|
|
5
|
+
import {
|
|
6
|
+
sameExistingFilesystemPath
|
|
7
|
+
} from "./index-ry16d01s.js";
|
|
2
8
|
import {
|
|
3
9
|
FALLBACK_MODELS_MAX,
|
|
4
10
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
@@ -6,11 +12,11 @@ import {
|
|
|
6
12
|
PluginConfigSchema,
|
|
7
13
|
init_schema,
|
|
8
14
|
stripKnownSwarmPrefix
|
|
9
|
-
} from "./index-
|
|
15
|
+
} from "./index-8ck1jkhd.js";
|
|
10
16
|
import {
|
|
11
17
|
ALL_AGENT_NAMES,
|
|
12
18
|
init_constants
|
|
13
|
-
} from "./index-
|
|
19
|
+
} from "./index-8psybzzf.js";
|
|
14
20
|
import {
|
|
15
21
|
log
|
|
16
22
|
} from "./index-zgwm4ryv.js";
|
|
@@ -499,9 +505,9 @@ function restoreFromBackup(backupPath, directory) {
|
|
|
499
505
|
if (!fs.existsSync(backupPath)) {
|
|
500
506
|
return null;
|
|
501
507
|
}
|
|
502
|
-
const swarmDir = path.resolve(
|
|
508
|
+
const swarmDir = path.resolve(directory, ".swarm");
|
|
503
509
|
const resolvedBackup = path.resolve(backupPath);
|
|
504
|
-
if (!
|
|
510
|
+
if (!isCanonicalPathWithinRoot(resolvedBackup, swarmDir)) {
|
|
505
511
|
return null;
|
|
506
512
|
}
|
|
507
513
|
try {
|
|
@@ -1725,13 +1731,13 @@ function removeStraySwarmDir(projectRoot, strayPath) {
|
|
|
1725
1731
|
};
|
|
1726
1732
|
}
|
|
1727
1733
|
const rootSwarm = path.join(canonicalRoot, ".swarm");
|
|
1728
|
-
if (canonicalStray
|
|
1734
|
+
if (sameExistingFilesystemPath(canonicalStray, rootSwarm) || sameExistingFilesystemPath(canonicalStray, canonicalRoot)) {
|
|
1729
1735
|
return {
|
|
1730
1736
|
success: false,
|
|
1731
1737
|
message: "Refusing to remove root .swarm/ directory"
|
|
1732
1738
|
};
|
|
1733
1739
|
}
|
|
1734
|
-
if (!canonicalStray
|
|
1740
|
+
if (!isCanonicalPathWithinRoot(canonicalStray, canonicalRoot)) {
|
|
1735
1741
|
return {
|
|
1736
1742
|
success: false,
|
|
1737
1743
|
message: "Path is outside project root \u2014 refusing to remove"
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-xy59dnvq.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-8ck1jkhd.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8psybzzf.js";
|
|
13
13
|
|
|
14
14
|
// src/config/index.ts
|
|
15
15
|
init_constants();
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-rey1tzcw.js";
|
|
10
10
|
import {
|
|
11
11
|
queryHistoricalOutcomes,
|
|
12
12
|
readKnowledgeEvents,
|
|
13
13
|
recordKnowledgeEvent
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-63enf73z.js";
|
|
15
15
|
import {
|
|
16
16
|
init_knowledge_types,
|
|
17
17
|
isActiveStatus
|
|
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
224
224
|
alreadyInactive: true
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
227
|
+
const { quarantineEntry } = await import("./knowledge-validator-5e6qbq6h.js");
|
|
228
228
|
let policyConfig;
|
|
229
229
|
try {
|
|
230
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
231
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
230
|
+
const { KnowledgeConfigSchema } = await import("./schema-8dfjsrk6.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-c4j9sjcs.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rey1tzcw.js";
|
|
6
6
|
import {
|
|
7
7
|
init_git_executable,
|
|
8
8
|
resolveGitExecutableAsync
|
|
9
9
|
} from "./index-9e6fdz2h.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveKnowledgeStoreDir
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-93znbdam.js";
|
|
13
13
|
import {
|
|
14
14
|
init_knowledge_types,
|
|
15
15
|
isActiveStatus
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-8tqqmsav.js";
|
|
5
5
|
import {
|
|
6
6
|
loadPluginConfigWithMeta
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-xy59dnvq.js";
|
|
8
8
|
import {
|
|
9
9
|
KnowledgeConfigSchema,
|
|
10
10
|
init_schema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-8ck1jkhd.js";
|
|
12
12
|
import {
|
|
13
13
|
observeReceiptTransition
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-9ydhzegh.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveHiveEventsPath
|
|
17
17
|
} from "./index-ae75rja9.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveKnowledgeStoreDir
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-93znbdam.js";
|
|
21
21
|
import {
|
|
22
22
|
atomicWriteFile
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-mr3h3sm5.js";
|
|
24
|
+
import {
|
|
25
|
+
canonicalRootKey
|
|
26
|
+
} from "./index-7qefgq4j.js";
|
|
24
27
|
import {
|
|
25
28
|
assertProjectRoot
|
|
26
|
-
} from "./index-
|
|
29
|
+
} from "./index-2czt53wz.js";
|
|
27
30
|
import {
|
|
28
31
|
emit
|
|
29
|
-
} from "./index-
|
|
32
|
+
} from "./index-kvq1e82k.js";
|
|
30
33
|
import {
|
|
31
34
|
require_proper_lockfile
|
|
32
35
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2437,10 +2440,11 @@ async function buildCounterRollupCacheKey(directory) {
|
|
|
2437
2440
|
return `${eventsKey}|${legacyKey}|${baselineKey}`;
|
|
2438
2441
|
}
|
|
2439
2442
|
function setCounterRollupCache(directory, key, rollups) {
|
|
2440
|
-
|
|
2441
|
-
|
|
2443
|
+
const cacheKey = canonicalRootKey(directory);
|
|
2444
|
+
if (counterRollupCache.has(cacheKey)) {
|
|
2445
|
+
counterRollupCache.delete(cacheKey);
|
|
2442
2446
|
}
|
|
2443
|
-
counterRollupCache.set(
|
|
2447
|
+
counterRollupCache.set(cacheKey, {
|
|
2444
2448
|
key,
|
|
2445
2449
|
rollups: cloneRollupMap(rollups)
|
|
2446
2450
|
});
|
|
@@ -2646,10 +2650,11 @@ async function countEntryContradictionsInWindow(directory, entryId, windowDays,
|
|
|
2646
2650
|
async function readKnowledgeCounterRollups(directory) {
|
|
2647
2651
|
try {
|
|
2648
2652
|
const cacheKey = await buildCounterRollupCacheKey(directory);
|
|
2649
|
-
const
|
|
2653
|
+
const directoryKey = canonicalRootKey(directory);
|
|
2654
|
+
const cached = counterRollupCache.get(directoryKey);
|
|
2650
2655
|
if (cached?.key === cacheKey) {
|
|
2651
|
-
counterRollupCache.delete(
|
|
2652
|
-
counterRollupCache.set(
|
|
2656
|
+
counterRollupCache.delete(directoryKey);
|
|
2657
|
+
counterRollupCache.set(directoryKey, cached);
|
|
2653
2658
|
return cloneRollupMap(cached.rollups);
|
|
2654
2659
|
}
|
|
2655
2660
|
const [events, legacyRecords, baseline] = await Promise.all([
|
|
@@ -2810,7 +2815,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2810
2815
|
}
|
|
2811
2816
|
let bumps = 0;
|
|
2812
2817
|
if (deltas.length > 0) {
|
|
2813
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2818
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-45jadhmb.js");
|
|
2814
2819
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2815
2820
|
}
|
|
2816
2821
|
return {
|