acp_protocol/
lib.rs

1//! # ACP - AI Context Protocol
2//!
3//! Core library for the AI Context Protocol.
4//!
5//! **⚠️ This is a placeholder release. Full functionality coming soon.**
6//!
7//! ## What is ACP?
8//!
9//! The AI Context Protocol (ACP) is an open standard for embedding machine-readable
10//! context in codebases for AI-assisted development. This crate provides the core
11//! functionality for:
12//!
13//! - **Parsing**: Extract ACP annotations from source code
14//! - **Indexing**: Build a structured cache of codebase metadata
15//! - **Querying**: Search and filter indexed symbols and files
16//! - **Constraints**: Evaluate and enforce code constraints
17//! - **Variables**: Expand token-efficient variable references
18//!
19//! ## Usage
20//!
21//! ```rust,ignore
22//! use acp-protocol::{Cache, Config};
23//!
24//! // Coming soon...
25//! let config = Config::load(".acp-protocol.config.json")?;
26//! let cache = Cache::build(&config)?;
27//! ```
28//!
29//! ## Links
30//!
31//! - [GitHub Repository](https://github.com/acp-protocol/acp-spec)
32//! - [Specification](https://github.com/acp-protocol/acp-spec/tree/main/spec)
33//! - [CLI Tool](https://crates.io/crates/acp-cli)
34//!
35//! ## License
36//!
37//! MIT License - see repository for details.
38
39/// ACP specification version supported by this library.
40pub const SPEC_VERSION: &str = "1.0.0";
41
42/// Library version (placeholder).
43pub const VERSION: &str = "0.0.1-placeholder";
44
45/// Placeholder for ACP core functionality.
46///
47/// Full implementation coming soon.
48pub fn version() -> &'static str {
49    VERSION
50}
51
52/// Placeholder for spec version.
53pub fn spec_version() -> &'static str {
54    SPEC_VERSION
55}
56
57#[cfg(test)]
58mod tests {
59    use super::*;
60
61    #[test]
62    fn test_version() {
63        assert_eq!(version(), "0.0.1-placeholder");
64    }
65
66    #[test]
67    fn test_spec_version() {
68        assert_eq!(spec_version(), "1.0.0");
69    }
70}