MCPcopy Create free account
hub / github.com/AI45Lab/Code / explore_permissions

Function explore_permissions

core/src/subagent.rs:1018–1033  ·  view source on GitHub ↗

Permission policy for explore agent (read-only)

()

Source from the content-addressed store, hash-verified

1016
1017/// Permission policy for explore agent (read-only)
1018fn explore_permissions() -> PermissionPolicy {
1019 let mut policy = PermissionPolicy::new()
1020 .allow_all(&["read", "grep", "glob", "ls"])
1021 .deny_all(&["write", "edit", "task", "parallel_task"])
1022 .allow("Bash(ls:*)")
1023 .allow("Bash(cat:*)")
1024 .allow("Bash(head:*)")
1025 .allow("Bash(tail:*)")
1026 .allow("Bash(find:*)")
1027 .allow("Bash(wc:*)")
1028 .deny("Bash(rm:*)")
1029 .deny("Bash(mv:*)")
1030 .deny("Bash(cp:*)");
1031 policy.default_decision = PermissionDecision::Deny;
1032 policy
1033}
1034
1035/// Permission policy for general agent (full access except task)
1036fn general_permissions() -> PermissionPolicy {

Callers 1

default_permissionsMethod · 0.85

Calls 4

denyMethod · 0.80
allowMethod · 0.80
deny_allMethod · 0.80
allow_allMethod · 0.80

Tested by

no test coverage detected