redaction

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGuidance

func DefaultGuidance() string

DefaultGuidance returns hardcoded redaction rules used when no REDACT.md files are available.

Types

type LLMClient

type LLMClient interface {
	Redact(ctx context.Context, content string, guidance string) (string, error)
}

LLMClient abstracts LLM calls for redaction.

type RedactOpts

type RedactOpts struct {
	Integration string // optional: "slack", "jira", etc.
}

RedactOpts configures a redaction call.

type Redactor

type Redactor struct {
	// contains filtered or unexported fields
}

Redactor handles observation redaction via LLM.

func NewRedactor

func NewRedactor(teamContextDir string, client LLMClient) *Redactor

NewRedactor creates a redactor backed by the given LLM client. teamContextDir is the path to the team context checkout.

func (*Redactor) InvalidateCache

func (r *Redactor) InvalidateCache()

InvalidateCache clears the guidance cache. Call after sync.

func (*Redactor) LoadGuidance

func (r *Redactor) LoadGuidance(integration string) (string, error)

LoadGuidance loads and merges REDACT.md files, caching the result.

func (*Redactor) Redact

func (r *Redactor) Redact(ctx context.Context, content string, opts RedactOpts) (string, error)

Redact processes a single content string through LLM redaction. Returns error if LLM is unavailable — caller should block the write.

func (*Redactor) RedactBatch

func (r *Redactor) RedactBatch(ctx context.Context, entries []string, opts RedactOpts) ([]string, error)

RedactBatch processes multiple entries in a single LLM call.

Jump to

Keyboard shortcuts

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