Documentation
¶
Overview ¶
Package approval stores local, operator-created approval records.
Index ¶
- type Binding
- type Pending
- type Store
- func (s *Store) AliasesDirectory(candidate *os.File) (bool, error)
- func (s *Store) Approve(binding Binding, now time.Time) error
- func (s *Store) Close() error
- func (s *Store) IsApproved(binding Binding) (bool, error)
- func (s *Store) Pending(messageID string) (Pending, error)
- func (s *Store) SavePending(pending Pending) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct {
MessageID string `json:"message_id"`
Direction string `json:"direction"`
Source string `json:"source"`
Destination string `json:"destination"`
BodySHA256 string `json:"body_sha256"`
}
Binding identifies the exact protocol action an operator approved.
type Pending ¶
type Pending struct {
MessageID string `json:"message_id"`
Direction string `json:"direction"`
Source string `json:"source"`
Destination string `json:"destination"`
Body string `json:"body"`
BodySHA256 string `json:"body_sha256"`
ReasonCode string `json:"reason_code"`
CreatedAt string `json:"created_at"`
}
Pending is the exact message awaiting local review.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds immutable pending and approval records outside the MCP protocol.
func (*Store) AliasesDirectory ¶
AliasesDirectory reports whether candidate is the approvals directory.
func (*Store) IsApproved ¶
IsApproved verifies an operator approval for this exact protocol action.
func (*Store) SavePending ¶
SavePending durably stores an exact review request. Replays must match.
Click to show internal directories.
Click to hide internal directories.