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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]

### Added
- `zeph-gateway` crate: axum HTTP gateway with POST /webhook ingestion, bearer auth (blake3 + ct_eq), per-IP rate limiting, GET /health endpoint, feature-gated (`gateway`) (#379)
- `zeph-core::daemon` module: component supervisor with health monitoring, PID file management, graceful shutdown, feature-gated (`daemon`) (#380)
- `zeph-scheduler` crate: cron-based periodic task scheduler with SQLite persistence, built-in tasks (memory_cleanup, skill_refresh, health_check), TaskHandler trait, feature-gated (`scheduler`) (#381)
- New config sections: `[gateway]`, `[daemon]`, `[scheduler]` in config/default.toml (#367)
- New optional feature flags: `gateway`, `daemon`, `scheduler`
- Hybrid memory search: FTS5 keyword search combined with Qdrant vector similarity (#372, #373, #374)
- SQLite FTS5 virtual table with auto-sync triggers for full-text keyword search
- Configurable `vector_weight`/`keyword_weight` in `[memory.semantic]` for hybrid ranking
Expand Down
60 changes: 58 additions & 2 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ anyhow = "1.0"
candle-core = { version = "0.9", default-features = false }
candle-nn = { version = "0.9", default-features = false }
candle-transformers = { version = "0.9", default-features = false }
chrono = { version = "0.4", default-features = false, features = ["std"] }
crossterm = "0.29"
axum = "0.8"
blake3 = "1.8"
Expand Down Expand Up @@ -74,6 +75,7 @@ tree-sitter-typescript = "0.23"
unicode-width = "0.2"
url = "2.5"
uuid = "1.21"
cron = "0.15"
zeph-a2a = { path = "crates/zeph-a2a", version = "0.9.8" }
zeph-channels = { path = "crates/zeph-channels", version = "0.9.8" }
zeph-core = { path = "crates/zeph-core", version = "0.9.8" }
Expand All @@ -83,6 +85,8 @@ zeph-mcp = { path = "crates/zeph-mcp", version = "0.9.8" }
zeph-memory = { path = "crates/zeph-memory", version = "0.9.8" }
zeph-skills = { path = "crates/zeph-skills", version = "0.9.8" }
zeph-tools = { path = "crates/zeph-tools", version = "0.9.8" }
zeph-gateway = { path = "crates/zeph-gateway", version = "0.9.8" }
zeph-scheduler = { path = "crates/zeph-scheduler", version = "0.9.8" }
zeph-tui = { path = "crates/zeph-tui", version = "0.9.8" }

[workspace.lints.clippy]
Expand Down Expand Up @@ -112,6 +116,9 @@ router = ["zeph-llm/router"]
self-learning = ["zeph-core/self-learning"]
tui = ["dep:zeph-tui"]
index = ["dep:zeph-index", "zeph-core/index"]
gateway = ["dep:zeph-gateway"]
daemon = ["zeph-core/daemon"]
scheduler = ["dep:zeph-scheduler"]
vault-age = ["zeph-core/vault-age"]
otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", "dep:tracing-opentelemetry"]

Expand All @@ -133,6 +140,8 @@ zeph-llm.workspace = true
zeph-memory.workspace = true
zeph-skills.workspace = true
zeph-tools.workspace = true
zeph-gateway = { workspace = true, optional = true }
zeph-scheduler = { workspace = true, optional = true }
zeph-tui = { workspace = true, optional = true }

[dev-dependencies]
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ cargo build --release --features tui
```
zeph (binary) — bootstrap, AnyChannel dispatch, vault resolution (anyhow for top-level errors)
├── zeph-core — Agent split into 7 submodules (context, streaming, persistence,
│ learning, mcp, index), typed AgentError/ChannelError, config hot-reload
│ learning, mcp, index), daemon supervisor, typed AgentError/ChannelError, config hot-reload
├── zeph-llm — LlmProvider: Ollama, Claude, OpenAI, Candle, orchestrator,
│ native tool_use (Claude/OpenAI), typed LlmError
├── zeph-skills — SKILL.md parser, embedding matcher, hot-reload, self-learning, typed SkillError
Expand All @@ -122,6 +122,8 @@ zeph (binary) — bootstrap, AnyChannel dispatch, vault resolution (anyhow for t
├── zeph-tools — schemars-driven tool registry (shell, file ops, web scrape), composite dispatch
├── zeph-mcp — MCP client, multi-server lifecycle, unified tool matching
├── zeph-a2a — A2A client + server, agent discovery, JSON-RPC 2.0
├── zeph-gateway — HTTP gateway for webhook ingestion with bearer auth (optional)
├── zeph-scheduler — Cron-based periodic task scheduler with SQLite persistence (optional)
└── zeph-tui — ratatui TUI dashboard with live agent metrics (optional)
```

Expand Down Expand Up @@ -149,6 +151,9 @@ Deep dive: [Architecture overview](https://bug-ops.github.io/zeph/architecture/o
| `self-learning` | On | Skill evolution system |
| `vault-age` | On | Age-encrypted secret storage |
| `index` | On | AST-based code indexing and semantic retrieval |
| `gateway` | Off | HTTP gateway for webhook ingestion |
| `daemon` | Off | Daemon supervisor for component lifecycle |
| `scheduler` | Off | Cron-based periodic task scheduler |
| `metal` | Off | Metal GPU acceleration (macOS) |
| `tui` | Off | ratatui TUI dashboard with real-time metrics |
| `cuda` | Off | CUDA GPU acceleration (Linux) |
Expand Down
38 changes: 38 additions & 0 deletions config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,44 @@ enabled = false
# Audit destination: "stdout" or file path (e.g., "./data/audit.jsonl")
destination = "stdout"

[gateway]
# Enable HTTP gateway for webhook ingestion (feature-gated: --features gateway)
enabled = false
# Bind address (127.0.0.1 = localhost only, 0.0.0.0 = all interfaces)
bind = "127.0.0.1"
# HTTP port
port = 8090
# auth_token = "secret" # optional, from vault ZEPH_GATEWAY_TOKEN
# Rate limit: max requests per minute per IP
rate_limit = 120
# Maximum request body size in bytes (1MB)
max_body_size = 1048576

[daemon]
# Enable daemon supervisor (feature-gated: --features daemon)
enabled = false
# PID file location
pid_file = "~/.zeph/zeph.pid"
# Health check interval in seconds
health_interval_secs = 30
# Maximum restart backoff in seconds
max_restart_backoff_secs = 60

[scheduler]
# Enable cron scheduler (feature-gated: --features scheduler)
enabled = false
# Example task definitions:
# [[scheduler.tasks]]
# name = "memory_cleanup"
# cron = "0 0 0 * * *"
# kind = "memory_cleanup"
# config = { max_age_days = 90 }
#
# [[scheduler.tasks]]
# name = "health_check"
# cron = "0 */5 * * * *"
# kind = "health_check"

[security]
# Redact secrets (API keys, tokens) from LLM responses before display
redact_secrets = true
Expand Down
1 change: 1 addition & 0 deletions crates/zeph-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository.workspace = true
default = []
index = ["dep:zeph-index"]
mcp = ["dep:zeph-mcp"]
daemon = []
self-learning = ["zeph-skills/self-learning"]
vault-age = ["dep:age"]

Expand Down
3 changes: 3 additions & 0 deletions crates/zeph-core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ impl Config {
}
}
}
if let Some(val) = vault.get_secret("ZEPH_GATEWAY_TOKEN").await? {
self.gateway.auth_token = Some(val);
}
Ok(())
}
}
Loading
Loading