A static musl binary (agent/, standalone crate) implementing docs/superpowers/specs/2026-11-13-triple-c-agent-protocol.md: one-shot, detached and attached execs (pipes or pty), exec status and resize, file upload, archive download, TCP tunnels and activity counters, all behind a constant-time bearer token. Matches docker exec: same user/initgroups, working directory, env merge (PATH/TERM defaults, HOME/USER/LOGNAME from passwd), 126/127 for commands that cannot start, 128+n for signals, the exact OUTPUT_LIMIT message, and a process group per exec so the limit kill and disconnect SIGHUP reach children. Builds statically for x86_64 and aarch64 musl with no C toolchain (aarch64 via rust-lld); commands in agent/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.4 KiB
TOML
45 lines
1.4 KiB
TOML
[package]
|
|
name = "triple-c-agent"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "In-container agent: docker-exec parity over authenticated HTTP/WebSocket"
|
|
publish = false
|
|
|
|
# Deliberately not part of any workspace: this binary is built for
|
|
# *-unknown-linux-musl and baked into the container image, on its own cadence.
|
|
# The empty table stops cargo from walking up and adopting it into one.
|
|
[workspace]
|
|
|
|
[lib]
|
|
name = "triple_c_agent"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "triple-c-agent"
|
|
path = "src/main.rs"
|
|
|
|
# Pure-Rust only — no TLS, no openssl, nothing with a C build step — so the
|
|
# binary links statically for both musl targets without a C cross toolchain.
|
|
[dependencies]
|
|
axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "json", "query", "ws"] }
|
|
base64 = "0.22"
|
|
bytes = "1"
|
|
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
|
|
libc = "0.2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tar = { version = "0.4", default-features = false }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "process", "io-util", "sync", "time", "fs"] }
|
|
|
|
[dev-dependencies]
|
|
reqwest = { version = "0.12", default-features = false, features = ["json"] }
|
|
tempfile = "3"
|
|
tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect"] }
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|
|
panic = "abort"
|