Documentation
¶
Overview ¶
Package provenance labels untrusted content and removes prompt-injection spans before that content is handed to the main agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Classifier ¶
Classifier is deliberately isolated from tools and conversation state.
func ClassifierForConfig ¶
func ClassifierForConfig(cfg types.Config) (Classifier, error)
ClassifierForConfig constructs the independently configured classifier transport. When no classifier block is present it inherits the main provider for backward compatibility; protection itself remains opt-in.
type Envelope ¶
type Envelope struct {
ID string `json:"id"`
Origin Origin `json:"origin"`
Trust Trust `json:"trust"`
Digest string `json:"digest"`
Raw string `json:"-"`
Visible string `json:"visible"`
Findings []Span `json:"findings,omitempty"`
ClassificationError string `json:"classification_error,omitempty"`
}
Envelope keeps the immutable source identity separate from the model-visible text. Digest always describes Raw, including when Visible has been redacted.
func NewExternal ¶
func NewExternal(ctx context.Context, id, kind, locator, raw string, classifier Classifier) Envelope
func (Envelope) Suspicious ¶
type LLMClassifier ¶
LLMClassifier runs a dedicated, context-free model pass. It receives no conversation history and advertises no tools. The model returns exact quotes; nib derives byte offsets itself instead of trusting model arithmetic.