oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package claude
2
3import (
4 "amadan.net/oficina/equipo/internal/runner/provider"
5 "encoding/json"
6 "slices"
7)
8
9// ProbeNativeReadPolicy exercises the same refusal that Permission applies before
10// emitting a human request. It neither opens files nor creates an approval.
11func ProbeNativeReadPolicy(policy provider.Policy, tool, path string) bool {
12 if !slices.Contains([]string{"Read", "Glob", "Grep"}, tool) {
13 return false
14 }
15 field := "path"
16 if tool == "Read" {
17 field = "file_path"
18 }
19 input, _ := json.Marshal(map[string]string{field: path})
20 return protectedNativePath(permissionRequest{Tool: tool, Input: input}, policy)
21}
22