Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- MockLlmDriver 基础设施 (zclaw-runtime/src/test_util.rs) - 经验闭环 E-01~06: 累积/溢出/反序列化/跨行业/并发/阈值 - Embedding 管道 EM-01~08: 路由/降级/维度不匹配/空查询/CJK/LLM Fallback/热更新 - Skill 执行 SK-01~03: 工具传递/纯 Prompt/锁竞争
40 lines
1.4 KiB
Rust
40 lines
1.4 KiB
Rust
//! ZCLAW Runtime
|
|
//!
|
|
//! LLM drivers, tool system, and agent loop implementation.
|
|
|
|
/// Default User-Agent header sent with all outgoing HTTP requests.
|
|
/// Coding Plan providers (Kimi, Bailian/DashScope, Zhipu) validate the User-Agent against a
|
|
/// whitelist of known Coding Agents (e.g. claude-code, kimi-cli, roo-code, kilo-code).
|
|
/// Must use the exact lowercase format to pass validation.
|
|
pub const USER_AGENT: &str = "claude-code/0.1.0";
|
|
|
|
pub mod driver;
|
|
pub mod tool;
|
|
pub mod loop_runner;
|
|
pub mod loop_guard;
|
|
pub mod stream;
|
|
pub mod growth;
|
|
pub mod compaction;
|
|
pub mod middleware;
|
|
pub mod prompt;
|
|
pub mod nl_schedule;
|
|
|
|
pub mod test_util;
|
|
|
|
// Re-export main types
|
|
pub use driver::{
|
|
LlmDriver, CompletionRequest, CompletionResponse, ContentBlock, StopReason,
|
|
ToolDefinition, DriverConfig, AnthropicDriver, OpenAiDriver, GeminiDriver, LocalDriver,
|
|
};
|
|
pub use tool::{Tool, ToolRegistry, ToolContext};
|
|
pub use loop_runner::{AgentLoop, AgentLoopResult, LoopEvent};
|
|
pub use loop_guard::{LoopGuard, LoopGuardConfig, LoopGuardResult};
|
|
pub use stream::{StreamEvent, StreamSender};
|
|
pub use growth::GrowthIntegration;
|
|
pub use zclaw_growth::VikingAdapter;
|
|
pub use zclaw_growth::EmbeddingClient;
|
|
pub use zclaw_growth::LlmDriverForExtraction;
|
|
pub use compaction::{CompactionConfig, CompactionOutcome};
|
|
pub use prompt::{PromptBuilder, PromptContext, PromptSection};
|
|
pub use middleware::butler_router::{ButlerRouterMiddleware, IndustryKeywordConfig};
|