Files
openhuman/Cargo.toml
T
c5e5ae170c ci: speed up GitHub Actions builds (~14m → ~3-5m warm) (#136)
* chore: add CI profile for faster compilation in Cargo.toml files

- Introduced a new `[profile.ci]` section in both root and Tauri Cargo.toml files to optimize build settings for continuous integration.
- Adjusted compilation parameters to prioritize speed over runtime performance, including reduced optimization level and enabled code generation units.

* refactor(tests): update agent test setup to return temporary directory

- Modified the `build_agent_with` function calls in the agent tests to return a temporary directory alongside the agent instance, improving resource management during tests.
- Ensured consistency in test setup across multiple test functions.

* chore: update .gitignore to include fastembed_cache

- Added 'workflow' and '.fastembed_cache' to the .gitignore file to prevent unnecessary files from being tracked in the repository.

* test: enhance dispatch routing tests with panic handling

Updated the `dispatch_routes_memory_doc_ingest` test to use `AssertUnwindSafe` and `catch_unwind` for better handling of potential panics during execution. This ensures that the test verifies route existence even if the handler encounters a panic, improving robustness against shared state issues in concurrent tests.

* ci: speed up builds with rust-cache, sccache, mold linker, and CI profile

- Replace manual Cargo registry cache with Swatinem/rust-cache@v2 (caches
  target/ directories for both core and Tauri crates)
- Add mozilla-actions/sccache for cross-branch compilation caching
- Install mold linker on Linux for faster linking
- Use --profile ci for sidecar build (opt-level 1, codegen-units 16)
- Override release profile env vars for Tauri build with CI-tuned settings
- Add --bundles none to CI build (skip unused deb/appimage packaging)
- Restrict push triggers to main branch only (PRs already cover feature
  branches, preventing duplicate runs)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): unset RUSTC_WRAPPER for cargo fmt to avoid sccache errors

The sccache-action sets RUSTC_WRAPPER globally for the job. cargo fmt
invokes rustc through sccache which fails if the GHA cache service is
unavailable. Clear RUSTC_WRAPPER for fmt steps and remove redundant
per-step env overrides (the action already sets them job-wide).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: implement Default trait for various structs and enums

- Added Default implementations for ConnectionStatus, AgentBuilder, NativeRuntime, AutocompleteEngine, CliChannel, ActionTracker, SkillStatus, and ExtractionMode to streamline object initialization.
- Simplified condition checks in several places by replacing map_or with is_some_and and is_none_or for better readability and performance.
- Updated various instances of string handling in message sending to remove unnecessary conversions.

This refactor enhances code clarity and consistency across the codebase.

* style: clean up whitespace and improve code formatting

- Removed unnecessary blank lines in several files to enhance code readability.
- Simplified condition checks by consolidating method calls into single lines for better clarity.
- Improved formatting in various functions to maintain consistency across the codebase.

* fix(ci): use --bundles deb instead of unsupported none value

Tauri CLI on this version doesn't support 'none' as a bundle type.
Use 'deb' as the lightest single bundle to minimize packaging time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add Dockerfile and CI workflows for building and pushing Docker images

- Introduced a Dockerfile to set up a CI environment with necessary dependencies for Tauri, Rust, Node.js, and sccache.
- Created a new workflow to build and push the CI Docker image to GitHub Container Registry on main branch pushes.
- Updated existing workflows to utilize the new Docker image for building and testing, enhancing consistency and efficiency in CI processes.

* chore(ci): update container image references in CI workflows

- Removed unnecessary permissions for packages in build, test, and typecheck workflows.
- Updated container image references to use a specific digest instead of the latest tag for improved stability and reproducibility in CI processes.

* fix(ci): use correct amd64 Docker image digest

Previous digest was from arm64 build (Mac). Rebuilt with
--platform linux/amd64 for GitHub Actions runners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): use tag instead of digest for Docker image reference

GHCR doesn't support pulling OCI index manifests by digest reliably.
Use the rust-1.93.0 tag which is pinned to a specific Rust version
and resolves correctly on amd64 CI runners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): rename Docker package to openhuman_ci

Move from nested ghcr.io/tinyhumansai/openhuman/ci-runner to
ghcr.io/tinyhumansai/openhuman_ci to avoid GHCR nested package
manifest resolution issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): remove sccache env vars from container jobs

sccache can't access the GHA cache API from inside a Docker container
(missing ACTIONS_CACHE_URL/ACTIONS_RUNTIME_TOKEN). Swatinem/rust-cache
already caches target/ which provides the main build speedup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update installer smoke workflow to trigger on main branch pushes

- Added a trigger for the installer smoke workflow to run on pushes to the main branch, enhancing CI coverage for mainline changes.

* fix: enhance Sentry DSN retrieval logic

- Updated the Sentry DSN retrieval process to include an additional fallback option using `option_env!`, ensuring that the DSN can be sourced from both environment variables and optional configuration, improving robustness in observability setup.

* chore: add OPENHUMAN_SENTRY_DSN to release workflow and example secrets

- Included the OPENHUMAN_SENTRY_DSN variable in the release workflow configuration to enhance observability setup.
- Updated the ci-secrets.example.json file to include a placeholder for OPENHUMAN_SENTRY_DSN, providing clarity for developers on required environment variables.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 14:16:12 -07:00

133 lines
5.2 KiB
TOML

