host/agent.rs implements every row of the protocol spec's client mapping over reqwest (HTTP) and tokio-tungstenite (attach WebSocket): one-shot execs rebuilt into docker/exec.rs's own OneshotOutput (413 passed through verbatim), detached execs and exit polling with Docker's budget, attach with stdout/stderr channel mapping, exit-frame recording and close_stdin on shutdown, resize, uploads, streamed archive download and health. AgentEndpoint's Debug redacts the token, and no error carries it. docker/exec.rs shares its host-file reader, uid probe, one-shot reassembly and exit-poll budget instead of the agent duplicating them; Docker behaviour is unchanged. Lifecycle stop/remove refuse an agent target, and has_exited is false for one (only the host can confirm). Tests run the client against a small fake agent built with axum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79 lines
2.9 KiB
TOML
79 lines
2.9 KiB
TOML
[package]
|
|
name = "triple-c"
|
|
version = "0.4.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "triple_c_lib"
|
|
crate-type = ["lib", "cdylib", "staticlib"]
|
|
|
|
[[bin]]
|
|
name = "triple-c"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
tauri = { version = "2", features = ["image-png", "image-ico"] }
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-opener = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
bollard = "0.18"
|
|
keyring = { version = "3", features = ["apple-native", "windows-native", "linux-native"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
futures-util = "0.3"
|
|
bytes = "1"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
dirs = "6"
|
|
log = "0.4"
|
|
fern = { version = "0.7", features = ["date-based"] }
|
|
tar = "0.4"
|
|
include_dir = "0.7"
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "multipart"] }
|
|
iana-time-zone = "0.1"
|
|
sha2 = "0.10"
|
|
axum = { version = "0.8", features = ["ws"] }
|
|
# Client side of triple-c-agent's two WebSocket endpoints (host/agent.rs). The
|
|
# same version axum's `ws` already pulls in; plain ws:// only (the transport is
|
|
# loopback or an SSM port-forward), so no TLS features.
|
|
tokio-tungstenite = { version = "0.28", default-features = false, features = ["connect"] }
|
|
# `PollSender`: the agent attach's stdin `AsyncWrite` over a bounded channel.
|
|
# Already in the tree through tokio's ecosystem.
|
|
tokio-util = "0.7"
|
|
tower-http = { version = "0.6", features = ["cors"] }
|
|
base64 = "0.22"
|
|
rand = "0.9"
|
|
local-ip-address = "0.6"
|
|
argon2 = "0.5"
|
|
aes-gcm = "0.10"
|
|
zeroize = "1"
|
|
# WHATWG URL parsing for `url_open`'s re-validation of URLs arriving from the
|
|
# container. Already in the tree transitively (reqwest), and the point of
|
|
# using it rather than hand-rolling is parity with the frontend's `new URL()`.
|
|
url = "2"
|
|
similar = "2"
|
|
# Marketplace repos are fetched on the host into a bare cache (spec §3).
|
|
# Blocking client + rustls: no git binary or OpenSSL needed on the host.
|
|
gix = { version = "0.88", default-features = false, features = ["blocking-network-client", "blocking-http-transport-reqwest-rust-tls", "credentials", "sha1"] }
|
|
|
|
# Linux only: WebKitGTK refuses getUserMedia until the embedder enables media
|
|
# streams and answers the permission request (see src/linux_media.rs). Same
|
|
# version tauri/wry already resolve, so this adds no second copy.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
webkit2gtk = "2.0.2"
|
|
|
|
[dev-dependencies]
|
|
# `test-util` (not part of tokio's `full`) lets the auto-start retry tests run
|
|
# their backoff schedule under a paused clock instead of in real seconds.
|
|
tokio = { version = "1", features = ["full", "test-util"] }
|
|
tempfile = "3"
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
# build.rs reads capabilities/*.json to cross-check them against generate_handler!.
|
|
serde_json = "1"
|
|
|
|
[features]
|
|
default = ["custom-protocol"]
|
|
custom-protocol = ["tauri/custom-protocol"]
|