Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jaynshare"
version = "2.3.3"
version = "2.4.0"
edition = "2024"
rust-version = "1.95"
publish = false
Expand Down Expand Up @@ -39,7 +39,7 @@ x509-parser = { version = "0.16", features = ["verify"] }
uuid = { version = "1", features = ["v4", "serde"] }
# The enrollment bundle and client kit are ZIP archives; stored plus deflate
# covers what the release tooling produces.
zip = { version = "4", default-features = false, features = ["deflate"] }
zip = { version = "9", default-features = false, features = ["deflate"] }
# The Linux platform archive is a `.tar.gz`; native install reads it.
flate2 = "1"
tar = { version = "0.4", default-features = false }
Expand Down
11 changes: 6 additions & 5 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `anstyle-parse` | 1.0.0 | MIT OR Apache-2.0 | https://github.com/rust-cli/anstyle.git |
| `anstyle-query` | 1.1.5 | MIT OR Apache-2.0 | https://github.com/rust-cli/anstyle.git |
| `anstyle-wincon` | 3.0.11 | MIT OR Apache-2.0 | https://github.com/rust-cli/anstyle.git |
| `arbitrary` | 1.4.2 | MIT OR Apache-2.0 | https://github.com/rust-fuzz/arbitrary/ |
| `asn1-rs` | 0.6.2 | MIT OR Apache-2.0 | https://github.com/rusticata/asn1-rs.git |
| `asn1-rs-derive` | 0.5.1 | MIT OR Apache-2.0 | https://github.com/rusticata/asn1-rs.git |
| `asn1-rs-impl` | 0.2.0 | MIT/Apache-2.0 | https://github.com/rusticata/asn1-rs.git |
Expand All @@ -27,6 +26,7 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `bytes` | 1.12.1 | MIT | https://github.com/tokio-rs/bytes |
| `cc` | 1.4.6 | MIT OR Apache-2.0 | https://github.com/rust-lang/cc-rs |
| `cfg-if` | 1.0.4 | MIT OR Apache-2.0 | https://github.com/rust-lang/cfg-if |
| `cfg_aliases` | 0.2.2 | MIT | https://github.com/katharostech/cfg_aliases |
| `clap` | 4.6.7 | MIT OR Apache-2.0 | https://github.com/clap-rs/clap |
| `clap_builder` | 4.6.7 | MIT OR Apache-2.0 | https://github.com/clap-rs/clap |
| `clap_derive` | 4.6.7 | MIT OR Apache-2.0 | https://github.com/clap-rs/clap |
Expand All @@ -42,7 +42,6 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `data-encoding` | 2.11.1 | MIT | https://github.com/ia0/data-encoding |
| `der-parser` | 9.0.0 | MIT/Apache-2.0 | https://github.com/rusticata/der-parser.git |
| `deranged` | 0.5.8 | MIT OR Apache-2.0 | https://github.com/jhpratt/deranged |
| `derive_arbitrary` | 1.4.2 | MIT OR Apache-2.0 | https://github.com/rust-fuzz/arbitrary |
| `digest` | 0.10.7 | MIT OR Apache-2.0 | https://github.com/RustCrypto/traits |
| `displaydoc` | 0.2.7 | MIT OR Apache-2.0 | https://github.com/yaahc/displaydoc |
| `document-features` | 0.2.12 | MIT OR Apache-2.0 | https://github.com/slint-ui/document-features |
Expand Down Expand Up @@ -87,6 +86,7 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `minimal-lexical` | 0.2.1 | MIT/Apache-2.0 | https://github.com/Alexhuszagh/minimal-lexical |
| `miniz_oxide` | 0.9.1 | MIT OR Zlib OR Apache-2.0 | https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide |
| `mio` | 1.2.3 | MIT | https://github.com/tokio-rs/mio |
| `nix` | 0.31.3 | MIT | https://github.com/nix-rust/nix |
| `nom` | 7.1.3 | MIT | https://github.com/Geal/nom |
| `num-bigint` | 0.4.8 | MIT OR Apache-2.0 | https://github.com/rust-num/num-bigint |
| `num-conv` | 0.2.2 | MIT OR Apache-2.0 | https://github.com/jhpratt/num-conv |
Expand All @@ -111,12 +111,12 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `rtoolbox` | 0.0.6 | Apache-2.0 | https://github.com/conradkleinespel/rtoolbox |
| `rusticata-macros` | 4.1.0 | MIT/Apache-2.0 | https://github.com/rusticata/rusticata-macros.git |
| `rustix` | 1.1.5 | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT | https://github.com/bytecodealliance/rustix |
| `rustls` | 0.23.45 | Apache-2.0 OR ISC OR MIT | https://github.com/rustls/rustls |
| `rustls` | 0.23.46 | Apache-2.0 OR ISC OR MIT | https://github.com/rustls/rustls |
| `rustls-native-certs` | 0.8.4 | Apache-2.0 OR ISC OR MIT | https://github.com/rustls/rustls-native-certs |
| `rustls-pki-types` | 1.15.1 | MIT OR Apache-2.0 | https://github.com/rustls/pki-types |
| `rustls-webpki` | 0.103.15 | ISC | https://github.com/rustls/webpki |
| `rustversion` | 1.0.23 | MIT OR Apache-2.0 | https://github.com/dtolnay/rustversion |
| `ruzstd` | 0.9.0 | MIT | https://github.com/KillingSpark/zstd-rs |
| `ruzstd` | 0.9.1 | MIT | https://github.com/KillingSpark/zstd-rs |
| `schannel` | 0.1.29 | MIT | https://github.com/steffengy/schannel-rs |
| `scopeguard` | 1.2.0 | MIT OR Apache-2.0 | https://github.com/bluss/scopeguard |
| `security-framework` | 3.7.0 | MIT OR Apache-2.0 | https://github.com/kornelski/rust-security-framework |
Expand Down Expand Up @@ -162,6 +162,7 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `tracing-core` | 0.1.36 | MIT | https://github.com/tokio-rs/tracing |
| `tracing-subscriber` | 0.3.23 | MIT | https://github.com/tokio-rs/tracing |
| `try-lock` | 0.2.5 | MIT | https://github.com/seanmonstar/try-lock |
| `typed-path` | 0.12.3 | MIT OR Apache-2.0 | https://github.com/chipsenkbeil/typed-path |
| `typenum` | 1.20.1 | MIT OR Apache-2.0 | https://github.com/paholg/typenum |
| `unicase` | 2.9.0 | MIT OR Apache-2.0 | https://github.com/seanmonstar/unicase |
| `unicode-ident` | 1.0.24 | (MIT OR Apache-2.0) AND Unicode-3.0 | https://github.com/dtolnay/unicode-ident |
Expand Down Expand Up @@ -194,7 +195,7 @@ set is enforced in CI by `cargo-deny` (`deny.toml`).
| `x509-parser` | 0.16.0 | MIT OR Apache-2.0 | https://github.com/rusticata/x509-parser.git |
| `yasna` | 0.5.2 | MIT OR Apache-2.0 | https://github.com/qnighy/yasna.rs |
| `zeroize` | 1.9.0 | Apache-2.0 OR MIT | https://github.com/RustCrypto/utils |
| `zip` | 4.6.1 | MIT | https://github.com/zip-rs/zip2.git |
| `zip` | 9.0.5 | MIT | https://github.com/zip-rs/zip2 |
| `zlib-rs` | 0.6.8 | Zlib | https://github.com/trifectatechfoundation/zlib-rs |
| `zmij` | 1.0.23 | MIT | https://github.com/dtolnay/zmij |
| `zopfli` | 0.8.3 | Apache-2.0 | https://github.com/zopfli-rs/zopfli |
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ updates itself whenever the server does.

