codetether-rlm 0.1.0

Recursive Language Model processing for CodeTether
Documentation
use serde::{Deserialize, Serialize};

/// A context event logged during RLM iteration.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ContextEvent {
    /// System prompt with context summary.
    SystemPrompt { content: String, tokens: usize },
    /// Result from a grep operation.
    GrepResult {
        pattern: String,
        matches: usize,
        tokens: usize,
    },
    /// Result from a sub-LLM query.
    LlmQueryResult {
        query: String,
        response_preview: String,
        tokens: usize,
    },
    /// Code generated by the assistant.
    AssistantCode { code: String, tokens: usize },
    /// Output from code execution.
    ExecutionOutput { output: String, tokens: usize },
    /// Final answer.
    Final { answer: String, tokens: usize },
    /// Tool call.
    ToolCall {
        name: String,
        arguments_preview: String,
        tokens: usize,
    },
    /// Tool result.
    ToolResult {
        tool_call_id: String,
        result_preview: String,
        tokens: usize,
    },
}