[package]
name = "openhuman"
version = "0.49.17"
edition = "2021"
description = "OpenHuman core business logic and RPC server"
autobins = false
[[bin]]
name = "openhuman-core"
path = "src/main.rs"
[lib]
name = "openhuman_core"
crate-type = ["rlib"]
[dependencies]
rquickjs = { version = "0.9", features = ["futures", "parallel"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls", "native-tls", "stream", "http2", "multipart", "socks"] }
tokio = { version = "1", features = ["full", "sync"] }
once_cell = "1.19"
parking_lot = "0.12"
log = "0.4"
nu-ansi-term = "0.46"
env_logger = "0.11"
base64 = "0.22"
aes-gcm = "0.10"
argon2 = "0.5"
rand = "0.9"
dirs = "5"
sha2 = "0.10"
hmac = "0.12"
uuid = { version = "1", features = ["v4"] }
anyhow = "1.0"
async-trait = "0.1"
chacha20poly1305 = "0.10"
hex = "0.4"
fastembed = { version = "5.13", default-features = false, features = ["hf-hub-native-tls", "ort-load-dynamic"] }
ort = { version = "=2.0.0-rc.11", default-features = false, features = ["std", "ndarray", "load-dynamic"] }
tokio-util = { version = "0.7", features = ["rt"] }
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }
futures = "0.3"
rusqlite = { version = "0.37", features = ["bundled"] }
chrono = { version = "0.4", features = ["serde"] }
cron = "0.12"
futures-util = "0.3"
directories = "6"
toml = "1.0"
shellexpand = "3.1"
schemars = "1.2"
tracing = { version = "0.1", default-features = false }
tracing-log = "0.2"
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter"] }
prometheus = { version = "0.14", default-features = false }
urlencoding = "2.1"
thiserror = "2.0"
ring = "0.17"
prost = { version = "0.14", default-features = false }
postgres = { version = "0.19", features = ["with-chrono-0_4"] }
chrono-tz = "0.10"
dialoguer = { version = "0.12", features = ["fuzzy-select"] }
console = "0.16"
glob = "0.3"
regex = "1.10"
ndarray = "0.17.2"
tokenizers = "0.21.0"
hostname = "0.4.2"
rustyline = { version = "15", features = ["with-file-history"] }
rustls = { version = "0.23", features = ["ring"] }
rustls-pki-types = "1.14.0"
tokio-rustls = "0.26.4"
webpki-roots = "1.0.6"
sysinfo = { version = "0.33", default-features = false, features = ["system"] }
clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.5"
lettre = { version = "0.11.19", default-features = false, features = ["builder", "smtp-transport", "rustls-tls"] }
mail-parser = "0.11.2"
async-imap = { version = "0.11", features = ["runtime-tokio"], default-features = false }
axum = { version = "0.8", default-features = false, features = ["http1", "json", "tokio", "query", "ws", "macros"] }
tower = { version = "0.5", default-features = false }
opentelemetry = { version = "0.31", default-features = false, features = ["trace", "metrics"] }
opentelemetry_sdk = { version = "0.31", default-features = false, features = ["trace", "metrics"] }
opentelemetry-otlp = { version = "0.31", default-features = false, features = ["trace", "metrics", "http-proto", "reqwest-client", "reqwest-rustls-webpki-roots"] }
sentry = { version = "0.47.0", default-features = false, features = ["backtrace", "contexts", "panic", "tracing", "reqwest", "rustls"] }
tokio-stream = { version = "0.1.18", features = ["full"] }
url = "2"
socketioxide = { version = "0.15", features = ["extensions"] }
matrix-sdk = { version = "0.16", optional = true, default-features = false, features = ["e2e-encryption", "rustls-tls", "markdown"] }
fantoccini = { version = "0.22.0", optional = true, default-features = false, features = ["rustls-tls"] }
serde-big-array = { version = "0.5", optional = true }
nusb = { version = "0.2", default-features = false, optional = true }
tokio-serial = { version = "5", default-features = false, optional = true }
probe-rs = { version = "0.30", optional = true }
pdf-extract = { version = "0.10", optional = true }
wa-rs = { version = "0.2", optional = true, default-features = false }
wa-rs-core = { version = "0.2", optional = true, default-features = false }
wa-rs-binary = { version = "0.2", optional = true, default-features = false }
wa-rs-proto = { version = "0.2", optional = true, default-features = false }
wa-rs-ureq-http = { version = "0.2", optional = true }
wa-rs-tokio-transport = { version = "0.2", optional = true, default-features = false }
[target.'cfg(target_os = "linux")'.dependencies]
landlock = { version = "0.4", optional = true }
rppal = { version = "0.22", optional = true }
[dev-dependencies]
tempfile = "3"
[features]
sandbox-landlock = ["dep:landlock"]
sandbox-bubblewrap = []
hardware = ["dep:nusb", "dep:tokio-serial"]
channel-matrix = ["dep:matrix-sdk"]
peripheral-rpi = ["dep:rppal"]
browser-native = ["dep:fantoccini"]
fantoccini = ["browser-native"]
landlock = ["sandbox-landlock"]
probe = ["dep:probe-rs"]
rag-pdf = ["dep:pdf-extract"]
whatsapp-web = ["dep:wa-rs", "dep:wa-rs-core", "dep:wa-rs-binary", "dep:wa-rs-proto", "dep:wa-rs-ureq-http", "dep:wa-rs-tokio-transport", "serde-big-array"]
# Fast CI builds: trade runtime perf for compile speed
[profile.ci]
inherits = "release"
opt-level = 1
codegen-units = 16
lto = false
incremental = false
strip = true
debug = false