`jaynshare claude` and `jaynshare codex` open a picker when the pool cannot
choose for you; `--account <name>` names the account, `--auto` lets the pool
pick, and `--direct` runs the tool outside the pool under your own login.
pick and move the session to another account when its own runs out, and
`--direct` runs the tool outside the pool under your own login.
`jaynshare` alone opens one picker over every pooled account, grouped by tool
with each account's five-hour and weekly usage, and launches the tool of the
account you pick.
Expand Down Expand Up @@ -211,8 +212,8 @@ included, from its next message, without quitting Desktop; a moved
conversation starts without its prompt cache. With `--log`, or when standard
error is not a terminal, it prints one line per request instead. A second
command with the same account and enrollment reuses the running one. With
`--auto`, existing sessions keep their account; an exhausted account returns
an error instead of switching by itself.
`--auto`, a conversation whose account runs out moves to another one by
itself, without its prompt cache; a pinned account returns an error instead.

Chat and Code go through the pool, with the models its accounts offer.
Attachments, Cowork, Chrome, connectors, projects, memory and artifacts are
Expand Down
5 changes: 4 additions & 1 deletion src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ pub fn read_zip(path: &Path) -> Result<BTreeMap<String, Vec<u8>>, String> {
let mut entry = archive
.by_index(index)
.map_err(|e| format!("{}: damaged member: {e}", path.display()))?;
let name = entry.name().to_string();
let name = entry
.name()
.map_err(|e| format!("{}: unreadable member name: {e}", path.display()))?
.into_owned();
if name.starts_with('/') || name.contains("..") || name.contains('\\') {
return Err(format!(
"archive member {name:?} is not a relative kit path"
Expand Down
1 change: 1 addition & 0 deletions src/cli/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ tls = "identity"
# first_byte_timeout_seconds = 120
# [selection]
# switch_threshold = 0.98
# failover = true
# [quota]
# probe_enabled = false
# [logging]
Expand Down
3 changes: 3 additions & 0 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ pub struct QuotaSettings {
pub struct SelectionSettings {
pub switch_threshold: f64,
pub distribute_sessions: bool,
/// An unpinned session moves off an account that cannot serve it.
pub failover: bool,
pub blocked_models: Vec<String>,
pub priorities: Vec<Priority>,
pub routes: Vec<Route>,
Expand Down Expand Up @@ -517,6 +519,7 @@ mod tests {
assert_eq!(c.data_plane.listen.to_string(), DEFAULT_LISTEN);
assert_eq!(c.data_plane.first_byte_timeout_seconds, 120);
assert_eq!(c.selection.switch_threshold, 0.98);
assert!(c.selection.failover);
assert_eq!(c.data_plane.telemetry_policy, TelemetryPolicy::Block);
assert!(c.data_plane.upstream_origin.is_none());
assert_eq!(c.audit.retained_files, 7);
Expand Down
2 changes: 2 additions & 0 deletions src/config/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ impl Validator<'_> {
&[
"switch_threshold",
"distribute_sessions",
"failover",
"blocked_models",
"priorities",
"routes",
Expand Down Expand Up @@ -342,6 +343,7 @@ impl Validator<'_> {
SelectionSettings {
switch_threshold,
distribute_sessions: self.boolean(node, "distribute_sessions", false),
failover: self.boolean(node, "failover", true),
blocked_models: self
.string_array(node, "blocked_models")
.unwrap_or_default(),
Expand Down
Loading
Loading