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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ jobs:
- uses: taiki-e/install-action@cross
- name: Build binary (cross)
if: matrix.use_cross
run: cross build --release --target ${{ matrix.target }}
run: cross build --release --features full --target ${{ matrix.target }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
- name: Build binary (native)
if: "!matrix.use_cross"
run: cargo build --release --target ${{ matrix.target }}
run: cargo build --release --features full --target ${{ matrix.target }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ repository.workspace = true

[features]
default = []
full = ["a2a", "discord", "gateway", "index", "mock", "slack", "tui"]
full = ["a2a", "daemon", "discord", "gateway", "index", "mock", "otel", "pdf", "scheduler", "slack", "stt", "tui"]
a2a = ["dep:zeph-a2a", "zeph-a2a?/server"]
candle = ["zeph-llm/candle", "zeph-core/candle"]
metal = ["zeph-llm/metal", "zeph-core/metal"]
Expand All @@ -127,7 +127,7 @@ slack = ["zeph-channels/slack"]
index = ["dep:zeph-index", "zeph-core/index"]
gateway = ["dep:zeph-gateway"]
daemon = ["zeph-core/daemon"]
scheduler = ["dep:zeph-scheduler"]
scheduler = ["dep:zeph-scheduler", "dep:serde_json"]
otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-opentelemetry"]
pdf = ["zeph-memory/pdf"]
mock = ["zeph-llm/mock", "zeph-memory/mock"]
Expand Down Expand Up @@ -159,6 +159,7 @@ zeph-gateway = { workspace = true, optional = true }
zeph-scheduler = { workspace = true, optional = true }
zeph-tui = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true, features = ["rustls"] }
serde_json = { workspace = true, optional = true }
sqlx = { workspace = true, features = ["runtime-tokio", "sqlite"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/zeph-core/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn remove_pid_file(path: &str) -> std::io::Result<()> {

fn expand_tilde(path: &str) -> String {
if let Some(rest) = path.strip_prefix("~/")
&& let Some(home) = std::env::var_os("HOME")
&& let Some(home) = std::env::var_os("HOME").or_else(|| std::env::var_os("USERPROFILE"))
{
return format!("{}/{rest}", home.to_string_lossy());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/zeph-llm/src/whisper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl std::fmt::Debug for WhisperProvider {
f.debug_struct("WhisperProvider")
.field("base_url", &self.base_url)
.field("model", &self.model)
.finish()
.finish_non_exhaustive()
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/zeph-memory/src/document/loader/pdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ impl DocumentLoader for PdfLoader {
}

let source = path.display().to_string();
let path_buf = path.to_path_buf();
let path_buf = path.clone();
let content = tokio::task::spawn_blocking(move || {
pdf_extract::extract_text(&path_buf).map_err(|e| DocumentError::Pdf(e.to_string()))
})
.await
.map_err(|e| DocumentError::Io(std::io::Error::new(std::io::ErrorKind::Other, e)))??;
.map_err(|e| DocumentError::Io(std::io::Error::other(e)))??;

Ok(vec![Document {
content,
Expand Down
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ use zeph_llm::any::AnyProvider;
#[cfg(feature = "index")]
use zeph_llm::provider::LlmProvider;
#[cfg(feature = "scheduler")]
use zeph_scheduler::{JobStore, ScheduledTask, Scheduler, TaskKind, UpdateCheckHandler};
use zeph_scheduler::{
JobStore, ScheduledTask, Scheduler, TaskHandler, TaskKind, UpdateCheckHandler,
};
#[cfg(feature = "tui")]
use zeph_tui::{App, EventReader, TuiChannel};

Expand Down Expand Up @@ -402,7 +404,7 @@ async fn main() -> anyhow::Result<()> {
config.memory.compaction_preserve_tail,
config.memory.prune_protect_tokens,
)
.with_shutdown(shutdown_rx)
.with_shutdown(shutdown_rx.clone())
.with_security(config.security, config.timeouts)
.with_tool_summarization(config.tools.summarize_output)
.with_permission_policy(permission_policy.clone())
Expand Down Expand Up @@ -1182,7 +1184,7 @@ fn init_subscriber(config_path: &std::path::Path) {
.init();
}

#[cfg(feature = "otel")]
#[cfg(all(feature = "otel", not(feature = "tui")))]
fn setup_otel_tracer(endpoint: &str) -> anyhow::Result<opentelemetry_sdk::trace::SdkTracer> {
use opentelemetry::trace::TracerProvider;
use opentelemetry_otlp::WithExportConfig;
Expand Down
Loading