Documentation
¶
Overview ¶
Package admin validates dashboard operations before touching scoped stores.
Index ¶
- Variables
- func InputSchema(kind string, update bool) map[string]any
- type Actor
- type Audit
- type AuditEvent
- type Error
- type Field
- type Preview
- type PrivacyPage
- type Service
- func (s *Service) Assign(ctx context.Context, a Actor, key string, assigned bool) error
- func (s *Service) Assigned(ctx context.Context, a Actor, key string) (bool, error)
- func (s *Service) Create(ctx context.Context, a Actor, kind string, raw json.RawMessage) (json.RawMessage, error)
- func (s *Service) Delete(ctx context.Context, a Actor, kind, key string) error
- func (s *Service) Engine() *engine.Engine
- func (s *Service) Get(ctx context.Context, a Actor, kind, key string) (json.RawMessage, error)
- func (s *Service) List(ctx context.Context, a Actor, kind string, f store.Filter) (store.Page, error)
- func (s *Service) PrivacyAvailable() bool
- func (s *Service) Ready() bool
- func (s *Service) References(ctx context.Context, a Actor, kind, name string) ([]string, error)
- func (s *Service) RetentionExecute(ctx context.Context, a Actor, key string) (int64, error)
- func (s *Service) RetentionPreview(ctx context.Context, a Actor) (Preview, error)
- func (s *Service) TokenStats(ctx context.Context, a Actor, f store.Filter) (PrivacyPage, error)
- func (s *Service) Tokens(ctx context.Context, a Actor, scanID string, f store.Filter) (store.Page, error)
- func (s *Service) Update(ctx context.Context, a Actor, kind, key string, raw json.RawMessage, ...) (json.RawMessage, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Schemas = map[string][]Field{
"instincts": {required("category", "injection", "exfiltration", "manipulation", "jailbreak"), required("sensitivity", sensitivity...), required("action", "block", "flag", "alert", "redact", "quote"), list("strategies", field("name", "text"), field("weight", "number"), field("config", "json"))},
"awareness": {required("focus", focus...), required("action", "redact", "flag", "block", "vault"), list("detectors", field("name", "text"), required("focus", focus...), field("patterns", "tags"), field("config", "json"))},
"boundaries": {field("response", "textarea"), list("limits", required("scope", "topic", "action", "data", "output", "custom"), field("deny", "tags"), field("allow", "tags"), field("use_allow", "boolean"))},
"values": {required("severity", "info", "warning", "error", "critical"), required("action", "block", "flag", "warn"), list("rules", required("principle", "toxicity", "brand_safety", "honesty", "respect", "safety", "privacy", "custom"), field("threshold", "number"), field("categories", "tags"), field("guidelines", "tags"), field("config", "json"))},
"judgments": {required("domain", domains...), field("threshold", "number"), required("action", "flag", "block", "warn"), list("assessors", field("name", "text"), required("domain", domains...), field("weight", "number"), field("requires_context", "boolean"), field("config", "json"))},
"reflexes": {field("priority", "integer"), list("triggers", required("type", "on_score", "on_finding", "on_pattern", "on_context", "on_rate", "always"), field("pattern", "text"), rateThreshold(), field("window", "text")), list("actions", required("type", "block", "redact", "flag", "rewrite", "escalate", "log", "throttle"), field("target", "text"), field("value", "json_value"), field("fallback", "textarea"))},
"profiles": {list("instincts", field("instinct_name", "reference"), field("sensitivity", "select", sensitivity...)), list("awareness", field("awareness_name", "reference")), list("judgments", field("judgment_name", "reference"), field("threshold", "number")), field("boundaries", "references"), field("values", "references"), field("reflexes", "references")},
"policies": {list("rules", required("check_type", "instinct", "awareness", "boundary", "values", "judgment", "reflex"), field("condition", "text"), required("action", "block", "flag", "redact", "escalate"), field("error_message", "textarea"), field("priority", "integer"))},
}
Functions ¶
Types ¶
type AuditEvent ¶
type Field ¶
type Field struct {
Key string `json:"key"`
Label string `json:"label"`
Type string `json:"type"`
Options []string `json:"options,omitempty"`
Fields []Field `json:"fields,omitempty"`
Required bool `json:"required,omitempty"`
MaxLength int `json:"max_length,omitempty"`
MaxItems int `json:"max_items,omitempty"`
JSONBytesMax int `json:"json_bytes_max,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
}
type PrivacyPage ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, a Actor, kind string, raw json.RawMessage) (json.RawMessage, error)
func (*Service) PrivacyAvailable ¶
func (*Service) References ¶
func (*Service) RetentionExecute ¶
func (*Service) RetentionPreview ¶
func (*Service) TokenStats ¶
Click to show internal directories.
Click to hide internal directories.