codiv-aisdk
Guide for building with the aisdk library (razorback16/aisdk) in the Codiv agent system. Covers multi-provider streaming, the agent tool loop, provider configuration, tool registration, and aisdk library internals. Use this skill PROACTIVELY whenever: - Working on codivd daemon code (crates/codivd/) especially agent/, config, or streaming logic - Adding or modifying AI providers (Anthropic, OpenAI, Google, or OpenAI-compatible) - Implementing or debugging streaming text generation - Building or modifying the agent tool loop - Defining tools with the #[tool] macro or manual Tool construction - Working on aisdk library internals (providers/, core/, macros/) - Configuring model catalogs, provider settings, or API keys - Handling LanguageModelStreamChunkType variants or StreamChunk IPC mapping Even if the user doesn't say "aisdk" explicitly — if they mention providers, streaming, tool calls, agent loop, or LLM integration in the context of Codiv, use this skill. --- # Codiv aisdk Integration Guide This skill covers the **aisdk** library (a Rust Vercel AI SDK-inspired multi-provider LLM abstraction) and how it integrates with the **codivd** daemon in the Codiv terminal agent project. ## Project Layout ``` codiv/ # Main Codiv project ├── crates/ │ ├── codiv/ # Rust TUI client (ratatui + crossterm) │ ├── codivd/ # Async daemon — where aisdk is consumed │ │ └── src/ │ │ ├── main.rs # Daemonization (fork before tokio) │ │ ├── daemon.rs # Event loop: accept, dispatch, cleanup │ │ ├── session.rs # ClientSession with lazy Agent ownership │ │ ├── ipc/server.rs # Unix socket + framed bincode messages │ │ └── agent/ │ │ ├── agent.rs # Agent struct, history, message building │ │ ├── config.rs # Provider dispatch + run_stream<M>() │ │ ├── tools.rs # Tool registr
更新日志: Source: GitHub https://github.com/razorback16/codiv
还没有评论,快来第一个发言吧。