中文 | English
This file applies to src/crates/core. Use the top-level AGENTS.md for repository-wide rules.
bitfun-core is the shared product-logic center.
Main areas:
src/agentic/: agents, prompts, tools, sessions, execution, persistencesrc/service/: config, filesystem, terminal, git, LSP, MCP, remote connect, project context, AI memorysrc/infrastructure/: AI clients, app paths, event system, storage, debug log server
Agent runtime mental model:
SessionManager → Session → DialogTurn → ModelRound
- Keep shared core platform-agnostic
- Avoid host-specific APIs such as
tauri::AppHandle - Use shared abstractions such as
bitfun_events::EventEmitter - Desktop-only integrations belong in
src/apps/desktop, then flow through transport/API layers
Narrower rules already exist:
src/crates/ai-adapters/AGENTS.mdsrc/agentic/execution/AGENTS.md
cargo check --workspace
cargo test --workspace
cargo test -p bitfun-core <test_name> -- --nocapturecargo check --workspace && cargo test --workspace