chore: import upstream snapshot with attribution
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
CI / Quality Guardrails (push) Has been cancelled
CI / Build & Test (macos-latest) (push) Has been cancelled
CI / Build & Test (ubuntu-latest) (push) Has been cancelled
CI / Build & Test (windows-latest) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / PowerShell Syntax (push) Has been cancelled
CI / Windows Cross-Target Check (Linux) (push) Has been cancelled
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
CI / Quality Guardrails (push) Has been cancelled
CI / Build & Test (macos-latest) (push) Has been cancelled
CI / Build & Test (ubuntu-latest) (push) Has been cancelled
CI / Build & Test (windows-latest) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / PowerShell Syntax (push) Has been cancelled
CI / Windows Cross-Target Check (Linux) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
[package]
|
||||
name = "jcode-base"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
publish = false
|
||||
|
||||
# Foundational layer of the jcode application core: the downward-closed set of
|
||||
# modules (provider, auth, config, session, message, memory, telemetry, ...)
|
||||
# that the server/tool/agent layer depends on. Split out of `jcode-app-core` so
|
||||
# the two halves compile as separate rustc units, halving peak compile memory.
|
||||
# `jcode-app-core` re-exports this crate (`pub use jcode_base::*`) so that every
|
||||
# existing `crate::<module>` path keeps resolving unchanged.
|
||||
|
||||
[lib]
|
||||
name = "jcode_base"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
# Memory allocator (reduces fragmentation for long-running server)
|
||||
tikv-jemalloc-ctl = { version = "0.6", optional = true }
|
||||
tikv-jemalloc-sys = { version = "0.6", optional = true }
|
||||
|
||||
# Async runtime
|
||||
tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
|
||||
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"] }
|
||||
tokio-tungstenite = { version = "0.24", default-features = false, features = ["connect", "rustls-tls-native-roots"] }
|
||||
|
||||
# Serialization
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = { version = "1", features = ["raw_value"] }
|
||||
serde_yaml = "0.9"
|
||||
toml = "0.8"
|
||||
|
||||
# File operations
|
||||
|
||||
# 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"] }
|
||||
proctitle = "0.1"
|
||||
|
||||
# Embeddings (local inference) - behind feature flag (163 crates, slow to compile)
|
||||
jcode-embedding = { path = "../jcode-embedding", optional = true }
|
||||
jcode-gateway-types = { path = "../jcode-gateway-types" }
|
||||
jcode-import-core = { path = "../jcode-import-core" }
|
||||
jcode-logging = { path = "../jcode-logging" }
|
||||
|
||||
# OAuth
|
||||
base64 = "0.22"
|
||||
sha2 = "0.10"
|
||||
rand = "0.9.3"
|
||||
hex = "0.4"
|
||||
url = "2"
|
||||
open = "5" # Open URLs in browser
|
||||
jcode-auth-types = { path = "../jcode-auth-types" }
|
||||
jcode-azure-auth = { path = "../jcode-azure-auth" }
|
||||
jcode-agent-runtime = { path = "../jcode-agent-runtime" }
|
||||
jcode-provider-metadata = { path = "../jcode-provider-metadata" }
|
||||
jcode-provider-env = { path = "../jcode-provider-env" }
|
||||
jcode-provider-core = { path = "../jcode-provider-core" }
|
||||
# default-features=false so this crate's `bedrock` feature (below) controls the
|
||||
# AWS SDK stack; the pure model-metadata/credential-detection layer is always on.
|
||||
jcode-provider-bedrock = { path = "../jcode-provider-bedrock", default-features = false }
|
||||
jcode-provider-antigravity = { path = "../jcode-provider-antigravity" }
|
||||
jcode-provider-copilot = { path = "../jcode-provider-copilot" }
|
||||
jcode-provider-openai = { path = "../jcode-provider-openai" }
|
||||
jcode-provider-openrouter = { path = "../jcode-provider-openrouter" }
|
||||
jcode-provider-gemini = { path = "../jcode-provider-gemini" }
|
||||
# NOTE: this foundation layer intentionally does NOT depend on any `jcode-tui-*`
|
||||
# crate. The two pure-data/string symbols it used to reach for (`ResumeTarget`,
|
||||
# `reasoning_line_markup`) were moved to `jcode-session-types` and
|
||||
# `jcode-render-core` respectively, so the layering inversion (foundation
|
||||
# depending on presentation) is gone.
|
||||
jcode-render-core = { path = "../jcode-render-core" }
|
||||
jcode-terminal-launch = { path = "../jcode-terminal-launch" }
|
||||
jcode-terminal-image = { path = "../jcode-terminal-image" }
|
||||
jcode-telemetry-core = { path = "../jcode-telemetry-core" }
|
||||
jcode-usage-types = { path = "../jcode-usage-types" }
|
||||
|
||||
# Streaming
|
||||
|
||||
# Terminal I/O (event stream for interactive auth/secret prompts). NOTE: the
|
||||
# heavier presentation deps (ratatui widgets, arboard clipboard) were dropped
|
||||
# from this foundation layer; they are unused here and live only in `jcode-tui`.
|
||||
crossterm = { version = "0.29", features = ["event-stream"] }
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] } # Only PNG/JPEG (skip avif/rav1e, exr, gif, tiff, etc)
|
||||
|
||||
# NOTE: PDF text extraction (jcode-pdf) lives in the upper jcode-app-core crate
|
||||
# (tool/read.rs), not here.
|
||||
jcode-background-types = { path = "../jcode-background-types" }
|
||||
jcode-batch-types = { path = "../jcode-batch-types" }
|
||||
jcode-build-meta = { path = "../jcode-build-meta" }
|
||||
jcode-compaction-core = { path = "../jcode-compaction-core" }
|
||||
jcode-config-types = { path = "../jcode-config-types" }
|
||||
jcode-core = { path = "../jcode-core" }
|
||||
jcode-memory-types = { path = "../jcode-memory-types" }
|
||||
jcode-message-types = { path = "../jcode-message-types" }
|
||||
jcode-plan = { path = "../jcode-plan" }
|
||||
jcode-protocol = { path = "../jcode-protocol" }
|
||||
jcode-session-types = { path = "../jcode-session-types" }
|
||||
jcode-storage = { path = "../jcode-storage" }
|
||||
jcode-task-types = { path = "../jcode-task-types" }
|
||||
jcode-tool-core = { path = "../jcode-tool-core" }
|
||||
jcode-tool-types = { path = "../jcode-tool-types" }
|
||||
jcode-side-panel-types = { path = "../jcode-side-panel-types" }
|
||||
|
||||
# Gzip decoding (used by provider import/helpers)
|
||||
tempfile = "3"
|
||||
qrcode = { version = "0.14.1", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["embeddings", "bedrock"]
|
||||
# Compiles the in-crate test helpers (storage::lock_test_env,
|
||||
# auth::test_sandbox, bus::reset_models_updated_publish_state_for_tests, ...) as
|
||||
# `pub` so downstream crates' test targets can reach them. Enabled as a
|
||||
# dev-dependency feature by jcode-app-core / jcode / etc.; never in normal
|
||||
# (non-test) builds.
|
||||
test-support = []
|
||||
jemalloc = [
|
||||
"dep:tikv-jemalloc-ctl",
|
||||
"dep:tikv-jemalloc-sys",
|
||||
"tikv-jemalloc-ctl/stats",
|
||||
]
|
||||
jemalloc-prof = [
|
||||
"jemalloc",
|
||||
"tikv-jemalloc-ctl/profiling",
|
||||
]
|
||||
embeddings = ["dep:jcode-embedding"]
|
||||
# Live AWS Bedrock support (the ~20-crate AWS SDK stack) lives in
|
||||
# jcode-provider-bedrock (aws-sdk); forward there. Without it the Bedrock
|
||||
# provider still compiles but live calls return an explanatory error.
|
||||
bedrock = ["jcode-provider-bedrock/aws-sdk"]
|
||||
|
||||
[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"
|
||||
|
||||
[dev-dependencies]
|
||||
# Dev-only cycle (cargo permits dev-dependencies on dependents): base's
|
||||
# MultiProvider routing tests exercise the real OpenRouter/OpenAI-compatible
|
||||
# runtime through the composition-root registry, exactly like the binary.
|
||||
jcode-provider-openrouter-runtime = { path = "../jcode-provider-openrouter-runtime" }
|
||||
Reference in New Issue
Block a user