org

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) RecordRun

func (s *AgentStore) RecordRun(r AgentRun) (AgentRun, error)

func (*AgentStore) Runs

func (s *AgentStore) Runs(id string) []AgentRun

func (*AgentStore) SaveManifest

func (s *AgentStore) SaveManifest(m AgentManifest) (AgentManifest, error)

Jump to

Keyboard shortcuts

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