Skip to content

Add basic permission configuration methods #3351

Description

@linghengqian

Problem

  • The https://github.com/apache/maka/blob/main/packages/cli/README.md file doesn't mention anything related to permissions. It would be great if there were a way to configure permissions. A sandbox isn't necessarily needed; prompts and regular expressions can handle many scenarios.
  • For example, in the ~/.config/opencode/opencode.jsonc file related to https://github.com/anomalyco/opencode , I would do something like this to prevent anomalyco/opencode from accessing or modifying files under /mnt/** and the /etc/wsl.conf file, while also disabling anomalyco/opencode from executing the git commit and git push commands.
{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "bash": {"git commit *": "deny","git push *": "deny"},
    "edit": {"/etc/wsl.conf": "deny"},
    "external_directory": {"*": "allow","/mnt/**": "deny"}
  }
}

Desired outcome

  • Add basic permission configuration methods.

Alternatives or workarounds

  • Uncertain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions