Full CLI per spec v0.2 - add/open/close/edit/status/list/remove/wipe/ completions, plus a hidden `__supervise` subcommand that IS the supervisor process. - profile.rs: TOML-backed profiles at ~/.config/porthole/profiles/, validated -l/-r/-d mapping + --via grammar, atomic writes. - instance.rs: JSON runtime state at ~/.local/state/porthole/, an flock-based lock file that's the source of truth for "is this open" (survives a crash/kill -9 without stale-lock cleanup), pid liveness checked against /proc rather than trusted from disk. - supervisor.rs: the __supervise loop - spawns ssh, traps SIGTERM/SIGINT into a flag (rather than inferring intent from ssh's exit status), classifies failures as fatal/known-transient/unrecognized, backs off with a stability-reset, rotates its log. - ssh.rs: builds the ssh invocation, including splitting --via into a -J jump chain plus the mandatory positional target. - open.rs: the detach/re-exec dance (setsid via pre_exec) and a bounded wait for the supervisor to reach Up/Error before open returns, so an immediate failure surfaces as a non-zero exit instead of a false "opened" - this took a real bug fix during smoke testing, since the instance file's initial state (Reconnecting, meaning "attempt in flight") was indistinguishable from "already failed once" by state alone. - close.rs: SIGTERM+wait, or SIGKILL the whole process group with --force so ssh can't be left orphaned. Smoke-tested against invalid/unreachable hosts (no real infrastructure touched): CLI surface, validation errors, add/edit/list/status/remove, the reconnect/backoff loop with live state transitions, close mid-retry, edit-while-running's warning, open --all, and wipe. cargo test: 14/14. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
441 lines
11 KiB
TOML
441 lines
11 KiB
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "anstream"
|
|
version = "1.0.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
|
|
dependencies = [
|
|
"anstyle",
|
|
"anstyle-parse",
|
|
"anstyle-query",
|
|
"anstyle-wincon",
|
|
"colorchoice",
|
|
"is_terminal_polyfill",
|
|
"utf8parse",
|
|
]
|
|
|
|
[[package]]
|
|
name = "anstyle"
|
|
version = "1.0.14"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
|
|
|
|
[[package]]
|
|
name = "anstyle-parse"
|
|
version = "1.0.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
|
|
dependencies = [
|
|
"utf8parse",
|
|
]
|
|
|
|
[[package]]
|
|
name = "anstyle-query"
|
|
version = "1.1.5"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
dependencies = [
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "anstyle-wincon"
|
|
version = "3.0.11"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
dependencies = [
|
|
"anstyle",
|
|
"once_cell_polyfill",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "cfg-if"
|
|
version = "1.0.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
|
[[package]]
|
|
name = "clap"
|
|
version = "4.6.6"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
|
|
dependencies = [
|
|
"clap_builder",
|
|
"clap_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "clap_builder"
|
|
version = "4.6.6"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
|
|
dependencies = [
|
|
"anstream",
|
|
"anstyle",
|
|
"clap_lex",
|
|
"strsim",
|
|
]
|
|
|
|
[[package]]
|
|
name = "clap_complete"
|
|
version = "4.6.9"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19"
|
|
dependencies = [
|
|
"clap",
|
|
]
|
|
|
|
[[package]]
|
|
name = "clap_derive"
|
|
version = "4.6.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
|
|
dependencies = [
|
|
"heck",
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "clap_lex"
|
|
version = "1.1.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
|
|
|
|
[[package]]
|
|
name = "colorchoice"
|
|
version = "1.0.5"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
|
|
[[package]]
|
|
name = "dirs"
|
|
version = "6.0.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
|
|
dependencies = [
|
|
"dirs-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "dirs-sys"
|
|
version = "0.5.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
|
|
dependencies = [
|
|
"libc",
|
|
"option-ext",
|
|
"redox_users",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "equivalent"
|
|
version = "1.0.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
|
|
[[package]]
|
|
name = "getrandom"
|
|
version = "0.2.17"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
|
|
dependencies = [
|
|
"cfg-if",
|
|
"libc",
|
|
"wasi",
|
|
]
|
|
|
|
[[package]]
|
|
name = "hashbrown"
|
|
version = "0.17.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
|
|
[[package]]
|
|
name = "heck"
|
|
version = "0.5.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
|
[[package]]
|
|
name = "indexmap"
|
|
version = "2.14.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
|
dependencies = [
|
|
"equivalent",
|
|
"hashbrown",
|
|
]
|
|
|
|
[[package]]
|
|
name = "is_terminal_polyfill"
|
|
version = "1.70.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
|
|
[[package]]
|
|
name = "itoa"
|
|
version = "1.0.18"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
|
[[package]]
|
|
name = "libc"
|
|
version = "0.2.189"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
|
|
[[package]]
|
|
name = "libredox"
|
|
version = "0.1.19"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa"
|
|
dependencies = [
|
|
"libc",
|
|
]
|
|
|
|
[[package]]
|
|
name = "memchr"
|
|
version = "2.8.3"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
|
|
[[package]]
|
|
name = "once_cell_polyfill"
|
|
version = "1.70.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
|
|
[[package]]
|
|
name = "option-ext"
|
|
version = "0.2.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
|
|
|
[[package]]
|
|
name = "porthole"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"clap",
|
|
"clap_complete",
|
|
"dirs",
|
|
"libc",
|
|
"serde",
|
|
"serde_json",
|
|
"thiserror",
|
|
"toml",
|
|
]
|
|
|
|
[[package]]
|
|
name = "proc-macro2"
|
|
version = "1.0.107"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
dependencies = [
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "quote"
|
|
version = "1.0.47"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "redox_users"
|
|
version = "0.5.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
|
dependencies = [
|
|
"getrandom",
|
|
"libredox",
|
|
"thiserror",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
dependencies = [
|
|
"serde_core",
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_core"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
dependencies = [
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_derive"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_json"
|
|
version = "1.0.151"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
dependencies = [
|
|
"itoa",
|
|
"memchr",
|
|
"serde",
|
|
"serde_core",
|
|
"zmij",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_spanned"
|
|
version = "0.6.9"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
|
|
dependencies = [
|
|
"serde",
|
|
]
|
|
|
|
[[package]]
|
|
name = "strsim"
|
|
version = "0.11.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
|
|
[[package]]
|
|
name = "syn"
|
|
version = "3.0.3"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror"
|
|
version = "2.0.20"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
dependencies = [
|
|
"thiserror-impl",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror-impl"
|
|
version = "2.0.20"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "toml"
|
|
version = "0.8.23"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
|
|
dependencies = [
|
|
"serde",
|
|
"serde_spanned",
|
|
"toml_datetime",
|
|
"toml_edit",
|
|
]
|
|
|
|
[[package]]
|
|
name = "toml_datetime"
|
|
version = "0.6.11"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
|
|
dependencies = [
|
|
"serde",
|
|
]
|
|
|
|
[[package]]
|
|
name = "toml_edit"
|
|
version = "0.22.27"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
|
|
dependencies = [
|
|
"indexmap",
|
|
"serde",
|
|
"serde_spanned",
|
|
"toml_datetime",
|
|
"toml_write",
|
|
"winnow",
|
|
]
|
|
|
|
[[package]]
|
|
name = "toml_write"
|
|
version = "0.1.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
|
|
|
|
[[package]]
|
|
name = "unicode-ident"
|
|
version = "1.0.24"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
|
[[package]]
|
|
name = "utf8parse"
|
|
version = "0.2.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
|
|
[[package]]
|
|
name = "wasi"
|
|
version = "0.11.1+wasi-snapshot-preview1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
|
[[package]]
|
|
name = "windows-link"
|
|
version = "0.2.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
|
|
[[package]]
|
|
name = "windows-sys"
|
|
version = "0.61.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
dependencies = [
|
|
"windows-link",
|
|
]
|
|
|
|
[[package]]
|
|
name = "winnow"
|
|
version = "0.7.15"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
dependencies = [
|
|
"memchr",
|
|
]
|
|
|
|
[[package]]
|
|
name = "zmij"
|
|
version = "1.0.23"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|