[package]
name = "execkit"
description = "Stateful, structured, safe shell sessions for AI agents on real infrastructure."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "../../README.md"
keywords = ["ai", "agent", "shell", "pty", "ssh"]
categories = ["development-tools", "command-line-interface", "api-bindings"]

[features]
default = ["ssh"]
# SSH transport. Pulls russh + tokio; disable with `default-features = false`
# for a lean local-PTY-only build.
ssh = ["dep:russh", "dep:tokio"]

[dependencies]
portable-pty.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
regex.workspace = true
# Use the `ring` crypto backend instead of the default `aws-lc-rs`: aws-lc-sys is a
# heavy C/cmake dep that breaks musl/cross prebuilt-binary builds. `rsa` is kept for
# RSA key auth; `flate2` for compression (russh defaults, minus aws-lc-rs).
russh = { version = "0.61", optional = true, default-features = false, features = [
    "ring",
    "flate2",
    "rsa",
] }
tokio = { version = "1", features = ["rt", "macros", "sync", "io-util", "net", "time"], optional = true }

[lib]
name = "execkit"
path = "src/lib.rs"

# The ssh example uses Session::ssh, which only exists with the ssh feature.
[[example]]
name = "ssh"
required-features = ["ssh"]

# docs.rs: build with all features so SSH APIs are documented.
[package.metadata.docs.rs]
all-features = true

# A library, not a binary - exclude from prebuilt-binary distribution (cargo-dist).
[package.metadata.dist]
dist = false
