winx-code-agent 0.2.341

Remote-first Rust MCP runtime with Streamable HTTP, durable PTYs, and guarded agent tools
Documentation
[package]
name = "winx-code-agent"
default-run = "winx-code-agent"
version = "0.2.341"
edition = "2021"
rust-version = "1.88"
description = "Remote-first Rust MCP runtime with Streamable HTTP, durable PTYs, and guarded agent tools"
authors = ["Gabriel Maia <gabrielmaialva33@gmail.com>"]
license = "MIT"
repository = "https://github.com/gabrielmaialva33/winx-code-agent"
keywords = ["mcp", "llm", "code-agent", "streamable-http", "shell"]
categories = ["command-line-utilities", "development-tools"]

[dependencies]
# MCP SDK - Official Rust SDK for Model Context Protocol
rmcp = { version = "3.1.2", features = [
    "transport-io",
    "transport-streamable-http-server",
    "server",
] }

# HTTP server for the primary remote MCP transport (ChatGPT custom apps, hosted agents, etc.)
axum = "0.8"
# Tower middleware for the HTTP transport: request body-size cap + per-request
# timeout on the network-reachable RCE endpoint.
tower-http = { version = "0.7", features = ["limit", "timeout"] }
tower = { version = "0.5", features = ["limit"] }

# Schema generation for MCP tools
schemars = "1.2"

# Async runtime - Tokio is the standard
tokio = { version = "1.49", features = ["full"] }

# Serialization - Serde ecosystem
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Error handling - thiserror for library, anyhow for binary
thiserror = "2.0"
anyhow = "1.0"

# Logging and observability
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = "0.2"
time = { version = "0.3.55", default-features = false, features = ["std"] }

# File and system operations
home = "0.5"
sha2 = "0.11.0"
base64 = "0.23"
glob = "0.3"
regex = "1.11"
mime_guess = "2.0"
percent-encoding = "2.3"
memmap2 = "0.9"
tempfile = "3.14"
toml = "1.1"

# Performance and concurrency
rayon = "1.10"

# Unified-diff rendering for the post-edit "Changes" summary in FileWriteOrEdit.
similar = "3"

# Advanced string matching algorithms
portable-pty = "0.9.0"
libc = "0.2"

# Terminal emulation and text processing
vte = "0.15"
strsim = "0.11"

# Lightweight Hugging Face tokenizer.json runtime for the embedded Claude BPE and
# path-ranking Unigram models. Optional conversion/HF features stay disabled.
tokie = { version = "0.1.4", default-features = false }

# gitignore-aware repo walking (ripgrep's engine) for repo context parity with pygit2
ignore = "0.4"
tree-sitter = "0.26.9"
# Symbol/outline extraction (the `Outline` tool) via each grammar's embedded
# TAGS_QUERY — the same engine GitHub uses for code navigation.
tree-sitter-tags = "0.26"
tree-sitter-bash = "0.25.1"
tree-sitter-json = "0.24.8"
tree-sitter-javascript = "0.25.0"
tree-sitter-python = "0.25.0"
tree-sitter-elixir = "0.3.5"
tree-sitter-rust = "0.24.2"
tree-sitter-typescript = "0.23.2"

# Random number generation
rand = "0.10.1"

# CLI
clap = { version = "4.5", features = ["derive"] }
tree-sitter-go = "0.25.0"
tree-sitter-c = "0.24.2"
tree-sitter-cpp = "0.23.4"
tree-sitter-java = "0.23.5"
tree-sitter-ruby = "0.23.1"
tree-sitter-css = "0.25.0"
tree-sitter-html = "0.23.2"
tree-sitter-php = "0.24.2"
tree-sitter-c-sharp = "0.23.5"
tree-sitter-lua = "0.5.0"
vt100 = "0.16"

# Opt-in Landlock filesystem sandbox (WINX_SANDBOX=1). Linux-only LSM, so the
# dep is gated to Linux targets; the runtime env var is the actual gate.
[target.'cfg(target_os = "linux")'.dependencies]
landlock = "0.4"

[dev-dependencies]
tempfile = "3.14"
# Property-based fuzzing of the terminal/ANSI parsers and pure helpers.
proptest = "1.5"
# Statistical micro-benchmarks for the hot pure-processing paths.
criterion = { version = "0.8.2", default-features = false, features = ["cargo_bench_support"] }

# nix 0.28.0's published build dependency expands a macro that current nightly
# reports as future-incompatible. This upstream commit keeps nix at 0.28.0 and
# changes only cfg_aliases 0.1 -> 0.2, removing the warning without changing the
# portable-pty API. Remove after portable-pty publishes against a newer nix.
[patch.crates-io]
nix = { git = "https://github.com/nix-rust/nix", rev = "1def0c05c3d7ac460c3428bb2227cccd01008ccb" }

[dependencies.loom]
# Model-checks the lock-free pin counter (SessionPin) under every thread
# interleaving. Gated behind the `loom` feature (NOT a global `--cfg loom`):
# tokio self-disables `tokio::net` under `cfg(loom)`, which would break axum, so
# we keep loom scoped to just our atomics. Run with:
#   cargo test --features loom --lib loom_
version = "0.7"
optional = true

[features]
default = []
# Swap the SessionPin atomics to loom's instrumented versions for model-checking.
loom = ["dep:loom"]
# Narrow wrappers used only by cargo-fuzz targets; never enabled in release builds.
fuzzing = []

[[bench]]
name = "performance"
harness = false

# Clippy lints for quality
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
todo = "warn"
dbg_macro = "warn"
print_stdout = "warn"
print_stderr = "warn"

# Allow some pedantic lints that are too strict
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"

[lints.rust]
# Unsafe is denied at the crate level after remaining OS/mmap call sites are
# isolated behind narrowly-audited modules.

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true

[profile.dev]
opt-level = 0
debug = true

[profile.test]
opt-level = 0
debug = true