Files
Myles AndersonandClaude Opus 5.5 395ec53748 OR-349: Retry rate-limited literature requests with a clear wait message (#481)
* OR-349: Retry rate-limited literature requests with a clear wait message

alphaXiv, OpenAlex, bioRxiv and arXiv requests failed on the first 429,
so parallel agent calls to `orx paper`/`orx discover` gave up mid-analysis.
PubMed's existing retry becomes a shared `public_get` used by every keyless
literature request: up to 3 attempts honoring Retry-After (1s/2s backoff
without it), failing fast with "retry in Ns" when the host asks for longer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Honor HTTP-date Retry-After and randomize retry jitter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:33:50 -07:00

122 lines
5.6 KiB
TOML

[package]
name = "openresearch-cli"
version = "0.2.14"
edition = "2021"
description = "OpenResearch CLI (orx) — Rust port"
repository = "https://github.com/alphaXiv/OpenResearch"
license = "MIT"
[[bin]]
name = "orx"
path = "src/main.rs"
[features]
# The Linux desktop app: a glibc build linking WebKitGTK (see linux/). Off by
# default so the static musl CLI builds stay free of GTK. macOS and Windows
# always build the app.
desktop = ["dep:tao", "dep:wry", "dep:gtk", "dep:png"]
[dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "io-std", "time", "fs", "process", "sync", "signal"] }
tokio-util = { version = "0.7", features = ["io"] }
# rustls instead of the default native-tls: avoids an OpenSSL dependency so the
# static musl Linux builds link cleanly (native-tls/openssl won't build for musl).
# Both root sets are enabled: webpki-roots keeps the bundled Mozilla list (so a
# container with no OS trust store still works), and native-roots additionally
# loads the OS store, which is where a TLS-inspecting proxy's CA lives. reqwest
# merges both into one root store, so this is additive.
reqwest = { version = "0.12", default-features = false, features = ["json", "charset", "http2", "rustls-tls-webpki-roots", "rustls-tls-native-roots", "stream"] }
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
anyhow = "1"
dirs = "5"
# bundled: compiles SQLite from source so the static musl builds link cleanly
# (same reasoning as rustls above — no system library dependency).
rusqlite = { version = "0.32", features = ["bundled", "backup"] }
urlencoding = "2"
httpdate = "1"
uuid = { version = "1", features = ["v4"] }
semver = "1"
fd-lock = "4"
base64 = "0.22"
# Extract user-uploaded skills shipped as a .zip of a SKILL.md folder. Lean:
# deflate only, no bzip2/zstd/time/aes.
zip = { version = "2", default-features = false, features = ["deflate"] }
# `orx up` dashboard: axum for routing/SSE, rust-embed for the SPA, futures for
# the stream plumbing. TLS-free, so the rustls-only musl build stays intact.
axum = { version = "0.8", features = ["ws"] }
hyper = { version = "1", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["tokio"] }
rust-embed = "8"
futures = "0.3"
portable-pty = "0.9"
# async fns in the Harness trait (object-safe `dyn Harness` in the registry).
async-trait = "0.1"
sha2 = "0.10"
# Import the Overleaf editor session cookie from a local browser store, so the
# user need not paste it. Chromium on macOS encrypts cookies with AES-128-CBC
# under a Keychain-held key (PBKDF2-HMAC-SHA1). Pure-Rust RustCrypto crates, so
# the static musl builds are untouched.
aes = "0.8"
cbc = "0.1"
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
sha1 = "0.10"
# Overleaf live sync speaks the editor's socket.io channel. rustls for the same
# musl reasons as reqwest above; already in the tree via axum. Native roots
# trust a corporate CA on direct websocket connections.
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots", "rustls-tls-native-roots"] }
# File identity for Windows' hard-link fallback (native_store.rs); already in the tree via walkdir.
same-file = "1.0"
# PubMed efetch serves abstracts only as XML.
roxmltree = "0.21"
[target.'cfg(unix)'.dependencies]
# Free-space pre-check for the data-dir move (statvfs). Already in the tree
# transitively; taken as a direct dep only on unix, where we call it.
libc = "0.2"
[target.'cfg(windows)'.dependencies]
# Win32 calls std lacks: run liveness, console ownership, the error dialog, PE
# version-resource reads (GetFileVersionInfoW / VerQueryValueW — the spawn-free
# `--version` fast path in harness detection), and the desktop app's single
# instance and taskbar identity. Already in the tree.
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Credentials", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Console", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
[target.'cfg(any(target_os = "macos", windows))'.dependencies]
# Desktop app mode (src/commands/app.rs): the dashboard in its own window. tao
# owns the run loop on the main thread, wry hosts the dashboard in the system
# webview (WKWebView, WebView2), and rfd shows the save panel.
tao = "0.37"
wry = "0.57"
rfd = "0.17"
[target.'cfg(target_os = "linux")'.dependencies]
# The same, behind the `desktop` feature: WebKitGTK, png for the window icon,
# and gtk (tao's version) for the save dialog. Not rfd: its GTK backend runs on a
# thread of its own, which deadlocks against tao's hold on the main context.
tao = { version = "0.37", optional = true }
wry = { version = "0.57", optional = true }
gtk = { version = "0.18", optional = true }
png = { version = "0.18", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
# muda builds the menu bar, and objc2-app-kit's NSAlert backs `window.confirm`.
objc2 = "0.6"
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSAlert", "NSApplication", "NSButton", "NSControl", "NSResponder", "NSView"] }
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSString"] }
muda = "0.20"
# `window.confirm` panel added to wry's WKUIDelegate (src/commands/app.rs).
block2 = "0.6"
[build-dependencies]
# Embeds the Windows icon in orx.exe; a no-op for other targets.
embed-resource = "3"
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"