mirror of
https://github.com/hanzoai/guard.git
synced 2026-10-30 18:35:24 +00:00
81 lines
2.2 KiB
TOML
81 lines
2.2 KiB
TOML
[package]
|
|
name = "hanzo-guard"
|
|
version = "0.1.3"
|
|
edition = "2021"
|
|
authors = ["Hanzo AI <[email protected]>"]
|
|
description = "Fast LLM I/O sanitization - PII redaction, prompt injection detection, rate limiting"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/hanzoai/guard"
|
|
homepage = "https://hanzoai.github.io/guard"
|
|
documentation = "https://docs.rs/hanzo-guard"
|
|
readme = "README.md"
|
|
keywords = ["llm", "sanitization", "pii", "security", "ai"]
|
|
categories = ["development-tools", "web-programming", "text-processing"]
|
|
|
|
[features]
|
|
default = ["pii", "rate-limit", "audit"]
|
|
pii = ["regex"]
|
|
rate-limit = ["governor"]
|
|
content-filter = ["reqwest"]
|
|
audit = ["tracing"]
|
|
proxy = ["hyper", "hyper-util", "http-body-util", "tower", "tower-http"]
|
|
pty = ["portable-pty"]
|
|
full = ["pii", "rate-limit", "content-filter", "audit", "proxy", "pty"]
|
|
|
|
[dependencies]
|
|
thiserror = "2.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
async-trait = "0.1"
|
|
tokio = { version = "1", features = ["full"] }
|
|
futures = "0.3"
|
|
|
|
# UUID and timestamps
|
|
uuid = { version = "1.0", features = ["v4", "serde"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# PII detection
|
|
regex = { version = "1.10", optional = true }
|
|
|
|
# Rate limiting
|
|
governor = { version = "0.8", optional = true }
|
|
|
|
# Content filtering (external API)
|
|
reqwest = { version = "0.12", features = ["json"], optional = true }
|
|
|
|
# Audit logging
|
|
tracing = { version = "0.1", optional = true }
|
|
|
|
# HTTP Proxy
|
|
hyper = { version = "1.5", features = ["full"], optional = true }
|
|
hyper-util = { version = "0.1", features = ["full"], optional = true }
|
|
http-body-util = { version = "0.1", optional = true }
|
|
tower = { version = "0.5", optional = true }
|
|
tower-http = { version = "0.6", features = ["trace"], optional = true }
|
|
|
|
# PTY wrapper (rlwrap-style)
|
|
portable-pty = { version = "0.8", optional = true }
|
|
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|
|
|
|
[[bin]]
|
|
name = "hanzo-guard"
|
|
path = "src/main.rs"
|
|
required-features = ["full"]
|
|
|
|
[[bin]]
|
|
name = "guard-proxy"
|
|
path = "src/bin/proxy.rs"
|
|
required-features = ["proxy"]
|
|
|
|
[[bin]]
|
|
name = "guard-wrap"
|
|
path = "src/bin/wrap.rs"
|
|
required-features = ["pty"]
|
|
|
|
[[bin]]
|
|
name = "guard-mcp"
|
|
path = "src/bin/mcp_proxy.rs"
|
|
required-features = ["pii"]
|