[package] name = "jcode-app-core" version = "0.1.0" edition = "2024" publish = false # Application core for jcode: all non-presentation modules (server, agent, # provider, auth, session, tool, config, etc.) extracted out of the monolithic # root `jcode` crate so they compile as a separate rustc unit. The root `jcode` # crate (cli + tui + bin) re-exports this crate's modules via `pub use # jcode_app_core::*`, preserving every existing `crate::` path. [lib] name = "jcode_app_core" path = "src/lib.rs" [dependencies] # NOTE: the jemalloc allocator stats live in `jcode-base` (process_memory) and # local embeddings live in `jcode-base` (embedding); this crate forwards those # features to jcode-base rather than depending on the backing crates directly. # Async runtime tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] } tokio-util = { version = "0.7", features = ["rt"] } futures = "0.3" async-trait = "0.1" # HTTP client reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "blocking", "charset", "http2", "system-proxy", "rustls-tls", "rustls-tls-native-roots"] } # Serialization serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["raw_value"] } # CLI # File operations glob = "0.3" similar = "2" # diffing for edits # Utilities dirs = "5" # home directory anyhow = "1" libc = "0.2" # Unix system calls (flock) chrono = { version = "0.4", features = ["serde"] } regex = "1" urlencoding = "2" # URL encoding for web search uuid = { version = "1", features = ["v4", "v5"] } # Embeddings (local inference) live in jcode-base; this crate forwards the # `embeddings` feature to jcode-base rather than depending on jcode-embedding. jcode-import-core = { path = "../jcode-import-core" } # OAuth base64 = "0.22" sha2 = "0.10" rand = "0.9.3" url = "2" open = "5" # Open URLs in browser jcode-agent-runtime = { path = "../jcode-agent-runtime" } jcode-ambient-types = { path = "../jcode-ambient-types" } jcode-notify-email = { path = "../jcode-notify-email" } jcode-provider-core = { path = "../jcode-provider-core" } # NOTE: jcode-app-core does NOT depend on any jcode-tui-* crate. They were # unused dead dependency edges here (the TUI declares them itself). Removing # them stops a jcode-tui-* edit from cascading a recompile through app-core. jcode-update-core = { path = "../jcode-update-core" } jcode-terminal-image = { path = "../jcode-terminal-image" } # Streaming tokio-stream = "0.1" # TUI ratatui = "0.30" crossterm = { version = "0.29", features = ["event-stream"] } # Markdown & syntax highlighting unicode-width = "0.2" # Unicode character display width # PDF parsing (behind feature flag) jcode-pdf = { path = "../jcode-pdf", optional = true } jcode-build-support = { path = "../jcode-build-support" } jcode-build-meta = { path = "../jcode-build-meta" } # Foundational layer (provider, auth, config, session, message, memory, ...). # Re-exported via `pub use jcode_base::*` in lib.rs. default-features=false so # this crate controls jcode-base's optional features (see [features] below). jcode-base = { path = "../jcode-base", default-features = false } jcode-core = { path = "../jcode-core" } jcode-message-types = { path = "../jcode-message-types" } jcode-overnight-core = { path = "../jcode-overnight-core" } jcode-plan = { path = "../jcode-plan" } jcode-swarm-core = { path = "../jcode-swarm-core" } jcode-selfdev-types = { path = "../jcode-selfdev-types" } jcode-session-types = { path = "../jcode-session-types" } jcode-setup-hints = { path = "../jcode-setup-hints" } jcode-task-types = { path = "../jcode-task-types" } jcode-tool-core = { path = "../jcode-tool-core" } jcode-tool-types = { path = "../jcode-tool-types" } # Archive extraction (for auto-update) flate2 = "1" tar = "0.4" tempfile = "3" agentgrep = { git = "https://github.com/1jehuang/agentgrep.git", tag = "v0.1.6" } [features] default = ["pdf", "embeddings", "bedrock"] # jemalloc allocator stats live in jcode-base (process_memory); forward there. jemalloc = ["jcode-base/jemalloc"] jemalloc-prof = ["jcode-base/jemalloc-prof"] # local embeddings live in jcode-base (embedding); forward there. embeddings = ["jcode-base/embeddings"] # live AWS Bedrock support lives in jcode-base (provider/bedrock); forward there. bedrock = ["jcode-base/bedrock"] # PDF text extraction lives in this crate (tool/read.rs). pdf = ["dep:jcode-pdf"] # Compiles this crate's test-only helpers/accessors (e.g. the # ExternalAuthReviewCandidate read accessors) as `pub` and forwards # jcode-base's `test-support` so downstream crates' test targets can reach the # whole stack's helpers. Never enabled in normal (non-test) builds. test-support = ["jcode-base/test-support"] [dev-dependencies] # Used by async streaming tests (ambient/runner_tests, server/client_actions_tests). async-stream = "0.3" # Enables jcode-base's test-support helpers (storage::lock_test_env, # auth::test_sandbox, bus::reset_models_updated_publish_state_for_tests) for # *this* crate's own test target. Feature unification applies this only to # test/bench/example builds, not to a normal `cargo build`. jcode-base = { path = "../jcode-base", features = ["test-support"] } [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_System_Threading"] } [target.'cfg(target_os = "macos")'.dependencies] global-hotkey = "0.7" # Native desktop control for the `macos_computer_use` tool (synthetic mouse/keyboard # events, cursor positioning, display bounds). `highsierra` enables the # CGEventCreateScrollWheelEvent2 binding used for scroll. core-graphics = { version = "0.23", features = ["highsierra"] }