redact

package
v0.54.6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package redact scrubs text before it leaves the runtime or is fed back to the model: Secrets masks credential-like values, Clean additionally strips content that can be used to smuggle instructions (invisible characters, HTML comments, forged system tags).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(value string) string

Clean prepares untrusted text for reuse as model context: it drops zero-width/invisible format characters, HTML comments and forged tags such as <system-reminder>...</system-reminder>, then applies Secrets. Order matters: invisible characters are removed first so they cannot split a tag or comment marker to dodge the later patterns.

func Secrets

func Secrets(value string) string

Secrets removes credential-like values before tool data leaves the runtime.

Types

This section is empty.

Jump to

Keyboard shortcuts

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