Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentManifest ¶
type AgentManifest struct {
ID string `json:"id"`
Name string `json:"name"`
// Roles and direct permissions are the canonical agent authorization policy.
// The capability fields below remain readable for migration only.
Roles []string `json:"roles,omitempty"`
DirectPermissions []AgentPermission `json:"direct_permissions,omitempty"`
DeniedPermissions []AgentPermission `json:"denied_permissions,omitempty"`
ApprovalRules []AgentPermission `json:"approval_rules,omitempty"`
GrantedCapabilities []string `json:"granted_capabilities"`
ProhibitedActions []string `json:"prohibited_actions,omitempty"`
ApprovalGates []string `json:"approval_gates,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
type AgentPermission ¶
type AgentPermission struct {
Doctype string `json:"doctype"`
Operation string `json:"operation"`
IfOwner bool `json:"if_owner,omitempty"`
Scope string `json:"scope,omitempty"`
}
AgentPermission assigns one DocType operation to an agent policy. It uses the same operation vocabulary as doctype.Permission and is deliberately independent of the removed capability authorization model.
type AgentRun ¶
type AgentRun struct {
ID string `json:"id"`
AgentID string `json:"agent_id"`
Status string `json:"status"`
Doctype string `json:"doctype,omitempty"`
Operation string `json:"operation,omitempty"`
// Capability is read-only compatibility data for old run records.
Capability string `json:"capability,omitempty"`
ApprovalRequired bool `json:"approval_required"`
HandoffTask string `json:"handoff_task,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type AgentStore ¶
type AgentStore struct {
// contains filtered or unexported fields
}
func NewAgentStore ¶
func NewAgentStore() *AgentStore
func NewSQLAgentStore ¶
func NewSQLAgentStore(db *sql.DB) (*AgentStore, error)
func (*AgentStore) GetManifest ¶
func (s *AgentStore) GetManifest(id string) (AgentManifest, bool)
func (*AgentStore) Manifests ¶
func (s *AgentStore) Manifests() []AgentManifest
Manifests returns the configured policies in a stable order for management clients.
func (*AgentStore) Runs ¶
func (s *AgentStore) Runs(id string) []AgentRun
func (*AgentStore) SaveManifest ¶
func (s *AgentStore) SaveManifest(m AgentManifest) (AgentManifest, error)