opencode-swarm 7.199.0 → 7.199.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{auto-checkpoint-1wf9n5yj.js → auto-checkpoint-x13d1g1t.js} +5 -5
- package/dist/cli/{checkpoint-gw6f4ghv.js → checkpoint-68nb8k3t.js} +9 -9
- package/dist/cli/{coder-settlement-qy77s1x6.js → coder-settlement-kmdmdpyy.js} +4 -4
- package/dist/cli/{config-doctor-2tcp28sc.js → config-doctor-4b0jb15n.js} +8 -8
- package/dist/cli/{core-pz87qafz.js → core-6kkm2vrz.js} +1 -1
- package/dist/cli/{curator-drift-c1x7jdxj.js → curator-drift-axcgdjy4.js} +5 -5
- package/dist/cli/{curator-llm-factory-cg1p6ysr.js → curator-llm-factory-58ec737y.js} +26 -26
- package/dist/cli/{curator-fvnptcnw.js → curator-z8xzxh9f.js} +26 -26
- package/dist/cli/{doctor-knowledge-receipt-phase-id-xwyb5sf8.js → doctor-knowledge-receipt-phase-id-hkjt6hv4.js} +4 -4
- package/dist/cli/{evidence-summary-service-47cptvea.js → evidence-summary-service-981cx8wa.js} +10 -10
- package/dist/cli/{gate-evidence-77bzfckz.js → gate-evidence-zyvwsp7a.js} +2 -2
- package/dist/cli/{guardrail-explain-0ap0a51w.js → guardrail-explain-23b0amne.js} +27 -27
- package/dist/cli/{guardrail-log-xw37f7ws.js → guardrail-log-s2gxszvm.js} +5 -4
- package/dist/cli/{guardrail-reset-3fq8xdjf.js → guardrail-reset-kt18vr45.js} +26 -26
- package/dist/cli/{hive-promoter-bmdgnmnf.js → hive-promoter-fz7ep8h4.js} +26 -26
- package/dist/cli/{index-ckcdheqx.js → index-14vhp87b.js} +2 -2
- package/dist/cli/{index-vbm2ykr9.js → index-3zzxrwaf.js} +1 -1
- package/dist/cli/{index-kxaxf3en.js → index-408tpd21.js} +245 -18
- package/dist/cli/{index-vh87e91s.js → index-4rrff8k6.js} +2 -2
- package/dist/cli/{index-bjzxbxpw.js → index-61fa8hg7.js} +2 -2
- package/dist/cli/{index-2f9tsejp.js → index-61m1jw7p.js} +1 -1
- package/dist/cli/{index-kjhsssaq.js → index-795vmpe6.js} +26 -26
- package/dist/cli/{index-mzsj4kkv.js → index-8pyg2qnw.js} +2 -2
- package/dist/cli/{index-gds6c8qt.js → index-bb2rx8k2.js} +4 -4
- package/dist/cli/{index-1fwm8vqr.js → index-f900029m.js} +4 -4
- package/dist/cli/{index-26h8fb7t.js → index-fmbqyqqw.js} +2 -2
- package/dist/cli/{index-b5k6etf9.js → index-ge7vn1vz.js} +2 -2
- package/dist/cli/{index-awt5dpam.js → index-h349p91m.js} +32 -1
- package/dist/cli/{index-3gwh8c9d.js → index-jhk4000q.js} +1 -1
- package/dist/cli/{index-ye9bze9s.js → index-m4s5a2sp.js} +4 -4
- package/dist/cli/{index-tnrq0pg8.js → index-mzx33w6e.js} +6 -6
- package/dist/cli/{index-mefad009.js → index-n9ry04hw.js} +3 -3
- package/dist/cli/{index-42dtc5nd.js → index-nacmcvc4.js} +3 -3
- package/dist/cli/{index-r52wrpb7.js → index-npy15m50.js} +1 -1
- package/dist/cli/{index-zd15v0gr.js → index-nreezgrd.js} +3 -3
- package/dist/cli/{index-a5xzwxdq.js → index-p35gw2x7.js} +1 -1
- package/dist/cli/{index-79b9re6h.js → index-pf0xrx9w.js} +79 -64
- package/dist/cli/{index-zg5gnn3m.js → index-px1dnna2.js} +1 -1
- package/dist/cli/{index-4hnxtssf.js → index-qqv9rr8k.js} +28 -28
- package/dist/cli/{index-71g0ps66.js → index-r7ayh42s.js} +3 -3
- package/dist/cli/{index-3x07b03s.js → index-t1t93qm0.js} +1 -1
- package/dist/cli/{index-e5ecn73v.js → index-vj0zede7.js} +1 -1
- package/dist/cli/{index-y9ckbta5.js → index-w4624tpw.js} +1 -1
- package/dist/cli/{index-pqrepne6.js → index-w9f2jbwe.js} +1 -1
- package/dist/cli/{index-qdwccqv5.js → index-weewx5nx.js} +1 -1
- package/dist/cli/{index-jjsjjefm.js → index-xj9260dh.js} +6 -6
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-w7b32ak4.js → knowledge-escalator-cf6m9y0s.js} +7 -7
- package/dist/cli/{knowledge-events-y0kb9wbe.js → knowledge-events-hn5hymam.js} +5 -5
- package/dist/cli/{knowledge-store-knrqgmyk.js → knowledge-store-mgqk4hvy.js} +1 -1
- package/dist/cli/{knowledge-validator-zg7d9z8p.js → knowledge-validator-x9yrte9q.js} +2 -2
- package/dist/cli/{mcp-3k1t9q6h.js → mcp-hpmh4d6d.js} +1 -1
- package/dist/cli/{model-preflight-k92fnbq8.js → model-preflight-ry5jjnx4.js} +26 -26
- package/dist/cli/{pending-delegations-ape3hrm0.js → pending-delegations-j850kj5p.js} +2 -2
- package/dist/cli/{pr-subscriptions-cn13b19x.js → pr-subscriptions-mme9gb5e.js} +1 -1
- package/dist/cli/{pr-workflow-gate-74j5mcxh.js → pr-workflow-gate-n6bj3dnn.js} +26 -26
- package/dist/cli/{scan-cursor-4xxfc42h.js → scan-cursor-fdpxbx4f.js} +2 -2
- package/dist/cli/{schema-qv9bvhyz.js → schema-amcjvk8a.js} +1 -1
- package/dist/cli/{scope-persistence-fmva1cv0.js → scope-persistence-mp4kqpk2.js} +6 -6
- package/dist/cli/{server-s5ac6ydk.js → server-ptdvpwyd.js} +26 -26
- package/dist/cli/{skill-generator-19ckpm74.js → skill-generator-v59hhybn.js} +8 -8
- package/dist/cli/{snapshot-coordination-init-7c0s65jw.js → snapshot-coordination-init-nv6e4svp.js} +26 -26
- package/dist/cli/{speckit-checkoff-9b2zj8hd.js → speckit-checkoff-me8kd3wd.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-3r669yvh.js → worktree-collision-ownership-84qyqars.js} +2 -2
- package/dist/cli/{worktree-isolation-5dydsr8c.js → worktree-isolation-99qvz8ap.js} +26 -26
- package/dist/hooks/guardrails/file-authority.d.ts +17 -0
- package/dist/index.js +84 -83
- package/package.json +1 -1
|
@@ -3,51 +3,51 @@ import {
|
|
|
3
3
|
getAgentSession,
|
|
4
4
|
getBlockingActionCircuit,
|
|
5
5
|
resetActionCircuitExternally
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
6
|
+
} from "./index-pf0xrx9w.js";
|
|
7
|
+
import"./index-408tpd21.js";
|
|
8
|
+
import"./index-nacmcvc4.js";
|
|
9
|
+
import"./index-px1dnna2.js";
|
|
10
10
|
import"./index-j2vv0h13.js";
|
|
11
11
|
import"./index-jccs3fgn.js";
|
|
12
12
|
import"./index-7c432abn.js";
|
|
13
13
|
import"./index-txdagbh7.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-w4624tpw.js";
|
|
15
15
|
import"./index-rdec0y3z.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
16
|
+
import"./index-npy15m50.js";
|
|
17
|
+
import"./index-m4s5a2sp.js";
|
|
18
|
+
import"./index-n9ry04hw.js";
|
|
19
|
+
import"./index-xj9260dh.js";
|
|
20
20
|
import"./index-9ztsfved.js";
|
|
21
21
|
import"./index-bkscmz4z.js";
|
|
22
22
|
import"./index-cjapb4hy.js";
|
|
23
23
|
import"./index-pxdc0qn1.js";
|
|
24
24
|
import"./index-pt7h91zc.js";
|
|
25
25
|
import"./index-q7sjgr1y.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-bb2rx8k2.js";
|
|
27
|
+
import"./index-mzx33w6e.js";
|
|
28
28
|
import"./index-6b295cas.js";
|
|
29
29
|
import"./index-9nyqt3kb.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-nreezgrd.js";
|
|
31
31
|
import"./index-v3bmwmqw.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
32
|
+
import"./index-w9f2jbwe.js";
|
|
33
|
+
import"./index-3zzxrwaf.js";
|
|
34
|
+
import"./index-61m1jw7p.js";
|
|
35
35
|
import"./index-g4fs6z4e.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
import"./index-jhk4000q.js";
|
|
37
|
+
import"./index-8pyg2qnw.js";
|
|
38
|
+
import"./index-61fa8hg7.js";
|
|
39
39
|
import"./index-m9zzj4ee.js";
|
|
40
40
|
import"./index-820pzqd6.js";
|
|
41
41
|
import"./index-2s7dvzff.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-vj0zede7.js";
|
|
43
43
|
import"./index-2mx2gn97.js";
|
|
44
44
|
import"./index-rtry5xyf.js";
|
|
45
|
-
import"./index-
|
|
45
|
+
import"./index-4rrff8k6.js";
|
|
46
46
|
import"./index-g22dps7x.js";
|
|
47
47
|
import"./index-0725jpp7.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
48
|
+
import"./index-ge7vn1vz.js";
|
|
49
|
+
import"./index-fmbqyqqw.js";
|
|
50
|
+
import"./index-h349p91m.js";
|
|
51
51
|
import"./index-p5pgjp7n.js";
|
|
52
52
|
import"./index-nr1pj3hy.js";
|
|
53
53
|
import"./index-w00dj8p5.js";
|
|
@@ -55,7 +55,7 @@ import"./index-ry16d01s.js";
|
|
|
55
55
|
import"./index-rdm3px0g.js";
|
|
56
56
|
import"./index-7pmbnjvj.js";
|
|
57
57
|
import"./index-hc6wa3yg.js";
|
|
58
|
-
import"./index-
|
|
58
|
+
import"./index-f900029m.js";
|
|
59
59
|
import"./index-vzm6zre7.js";
|
|
60
60
|
import"./index-ae75rja9.js";
|
|
61
61
|
import"./index-2bc7zfw3.js";
|
|
@@ -68,9 +68,9 @@ import"./index-ejhxgyvm.js";
|
|
|
68
68
|
import"./index-7g4c7s5r.js";
|
|
69
69
|
import"./index-ywb5er8g.js";
|
|
70
70
|
import"./index-gx2vp8gx.js";
|
|
71
|
-
import"./index-
|
|
71
|
+
import"./index-weewx5nx.js";
|
|
72
72
|
import"./index-zxdawwc7.js";
|
|
73
|
-
import"./index-
|
|
73
|
+
import"./index-t1t93qm0.js";
|
|
74
74
|
import"./index-hqrkr9ag.js";
|
|
75
75
|
import"./index-bk5tah7q.js";
|
|
76
76
|
import"./index-gknz3bv1.js";
|
|
@@ -7,51 +7,51 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
} from "./index-pf0xrx9w.js";
|
|
11
|
+
import"./index-408tpd21.js";
|
|
12
|
+
import"./index-nacmcvc4.js";
|
|
13
|
+
import"./index-px1dnna2.js";
|
|
14
14
|
import"./index-j2vv0h13.js";
|
|
15
15
|
import"./index-jccs3fgn.js";
|
|
16
16
|
import"./index-7c432abn.js";
|
|
17
17
|
import"./index-txdagbh7.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-w4624tpw.js";
|
|
19
19
|
import"./index-rdec0y3z.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
20
|
+
import"./index-npy15m50.js";
|
|
21
|
+
import"./index-m4s5a2sp.js";
|
|
22
|
+
import"./index-n9ry04hw.js";
|
|
23
|
+
import"./index-xj9260dh.js";
|
|
24
24
|
import"./index-9ztsfved.js";
|
|
25
25
|
import"./index-bkscmz4z.js";
|
|
26
26
|
import"./index-cjapb4hy.js";
|
|
27
27
|
import"./index-pxdc0qn1.js";
|
|
28
28
|
import"./index-pt7h91zc.js";
|
|
29
29
|
import"./index-q7sjgr1y.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-bb2rx8k2.js";
|
|
31
|
+
import"./index-mzx33w6e.js";
|
|
32
32
|
import"./index-6b295cas.js";
|
|
33
33
|
import"./index-9nyqt3kb.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-nreezgrd.js";
|
|
35
35
|
import"./index-v3bmwmqw.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
import"./index-w9f2jbwe.js";
|
|
37
|
+
import"./index-3zzxrwaf.js";
|
|
38
|
+
import"./index-61m1jw7p.js";
|
|
39
39
|
import"./index-g4fs6z4e.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
40
|
+
import"./index-jhk4000q.js";
|
|
41
|
+
import"./index-8pyg2qnw.js";
|
|
42
|
+
import"./index-61fa8hg7.js";
|
|
43
43
|
import"./index-m9zzj4ee.js";
|
|
44
44
|
import"./index-820pzqd6.js";
|
|
45
45
|
import"./index-2s7dvzff.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-vj0zede7.js";
|
|
47
47
|
import"./index-2mx2gn97.js";
|
|
48
48
|
import"./index-rtry5xyf.js";
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-4rrff8k6.js";
|
|
50
50
|
import"./index-g22dps7x.js";
|
|
51
51
|
import"./index-0725jpp7.js";
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
52
|
+
import"./index-ge7vn1vz.js";
|
|
53
|
+
import"./index-fmbqyqqw.js";
|
|
54
|
+
import"./index-h349p91m.js";
|
|
55
55
|
import"./index-p5pgjp7n.js";
|
|
56
56
|
import"./index-nr1pj3hy.js";
|
|
57
57
|
import"./index-w00dj8p5.js";
|
|
@@ -61,7 +61,7 @@ import"./index-7pmbnjvj.js";
|
|
|
61
61
|
import"./index-hc6wa3yg.js";
|
|
62
62
|
import {
|
|
63
63
|
resolveHiveKnowledgePath
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-f900029m.js";
|
|
65
65
|
import"./index-vzm6zre7.js";
|
|
66
66
|
import"./index-ae75rja9.js";
|
|
67
67
|
import"./index-2bc7zfw3.js";
|
|
@@ -74,9 +74,9 @@ import"./index-ejhxgyvm.js";
|
|
|
74
74
|
import"./index-7g4c7s5r.js";
|
|
75
75
|
import"./index-ywb5er8g.js";
|
|
76
76
|
import"./index-gx2vp8gx.js";
|
|
77
|
-
import"./index-
|
|
77
|
+
import"./index-weewx5nx.js";
|
|
78
78
|
import"./index-zxdawwc7.js";
|
|
79
|
-
import"./index-
|
|
79
|
+
import"./index-t1t93qm0.js";
|
|
80
80
|
import"./index-hqrkr9ag.js";
|
|
81
81
|
import"./index-bk5tah7q.js";
|
|
82
82
|
import"./index-gknz3bv1.js";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
mergeWriteAnalyses,
|
|
20
20
|
resolveWindowsWriteAuthority,
|
|
21
21
|
resolveWriteTargets
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-pf0xrx9w.js";
|
|
23
23
|
import {
|
|
24
24
|
checkFileAuthority,
|
|
25
25
|
classifyFile,
|
|
26
26
|
isInDeclaredScope,
|
|
27
27
|
redactPath,
|
|
28
28
|
redactShellCommand
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-408tpd21.js";
|
|
30
30
|
|
|
31
31
|
// src/services/guardrail-explain-service.ts
|
|
32
32
|
import path from "path";
|
|
@@ -5,10 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
telemetry
|
|
7
7
|
} from "./index-6dtt0brw.js";
|
|
8
|
+
import {
|
|
9
|
+
init_git_executable,
|
|
10
|
+
resolveGitExecutable
|
|
11
|
+
} from "./index-zxdawwc7.js";
|
|
8
12
|
import {
|
|
9
13
|
init_schema,
|
|
10
14
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
15
|
+
} from "./index-t1t93qm0.js";
|
|
12
16
|
import {
|
|
13
17
|
init_constants
|
|
14
18
|
} from "./index-hqrkr9ag.js";
|
|
@@ -1806,6 +1810,7 @@ function stableCanonicalStringify(value) {
|
|
|
1806
1810
|
}
|
|
1807
1811
|
|
|
1808
1812
|
// src/hooks/guardrails/file-authority.ts
|
|
1813
|
+
import { execFileSync } from "child_process";
|
|
1809
1814
|
import * as fsSync from "fs";
|
|
1810
1815
|
var import_picomatch = __toESM(require_picomatch2(), 1);
|
|
1811
1816
|
import * as path2 from "path";
|
|
@@ -2148,12 +2153,166 @@ function protectedRoots(projectRoot, additional = []) {
|
|
|
2148
2153
|
var HASH_INPUT_CAP_BYTES = 64 * 1024;
|
|
2149
2154
|
|
|
2150
2155
|
// src/hooks/guardrails/file-authority.ts
|
|
2156
|
+
init_git_executable();
|
|
2151
2157
|
var pathNormalizationCache = new QuickLRU({
|
|
2152
2158
|
maxSize: 500
|
|
2153
2159
|
});
|
|
2154
2160
|
var globMatcherCache = new QuickLRU({
|
|
2155
2161
|
maxSize: 200
|
|
2156
2162
|
});
|
|
2163
|
+
var GIT_WORKTREE_CACHE_MAX_AGE_MS = 60000;
|
|
2164
|
+
var gitWorktreeCache = new QuickLRU({
|
|
2165
|
+
maxSize: 50,
|
|
2166
|
+
maxAge: GIT_WORKTREE_CACHE_MAX_AGE_MS
|
|
2167
|
+
});
|
|
2168
|
+
function gitEnvWithoutRepoRedirectors() {
|
|
2169
|
+
const env = { ...process.env };
|
|
2170
|
+
delete env.GIT_DIR;
|
|
2171
|
+
delete env.GIT_WORK_TREE;
|
|
2172
|
+
delete env.GIT_INDEX_FILE;
|
|
2173
|
+
delete env.GIT_COMMON_DIR;
|
|
2174
|
+
return env;
|
|
2175
|
+
}
|
|
2176
|
+
function parseWorktreeListPorcelain(output) {
|
|
2177
|
+
const records = [];
|
|
2178
|
+
for (const line of output.split(`
|
|
2179
|
+
`)) {
|
|
2180
|
+
if (line.startsWith("worktree ")) {
|
|
2181
|
+
const wtPath = line.slice("worktree ".length).trim();
|
|
2182
|
+
if (wtPath) {
|
|
2183
|
+
records.push({ path: wtPath, attributes: new Set });
|
|
2184
|
+
}
|
|
2185
|
+
continue;
|
|
2186
|
+
}
|
|
2187
|
+
const record = records[records.length - 1];
|
|
2188
|
+
if (!record)
|
|
2189
|
+
continue;
|
|
2190
|
+
const separator = line.indexOf(" ");
|
|
2191
|
+
const attribute = separator === -1 ? line : line.slice(0, separator);
|
|
2192
|
+
if (attribute)
|
|
2193
|
+
record.attributes.add(attribute);
|
|
2194
|
+
}
|
|
2195
|
+
return records;
|
|
2196
|
+
}
|
|
2197
|
+
function canonicalizeWindowsPathNative(p) {
|
|
2198
|
+
if (process.platform !== "win32")
|
|
2199
|
+
return p;
|
|
2200
|
+
try {
|
|
2201
|
+
const native = fsSync.realpathSync.native(p);
|
|
2202
|
+
return native.startsWith(String.fromCharCode(92, 92, 63, 92)) ? native.slice(4) : native;
|
|
2203
|
+
} catch {
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
function canonicalizeWindowsPathTailTolerant(p) {
|
|
2208
|
+
if (process.platform !== "win32")
|
|
2209
|
+
return p;
|
|
2210
|
+
const tail = [];
|
|
2211
|
+
let probe = p;
|
|
2212
|
+
for (;; ) {
|
|
2213
|
+
const native = canonicalizeWindowsPathNative(probe);
|
|
2214
|
+
if (native !== undefined) {
|
|
2215
|
+
return tail.length === 0 ? native : path2.join(native, ...tail.reverse());
|
|
2216
|
+
}
|
|
2217
|
+
const parent = path2.dirname(probe);
|
|
2218
|
+
if (parent === probe)
|
|
2219
|
+
return p;
|
|
2220
|
+
tail.push(path2.basename(probe));
|
|
2221
|
+
probe = parent;
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
function isValidWorktreeRecord(repoRootRecord, record) {
|
|
2225
|
+
if (record === repoRootRecord) {
|
|
2226
|
+
try {
|
|
2227
|
+
return fsSync.statSync(path2.join(record.path, ".git")).isDirectory();
|
|
2228
|
+
} catch {
|
|
2229
|
+
return false;
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
if (record.attributes.has("bare"))
|
|
2233
|
+
return false;
|
|
2234
|
+
const dotGitPath = path2.join(record.path, ".git");
|
|
2235
|
+
let dotGitStat;
|
|
2236
|
+
try {
|
|
2237
|
+
dotGitStat = fsSync.lstatSync(dotGitPath);
|
|
2238
|
+
} catch {
|
|
2239
|
+
return false;
|
|
2240
|
+
}
|
|
2241
|
+
if (!dotGitStat.isFile())
|
|
2242
|
+
return false;
|
|
2243
|
+
let gitDirLine;
|
|
2244
|
+
try {
|
|
2245
|
+
gitDirLine = fsSync.readFileSync(dotGitPath, "utf8").trim();
|
|
2246
|
+
} catch {
|
|
2247
|
+
return false;
|
|
2248
|
+
}
|
|
2249
|
+
if (!gitDirLine.startsWith("gitdir:"))
|
|
2250
|
+
return false;
|
|
2251
|
+
const gitDirRef = gitDirLine.slice("gitdir:".length).trim();
|
|
2252
|
+
if (!gitDirRef)
|
|
2253
|
+
return false;
|
|
2254
|
+
const gitDirPath = path2.isAbsolute(gitDirRef) ? gitDirRef : path2.resolve(record.path, gitDirRef);
|
|
2255
|
+
let registrationGitdirFile;
|
|
2256
|
+
try {
|
|
2257
|
+
registrationGitdirFile = fsSync.realpathSync(path2.join(gitDirPath, "gitdir"));
|
|
2258
|
+
} catch {
|
|
2259
|
+
return false;
|
|
2260
|
+
}
|
|
2261
|
+
if (repoRootRecord) {
|
|
2262
|
+
let worktreesRoot;
|
|
2263
|
+
try {
|
|
2264
|
+
worktreesRoot = path2.join(fsSync.realpathSync(path2.join(repoRootRecord.path, ".git")), "worktrees");
|
|
2265
|
+
} catch {
|
|
2266
|
+
return false;
|
|
2267
|
+
}
|
|
2268
|
+
if (!isPathIdentityWithin(registrationGitdirFile, worktreesRoot)) {
|
|
2269
|
+
return false;
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
let backReference;
|
|
2273
|
+
try {
|
|
2274
|
+
backReference = fsSync.readFileSync(registrationGitdirFile, "utf8").trim();
|
|
2275
|
+
} catch {
|
|
2276
|
+
return false;
|
|
2277
|
+
}
|
|
2278
|
+
try {
|
|
2279
|
+
return pathIdentitiesEqual(fsSync.realpathSync(dotGitPath), fsSync.realpathSync(backReference));
|
|
2280
|
+
} catch {
|
|
2281
|
+
return false;
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
function getLinkedGitWorktrees(dir) {
|
|
2285
|
+
const cached = gitWorktreeCache.get(dir);
|
|
2286
|
+
if (cached !== undefined) {
|
|
2287
|
+
return cached;
|
|
2288
|
+
}
|
|
2289
|
+
const worktrees = [];
|
|
2290
|
+
try {
|
|
2291
|
+
const output = execFileSync(resolveGitExecutable(), ["worktree", "list", "--porcelain"], {
|
|
2292
|
+
cwd: dir,
|
|
2293
|
+
encoding: "utf8",
|
|
2294
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
2295
|
+
timeout: 1500,
|
|
2296
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
2297
|
+
windowsHide: true,
|
|
2298
|
+
env: gitEnvWithoutRepoRedirectors()
|
|
2299
|
+
});
|
|
2300
|
+
const records = parseWorktreeListPorcelain(output);
|
|
2301
|
+
const repoRootRecord = records[0];
|
|
2302
|
+
for (const record of records) {
|
|
2303
|
+
if (!isValidWorktreeRecord(repoRootRecord, record)) {
|
|
2304
|
+
continue;
|
|
2305
|
+
}
|
|
2306
|
+
const native = canonicalizeWindowsPathNative(record.path);
|
|
2307
|
+
if (native === undefined) {
|
|
2308
|
+
continue;
|
|
2309
|
+
}
|
|
2310
|
+
worktrees.push(native);
|
|
2311
|
+
}
|
|
2312
|
+
} catch {}
|
|
2313
|
+
gitWorktreeCache.set(dir, worktrees);
|
|
2314
|
+
return worktrees;
|
|
2315
|
+
}
|
|
2157
2316
|
function normalizePathWithCache(filePath, cwd) {
|
|
2158
2317
|
const cacheKey = `${cwd}:${filePath}`;
|
|
2159
2318
|
const cached = pathNormalizationCache.get(cacheKey);
|
|
@@ -2468,21 +2627,89 @@ function checkFileAuthorityWithRules(agentName, filePath, cwd, effectiveRules, o
|
|
|
2468
2627
|
resolvedTarget = path2.resolve(dir, filePath);
|
|
2469
2628
|
normalizedPath = path2.relative(dir, resolvedTarget).replace(/\\/g, "/");
|
|
2470
2629
|
}
|
|
2630
|
+
let effectiveDir = dir;
|
|
2631
|
+
const nativeTarget2 = canonicalizeWindowsPathTailTolerant(resolvedTarget);
|
|
2632
|
+
const matchWorktreeRoot = () => {
|
|
2633
|
+
const worktrees = getLinkedGitWorktrees(dir);
|
|
2634
|
+
let best;
|
|
2635
|
+
for (const wt of worktrees) {
|
|
2636
|
+
const relToWt = path2.relative(wt, nativeTarget2).replace(/\\/g, "/");
|
|
2637
|
+
if (relToWt !== ".." && !relToWt.startsWith("../") && !isOnDifferentFilesystemRoot(nativeTarget2, wt)) {
|
|
2638
|
+
if (!best || wt.length > best.wt.length) {
|
|
2639
|
+
best = { wt, rel: relToWt };
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
if (best) {
|
|
2644
|
+
effectiveDir = best.wt;
|
|
2645
|
+
normalizedPath = best.rel;
|
|
2646
|
+
}
|
|
2647
|
+
return best?.wt;
|
|
2648
|
+
};
|
|
2649
|
+
const findPlantedLinkBelow = (root) => {
|
|
2650
|
+
const ancestors = [];
|
|
2651
|
+
let current = nativeTarget2;
|
|
2652
|
+
while (true) {
|
|
2653
|
+
const rel = path2.relative(root, current);
|
|
2654
|
+
if (rel === "" || rel === ".." || rel.startsWith(`..${path2.sep}`) || path2.isAbsolute(rel))
|
|
2655
|
+
break;
|
|
2656
|
+
ancestors.push(current);
|
|
2657
|
+
const parent = path2.dirname(current);
|
|
2658
|
+
if (parent === current)
|
|
2659
|
+
break;
|
|
2660
|
+
current = parent;
|
|
2661
|
+
}
|
|
2662
|
+
for (const ancestor of ancestors) {
|
|
2663
|
+
try {
|
|
2664
|
+
if (fsSync.lstatSync(ancestor).isSymbolicLink())
|
|
2665
|
+
return ancestor;
|
|
2666
|
+
} catch (err) {
|
|
2667
|
+
const code = err.code;
|
|
2668
|
+
if (code === "ENOENT")
|
|
2669
|
+
continue;
|
|
2670
|
+
return ancestor;
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
return null;
|
|
2674
|
+
};
|
|
2471
2675
|
if (isOnDifferentFilesystemRoot(resolvedTarget, dir)) {
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2676
|
+
const matchedWorktree = matchWorktreeRoot();
|
|
2677
|
+
if (!matchedWorktree) {
|
|
2678
|
+
return denyAuthority(agentName, normalizedPath, {
|
|
2679
|
+
code: "AUTHORITY_ROOT_ESCAPE",
|
|
2680
|
+
layer: "containment",
|
|
2681
|
+
rule: "same-filesystem-root",
|
|
2682
|
+
detail: "target is on a different drive or filesystem root"
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
const plantedLink = findPlantedLinkBelow(matchedWorktree);
|
|
2686
|
+
if (plantedLink) {
|
|
2687
|
+
return denyAuthority(agentName, normalizedPath, {
|
|
2688
|
+
code: "AUTHORITY_ROOT_ESCAPE",
|
|
2689
|
+
layer: "containment",
|
|
2690
|
+
rule: "workspace-containment",
|
|
2691
|
+
detail: `re-rooted target crosses symlink/junction "${plantedLink}" inside the matched worktree`
|
|
2692
|
+
});
|
|
2693
|
+
}
|
|
2694
|
+
} else if (normalizedPath === ".." || normalizedPath.startsWith("../")) {
|
|
2695
|
+
const matchedWorktree = matchWorktreeRoot();
|
|
2696
|
+
if (!matchedWorktree) {
|
|
2697
|
+
return denyAuthority(agentName, normalizedPath, {
|
|
2698
|
+
code: "AUTHORITY_ROOT_ESCAPE",
|
|
2699
|
+
layer: "containment",
|
|
2700
|
+
rule: "workspace-containment",
|
|
2701
|
+
detail: "target resolves outside the working directory"
|
|
2702
|
+
});
|
|
2703
|
+
}
|
|
2704
|
+
const plantedLink = findPlantedLinkBelow(matchedWorktree);
|
|
2705
|
+
if (plantedLink) {
|
|
2706
|
+
return denyAuthority(agentName, normalizedPath, {
|
|
2707
|
+
code: "AUTHORITY_ROOT_ESCAPE",
|
|
2708
|
+
layer: "containment",
|
|
2709
|
+
rule: "workspace-containment",
|
|
2710
|
+
detail: `re-rooted target crosses symlink/junction "${plantedLink}" inside the matched worktree`
|
|
2711
|
+
});
|
|
2712
|
+
}
|
|
2486
2713
|
}
|
|
2487
2714
|
const classifiedRules = effectiveRules[normalizedAgent] ?? effectiveRules[strippedAgent];
|
|
2488
2715
|
const unclassifiedWhileDisabled = !classifiedRules && options.authorityEnabled === false && normalizedAgent !== "unknown";
|
|
@@ -2496,10 +2723,10 @@ function checkFileAuthorityWithRules(agentName, filePath, cwd, effectiveRules, o
|
|
|
2496
2723
|
});
|
|
2497
2724
|
}
|
|
2498
2725
|
const flavor = getPathFlavor();
|
|
2499
|
-
const matchesPathPrefix = (candidate, prefix) => isPathIdentityWithin(path2.resolve(
|
|
2726
|
+
const matchesPathPrefix = (candidate, prefix) => isPathIdentityWithin(path2.resolve(effectiveDir, candidate), path2.resolve(effectiveDir, prefix), flavor);
|
|
2500
2727
|
const matchesGlob = (glob) => getGlobMatcher(glob)(normalizedPath);
|
|
2501
2728
|
for (const prefix of options.universalDenyPrefixes ?? []) {
|
|
2502
|
-
if (matchesAuthorityDenyPrefix(normalizedPath, prefix,
|
|
2729
|
+
if (matchesAuthorityDenyPrefix(normalizedPath, prefix, effectiveDir, flavor)) {
|
|
2503
2730
|
return denyAuthority(agentName, normalizedPath, {
|
|
2504
2731
|
code: "AUTHORITY_UNIVERSAL_DENY",
|
|
2505
2732
|
layer: "universal-deny",
|
|
@@ -2563,7 +2790,7 @@ function checkFileAuthorityWithRules(agentName, filePath, cwd, effectiveRules, o
|
|
|
2563
2790
|
detail: "agent role is read-only"
|
|
2564
2791
|
});
|
|
2565
2792
|
}
|
|
2566
|
-
const pathIsInDeclaredScope = isCoderAgent && options.declaredScope != null && options.declaredScope.length > 0 && isPathWithinDeclaredScope(normalizedPath, options.declaredScope,
|
|
2793
|
+
const pathIsInDeclaredScope = isCoderAgent && options.declaredScope != null && options.declaredScope.length > 0 && isPathWithinDeclaredScope(normalizedPath, options.declaredScope, effectiveDir);
|
|
2567
2794
|
if (pathIsInDeclaredScope) {
|
|
2568
2795
|
return {
|
|
2569
2796
|
allowed: true,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-weewx5nx.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-t1t93qm0.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
} from "./index-gx2vp8gx.js";
|
|
20
20
|
import {
|
|
21
21
|
loadPluginConfigWithMeta
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-weewx5nx.js";
|
|
23
23
|
import {
|
|
24
24
|
KnowledgeConfigSchema,
|
|
25
25
|
init_schema
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-t1t93qm0.js";
|
|
27
27
|
|
|
28
28
|
// src/utils/context-decisions.ts
|
|
29
29
|
function extractContextDecisions(content) {
|
|
@@ -242,7 +242,7 @@ var _internals2 = {
|
|
|
242
242
|
symlinkSync: fs2.symlinkSync
|
|
243
243
|
},
|
|
244
244
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
245
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
245
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-mp4kqpk2.js");
|
|
246
246
|
return realWrite(directory, taskId, files);
|
|
247
247
|
},
|
|
248
248
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -23,53 +23,53 @@ import {
|
|
|
23
23
|
resolveFallbackModel,
|
|
24
24
|
resolvePrimaryAgentNames,
|
|
25
25
|
stripSwarmPrefix
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
26
|
+
} from "./index-pf0xrx9w.js";
|
|
27
|
+
import"./index-408tpd21.js";
|
|
28
|
+
import"./index-nacmcvc4.js";
|
|
29
|
+
import"./index-px1dnna2.js";
|
|
30
30
|
import"./index-j2vv0h13.js";
|
|
31
31
|
import"./index-jccs3fgn.js";
|
|
32
32
|
import"./index-7c432abn.js";
|
|
33
33
|
import"./index-txdagbh7.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-w4624tpw.js";
|
|
35
35
|
import {
|
|
36
36
|
createExplorerAgent
|
|
37
37
|
} from "./index-rdec0y3z.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
38
|
+
import"./index-npy15m50.js";
|
|
39
|
+
import"./index-m4s5a2sp.js";
|
|
40
|
+
import"./index-n9ry04hw.js";
|
|
41
|
+
import"./index-xj9260dh.js";
|
|
42
42
|
import"./index-9ztsfved.js";
|
|
43
43
|
import"./index-bkscmz4z.js";
|
|
44
44
|
import"./index-cjapb4hy.js";
|
|
45
45
|
import"./index-pxdc0qn1.js";
|
|
46
46
|
import"./index-pt7h91zc.js";
|
|
47
47
|
import"./index-q7sjgr1y.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
48
|
+
import"./index-bb2rx8k2.js";
|
|
49
|
+
import"./index-mzx33w6e.js";
|
|
50
50
|
import"./index-6b295cas.js";
|
|
51
51
|
import"./index-9nyqt3kb.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-nreezgrd.js";
|
|
53
53
|
import"./index-v3bmwmqw.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
54
|
+
import"./index-w9f2jbwe.js";
|
|
55
|
+
import"./index-3zzxrwaf.js";
|
|
56
|
+
import"./index-61m1jw7p.js";
|
|
57
57
|
import"./index-g4fs6z4e.js";
|
|
58
|
-
import"./index-
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
58
|
+
import"./index-jhk4000q.js";
|
|
59
|
+
import"./index-8pyg2qnw.js";
|
|
60
|
+
import"./index-61fa8hg7.js";
|
|
61
61
|
import"./index-m9zzj4ee.js";
|
|
62
62
|
import"./index-820pzqd6.js";
|
|
63
63
|
import"./index-2s7dvzff.js";
|
|
64
|
-
import"./index-
|
|
64
|
+
import"./index-vj0zede7.js";
|
|
65
65
|
import"./index-2mx2gn97.js";
|
|
66
66
|
import"./index-rtry5xyf.js";
|
|
67
|
-
import"./index-
|
|
67
|
+
import"./index-4rrff8k6.js";
|
|
68
68
|
import"./index-g22dps7x.js";
|
|
69
69
|
import"./index-0725jpp7.js";
|
|
70
|
-
import"./index-
|
|
71
|
-
import"./index-
|
|
72
|
-
import"./index-
|
|
70
|
+
import"./index-ge7vn1vz.js";
|
|
71
|
+
import"./index-fmbqyqqw.js";
|
|
72
|
+
import"./index-h349p91m.js";
|
|
73
73
|
import"./index-p5pgjp7n.js";
|
|
74
74
|
import"./index-nr1pj3hy.js";
|
|
75
75
|
import"./index-w00dj8p5.js";
|
|
@@ -77,7 +77,7 @@ import"./index-ry16d01s.js";
|
|
|
77
77
|
import"./index-rdm3px0g.js";
|
|
78
78
|
import"./index-7pmbnjvj.js";
|
|
79
79
|
import"./index-hc6wa3yg.js";
|
|
80
|
-
import"./index-
|
|
80
|
+
import"./index-f900029m.js";
|
|
81
81
|
import"./index-vzm6zre7.js";
|
|
82
82
|
import"./index-ae75rja9.js";
|
|
83
83
|
import"./index-2bc7zfw3.js";
|
|
@@ -90,9 +90,9 @@ import"./index-ejhxgyvm.js";
|
|
|
90
90
|
import"./index-7g4c7s5r.js";
|
|
91
91
|
import"./index-ywb5er8g.js";
|
|
92
92
|
import"./index-gx2vp8gx.js";
|
|
93
|
-
import"./index-
|
|
93
|
+
import"./index-weewx5nx.js";
|
|
94
94
|
import"./index-zxdawwc7.js";
|
|
95
|
-
import"./index-
|
|
95
|
+
import"./index-t1t93qm0.js";
|
|
96
96
|
import"./index-hqrkr9ag.js";
|
|
97
97
|
import"./index-bk5tah7q.js";
|
|
98
98
|
import"./index-gknz3bv1.js";
|