MCPcopy Create free account
hub / github.com/diillson/chatcli / defaultRules

Method defaultRules

cli/coder/policy_manager.go:345–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343}
344
345func (pm *PolicyManager) defaultRules() {
346 pm.Rules = []Rule{
347 {Pattern: "@coder read", Action: ActionAllow},
348 {Pattern: "@coder tree", Action: ActionAllow},
349 {Pattern: "@coder search", Action: ActionAllow},
350 {Pattern: "@coder git-status", Action: ActionAllow},
351 {Pattern: "@coder git-diff", Action: ActionAllow},
352 {Pattern: "@coder git-log", Action: ActionAllow},
353 {Pattern: "@coder git-changed", Action: ActionAllow},
354 {Pattern: "@coder git-branch", Action: ActionAllow},
355 // exec always requires per-command approval (never auto-allow)
356 {Pattern: "@coder exec", Action: ActionAsk},
357 }
358 _ = pm.save()
359}
360
361func findLocalPolicyPath() string {
362 wd, err := os.Getwd()

Callers 1

loadMethod · 0.95

Calls 1

saveMethod · 0.95

Tested by

no test coverage detected