[package]
name = "pi_agent_rust"
version = "0.3.0"
edition = "2024"
rust-version = "1.95"
description = "Native AI coding agent CLI - Rust port of Pi Agent"
authors = ["Jeffrey Emanuel"]
license-file = "LICENSE"
repository = "https://github.com/Dicklesworthstone/pi_agent_rust"
homepage = "https://github.com/Dicklesworthstone/pi_agent_rust"
documentation = "https://docs.rs/pi_agent_rust"
readme = "README.md"
keywords = ["ai", "cli", "coding-agent", "llm", "anthropic"]
categories = ["command-line-utilities", "development-tools"]
autobins = false
include = [
"/docs/extension-artifact-provenance.json",
"/docs/evidence/tool-output-context-cache.jsonl",
"/docs/wit/extension.wit",
"/docs/provider-upstream-model-ids-snapshot.json",
"/docs/schema/extension_protocol.json",
"/legacy_pi_mono_code/pi-mono/packages/ai/src/models.generated.ts",
"/tests/fixtures/agent_mail/schema_corrupt_health.json",
"/Cargo.toml",
"/LICENSE",
"/README.md",
"/CHANGELOG.md",
"/build.rs",
"/src/**",
]
[lib]
name = "pi"
path = "src/lib.rs"
[[bin]]
name = "pi"
path = "src/main.rs"
required-features = ["tui"]
[[bin]]
name = "pi_legacy_capture"
path = "src/bin/pi_legacy_capture.rs"
required-features = ["internal-legacy-capture"]
[[bin]]
name = "pi_mcp_fixture"
path = "src/bin/pi_mcp_fixture.rs"
required-features = ["internal-mcp-fixture"]
[[example]]
name = "basic_sdk"
path = "examples/basic_sdk.rs"
[[example]]
name = "dialect_bench"
path = "examples/dialect_bench.rs"
[[example]]
name = "ext_artifact_manifest"
path = "examples/ext_artifact_manifest.rs"
[[example]]
name = "ext_conformance_matrix"
path = "examples/ext_conformance_matrix.rs"
[[example]]
name = "ext_conformance_report"
path = "examples/ext_conformance_report.rs"
[[example]]
name = "ext_full_validation"
path = "examples/ext_full_validation.rs"
[[example]]
name = "ext_inclusion_list"
path = "examples/ext_inclusion_list.rs"
[[example]]
name = "ext_license_screen"
path = "examples/ext_license_screen.rs"
[[example]]
name = "ext_onboarding_queue"
path = "examples/ext_onboarding_queue.rs"
[[example]]
name = "ext_popularity_snapshot"
path = "examples/ext_popularity_snapshot.rs"
[[example]]
name = "ext_release_binary_e2e"
path = "examples/ext_release_binary_e2e.rs"
[[example]]
name = "ext_runtime_risk_ledger"
path = "examples/ext_runtime_risk_ledger.rs"
[[example]]
name = "ext_score_candidates"
path = "examples/ext_score_candidates.rs"
[[example]]
name = "ext_stress"
path = "examples/ext_stress.rs"
[[example]]
name = "ext_tiered_corpus"
path = "examples/ext_tiered_corpus.rs"
[[example]]
name = "ext_unvendored_fetch_run"
path = "examples/ext_unvendored_fetch_run.rs"
[[example]]
name = "ext_validate_dedup"
path = "examples/ext_validate_dedup.rs"
[[example]]
name = "ext_workloads"
path = "examples/ext_workloads.rs"
[[example]]
name = "ftui_preview"
path = "examples/ftui_preview.rs"
required-features = ["ftui"]
[[example]]
name = "pi_debug"
path = "examples/pi_debug.rs"
[[example]]
name = "pijs_workload"
path = "examples/pijs_workload.rs"
[[example]]
name = "session_workload_bench"
path = "examples/session_workload_bench.rs"
[[example]]
name = "test_duration"
path = "examples/test_duration.rs"
[[example]]
name = "test_infinite_loop"
path = "examples/test_infinite_loop.rs"
[[example]]
name = "test_time"
path = "examples/test_time.rs"
[dependencies]
clap = { version = "4.5.60", features = ["derive", "env", "string"] }
clap_complete = "4.5.66"
asupersync = { version = "0.4.4", default-features = false, features = ["tls-webpki-roots", "test-internals"] }
futures = "0.3"
async-trait = "0.1"
htmd = "0.5.5"
pdf-extract = { version = "0.12", optional = true }
url = "2"
ctrlc = "3.5.2"
portable-pty = "0.9"
serde = { version = "1", features = ["derive", "rc"] }
serde_json = { version = "1", features = ["raw_value"] }
json5 = "1.3.1"
anyhow = "1.0.104"
thiserror = "2"
rich_rust = { version = "0.2.2", features = ["markdown"] }
crossterm = { version = "0.29", optional = true }
enable-ansi-support = "0.2"
bubbletea = { package = "charmed-bubbletea", version = "0.2.0", optional = true }
lipgloss = { package = "charmed-lipgloss", version = "0.2.0", optional = true }
bubbles = { package = "charmed-bubbles", version = "0.2.0", optional = true }
glamour = { package = "charmed-glamour", version = "0.2.0", optional = true }
unicode-width = { version = "0.2", optional = true }
textwrap = { version = "0.16", optional = true }
arboard = { version = "3.6.1", optional = true }
ftui = { version = "0.5", default-features = false, features = ["runtime", "crossterm"], optional = true }
ftui-extras = { version = "0.5", default-features = false, features = ["markdown"], optional = true }
dirs = "6"
tempfile = "3.25.0"
fs4 = "1.1"
glob = "0.3"
ignore = "0.4"
globset = "0.4"
grep-regex = "0.1"
grep-searcher = "0.1"
jsonschema = { version = "0.42.0", default-features = false }
rustix = { version = "1.1.4", features = ["fs", "process"] }
crossbeam-queue = "0.3"
fsqlite = { version = "0.3.5", default-features = false, features = ["native", "fts5"] }
chrono = { version = "0.4", features = ["serde"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
uuid = { version = "1.21.0", features = ["v4"] }
memchr = "2.8.0"
base64 = "0.23"
flate2 = "1.1.9"
sha2 = "0.11"
sha1 = "0.11"
md-5 = "0.11"
hmac = "0.13"
pbkdf2 = { version = "0.13.0", features = ["hmac"] }
scrypt = { version = "0.12.0", default-features = false }
getrandom = "0.4.1"
regex = "1.12.3"
ring = "0.17.14"
semver = "1.0.27"
crc32c = "0.6"
ast-grep-core = "0.40"
ast-grep-language = { version = "0.40", default-features = false, features = [
"tree-sitter-bash",
"tree-sitter-python",
"tree-sitter-javascript",
"tree-sitter-typescript",
"tree-sitter-ruby",
"tree-sitter-rust",
"tree-sitter-go",
] }
unicode-normalization = "0.1"
xxhash-rust = { version = "0.8", features = ["xxh32"] }
similar = "2"
sysinfo = "0.39.6"
tiktoken-rs = { version = "0.12.0", optional = true }
rquickjs = { version = "0.12.2", features = ["futures", "loader"] }
swc_common = "26.0.0"
swc_ecma_codegen = "32.0.0"
swc_ecma_ast = "29.0.0"
swc_ecma_parser = "45.0.0"
swc_ecma_transforms_base = "49.0.0"
swc_ecma_transforms_typescript = "55.0.0"
swc_ecma_visit = "29.0.0"
wasmtime = { version = "47.0.3", features = ["component-model"], optional = true }
filetime = "0.2.27"
image = { version = "0.25", optional = true, default-features = false, features = [
"jpeg",
"png",
"gif",
"webp",
"rayon",
] }
[build-dependencies]
crc32c = "0.6.8"
flate2 = "1.1.9"
vergen-gix = { version = "9.1.0", features = ["build", "cargo", "rustc"] }
[dev-dependencies]
arbitrary = { version = "1", features = ["derive"] }
pretty_assertions = "1"
insta = { version = "1", features = ["filters"] }
tempfile = "3.25.0"
asupersync = { version = "0.4.4", default-features = false, features = ["test-internals"] }
criterion = { version = "0.8.2", features = ["html_reports"] }
jsonschema = { version = "0.42.0", default-features = false }
proptest = "1.10.0"
wat = "1.255.0"
toml = "1.0.3"
loom = { version = "0.7.2", git = "https://github.com/ongardie-atomix/loom", rev = "2b7c402034cc041b5e325384c67bb43bff93c048" }
signal-hook = "0.4.4"
[[bench]]
name = "tools"
harness = false
[[bench]]
name = "extensions"
harness = false
[[bench]]
name = "extension_budget_inputs"
harness = false
[[bench]]
name = "semantic_context"
harness = false
[[bench]]
name = "system"
harness = false
[[bench]]
name = "tui_perf"
harness = false
[[bench]]
name = "search_backends"
harness = false
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
tikv-jemallocator = { version = "0.6", optional = true }
[target.'cfg(target_os = "freebsd")'.dependencies]
rquickjs = { version = "0.12.2", features = ["futures", "loader", "bindgen"] }
[target.'cfg(target_os = "android")'.dependencies]
rquickjs = { version = "0.12.2", features = ["futures", "loader", "bindgen"] }
[features]
default = ["sqlite-sessions", "tui", "bpe-tokens"]
full = [
"image-resize",
"jemalloc",
"clipboard",
"wasm-host",
"sqlite-sessions",
"syntax-highlighting",
"tui",
"url-pdf",
"bpe-tokens",
"rich_rust/full",
]
bpe-tokens = ["dep:tiktoken-rs"]
url-pdf = ["dep:pdf-extract"]
tui = [
"dep:crossterm",
"dep:bubbletea",
"dep:lipgloss",
"dep:bubbles",
"dep:glamour",
"dep:unicode-width",
"dep:textwrap",
]
ftui = ["dep:ftui", "dep:ftui-extras", "tui"]
image-resize = ["image"]
clipboard = ["dep:arboard"]
wasm-host = ["dep:wasmtime"]
sqlite-sessions = []
syntax-highlighting = ["rich_rust/syntax"]
ext-conformance = []
fuzzing = []
internal-legacy-capture = []
internal-mcp-fixture = []
loom-tests = []
manual-timing-tests = []
jemalloc = ["dep:tikv-jemallocator"]
[[test]]
name = "hostcall_queue_loom"
path = "tests/hostcall_queue_loom.rs"
required-features = ["loom-tests"]
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
[profile.dev]
opt-level = 0
debug = true
[profile.test]
debug = "line-tables-only"
incremental = false
[profile.perf]
inherits = "release"
opt-level = 3
lto = "thin"
debug = 1
strip = false
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"