DebugBoundedString (facets/diagnostics_tools.rs)

Codewhale · crates/command-contract/src/facets/diagnostics_tools.rs · rust · MIT
ai, tag:knn-classified

Defines serializable diagnostic data structures for tool usage and turn stop details.

// Source: https://github.com/Hmbown/Codewhale | License: MIT | Copyright 2024-2025 DeepSeek-TUI Contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! Bounded, structured prepared-tool evidence for `/tools`.
//!
//! The host captures and classifies facts using the existing inspector.
//! These data-only projections retain its JSON schema, including explicit
//! unknown states. Text and JSON rendering remain portable and single-owned.

use serde::Serialize;

#[derive(Debug, Clone, PartialEq, Serialize)]
pub struct DebugBoundedString {
    pub value: String,
    pub truncated: bool,
}

#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(tag = "status", rename_all = "snake_case")]
pub enum DebugEvidence<T> {
    Known { value: T },
    Unknown { reason: String },

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key