| 1 |
[package] |
| 2 |
name = "ops-exec" |
| 3 |
version = "0.1.0" |
| 4 |
edition = "2024" |
| 5 |
license = "MIT" |
| 6 |
# Internal shared crate, consumed by path inside this repo and never published. |
| 7 |
# `publish = false` is what makes that a cargo-enforced fact rather than a |
| 8 |
# convention: without it an accidental `cargo publish` is one command away. |
| 9 |
publish = false |
| 10 |
description = "The trusted executor: run a typed, capability-gated step on a host and observe a host, over local exec, SSH, or an in-session agent. Trust root is SSH keys + Tailscale/Headscale only. Used by sando and bento." |
| 11 |
|
| 12 |
[features] |
| 13 |
default = [] |
| 14 |
# AgentRpc transport (the client half) — used by drivers that talk to ops-agent. |
| 15 |
rpc = ["dep:reqwest", "dep:rustls", "dep:serde_json", "dep:futures-util"] |
| 16 |
# The ops-agent binary (the on-host half). Pulls in the HTTP server + rpc. |
| 17 |
agent = ["rpc", "dep:axum", "dep:tokio-stream", "dep:tracing-subscriber", "dep:toml"] |
| 18 |
|
| 19 |
[dependencies] |
| 20 |
tokio = { version = "1.50.0", features = ["macros", "rt-multi-thread", "io-util", "fs", "process", "sync"] } |
| 21 |
async-trait = "0.1.83" |
| 22 |
serde = { version = "1.0.228", features = ["derive"] } |
| 23 |
anyhow = "1.0.102" |
| 24 |
thiserror = "2.0.18" |
| 25 |
tracing = "0.1.44" |
| 26 |
|
| 27 |
# rpc / agent only |
| 28 |
# `rustls-no-provider` rather than `rustls`: the latter is an alias for |
| 29 |
# `__rustls-aws-lc-rs`, which links a C crypto backend. The provider is ring |
| 30 |
# (pure Rust); `AgentRpc::new` installs it, so a consumer that has not chosen |
| 31 |
# one still gets a working client, and one that has keeps its own. |
| 32 |
reqwest = { version = "0.13", default-features = false, features = ["rustls-no-provider", "stream", "json", "query"], optional = true } |
| 33 |
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "logging", "ring"], optional = true } |
| 34 |
serde_json = { version = "1", optional = true } |
| 35 |
futures-util = { version = "0.3", optional = true } |
| 36 |
axum = { version = "0.8.8", optional = true } |
| 37 |
tokio-stream = { version = "0.1", optional = true } |
| 38 |
tracing-subscriber = { version = "0.3.22", features = ["env-filter"], optional = true } |
| 39 |
toml = { version = "1.1", optional = true } |
| 40 |
glob = "0.3.3" |
| 41 |
|
| 42 |
[[bin]] |
| 43 |
name = "ops-agent" |
| 44 |
path = "src/bin/ops-agent.rs" |
| 45 |
required-features = ["agent"] |
| 46 |
|
| 47 |
[dev-dependencies] |
| 48 |
tempfile = "3.20" |
| 49 |
tokio = { version = "1.50.0", features = ["macros", "rt-multi-thread", "time"] } |
| 50 |
|
| 51 |
[lints.rust] |
| 52 |
unused = "warn" |
| 53 |
unreachable_pub = "warn" |
| 54 |
|
| 55 |
[lints.clippy] |
| 56 |
pedantic = { level = "warn", priority = -1 } |
| 57 |
# Allow-list tuned from a measured breakdown across server/multithreaded/pter |
| 58 |
# (2026-07-22). These are the high-churn / low-signal pedantic lints; everything |
| 59 |
# else in `pedantic` stays a warning. Keep this block identical across repos. |
| 60 |
module_name_repetitions = "allow" |
| 61 |
# Doc lints. No docs-completeness push is underway. |
| 62 |
missing_errors_doc = "allow" |
| 63 |
missing_panics_doc = "allow" |
| 64 |
doc_markdown = "allow" |
| 65 |
# Numeric casts. Endemic and mostly intentional in size and byte math. |
| 66 |
cast_possible_truncation = "allow" |
| 67 |
cast_sign_loss = "allow" |
| 68 |
cast_precision_loss = "allow" |
| 69 |
cast_possible_wrap = "allow" |
| 70 |
cast_lossless = "allow" |
| 71 |
# Subjective structure and style nags. High churn, low signal. |
| 72 |
must_use_candidate = "allow" |
| 73 |
too_many_lines = "allow" |
| 74 |
struct_excessive_bools = "allow" |
| 75 |
similar_names = "allow" |
| 76 |
items_after_statements = "allow" |
| 77 |
single_match_else = "allow" |
| 78 |
# Frequent false-positives in TUI and router-heavy code. |
| 79 |
match_same_arms = "allow" |
| 80 |
unnecessary_wraps = "allow" |
| 81 |
type_complexity = "allow" |
| 82 |
|