gitdataai/libs/agent/tool/mod.rs
ZhenYi 14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00

34 lines
1.2 KiB
Rust

//! Unified function call routing for AI agents.
//!
//! Provides a type-safe, request-scoped tool registry and executor.
//!
//! # Architecture
//!
//! - [`definition`](definition) — Tool schemas: name, description, parameter JSON schema
//! - [`registry`](registry) — Request-scoped `ToolRegistry` mapping names → handlers
//! - [`call`](call) — Execution types: `ToolCall`, `ToolResult`, `ToolError`
//! - [`context`](context) — Execution context passed to each tool handler
//! - [`executor`](executor) — `ToolExecutor` coordinating lookup → execute → result
//! - [`rig_adapter`](rig_adapter) — Adapter to bridge with rig's Tool trait
//! - [`examples`](examples) — `#[tool]` macro usage guide
pub mod call;
pub mod context;
pub mod definition;
pub mod executor;
pub mod recorder;
pub mod registry;
#[cfg(feature = "rig")]
pub mod rig_adapter;
pub use call::{ToolCall, ToolCallResult, ToolError, ToolResult};
pub use context::ToolContext;
pub use definition::{ToolDefinition, ToolParam, ToolSchema};
pub use executor::ToolExecutor;
pub use recorder::{ToolCallRecord, ToolCallRecorder};
pub use registry::{ToolHandler, ToolRegistry};
#[cfg(feature = "rig")]
pub use rig_adapter::{is_retryable_tool_error, RecordingTool, RigToolAdapter, RigToolSet};