opencode-swarm 7.200.10 → 7.200.12
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/{attest-task-yx2t832n.js → attest-task-0h9adt4t.js} +26 -26
- package/dist/cli/{auto-checkpoint-15mvj9zm.js → auto-checkpoint-f7pcj09v.js} +4 -4
- package/dist/cli/{checkpoint-65whgvwa.js → checkpoint-5j4dqdd1.js} +8 -8
- package/dist/cli/{coder-settlement-sdg1he8p.js → coder-settlement-n69ee5jz.js} +4 -4
- package/dist/cli/{config-doctor-4af2p2y4.js → config-doctor-q23166e4.js} +7 -7
- package/dist/cli/{core-8swqc6kw.js → core-2th9bfmx.js} +1 -1
- package/dist/cli/{curator-drift-ktf137da.js → curator-drift-b4rcjh23.js} +5 -5
- package/dist/cli/{curator-6ze04fz3.js → curator-dsf0966y.js} +26 -26
- package/dist/cli/{curator-llm-factory-7vq4rgg7.js → curator-llm-factory-3b7b55k6.js} +26 -26
- package/dist/cli/{doctor-knowledge-receipt-phase-id-0smwq3ar.js → doctor-knowledge-receipt-phase-id-4npan6z7.js} +4 -4
- package/dist/cli/{evidence-summary-service-3bhq2gef.js → evidence-summary-service-evv73ay3.js} +10 -10
- package/dist/cli/{gate-evidence-gcv0xgfc.js → gate-evidence-vz9gjwkz.js} +3 -3
- package/dist/cli/{guardrail-explain-9t3mvm92.js → guardrail-explain-jvvk0at1.js} +27 -27
- package/dist/cli/{guardrail-log-ehgpan5n.js → guardrail-log-b81vyjvz.js} +3 -3
- package/dist/cli/{guardrail-reset-q7m265wy.js → guardrail-reset-ygq8e117.js} +26 -26
- package/dist/cli/{hive-promoter-857ranjf.js → hive-promoter-73e5qa2r.js} +26 -26
- package/dist/cli/{index-vajbtn3v.js → index-0cqr8afr.js} +4 -4
- package/dist/cli/{index-zmp1k0mb.js → index-0kgqjaaj.js} +35 -22
- package/dist/cli/{index-fbn2mv67.js → index-1egy4f76.js} +76 -31
- package/dist/cli/{index-xkavxqf2.js → index-213w5jn9.js} +1 -1
- package/dist/cli/{index-rnm6c33a.js → index-2ftz9m3d.js} +1 -1
- package/dist/cli/{index-r3wyt8za.js → index-2pvmk43k.js} +1 -1
- package/dist/cli/{index-bt3pxs7r.js → index-2w17wxc1.js} +1 -1
- package/dist/cli/{index-mamw83wm.js → index-5e5s7p5z.js} +26 -26
- package/dist/cli/{index-h9qhy8r6.js → index-5ecsb26p.js} +6 -6
- package/dist/cli/{index-tm6nwe43.js → index-5t3p0nd1.js} +5 -5
- package/dist/cli/{index-3h5ztpn5.js → index-60yd5f2p.js} +2 -2
- package/dist/cli/{index-ev46f132.js → index-9dtd681s.js} +1 -1
- package/dist/cli/{index-06sj5bjh.js → index-9t4gxpt5.js} +1 -1
- package/dist/cli/{index-c34tgnwm.js → index-bxsbm6xx.js} +3 -3
- package/dist/cli/{index-mx34b7bm.js → index-cy2zmsa0.js} +28 -28
- package/dist/cli/{index-vqknke9n.js → index-dfgqg3qd.js} +5 -5
- package/dist/cli/{index-ffm3d4cn.js → index-fe3dtakd.js} +3 -3
- package/dist/cli/{index-60m7qnds.js → index-fk1w7r9k.js} +3 -3
- package/dist/cli/{index-kxxy7zq4.js → index-gkaj31rk.js} +3 -3
- package/dist/cli/{index-gsnj3a0h.js → index-gvzf86kf.js} +2 -2
- package/dist/cli/{index-ww5ne0g6.js → index-jkj598w8.js} +1 -1
- package/dist/cli/{index-nv8tx9v4.js → index-n425a88g.js} +1 -1
- package/dist/cli/{index-66b4f2qd.js → index-n9mb83fx.js} +3 -3
- package/dist/cli/{index-4dvqvn4k.js → index-phm7gmpq.js} +179 -75
- package/dist/cli/{index-ywwazz81.js → index-sfd8kb4k.js} +1 -1
- package/dist/cli/{index-2dey2mtg.js → index-td0bfecx.js} +3 -3
- package/dist/cli/{index-6e7jxxys.js → index-vzd1w4ra.js} +2 -2
- package/dist/cli/{index-6ehx0pj4.js → index-wfx209wp.js} +2 -2
- package/dist/cli/{index-vm3j8fvn.js → index-xdyqfp37.js} +2 -2
- package/dist/cli/{index-43zgg04r.js → index-z0jf1tyr.js} +1 -1
- package/dist/cli/{index-8c6zshfj.js → index-zs5vymnk.js} +1 -1
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-6p7m6gkc.js → knowledge-escalator-et068ebg.js} +7 -7
- package/dist/cli/{knowledge-events-w3ep12sq.js → knowledge-events-2ha1zsv5.js} +5 -5
- package/dist/cli/{knowledge-store-g4cpw0hz.js → knowledge-store-bpchbre8.js} +1 -1
- package/dist/cli/{knowledge-validator-zhy6mgxv.js → knowledge-validator-0q4xmhch.js} +2 -2
- package/dist/cli/{mcp-j1dy60mx.js → mcp-hh5k6qar.js} +1 -1
- package/dist/cli/{model-preflight-962y2z1d.js → model-preflight-zh4t5ywj.js} +26 -26
- package/dist/cli/{pending-delegations-erjwa1y6.js → pending-delegations-vxk971ny.js} +2 -2
- package/dist/cli/{pr-subscriptions-7fcawjg9.js → pr-subscriptions-nhdfz8pc.js} +1 -1
- package/dist/cli/{pr-workflow-gate-j8ee9c6g.js → pr-workflow-gate-bej2nn0c.js} +26 -26
- package/dist/cli/{scan-cursor-msz8j44s.js → scan-cursor-v5f7s9jb.js} +2 -2
- package/dist/cli/{schema-kep9t01t.js → schema-ejerjdcy.js} +1 -1
- package/dist/cli/{scope-persistence-tx71g0ac.js → scope-persistence-5nd08ct5.js} +5 -5
- package/dist/cli/{server-6enk6sfw.js → server-e9xvqypk.js} +35 -26
- package/dist/cli/{skill-generator-p9fkx1g3.js → skill-generator-6c57ckmm.js} +8 -8
- package/dist/cli/{snapshot-coordination-init-kgftbdmq.js → snapshot-coordination-init-jbs93ng2.js} +26 -26
- package/dist/cli/{speckit-checkoff-jfdwsy5n.js → speckit-checkoff-ryx6gh3p.js} +3 -3
- package/dist/cli/{workflow-wal-file-xvvwcxr1.js → workflow-wal-file-3f6ajfce.js} +2 -2
- package/dist/cli/{worktree-collision-ownership-hac3t2xv.js → worktree-collision-ownership-vdjhvm3b.js} +2 -2
- package/dist/cli/{worktree-isolation-tjvxcsr9.js → worktree-isolation-arqj4g26.js} +26 -26
- package/dist/hooks/delegation-gate.d.ts +6 -0
- package/dist/hooks/guardrails/audit-log.d.ts +2 -0
- package/dist/hooks/guardrails/cmd-delete-grammar.d.ts +47 -0
- package/dist/hooks/guardrails/destructive-command.d.ts +11 -3
- package/dist/hooks/guardrails/shell-audit-store.d.ts +2 -0
- package/dist/hooks/guardrails/tool-before.d.ts +16 -0
- package/dist/index.js +17 -17
- package/package.json +1 -1
|
@@ -3,37 +3,37 @@ import {
|
|
|
3
3
|
getAgentSession,
|
|
4
4
|
getBlockingActionCircuit,
|
|
5
5
|
resetActionCircuitExternally
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-phm7gmpq.js";
|
|
7
7
|
import"./index-ckq78kq1.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
8
|
+
import"./index-1egy4f76.js";
|
|
9
|
+
import"./index-gkaj31rk.js";
|
|
10
|
+
import"./index-sfd8kb4k.js";
|
|
11
11
|
import"./index-vx1j2t5p.js";
|
|
12
12
|
import"./index-txdagbh7.js";
|
|
13
13
|
import"./index-axqyjreb.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
14
|
+
import"./index-fk1w7r9k.js";
|
|
15
|
+
import"./index-5ecsb26p.js";
|
|
16
|
+
import"./index-2w17wxc1.js";
|
|
17
17
|
import"./index-rdec0y3z.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-2ftz9m3d.js";
|
|
19
|
+
import"./index-dfgqg3qd.js";
|
|
20
|
+
import"./index-213w5jn9.js";
|
|
21
21
|
import"./index-rpvp88js.js";
|
|
22
22
|
import"./index-kd1n3ne2.js";
|
|
23
23
|
import"./index-x5jwegqw.js";
|
|
24
24
|
import"./index-w0afnznk.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-n9mb83fx.js";
|
|
26
|
+
import"./index-9dtd681s.js";
|
|
27
27
|
import"./index-tggyracy.js";
|
|
28
28
|
import"./index-pt7h91zc.js";
|
|
29
29
|
import"./index-q7sjgr1y.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-fe3dtakd.js";
|
|
31
|
+
import"./index-5t3p0nd1.js";
|
|
32
32
|
import"./index-6b295cas.js";
|
|
33
33
|
import"./index-9nyqt3kb.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-td0bfecx.js";
|
|
35
35
|
import"./index-697mg68b.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-vzd1w4ra.js";
|
|
37
37
|
import"./index-rck7v4r4.js";
|
|
38
38
|
import"./index-ck7jpn0y.js";
|
|
39
39
|
import"./index-ry16d01s.js";
|
|
@@ -41,27 +41,27 @@ import"./index-rdm3px0g.js";
|
|
|
41
41
|
import"./index-dp6hy23p.js";
|
|
42
42
|
import"./index-rjsqf4hv.js";
|
|
43
43
|
import"./index-7pmbnjvj.js";
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-z0jf1tyr.js";
|
|
45
|
+
import"./index-gvzf86kf.js";
|
|
46
|
+
import"./index-wfx209wp.js";
|
|
47
47
|
import"./index-m9zzj4ee.js";
|
|
48
48
|
import"./index-8xtdxy91.js";
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-n425a88g.js";
|
|
50
50
|
import"./index-qyj4383m.js";
|
|
51
51
|
import"./index-rtry5xyf.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-0cqr8afr.js";
|
|
53
53
|
import"./index-vzm6zre7.js";
|
|
54
54
|
import"./index-ae75rja9.js";
|
|
55
55
|
import"./index-erp7fk72.js";
|
|
56
|
-
import"./index-
|
|
56
|
+
import"./index-60yd5f2p.js";
|
|
57
57
|
import"./index-g22dps7x.js";
|
|
58
58
|
import"./index-0725jpp7.js";
|
|
59
59
|
import"./index-3t46mez1.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
60
|
+
import"./index-jkj598w8.js";
|
|
61
|
+
import"./index-9t4gxpt5.js";
|
|
62
62
|
import"./index-bk5tah7q.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
63
|
+
import"./index-2pvmk43k.js";
|
|
64
|
+
import"./index-xdyqfp37.js";
|
|
65
65
|
import"./index-spggmr30.js";
|
|
66
66
|
import"./index-001tkp0j.js";
|
|
67
67
|
import"./index-9rwhas09.js";
|
|
@@ -7,37 +7,37 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-phm7gmpq.js";
|
|
11
11
|
import"./index-ckq78kq1.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
12
|
+
import"./index-1egy4f76.js";
|
|
13
|
+
import"./index-gkaj31rk.js";
|
|
14
|
+
import"./index-sfd8kb4k.js";
|
|
15
15
|
import"./index-vx1j2t5p.js";
|
|
16
16
|
import"./index-txdagbh7.js";
|
|
17
17
|
import"./index-axqyjreb.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-fk1w7r9k.js";
|
|
19
|
+
import"./index-5ecsb26p.js";
|
|
20
|
+
import"./index-2w17wxc1.js";
|
|
21
21
|
import"./index-rdec0y3z.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
import"./index-2ftz9m3d.js";
|
|
23
|
+
import"./index-dfgqg3qd.js";
|
|
24
|
+
import"./index-213w5jn9.js";
|
|
25
25
|
import"./index-rpvp88js.js";
|
|
26
26
|
import"./index-kd1n3ne2.js";
|
|
27
27
|
import"./index-x5jwegqw.js";
|
|
28
28
|
import"./index-w0afnznk.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-n9mb83fx.js";
|
|
30
|
+
import"./index-9dtd681s.js";
|
|
31
31
|
import"./index-tggyracy.js";
|
|
32
32
|
import"./index-pt7h91zc.js";
|
|
33
33
|
import"./index-q7sjgr1y.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-fe3dtakd.js";
|
|
35
|
+
import"./index-5t3p0nd1.js";
|
|
36
36
|
import"./index-6b295cas.js";
|
|
37
37
|
import"./index-9nyqt3kb.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-td0bfecx.js";
|
|
39
39
|
import"./index-697mg68b.js";
|
|
40
|
-
import"./index-
|
|
40
|
+
import"./index-vzd1w4ra.js";
|
|
41
41
|
import"./index-rck7v4r4.js";
|
|
42
42
|
import"./index-ck7jpn0y.js";
|
|
43
43
|
import"./index-ry16d01s.js";
|
|
@@ -45,29 +45,29 @@ import"./index-rdm3px0g.js";
|
|
|
45
45
|
import"./index-dp6hy23p.js";
|
|
46
46
|
import"./index-rjsqf4hv.js";
|
|
47
47
|
import"./index-7pmbnjvj.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
48
|
+
import"./index-z0jf1tyr.js";
|
|
49
|
+
import"./index-gvzf86kf.js";
|
|
50
|
+
import"./index-wfx209wp.js";
|
|
51
51
|
import"./index-m9zzj4ee.js";
|
|
52
52
|
import"./index-8xtdxy91.js";
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-n425a88g.js";
|
|
54
54
|
import"./index-qyj4383m.js";
|
|
55
55
|
import"./index-rtry5xyf.js";
|
|
56
56
|
import {
|
|
57
57
|
resolveHiveKnowledgePath
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-0cqr8afr.js";
|
|
59
59
|
import"./index-vzm6zre7.js";
|
|
60
60
|
import"./index-ae75rja9.js";
|
|
61
61
|
import"./index-erp7fk72.js";
|
|
62
|
-
import"./index-
|
|
62
|
+
import"./index-60yd5f2p.js";
|
|
63
63
|
import"./index-g22dps7x.js";
|
|
64
64
|
import"./index-0725jpp7.js";
|
|
65
65
|
import"./index-3t46mez1.js";
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
66
|
+
import"./index-jkj598w8.js";
|
|
67
|
+
import"./index-9t4gxpt5.js";
|
|
68
68
|
import"./index-bk5tah7q.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
import"./index-2pvmk43k.js";
|
|
70
|
+
import"./index-xdyqfp37.js";
|
|
71
71
|
import"./index-spggmr30.js";
|
|
72
72
|
import"./index-001tkp0j.js";
|
|
73
73
|
import"./index-9rwhas09.js";
|
|
@@ -739,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
739
739
|
const {
|
|
740
740
|
readAuthoritativeKnowledgeCounterRollups,
|
|
741
741
|
effectiveRetrievalOutcomes
|
|
742
|
-
} = await import("./knowledge-events-
|
|
742
|
+
} = await import("./knowledge-events-2ha1zsv5.js");
|
|
743
743
|
const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
|
|
744
744
|
const flagIds = new Set;
|
|
745
745
|
for (const e of atFloor) {
|
|
@@ -806,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
809
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
810
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
809
|
+
const { quarantineEntry } = await import("./knowledge-validator-0q4xmhch.js");
|
|
810
|
+
const { KnowledgeConfigSchema } = await import("./schema-ejerjdcy.js");
|
|
811
811
|
let config;
|
|
812
812
|
try {
|
|
813
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
813
|
+
const { loadPluginConfigWithMeta } = await import("./index-bxsbm6xx.js");
|
|
814
814
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
815
815
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
816
816
|
} catch {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
dcEvaluateRecursiveDeleteTargets,
|
|
7
7
|
dcExtractPowerShellTargets,
|
|
8
8
|
dcExtractRecursiveRmTargets,
|
|
9
|
-
dcExtractWindowsCmdTargets,
|
|
10
9
|
dcNormalizeCommand,
|
|
10
|
+
dcParseWindowsRecursiveDelete,
|
|
11
11
|
dcSplitSegments,
|
|
12
12
|
dcUnwrapWrappers,
|
|
13
13
|
declaresWindowsWrapperLoose,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
mergeWriteAnalyses,
|
|
23
23
|
resolveWindowsWriteAuthority,
|
|
24
24
|
resolveWriteTargets
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-phm7gmpq.js";
|
|
26
26
|
import {
|
|
27
27
|
checkFileAuthority,
|
|
28
28
|
classifyFile,
|
|
29
29
|
isInDeclaredScope,
|
|
30
30
|
redactPath,
|
|
31
31
|
redactShellCommand
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-1egy4f76.js";
|
|
33
33
|
|
|
34
34
|
// src/services/guardrail-explain-service.ts
|
|
35
35
|
import path from "path";
|
|
@@ -109,27 +109,40 @@ function evaluateDestructiveDecision(rawCommand, cwd, declaredScope) {
|
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
};
|
|
112
|
+
const explainRmdirVerb = /^(?:rmdir|rd)(?:\.exe)?\s*/i.exec(seg);
|
|
113
|
+
if (explainRmdirVerb) {
|
|
114
|
+
const parsed = dcParseWindowsRecursiveDelete(seg.slice(explainRmdirVerb[0].length));
|
|
115
|
+
if (parsed.fires) {
|
|
116
|
+
if (parsed.targets.length === 0) {
|
|
117
|
+
return {
|
|
118
|
+
decision: "block",
|
|
119
|
+
firingRule: "destructive_block: Windows recursive directory delete (rmdir /s)"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const targetDecision = dcEvaluateRecursiveDeleteTargets({
|
|
123
|
+
targets: parsed.targets,
|
|
124
|
+
cwd
|
|
125
|
+
});
|
|
126
|
+
if (!targetDecision.allowed) {
|
|
127
|
+
return {
|
|
128
|
+
decision: "block",
|
|
129
|
+
firingRule: `${targetDecision.code}: ${targetDecision.reason}`
|
|
130
|
+
};
|
|
131
|
+
}
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
const explainDelVerb = /^del(?:\.exe)?\s*/i.exec(seg);
|
|
135
|
+
if (explainDelVerb) {
|
|
136
|
+
const parsed = dcParseWindowsRecursiveDelete(seg.slice(explainDelVerb[0].length));
|
|
137
|
+
if (parsed.fires) {
|
|
138
|
+
if (parsed.targets.length === 0) {
|
|
139
|
+
return {
|
|
140
|
+
decision: "block",
|
|
141
|
+
firingRule: "destructive_block: Windows recursive file delete (del /s)"
|
|
142
|
+
};
|
|
143
|
+
}
|
|
131
144
|
const targetDecision = dcEvaluateRecursiveDeleteTargets({
|
|
132
|
-
targets:
|
|
145
|
+
targets: parsed.targets,
|
|
133
146
|
cwd
|
|
134
147
|
});
|
|
135
148
|
if (!targetDecision.allowed) {
|
|
@@ -140,7 +153,7 @@ function evaluateDestructiveDecision(rawCommand, cwd, declaredScope) {
|
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
155
|
}
|
|
143
|
-
if (/^(?:Remove-Item|ri|rm|rmdir|del|erase|rd)\b
|
|
156
|
+
if (/^(?:Remove-Item|ri|rm|rmdir|del|erase|rd)\b.*\s-[Rr]ecurse\b/i.test(seg) || /^(?:Remove-Item|ri|rm|rmdir|del|erase|rd)\b.*\s-[Rr]\b/i.test(seg)) {
|
|
144
157
|
const targets2 = dcExtractPowerShellTargets(seg);
|
|
145
158
|
if (targets2.length > 0) {
|
|
146
159
|
const targetDecision = dcEvaluateRecursiveDeleteTargets({
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
init_schema,
|
|
7
7
|
stripKnownSwarmPrefix
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-9t4gxpt5.js";
|
|
9
9
|
import {
|
|
10
10
|
getPathFlavor,
|
|
11
11
|
init_path_identity,
|
|
@@ -277,7 +277,7 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
277
277
|
var scan = (input, options) => {
|
|
278
278
|
const opts = options || {};
|
|
279
279
|
const length = input.length - 1;
|
|
280
|
-
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
|
280
|
+
const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
|
|
281
281
|
const slashes = [];
|
|
282
282
|
const tokens = [];
|
|
283
283
|
const parts = [];
|
|
@@ -384,14 +384,18 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
384
384
|
negatedExtglob = true;
|
|
385
385
|
}
|
|
386
386
|
if (scanToEnd === true) {
|
|
387
|
+
let parens = 0;
|
|
387
388
|
while (eos() !== true && (code = advance())) {
|
|
388
389
|
if (code === CHAR_BACKWARD_SLASH) {
|
|
389
390
|
backslashes = token.backslashes = true;
|
|
390
|
-
|
|
391
|
+
advance();
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
395
|
+
parens++;
|
|
391
396
|
continue;
|
|
392
397
|
}
|
|
393
|
-
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
394
|
-
isGlob = token.isGlob = true;
|
|
398
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
395
399
|
finished = true;
|
|
396
400
|
break;
|
|
397
401
|
}
|
|
@@ -446,13 +450,18 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
446
450
|
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
|
|
447
451
|
isGlob = token.isGlob = true;
|
|
448
452
|
if (scanToEnd === true) {
|
|
453
|
+
let parens = 1;
|
|
449
454
|
while (eos() !== true && (code = advance())) {
|
|
450
|
-
if (code ===
|
|
455
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
451
456
|
backslashes = token.backslashes = true;
|
|
452
|
-
|
|
457
|
+
advance();
|
|
453
458
|
continue;
|
|
454
459
|
}
|
|
455
|
-
if (code ===
|
|
460
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
461
|
+
parens++;
|
|
462
|
+
continue;
|
|
463
|
+
}
|
|
464
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
456
465
|
finished = true;
|
|
457
466
|
break;
|
|
458
467
|
}
|
|
@@ -526,32 +535,31 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
526
535
|
if (opts.parts === true || opts.tokens === true) {
|
|
527
536
|
let prevIndex;
|
|
528
537
|
for (let idx = 0;idx < slashes.length; idx++) {
|
|
529
|
-
const
|
|
538
|
+
const n2 = prevIndex !== undefined ? prevIndex + 1 : start;
|
|
530
539
|
const i = slashes[idx];
|
|
531
|
-
const
|
|
540
|
+
const value2 = input.slice(n2, i);
|
|
532
541
|
if (opts.tokens) {
|
|
533
542
|
if (idx === 0 && start !== 0) {
|
|
534
543
|
tokens[idx].isPrefix = true;
|
|
535
544
|
tokens[idx].value = prefix;
|
|
536
545
|
} else {
|
|
537
|
-
tokens[idx].value =
|
|
546
|
+
tokens[idx].value = value2;
|
|
538
547
|
}
|
|
539
548
|
depth(tokens[idx]);
|
|
540
549
|
state.maxDepth += tokens[idx].depth;
|
|
541
550
|
}
|
|
542
|
-
if (
|
|
543
|
-
parts.push(
|
|
551
|
+
if (i >= start) {
|
|
552
|
+
parts.push(value2);
|
|
553
|
+
prevIndex = i;
|
|
544
554
|
}
|
|
545
|
-
prevIndex = i;
|
|
546
555
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
}
|
|
556
|
+
const n = prevIndex !== undefined ? prevIndex + 1 : start;
|
|
557
|
+
const value = input.slice(n);
|
|
558
|
+
parts.push(value);
|
|
559
|
+
if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
|
|
560
|
+
tokens[tokens.length - 1].value = value;
|
|
561
|
+
depth(tokens[tokens.length - 1]);
|
|
562
|
+
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
555
563
|
}
|
|
556
564
|
state.slashes = slashes;
|
|
557
565
|
state.parts = parts;
|
|
@@ -737,7 +745,11 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
737
745
|
}
|
|
738
746
|
}
|
|
739
747
|
};
|
|
740
|
-
var
|
|
748
|
+
var buildCharClassStar = (chars) => {
|
|
749
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
750
|
+
return `${source}*`;
|
|
751
|
+
};
|
|
752
|
+
var getStarExtglobSequenceChars = (pattern) => {
|
|
741
753
|
let index = 0;
|
|
742
754
|
const chars = [];
|
|
743
755
|
while (index < pattern.length) {
|
|
@@ -759,8 +771,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
759
771
|
if (chars.length < 1) {
|
|
760
772
|
return;
|
|
761
773
|
}
|
|
762
|
-
|
|
763
|
-
return `${source}*`;
|
|
774
|
+
return chars;
|
|
764
775
|
};
|
|
765
776
|
var repeatedExtglobRecursion = (pattern) => {
|
|
766
777
|
let depth = 0;
|
|
@@ -784,15 +795,29 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
784
795
|
return { risky: true };
|
|
785
796
|
}
|
|
786
797
|
}
|
|
798
|
+
const safeChars = [];
|
|
799
|
+
let sawStarSequence = false;
|
|
800
|
+
let combinable = true;
|
|
787
801
|
for (const branch of branches) {
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
|
|
802
|
+
const chars = getStarExtglobSequenceChars(branch);
|
|
803
|
+
if (chars) {
|
|
804
|
+
sawStarSequence = true;
|
|
805
|
+
safeChars.push(...chars);
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
const literal = normalizeSimpleBranch(branch);
|
|
809
|
+
if (literal && literal.length === 1) {
|
|
810
|
+
safeChars.push(literal);
|
|
811
|
+
continue;
|
|
791
812
|
}
|
|
813
|
+
combinable = false;
|
|
792
814
|
if (repeatedExtglobRecursion(branch) > max) {
|
|
793
815
|
return { risky: true };
|
|
794
816
|
}
|
|
795
817
|
}
|
|
818
|
+
if (sawStarSequence) {
|
|
819
|
+
return combinable ? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) } : { risky: true };
|
|
820
|
+
}
|
|
796
821
|
return { risky: false };
|
|
797
822
|
};
|
|
798
823
|
var parse = (input, options) => {
|
|
@@ -1376,6 +1401,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
1376
1401
|
rest = rest.slice(3);
|
|
1377
1402
|
consume("/**", 3);
|
|
1378
1403
|
}
|
|
1404
|
+
const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
|
|
1379
1405
|
if (prior.type === "bos" && eos()) {
|
|
1380
1406
|
prev.type = "globstar";
|
|
1381
1407
|
prev.value += value;
|
|
@@ -1385,7 +1411,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
1385
1411
|
consume(value);
|
|
1386
1412
|
continue;
|
|
1387
1413
|
}
|
|
1388
|
-
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar &&
|
|
1414
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
|
|
1389
1415
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
1390
1416
|
prior.output = `(?:${prior.output}`;
|
|
1391
1417
|
prev.type = "globstar";
|
|
@@ -1648,9 +1674,9 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
1648
1674
|
}
|
|
1649
1675
|
return { isMatch: Boolean(match), match, output };
|
|
1650
1676
|
};
|
|
1651
|
-
picomatch.matchBase = (input, glob, options) => {
|
|
1677
|
+
picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
|
|
1652
1678
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
1653
|
-
return regex.test(utils.basename(input));
|
|
1679
|
+
return regex.test(utils.basename(input, { windows: posix }));
|
|
1654
1680
|
};
|
|
1655
1681
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
1656
1682
|
picomatch.parse = (pattern, options) => {
|
|
@@ -2977,6 +3003,7 @@ var SHELL_AUDIT_LIMITS = {
|
|
|
2977
3003
|
maxLineBytes: 64 * 1024,
|
|
2978
3004
|
maxCommandChars: 4096,
|
|
2979
3005
|
maxReasonChars: 1024,
|
|
3006
|
+
maxPathChars: 320,
|
|
2980
3007
|
migrationMaxBytes: 8 * 1024 * 1024
|
|
2981
3008
|
};
|
|
2982
3009
|
function decisionClassOf(event) {
|
|
@@ -3637,10 +3664,21 @@ var SHELL_AUDIT_FIELD_CLASSES = Object.freeze({
|
|
|
3637
3664
|
resolvedScope: "redacted-path",
|
|
3638
3665
|
declaredScope: "redacted-path",
|
|
3639
3666
|
action: "enum",
|
|
3667
|
+
operator: "free-text-redacted",
|
|
3640
3668
|
destructiveCategory: "enum",
|
|
3641
3669
|
executorMechanism: "enum",
|
|
3642
3670
|
skipReason: "enum"
|
|
3643
3671
|
});
|
|
3672
|
+
function truncateUtf8Safe(text, maxChars) {
|
|
3673
|
+
if (text.length <= maxChars)
|
|
3674
|
+
return text;
|
|
3675
|
+
const cut = text.slice(0, maxChars);
|
|
3676
|
+
const last = cut.charCodeAt(cut.length - 1);
|
|
3677
|
+
if (last >= 55296 && last <= 56319) {
|
|
3678
|
+
return `${cut.slice(0, -1)}\u2026[truncated]`;
|
|
3679
|
+
}
|
|
3680
|
+
return `${cut}\u2026[truncated]`;
|
|
3681
|
+
}
|
|
3644
3682
|
function hashRedactedCommand(redacted) {
|
|
3645
3683
|
return createHash("sha256").update(redacted, "utf-8").digest("hex").slice(0, 16);
|
|
3646
3684
|
}
|
|
@@ -3707,6 +3745,13 @@ function redactDecisionLineForArchive(line) {
|
|
|
3707
3745
|
changed = true;
|
|
3708
3746
|
}
|
|
3709
3747
|
}
|
|
3748
|
+
if (typeof record.operator === "string") {
|
|
3749
|
+
const redacted = truncateUtf8Safe(redactEmbeddedPaths(record.operator), 32);
|
|
3750
|
+
if (redacted !== record.operator) {
|
|
3751
|
+
record.operator = redacted;
|
|
3752
|
+
changed = true;
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3710
3755
|
for (const field of ["declaredScope", "resolvedScope"]) {
|
|
3711
3756
|
if (typeof record[field] === "string") {
|
|
3712
3757
|
const redacted = redactPath(record[field]);
|