musepolicy

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package musepolicy projects Agent Layer grants into Muse's native policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

ConfigDir follows Muse's XDG convention on both Linux and macOS.

func HandleMCP

func HandleMCP(root string, input io.Reader, output io.Writer) error

HandleMCP reloads canonical policy for every request, including in sessions whose native hook registration predates a sync. Native denies take precedence.

func MCPPrefixes

func MCPPrefixes(cfg config.Config) ([]string, error)

MCPPrefixes validates unambiguous native tool namespaces before granting calls.

func ParseCommandPrefixes

func ParseCommandPrefixes(commands []string) ([][]string, error)

ParseCommandPrefixes validates commands.allow entries as literal argv prefixes and returns their native Muse representation.

func SyncCommands

func SyncCommands(dir, root string, commands []string) (err error)

SyncCommands replaces only this workspace's Agent Layer-owned allow rules. Native Muse evaluates argv prefixes, compound stages, and deny precedence. It uses this same lock file when persisting interactive approval decisions.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL