Documentation
¶
Overview ¶
Package grant implements the time-boxed "destructive actions" window that unlocks Destructive tools for non-interactive callers (the MCP server, a future in-app assistant). Interactive UI calls don't need it — they're already human-gated — but an agent can only remove/prune inside a window the user opened on purpose, and the window auto-relocks when it lapses.
State is a single JSON file shared by every Oriel process (server, `oriel mcp`, the CLI), so opening a window from one is seen by all. Active/Status read the file fresh; they're only hit on destructive calls, so the cost is irrelevant.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the on-disk grant window. The zero value is unusable; call New.
func NewAt ¶
NewAt returns a store backed by an explicit file. Used by tests and any caller that needs to target a non-default location.