Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
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
75 changes: 59 additions & 16 deletions Cargo.lock

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

21 changes: 15 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "3"
members = ["app/cli", "app/client", "app/gateway", "app/hub", "app/protocol", "crates/*", "crates/llm/deepseek"]
members = ["app/*", "crates/*", "llm/*"]

[workspace.package]
version = "0.0.9"
Expand All @@ -11,14 +11,17 @@ repository = "https://github.com/clearloop/walrus"
keywords = ["llm", "agent", "ai"]

[workspace.dependencies]
deepseek = { path = "crates/llm/deepseek", package = "walrus-deepseek", version = "0.0.9" }
llm = { path = "crates/llm", package = "walrus-llm", version = "0.0.9" }
agent = { path = "crates/core", package = "walrus-core", version = "0.0.9" }
deepseek = { path = "llm/deepseek", package = "walrus-deepseek", version = "0.0.9" }
openai = { path = "llm/openai", package = "walrus-openai", version = "0.0.9" }
claude = { path = "llm/claude", package = "walrus-claude", version = "0.0.9" }
mistral = { path = "llm/mistral", package = "walrus-mistral", version = "0.0.9" }
llm = { path = "crates/llm", package = "walrus-llm", version = "0.0.9", default-features = true }
wcore = { path = "crates/core", package = "walrus-core", version = "0.0.9" }
runtime = { path = "crates/runtime", package = "walrus-runtime", version = "0.0.9" }
sqlite = { path = "crates/sqlite", package = "walrus-sqlite", version = "0.0.9" }
telegram = { path = "crates/telegram", package = "walrus-telegram", version = "0.0.9" }
protocol = { path = "app/protocol", package = "walrus-protocol", version = "0.0.9" }
gateway = { path = "app/gateway", package = "walrus-gateway", version = "0.0.9" }
daemon = { path = "app/daemon", package = "walrus-daemon", version = "0.0.9" }
client = { path = "app/client", package = "walrus-client", version = "0.0.9" }

# crates.io
Expand All @@ -36,7 +39,13 @@ serde_json = "1"
serde_yaml = "0.9"
smallvec = { version = "1", features = ["serde"] }
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "io-util", "net"] }
tokio = { version = "1", features = [
"rt-multi-thread",
"macros",
"signal",
"io-util",
"net",
] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
dotenvy = "0.15"
Expand Down
7 changes: 5 additions & 2 deletions app/gateway/Cargo.toml → app/daemon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "walrus-gateway"
name = "walrus-daemon"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -13,8 +13,11 @@ path = "src/bin/main.rs"

[dependencies]
runtime = { workspace = true }
agent = { workspace = true }
wcore = { workspace = true }
deepseek = { workspace = true }
openai = { workspace = true }
claude = { workspace = true }
mistral = { workspace = true }
sqlite = { workspace = true }
llm = { workspace = true }
protocol = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions app/gateway/src/bin/main.rs → app/daemon/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use anyhow::Result;
use tokio::signal;
use tracing_subscriber::EnvFilter;
use walrus_gateway::config;
use walrus_daemon::config;

#[tokio::main]
async fn main() -> Result<()> {
Expand All @@ -20,7 +20,7 @@ async fn main() -> Result<()> {
tracing::info!("created config directory at {}", config_dir.display());
}

let handle = walrus_gateway::serve(&config_dir, None).await?;
let handle = walrus_daemon::serve(&config_dir, None).await?;
tracing::info!("walrusd listening on {}", handle.socket_path.display());

signal::ctrl_c().await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//! and channel ID with three-tier fallback: exact match, platform
//! catch-all, default agent (DD#3).

use agent::Platform;
use compact_str::CompactString;
use wcore::Platform;

/// A routing rule mapping platform/channel to an agent.
#[derive(Debug, Clone)]
Expand Down
32 changes: 32 additions & 0 deletions app/gateway/src/config.rs → app/daemon/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,53 @@ pub struct ServerConfig {
/// LLM provider configuration.
#[derive(Debug, Serialize, Deserialize)]
pub struct LlmConfig {
/// Which LLM provider to use.
#[serde(default)]
pub provider: ProviderKind,
/// Model identifier.
pub model: CompactString,
/// API key (supports `${ENV_VAR}` expansion).
#[serde(default)]
pub api_key: String,
/// Optional base URL override for the provider endpoint.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub base_url: Option<String>,
}

impl Default for LlmConfig {
fn default() -> Self {
Self {
provider: ProviderKind::DeepSeek,
model: "deepseek-chat".into(),
api_key: "${DEEPSEEK_API_KEY}".to_owned(),
base_url: None,
}
}
}

/// Supported LLM provider kinds.
#[derive(Debug, Default, Serialize, Deserialize, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum ProviderKind {
/// DeepSeek API (default).
#[default]
DeepSeek,
/// OpenAI API.
OpenAI,
/// Grok (xAI) API — OpenAI-compatible.
Grok,
/// Qwen (Alibaba DashScope) API — OpenAI-compatible.
Qwen,
/// Kimi (Moonshot) API — OpenAI-compatible.
Kimi,
/// Ollama local API — OpenAI-compatible, no key required.
Ollama,
/// Claude (Anthropic) Messages API.
Claude,
/// Mistral chat completions API.
Mistral,
}

/// Memory backend configuration.
#[derive(Debug, Default, Serialize, Deserialize)]
#[serde(default)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//! Wraps [`InMemory`] and [`SqliteMemory<NoEmbedder>`] with Memory trait
//! delegation, following the Provider enum pattern (DD#22).

use agent::{InMemory, Memory, MemoryEntry, NoEmbedder, RecallOptions};
use anyhow::Result;
use sqlite::SqliteMemory;
use std::future::Future;
use wcore::{InMemory, Memory, MemoryEntry, NoEmbedder, RecallOptions};

/// Memory backend selected from configuration.
///
Expand Down
Loading