agentcat-sdk 0.0.1

Analytics for MCP (Model Context Protocol) servers - placeholder for the official AgentCat Rust SDK, which is in active development.
Documentation
//! Analytics for MCP (Model Context Protocol) servers.
//!
//! **Status: placeholder.** This crate reserves the `agentcat-sdk` name for the
//! official AgentCat Rust SDK, which is in active development and will ship as
//! `1.0.0`. It has no functionality yet — do not depend on it in production.
//!
//! The crate is named `agentcat-sdk` rather than `agentcat` because the latter
//! was already taken by an unrelated project.
//!
//! Shipping implementations today:
//!
//! - TypeScript — [`agentcat`](https://www.npmjs.com/package/agentcat)
//! - Python — [`agentcat`](https://pypi.org/project/agentcat/)
//! - Go — [`go.agentcat.com/sdk`](https://github.com/agentcathq/agentcat-go-sdk)
#![forbid(unsafe_code)]
#![deny(missing_docs)]

use std::error::Error;
use std::fmt;

/// Returned by every entry point until the real SDK ships.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct NotYetImplemented;

impl fmt::Display for NotYetImplemented {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str(
            "the AgentCat Rust SDK is not released yet; this crate reserves the \
             name for the official implementation (see https://agentcat.com)",
        )
    }
}

impl Error for NotYetImplemented {}

/// Placeholder for the SDK entry point.
///
/// # Errors
///
/// Always returns [`NotYetImplemented`] in this release.
pub fn track() -> Result<(), NotYetImplemented> {
    Err(NotYetImplemented)
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn track_reports_not_yet_implemented() {
        assert_eq!(track(), Err(NotYetImplemented));
        assert!(NotYetImplemented.to_string().contains("not released yet"));
    }
}