Versions in this module Expand all Collapse all v0 v0.10.0 Oct 23, 2026 v0.9.0 Oct 16, 2026 v0.8.0 Oct 2, 2026 v0.7.0 Sep 22, 2026 v0.6.0 Sep 16, 2026 v0.5.0 Sep 15, 2026 v0.4.0 Sep 14, 2026 v0.3.0 Sep 14, 2026 v0.2.0 Sep 12, 2026 Changes in this version + const MaxDepthCeiling + const MaxNestingCeiling + const MaxStepsCeiling + func GenSignerCertWithCapabilities(dir string, caps []pki.Capability) (certPath, keyPath string, cert *x509.Certificate, err error) + func GenSignerCertWithGrant(dir string, caps, constraints []pki.Capability) (certPath, keyPath string, cert *x509.Certificate, err error) + func RuleWithinSignerGrant(rule *Rule, signer *x509.Certificate) error v0.1.0 Aug 24, 2026 Changes in this version + const DefaultMaxDepth + const DefaultMaxIterations + const DefaultMaxNesting + const DefaultMaxSteps + func CheckStaticBounds(f Flow, b *Budget) error + func EvalCondition(c Condition, ctx map[string]any, b *Budget, depth int) (bool, error) + func GenSignerCert(dir string) (certPath, keyPath string, cert *x509.Certificate, err error) + func GenerateSelectSQL(raw json.RawMessage) (string, error) + func MapHTTPRequest(ctx *pki.PluginContext) map[string]any + func PublishManifestJSON(m *PublishManifest) (string, error) + func RegisterRulePluginsFromDir(reg *pki.PluginRegistry, dir string, trustRoots []*x509.Certificate, ...) ([]string, error) + func RunFlow(f Flow, ctx *FlowContext, b *Budget) error + func ValidateStructure(r *Rule) error + type Budget struct + Deadline time.Time + MaxDepth int + MaxIterations int64 + MaxNesting int + MaxSteps int64 + func BudgetFromDefaults(d *BudgetDefaults) *Budget + func NewBudget() *Budget + func (b *Budget) Enter(depth int) error + func (b *Budget) Exit() + func (b *Budget) Iteration() error + func (b *Budget) Iterations() int64 + func (b *Budget) Stats() (steps, iterations int64) + func (b *Budget) Step() error + func (b *Budget) Steps() int64 + type BudgetDefaults struct + MaxDepth int + MaxIterations int + MaxNesting int + MaxSteps int + WallClockMs int64 + func LoadBudgetDefaults(path string) (*BudgetDefaults, error) + type BudgetError struct + Kind BudgetKind + Max int64 + Used int64 + func (e *BudgetError) Error() string + type BudgetKind int + const KindDepth + const KindIterations + const KindNesting + const KindSteps + const KindTimeout + func (k BudgetKind) String() string + type Condition struct + Items []Condition + Op string + Path string + Value any + Window []string + type Constraint struct + ID string + Params json.RawMessage + Scheme string + type Decision struct + Allow bool + Iterations int64 + Reason string + Steps int64 + type DecisionInput struct + AgentID string + EffectiveCaps []string + Mode string + Now time.Time + PrincipalID string + Request map[string]any + type Flow struct + Steps []Step + type FlowContext struct + Handler OpHandler + Request map[string]any + Vars map[string]any + type HTTPGateway struct + func NewHTTPGateway(plugins map[string]*RulePlugin, exec SQLExecutor) *HTTPGateway + func (g *HTTPGateway) Handler() http.Handler + type OpHandler func(op string, vars, req map[string]any) (map[string]any, error) + type PhaseTwo interface + Decide func(in DecisionInput) (*Decision, error) + type PublishManifest struct + Schemes map[string]SchemePublish + func PublishRules(rulesDir, outDir, certPath, keyPath string) (*PublishManifest, error) + type Rule struct + Capability string + Conditions *Condition + Constraints []Constraint + Flow *Flow + Params json.RawMessage + Roles []string + RuleID string + Scheme string + Version string + func LoadRule(path string) (*Rule, error) + func LoadRuleBytes(data []byte) (*Rule, error) + func (r *Rule) Validate(reg *register.Registry) error + type RuleExecutor struct + Budget *Budget + Handler OpHandler + Rule *Rule + func (e *RuleExecutor) Decide(in DecisionInput) (*Decision, error) + type RulePlugin struct + func LoadRulePlugin(rulePath string, trustRoots []*x509.Certificate, handler OpHandler) (*RulePlugin, error) + func NewRulePlugin(scheme string, rule *Rule, budget *Budget, handler OpHandler) *RulePlugin + func (p *RulePlugin) Execute(cap *pki.Capability, ctx *pki.PluginContext) (*pki.PluginResult, error) + func (p *RulePlugin) Scheme() string + type RuleVersion struct + Major int + Minor int + type SQLExecutor func(sql string) ([]map[string]any, error) + func DBExecutor(db *sql.DB) SQLExecutor + type SchemePublish struct + Files []string + Latest string + type Step struct + Condition *Condition + Do []Step + Else []Step + From int + Kind string + MaxRetries int + Name string + Op string + Steps []Step + Then []Step + To int + Var string