{
  "name": "harness-sdk",
  "language": "rust",
  "version": "0.1.0-alpha.1",
  "description": "Harness SDK \u2014 framework for building autonomous agent harnesses with AHE (arXiv 2604.25850) primitives + Codex-grade TUI runtime.",
  "manifest": "harness-sdk/Cargo.toml",
  "manifestSha256": "4ad71921cbceaf39101bd812697407fdb1f9dd36184fc741704f4006f86081c7",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/rust/harness-sdk",
  "features": {
    "default": [
      "chat",
      "autonomy"
    ],
    "chat": [],
    "autonomy": [
      "chat"
    ],
    "http": [
      "dep:reqwest"
    ],
    "plugins": [
      "dep:wasmtime",
      "dep:sha2",
      "dep:toml_edit",
      "dep:glob"
    ],
    "full": [
      "chat",
      "autonomy",
      "http",
      "plugins"
    ]
  },
  "files": [
    {
      "path": "harness-sdk/src/adapter.rs",
      "sha256": "7e45ad31415570d8132aaac9571b913ce07dfdff075ee507e4f520f21fa87558",
      "artifactSha256": "cedfc4fc92829a1b6c074d2bdc23d11cde3a223123f10b945719bcc40348c145",
      "url": "/reference/source/harness-sdk/src/adapter.rs.txt",
      "declarations": [
        {
          "name": "::AgentAdapter",
          "line": 83,
          "signature": "#[async_trait::async_trait]\npub trait AgentAdapter: Send + Sync + 'static {\n    /// Returns the adapter's name (used in logs and UI).\n    ///\n    /// Must be non-empty and stable across calls.\n    fn name(&self) -> &str;\n\n    /// Returns the adapter's capability flags.\n    ///\n    /// The SDK checks these flags before calling optional methods.\n    /// Returning `false` for a capability means the SDK will never call\n    /// the corresponding methods and will disable related UI features.\n    fn capabilities(&self) -> AdapterCapabilities;\n\n    /// Discover available agents.\n    ///\n    /// Called during initialization and when the user requests a refresh.\n    /// The SDK validates every returned `SdkAgentInfo` before use.\n    async fn list_agents(&self) -> Result<Vec<SdkAgentInfo>, AdapterError>;\n\n    /// Send a chat message to an agent and receive a streaming response.\n    ///\n    /// The returned stream must eventually yield [`ResponseChunk::Done`]\n    /// or [`ResponseChunk::Error`]. The SDK enforces a timeout if neither\n    /// arrives within the configured duration.\n    ///\n    /// # Arguments\n    ///\n    /// * `agent_id` \u2014 Target agent identifier (from `list_agents`)\n    /// * `message` \u2014 User's message text (already sanitized)\n    async fn send_message(\n        &self,\n        agent_id: &str,\n        message: &str,\n    ) -> Result<BoxStream<'static, ResponseChunk>, AdapterError>;\n\n    /// Cancel an in-progress response stream.\n    ///\n    /// Called when the user presses Escape or Ctrl+C during streaming.\n    /// Default implementation returns `Ok(())` (no-op).\n    async fn cancel_response(&self, _agent_id: &str) -> Result<(), AdapterError> ;\n\n    // \u2500\u2500 Autonomy Mode \u2500\u2500\n\n    /// Start an autonomous execution session.\n    ///\n    /// Returns a stream of [`AutonomyEvent`]s that the SDK displays\n    /// in the activity feed.\n    ///\n    /// Only called if `capabilities().autonomy` is `true`.\n    async fn start_autonomy(\n        &self,\n        _agent_id: &str,\n        _instructions: &str,\n    ) -> Result<BoxStream<'static, AutonomyEvent>, AdapterError> ;\n\n    /// Stop the current autonomous execution session.\n    ///\n    /// Called when the user presses Ctrl+S or `/stop`.\n    async fn stop_autonomy(&self, _agent_id: &str) -> Result<(), AdapterError> ;\n\n    /// Send a human interjection during autonomous execution.\n    ///\n    /// The adapter should acknowledge receipt via [`InterjectionAck`].\n    async fn send_interjection(\n        &self,\n        _interjection: &HumanInterjection,\n    ) -> Result<InterjectionAck, AdapterError> ;\n\n    // \u2500\u2500 Approval Management \u2500\u2500\n\n    /// Submit an approval decision for a pending request.\n    ///\n    /// Called when the user approves, denies, or edits an approval request\n    /// from the approval queue.\n    async fn submit_approval(\n        &self,\n        _request_id: &str,\n        _action: SdkApprovalAction,\n    ) -> Result<(), AdapterError> ;\n\n    // \u2500\u2500 UI Rendering Hooks \u2500\u2500\n\n    /// Optional hook to render custom content in the sidebar area.\n    ///\n    /// Called during each frame render. The `area` is the sidebar region\n    /// from `AppShellState::sidebar_area()`. Default is a no-op.\n    ///\n    /// This is intentionally **sync** because rendering happens on the\n    /// main thread inside `terminal.draw()`.\n    fn render_sidebar(\n        &self,\n        _frame: &mut ratatui::Frame,\n        _area: ratatui::layout::Rect,\n        _theme: &Theme,\n    ) ;\n\n    /// Optional hook to render custom content in the header area.\n    ///\n    /// Called during each frame render. The `area` is the header region\n    /// from `AppShellState::header_area()`. Default is a no-op.\n    fn render_header(\n        &self,\n        _frame: &mut ratatui::Frame,\n        _area: ratatui::layout::Rect,\n        _theme: &Theme,\n    ) ;\n\n    /// Optional hook to request a taller header from the chat screen.\n    ///\n    /// The default `AppShell` reserves only 1 row for the header. An\n    /// adapter that wants to paint a banner / mascot / multi-line\n    /// status returns its desired height here. The chat screen passes\n    /// `sidebar_collapsed` so the adapter can ask for a tall header\n    /// only when the sidebar is hidden (and otherwise paint into the\n    /// sidebar).\n    fn desired_header_height(&self, _sidebar_collapsed: bool) -> u16 ;\n\n    /// Optional hook to request a wider sidebar from the chat screen.\n    /// Defaults to the SDK's `AppShell` default (25 columns).\n    fn desired_sidebar_width(&self) -> Option<u16> ;\n\n    /// Optional hook to provide live file-mention completions when the\n    /// user types `@<prefix>` in the input bar.\n    ///\n    /// `prefix` is everything after the `@` up to the cursor. The\n    /// adapter returns up to ~50 matching paths (relative to its\n    /// workspace root). Default: no completions, dropdown stays\n    /// hidden.\n    ///\n    /// Path conventions adapters should honour:\n    /// - `@foo`           \u2192 fuzzy match anywhere in the workspace\n    /// - `@./foo`         \u2192 match relative to the workspace root\n    /// - `@../foo`        \u2192 walk up one directory\n    /// - `@/abs/path`     \u2192 absolute path on the filesystem\n    ///\n    /// This is intentionally **sync**: the SDK calls it on every\n    /// keystroke, so adapters MUST keep it cheap (cache the walk,\n    /// limit results, never block on I/O).\n    fn complete_file_mention(&self, _prefix: &str) -> Vec<String> ;\n\n    // \u2500\u2500 Lifecycle \u2500\u2500\n\n    /// Called once when the TUI application starts.\n    ///\n    /// Use this for any one-time initialization (connecting to backends,\n    /// spawning background tasks, etc.).\n    async fn on_startup(&self) -> Result<(), AdapterError> ;\n\n    /// Called once when the TUI application is shutting down.\n    ///\n    /// Use this for cleanup (closing connections, saving state, etc.).\n    /// The SDK waits up to 5 seconds for this to complete before forcing exit.\n    async fn on_shutdown(&self) -> Result<(), AdapterError> ;\n\n    // \u2500\u2500 Settings palette (Ctrl+P) \u2500\u2500\n\n    /// Return the current settings snapshot \u2014 providers, modes,\n    /// Flocks CLIs \u2014 that the runtime should render in the Ctrl+P\n    /// palette. The default returns an empty snapshot, which causes\n    /// the palette to show only the built-in pages.\n    async fn settings_snapshot(&self) -> Result<SettingsSnapshot, AdapterError> ;\n\n    /// Apply a [`SettingsAction`] picked by the user in the\n    /// settings palette. The default returns\n    /// `Ok(SettingsApplyResult::fail(...))`, signaling the runtime\n    /// to display a \"not supported\" flash.\n    async fn apply_settings_action(\n        &self,\n        _action: SettingsAction,\n    ) -> Result<SettingsApplyResult, AdapterError> ;\n}",
          "documentation": "The agent adapter trait \u2014 the single integration point for any agent backend.\n\nImplement this trait to connect the TUI to your agent framework. The SDK\nhandles all UI concerns; the adapter handles all agent concerns.\n\n# Required Methods\n\n- [`name`](AgentAdapter::name) \u2014 Adapter identifier\n- [`capabilities`](AgentAdapter::capabilities) \u2014 What this adapter supports\n- [`list_agents`](AgentAdapter::list_agents) \u2014 Discover available agents\n- [`send_message`](AgentAdapter::send_message) \u2014 Send a chat message\n\n# Optional Methods\n\nAll other methods have default implementations that return\n`Err(AdapterError::NotSupported(...))`. Override them based on your\nadapter's capabilities."
        }
      ]
    },
    {
      "path": "harness-sdk/src/adapters/http.rs",
      "sha256": "a5b05639733b0f7ffa3788a0168b04614cda64d899670ce7516e29e65f114b9b",
      "artifactSha256": "752a883699e8c8855fafb549368e8bd5d2027a625d58102032e0c525132d34f3",
      "url": "/reference/source/harness-sdk/src/adapters/http.rs.txt",
      "declarations": [
        {
          "name": "::HttpAdapter",
          "line": 41,
          "signature": "pub struct HttpAdapter {\n\n}",
          "documentation": "An adapter that connects to an HTTP-based agent API.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::HttpAdapter;\n\nlet adapter = HttpAdapter::new(\"http://localhost:8080\")\n    .with_bearer_token(\"my-token\");\n```"
        },
        {
          "name": "::HttpAdapter::new",
          "line": 51,
          "signature": "#[must_use]\npub fn new(base_url: impl Into<String>) -> Self;",
          "documentation": "Create a new HttpAdapter for the given base URL."
        },
        {
          "name": "::HttpAdapter::with_bearer_token",
          "line": 62,
          "signature": "#[must_use]\npub fn with_bearer_token(mut self, token: impl Into<String>) -> Self;",
          "documentation": "Set a bearer token for authentication."
        },
        {
          "name": "::HttpAdapter::with_capabilities",
          "line": 69,
          "signature": "#[must_use]\npub fn with_capabilities(mut self, caps: AdapterCapabilities) -> Self;",
          "documentation": "Set capabilities."
        }
      ]
    },
    {
      "path": "harness-sdk/src/adapters/mod.rs",
      "sha256": "baab6cf98d2a1b41f6e7fdc1c2db8c56c11c0fa99bc6e7a16b8525d760f65ede",
      "artifactSha256": "f2b6eb2ea1ce920f0c2423b0e33469cd80a3e323e9b2d3111885ab372a467306",
      "url": "/reference/source/harness-sdk/src/adapters/mod.rs.txt",
      "declarations": [
        {
          "name": "stdio",
          "line": 6,
          "signature": "pub mod stdio;",
          "documentation": "Built-in adapter implementations.\n\n- [`StdioAdapter`](stdio::StdioAdapter) \u2014 Wraps a child process using stdin/stdout\n- [`HttpAdapter`](http::HttpAdapter) \u2014 Connects to an HTTP-based agent API (feature: `http`)"
        },
        {
          "name": "http",
          "line": 9,
          "signature": "#[cfg(feature = \"http\")]\npub mod http;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/adapters/stdio.rs",
      "sha256": "27a091c0ce11db6949a91e54acf9e2199b00d804b143fe8215918eaa254af63d",
      "artifactSha256": "b56c4530e7ce20ce229226f5eeababa7b9064788f1fa98bb6f9f95c67227ea9c",
      "url": "/reference/source/harness-sdk/src/adapters/stdio.rs.txt",
      "declarations": [
        {
          "name": "::StdioAdapter",
          "line": 43,
          "signature": "pub struct StdioAdapter {\n\n}",
          "documentation": "An adapter that wraps a child process using stdio.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::StdioAdapter;\n\nlet adapter = StdioAdapter::new(\"python\", &[\"agent.py\"]);\n```"
        },
        {
          "name": "::StdioAdapter::new",
          "line": 56,
          "signature": "#[must_use]\npub fn new(program: impl Into<String>, args: &[impl AsRef<str>]) -> Self;",
          "documentation": "Create a new StdioAdapter for the given program and arguments.\n\nThe child process is not spawned until [`on_startup`](AgentAdapter::on_startup)\nis called."
        },
        {
          "name": "::StdioAdapter::with_name",
          "line": 69,
          "signature": "#[must_use]\npub fn with_name(mut self, name: impl Into<String>) -> Self;",
          "documentation": "Set the agent display name."
        }
      ]
    },
    {
      "path": "harness-sdk/src/backtrack.rs",
      "sha256": "fd04353fc7de1ac83b7a877bf74de95a7833b4df3ae0acfc2a0882f768029a67",
      "artifactSha256": "a729f2255fa6b0d7badaab86a3b932de4526766908ed0c4ef41b59c9448e552a",
      "url": "/reference/source/harness-sdk/src/backtrack.rs.txt",
      "declarations": [
        {
          "name": "::BacktrackTarget",
          "line": 24,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq)]\npub struct BacktrackTarget {\n/// Index into `AppState::messages()` (0-based).\n\npub message_index: usize,\n/// User turn ordinal (1, 2, 3 \u2026) \u2014 useful as a label.\n\npub turn_ordinal: usize,\n/// Snippet of the user prompt (truncated to ~80 chars) for\n\n/// display.\n\npub preview: String\n}",
          "documentation": "One candidate backtrack target \u2014 every prior user turn becomes\na row in the picker."
        },
        {
          "name": "::list_backtrack_targets",
          "line": 38,
          "signature": "#[must_use]\npub fn list_backtrack_targets(state: &AppState) -> Vec<BacktrackTarget>;",
          "documentation": "Walk the timeline and produce one [`BacktrackTarget`] per user\nturn (most-recent last). Caller typically reverses this for\npresentation so the most recent turn shows at the top."
        },
        {
          "name": "::rewind_to",
          "line": 65,
          "signature": "pub fn rewind_to(state: &mut AppState, target: &BacktrackTarget) -> Result<String, SdkError>;",
          "documentation": "Rewind the timeline to the target, truncating every message at\nor after `target.message_index`. Clears streaming + thinking\nflags. Returns the user prompt that lived at the target index so\nthe caller can stuff it back into the composer for editing.\n\n# Errors\n\nReturns [`SdkError::EventLoop`] when the target's index is out\nof bounds or the message at that index is not a user turn (the\ntimeline shifted underneath the picker)."
        }
      ]
    },
    {
      "path": "harness-sdk/src/clipboard.rs",
      "sha256": "24e4830b05b03e0fddf0ba024ee61a651864da9b085454f678aa82a82e020637",
      "artifactSha256": "ba970e0c790932d0b7b06e926c86d4ac282286f0397eb563b32bb416663b8087",
      "url": "/reference/source/harness-sdk/src/clipboard.rs.txt",
      "declarations": [
        {
          "name": "::ClipboardError",
          "line": 12,
          "signature": "#[derive(Debug, Error)]\npub enum ClipboardError {\n    /// The platform clipboard is unavailable (no display server,\n    /// permission denied, etc.).\n    #[error(\"clipboard unavailable: {0}\")]\n    Unavailable(String),\n\n    /// Underlying clipboard backend error (`arboard::Error`).\n    #[error(\"clipboard backend: {0}\")]\n    Backend(String),\n}",
          "documentation": "Errors emitted by [`Clipboard`] implementations."
        },
        {
          "name": "::Clipboard",
          "line": 24,
          "signature": "pub trait Clipboard: Send {\n    /// Copy `text` to the platform clipboard, replacing prior contents.\n    fn copy(&mut self, text: &str) -> Result<(), ClipboardError>;\n\n    /// Read the current clipboard contents as UTF-8 text. Returns\n    /// [`ClipboardError::Unavailable`] when the clipboard is empty or\n    /// holds non-text content.\n    fn paste(&mut self) -> Result<String, ClipboardError>;\n}",
          "documentation": "Trait for swappable clipboard backends."
        },
        {
          "name": "::SystemClipboard",
          "line": 37,
          "signature": "pub struct SystemClipboard {\n\n}",
          "documentation": "`arboard`-backed clipboard. Lazily constructed because creating\nthe backend may fail (no display server); callers handle the\n`Result` once at startup."
        },
        {
          "name": "::SystemClipboard::new",
          "line": 45,
          "signature": "pub fn new() -> Result<Self, ClipboardError>;",
          "documentation": "Construct a system clipboard. Returns\n[`ClipboardError::Unavailable`] when the platform clipboard is\nnot reachable (e.g. headless CI without a display server)."
        },
        {
          "name": "::MemoryClipboard",
          "line": 72,
          "signature": "#[derive(Debug, Default)]\npub struct MemoryClipboard {\n\n}",
          "documentation": "In-memory clipboard backend useful for tests + headless CI.\n\nImplements the same trait as [`SystemClipboard`] so SDK consumers\ncan inject one with `app.clipboard(MemoryClipboard::default())`\nwithout changing call sites."
        }
      ]
    },
    {
      "path": "harness-sdk/src/commands/mod.rs",
      "sha256": "53c49b44b4c1180754ddf150a81c41eead4725fe5b0de098625dcca27790e509",
      "artifactSha256": "760b39e4953ad070c311fa6dfb4c433ff0371a9f2f329778c26b9d1a37efb731",
      "url": "/reference/source/harness-sdk/src/commands/mod.rs.txt",
      "declarations": [
        {
          "name": "slash",
          "line": 3,
          "signature": "pub mod slash;",
          "documentation": "Slash command registry and handling."
        }
      ]
    },
    {
      "path": "harness-sdk/src/commands/slash.rs",
      "sha256": "fc991eb86bed5eb30892607133dcf385bffeda020cc41ffd3dc0741407ca2ffe",
      "artifactSha256": "6bb32123f9b152e3b0c829360e0c87bc14bafe2959d57cbf5ecca4aca4f54894",
      "url": "/reference/source/harness-sdk/src/commands/slash.rs.txt",
      "declarations": [
        {
          "name": "::SlashResult",
          "line": 14,
          "signature": "#[derive(Debug, Clone)]\npub enum SlashResult {\n    /// Command executed, display message to user.\n    Message(String),\n    /// Switch to the specified mode.\n    SwitchMode(Mode),\n    /// Stop the current autonomy session.\n    StopAutonomy,\n    /// Clear the chat history.\n    ClearHistory,\n    /// Show help text.\n    ShowHelp(String),\n    /// Quit the application.\n    Quit,\n    /// Command not found.\n    NotFound(String),\n    /// Toggle the command palette.\n    TogglePalette,\n    /// List available agents.\n    ListAgents,\n    /// Show session status.\n    ShowStatus,\n    /// Send expanded text as a chat message to the active agent.\n    SendAsChat(String),\n}",
          "documentation": "Result of executing a slash command."
        },
        {
          "name": "::SlashArg",
          "line": 41,
          "signature": "#[derive(Debug, Clone)]\npub struct SlashArg {\n/// Argument name (e.g., \"mode\").\n\npub name: String,\n/// Whether this argument is required.\n\npub required: bool,\n/// Possible values (e.g., \\[\"chat\", \"auto\"\\]).\n\npub options: Vec<String>,\n/// Short description (e.g., \"The mode to switch to\").\n\npub description: String\n}",
          "documentation": "A structured argument definition for a slash command."
        },
        {
          "name": "::SlashCommand",
          "line": 54,
          "signature": "#[derive(Debug, Clone)]\npub struct SlashCommand {\n/// Command name (without the `/` prefix).\n\npub name: String,\n/// Short description.\n\npub description: String,\n/// Source label (\"built-in\" or plugin name).\n\npub source: String,\n/// Aliases for this command.\n\npub aliases: Vec<String>,\n/// Usage template (e.g., \"/mode <chat|auto>\").\n\npub usage: String,\n/// Structured argument definitions.\n\npub args: Vec<SlashArg>\n}",
          "documentation": "A registered slash command."
        },
        {
          "name": "::SlashCommandRegistry",
          "line": 80,
          "signature": "pub struct SlashCommandRegistry {\n\n}",
          "documentation": "Registry of available slash commands.\n\n# Examples\n\n```\nuse harness_sdk::commands::slash::SlashCommandRegistry;\n\nlet registry = SlashCommandRegistry::with_builtins();\nassert!(registry.lookup(\"help\").is_some());\nassert!(registry.lookup(\"unknown\").is_none());\n```"
        },
        {
          "name": "::SlashCommandRegistry::new",
          "line": 87,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Create a new empty registry."
        },
        {
          "name": "::SlashCommandRegistry::with_builtins",
          "line": 95,
          "signature": "#[must_use]\npub fn with_builtins() -> Self;",
          "documentation": "Create a registry with all built-in commands."
        },
        {
          "name": "::SlashCommandRegistry::lookup",
          "line": 225,
          "signature": "#[must_use]\npub fn lookup(&self, name: &str) -> Option<&SlashCommand>;",
          "documentation": "Look up a command by name or alias."
        },
        {
          "name": "::SlashCommandRegistry::register",
          "line": 230,
          "signature": "pub fn register(&mut self, command: SlashCommand);",
          "documentation": "Register a custom command (from a plugin or adapter)."
        },
        {
          "name": "::SlashCommandRegistry::list_commands",
          "line": 239,
          "signature": "#[must_use]\npub fn list_commands(&self) -> Vec<&SlashCommand>;",
          "documentation": "List all unique commands (no aliases)."
        },
        {
          "name": "::SlashCommandRegistry::command_hints",
          "line": 252,
          "signature": "#[must_use]\npub fn command_hints(&self) -> Vec<harness_tui_kit::CommandHint>;",
          "documentation": "Get command hints for the Kit's `CommandPalette` component."
        },
        {
          "name": "::SlashCommandRegistry::dropdown_items",
          "line": 261,
          "signature": "#[must_use]\npub fn dropdown_items(&self) -> Vec<harness_tui_kit::SlashDropdownItem>;",
          "documentation": "Get dropdown items for the Kit's `SlashDropdown` component."
        },
        {
          "name": "::dispatch_slash",
          "line": 293,
          "signature": "pub fn dispatch_slash(input: &str, registry: &SlashCommandRegistry) -> SlashResult;",
          "documentation": "Parse and dispatch a slash command string.\n\nInput should start with `/` \u2014 the prefix is stripped before lookup.\n\n# Examples\n\n```\nuse harness_sdk::commands::slash::{dispatch_slash, SlashCommandRegistry, SlashResult};\n\nlet registry = SlashCommandRegistry::with_builtins();\nlet result = dispatch_slash(\"/help\", &registry);\nassert!(matches!(result, SlashResult::ShowHelp(_)));\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/composer.rs",
      "sha256": "0d725f6597d8ecd6b0d539c83642d1fea91f47cdcb096ec733cb3b7b229dcb00",
      "artifactSha256": "8c66168e5d07aa918f489dbbc0429c784064dad6176649d37f73bb3303d9eded",
      "url": "/reference/source/harness-sdk/src/composer.rs.txt",
      "declarations": [
        {
          "name": "::MESSAGE_QUEUE_CAPACITY",
          "line": 28,
          "signature": "pub const MESSAGE_QUEUE_CAPACITY: usize;",
          "documentation": "Maximum number of pending messages we'll queue before refusing to\naccept more. Keeps memory bounded if the user pastes a script."
        },
        {
          "name": "::MessageQueueError",
          "line": 32,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]\npub enum MessageQueueError {\n    /// The supplied message was empty after trimming.\n    #[error(\"queued message is empty after trimming\")]\n    EmptyMessage,\n    /// The message exceeds [`MAX_INTERJECTION_LEN`].\n    #[error(\"queued message length {0} exceeds limit {MAX_INTERJECTION_LEN}\")]\n    TooLong(usize),\n    /// The queue is full.\n    #[error(\"message queue is full ({0} pending)\")]\n    Full(usize),\n}",
          "documentation": "Errors returned by [`MessageQueue::push`]."
        },
        {
          "name": "::MessageQueue",
          "line": 46,
          "signature": "#[derive(Debug, Clone, Default)]\npub struct MessageQueue {\n\n}",
          "documentation": "FIFO queue for messages typed while the agent is streaming."
        },
        {
          "name": "::MessageQueue::new",
          "line": 53,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Construct an empty queue."
        },
        {
          "name": "::MessageQueue::len",
          "line": 61,
          "signature": "#[must_use]\npub fn len(&self) -> usize;",
          "documentation": "Number of queued messages."
        },
        {
          "name": "::MessageQueue::is_empty",
          "line": 67,
          "signature": "#[must_use]\npub fn is_empty(&self) -> bool;",
          "documentation": "`true` if the queue holds no messages."
        },
        {
          "name": "::MessageQueue::push",
          "line": 77,
          "signature": "pub fn push(&mut self, message: impl Into<String>) -> Result<(), MessageQueueError>;",
          "documentation": "Push a message onto the back of the queue.\n\n# Errors\n\nReturns [`MessageQueueError`] if the message is empty, too\nlong, or the queue is full."
        },
        {
          "name": "::MessageQueue::pop",
          "line": 94,
          "signature": "pub fn pop(&mut self) -> Option<String>;",
          "documentation": "Pop the next message from the front of the queue."
        },
        {
          "name": "::MessageQueue::drain",
          "line": 99,
          "signature": "pub fn drain(&mut self) -> Vec<String>;",
          "documentation": "Drain every queued message in FIFO order."
        },
        {
          "name": "::MessageQueue::peek",
          "line": 105,
          "signature": "#[must_use]\npub fn peek(&self) -> &VecDeque<String>;",
          "documentation": "View pending messages without removing them."
        },
        {
          "name": "::MessageQueue::clear",
          "line": 110,
          "signature": "pub fn clear(&mut self);",
          "documentation": "Drop every queued message."
        },
        {
          "name": "::HistorySearch",
          "line": 120,
          "signature": "#[derive(Debug, Clone, Default)]\npub struct HistorySearch {\n\n}",
          "documentation": "Reverse-incremental-search state over a history slice.\n\nThe caller owns the history ring; [`HistorySearch`] holds the\nquery string and the index of the current match."
        },
        {
          "name": "::HistorySearch::new",
          "line": 130,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Begin a fresh reverse search."
        },
        {
          "name": "::HistorySearch::query",
          "line": 136,
          "signature": "#[must_use]\npub fn query(&self) -> &str;",
          "documentation": "Current query string."
        },
        {
          "name": "::HistorySearch::match_index",
          "line": 144,
          "signature": "#[must_use]\npub fn match_index(&self) -> Option<usize>;",
          "documentation": "Index of the current match within the history slice provided\nto the most recent call to [`HistorySearch::update`]\n[`HistorySearch::next_match`]."
        },
        {
          "name": "::HistorySearch::has_match",
          "line": 150,
          "signature": "#[must_use]\npub fn has_match(&self) -> bool;",
          "documentation": "Whether the search has yielded a match."
        },
        {
          "name": "::HistorySearch::reset",
          "line": 155,
          "signature": "pub fn reset(&mut self);",
          "documentation": "Reset the search to its initial state."
        },
        {
          "name": "::HistorySearch::push_char",
          "line": 161,
          "signature": "pub fn push_char(&mut self, ch: char, history: &[String]);",
          "documentation": "Append a character to the query and re-run the search."
        },
        {
          "name": "::HistorySearch::pop_char",
          "line": 167,
          "signature": "pub fn pop_char(&mut self, history: &[String]);",
          "documentation": "Pop the last character from the query and re-run the search."
        },
        {
          "name": "::HistorySearch::update",
          "line": 177,
          "signature": "pub fn update(&mut self, history: &[String]);",
          "documentation": "Re-run the search from scratch \u2014 useful when history changes."
        },
        {
          "name": "::HistorySearch::next_match",
          "line": 186,
          "signature": "pub fn next_match(&mut self, history: &[String]);",
          "documentation": "Advance to the next earlier match (Ctrl+R again behavior)."
        },
        {
          "name": "::HistorySearch::matched",
          "line": 197,
          "signature": "#[must_use]\npub fn matched<'h>(&self, history: &'h [String]) -> Option<&'h str>;",
          "documentation": "Return the matched history entry, if any."
        }
      ]
    },
    {
      "path": "harness-sdk/src/error.rs",
      "sha256": "dd22454797649293ba8ac281f4d0330b4b35d3723f28ac576c0bfdb00f64ac63",
      "artifactSha256": "d5ad9851b584f35a233625bae4c35ab2b849a87ab9be67ca7aa69850da7fd97d",
      "url": "/reference/source/harness-sdk/src/error.rs.txt",
      "declarations": [
        {
          "name": "::SdkError",
          "line": 30,
          "signature": "#[derive(Debug, thiserror::Error)]\npub enum SdkError {\n    // \u2500\u2500 Adapter Errors \u2500\u2500\n    /// An error from the adapter implementation.\n    #[error(\"adapter error: {0}\")]\n    Adapter(#[from] AdapterError),\n\n    /// Adapter output failed validation.\n    #[error(\"adapter output validation failed: {0}\")]\n    InvalidAdapterOutput(String),\n\n    /// Adapter stream timed out.\n    #[error(\"adapter stream timeout after {0:?}\")]\n    AdapterTimeout(Duration),\n\n    /// Adapter does not support the requested feature.\n    #[error(\"adapter does not support {0}\")]\n    NotSupported(String),\n\n    // \u2500\u2500 Runtime Errors \u2500\u2500\n    /// Terminal I/O error.\n    #[error(\"terminal error: {0}\")]\n    Terminal(#[from] std::io::Error),\n\n    /// Event loop error.\n    #[error(\"event loop error: {0}\")]\n    EventLoop(String),\n\n    /// Invalid mode transition.\n    #[error(\"mode transition failed: cannot go from {from} to {to}\")]\n    InvalidModeTransition {\n        /// The current mode.\n        from: String,\n        /// The requested mode.\n        to: String,\n    },\n\n    // \u2500\u2500 Input Errors \u2500\u2500\n    /// Interjection parse error.\n    #[error(\"interjection parse error: {0}\")]\n    InterjectionParse(#[from] ParseError),\n\n    /// Slash command error.\n    #[error(\"slash command error: {0}\")]\n    SlashCommand(String),\n\n    // \u2500\u2500 Plugin Errors \u2500\u2500\n    /// Plugin system error.\n    #[cfg(feature = \"plugins\")]\n    #[error(\"plugin error: {0}\")]\n    Plugin(#[from] PluginError),\n\n    // \u2500\u2500 Configuration Errors \u2500\u2500\n    /// Builder configuration error.\n    #[error(\"builder error: {0}\")]\n    Builder(String),\n\n    /// Serialization/deserialization error.\n    #[error(\"serialization error: {0}\")]\n    Serialization(String),\n}",
          "documentation": "Top-level SDK error encompassing all failure modes.\n\n# Examples\n\n```\nuse harness_sdk::SdkError;\n\nlet err = SdkError::Builder(\"missing adapter\".into());\nassert!(err.to_string().contains(\"missing adapter\"));\n```"
        },
        {
          "name": "::AdapterError",
          "line": 105,
          "signature": "#[derive(Debug, thiserror::Error, Clone)]\npub enum AdapterError {\n    /// Connection to the agent backend failed.\n    #[error(\"connection error: {0}\")]\n    Connection(String),\n\n    /// The adapter received an invalid response from the backend.\n    #[error(\"protocol error: {0}\")]\n    Protocol(String),\n\n    /// An I/O error occurred during adapter communication.\n    #[error(\"i/o error: {0}\")]\n    Io(String),\n\n    /// The adapter operation timed out.\n    #[error(\"timeout: {0}\")]\n    Timeout(String),\n\n    /// Authentication failed.\n    #[error(\"authentication error: {0}\")]\n    Authentication(String),\n\n    /// The requested operation is not supported by this adapter.\n    #[error(\"not supported: {0}\")]\n    NotSupported(String),\n\n    /// A generic adapter error.\n    #[error(\"{0}\")]\n    Other(String),\n}",
          "documentation": "Errors from adapter implementations.\n\nAdapters return this error type from their trait methods. The SDK wraps it\nin [`SdkError::Adapter`] and displays the message in the UI without crashing.\n\n# Examples\n\n```\nuse harness_sdk::AdapterError;\n\nlet err = AdapterError::Connection(\"refused\".into());\nassert!(err.to_string().contains(\"refused\"));\n```"
        },
        {
          "name": "::ParseError",
          "line": 149,
          "signature": "#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)]\npub enum ParseError {\n    /// Input was empty or whitespace-only.\n    #[error(\"interjection input is empty\")]\n    EmptyInput,\n\n    /// Input exceeded the maximum allowed length.\n    #[error(\"interjection too long: {0} chars (max {1})\")]\n    TooLong(usize, usize),\n\n    /// Targeted agent name is invalid.\n    #[error(\"invalid agent target: {0}\")]\n    InvalidTarget(String),\n}",
          "documentation": "Errors from interjection parsing.\n\nThese are returned when user input cannot be parsed into a valid\n[`HumanInterjection`](crate::HumanInterjection).\n\n# Examples\n\n```\nuse harness_sdk::ParseError;\n\nlet err = ParseError::EmptyInput;\nassert!(err.to_string().contains(\"empty\"));\n```"
        },
        {
          "name": "::PluginError",
          "line": 177,
          "signature": "#[derive(Debug, thiserror::Error, Clone)]\npub enum PluginError {\n    /// WASM module failed structural validation.\n    #[error(\"WASM module failed validation: {0}\")]\n    InvalidModule(String),\n\n    /// WASM module hash does not match the expected hash.\n    #[error(\"WASM hash mismatch: expected {expected}, got {actual}\")]\n    HashMismatch {\n        /// Expected SHA-256 hash.\n        expected: String,\n        /// Actual computed SHA-256 hash.\n        actual: String,\n    },\n\n    /// Plugin does not export a required function.\n    #[error(\"plugin '{0}' missing required export: {1}\")]\n    MissingExport(String, String),\n\n    /// Plugin requested a capability the host does not provide.\n    #[error(\"plugin '{0}' requested unsupported capability: {1}\")]\n    UnsupportedCapability(String, String),\n\n    /// Capability was denied by the permission manager.\n    #[error(\"capability denied for plugin '{plugin}': {capability} -> {resource}\")]\n    CapabilityDenied {\n        /// Plugin name.\n        plugin: String,\n        /// Capability kind.\n        capability: String,\n        /// Requested resource.\n        resource: String,\n    },\n\n    /// Plugin trapped during execution.\n    #[error(\"plugin '{0}' panicked during execution: {1}\")]\n    PluginPanic(String, String),\n\n    /// Plugin not found in configured sources.\n    #[error(\"plugin '{0}' not found in configured sources\")]\n    NotFound(String),\n\n    /// Plugin is disabled.\n    #[error(\"plugin '{0}' is disabled\")]\n    Disabled(String),\n\n    /// Plugin configuration error.\n    #[error(\"plugin config error: {0}\")]\n    Config(String),\n\n    /// Host function error.\n    #[error(\"plugin '{0}' host function error: {1}\")]\n    HostFunction(String, String),\n}",
          "documentation": "Errors from the WASM plugin system.\n\nPlugin errors are recoverable \u2014 the SDK unloads the offending plugin\nand continues operating.\n\n# Examples\n\n```\nuse harness_sdk::PluginError;\n\nlet err = PluginError::NotFound(\"my-plugin\".into());\nassert!(err.to_string().contains(\"my-plugin\"));\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/external_editor.rs",
      "sha256": "9acd17d1e89f28a0e0cb954dc78e23b897a270581df47ad17c4a00057a46fca3",
      "artifactSha256": "3f6f13dd1e9253c7b0d8c232c7f3eae57556d954a10caf9504558a48f7d9610b",
      "url": "/reference/source/harness-sdk/src/external_editor.rs.txt",
      "declarations": [
        {
          "name": "::ExternalEditorError",
          "line": 19,
          "signature": "#[derive(Debug, Error)]\npub enum ExternalEditorError {\n    /// Neither `$VISUAL` nor `$EDITOR` is set.\n    #[error(\"neither VISUAL nor EDITOR is set\")]\n    MissingEditor,\n\n    /// Editor command failed to parse via `shlex` (POSIX) or\n    /// produced an empty argv on Windows.\n    #[error(\"failed to parse editor command\")]\n    ParseFailed,\n\n    /// Resolved editor command was empty.\n    #[error(\"editor command is empty\")]\n    EmptyCommand,\n\n    /// I/O failure (temp file creation, child process spawn, etc.).\n    #[error(\"editor io: {0}\")]\n    Io(#[from] io::Error),\n\n    /// Editor exited with a non-zero status.\n    #[error(\"editor exited with status {0}\")]\n    NonZeroExit(i32),\n\n    /// Editor was terminated by signal.\n    #[error(\"editor was terminated by signal\")]\n    Terminated,\n}",
          "documentation": "Errors emitted by the external-editor flow."
        },
        {
          "name": "::resolve_editor_command",
          "line": 53,
          "signature": "pub fn resolve_editor_command() -> Result<Vec<String>, ExternalEditorError>;",
          "documentation": "Resolve the editor command from `$VISUAL` (preferred) or `$EDITOR`,\nsplitting POSIX-style on whitespace + quoting.\n\nWindows callers may bypass `shlex` since `Command` handles\nargument quoting differently \u2014 for now we only target POSIX-style\nsplitting; downstream Windows support can layer a `winsplit` crate\nwhen the SDK ships a real Windows build."
        },
        {
          "name": "::open_in_editor",
          "line": 70,
          "signature": "pub fn open_in_editor(seed: &str) -> Result<String, ExternalEditorError>;",
          "documentation": "Write `seed` to a temp `.md` file, exec the configured editor on\nit, and return the buffer's contents after the editor exits 0.\n\nThis is the synchronous variant \u2014 it inherits stdin/stdout/stderr,\nwhich means callers MUST suspend the TUI's raw-mode + alternate\nscreen first or the editor will be invisible to the user."
        },
        {
          "name": "::open_with_command",
          "line": 78,
          "signature": "pub fn open_with_command(seed: &str, editor_cmd: &[String]) -> Result<String, ExternalEditorError>;",
          "documentation": "Same as [`open_in_editor`] but with an explicitly-supplied editor\ncommand. Useful for tests + for SDK consumers that pin a specific\neditor (e.g. `[\"nvim\", \"-c\", \"set syntax=markdown\"]`)."
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/component.rs",
      "sha256": "e929ff4916c68eb2cfd627b97be7045fccb2eedd4082f06c536940e8357345eb",
      "artifactSha256": "4f5e18c7a8561504334c771ed59be633d47881212b4cbfb6abe4c72ea690e9d0",
      "url": "/reference/source/harness-sdk/src/harness/component.rs.txt",
      "declarations": [
        {
          "name": "::HARNESS_COMPONENT_KINDS",
          "line": 31,
          "signature": "pub const HARNESS_COMPONENT_KINDS: &[HarnessComponentKind];",
          "documentation": "Canonical list of editable + runtime harness component kinds.\n\nThe first seven entries are editable (the AHE evolve agent\ntargets these); `ShortTermMemory` is the runtime-managed\nscratchpad and is exposed here only so callers can match\nexhaustively."
        },
        {
          "name": "::HarnessComponentKind",
          "line": 45,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum HarnessComponentKind {\n    /// `systemprompt.md` \u2014 base behavioral rules and prompt scaffold.\n    SystemPrompt,\n    /// `tool_descriptions/*.yaml` \u2014 declarations the model sees.\n    ToolDescriptions,\n    /// `tools/*` \u2014 the executable tool implementations.\n    ToolImplementations,\n    /// `middleware/*` \u2014 pre/post-processing hooks around tool calls.\n    Middleware,\n    /// `skills/{name}/` \u2014 reusable cross-task playbooks.\n    Skills,\n    /// `sub_agents/*.yaml` \u2014 optional sub-agent workflow configs.\n    SubAgents,\n    /// `LongTermMEMORY.md` \u2014 persistent cross-session knowledge.\n    LongTermMemory,\n    /// `ShortTermMEMORY.md` \u2014 runtime-only; **not** editable by the\n    /// evolve agent. Listed for exhaustiveness only.\n    ShortTermMemory,\n}",
          "documentation": "Discriminator for a harness component."
        },
        {
          "name": "::HarnessComponentKind::as_key",
          "line": 68,
          "signature": "#[must_use]\npub fn as_key(self) -> &'static str;",
          "documentation": "Stable serialization key (matches the `serde` projection)."
        },
        {
          "name": "::HarnessComponentKind::label",
          "line": 83,
          "signature": "#[must_use]\npub fn label(self) -> &'static str;",
          "documentation": "Human-readable label used in transcript / manifest UIs."
        },
        {
          "name": "::HarnessComponentKind::is_editable",
          "line": 100,
          "signature": "#[must_use]\npub fn is_editable(self) -> bool;",
          "documentation": "Whether this kind is editable by the AHE evolve agent.\n`ShortTermMemory` is the only non-editable kind \u2014 the runtime\nowns it."
        },
        {
          "name": "::HarnessComponentKind::is_single_file",
          "line": 107,
          "signature": "#[must_use]\npub fn is_single_file(self) -> bool;",
          "documentation": "Whether this kind stores its content in a single file\n(vs. a directory of files)."
        },
        {
          "name": "::HarnessComponentKind::mount",
          "line": 119,
          "signature": "#[must_use]\npub fn mount(self) -> &'static Path;",
          "documentation": "Canonical mount point relative to the workspace root.\nFor directory-backed kinds the path is the directory itself."
        },
        {
          "name": "::HarnessComponentKind::from_key",
          "line": 135,
          "signature": "#[must_use]\npub fn from_key(key: &str) -> Option<Self>;",
          "documentation": "Parse a stable key back into a kind. Inverse of [`Self::as_key`]."
        },
        {
          "name": "::HarnessComponentEdit",
          "line": 152,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct HarnessComponentEdit {\n/// Which component kind the edit targets.\n\npub kind: HarnessComponentKind,\n/// File path relative to the workspace root. For single-file\n\n/// kinds this matches `kind.mount()`; for directory-backed kinds\n\n/// it's a path *under* the directory (e.g. `tools/grep.py`).\n\npub path: PathBuf,\n/// What the edit does.\n\npub op: HarnessComponentEditKind\n}",
          "documentation": "Atomic edit applied to one harness component file."
        },
        {
          "name": "::HarnessComponentEditKind",
          "line": 166,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(tag = \"op\", rename_all = \"snake_case\")]\npub enum HarnessComponentEditKind {\n    /// Create a new file with the given UTF-8 contents.\n    Create {\n        /// Initial contents.\n        contents: String,\n    },\n    /// Replace the entire file with the given UTF-8 contents.\n    Update {\n        /// New contents.\n        contents: String,\n    },\n    /// Delete the file.\n    Delete,\n    /// Rename the file (path stays the same; the new name lives\n    /// under the same component kind).\n    Rename {\n        /// New path relative to the workspace root.\n        new_path: PathBuf,\n    },\n}",
          "documentation": "Discriminator for what an [`HarnessComponentEdit`] is doing."
        },
        {
          "name": "::HarnessComponentEdit::create",
          "line": 190,
          "signature": "#[must_use]\npub fn create(\n        kind: HarnessComponentKind,\n        path: impl Into<PathBuf>,\n        contents: impl Into<String>,\n    ) -> Self;",
          "documentation": "Convenience constructor for a create edit."
        },
        {
          "name": "::HarnessComponentEdit::update",
          "line": 206,
          "signature": "#[must_use]\npub fn update(\n        kind: HarnessComponentKind,\n        path: impl Into<PathBuf>,\n        contents: impl Into<String>,\n    ) -> Self;",
          "documentation": "Convenience constructor for an update edit."
        },
        {
          "name": "::HarnessComponentEdit::delete",
          "line": 222,
          "signature": "#[must_use]\npub fn delete(kind: HarnessComponentKind, path: impl Into<PathBuf>) -> Self;",
          "documentation": "Convenience constructor for a delete edit."
        },
        {
          "name": "::HarnessComponentEdit::rename",
          "line": 232,
          "signature": "#[must_use]\npub fn rename(\n        kind: HarnessComponentKind,\n        path: impl Into<PathBuf>,\n        new_path: impl Into<PathBuf>,\n    ) -> Self;",
          "documentation": "Convenience constructor for a rename edit."
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/evidence.rs",
      "sha256": "1e21a2476409c3a5aed0b379004b84bce97cb73c4ce17def78c6d0dfe9a21864",
      "artifactSha256": "a0712508320dc80eebac6aa3d701d2a26f6f79f1270aad0440aecd7ef85b5146",
      "url": "/reference/source/harness-sdk/src/harness/evidence.rs.txt",
      "declarations": [
        {
          "name": "::EvidenceCorpusError",
          "line": 35,
          "signature": "#[derive(Debug, Error)]\npub enum EvidenceCorpusError {\n    /// I/O error reaching disk.\n    #[error(\"evidence corpus io: {0}\")]\n    Io(#[from] io::Error),\n\n    /// Path escapes the iteration root (e.g. `..` segment).\n    #[error(\"path {0} escapes the iteration root\")]\n    PathEscape(PathBuf),\n}",
          "documentation": "Errors emitted by [`EvidenceCorpus`]."
        },
        {
          "name": "::TaskAnalysis",
          "line": 47,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct TaskAnalysis {\n/// Task name (matches `TaskOutcomeMap` keys).\n\npub task: String,\n/// The per-iteration outcome being analyzed.\n\npub outcome: TaskOutcome,\n/// One-line summary used in the overview.\n\npub summary: String,\n/// Root cause hypothesis (free text).\n\npub root_cause: String,\n/// Markdown body \u2014 the full evidence the Evolve Agent reads.\n\npub body_markdown: String\n}",
          "documentation": "One per-task analysis report. Owned by the AgentDebugger."
        },
        {
          "name": "::TaskAnalysis::render_markdown",
          "line": 64,
          "signature": "#[must_use]\npub fn render_markdown(&self) -> String;",
          "documentation": "Render the analysis as the markdown file body that lands in\n`runs/iteration_NNN/analysis/detail/{task}.md`."
        },
        {
          "name": "::OverviewReport",
          "line": 105,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\npub struct OverviewReport {\n/// Iteration number.\n\npub iteration: u32,\n/// Total tasks run.\n\npub total: usize,\n/// Tasks that passed.\n\npub passes: usize,\n/// Tasks that failed.\n\npub fails: usize,\n/// Tasks that did not run.\n\npub not_run: usize,\n/// Optional headline finding for the iteration.\n\n#[serde(default)]\npub headline: String,\n/// Optional markdown body (themes, top failure clusters, etc.).\n\n#[serde(default)]\npub body_markdown: String\n}",
          "documentation": "Benchmark-level overview rendered as\n`runs/iteration_NNN/analysis/overview.md`."
        },
        {
          "name": "::OverviewReport::render_markdown",
          "line": 127,
          "signature": "#[must_use]\npub fn render_markdown(&self) -> String;",
          "documentation": "Render the overview as a markdown file body."
        },
        {
          "name": "::EvidenceCorpus",
          "line": 156,
          "signature": "#[derive(Debug, Clone)]\npub struct EvidenceCorpus {\n\n}",
          "documentation": "Typed view over `runs/iteration_NNN/`. Owns the layered evidence\ncorpus from the paper's Experience Observability pillar."
        },
        {
          "name": "::EvidenceCorpus::open",
          "line": 165,
          "signature": "pub fn open(runs_root: impl AsRef<Path>, iteration: u32) -> Result<Self, EvidenceCorpusError>;",
          "documentation": "Open / create a corpus rooted at `runs_root/iteration_NNN/`.\nCreates the standard layout (`analysis/detail/`, `traces/`)\nup front so callers can write into it without further setup."
        },
        {
          "name": "::EvidenceCorpus::root",
          "line": 174,
          "signature": "#[must_use]\npub fn root(&self) -> &Path;",
          "documentation": "Read-only access to the iteration root."
        },
        {
          "name": "::EvidenceCorpus::iteration",
          "line": 180,
          "signature": "#[must_use]\npub fn iteration(&self) -> u32;",
          "documentation": "Iteration number."
        },
        {
          "name": "::EvidenceCorpus::task_analysis_path",
          "line": 186,
          "signature": "pub fn task_analysis_path(&self, task: &str) -> Result<PathBuf, EvidenceCorpusError>;",
          "documentation": "Path of the per-task analysis file\n(`analysis/detail/{task}.md`)."
        },
        {
          "name": "::EvidenceCorpus::overview_path",
          "line": 197,
          "signature": "#[must_use]\npub fn overview_path(&self) -> PathBuf;",
          "documentation": "Path of the benchmark overview (`analysis/overview.md`)."
        },
        {
          "name": "::EvidenceCorpus::trace_path",
          "line": 203,
          "signature": "pub fn trace_path(&self, task: &str, run_idx: u32) -> Result<PathBuf, EvidenceCorpusError>;",
          "documentation": "Path of one task's raw trace\n(`traces/{task}.{run_idx}.txt`)."
        },
        {
          "name": "::EvidenceCorpus::write_task_analysis",
          "line": 212,
          "signature": "pub fn write_task_analysis(\n        &self,\n        analysis: &TaskAnalysis,\n    ) -> Result<PathBuf, EvidenceCorpusError>;",
          "documentation": "Write a per-task analysis. Returns the resolved file path."
        },
        {
          "name": "::EvidenceCorpus::write_overview",
          "line": 225,
          "signature": "pub fn write_overview(\n        &self,\n        overview: &OverviewReport,\n    ) -> Result<PathBuf, EvidenceCorpusError>;",
          "documentation": "Write the overview."
        },
        {
          "name": "::EvidenceCorpus::write_trace",
          "line": 240,
          "signature": "pub fn write_trace(\n        &self,\n        task: &str,\n        run_idx: u32,\n        contents: &str,\n    ) -> Result<PathBuf, EvidenceCorpusError>;",
          "documentation": "Append a raw trajectory dump for one task / run index. Each\nrun gets its own file so multi-run k\u22652 sampling lands as\n`task.0.txt`, `task.1.txt`, \u2026"
        },
        {
          "name": "::EvidenceCorpus::read_task_analysis_markdown",
          "line": 256,
          "signature": "pub fn read_task_analysis_markdown(\n        &self,\n        task: &str,\n    ) -> Result<Option<String>, EvidenceCorpusError>;",
          "documentation": "Read a per-task analysis. Returns `Ok(None)` when no\nanalysis has been written yet."
        },
        {
          "name": "::EvidenceCorpus::read_overview_markdown",
          "line": 269,
          "signature": "pub fn read_overview_markdown(&self) -> Result<Option<String>, EvidenceCorpusError>;",
          "documentation": "Read the overview. Returns `Ok(None)` when none has been\nwritten yet."
        },
        {
          "name": "::EvidenceCorpus::list_analyzed_tasks",
          "line": 279,
          "signature": "pub fn list_analyzed_tasks(&self) -> Result<Vec<String>, EvidenceCorpusError>;",
          "documentation": "List the task names that have analysis files written. Sorted\nalphabetically for deterministic ordering."
        },
        {
          "name": "::EvidenceCorpus::list_traces",
          "line": 300,
          "signature": "pub fn list_traces(&self) -> Result<Vec<PathBuf>, EvidenceCorpusError>;",
          "documentation": "List the trace files (relative paths under `traces/`)."
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/loop_driver.rs",
      "sha256": "d9f996560e0b3b3dd6a35dd3906884a183245bc8d530eef91b020a833c716528",
      "artifactSha256": "5af9983b85801f90c95a7d2b1920bafc6faa0ab548103c481f5ffc06f08099f5",
      "url": "/reference/source/harness-sdk/src/harness/loop_driver.rs.txt",
      "declarations": [
        {
          "name": "::HarnessLoopPhase",
          "line": 43,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum HarnessLoopPhase {\n    /// Phase 1: run the benchmark with the current harness.\n    Rollout,\n    /// Phase 2: strip noise from trajectories.\n    Clean,\n    /// Phase 3: verify the prior iteration's manifest contracts.\n    Attribute,\n    /// Phase 4: AgentDebugger produces the EvidenceCorpus.\n    Distill,\n    /// Phase 5: Evolve Agent edits the workspace + emits manifest.\n    Evolve,\n    /// Phase 6: git-tag the iteration.\n    Commit,\n}",
          "documentation": "One phase of the AHE iteration loop."
        },
        {
          "name": "::HarnessLoopPhase::as_key",
          "line": 61,
          "signature": "#[must_use]\npub fn as_key(self) -> &'static str;",
          "documentation": "Stable serialization key."
        },
        {
          "name": "::HarnessLoopPhase::label",
          "line": 74,
          "signature": "#[must_use]\npub fn label(self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::HarnessLoopPhase::ordering",
          "line": 87,
          "signature": "#[must_use]\npub const fn ordering() -> [HarnessLoopPhase; 6];",
          "documentation": "Canonical phase ordering."
        },
        {
          "name": "::HarnessLoopPhase::next",
          "line": 103,
          "signature": "#[must_use]\npub fn next(self) -> Option<HarnessLoopPhase>;",
          "documentation": "Phase that follows `self` in the canonical ordering.\nReturns `None` after [`HarnessLoopPhase::Commit`] (the\niteration is done; the loop driver bumps the iteration\ncounter and starts a new sequence at `Rollout`)."
        },
        {
          "name": "::HarnessLoopError",
          "line": 117,
          "signature": "#[derive(Debug, Error)]\npub enum HarnessLoopError {\n    /// The caller invoked a phase out of order (e.g. `Distill`\n    /// before `Rollout` finished).\n    #[error(\"phase {got:?} attempted before {expected:?}\")]\n    PhaseOutOfOrder {\n        /// Phase that should run next.\n        expected: HarnessLoopPhase,\n        /// Phase the caller tried to run.\n        got: HarnessLoopPhase,\n    },\n\n    /// Iteration is already complete; bump the counter before\n    /// attempting another phase.\n    #[error(\"iteration {iteration} is complete; advance to next iteration\")]\n    IterationComplete {\n        /// Completed iteration number.\n        iteration: u32,\n    },\n\n    /// Workspace I/O error.\n    #[error(transparent)]\n    Workspace(#[from] HarnessWorkspaceError),\n\n    /// Evidence corpus I/O error.\n    #[error(transparent)]\n    Evidence(#[from] EvidenceCorpusError),\n\n    /// I/O error reaching the runs root.\n    #[error(\"loop io: {0}\")]\n    Io(#[from] std::io::Error),\n\n    /// Caller-supplied phase callback failed.\n    #[error(\"phase {phase:?} failed: {reason}\")]\n    PhaseFailed {\n        /// Phase whose callback returned an error.\n        phase: HarnessLoopPhase,\n        /// Free-form reason from the caller.\n        reason: String,\n    },\n}",
          "documentation": "Errors emitted by [`HarnessLoop`] implementations."
        },
        {
          "name": "::IterationRecord",
          "line": 160,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct IterationRecord {\n/// Iteration number (matches the directory suffix).\n\npub iteration: u32,\n/// Phases completed so far in canonical order.\n\npub completed_phases: Vec<HarnessLoopPhase>,\n/// Per-task outcomes from this iteration's rollout (populated\n\n/// after Phase 1).\n\n#[serde(default)]\npub outcomes: TaskOutcomeMap,\n/// Verdicts produced by the Attribute phase against the\n\n/// *previous* iteration's manifest. Empty on iteration 1.\n\n#[serde(default)]\npub verdicts: Vec<AttributionVerdict>,\n/// Manifest produced by the Evolve phase. `None` until phase 5\n\n/// completes.\n\n#[serde(default)]\npub manifest: Option<ChangeManifest>,\n/// UNIX seconds the iteration was started.\n\npub started_at_unix_secs: u64\n}",
          "documentation": "Per-iteration record persisted to `runs/iteration_NNN/loop.json`."
        },
        {
          "name": "::StandardHarnessLoop",
          "line": 216,
          "signature": "#[derive(Debug)]\npub struct StandardHarnessLoop {\n\n}",
          "documentation": "Reference loop driver. Owns the runs root, iteration counter, and\nper-iteration record; phase work itself is supplied by the SDK\nconsumer."
        },
        {
          "name": "::StandardHarnessLoop::start",
          "line": 232,
          "signature": "pub fn start(\n        runs_root: impl Into<PathBuf>,\n        workspace: HarnessWorkspace,\n        iteration: u32,\n    ) -> Result<Self, HarnessLoopError>;",
          "documentation": "Construct a fresh loop at `iteration`, rooted at `runs_root`,\ndriving edits against `workspace`."
        },
        {
          "name": "::StandardHarnessLoop::with_prior",
          "line": 252,
          "signature": "pub fn with_prior(mut self, manifest: ChangeManifest, outcomes: TaskOutcomeMap) -> Self;",
          "documentation": "Provide the previous iteration's manifest + outcomes so the\nAttribute phase has data to score against. Iteration 1\ncallers can skip this; the Attribute phase becomes a no-op."
        },
        {
          "name": "::StandardHarnessLoop::record",
          "line": 261,
          "signature": "#[must_use]\npub fn record(&self) -> &IterationRecord;",
          "documentation": "Read-only access to the iteration record (mutable copy lives\ninside the loop)."
        },
        {
          "name": "::StandardHarnessLoop::iteration",
          "line": 267,
          "signature": "#[must_use]\npub fn iteration(&self) -> u32;",
          "documentation": "Iteration number this driver is currently inside."
        },
        {
          "name": "::StandardHarnessLoop::next_phase",
          "line": 274,
          "signature": "#[must_use]\npub fn next_phase(&self) -> Option<HarnessLoopPhase>;",
          "documentation": "The phase the loop will run on the next `run_*` call. `None`\nwhen the iteration is complete."
        },
        {
          "name": "::StandardHarnessLoop::is_complete",
          "line": 280,
          "signature": "#[must_use]\npub fn is_complete(&self) -> bool;",
          "documentation": "True once the iteration has completed phase 6 (Commit)."
        },
        {
          "name": "::StandardHarnessLoop::iteration_dir",
          "line": 286,
          "signature": "#[must_use]\npub fn iteration_dir(&self) -> PathBuf;",
          "documentation": "Path to this iteration's directory (`runs_root/iteration_NNN`)."
        },
        {
          "name": "::StandardHarnessLoop::open_corpus",
          "line": 293,
          "signature": "pub fn open_corpus(&self) -> Result<EvidenceCorpus, HarnessLoopError>;",
          "documentation": "Open the EvidenceCorpus rooted at this iteration's dir,\ncreating it if needed."
        },
        {
          "name": "::StandardHarnessLoop::workspace",
          "line": 299,
          "signature": "#[must_use]\npub fn workspace(&self) -> &HarnessWorkspace;",
          "documentation": "Borrow the workspace the Evolve phase writes into."
        },
        {
          "name": "::StandardHarnessLoop::run_rollout",
          "line": 305,
          "signature": "pub fn run_rollout(\n        &mut self,\n        outcomes: TaskOutcomeMap,\n    ) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 1: Rollout**. The caller supplies the per-task\noutcomes the rollout produced."
        },
        {
          "name": "::StandardHarnessLoop::run_clean",
          "line": 318,
          "signature": "pub fn run_clean(\n        &mut self,\n        cleanup: impl FnOnce(&Path) -> Result<(), String>,\n    ) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 2: Clean**. The caller supplies a closure that\nperforms whatever in-place trajectory cleanup is needed; the\ndriver only enforces ordering + persists the iteration\nrecord."
        },
        {
          "name": "::StandardHarnessLoop::run_attribute",
          "line": 335,
          "signature": "pub fn run_attribute(&mut self) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 3: Attribute**. Uses the prior iteration's\nmanifest + outcomes (see [`Self::with_prior`]) to verify\neach entry's contract. On iteration 1 (no prior data) this\nbecomes a no-op."
        },
        {
          "name": "::StandardHarnessLoop::run_distill",
          "line": 349,
          "signature": "pub fn run_distill(\n        &mut self,\n        debug: impl FnOnce(&EvidenceCorpus) -> Result<(), String>,\n    ) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 4: Distill**. The caller supplies a closure that\nwrites per-task analysis + overview into the supplied\n`EvidenceCorpus`."
        },
        {
          "name": "::StandardHarnessLoop::run_evolve",
          "line": 365,
          "signature": "pub fn run_evolve(\n        &mut self,\n        evolve: impl FnOnce(&HarnessWorkspace, &EvidenceCorpus) -> Result<ChangeManifest, String>,\n    ) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 5: Evolve**. The caller's closure receives the\nworkspace + corpus and returns the manifest of edits it\napplied."
        },
        {
          "name": "::StandardHarnessLoop::run_commit",
          "line": 384,
          "signature": "pub fn run_commit(\n        &mut self,\n        commit: impl FnOnce(&IterationRecord) -> Result<(), String>,\n    ) -> Result<HarnessLoopPhase, HarnessLoopError>;",
          "documentation": "Run **Phase 6: Commit**. The caller's closure performs the\ngit-tag (or whatever audit step the runtime uses); the\ndriver persists `runs/iteration_NNN/loop.json` and marks the\niteration done."
        },
        {
          "name": "::StandardHarnessLoop::loop_record_path",
          "line": 400,
          "signature": "#[must_use]\npub fn loop_record_path(&self) -> PathBuf;",
          "documentation": "Path to the iteration's `loop.json` audit file."
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/manifest.rs",
      "sha256": "24f9c7e81ba48f21a9653591ce6a7749f1fef6b1c58b271ec812728c19eb0654",
      "artifactSha256": "7fa2abf2e496c996ea5b99be255751cecfa42ad2c16c8ec35f907b1ee58ee5c7",
      "url": "/reference/source/harness-sdk/src/harness/manifest.rs.txt",
      "declarations": [
        {
          "name": "::TaskOutcome",
          "line": 26,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum TaskOutcome {\n    /// Task passed.\n    Pass,\n    /// Task failed.\n    Fail,\n    /// Task was not run (e.g. crashed, skipped).\n    NotRun,\n}",
          "documentation": "Pass / fail outcome for one task in a benchmark."
        },
        {
          "name": "::TaskOutcome::is_pass",
          "line": 38,
          "signature": "#[must_use]\npub fn is_pass(self) -> bool;",
          "documentation": "Did the task pass?"
        },
        {
          "name": "::TaskOutcome::is_fail",
          "line": 44,
          "signature": "#[must_use]\npub fn is_fail(self) -> bool;",
          "documentation": "Did the task fail (explicitly \u2014 `NotRun` is excluded)?"
        },
        {
          "name": "::TaskOutcomeMap",
          "line": 52,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(transparent)]\npub struct TaskOutcomeMap {\n/// Map keyed by task name. `BTreeMap` so serialization is\n\n/// deterministic (matters for diffing manifests across runs).\n\npub outcomes: BTreeMap<String, TaskOutcome>\n}",
          "documentation": "Per-task outcomes for one iteration of a benchmark."
        },
        {
          "name": "::TaskOutcomeMap::from_pairs",
          "line": 64,
          "signature": "#[must_use]\npub fn from_pairs<I, S>(it: I) -> Self\n    where\n        I: IntoIterator<Item = (S, TaskOutcome)>,\n        S: Into<String>,;",
          "documentation": "Construct from any iterable of `(name, outcome)` pairs.\nNamed `from_pairs` (rather than `from_iter`) to avoid\nshadowing the `FromIterator::from_iter` standard trait\nmethod, which would otherwise mask the trait impl."
        },
        {
          "name": "::TaskOutcomeMap::outcome",
          "line": 79,
          "signature": "#[must_use]\npub fn outcome(&self, task: &str) -> TaskOutcome;",
          "documentation": "Get the outcome for a task, treating an absent task as\n`NotRun`."
        },
        {
          "name": "::TaskOutcomeMap::set",
          "line": 87,
          "signature": "pub fn set(&mut self, task: impl Into<String>, outcome: TaskOutcome);",
          "documentation": "Set / overwrite the outcome for a task."
        },
        {
          "name": "::TaskOutcomeMap::iter",
          "line": 92,
          "signature": "pub fn iter(&self) -> impl Iterator<Item = (&str, TaskOutcome)>;",
          "documentation": "Iterate over `(task, outcome)` pairs in deterministic order."
        },
        {
          "name": "::TaskOutcomeMap::len",
          "line": 98,
          "signature": "#[must_use]\npub fn len(&self) -> usize;",
          "documentation": "Number of tasks recorded."
        },
        {
          "name": "::TaskOutcomeMap::is_empty",
          "line": 104,
          "signature": "#[must_use]\npub fn is_empty(&self) -> bool;",
          "documentation": "True when no tasks are recorded."
        },
        {
          "name": "::PredictedImpact",
          "line": 111,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\npub struct PredictedImpact {\n/// Tasks the evolve agent expects this edit to *fix* (move from\n\n/// `Fail` \u2192 `Pass`).\n\n#[serde(default)]\npub expected_fixes: Vec<String>,\n/// Tasks the evolve agent flags as at risk of regressing\n\n/// (currently `Pass`, may move to `Fail`).\n\n#[serde(default)]\npub at_risk_regressions: Vec<String>\n}",
          "documentation": "Predicted-impact contract attached to one [`ManifestEntry`]."
        },
        {
          "name": "::PredictedImpact::new",
          "line": 126,
          "signature": "#[must_use]\npub fn new(\n        expected_fixes: impl IntoIterator<Item = impl Into<String>>,\n        at_risk_regressions: impl IntoIterator<Item = impl Into<String>>,\n    ) -> Self;",
          "documentation": "Construct from explicit lists of expected fixes + at-risk\nregressions."
        },
        {
          "name": "::PredictedImpact::is_empty",
          "line": 142,
          "signature": "#[must_use]\npub fn is_empty(&self) -> bool;",
          "documentation": "True when the contract is silent (no claims at all). Such\nentries are unfalsifiable and should never be issued \u2014 but\nthe type permits them so the AHE loop can record them as a\ndistinct error condition rather than rejecting at parse\ntime."
        },
        {
          "name": "::ManifestEntry",
          "line": 150,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ManifestEntry {\n/// Stable id (uuid string). Lets verdicts and audit trails\n\n/// reference an entry independent of array position.\n\npub id: String,\n/// Free-form list of task failures the edit addresses (e.g.\n\n/// task names + one-line justification).\n\n#[serde(default)]\npub failure_evidence: Vec<String>,\n/// Diagnosed root cause behind those failures.\n\npub root_cause: String,\n/// One-line summary of the targeted fix the edit applies.\n\npub targeted_fix: String,\n/// Predicted impact (the falsifiable contract).\n\npub predicted_impact: PredictedImpact,\n/// The actual edit applied to the workspace.\n\npub edit: HarnessComponentEdit\n}",
          "documentation": "One entry in the change manifest \u2014 an edit + its falsifiable\ncontract."
        },
        {
          "name": "::ManifestEntry::new",
          "line": 171,
          "signature": "#[must_use]\npub fn new(\n        failure_evidence: impl IntoIterator<Item = impl Into<String>>,\n        root_cause: impl Into<String>,\n        targeted_fix: impl Into<String>,\n        predicted_impact: PredictedImpact,\n        edit: HarnessComponentEdit,\n    ) -> Self;",
          "documentation": "Construct an entry with a freshly-minted UUID."
        },
        {
          "name": "::ChangeManifest",
          "line": 191,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\npub struct ChangeManifest {\n/// Iteration this manifest belongs to (e.g. `iteration_007`).\n\npub iteration: u32,\n/// Entries in application order.\n\npub entries: Vec<ManifestEntry>\n}",
          "documentation": "One iteration's change manifest \u2014 a vector of [`ManifestEntry`]s."
        },
        {
          "name": "::ChangeManifest::new",
          "line": 201,
          "signature": "#[must_use]\npub fn new(iteration: u32) -> Self;",
          "documentation": "Construct an empty manifest for an iteration."
        },
        {
          "name": "::ChangeManifest::push",
          "line": 209,
          "signature": "pub fn push(&mut self, entry: ManifestEntry) -> usize;",
          "documentation": "Push an entry and return the slot index."
        },
        {
          "name": "::ChangeManifest::len",
          "line": 216,
          "signature": "#[must_use]\npub fn len(&self) -> usize;",
          "documentation": "Number of entries in the manifest."
        },
        {
          "name": "::ChangeManifest::is_empty",
          "line": 222,
          "signature": "#[must_use]\npub fn is_empty(&self) -> bool;",
          "documentation": "True when the manifest has no entries."
        },
        {
          "name": "::ChangeManifest::find",
          "line": 228,
          "signature": "#[must_use]\npub fn find(&self, id: &str) -> Option<&ManifestEntry>;",
          "documentation": "Find an entry by id."
        },
        {
          "name": "::AttributionDecision",
          "line": 236,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum AttributionDecision {\n    /// Every promised fix landed AND no flagged regression broke.\n    /// The edit is kept.\n    Confirmed,\n    /// Some promised fixes landed; some flagged regressions\n    /// broke. The loop driver decides whether to keep or revert.\n    PartiallyConfirmed,\n    /// No promised fixes landed (or every flagged regression\n    /// broke). The edit is reverted.\n    Refuted,\n    /// The contract was silent (`PredictedImpact::is_empty()`); the\n    /// edit cannot be falsified and is treated as refuted by\n    /// default \u2014 the AHE paper requires a non-trivial contract.\n    UnfalsifiableContract,\n}",
          "documentation": "Verdict the [`Attribute`] step assigns to one entry."
        },
        {
          "name": "::AttributionDecision::is_keep",
          "line": 255,
          "signature": "#[must_use]\npub fn is_keep(self) -> bool;",
          "documentation": "True when the verdict says \"keep the edit\"."
        },
        {
          "name": "::AttributionDecision::is_revert",
          "line": 261,
          "signature": "#[must_use]\npub fn is_revert(self) -> bool;",
          "documentation": "True when the verdict says \"revert the edit\"."
        },
        {
          "name": "::TaskDelta",
          "line": 271,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct TaskDelta {\n/// Task name.\n\npub task: String,\n/// Outcome before the edit (i.e. the prior iteration's run).\n\npub before: TaskOutcome,\n/// Outcome after the edit (this iteration's run).\n\npub after: TaskOutcome\n}",
          "documentation": "One task's evidence about a single manifest entry."
        },
        {
          "name": "::TaskDelta::is_fix",
          "line": 283,
          "signature": "#[must_use]\npub fn is_fix(&self) -> bool;",
          "documentation": "Did this task move from `Fail` \u2192 `Pass`?"
        },
        {
          "name": "::TaskDelta::is_regression",
          "line": 289,
          "signature": "#[must_use]\npub fn is_regression(&self) -> bool;",
          "documentation": "Did this task move from `Pass` \u2192 `Fail`?"
        },
        {
          "name": "::AttributionVerdict",
          "line": 296,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct AttributionVerdict {\n/// Manifest entry id this verdict belongs to.\n\npub entry_id: String,\n/// Decision (`Confirmed` / `PartiallyConfirmed` / `Refuted` /\n\n/// `UnfalsifiableContract`).\n\npub decision: AttributionDecision,\n/// Promised fixes that actually landed.\n\npub confirmed_fixes: Vec<TaskDelta>,\n/// Promised fixes that did **not** land.\n\npub missed_fixes: Vec<TaskDelta>,\n/// Regressions the contract flagged that DID happen.\n\npub triggered_regressions: Vec<TaskDelta>,\n/// Regressions the contract flagged that did NOT happen\n\n/// (kept stable).\n\npub avoided_regressions: Vec<TaskDelta>\n}",
          "documentation": "Per-entry verdict: decision + the deltas that justify it."
        },
        {
          "name": "::AttributionVerdict::is_keep",
          "line": 316,
          "signature": "#[must_use]\npub fn is_keep(&self) -> bool;",
          "documentation": "True when the decision says \"keep the edit\" (Confirmed)."
        },
        {
          "name": "::AttributionVerdict::is_revert",
          "line": 323,
          "signature": "#[must_use]\npub fn is_revert(&self) -> bool;",
          "documentation": "True when the decision says \"revert the edit\" (Refuted\nUnfalsifiableContract)."
        },
        {
          "name": "::attribute",
          "line": 331,
          "signature": "#[must_use]\npub fn attribute(\n    manifest: &ChangeManifest,\n    before: &TaskOutcomeMap,\n    after: &TaskOutcomeMap,\n) -> Vec<AttributionVerdict>;",
          "documentation": "Run [`Attribute`] over an entire manifest, returning one verdict\nper entry in the same order."
        },
        {
          "name": "::attribute_entry",
          "line": 345,
          "signature": "#[must_use]\npub fn attribute_entry(\n    entry: &ManifestEntry,\n    before: &TaskOutcomeMap,\n    after: &TaskOutcomeMap,\n) -> AttributionVerdict;",
          "documentation": "Score one manifest entry against `before` / `after` outcomes."
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/mod.rs",
      "sha256": "68e6baeae3a3575b1dd51ccae9f08c2532cb2d76da6ec15ee97f9b41d7ad998a",
      "artifactSha256": "02a74a28e499be3399d47ebfafc9d468aa63380462aa3afdda2c0eab3b2628a2",
      "url": "/reference/source/harness-sdk/src/harness/mod.rs.txt",
      "declarations": [
        {
          "name": "component",
          "line": 26,
          "signature": "pub mod component;",
          "documentation": "Agentic Harness Engineering (AHE) primitives.\n\nModeled on \"Agentic Harness Engineering: Observability-Driven\nAutomatic Evolution of Coding-Agent Harnesses\" (arXiv 2604.25850).\nThe paper describes a framework for autonomous evolution of a\ncoding agent's *harness* \u2014 the configuration files, tools,\nmiddleware, skills, and memory that wrap a base model \u2014 through\nthree observability pillars:\n\n1. **Component observability** \u2014 every editable harness piece is\n   a file at a fixed mount point, so edits are atomic and\n   reversible. See [`component`] + [`workspace`].\n2. **Experience observability** \u2014 trajectory traces are distilled\n   into a layered evidence corpus the next iteration's evolve\n   agent can read. See [`evidence`] (iteration B follow-up).\n3. **Decision observability** \u2014 every edit ships with a\n   falsifiable contract (`failure_evidence`, `root_cause`,\n   `targeted_fix`, `predicted_impact`); the next iteration's\n   `Attribute()` step verifies the contract against actual task\n   deltas. See [`manifest`] (iteration B follow-up).\n\nThis module is the SDK foundation for those pillars. Higher-level\nintegrations (loop drivers, kit widgets) build on top of these\nprimitives."
        },
        {
          "name": "evidence",
          "line": 27,
          "signature": "pub mod evidence;",
          "documentation": ""
        },
        {
          "name": "loop_driver",
          "line": 28,
          "signature": "pub mod loop_driver;",
          "documentation": ""
        },
        {
          "name": "manifest",
          "line": 29,
          "signature": "pub mod manifest;",
          "documentation": ""
        },
        {
          "name": "workspace",
          "line": 30,
          "signature": "pub mod workspace;",
          "documentation": ""
        },
        {
          "name": "pub use component::{\n    HarnessComponentEdit, HarnessComponentEditKind, HarnessComponentKind, HARNESS_COMPONENT_KINDS,\n};",
          "line": 32,
          "signature": "pub use component::{\n    HarnessComponentEdit, HarnessComponentEditKind, HarnessComponentKind, HARNESS_COMPONENT_KINDS,\n};",
          "documentation": ""
        },
        {
          "name": "pub use evidence::{EvidenceCorpus, EvidenceCorpusError, OverviewReport, TaskAnalysis};",
          "line": 35,
          "signature": "pub use evidence::{EvidenceCorpus, EvidenceCorpusError, OverviewReport, TaskAnalysis};",
          "documentation": ""
        },
        {
          "name": "pub use loop_driver::{HarnessLoopError, HarnessLoopPhase, IterationRecord, StandardHarnessLoop};",
          "line": 36,
          "signature": "pub use loop_driver::{HarnessLoopError, HarnessLoopPhase, IterationRecord, StandardHarnessLoop};",
          "documentation": ""
        },
        {
          "name": "pub use manifest::{\n    attribute, attribute_entry, AttributionDecision, AttributionVerdict, ChangeManifest,\n    ManifestEntry, PredictedImpact, TaskDelta, TaskOutcome, TaskOutcomeMap,\n};",
          "line": 37,
          "signature": "pub use manifest::{\n    attribute, attribute_entry, AttributionDecision, AttributionVerdict, ChangeManifest,\n    ManifestEntry, PredictedImpact, TaskDelta, TaskOutcome, TaskOutcomeMap,\n};",
          "documentation": ""
        },
        {
          "name": "pub use workspace::{HarnessWorkspace, HarnessWorkspaceError};",
          "line": 41,
          "signature": "pub use workspace::{HarnessWorkspace, HarnessWorkspaceError};",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/harness/workspace.rs",
      "sha256": "73b639b9eceeeb2ccc14730b5fac74ca9fd376106a27e00ccc4ffbd3c2d168d3",
      "artifactSha256": "960e62c17b2663870bd596c50481e98f667a69a13fed6208ed83ff20d6d24264",
      "url": "/reference/source/harness-sdk/src/harness/workspace.rs.txt",
      "declarations": [
        {
          "name": "::HarnessWorkspaceError",
          "line": 22,
          "signature": "#[derive(Debug, Error)]\npub enum HarnessWorkspaceError {\n    /// I/O error reaching the workspace.\n    #[error(\"workspace io: {0}\")]\n    Io(#[from] io::Error),\n\n    /// A path escapes the workspace root (e.g. `..`).\n    #[error(\"path {0} escapes the workspace root\")]\n    PathEscape(PathBuf),\n\n    /// An edit targeted a non-editable component (i.e.\n    /// [`HarnessComponentKind::ShortTermMemory`]).\n    #[error(\"component {0:?} is not editable\")]\n    NotEditable(HarnessComponentKind),\n\n    /// Edit path does not live under the component's mount point.\n    #[error(\"path {path:?} does not live under the {kind:?} mount {mount:?}\")]\n    MountMismatch {\n        /// The kind whose mount the path was supposed to live under.\n        kind: HarnessComponentKind,\n        /// The path the caller supplied.\n        path: PathBuf,\n        /// The expected mount.\n        mount: PathBuf,\n    },\n}",
          "documentation": "Errors emitted by [`HarnessWorkspace`]."
        },
        {
          "name": "::HarnessWorkspace",
          "line": 50,
          "signature": "#[derive(Debug, Clone)]\npub struct HarnessWorkspace {\n\n}",
          "documentation": "Typed view over a harness workspace directory."
        },
        {
          "name": "::HarnessWorkspace::open",
          "line": 56,
          "signature": "pub fn open(root: impl Into<PathBuf>) -> Result<Self, HarnessWorkspaceError>;",
          "documentation": "Open a workspace at `root`, creating the directory if needed."
        },
        {
          "name": "::HarnessWorkspace::root",
          "line": 64,
          "signature": "#[must_use]\npub fn root(&self) -> &Path;",
          "documentation": "Read-only access to the workspace root."
        },
        {
          "name": "::HarnessWorkspace::mount_path",
          "line": 71,
          "signature": "#[must_use]\npub fn mount_path(&self, kind: HarnessComponentKind) -> PathBuf;",
          "documentation": "Resolve the on-disk path for a component's mount point.\nReturns the component's directory for directory-backed kinds."
        },
        {
          "name": "::HarnessWorkspace::read_single_file",
          "line": 77,
          "signature": "pub fn read_single_file(\n        &self,\n        kind: HarnessComponentKind,\n    ) -> Result<Option<String>, HarnessWorkspaceError>;",
          "documentation": "Read a single-file component (system prompt, long-term memory).\nReturns `Ok(None)` when the file is missing."
        },
        {
          "name": "::HarnessWorkspace::write_single_file",
          "line": 90,
          "signature": "pub fn write_single_file(\n        &self,\n        kind: HarnessComponentKind,\n        contents: &str,\n    ) -> Result<PathBuf, HarnessWorkspaceError>;",
          "documentation": "Write a single-file component, replacing whatever was there."
        },
        {
          "name": "::HarnessWorkspace::list_directory",
          "line": 110,
          "signature": "pub fn list_directory(\n        &self,\n        kind: HarnessComponentKind,\n    ) -> Result<Vec<PathBuf>, HarnessWorkspaceError>;",
          "documentation": "List relative paths of files inside a directory-backed\ncomponent (e.g. `tools/grep.py`, `tools/cat.py`). Returns an\nempty vector when the directory does not yet exist."
        },
        {
          "name": "::HarnessWorkspace::read_directory_file",
          "line": 128,
          "signature": "pub fn read_directory_file(\n        &self,\n        kind: HarnessComponentKind,\n        path: impl AsRef<Path>,\n    ) -> Result<Option<String>, HarnessWorkspaceError>;",
          "documentation": "Read a single file inside a directory-backed component (path\nis relative to the workspace root, must live under the\ncomponent's mount)."
        },
        {
          "name": "::HarnessWorkspace::apply_edit",
          "line": 143,
          "signature": "pub fn apply_edit(\n        &self,\n        edit: &HarnessComponentEdit,\n    ) -> Result<PathBuf, HarnessWorkspaceError>;",
          "documentation": "Apply a single [`HarnessComponentEdit`] atomically. Each edit\nis verified against the component's mount before any I/O.\nReturns the resolved on-disk path that was written / removed."
        },
        {
          "name": "::HarnessWorkspace::apply_batch",
          "line": 180,
          "signature": "pub fn apply_batch(\n        &self,\n        edits: &[HarnessComponentEdit],\n    ) -> Result<Vec<PathBuf>, HarnessWorkspaceError>;",
          "documentation": "Apply a batch of edits sequentially, returning the resolved\npath for each one. Stops at the first error and returns it \u2014\nthe caller is responsible for rolling back via git tags or\nequivalent."
        }
      ]
    },
    {
      "path": "harness-sdk/src/interjection/delivery.rs",
      "sha256": "22a8756f23e906240b3cfc4c4d7af09b5e328c83eb4372bd586309458b12e778",
      "artifactSha256": "e4a5dfe5396f3e23a0f26c031a38dc220169f8aa7b31bf7619bdf999c34f1880",
      "url": "/reference/source/harness-sdk/src/interjection/delivery.rs.txt",
      "declarations": [
        {
          "name": "::deliver_interjection",
          "line": 21,
          "signature": "pub async fn deliver_interjection(\n    adapter: &Arc<dyn AgentAdapter>,\n    interjection: &HumanInterjection,\n) -> Result<InterjectionAck, SdkError>;",
          "documentation": "Deliver a parsed interjection to the adapter.\n\nIf the adapter doesn't support interjections, returns an error.\nValidates the acknowledgement before returning.\n\n# Errors\n\nReturns [`SdkError::Adapter`] if the adapter rejects the interjection.\nReturns [`SdkError::NotSupported`] if the adapter doesn't support interjections."
        }
      ]
    },
    {
      "path": "harness-sdk/src/interjection/mod.rs",
      "sha256": "1222daac8ff5cb3eb69a477e9cb04dbb15b73e5dadf9fb73c974260c9a3b7a9d",
      "artifactSha256": "c8005b1f2a7aa57345c4cb506403187a4d878e25712d0d8a0ae9e4159653ba52",
      "url": "/reference/source/harness-sdk/src/interjection/mod.rs.txt",
      "declarations": [
        {
          "name": "delivery",
          "line": 8,
          "signature": "pub mod delivery;",
          "documentation": "Human interjection parsing and delivery.\n\nDuring autonomy mode, users send interjections \u2014 structured messages\nwith priority, kind, and optional agent targeting. This module parses\nraw user input into [`HumanInterjection`](crate::HumanInterjection)\nand delivers them to the adapter."
        },
        {
          "name": "parser",
          "line": 9,
          "signature": "pub mod parser;",
          "documentation": ""
        },
        {
          "name": "sanitizer",
          "line": 10,
          "signature": "pub mod sanitizer;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/interjection/parser.rs",
      "sha256": "b3faf7ae3673f72dd05850657b6a978951c7450f8112ed3d20443b0bc1710c2d",
      "artifactSha256": "49731c1d299cc473f3bd309e82eededf875948ee7b49b23e5dceb4a54a47cf43",
      "url": "/reference/source/harness-sdk/src/interjection/parser.rs.txt",
      "declarations": [
        {
          "name": "::parse_interjection",
          "line": 70,
          "signature": "pub fn parse_interjection(raw: &str) -> Result<HumanInterjection, ParseError>;",
          "documentation": "Parse raw user input into a structured [`HumanInterjection`].\n\nInput is trimmed, length-checked, and sanitized before parsing.\n\n# Errors\n\nReturns [`ParseError::EmptyInput`] if the input is empty/whitespace.\nReturns [`ParseError::TooLong`] if the input exceeds [`MAX_INTERJECTION_LEN`].\nReturns [`ParseError::InvalidTarget`] if `@` is followed by an invalid agent name.\n\n# Examples\n\n```\nuse harness_sdk::interjection::parser::parse_interjection;\nuse harness_sdk::{InterjectionPriority, InterjectionKind};\n\n// Urgent broadcast\nlet i = parse_interjection(\"!!emergency\").unwrap();\nassert_eq!(i.priority, InterjectionPriority::Urgent);\nassert_eq!(i.kind, InterjectionKind::Instruction);\nassert!(i.target.is_none());\n\n// Targeted instruction\nlet i = parse_interjection(\"@Navigator fix the bug\").unwrap();\nassert_eq!(i.target, Some(\"Navigator\".to_string()));\nassert_eq!(i.kind, InterjectionKind::Instruction);\n\n// Question\nlet i = parse_interjection(\"what is the status?\").unwrap();\nassert_eq!(i.kind, InterjectionKind::Question);\n\n// Mission\nlet i = parse_interjection(\"NEW MISSION: deploy v2\").unwrap();\nassert_eq!(i.kind, InterjectionKind::Mission);\nassert_eq!(i.priority, InterjectionPriority::High);\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/interjection/sanitizer.rs",
      "sha256": "3f1f81392773707cc3335bfe1d367e6fcda5e6698da7d105e78e3eba76bb8560",
      "artifactSha256": "0629dd1056828fca5f45d394d07f388130d8c977233d052422f00f5aec13b935",
      "url": "/reference/source/harness-sdk/src/interjection/sanitizer.rs.txt",
      "declarations": [
        {
          "name": "::sanitize_input",
          "line": 33,
          "signature": "#[must_use]\npub fn sanitize_input(input: &str) -> String;",
          "documentation": "Sanitize user input for safe processing.\n\nStrips ANSI escape sequences, control characters (except newlines),\nand applies the Kit's terminal safety sanitization.\n\n# Examples\n\n```\nuse harness_sdk::interjection::sanitizer::sanitize_input;\n\nassert_eq!(sanitize_input(\"hello\"), \"hello\");\nassert_eq!(sanitize_input(\"  hello  \"), \"  hello  \");\nassert_eq!(sanitize_input(\"hello\\0world\"), \"helloworld\");\nassert_eq!(sanitize_input(\"\u65e5\u672c\u8a9e \ud83c\udf0d\"), \"\u65e5\u672c\u8a9e \ud83c\udf0d\");\n```"
        },
        {
          "name": "::sanitize_output",
          "line": 51,
          "signature": "#[must_use]\npub fn sanitize_output(text: &str) -> String;",
          "documentation": "Sanitize adapter-provided text for terminal rendering.\n\nThis is the primary sanitization entry point for all text that comes\nfrom an adapter before it reaches Kit components.\n\n# Examples\n\n```\nuse harness_sdk::interjection::sanitizer::sanitize_output;\n\nlet safe = sanitize_output(\"normal\\x1b]0;evil\\x07text\");\nassert!(!safe.contains(\"\\x1b]0;\"));\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/keymap/action.rs",
      "sha256": "087b17d592dca3a6bad9ce549f0d033cf396ee408fb457690277f753e9eadd4a",
      "artifactSha256": "90b6fc72c476802592cfd6c99e32bd53bae79ccd4a2b43d0d32e8dc58499ccf3",
      "url": "/reference/source/harness-sdk/src/keymap/action.rs.txt",
      "declarations": [
        {
          "name": "::Action",
          "line": 14,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum Action {\n    // \u2500\u2500 Composer \u2500\u2500\n    /// Submit the current input.\n    Submit,\n    /// Cancel the current operation (clears input, dismisses overlay,\n    /// stops a streaming response, etc. \u2014 the handler decides).\n    Cancel,\n    /// Insert a literal newline in the composer.\n    InsertNewline,\n\n    // \u2500\u2500 App lifecycle \u2500\u2500\n    /// Quit the application.\n    Quit,\n    /// Clear the chat / activity log.\n    ClearHistory,\n    /// Clear the terminal scrollback.\n    ClearTerminal,\n\n    // \u2500\u2500 Layout \u2500\u2500\n    /// Toggle the sidebar between expanded and collapsed.\n    ToggleSidebar,\n    /// Switch between Chat and Autonomy modes.\n    ToggleMode,\n    /// Stop the active autonomy session.\n    StopAutonomy,\n\n    // \u2500\u2500 Overlays \u2500\u2500\n    /// Open the slash-command palette.\n    OpenPalette,\n    /// Open the transcript / pager overlay.\n    OpenTranscript,\n    /// Open the resume picker.\n    OpenResumePicker,\n    /// Open the user's `$EDITOR` for the current draft.\n    OpenExternalEditor,\n\n    // \u2500\u2500 Scrolling \u2500\u2500\n    /// Scroll one page up.\n    ScrollPageUp,\n    /// Scroll one page down.\n    ScrollPageDown,\n    /// Scroll one half-page up.\n    ScrollHalfPageUp,\n    /// Scroll one half-page down.\n    ScrollHalfPageDown,\n    /// Jump to the top of the chat / pager.\n    ScrollHome,\n    /// Jump to the bottom of the chat / pager.\n    ScrollEnd,\n\n    // \u2500\u2500 Approvals \u2500\u2500\n    /// Approve the current pending request once.\n    ApproveOnce,\n    /// Approve the current pending request and persist the suggested\n    /// glob pattern.\n    ApproveAlways,\n    /// Deny the current pending request.\n    Deny,\n}",
          "documentation": "One discrete action the event loop can dispatch."
        },
        {
          "name": "::Action::key",
          "line": 79,
          "signature": "#[must_use]\npub fn key(self) -> &'static str;",
          "documentation": "Stable key for serialization / config look-up. Matches the\n`serde(rename_all = \"snake_case\")` projection of the variant\nname."
        }
      ]
    },
    {
      "path": "harness-sdk/src/keymap/binding.rs",
      "sha256": "79d49bee63f1a186d7ea0ac618d4d78270597479a6cf2b820b482ef2b6dbb7ab",
      "artifactSha256": "95eda6d56f22fc4fc6777f461fb8514e8854ae6a456cfad33fcaf0a9a2055854",
      "url": "/reference/source/harness-sdk/src/keymap/binding.rs.txt",
      "declarations": [
        {
          "name": "::KeySpecError",
          "line": 13,
          "signature": "#[derive(Debug, Error, PartialEq, Eq)]\npub enum KeySpecError {\n    /// The spec is empty or whitespace-only.\n    #[error(\"empty key spec\")]\n    Empty,\n    /// A modifier token was not one of `ctrl`, `alt`, `shift`, `meta`.\n    #[error(\"unknown modifier: {0}\")]\n    UnknownModifier(String),\n    /// The terminal token did not name a key we know.\n    #[error(\"unknown key: {0}\")]\n    UnknownKey(String),\n    /// The chord referenced more than the supported two segments.\n    #[error(\"chord too long: {0}\")]\n    ChordTooLong(String),\n}",
          "documentation": "Errors emitted by [`parse_key_spec`]."
        },
        {
          "name": "::KeyBinding",
          "line": 36,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]\npub struct KeyBinding {\n/// Optional first half of a chord (`Ctrl+X` in `Ctrl+X Ctrl+E`).\n\n/// `None` for non-chord bindings.\n\npub prefix: Option<KeyChordHalf>,\n/// The terminal half (always set).\n\npub terminal: KeyChordHalf\n}",
          "documentation": "A single key event the event loop matches against.\n\nBindings are constructed from spec strings via [`parse_key_spec`]\nor [`parse_key_spec_chord`]. They are deliberately not\nserde-serializable directly \u2014 store overrides as\n`HashMap<Action, Vec<String>>` (each string a key spec) and let\n[`crate::Keymap::from_overrides`] parse them."
        },
        {
          "name": "::KeyChordHalf",
          "line": 46,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]\npub struct KeyChordHalf {\n/// The key code.\n\npub code: KeyCode,\n/// Modifier mask.\n\npub modifiers: KeyModifiers\n}",
          "documentation": "One half of a key chord: a key code plus modifiers."
        },
        {
          "name": "::KeyBinding::single",
          "line": 56,
          "signature": "#[must_use]\npub fn single(code: KeyCode, modifiers: KeyModifiers) -> Self;",
          "documentation": "Construct a single-key (non-chord) binding."
        },
        {
          "name": "::KeyBinding::chord",
          "line": 65,
          "signature": "#[must_use]\npub fn chord(prefix: KeyChordHalf, terminal: KeyChordHalf) -> Self;",
          "documentation": "Construct a two-key chord (`prefix` then `terminal`)."
        },
        {
          "name": "::KeyBinding::is_chord",
          "line": 74,
          "signature": "#[must_use]\npub fn is_chord(&self) -> bool;",
          "documentation": "True when this is a chord (two-key) binding."
        },
        {
          "name": "::KeyBinding::matches_event",
          "line": 83,
          "signature": "#[must_use]\npub fn matches_event(&self, ev: &KeyEvent) -> bool;",
          "documentation": "Match a single inbound `KeyEvent` against this binding's\nterminal half. Chord matching is the caller's responsibility:\nonce the prefix has been seen, match against the terminal\nusing this method."
        },
        {
          "name": "::KeyBinding::matches_prefix",
          "line": 90,
          "signature": "#[must_use]\npub fn matches_prefix(&self, ev: &KeyEvent) -> bool;",
          "documentation": "Match a single inbound key event against this binding's\nprefix half (if any)."
        },
        {
          "name": "::parse_key_spec",
          "line": 99,
          "signature": "pub fn parse_key_spec(spec: &str) -> Result<KeyBinding, KeySpecError>;",
          "documentation": "Parse a single (non-chord) key spec like `\"ctrl+b\"` or `\"enter\"`."
        },
        {
          "name": "::parse_key_spec_chord",
          "line": 114,
          "signature": "pub fn parse_key_spec_chord(spec: &str) -> Result<KeyBinding, KeySpecError>;",
          "documentation": "Parse a chord spec \u2014 one or two whitespace-separated halves.\n`parse_key_spec_chord(\"ctrl+x ctrl+e\")` returns a chord;\n`parse_key_spec_chord(\"ctrl+b\")` returns a single binding."
        }
      ]
    },
    {
      "path": "harness-sdk/src/keymap/contextual.rs",
      "sha256": "6f348576cfff9684734031dc2d4ed5207d9033ce3e008cf41a1efd360ed3e024",
      "artifactSha256": "479c69a5b54accf38958b57cd935c1c0f55750bb298cc6c9ee4de8c0cc39c79c",
      "url": "/reference/source/harness-sdk/src/keymap/contextual.rs.txt",
      "declarations": [
        {
          "name": "::KeymapContext",
          "line": 19,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum KeymapContext {\n    /// App-wide bindings always active (Ctrl+C quit, Ctrl+B sidebar\n    /// toggle, \u2026).\n    App,\n    /// Chat surface focused.\n    Chat,\n    /// Composer / input bar focused.\n    Composer,\n    /// Pager overlay open.\n    Pager,\n    /// Generic list picker (resume / theme / model / backtrack /\n    /// component-tree).\n    List,\n    /// Approval modal up.\n    Approval,\n}",
          "documentation": "One TUI context. The runtime sets the active context as the user\nnavigates (composer focused, pager open, approval modal up \u2026)."
        },
        {
          "name": "::ContextualKeymap",
          "line": 40,
          "signature": "#[derive(Debug, Clone)]\npub struct ContextualKeymap {\n\n}",
          "documentation": "Per-context keymap bundle. Each context owns its own [`Keymap`];\nresolution falls back to [`KeymapContext::App`] for actions that\nare not bound in the active context."
        },
        {
          "name": "::ContextualKeymap::with_defaults",
          "line": 54,
          "signature": "#[must_use]\npub fn with_defaults() -> Self;",
          "documentation": "Construct with the built-in defaults wired into every\ncontext. Specific contexts override the global behaviour\nwhen the same key is rebound there."
        },
        {
          "name": "::ContextualKeymap::for_context_mut",
          "line": 67,
          "signature": "#[must_use]\npub fn for_context_mut(&mut self, ctx: KeymapContext) -> &mut Keymap;",
          "documentation": "Borrow the keymap for a context (mutable)."
        },
        {
          "name": "::ContextualKeymap::for_context",
          "line": 80,
          "signature": "#[must_use]\npub fn for_context(&self, ctx: KeymapContext) -> &Keymap;",
          "documentation": "Borrow the keymap for a context."
        },
        {
          "name": "::ContextualKeymap::resolve",
          "line": 94,
          "signature": "#[must_use]\npub fn resolve(&self, ctx: KeymapContext, ev: &KeyEvent) -> Option<Action>;",
          "documentation": "Resolve a key event in `ctx`, falling back to the App map\nwhen the action is unbound in the local context."
        },
        {
          "name": "::ContextualKeymap::apply_override",
          "line": 107,
          "signature": "pub fn apply_override(\n        &mut self,\n        ctx: KeymapContext,\n        overrides: &std::collections::HashMap<Action, Vec<String>>,\n    ) -> Result<(), KeymapError>;",
          "documentation": "Apply a context-specific override map. Empty `Vec` unbinds\nthe action in that context."
        }
      ]
    },
    {
      "path": "harness-sdk/src/keymap/mod.rs",
      "sha256": "2fc51a422b26a7f24eea4971bf68a96a0abf140d8c57e3f293558a6783b21e54",
      "artifactSha256": "a95e64ac43f150c4e8bedfed43b6ec344cc457ef78da25929ac986765bc2aab2",
      "url": "/reference/source/harness-sdk/src/keymap/mod.rs.txt",
      "declarations": [
        {
          "name": "pub use action::Action;",
          "line": 39,
          "signature": "pub use action::Action;",
          "documentation": ""
        },
        {
          "name": "pub use binding::{parse_key_spec, parse_key_spec_chord, KeyBinding, KeySpecError};",
          "line": 40,
          "signature": "pub use binding::{parse_key_spec, parse_key_spec_chord, KeyBinding, KeySpecError};",
          "documentation": ""
        },
        {
          "name": "pub use contextual::{ContextualKeymap, KeymapContext};",
          "line": 41,
          "signature": "pub use contextual::{ContextualKeymap, KeymapContext};",
          "documentation": ""
        },
        {
          "name": "pub use runtime::{Keymap, KeymapError};",
          "line": 42,
          "signature": "pub use runtime::{Keymap, KeymapError};",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/keymap/runtime.rs",
      "sha256": "0fbb0e54c62df50cd662faa6bd28abc7498606766391cbc921a6f1673103bde4",
      "artifactSha256": "2c11c6aae2b742e80232d7d926fbecf9f5daa6dffafc2d25438ae6bf74de9e6a",
      "url": "/reference/source/harness-sdk/src/keymap/runtime.rs.txt",
      "declarations": [
        {
          "name": "::KeymapError",
          "line": 18,
          "signature": "#[derive(Debug, Error)]\npub enum KeymapError {\n    /// One of the override spec strings failed to parse.\n    #[error(\"invalid key spec for {action:?}: {source}\")]\n    Spec {\n        /// Which action's binding spec failed.\n        action: Action,\n        /// Original parse error.\n        #[source]\n        source: KeySpecError,\n    },\n}",
          "documentation": "Errors emitted when constructing or resolving a [`Keymap`]."
        },
        {
          "name": "::Keymap",
          "line": 35,
          "signature": "#[derive(Debug, Clone)]\npub struct Keymap {\n\n}",
          "documentation": "Pre-resolved binding table.\n\nInternal storage is a `HashMap<Action, Vec<KeyBinding>>`. Bindings\nare matched in insertion order; the first match wins."
        },
        {
          "name": "::Keymap::with_defaults",
          "line": 44,
          "signature": "#[must_use]\npub fn with_defaults() -> Self;",
          "documentation": "Construct a keymap from the built-in default table. Equivalent\nto [`<Keymap as Default>::default`] \u2014 provided as a named\nconstructor so call sites read more clearly."
        },
        {
          "name": "::Keymap::empty",
          "line": 55,
          "signature": "#[must_use]\npub fn empty() -> Self;",
          "documentation": "Construct an empty keymap with no bindings at all. Useful for\nSDK consumers who want to author every binding from scratch."
        },
        {
          "name": "::Keymap::from_overrides",
          "line": 64,
          "signature": "pub fn from_overrides(overrides: &HashMap<Action, Vec<String>>) -> Result<Self, KeymapError>;",
          "documentation": "Construct a keymap from defaults overlaid with user overrides.\nAn override with an empty `Vec` *unbinds* the action; the\ndefault is removed and not replaced."
        },
        {
          "name": "::Keymap::bindings_for",
          "line": 86,
          "signature": "#[must_use]\npub fn bindings_for(&self, action: Action) -> &[KeyBinding];",
          "documentation": "Return all bindings configured for `action`, in match order."
        },
        {
          "name": "::Keymap::resolve",
          "line": 97,
          "signature": "#[must_use]\npub fn resolve(&self, ev: &KeyEvent) -> Option<Action>;",
          "documentation": "Resolve a single key event to an action.\n\nUsed when no chord prefix is currently armed. Returns the\nfirst action whose terminal half matches `ev` and whose\nbinding is *not* a chord (chord bindings only fire after a\nsuccessful prefix match \u2014 see [`Self::resolve_chord_terminal`])."
        },
        {
          "name": "::Keymap::resolve_chord_prefix",
          "line": 112,
          "signature": "#[must_use]\npub fn resolve_chord_prefix(&self, ev: &KeyEvent) -> Option<Action>;",
          "documentation": "Return the first action whose binding has a chord prefix that\nmatches `ev`. Callers use this to know when to arm a chord\nstate machine for the second key."
        },
        {
          "name": "::Keymap::resolve_chord_terminal",
          "line": 127,
          "signature": "#[must_use]\npub fn resolve_chord_terminal(\n        &self,\n        prefix_event: &KeyEvent,\n        terminal_event: &KeyEvent,\n    ) -> Option<Action>;",
          "documentation": "Resolve the terminal half of a chord. The caller passes the\n`prefix_event` that armed the chord plus the new `terminal_event`\n\u2014 both must match the same binding for the action to fire."
        }
      ]
    },
    {
      "path": "harness-sdk/src/lib.rs",
      "sha256": "6eca19f37fa1b24e01d520902899de87916a65baba3661c3d7b50666504e3bfc",
      "artifactSha256": "3671cf61785629aae1cdc2ad1736628dc81140f1cfbfec514f7e70cd3f90ce33",
      "url": "/reference/source/harness-sdk/src/lib.rs.txt",
      "declarations": [
        {
          "name": "adapter",
          "line": 42,
          "signature": "pub mod adapter;",
          "documentation": "# Harness SDK\n\nRust framework for building autonomous agent harnesses.\n\nHarness SDK assembles [Harness TUI Kit](harness_tui_kit) components into complete\nterminal applications, plus the AHE (Agentic Harness Engineering \u2014 arXiv\n2604.25850) primitives every coding agent needs to evolve its harness\nautonomously: a typed `HarnessWorkspace` over the 7 editable component\nkinds, falsifiable `ChangeManifest` contracts, a layered `EvidenceCorpus`,\nand the 6-phase Rollout \u2192 Clean \u2192 Attribute \u2192 Distill \u2192 Evolve \u2192 Commit\niteration loop. A developer implements one trait ([`AgentAdapter`]),\nsupplies their orchestrator, and gets a production TUI with chat mode,\nautonomy mode, streaming, tool-call display, interjection protocol,\napproval management, session persistence, and the AHE engine.\n\n## Quick Start\n\n```rust,no_run\nuse harness_sdk::{AgentAdapter, AdapterCapabilities, AdapterError, SdkAgentInfo, ResponseChunk};\nuse futures::stream::BoxStream;\n\nstruct MyAdapter;\n\n#[async_trait::async_trait]\nimpl AgentAdapter for MyAdapter {\n    fn name(&self) -> &str { \"my-app\" }\n    fn capabilities(&self) -> AdapterCapabilities { AdapterCapabilities::chat_only() }\n    async fn list_agents(&self) -> Result<Vec<SdkAgentInfo>, AdapterError> {\n        Ok(vec![SdkAgentInfo::new(\"a1\", \"Agent\", \"gpt-4o\")])\n    }\n    async fn send_message(\n        &self, agent_id: &str, _msg: &str,\n    ) -> Result<BoxStream<'static, ResponseChunk>, AdapterError> {\n        Ok(Box::pin(futures::stream::iter(vec![\n            ResponseChunk::Done { agent_id: agent_id.to_string() },\n        ])))\n    }\n}\n```"
        },
        {
          "name": "backtrack",
          "line": 43,
          "signature": "pub mod backtrack;",
          "documentation": ""
        },
        {
          "name": "clipboard",
          "line": 44,
          "signature": "pub mod clipboard;",
          "documentation": ""
        },
        {
          "name": "composer",
          "line": 45,
          "signature": "pub mod composer;",
          "documentation": ""
        },
        {
          "name": "error",
          "line": 46,
          "signature": "pub mod error;",
          "documentation": ""
        },
        {
          "name": "external_editor",
          "line": 47,
          "signature": "pub mod external_editor;",
          "documentation": ""
        },
        {
          "name": "harness",
          "line": 48,
          "signature": "pub mod harness;",
          "documentation": ""
        },
        {
          "name": "keymap",
          "line": 49,
          "signature": "pub mod keymap;",
          "documentation": ""
        },
        {
          "name": "onboarding",
          "line": 50,
          "signature": "pub mod onboarding;",
          "documentation": ""
        },
        {
          "name": "session",
          "line": 51,
          "signature": "pub mod session;",
          "documentation": ""
        },
        {
          "name": "settings",
          "line": 52,
          "signature": "pub mod settings;",
          "documentation": ""
        },
        {
          "name": "types",
          "line": 53,
          "signature": "pub mod types;",
          "documentation": ""
        },
        {
          "name": "workspace",
          "line": 54,
          "signature": "pub mod workspace;",
          "documentation": ""
        },
        {
          "name": "interjection",
          "line": 56,
          "signature": "pub mod interjection;",
          "documentation": ""
        },
        {
          "name": "validation",
          "line": 57,
          "signature": "pub mod validation;",
          "documentation": ""
        },
        {
          "name": "commands",
          "line": 59,
          "signature": "pub mod commands;",
          "documentation": ""
        },
        {
          "name": "modes",
          "line": 60,
          "signature": "pub mod modes;",
          "documentation": ""
        },
        {
          "name": "runtime",
          "line": 61,
          "signature": "pub mod runtime;",
          "documentation": ""
        },
        {
          "name": "screens",
          "line": 62,
          "signature": "pub mod screens;",
          "documentation": ""
        },
        {
          "name": "adapters",
          "line": 64,
          "signature": "pub mod adapters;",
          "documentation": ""
        },
        {
          "name": "plugins",
          "line": 67,
          "signature": "#[cfg(feature = \"plugins\")]\npub mod plugins;",
          "documentation": ""
        },
        {
          "name": "pub use error::{AdapterError, ParseError, PluginError, SdkError};",
          "line": 72,
          "signature": "pub use error::{AdapterError, ParseError, PluginError, SdkError};",
          "documentation": ""
        },
        {
          "name": "pub use session::{\n    JsonlSessionStore, SessionMetadata, SessionRecord, SessionRecordKind, SessionStore,\n    SessionStoreError,\n};",
          "line": 75,
          "signature": "pub use session::{\n    JsonlSessionStore, SessionMetadata, SessionRecord, SessionRecordKind, SessionStore,\n    SessionStoreError,\n};",
          "documentation": ""
        },
        {
          "name": "pub use keymap::{\n    parse_key_spec, parse_key_spec_chord, Action, ContextualKeymap, KeyBinding, KeySpecError,\n    Keymap, KeymapContext, KeymapError,\n};",
          "line": 81,
          "signature": "pub use keymap::{\n    parse_key_spec, parse_key_spec_chord, Action, ContextualKeymap, KeyBinding, KeySpecError,\n    Keymap, KeymapContext, KeymapError,\n};",
          "documentation": ""
        },
        {
          "name": "pub use backtrack::{list_backtrack_targets, rewind_to, BacktrackTarget};",
          "line": 87,
          "signature": "pub use backtrack::{list_backtrack_targets, rewind_to, BacktrackTarget};",
          "documentation": ""
        },
        {
          "name": "pub use composer::{HistorySearch, MessageQueue, MessageQueueError, MESSAGE_QUEUE_CAPACITY};",
          "line": 90,
          "signature": "pub use composer::{HistorySearch, MessageQueue, MessageQueueError, MESSAGE_QUEUE_CAPACITY};",
          "documentation": ""
        },
        {
          "name": "pub use settings::{\n    FlocksCli, ModeInfo, ModelInfo, ProviderInfo, ProviderKind, ProviderSettingField,\n    ProviderSettingKind, ProviderSettingOption, SettingsAction, SettingsApplyResult,\n    SettingsSnapshot,\n};",
          "line": 93,
          "signature": "pub use settings::{\n    FlocksCli, ModeInfo, ModelInfo, ProviderInfo, ProviderKind, ProviderSettingField,\n    ProviderSettingKind, ProviderSettingOption, SettingsAction, SettingsApplyResult,\n    SettingsSnapshot,\n};",
          "documentation": ""
        },
        {
          "name": "pub use clipboard::{Clipboard, ClipboardError, MemoryClipboard, SystemClipboard};",
          "line": 100,
          "signature": "pub use clipboard::{Clipboard, ClipboardError, MemoryClipboard, SystemClipboard};",
          "documentation": ""
        },
        {
          "name": "pub use external_editor::{\n    open_in_editor, open_with_command, resolve_editor_command, ExternalEditorError,\n};",
          "line": 101,
          "signature": "pub use external_editor::{\n    open_in_editor, open_with_command, resolve_editor_command, ExternalEditorError,\n};",
          "documentation": ""
        },
        {
          "name": "pub use onboarding::{OnboardingError, OnboardingFlow, OnboardingSelection, OnboardingStep};",
          "line": 106,
          "signature": "pub use onboarding::{OnboardingError, OnboardingFlow, OnboardingSelection, OnboardingStep};",
          "documentation": ""
        },
        {
          "name": "pub use workspace::complete_workspace_paths;",
          "line": 109,
          "signature": "pub use workspace::complete_workspace_paths;",
          "documentation": ""
        },
        {
          "name": "pub use harness::{\n    attribute, attribute_entry, AttributionDecision, AttributionVerdict, ChangeManifest,\n    EvidenceCorpus, EvidenceCorpusError, HarnessComponentEdit, HarnessComponentEditKind,\n    HarnessComponentKind, HarnessLoopError, HarnessLoopPhase, HarnessWorkspace,\n    HarnessWorkspaceError, IterationRecord, ManifestEntry, OverviewReport, PredictedImpact,\n    StandardHarnessLoop, TaskAnalysis, TaskDelta, TaskOutcome, TaskOutcomeMap,\n    HARNESS_COMPONENT_KINDS,\n};",
          "line": 112,
          "signature": "pub use harness::{\n    attribute, attribute_entry, AttributionDecision, AttributionVerdict, ChangeManifest,\n    EvidenceCorpus, EvidenceCorpusError, HarnessComponentEdit, HarnessComponentEditKind,\n    HarnessComponentKind, HarnessLoopError, HarnessLoopPhase, HarnessWorkspace,\n    HarnessWorkspaceError, IterationRecord, ManifestEntry, OverviewReport, PredictedImpact,\n    StandardHarnessLoop, TaskAnalysis, TaskDelta, TaskOutcome, TaskOutcomeMap,\n    HARNESS_COMPONENT_KINDS,\n};",
          "documentation": ""
        },
        {
          "name": "pub use types::{\n    ActivityLevel, AdapterCapabilities, AutonomyEvent, HumanInterjection, InterjectionAck,\n    InterjectionKind, InterjectionPriority, Mode, ResponseChunk, SdkAgentInfo, SdkAgentStatus,\n    SdkApprovalAction, SdkApprovalRequest, SdkRiskLevel, SdkRole, SessionInfo,\n};",
          "line": 122,
          "signature": "pub use types::{\n    ActivityLevel, AdapterCapabilities, AutonomyEvent, HumanInterjection, InterjectionAck,\n    InterjectionKind, InterjectionPriority, Mode, ResponseChunk, SdkAgentInfo, SdkAgentStatus,\n    SdkApprovalAction, SdkApprovalRequest, SdkRiskLevel, SdkRole, SessionInfo,\n};",
          "documentation": ""
        },
        {
          "name": "pub use types::{\n    DEFAULT_MAX_MESSAGES, DEFAULT_STREAM_TIMEOUT, MAX_AGENT_ID_LEN, MAX_AGENT_NAME_LEN,\n    MAX_CHUNK_SIZE, MAX_INTERJECTION_LEN, MAX_TOOL_INPUT_SIZE,\n};",
          "line": 129,
          "signature": "pub use types::{\n    DEFAULT_MAX_MESSAGES, DEFAULT_STREAM_TIMEOUT, MAX_AGENT_ID_LEN, MAX_AGENT_NAME_LEN,\n    MAX_CHUNK_SIZE, MAX_INTERJECTION_LEN, MAX_TOOL_INPUT_SIZE,\n};",
          "documentation": ""
        },
        {
          "name": "pub use adapter::AgentAdapter;",
          "line": 135,
          "signature": "pub use adapter::AgentAdapter;",
          "documentation": ""
        },
        {
          "name": "pub use runtime::app::{AgentApp, AgentAppBuilder};",
          "line": 138,
          "signature": "pub use runtime::app::{AgentApp, AgentAppBuilder};",
          "documentation": ""
        },
        {
          "name": "pub use runtime::terminal_control::{\n    clear_title, hyperlink, ring_bell, set_title, write_hyperlink, MAX_HYPERLINK_URL_LEN,\n    MAX_TITLE_LEN,\n};",
          "line": 141,
          "signature": "pub use runtime::terminal_control::{\n    clear_title, hyperlink, ring_bell, set_title, write_hyperlink, MAX_HYPERLINK_URL_LEN,\n    MAX_TITLE_LEN,\n};",
          "documentation": ""
        },
        {
          "name": "pub use runtime::notifications::{\n    KindMask, NotificationKind, Notifier, NotifierConfig, MAX_NOTIFICATION_LEN,\n};",
          "line": 147,
          "signature": "pub use runtime::notifications::{\n    KindMask, NotificationKind, Notifier, NotifierConfig, MAX_NOTIFICATION_LEN,\n};",
          "documentation": ""
        },
        {
          "name": "pub use screens::custom::{CustomScreen, ScreenEvent, ScreenResult};",
          "line": 152,
          "signature": "pub use screens::custom::{CustomScreen, ScreenEvent, ScreenResult};",
          "documentation": ""
        },
        {
          "name": "pub use adapters::stdio::StdioAdapter;",
          "line": 155,
          "signature": "pub use adapters::stdio::StdioAdapter;",
          "documentation": ""
        },
        {
          "name": "pub use adapters::http::HttpAdapter;",
          "line": 158,
          "signature": "#[cfg(feature = \"http\")]\npub use adapters::http::HttpAdapter;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/modes/autonomy.rs",
      "sha256": "193b1d530f0d5453def7f59b9999ca1a6464a4df771e6a124457bbe0aa86f245",
      "artifactSha256": "e937a2086b92877813119509fe116566933e9b896c7b40d1aa034372ede77ef4",
      "url": "/reference/source/harness-sdk/src/modes/autonomy.rs.txt",
      "declarations": [
        {
          "name": "::start_autonomy_session",
          "line": 23,
          "signature": "pub async fn start_autonomy_session(\n    state: &mut AppState,\n    adapter: &Arc<dyn AgentAdapter>,\n    instructions: &str,\n) -> Result<futures::stream::BoxStream<'static, AutonomyEvent>, SdkError>;",
          "documentation": "Start an autonomous execution session.\n\nTransitions the mode to Autonomy and starts the adapter's autonomy stream.\n\n# Errors\n\nReturns `SdkError` if the adapter doesn't support autonomy or fails to start."
        },
        {
          "name": "::stop_autonomy_session",
          "line": 57,
          "signature": "pub async fn stop_autonomy_session(\n    state: &mut AppState,\n    adapter: &Arc<dyn AgentAdapter>,\n) -> Result<(), SdkError>;",
          "documentation": "Stop the current autonomy session.\n\nTransitions through Stopping \u2192 Chat and tells the adapter to stop.\n\n# Errors\n\nReturns `SdkError` if the adapter fails to stop."
        },
        {
          "name": "::handle_autonomy_event",
          "line": 103,
          "signature": "pub fn handle_autonomy_event(state: &mut AppState, event: AutonomyEvent) -> Result<(), SdkError>;",
          "documentation": "Handle an autonomy event from the adapter.\n\nRoutes the event to the appropriate state update.\n\n# Errors\n\nReturns `SdkError` if a mode transition fails during event processing."
        },
        {
          "name": "::submit_approval",
          "line": 204,
          "signature": "pub async fn submit_approval(\n    state: &mut AppState,\n    adapter: &Arc<dyn AgentAdapter>,\n    request_id: &str,\n    action: SdkApprovalAction,\n) -> Result<(), SdkError>;",
          "documentation": "Submit an approval decision to the adapter.\n\n# Errors\n\nReturns `SdkError` if the adapter fails to process the approval."
        }
      ]
    },
    {
      "path": "harness-sdk/src/modes/chat.rs",
      "sha256": "1d83058f25f582fa2634a7c01d48259b2ecb710de7b9900b701b3bfc356c99e1",
      "artifactSha256": "1bc5b91111e20bec01789f2866966227cf09ab899ac847beaffe0d0eb32ffbb4",
      "url": "/reference/source/harness-sdk/src/modes/chat.rs.txt",
      "declarations": [
        {
          "name": "::send_chat_message",
          "line": 25,
          "signature": "pub async fn send_chat_message(\n    state: &mut AppState,\n    adapter: &Arc<dyn AgentAdapter>,\n    message: String,\n) -> Result<futures::stream::BoxStream<'static, ResponseChunk>, SdkError>;",
          "documentation": "Send a chat message to the active agent.\n\nCreates a user message in the timeline, then initiates a response stream.\nThe actual streaming is handled by the event loop which polls the stream.\n\n# Errors\n\nReturns `SdkError` if no agent is active or the adapter fails."
        },
        {
          "name": "::handle_response_chunk",
          "line": 61,
          "signature": "pub fn handle_response_chunk(state: &mut AppState, chunk: ResponseChunk) -> Result<(), SdkError>;",
          "documentation": "Handle a response chunk from the adapter's stream.\n\nValidates the chunk, sanitizes text, and updates state accordingly.\n\n# Errors\n\nReturns `SdkError::InvalidAdapterOutput` if validation fails.\nInvalid chunks are logged and skipped (non-fatal)."
        }
      ]
    },
    {
      "path": "harness-sdk/src/modes/mod.rs",
      "sha256": "ef379051191a7644781aa2034865bf49a8195d74011cd8d93d6d4a7310c725f6",
      "artifactSha256": "73bc604e096c9e5e9af5a124d5d0262218264e285489071818312db712ffdcbd",
      "url": "/reference/source/harness-sdk/src/modes/mod.rs.txt",
      "declarations": [
        {
          "name": "autonomy",
          "line": 3,
          "signature": "pub mod autonomy;",
          "documentation": "Mode-specific logic for Chat and Autonomy modes."
        },
        {
          "name": "chat",
          "line": 4,
          "signature": "pub mod chat;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/onboarding.rs",
      "sha256": "f23c7ae259293d61356a93af2bb2d946dee9e2edd387a781d0fbf3f3c0117b61",
      "artifactSha256": "06238ca608def31dee8a32ef7ad9c1b8fa115260975f54fb3b8be9e4e8fd69a1",
      "url": "/reference/source/harness-sdk/src/onboarding.rs.txt",
      "declarations": [
        {
          "name": "::OnboardingStep",
          "line": 16,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum OnboardingStep {\n    /// Initial welcome screen (one-time intro copy + ToS confirm).\n    Welcome,\n    /// Theme picker.\n    ChooseTheme,\n    /// Model picker.\n    ChooseModel,\n    /// Workspace root confirmation (the cwd Codex / clausen will\n    /// operate inside).\n    ConfirmWorkspace,\n    /// Onboarding finished.\n    Done,\n}",
          "documentation": "Discriminator for the onboarding step the flow is currently on."
        },
        {
          "name": "::OnboardingError",
          "line": 32,
          "signature": "#[derive(Debug, Error, PartialEq, Eq)]\npub enum OnboardingError {\n    /// `advance` / `back` was called from a state that does not allow\n    /// the requested transition (already at start / end).\n    #[error(\"invalid transition from {from:?} via {action}\")]\n    InvalidTransition {\n        /// State the flow was in.\n        from: OnboardingStep,\n        /// Attempted action (\"advance\", \"back\", \"skip\", \u2026).\n        action: &'static str,\n    },\n    /// A required selection was missing when `advance` was called.\n    #[error(\"step {step:?} requires a selection before advancing\")]\n    SelectionRequired {\n        /// Step that needs a selection.\n        step: OnboardingStep,\n    },\n}",
          "documentation": "Errors emitted by the onboarding flow."
        },
        {
          "name": "::OnboardingSelection",
          "line": 55,
          "signature": "#[derive(Debug, Clone, Default, Serialize, Deserialize)]\npub struct OnboardingSelection {\n/// Selected theme id (e.g. `\"monochrome\"`). `None` until the\n\n/// user activates a row in the theme picker.\n\npub theme_id: Option<String>,\n/// Selected model id (e.g. `\"claude-opus-4-7\"`). `None` until\n\n/// the user activates a row in the model picker.\n\npub model_id: Option<String>,\n/// Confirmed workspace root display string. `None` until\n\n/// confirmed.\n\npub workspace_root: Option<String>,\n/// Whether the user accepted the ToS / first-launch notice.\n\npub welcome_accepted: bool\n}",
          "documentation": "User selections accumulated during the flow. Populated by the\nSDK / app whenever the user activates a row in one of the\npickers; `OnboardingFlow::advance` reads + validates these\nbefore transitioning."
        },
        {
          "name": "::OnboardingFlow",
          "line": 84,
          "signature": "#[derive(Debug, Clone)]\npub struct OnboardingFlow {\n\n}",
          "documentation": "First-launch onboarding state machine.\n\nThe transition rules are:\n\n```text\nWelcome --advance--> ChooseTheme   (requires welcome_accepted)\nChooseTheme --advance--> ChooseModel   (requires theme_id)\nChooseModel --advance--> ConfirmWorkspace   (requires model_id)\nConfirmWorkspace --advance--> Done   (requires workspace_root)\nDone --advance--> InvalidTransition\n\n<step> --back--> previous step (Welcome cannot back).\n<step> --skip--> next step      (no validation; sets a sane default).\n```"
        },
        {
          "name": "::OnboardingFlow::new",
          "line": 92,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Construct a flow at the welcome step with no selections yet."
        },
        {
          "name": "::OnboardingFlow::from_selection",
          "line": 103,
          "signature": "#[must_use]\npub fn from_selection(selection: OnboardingSelection) -> Self;",
          "documentation": "Construct a flow that resumes from a saved selection (e.g.\nfor unit tests or for a `/onboard` command that re-enters the\nflow with a known partial state)."
        },
        {
          "name": "::OnboardingFlow::step",
          "line": 112,
          "signature": "#[must_use]\npub fn step(&self) -> OnboardingStep;",
          "documentation": "Current step."
        },
        {
          "name": "::OnboardingFlow::selection",
          "line": 118,
          "signature": "#[must_use]\npub fn selection(&self) -> &OnboardingSelection;",
          "documentation": "Read-only access to the accumulated selection."
        },
        {
          "name": "::OnboardingFlow::accept_welcome",
          "line": 123,
          "signature": "pub fn accept_welcome(&mut self);",
          "documentation": "Mark the welcome screen as accepted."
        },
        {
          "name": "::OnboardingFlow::set_theme",
          "line": 128,
          "signature": "pub fn set_theme(&mut self, theme_id: impl Into<String>);",
          "documentation": "Record the user's theme choice."
        },
        {
          "name": "::OnboardingFlow::set_model",
          "line": 133,
          "signature": "pub fn set_model(&mut self, model_id: impl Into<String>);",
          "documentation": "Record the user's model choice."
        },
        {
          "name": "::OnboardingFlow::set_workspace",
          "line": 138,
          "signature": "pub fn set_workspace(&mut self, workspace_root: impl Into<String>);",
          "documentation": "Record the workspace root."
        },
        {
          "name": "::OnboardingFlow::advance",
          "line": 144,
          "signature": "pub fn advance(&mut self) -> Result<OnboardingStep, OnboardingError>;",
          "documentation": "Advance to the next step. Validates the current step's\nrequired selection first."
        },
        {
          "name": "::OnboardingFlow::back",
          "line": 182,
          "signature": "pub fn back(&mut self) -> Result<OnboardingStep, OnboardingError>;",
          "documentation": "Step backwards. Welcome cannot back."
        },
        {
          "name": "::OnboardingFlow::skip",
          "line": 201,
          "signature": "pub fn skip(&mut self) -> Result<OnboardingStep, OnboardingError>;",
          "documentation": "Skip the current step using a default value. Useful when the\nSDK consumer wants to allow `Esc` to skip optional steps."
        },
        {
          "name": "::OnboardingFlow::is_done",
          "line": 231,
          "signature": "#[must_use]\npub fn is_done(&self) -> bool;",
          "documentation": "True once the flow has reached `Done`."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/capability.rs",
      "sha256": "7ae6157a995095b2f862ecded2195e6330f4ae6aa947bea91b18ca1823c61656",
      "artifactSha256": "3ef2dbad9ae66ec7eef7bd0fdaf1695a1f04392ad98b59092b3741d00d676c45",
      "url": "/reference/source/harness-sdk/src/plugins/capability.rs.txt",
      "declarations": [
        {
          "name": "::Capability",
          "line": 19,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]\npub struct Capability {\n/// The kind of capability.\n\npub kind: CapabilityKind,\n/// The specific resource (URL, path, command).\n\npub resource: String\n}",
          "documentation": "A specific capability a plugin can request.\n\n# Examples\n\n```\nuse harness_sdk::plugins::capability::{Capability, CapabilityKind};\n\nlet cap = Capability::new(CapabilityKind::Network, \"api.example.com\");\nassert_eq!(cap.kind, CapabilityKind::Network);\n```"
        },
        {
          "name": "::Capability::new",
          "line": 29,
          "signature": "#[must_use]\npub fn new(kind: CapabilityKind, resource: impl Into<String>) -> Self;",
          "documentation": "Create a new capability."
        },
        {
          "name": "::CapabilityKind",
          "line": 48,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum CapabilityKind {\n    /// Network access (HTTP, DNS, WebSocket).\n    Network,\n    /// Filesystem read access.\n    FileRead,\n    /// Filesystem write access.\n    FileWrite,\n    /// Shell command execution.\n    Shell,\n    /// Plugin state storage (scoped to the plugin).\n    Storage,\n}",
          "documentation": "The kind of capability a plugin can request.\n\n# Examples\n\n```\nuse harness_sdk::plugins::capability::CapabilityKind;\n\nassert_eq!(CapabilityKind::Network.label(), \"network\");\n```"
        },
        {
          "name": "::CapabilityKind::label",
          "line": 64,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::CapabilityKind::risk_level",
          "line": 76,
          "signature": "#[must_use]\npub const fn risk_level(&self) -> u8;",
          "documentation": "Risk level for this capability kind."
        },
        {
          "name": "::CapabilityGrants",
          "line": 105,
          "signature": "#[derive(Debug, Clone, Default, Serialize, Deserialize)]\npub struct CapabilityGrants {\n\n}",
          "documentation": "The set of capabilities granted to a plugin.\n\n# Examples\n\n```\nuse harness_sdk::plugins::capability::{CapabilityGrants, CapabilityKind, ApprovalMode};\n\nlet mut grants = CapabilityGrants::new();\ngrants.add(CapabilityKind::Network, ApprovalMode::Prompt);\nassert!(grants.has(CapabilityKind::Network));\n```"
        },
        {
          "name": "::CapabilityGrants::new",
          "line": 113,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Create an empty set of grants."
        },
        {
          "name": "::CapabilityGrants::add",
          "line": 118,
          "signature": "pub fn add(&mut self, kind: CapabilityKind, mode: ApprovalMode);",
          "documentation": "Add a capability grant."
        },
        {
          "name": "::CapabilityGrants::has",
          "line": 124,
          "signature": "#[must_use]\npub fn has(&self, kind: CapabilityKind) -> bool;",
          "documentation": "Check if a capability kind is granted."
        },
        {
          "name": "::CapabilityGrants::mode",
          "line": 130,
          "signature": "#[must_use]\npub fn mode(&self, kind: CapabilityKind) -> Option<&ApprovalMode>;",
          "documentation": "Get the approval mode for a capability kind."
        },
        {
          "name": "::ApprovalMode",
          "line": 147,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum ApprovalMode {\n    /// Always allow without asking.\n    Allow,\n    /// Always deny without asking.\n    Deny,\n    /// Ask the user each time.\n    Prompt,\n    /// Allow if the resource matches a pattern.\n    AllowPattern(String),\n}",
          "documentation": "How a capability request should be handled.\n\n# Examples\n\n```\nuse harness_sdk::plugins::capability::ApprovalMode;\n\nlet mode = ApprovalMode::Prompt;\nassert!(mode.requires_user_input());\n```"
        },
        {
          "name": "::ApprovalMode::requires_user_input",
          "line": 161,
          "signature": "#[must_use]\npub fn requires_user_input(&self) -> bool;",
          "documentation": "Returns `true` if this mode requires user input."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/config.rs",
      "sha256": "dd1b2af2ac0a0df9ac1f1b2fda80feedc85755a417ac63afc8b854341f8d3bd6",
      "artifactSha256": "9df9c8ab146ec1ab88031ee2856dec04b6ab29beb58336f76fae80ae2258357a",
      "url": "/reference/source/harness-sdk/src/plugins/config.rs.txt",
      "declarations": [
        {
          "name": "::PluginConfig",
          "line": 19,
          "signature": "#[derive(Debug, Clone, Default, Serialize, Deserialize)]\npub struct PluginConfig {\n/// Directory containing plugin WASM files.\n\npub plugin_dir: Option<PathBuf>,\n/// Path to `plugins.toml` for persisted permission rules.\n\npub config_path: Option<PathBuf>,\n/// Per-plugin configuration overrides.\n\npub plugins: HashMap<String, PluginEntry>\n}",
          "documentation": "Plugin system configuration.\n\n# Examples\n\n```\nuse harness_sdk::plugins::config::PluginConfig;\n\nlet config = PluginConfig::default();\nassert!(config.plugin_dir.is_none());\n```"
        },
        {
          "name": "::PluginEntry",
          "line": 30,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct PluginEntry {\n/// Whether the plugin is enabled.\n\npub enabled: bool,\n/// Path to the WASM file (overrides manifest).\n\npub path: Option<String>,\n/// Permission rules for this plugin.\n\n#[serde(default)]\npub permissions: Vec<PermissionRuleConfig>\n}",
          "documentation": "Configuration for a single plugin."
        },
        {
          "name": "::PermissionRuleConfig",
          "line": 42,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct PermissionRuleConfig {\n/// Capability kind as string.\n\npub capability: String,\n/// Glob pattern.\n\npub pattern: String,\n/// \"allow\", \"deny\", or \"prompt\".\n\npub mode: String\n}",
          "documentation": "A serializable permission rule for `plugins.toml`."
        },
        {
          "name": "::PluginConfig::load_or_default",
          "line": 56,
          "signature": "#[must_use]\npub fn load_or_default(path: Option<&PathBuf>) -> Self;",
          "documentation": "Load configuration from the default path.\n\nReturns default config if the file doesn't exist."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/draw_command.rs",
      "sha256": "2c7bbe8f834a0320db5f08f3a7b7f73a928e13f741305bbcc999d5d7fb2cd05b",
      "artifactSha256": "2c61618e3fd0ad949e920b58477a956693d72a702a42a03021b333c7c018fed0",
      "url": "/reference/source/harness-sdk/src/plugins/draw_command.rs.txt",
      "declarations": [
        {
          "name": "::DrawCommand",
          "line": 14,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(tag = \"type\", rename_all = \"snake_case\")]\npub enum DrawCommand {\n    /// Draw text at a position.\n    Text {\n        /// X coordinate (column).\n        x: u16,\n        /// Y coordinate (row).\n        y: u16,\n        /// Text content.\n        text: String,\n        /// Foreground color as RGB hex (e.g., \"#ff0000\").\n        fg: Option<String>,\n        /// Background color as RGB hex.\n        bg: Option<String>,\n        /// Whether to render as bold.\n        bold: bool,\n    },\n\n    /// Fill a rectangle with a character.\n    Fill {\n        /// X coordinate.\n        x: u16,\n        /// Y coordinate.\n        y: u16,\n        /// Width.\n        width: u16,\n        /// Height.\n        height: u16,\n        /// Fill character.\n        char: char,\n        /// Foreground color.\n        fg: Option<String>,\n        /// Background color.\n        bg: Option<String>,\n    },\n\n    /// Draw a horizontal line.\n    HLine {\n        /// X coordinate.\n        x: u16,\n        /// Y coordinate.\n        y: u16,\n        /// Length.\n        length: u16,\n        /// Character to use.\n        char: char,\n    },\n\n    /// Draw a vertical line.\n    VLine {\n        /// X coordinate.\n        x: u16,\n        /// Y coordinate.\n        y: u16,\n        /// Length.\n        length: u16,\n        /// Character to use.\n        char: char,\n    },\n\n    /// Clear a rectangular area.\n    Clear {\n        /// X coordinate.\n        x: u16,\n        /// Y coordinate.\n        y: u16,\n        /// Width.\n        width: u16,\n        /// Height.\n        height: u16,\n    },\n}",
          "documentation": "A drawing command from a plugin to the host.\n\nPlugins use these commands to render UI elements without direct\nterminal access."
        },
        {
          "name": "::parse_hex_color",
          "line": 98,
          "signature": "#[must_use]\npub fn parse_hex_color(hex: &str) -> Option<(u8, u8, u8)>;",
          "documentation": "Parse a hex color string to an RGB tuple.\n\n# Examples\n\n```\nuse harness_sdk::plugins::draw_command::parse_hex_color;\n\nassert_eq!(parse_hex_color(\"#ff0000\"), Some((255, 0, 0)));\nassert_eq!(parse_hex_color(\"#00ff00\"), Some((0, 255, 0)));\nassert_eq!(parse_hex_color(\"invalid\"), None);\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/host_functions.rs",
      "sha256": "1ad5ca6964c607f86dbe940204e26606693d0a61a080c932fde248f5e1a0992f",
      "artifactSha256": "bf5bc573c8b175f5aa0c69436c25399206df5af436a6f5b62efc532c2aac7350",
      "url": "/reference/source/harness-sdk/src/plugins/host_functions.rs.txt",
      "declarations": [
        {
          "name": "::check_capability",
          "line": 16,
          "signature": "pub fn check_capability(\n    permissions: &PermissionManager,\n    plugin: &str,\n    capability: &Capability,\n) -> Result<CapabilityCheckResult, PluginError>;",
          "documentation": "Check if a capability is allowed for a plugin.\n\nReturns `Ok(())` if allowed, `Err(PluginError::CapabilityDenied)` if denied,\nor needs to prompt the user (not handled here \u2014 caller must suspend)."
        },
        {
          "name": "::CapabilityCheckResult",
          "line": 35,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq)]\npub enum CapabilityCheckResult {\n    /// The capability is allowed.\n    Allowed,\n    /// The user needs to be prompted.\n    NeedsPrompt,\n}",
          "documentation": "Result of a capability check."
        },
        {
          "name": "::validate_file_path",
          "line": 49,
          "signature": "pub fn validate_file_path(plugin: &str, path: &str) -> Result<String, PluginError>;",
          "documentation": "Validate and canonicalize a file path for filesystem capability checks.\n\nPrevents path traversal attacks (e.g., `../../../etc/passwd`).\n\n# Errors\n\nReturns `PluginError::CapabilityDenied` if the path is invalid."
        },
        {
          "name": "::scoped_storage_key",
          "line": 76,
          "signature": "#[must_use]\npub fn scoped_storage_key(plugin: &str, key: &str) -> String;",
          "documentation": "Scope a storage key by plugin name to prevent cross-plugin access.\n\n# Examples\n\n```\nuse harness_sdk::plugins::host_functions::scoped_storage_key;\n\nassert_eq!(scoped_storage_key(\"my-plugin\", \"setting\"), \"my-plugin::setting\");\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/manifest.rs",
      "sha256": "6aa38746d00447e89e66d4df4dd7b073651368f24d51e28a4fb799d0f512c5be",
      "artifactSha256": "98a1176ca4c7eafdea2e194f4e3a480bcd1b9d35ec06844d7492b66e25152fc2",
      "url": "/reference/source/harness-sdk/src/plugins/manifest.rs.txt",
      "declarations": [
        {
          "name": "::PluginManifest",
          "line": 32,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct PluginManifest {\n/// Plugin name (unique identifier).\n\npub name: String,\n/// Semantic version string.\n\npub version: String,\n/// Short description.\n\npub description: String,\n/// Author name or organization.\n\npub author: String,\n/// Path to the WASM module file.\n\npub wasm_path: String,\n/// Expected SHA-256 hash of the WASM module (hex-encoded).\n\npub wasm_sha256: Option<String>,\n/// Capabilities the plugin requires.\n\npub capabilities: Vec<CapabilityKind>,\n/// Slash commands the plugin registers.\n\npub commands: Vec<PluginCommand>,\n/// Agent tools the plugin provides.\n\npub tools: Vec<PluginTool>\n}",
          "documentation": "A plugin manifest describing the plugin's identity and requirements.\n\n# Examples\n\n```\nuse harness_sdk::plugins::manifest::PluginManifest;\n\nlet manifest = PluginManifest {\n    name: \"my-plugin\".into(),\n    version: \"1.0.0\".into(),\n    description: \"A test plugin\".into(),\n    author: \"Test Author\".into(),\n    wasm_path: \"plugin.wasm\".into(),\n    wasm_sha256: None,\n    capabilities: vec![],\n    commands: vec![],\n    tools: vec![],\n};\nassert_eq!(manifest.name, \"my-plugin\");\n```"
        },
        {
          "name": "::PluginCommand",
          "line": 55,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct PluginCommand {\n/// Command name (without `/` prefix).\n\npub name: String,\n/// Short description.\n\npub description: String\n}",
          "documentation": "A slash command registered by a plugin."
        },
        {
          "name": "::PluginTool",
          "line": 64,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct PluginTool {\n/// Tool name.\n\npub name: String,\n/// Tool description.\n\npub description: String,\n/// JSON schema for tool input (as a string).\n\npub input_schema: String\n}",
          "documentation": "An agent tool provided by a plugin."
        },
        {
          "name": "::PluginManifest::from_path",
          "line": 82,
          "signature": "pub fn from_path(path: &str) -> Result<Self, PluginError>;",
          "documentation": "Load a manifest from a file path.\n\nLooks for `plugin.toml` or `manifest.toml` in the given directory,\nor treats the path as a direct manifest file.\n\n# Errors\n\nReturns `PluginError::Config` if the manifest cannot be read or parsed."
        },
        {
          "name": "::PluginManifest::validate",
          "line": 113,
          "signature": "pub fn validate(&self) -> Result<(), PluginError>;",
          "documentation": "Validate the manifest fields.\n\n# Errors\n\nReturns `PluginError::Config` if any required field is invalid."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/mod.rs",
      "sha256": "0fb74d277aaa44abe157fd6c99b0f615aa8e431d7e6f30cbe5ebb275acd0582d",
      "artifactSha256": "b9e92b26d0692c76666cae23d9d43a042d843640afced25cdb71a0ad6018e2cf",
      "url": "/reference/source/harness-sdk/src/plugins/mod.rs.txt",
      "declarations": [
        {
          "name": "capability",
          "line": 33,
          "signature": "pub mod capability;",
          "documentation": "WASM plugin system (feature-gated: `plugins`).\n\nPlugins are sandboxed WASM modules loaded at runtime via wasmtime.\nThey can register slash commands, agent tools, custom screens,\nstatus widgets, and keybindings.\n\nA plugin cannot access the filesystem, network, or host memory\nunless the TUI app or user explicitly grants those capabilities.\n\n# Architecture\n\nEach plugin runs in its own wasmtime [`Store`](wasmtime::Store) with:\n- Isolated linear memory (default 64 MB limit)\n- Scoped state storage (Plugin A cannot read Plugin B's data)\n- Capability-checked host functions (network, filesystem, shell)\n\nThe [`PluginManager`] owns all loaded plugins and provides the API for\nloading, unloading, and invoking plugin functionality.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::plugins::PluginManager;\n\n# async fn example() -> Result<(), harness_sdk::PluginError> {\nlet manager = PluginManager::new();\nmanager.load_plugin(\"/path/to/plugin\").await?;\nlet output = manager.call_command(\"my-plugin\", \"greet\", \"{}\").await?;\n# Ok(())\n# }\n```"
        },
        {
          "name": "config",
          "line": 34,
          "signature": "pub mod config;",
          "documentation": ""
        },
        {
          "name": "draw_command",
          "line": 35,
          "signature": "pub mod draw_command;",
          "documentation": ""
        },
        {
          "name": "host_functions",
          "line": 36,
          "signature": "pub mod host_functions;",
          "documentation": ""
        },
        {
          "name": "manifest",
          "line": 37,
          "signature": "pub mod manifest;",
          "documentation": ""
        },
        {
          "name": "permission",
          "line": 38,
          "signature": "pub mod permission;",
          "documentation": ""
        },
        {
          "name": "registry",
          "line": 39,
          "signature": "pub mod registry;",
          "documentation": ""
        },
        {
          "name": "wasm",
          "line": 40,
          "signature": "pub mod wasm;",
          "documentation": ""
        },
        {
          "name": "::PluginManager",
          "line": 68,
          "signature": "pub struct PluginManager {\n\n}",
          "documentation": "Manages the lifecycle of all loaded plugins.\n\nThe `PluginManager` owns the wasmtime [`Engine`] (shared across all plugins)\nand a map of loaded plugin instances. It handles the full lifecycle:\nmanifest loading, hash verification, WASM compilation, instantiation,\ninitialization, and execution.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::plugins::PluginManager;\n\nlet manager = PluginManager::new();\n```"
        },
        {
          "name": "::PluginManager::new",
          "line": 98,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Create a new plugin manager with default configuration.\n\nCreates a wasmtime engine internally. If engine creation fails (very\nunusual), the manager is created without an engine and all `load_plugin`\ncalls will return an error."
        },
        {
          "name": "::PluginManager::with_config",
          "line": 109,
          "signature": "#[must_use]\npub fn with_config(config: PluginConfig) -> Self;",
          "documentation": "Create a new plugin manager with the given configuration."
        },
        {
          "name": "::PluginManager::load_plugin",
          "line": 132,
          "signature": "pub async fn load_plugin(&self, path: &str) -> Result<(), PluginError>;",
          "documentation": "Load a plugin from a file path.\n\nPerforms the full loading pipeline:\n1. Parse the plugin manifest (from `plugin.toml` or `manifest.toml`)\n2. Verify the WASM SHA-256 hash if provided\n3. Compile the WASM module\n4. Validate required exports\n5. Instantiate with host functions and memory limits\n6. Call `plugin_init()`\n\n# Errors\n\nReturns `PluginError` if any step fails (invalid manifest, hash mismatch,\ncompilation failure, missing exports, init trap, etc.)."
        },
        {
          "name": "::PluginManager::unload_plugin",
          "line": 196,
          "signature": "pub async fn unload_plugin(&self, name: &str) -> Result<(), PluginError>;",
          "documentation": "Unload a plugin by name.\n\nDrops the WASM instance and removes the plugin from the manager.\n\n# Errors\n\nReturns `PluginError::NotFound` if the plugin is not loaded."
        },
        {
          "name": "::PluginManager::list_plugins",
          "line": 205,
          "signature": "pub async fn list_plugins(&self) -> Vec<String>;",
          "documentation": "List all loaded plugin names."
        },
        {
          "name": "::PluginManager::is_enabled",
          "line": 210,
          "signature": "pub async fn is_enabled(&self, name: &str) -> bool;",
          "documentation": "Check if a plugin is loaded and enabled."
        },
        {
          "name": "::PluginManager::call_command",
          "line": 231,
          "signature": "pub async fn call_command(\n        &self,\n        plugin: &str,\n        command: &str,\n        args: &str,\n    ) -> Result<Option<String>, PluginError>;",
          "documentation": "Execute a plugin command.\n\nCalls the plugin's `plugin_handle_command` export with the given\ncommand name and JSON arguments.\n\nReturns `Ok(None)` if the plugin doesn't export a command handler.\n\n# Errors\n\nReturns `PluginError::NotFound` if the plugin is not loaded,\n`PluginError::Disabled` if the plugin is disabled, or\n`PluginError::PluginPanic` if the command handler traps."
        },
        {
          "name": "::PluginManager::call_tool",
          "line": 262,
          "signature": "pub async fn call_tool(\n        &self,\n        plugin: &str,\n        tool: &str,\n        input: &str,\n    ) -> Result<Option<String>, PluginError>;",
          "documentation": "Execute a plugin tool.\n\nCalls the plugin's `plugin_handle_tool` export with the given\ntool name and JSON input.\n\nReturns `Ok(None)` if the plugin doesn't export a tool handler.\n\n# Errors\n\nReturns `PluginError::NotFound` if the plugin is not loaded,\n`PluginError::Disabled` if the plugin is disabled, or\n`PluginError::PluginPanic` if the tool handler traps."
        },
        {
          "name": "::PluginManager::permissions",
          "line": 283,
          "signature": "#[must_use]\npub fn permissions(&self) -> &Arc<PermissionManager>;",
          "documentation": "Get the permission manager."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/permission.rs",
      "sha256": "dad01a6110d05a7c6478caadd26c019ae8d00dcac2b89c8160b616c53bce33df",
      "artifactSha256": "201116c08bd590a183d5acc0b9d11d5f563b6d2f84af78e79e6ab1c60134bd85",
      "url": "/reference/source/harness-sdk/src/plugins/permission.rs.txt",
      "declarations": [
        {
          "name": "::PermissionRule",
          "line": 18,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct PermissionRule {\n/// Plugin name this rule applies to.\n\npub plugin: String,\n/// Capability kind.\n\npub kind: CapabilityKind,\n/// Glob pattern matching the resource.\n\npub pattern: String,\n/// What to do when the pattern matches.\n\npub mode: ApprovalMode\n}",
          "documentation": "A stored permission rule.\n\nRules are persisted in `plugins.toml` and loaded at startup."
        },
        {
          "name": "::PendingPermission",
          "line": 31,
          "signature": "#[derive(Debug)]\npub struct PendingPermission {\n/// The plugin requesting the capability.\n\npub plugin: String,\n/// The requested capability.\n\npub capability: Capability,\n/// Channel to send the user's decision.\n\npub response_tx: tokio::sync::oneshot::Sender<PermissionDecision>\n}",
          "documentation": "A pending permission request awaiting user decision."
        },
        {
          "name": "::PermissionDecision",
          "line": 42,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq)]\npub enum PermissionDecision {\n    /// Allow this specific request once.\n    AllowOnce,\n    /// Always allow requests matching the given pattern.\n    AlwaysAllow(String),\n    /// Deny this request.\n    Deny,\n}",
          "documentation": "User's decision on a permission request."
        },
        {
          "name": "::PermissionManager",
          "line": 57,
          "signature": "pub struct PermissionManager {\n\n}",
          "documentation": "Manages permission rules and checks for plugin capabilities.\n\n# Thread Safety\n\nThe `PermissionManager` is thread-safe and can be shared across\nasync tasks via `Arc<PermissionManager>`."
        },
        {
          "name": "::PermissionManager::new",
          "line": 65,
          "signature": "#[must_use]\npub fn new() -> Self;",
          "documentation": "Create a new permission manager with no rules."
        },
        {
          "name": "::PermissionManager::add_rule",
          "line": 72,
          "signature": "pub fn add_rule(&self, rule: PermissionRule);",
          "documentation": "Add a permission rule."
        },
        {
          "name": "::PermissionManager::check",
          "line": 83,
          "signature": "#[must_use]\npub fn check(&self, plugin: &str, capability: &Capability) -> Option<ApprovalMode>;",
          "documentation": "Check if a capability is allowed for a plugin.\n\nReturns the matching approval mode, or `None` if no rule matches\n(meaning the user should be prompted)."
        },
        {
          "name": "::PermissionManager::revoke_all",
          "line": 100,
          "signature": "pub fn revoke_all(&self, plugin: &str);",
          "documentation": "Remove all rules for a plugin."
        },
        {
          "name": "::PermissionManager::rules_for",
          "line": 108,
          "signature": "#[must_use]\npub fn rules_for(&self, plugin: &str) -> Vec<PermissionRule>;",
          "documentation": "Get all rules for a plugin."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/registry.rs",
      "sha256": "aa683d1e6c971d8151dd335f437b7966c9554a6869222a1f658ae6c9f479e0c5",
      "artifactSha256": "f869342c42c7c49acf48763ee2a4fe2c73d8acf98fe64b34cd289972ac3850c3",
      "url": "/reference/source/harness-sdk/src/plugins/registry.rs.txt",
      "declarations": [
        {
          "name": "::PluginSource",
          "line": 19,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(tag = \"type\", rename_all = \"snake_case\")]\npub enum PluginSource {\n    /// A local filesystem path.\n    Local {\n        /// Path to the plugin directory or WASM file.\n        path: String,\n    },\n    /// A Git repository.\n    Git {\n        /// Git repository URL.\n        url: String,\n        /// Branch or tag (default: main).\n        #[serde(default = \"default_git_ref\")]\n        git_ref: String,\n        /// Path within the repository.\n        path: Option<String>,\n    },\n    /// A plugin index/registry.\n    Index {\n        /// Registry URL.\n        url: String,\n        /// Plugin name.\n        name: String,\n        /// Version constraint.\n        version: Option<String>,\n    },\n}",
          "documentation": "Source from which a plugin can be loaded.\n\n# Examples\n\n```\nuse harness_sdk::plugins::registry::PluginSource;\n\nlet source = PluginSource::Local { path: \"/path/to/plugin\".into() };\nassert!(matches!(source, PluginSource::Local { .. }));\n```"
        },
        {
          "name": "::PluginSource::local",
          "line": 53,
          "signature": "#[must_use]\npub fn local(path: impl Into<String>) -> Self;",
          "documentation": "Create a local source."
        },
        {
          "name": "::PluginSource::git",
          "line": 59,
          "signature": "#[must_use]\npub fn git(url: impl Into<String>) -> Self;",
          "documentation": "Create a Git source."
        },
        {
          "name": "::PluginSource::index",
          "line": 69,
          "signature": "#[must_use]\npub fn index(url: impl Into<String>, name: impl Into<String>) -> Self;",
          "documentation": "Create an index source."
        },
        {
          "name": "::verify_wasm_hash",
          "line": 84,
          "signature": "pub fn verify_wasm_hash(path: &str, expected_hash: &str) -> Result<(), PluginError>;",
          "documentation": "Verify a WASM file's SHA-256 hash against an expected value.\n\n# Errors\n\nReturns `PluginError::HashMismatch` if the hashes don't match.\nReturns `PluginError::Config` if the file cannot be read."
        }
      ]
    },
    {
      "path": "harness-sdk/src/plugins/wasm.rs",
      "sha256": "79fbf7dd46482d69dd057d339a9e3a6d4af1361bda1ceda26040408c8821b3aa",
      "artifactSha256": "de6d6485b58ea5b2ceaf64f299cb37d1967f2753a7bec660c5122c60353cf896",
      "url": "/reference/source/harness-sdk/src/plugins/wasm.rs.txt",
      "declarations": [
        {
          "name": "::DEFAULT_MEMORY_LIMIT",
          "line": 40,
          "signature": "pub const DEFAULT_MEMORY_LIMIT: usize;",
          "documentation": "Default memory limit per plugin instance (64 MB)."
        },
        {
          "name": "::PluginData",
          "line": 51,
          "signature": "pub struct PluginData {\n/// Plugin name for scoping operations and error messages.\n\npub name: String,\n/// Plugin state storage (key-value, scoped by plugin name).\n\npub storage: HashMap<String, Vec<u8>>,\n/// Log buffer for captured plugin output.\n\npub log_buffer: Vec<String>,\n/// Permission manager reference for capability checks.\n\npub permissions: Arc<PermissionManager>\n}",
          "documentation": "Host-side state stored in each plugin's wasmtime [`Store`].\n\nEach plugin gets its own `PluginData` instance, ensuring complete isolation.\nThe `storage` field is scoped by plugin name via [`scoped_storage_key`]."
        },
        {
          "name": "::PluginInstance",
          "line": 78,
          "signature": "pub struct PluginInstance {\n\n}",
          "documentation": "A fully instantiated WASM plugin ready for execution.\n\nEach plugin runs in its own wasmtime [`Store`] with isolated memory.\nPlugin crashes (WASM traps) are caught and reported as\n[`PluginError::PluginPanic`] without affecting the host.\n\n# Memory Model\n\nStrings cross the WASM boundary via (pointer, length) pairs referencing\nthe plugin's linear memory. The host reads from plugin memory after\nexport calls, and writes to plugin memory via the `alloc` export\nbefore passing data to commands/tools."
        },
        {
          "name": "::create_engine",
          "line": 95,
          "signature": "pub fn create_engine() -> Result<Engine, PluginError>;",
          "documentation": "Create a wasmtime Engine with SDK-appropriate configuration.\n\nThe engine is configured with:\n- Full backtraces for debugging plugin crashes\n- Multi-memory support\n- Component model disabled (we use core WASM modules)\n\n# Errors\n\nReturns `PluginError::Config` if engine creation fails."
        },
        {
          "name": "::compile_module",
          "line": 110,
          "signature": "pub fn compile_module(engine: &Engine, path: &str) -> Result<Module, PluginError>;",
          "documentation": "Compile and validate a WASM module from a file.\n\n# Errors\n\nReturns `PluginError::InvalidModule` if the file is missing or compilation fails."
        },
        {
          "name": "::validate_exports",
          "line": 133,
          "signature": "pub fn validate_exports(module: &Module, plugin_name: &str) -> Result<(), PluginError>;",
          "documentation": "Validate that a module exports the required plugin interface functions.\n\nRequired exports:\n- `memory`: Linear memory for string passing\n- `plugin_init`: Called once when the plugin is loaded\n- `plugin_name`: Returns the plugin's self-reported name\n\n# Errors\n\nReturns `PluginError::MissingExport` if required exports are missing."
        },
        {
          "name": "::instantiate_plugin",
          "line": 326,
          "signature": "pub fn instantiate_plugin(\n    engine: &Engine,\n    module: &Module,\n    name: &str,\n    permissions: Arc<PermissionManager>,\n) -> Result<PluginInstance, PluginError>;",
          "documentation": "Create a new plugin instance from a compiled module.\n\nSets up an isolated [`Store`] with memory limits, registers host functions\nvia a [`Linker`], and instantiates the module.\n\n# Errors\n\nReturns `PluginError::InvalidModule` if instantiation fails, or\n`PluginError::Config` if the linker cannot be configured."
        },
        {
          "name": "::PluginInstance::plugin_name",
          "line": 360,
          "signature": "#[must_use]\npub fn plugin_name(&self) -> &str;",
          "documentation": "Get the plugin's name (from the host-side data, not the WASM export)."
        },
        {
          "name": "::PluginInstance::call_init",
          "line": 450,
          "signature": "pub fn call_init(&mut self) -> Result<(), PluginError>;",
          "documentation": "Call the plugin's `plugin_init()` export.\n\nCalled once after instantiation. If the plugin traps during init,\nthe error is reported as [`PluginError::PluginPanic`].\n\n# Errors\n\nReturns `PluginError::PluginPanic` if the init function traps."
        },
        {
          "name": "::PluginInstance::call_name",
          "line": 469,
          "signature": "pub fn call_name(&mut self) -> Result<String, PluginError>;",
          "documentation": "Call `plugin_name()` and return the plugin's self-reported name string.\n\nThe function returns `(ptr, len)` pointing into the plugin's linear memory.\n\n# Errors\n\nReturns `PluginError::PluginPanic` if the function traps, or\n`PluginError::HostFunction` if the returned string is invalid."
        },
        {
          "name": "::PluginInstance::call_command",
          "line": 490,
          "signature": "pub fn call_command(\n        &mut self,\n        cmd_name: &str,\n        args_json: &str,\n    ) -> Result<Option<String>, PluginError>;",
          "documentation": "Call `plugin_handle_command(name_ptr, name_len, args_ptr, args_len) -> (ptr, len)`.\n\nReturns `Ok(None)` if the plugin doesn't export `plugin_handle_command`.\nReturns `Ok(Some(output))` with the command's output string, or\n`Ok(None)` if the plugin returns `(0, 0)` (no output).\n\n# Errors\n\nReturns `PluginError::PluginPanic` if the command handler traps."
        },
        {
          "name": "::PluginInstance::call_tool",
          "line": 536,
          "signature": "pub fn call_tool(\n        &mut self,\n        tool_name: &str,\n        input_json: &str,\n    ) -> Result<Option<String>, PluginError>;",
          "documentation": "Call `plugin_handle_tool(name_ptr, name_len, input_ptr, input_len) -> (ptr, len)`.\n\nReturns `Ok(None)` if the plugin doesn't export `plugin_handle_tool`.\nReturns `Ok(Some(output))` with the tool's output JSON, or\n`Ok(None)` if the plugin returns `(0, 0)` (no output).\n\n# Errors\n\nReturns `PluginError::PluginPanic` if the tool handler traps."
        },
        {
          "name": "::PluginInstance::drain_logs",
          "line": 574,
          "signature": "pub fn drain_logs(&mut self) -> Vec<String>;",
          "documentation": "Drain the log buffer, returning all messages logged since the last drain."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/app.rs",
      "sha256": "d94c252c7a3a7004fcb917bb8307f6885060f15d552dafd6f9ac225e6ffd9104",
      "artifactSha256": "0ffe37f4e07f07b9deac5e67c0895b89b254d1af95bf3236cc617cf573cea357",
      "url": "/reference/source/harness-sdk/src/runtime/app.rs.txt",
      "declarations": [
        {
          "name": "::AgentApp",
          "line": 55,
          "signature": "pub struct AgentApp {\n\n}",
          "documentation": "The top-level TUI application.\n\nCreated via [`AgentApp::builder()`]. Call [`run()`](AgentApp::run) to\nstart the event loop."
        },
        {
          "name": "::AgentApp::builder",
          "line": 75,
          "signature": "#[must_use]\npub fn builder() -> AgentAppBuilder;",
          "documentation": "Create a new builder for `AgentApp`.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::AgentApp;\n\nlet builder = AgentApp::builder();\n```"
        },
        {
          "name": "::AgentApp::run",
          "line": 87,
          "signature": "pub async fn run(self) -> Result<(), SdkError>;",
          "documentation": "Run the application.\n\nThis takes ownership of the terminal for the duration. On exit\n(normal, error, or signal), the terminal is always restored.\n\n# Errors\n\nReturns `SdkError` if initialization or the event loop fails."
        },
        {
          "name": "::AgentAppBuilder",
          "line": 201,
          "signature": "pub struct AgentAppBuilder {\n\n}",
          "documentation": "Builder for [`AgentApp`].\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::{AgentApp, AgentAppBuilder};\n\n# struct MyAdapter;\n# #[async_trait::async_trait]\n# impl harness_sdk::AgentAdapter for MyAdapter {\n#     fn name(&self) -> &str { \"test\" }\n#     fn capabilities(&self) -> harness_sdk::AdapterCapabilities { harness_sdk::AdapterCapabilities::chat_only() }\n#     async fn list_agents(&self) -> Result<Vec<harness_sdk::SdkAgentInfo>, harness_sdk::AdapterError> { Ok(vec![]) }\n#     async fn send_message(&self, _: &str, _: &str) -> Result<futures::stream::BoxStream<'static, harness_sdk::ResponseChunk>, harness_sdk::AdapterError> {\n#         Ok(Box::pin(futures::stream::empty()))\n#     }\n# }\n\nlet app = AgentApp::builder()\n    .name(\"My TUI\")\n    .adapter(MyAdapter)\n    .build()\n    .unwrap();\n```"
        },
        {
          "name": "::AgentAppBuilder::welcome",
          "line": 229,
          "signature": "#[must_use]\npub fn welcome(mut self, config: WelcomeConfig) -> Self;",
          "documentation": "Configure the welcome / empty-state hero screen shown before\nany chat turn has happened. The kit renders this via\n[`harness_tui_kit::WelcomeScreen`]; the SDK simply forwards\nthe config to `chat_screen` when the timeline is empty."
        },
        {
          "name": "::AgentAppBuilder::name",
          "line": 236,
          "signature": "#[must_use]\npub fn name(mut self, name: impl Into<String>) -> Self;",
          "documentation": "Set the application name (shown in title bar)."
        },
        {
          "name": "::AgentAppBuilder::adapter",
          "line": 243,
          "signature": "#[must_use]\npub fn adapter<A: AgentAdapter>(mut self, adapter: A) -> Self;",
          "documentation": "Set the adapter."
        },
        {
          "name": "::AgentAppBuilder::adapter_arc",
          "line": 250,
          "signature": "#[must_use]\npub fn adapter_arc(mut self, adapter: Arc<dyn AgentAdapter>) -> Self;",
          "documentation": "Set the adapter from an `Arc`."
        },
        {
          "name": "::AgentAppBuilder::theme",
          "line": 257,
          "signature": "#[must_use]\npub fn theme(mut self, theme: Theme) -> Self;",
          "documentation": "Set the theme (default: `Theme::dark()`)."
        },
        {
          "name": "::AgentAppBuilder::commands",
          "line": 264,
          "signature": "#[must_use]\npub fn commands(mut self, commands: SlashCommandRegistry) -> Self;",
          "documentation": "Set the slash command registry (default: builtins only)."
        },
        {
          "name": "::AgentAppBuilder::max_messages",
          "line": 271,
          "signature": "#[must_use]\npub fn max_messages(mut self, max: usize) -> Self;",
          "documentation": "Set the maximum message count (default: 100,000)."
        },
        {
          "name": "::AgentAppBuilder::build",
          "line": 281,
          "signature": "pub fn build(self) -> Result<AgentApp, SdkError>;",
          "documentation": "Build the `AgentApp`.\n\n# Errors\n\nReturns `SdkError::Builder` if required fields are missing."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/event.rs",
      "sha256": "705f0311601b3dc303e3f197d8a9712ed80b2a68efc95358939b33c3749759f3",
      "artifactSha256": "457bb6925b1b7b7f50124c839d7f336449f0f8b8797da74947855999f28eefbf",
      "url": "/reference/source/harness-sdk/src/runtime/event.rs.txt",
      "declarations": [
        {
          "name": "::AppEvent",
          "line": 14,
          "signature": "#[derive(Debug)]\npub enum AppEvent {\n    /// A terminal event (keyboard, mouse, resize).\n    Terminal(CrosstermEvent),\n\n    /// A response chunk from the adapter's response stream.\n    AdapterResponse(ResponseChunk),\n\n    /// An autonomy event from the adapter's autonomy stream.\n    Autonomy(AutonomyEvent),\n\n    /// An approval decision from the user.\n    ApprovalDecision {\n        /// The approval request ID.\n        request_id: String,\n        /// The user's decision.\n        action: SdkApprovalAction,\n    },\n\n    /// A tick event for animations and elapsed time updates.\n    Tick,\n\n    /// A shutdown signal was received.\n    Shutdown,\n}",
          "documentation": "Internal event type processed by the event loop.\n\nEvents are prioritized: Terminal > Shutdown > Adapter > Tick."
        },
        {
          "name": "::AppEvent::is_shutdown",
          "line": 42,
          "signature": "#[must_use]\npub fn is_shutdown(&self) -> bool;",
          "documentation": "Returns `true` if this is a shutdown event."
        },
        {
          "name": "::AppEvent::is_terminal",
          "line": 48,
          "signature": "#[must_use]\npub fn is_terminal(&self) -> bool;",
          "documentation": "Returns `true` if this is a terminal event."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/event_loop.rs",
      "sha256": "6e304ab3f7db45afbb1221d9eadee693ab68478a2390856f8f4e1d2cdfafef45",
      "artifactSha256": "058fff69f0898fbcbd97717bd18658ab6e81b8fdfdae552f9920acb477e27177",
      "url": "/reference/source/harness-sdk/src/runtime/event_loop.rs.txt",
      "declarations": [
        {
          "name": "::run_event_loop",
          "line": 58,
          "signature": "pub async fn run_event_loop(\n    terminal: &mut SdkTerminal,\n    state: &mut AppState,\n    adapter: Arc<dyn AgentAdapter>,\n    theme: &Theme,\n    mut shutdown_rx: mpsc::Receiver<()>,\n    commands: &SlashCommandRegistry,\n) -> Result<(), SdkError>;",
          "documentation": "Run the main event loop.\n\nThis is the core of the SDK. It processes events from multiple sources,\nupdates state, and renders the UI.\n\n# Arguments\n\n* `terminal` \u2014 The initialized terminal\n* `state` \u2014 Mutable application state\n* `adapter` \u2014 The agent adapter\n* `theme` \u2014 The UI theme\n* `shutdown_rx` \u2014 Channel for shutdown signals\n\n# Errors\n\nReturns `SdkError` if the event loop encounters an unrecoverable error."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/mod.rs",
      "sha256": "eb5d8ca980a925ba22c88e46b92cda5e0d64e35b5a60005df62eed8f6eca4aae",
      "artifactSha256": "58ead2ed2808306e9967902744f7ad02339a6e185e0b8067b9eeaccb71a8e79f",
      "url": "/reference/source/harness-sdk/src/runtime/mod.rs.txt",
      "declarations": [
        {
          "name": "app",
          "line": 6,
          "signature": "pub mod app;",
          "documentation": "Runtime infrastructure for the Agent TUI SDK.\n\nContains the event loop, terminal management, signal handling,\napplication state, and the top-level `AgentApp` builder."
        },
        {
          "name": "event",
          "line": 7,
          "signature": "pub mod event;",
          "documentation": ""
        },
        {
          "name": "event_loop",
          "line": 8,
          "signature": "pub mod event_loop;",
          "documentation": ""
        },
        {
          "name": "notifications",
          "line": 9,
          "signature": "pub mod notifications;",
          "documentation": ""
        },
        {
          "name": "signals",
          "line": 10,
          "signature": "pub mod signals;",
          "documentation": ""
        },
        {
          "name": "state",
          "line": 11,
          "signature": "pub mod state;",
          "documentation": ""
        },
        {
          "name": "terminal",
          "line": 12,
          "signature": "pub mod terminal;",
          "documentation": ""
        },
        {
          "name": "terminal_control",
          "line": 13,
          "signature": "pub mod terminal_control;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/notifications.rs",
      "sha256": "a6ed4cdc5b4c4ba635af1b862d6f147e7560736f48f5fd324b87926851cab4e4",
      "artifactSha256": "680f197a481ff42c46b3ca8c1cae625dfe63782f349774375382ed477001fb9c",
      "url": "/reference/source/harness-sdk/src/runtime/notifications.rs.txt",
      "declarations": [
        {
          "name": "::MAX_NOTIFICATION_LEN",
          "line": 33,
          "signature": "pub const MAX_NOTIFICATION_LEN: usize;",
          "documentation": "Maximum length of a notification body. Anything longer is\ntruncated; OSC 9 has no formal limit but pragmatic emulators\nreject very long sequences."
        },
        {
          "name": "::NotificationKind",
          "line": 39,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"kebab-case\")]\npub enum NotificationKind {\n    /// Streaming response just finished.\n    AgentTurnComplete,\n    /// Adapter raised an approval request that requires user input.\n    ApprovalNeeded,\n    /// A long-running tool call completed.\n    ToolCallComplete,\n    /// Catastrophic failure surfaced to the user.\n    Error,\n}",
          "documentation": "Kinds of notifications the runtime can emit. Adapters can filter\nthese via [`NotifierConfig`] to silence less-interesting events."
        },
        {
          "name": "::NotificationKind::title",
          "line": 53,
          "signature": "#[must_use]\npub fn title(self) -> &'static str;",
          "documentation": "Human-readable title for the notification."
        },
        {
          "name": "::NotifierConfig",
          "line": 65,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Default)]\npub enum NotifierConfig {\n    /// Disable notifications entirely.\n    Disabled,\n    /// Emit `OSC 9 ; title \u2014 body BEL` to the supplied writer.\n    /// Default channel.\n    #[default]\n    TerminalOsc9,\n    /// Spawn a user-supplied command, passing the body on argv.\n    /// `argv[0]` is the program; remaining items are static\n    /// arguments. The notification body is appended as the last\n    /// argument when [`Notifier::notify`] is called.\n    ExternalCommand { argv: Vec<String> },\n}",
          "documentation": "Configuration for [`Notifier`]. Adapters pick the channel."
        },
        {
          "name": "::Notifier",
          "line": 82,
          "signature": "#[derive(Debug, Clone, Default)]\npub struct Notifier {\n\n}",
          "documentation": "Stateless notification dispatcher. Cheap to clone \u2014 adapters\ntypically hold one and call `notify` from any task."
        },
        {
          "name": "::KindMask",
          "line": 89,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq)]\npub struct KindMask {\n\n}",
          "documentation": "Bitmask of which notification kinds are enabled. Default is all."
        },
        {
          "name": "::KindMask::without",
          "line": 110,
          "signature": "#[must_use]\npub fn without(mut self, kind: NotificationKind) -> Self;",
          "documentation": "Disable a specific kind."
        },
        {
          "name": "::KindMask::allows",
          "line": 122,
          "signature": "#[must_use]\npub fn allows(&self, kind: NotificationKind) -> bool;",
          "documentation": "Whether `kind` is currently enabled."
        },
        {
          "name": "::Notifier::new",
          "line": 135,
          "signature": "#[must_use]\npub fn new(config: NotifierConfig) -> Self;",
          "documentation": "Create a notifier with the given configuration."
        },
        {
          "name": "::Notifier::with_mask",
          "line": 144,
          "signature": "#[must_use]\npub fn with_mask(mut self, mask: KindMask) -> Self;",
          "documentation": "Replace the kind mask (defaults to \"all enabled\")."
        },
        {
          "name": "::Notifier::is_enabled",
          "line": 151,
          "signature": "#[must_use]\npub fn is_enabled(&self) -> bool;",
          "documentation": "Whether notifications are enabled at all."
        },
        {
          "name": "::Notifier::allows",
          "line": 157,
          "signature": "#[must_use]\npub fn allows(&self, kind: NotificationKind) -> bool;",
          "documentation": "Whether `kind` would be emitted right now."
        },
        {
          "name": "::Notifier::osc9_payload",
          "line": 165,
          "signature": "#[must_use]\npub fn osc9_payload(kind: NotificationKind, body: &str) -> String;",
          "documentation": "Build the OSC 9 escape sequence for a notification. Public so\ncallers can route the bytes themselves (e.g., into a buffered\nterminal writer rather than stdout)."
        },
        {
          "name": "::Notifier::notify",
          "line": 187,
          "signature": "pub fn notify<W: Write>(\n        &self,\n        writer: &mut W,\n        kind: NotificationKind,\n        body: &str,\n    ) -> io::Result<()>;",
          "documentation": "Emit `kind` with the supplied body, writing escape sequences\nto `writer` if the channel is [`NotifierConfig::TerminalOsc9`].\nExternal-command channels are dispatched via\n[`Notifier::external_command`] instead \u2014 `notify` is the\nterminal-only path so the runtime can call it from inside the\nrender loop without spawning processes.\n\n# Errors\n\nReturns the underlying [`io::Error`] from the writer if the\nchannel is OSC 9. Disabled and external-command channels\nalways succeed."
        },
        {
          "name": "::Notifier::external_command",
          "line": 214,
          "signature": "#[must_use]\npub fn external_command(&self, kind: NotificationKind, body: &str) -> Option<Vec<String>>;",
          "documentation": "Returns the argv that should be exec'd for an external-command\nnotification, with the body appended as the final argument.\nReturns `None` when the channel is not external-command or\nwhen this kind is masked off."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/signals.rs",
      "sha256": "8116b654eafdad0fb40564e8b865b9d6aae757d37e2d821120c614147bc8245b",
      "artifactSha256": "097c967733d489a8c1b7405ece6bbe16971f97761324e4a38395394ef0b22900",
      "url": "/reference/source/harness-sdk/src/runtime/signals.rs.txt",
      "declarations": [
        {
          "name": "::spawn_signal_handlers",
          "line": 18,
          "signature": "pub fn spawn_signal_handlers(shutdown_tx: mpsc::Sender<()>);",
          "documentation": "Spawn signal handlers for SIGINT and SIGTERM.\n\nWhen either signal is received, a message is sent on `shutdown_tx`.\nThe event loop receives this and initiates graceful shutdown.\n\n# Platform Support\n\n- Unix: Uses `tokio::signal::unix::signal` for both SIGINT and SIGTERM.\n- Windows: Falls back to `tokio::signal::ctrl_c()` for SIGINT only."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/state.rs",
      "sha256": "075f465fd98fae9563fd65ef9c7319c9f8f7dc6766c9d6966267769605eba77f",
      "artifactSha256": "bd8a9790bf31b92d94da90cb358e6657f295e6ebf71f290e7d878cd76dd98666",
      "url": "/reference/source/harness-sdk/src/runtime/state.rs.txt",
      "declarations": [
        {
          "name": "::DropdownKind",
          "line": 39,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]\npub enum DropdownKind {\n    /// `/` \u2014 slash command autocomplete.\n    #[default]\n    Slash,\n    /// `@` \u2014 file-mention autocomplete (live workspace search,\n    /// `./`, `../`, absolute paths).\n    Mention,\n}",
          "documentation": "Central application state.\n\nOwns all mutable state for the TUI, including:\n- Current mode (Chat/Autonomy/Stopping)\n- Connected agents and their metadata\n- Chat messages and streaming state\n- Kit component states\n- Session metrics\n\n# Examples\n\n```\nuse harness_sdk::runtime::state::AppState;\n\nlet state = AppState::new(\"my-app\");\nassert_eq!(state.mode(), harness_sdk::Mode::Chat);\nassert!(!state.should_quit());\n```\nWhich input-bar trigger is driving the autocomplete dropdown."
        },
        {
          "name": "::AppState",
          "line": 48,
          "signature": "pub struct AppState {\n/// Persistent state for the kit's `ThinkingAnimation`. The\n\n/// runtime calls\n\n/// [`harness_tui_kit::ThinkingAnimationState::advance`] each\n\n/// render frame while [`Self::is_thinking`] is true.\n\npub thinking_state: ThinkingAnimationState,\n// \u2500\u2500 Kit component states \u2500\u2500\n/// Chat timeline state.\n\npub timeline_state: ChatTimelineState,\n/// Input bar state.\n\npub input_state: InputBarState,\n/// App shell state.\n\npub shell_state: AppShellState,\n/// Tabs state.\n\npub tabs_state: TabsState,\n/// Approval queue state.\n\npub approval_state: ApprovalQueueState,\n/// Log viewer state (for autonomy mode activity feed).\n\npub log_viewer_state: LogViewerState,\n/// Command palette state.\n\npub palette_state: CommandPaletteState,\n/// Whether the command palette is open.\n\npub palette_open: bool,\n/// Slash dropdown state (inline autocomplete above input bar).\n\npub dropdown_state: SlashDropdownState,\n/// Items for the dropdown (shared between slash commands and `@`\n\n/// file mentions).\n\npub dropdown_items: Vec<SlashDropdownItem>,\n/// Which trigger is currently driving the dropdown \u2014 `Slash` when\n\n/// the input begins with `/`, `Mention` when the input contains an\n\n/// `@<prefix>` token at the end. Determines the substitution\n\n/// behaviour on `Enter`/`Tab` confirmation.\n\npub dropdown_kind: DropdownKind,\n/// When `dropdown_kind == Mention`, the literal prefix (including\n\n/// the leading `@`) currently being completed. The confirmation\n\n/// path uses this to know which substring of the input to replace\n\n/// with the chosen path.\n\npub mention_prefix: String,\n/// Error message to display (cleared after one render).\n\npub error_flash: Option<String>,\n/// Info message to display (cleared after one render).\n\npub info_flash: Option<String>,\n/// Ctrl+P settings palette state \u2014 visibility, current page,\n\n/// cursor, filter.\n\npub settings_palette_state: SettingsPaletteState\n}",
          "documentation": ""
        },
        {
          "name": "::AppState::new",
          "line": 184,
          "signature": "#[must_use]\npub fn new(app_name: impl Into<String>) -> Self;",
          "documentation": "Create a new application state.\n\n# Examples\n\n```\nuse harness_sdk::runtime::state::AppState;\nlet state = AppState::new(\"my-app\");\nassert_eq!(state.app_name(), \"my-app\");\n```"
        },
        {
          "name": "::AppState::set_settings_snapshot",
          "line": 224,
          "signature": "pub fn set_settings_snapshot(&mut self, snapshot: SettingsSnapshot);",
          "documentation": "Replace the cached settings snapshot. Called after the\nruntime re-fetches from the adapter (typically on Ctrl+P\nopen and after each apply)."
        },
        {
          "name": "::AppState::settings_snapshot",
          "line": 230,
          "signature": "#[must_use]\npub fn settings_snapshot(&self) -> &SettingsSnapshot;",
          "documentation": "Borrow the cached settings snapshot."
        },
        {
          "name": "::AppState::live_welcome_config",
          "line": 241,
          "signature": "#[must_use]\npub fn live_welcome_config(&self) -> Option<harness_tui_kit::WelcomeConfig>;",
          "documentation": "Compute a *live* welcome config \u2014 the static one supplied at\nbuilder time (brand, placeholder, hints, footer) overlaid\nwith the currently-active mode + model + provider read from\nthe settings snapshot. This is what the chat screen should\nrender so the user sees the model they just picked via\nCtrl+P, not whatever was hardcoded at startup."
        },
        {
          "name": "::AppState::set_welcome",
          "line": 286,
          "signature": "pub fn set_welcome(&mut self, welcome: harness_tui_kit::WelcomeConfig);",
          "documentation": "Install the welcome / empty-state hero config."
        },
        {
          "name": "::AppState::welcome",
          "line": 294,
          "signature": "#[must_use]\npub fn welcome(&self) -> Option<&harness_tui_kit::WelcomeConfig>;",
          "documentation": "Borrow the welcome config, if one was installed. Returns\n`None` when there's nothing configured (in which case the\nchat screen falls back to its previous empty-timeline look)."
        },
        {
          "name": "::AppState::app_name",
          "line": 302,
          "signature": "#[must_use]\npub fn app_name(&self) -> &str;",
          "documentation": "Returns the application name."
        },
        {
          "name": "::AppState::mode",
          "line": 308,
          "signature": "#[must_use]\npub fn mode(&self) -> Mode;",
          "documentation": "Returns the current mode."
        },
        {
          "name": "::AppState::should_quit",
          "line": 314,
          "signature": "#[must_use]\npub fn should_quit(&self) -> bool;",
          "documentation": "Returns `true` if the app should quit."
        },
        {
          "name": "::AppState::active_agent_id",
          "line": 320,
          "signature": "#[must_use]\npub fn active_agent_id(&self) -> Option<&str>;",
          "documentation": "Returns the currently active agent ID."
        },
        {
          "name": "::AppState::agents",
          "line": 326,
          "signature": "#[must_use]\npub fn agents(&self) -> &HashMap<String, SdkAgentInfo>;",
          "documentation": "Returns the agents map."
        },
        {
          "name": "::AppState::messages",
          "line": 332,
          "signature": "#[must_use]\npub fn messages(&self) -> &[harness_tui_kit::ChatMessage];",
          "documentation": "Returns the chat messages."
        },
        {
          "name": "::AppState::is_streaming",
          "line": 338,
          "signature": "#[must_use]\npub fn is_streaming(&self) -> bool;",
          "documentation": "Returns whether a response is currently streaming."
        },
        {
          "name": "::AppState::is_thinking",
          "line": 348,
          "signature": "#[must_use]\npub fn is_thinking(&self) -> bool;",
          "documentation": "True between \"model started thinking\" and the first\n`TextDelta` arriving (or stream end). The chat surface\nrenders the kit's [`harness_tui_kit::ThinkingAnimation`]\nband while this is true so the user knows the agent is\nalive but not yet producing tokens."
        },
        {
          "name": "::AppState::approval_queue",
          "line": 354,
          "signature": "#[must_use]\npub fn approval_queue(&self) -> &[SdkApprovalRequest];",
          "documentation": "Returns the pending approval requests."
        },
        {
          "name": "::AppState::activity_log",
          "line": 360,
          "signature": "#[must_use]\npub fn activity_log(&self) -> &[harness_tui_kit::LogEntry];",
          "documentation": "Returns the activity log entries."
        },
        {
          "name": "::AppState::session",
          "line": 366,
          "signature": "#[must_use]\npub fn session(&self) -> &SessionInfo;",
          "documentation": "Returns the session info."
        },
        {
          "name": "::AppState::elapsed",
          "line": 372,
          "signature": "#[must_use]\npub fn elapsed(&self) -> Duration;",
          "documentation": "Returns the elapsed time since session start."
        },
        {
          "name": "::AppState::set_quit",
          "line": 379,
          "signature": "pub fn set_quit(&mut self);",
          "documentation": "Set the quit flag."
        },
        {
          "name": "::AppState::set_streaming",
          "line": 393,
          "signature": "pub fn set_streaming(&mut self, streaming: bool);",
          "documentation": "Set the streaming flag.\n\nTransitioning from `false` -> `true` arms a fresh\n[`MarkdownStreamCollector`] for the agent message currently\nbeing filled AND turns on the [`harness_tui_kit::ThinkingAnimation`]\nband so the user sees something while the model is still\n\"thinking\" (no tokens yet). Transitioning from `true` ->\n`false` drains any remaining buffered source into the last\nmessage, drops the collector, and clears the thinking flag.\nIdempotent on no-op transitions."
        },
        {
          "name": "::AppState::set_thinking",
          "line": 419,
          "signature": "pub fn set_thinking(&mut self, thinking: bool);",
          "documentation": "Explicitly set the thinking flag. The chat-mode handler\nflips it to `false` automatically the moment the first\n`TextDelta` arrives; callers rarely need to invoke it\ndirectly, but it is exposed for adapters that signal\nthinking-on / thinking-off out-of-band (e.g. via a custom\n`ResponseChunk::StatusChange`)."
        },
        {
          "name": "::AppState::tick_thinking",
          "line": 431,
          "signature": "pub fn tick_thinking(&mut self);",
          "documentation": "Advance the thinking-animation tick by one frame. The runtime\ncalls this every render frame while [`Self::is_thinking`] is\ntrue."
        },
        {
          "name": "::AppState::push_streaming_delta",
          "line": 447,
          "signature": "pub fn push_streaming_delta(&mut self, delta: &str);",
          "documentation": "Feed a streaming `TextDelta` chunk into the active markdown\ncollector and append any newly-committed source to the last\nmessage. When no stream is armed (e.g. an out-of-band tool\nstatus TextDelta), falls back to a direct append so existing\nadapters keep working.\n\nModeled on `openai/codex@codex-rs/tui/src/streaming/controller.rs`,\nwhich re-renders the entire accumulated markdown source on each\ncommit boundary so block-level constructs (lists, fenced code,\nblockquotes) render coherently as the stream arrives."
        },
        {
          "name": "::AppState::has_active_markdown_stream",
          "line": 470,
          "signature": "#[must_use]\npub fn has_active_markdown_stream(&self) -> bool;",
          "documentation": "True when a markdown stream collector is currently armed.\nUseful for diagnostics and tests."
        },
        {
          "name": "::AppState::set_mode",
          "line": 479,
          "signature": "pub fn set_mode(&mut self, mode: Mode) -> Result<(), crate::SdkError>;",
          "documentation": "Set the current mode.\n\n# Errors\n\nReturns `SdkError::InvalidModeTransition` if the transition is invalid."
        },
        {
          "name": "::AppState::set_active_agent",
          "line": 503,
          "signature": "pub fn set_active_agent(&mut self, agent_id: Option<String>);",
          "documentation": "Set the active agent ID."
        },
        {
          "name": "::AppState::set_max_messages",
          "line": 508,
          "signature": "pub fn set_max_messages(&mut self, max: usize);",
          "documentation": "Set the maximum message count."
        },
        {
          "name": "::AppState::set_agents",
          "line": 515,
          "signature": "pub fn set_agents(&mut self, agents: Vec<SdkAgentInfo>);",
          "documentation": "Update the agents list."
        },
        {
          "name": "::AppState::update_agent",
          "line": 529,
          "signature": "pub fn update_agent(&mut self, agent: SdkAgentInfo);",
          "documentation": "Update a single agent's info."
        },
        {
          "name": "::AppState::add_message",
          "line": 536,
          "signature": "pub fn add_message(&mut self, msg: harness_tui_kit::ChatMessage);",
          "documentation": "Add a chat message."
        },
        {
          "name": "::AppState::append_to_last_message",
          "line": 547,
          "signature": "pub fn append_to_last_message(&mut self, text: &str);",
          "documentation": "Append text to the last message (for streaming)."
        },
        {
          "name": "::AppState::clear_messages",
          "line": 554,
          "signature": "pub fn clear_messages(&mut self);",
          "documentation": "Clear all messages."
        },
        {
          "name": "::AppState::truncate_messages_at",
          "line": 562,
          "signature": "pub fn truncate_messages_at(&mut self, idx: usize);",
          "documentation": "Drop every message at or after `idx`. Used by the\n[`crate::backtrack`] module to rewind to a prior turn. The\nsession's `message_count` is updated to match."
        },
        {
          "name": "::AppState::add_approval",
          "line": 572,
          "signature": "pub fn add_approval(&mut self, request: SdkApprovalRequest);",
          "documentation": "Add an approval request to the queue."
        },
        {
          "name": "::AppState::remove_approval",
          "line": 580,
          "signature": "pub fn remove_approval(&mut self, request_id: &str);",
          "documentation": "Remove an approval request by ID."
        },
        {
          "name": "::AppState::add_activity",
          "line": 587,
          "signature": "pub fn add_activity(&mut self, entry: harness_tui_kit::LogEntry);",
          "documentation": "Add an activity log entry."
        },
        {
          "name": "::AppState::update_usage",
          "line": 598,
          "signature": "pub fn update_usage(&mut self, input_tokens: u64, output_tokens: u64, cost_cents: f64);",
          "documentation": "Update usage metrics."
        },
        {
          "name": "::AppState::tick",
          "line": 605,
          "signature": "pub fn tick(&mut self);",
          "documentation": "Update the session elapsed time."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/terminal.rs",
      "sha256": "67ba3b3cc520542a260fad9654c91d7af006aa6d164937e7eadb56fc779e89c3",
      "artifactSha256": "43e36b5e0be722f40867e7b981a3ee8d196690b90c83fd130bf8c7a7785ab76f",
      "url": "/reference/source/harness-sdk/src/runtime/terminal.rs.txt",
      "declarations": [
        {
          "name": "::SdkTerminal",
          "line": 22,
          "signature": "pub type SdkTerminal = Terminal<CrosstermBackend<Stdout>>;",
          "documentation": "Type alias for the SDK's terminal backend."
        },
        {
          "name": "::init_terminal",
          "line": 32,
          "signature": "pub fn init_terminal() -> io::Result<SdkTerminal>;",
          "documentation": "Initialize the terminal for TUI rendering.\n\nEnters alternate screen, enables raw mode, and hides the cursor.\nReturns a `Terminal` ready for rendering.\n\n# Errors\n\nReturns `io::Error` if terminal initialization fails."
        },
        {
          "name": "::restore_terminal",
          "line": 65,
          "signature": "pub fn restore_terminal() -> io::Result<()>;",
          "documentation": "Restore the terminal to its original state.\n\nLeaves alternate screen, disables raw mode, and shows the cursor.\nThis function is safe to call multiple times.\n\n# Errors\n\nReturns `io::Error` if restoration fails, but tries all steps regardless."
        },
        {
          "name": "::install_panic_hook",
          "line": 79,
          "signature": "pub fn install_panic_hook();",
          "documentation": "Install a panic hook that restores the terminal before printing the backtrace.\n\nThis ensures that even if the SDK panics (which it should never do in\nproduction code), the user's terminal is not left in a corrupted state."
        }
      ]
    },
    {
      "path": "harness-sdk/src/runtime/terminal_control.rs",
      "sha256": "17fcb4ae6b10ead43f42a8b4f03ddce85609d49a6d7876cf5c366df8ea462f02",
      "artifactSha256": "095e723bd1a3cab6d1d6b72c8d4d7ace14690f2a2149d75f8e576606d28a6ba5",
      "url": "/reference/source/harness-sdk/src/runtime/terminal_control.rs.txt",
      "declarations": [
        {
          "name": "::MAX_TITLE_LEN",
          "line": 18,
          "signature": "pub const MAX_TITLE_LEN: usize;",
          "documentation": "Maximum length of a window title we'll emit, to avoid abusive\npayloads from upstream adapter output. The value is well above\nwhat any sane terminal will display."
        },
        {
          "name": "::MAX_HYPERLINK_URL_LEN",
          "line": 22,
          "signature": "pub const MAX_HYPERLINK_URL_LEN: usize;",
          "documentation": "Maximum length of an OSC 8 URL. URLs longer than this are\ntruncated; the visible label is rendered without a hyperlink."
        },
        {
          "name": "::set_title",
          "line": 38,
          "signature": "pub fn set_title<W: Write>(writer: &mut W, title: &str) -> io::Result<()>;",
          "documentation": "Set the terminal window title using `OSC 0 ; <text> BEL`.\n\n`OSC 0` updates both the icon name and the window title \u2014 this is\nthe most widely-supported variant across iTerm2, Terminal.app,\nAlacritty, Kitty, Wezterm, and modern xterm.\n\nThe text is sanitized: control characters (except space) are\nstripped, and the title is truncated to [`MAX_TITLE_LEN`] chars.\nEmpty titles fall through as \"clear title\" (sets to a single\nspace, which most terminals interpret as a reset).\n\n# Errors\n\nReturns the underlying [`io::Error`] from the writer."
        },
        {
          "name": "::clear_title",
          "line": 49,
          "signature": "pub fn clear_title<W: Write>(writer: &mut W) -> io::Result<()>;",
          "documentation": "Clear the terminal window title.\n\n# Errors\n\nReturns the underlying [`io::Error`] from the writer."
        },
        {
          "name": "::ring_bell",
          "line": 62,
          "signature": "pub fn ring_bell<W: Write>(writer: &mut W) -> io::Result<()>;",
          "documentation": "Emit a terminal bell (`BEL`).\n\nMany emulators surface this as a visual or audible notification\nwhen their tab is in the background \u2014 useful for \"task done\".\n\n# Errors\n\nReturns the underlying [`io::Error`] from the writer."
        },
        {
          "name": "::hyperlink",
          "line": 76,
          "signature": "#[must_use]\npub fn hyperlink(url: &str, label: &str) -> String;",
          "documentation": "Build an OSC 8 hyperlink string. Returns the supplied `label`\nwrapped in the `OSC 8 ; ; URL ST <label> OSC 8 ; ; ST` envelope\nthat hyperlink-aware terminals render as a clickable link.\n\nIf `url` is empty, exceeds [`MAX_HYPERLINK_URL_LEN`], or contains\ncontrol characters, the function returns the label unchanged so\nthe caller can render plain text. This keeps the helper safe to\ncall on untrusted adapter output without further checks."
        },
        {
          "name": "::write_hyperlink",
          "line": 89,
          "signature": "pub fn write_hyperlink<W: Write>(writer: &mut W, url: &str, label: &str) -> io::Result<()>;",
          "documentation": "Emit an OSC 8 hyperlink directly to the writer.\n\n# Errors\n\nReturns the underlying [`io::Error`] from the writer."
        }
      ]
    },
    {
      "path": "harness-sdk/src/screens/autonomy_screen.rs",
      "sha256": "412b1432d90e326f53865ef2ce1531701d48d0ed5a10c88b7fc83c36188ae952",
      "artifactSha256": "6a42ac21eb88242bc5f17897c922c895d778dba93cf9cd13e81fbaac72d05360",
      "url": "/reference/source/harness-sdk/src/screens/autonomy_screen.rs.txt",
      "declarations": [
        {
          "name": "::render_autonomy_screen",
          "line": 29,
          "signature": "pub fn render_autonomy_screen(frame: &mut Frame, state: &mut AppState, theme: &Theme);",
          "documentation": "Render the autonomy screen.\n\nIf the adapter doesn't support autonomy, falls back to the chat screen."
        }
      ]
    },
    {
      "path": "harness-sdk/src/screens/chat_screen.rs",
      "sha256": "5787aa6cc4ad15b09b7a344279ba814af515e3a122a6e3fc5008ec50dd0bcfa2",
      "artifactSha256": "f7ba9dd65574a1d42c1e3d38bb85ff022debdb25c6e7816985a60691fe590ba9",
      "url": "/reference/source/harness-sdk/src/screens/chat_screen.rs.txt",
      "declarations": [
        {
          "name": "::render_chat_screen",
          "line": 39,
          "signature": "pub fn render_chat_screen(\n    frame: &mut Frame,\n    state: &mut AppState,\n    theme: &Theme,\n    adapter: &dyn AgentAdapter,\n);",
          "documentation": "Render the chat screen.\n\nComposes Kit components into the chat layout. The `AppShell` provides\nthe outer frame; the main area contains the `ChatTimeline` and `InputBar`;\nthe `StatusBar` shows session info."
        }
      ]
    },
    {
      "path": "harness-sdk/src/screens/custom.rs",
      "sha256": "dfb868086c5576f658cda2ddfa7e98ad76658c6cc822e6d68feda9f301f459d0",
      "artifactSha256": "b440c39dbbd7339f79f131435bd4f837f0a41f418930a9c62218b4cb7730da63",
      "url": "/reference/source/harness-sdk/src/screens/custom.rs.txt",
      "declarations": [
        {
          "name": "::ScreenResult",
          "line": 14,
          "signature": "#[derive(Debug, Clone)]\npub enum ScreenResult {\n    /// Event was consumed by the screen.\n    Consumed,\n    /// Event was not handled \u2014 pass to default handler.\n    Ignored,\n    /// Screen requests navigation to another screen.\n    Navigate(String),\n    /// Screen requests closing itself.\n    Close,\n}",
          "documentation": "Result of processing an event in a custom screen."
        },
        {
          "name": "::ScreenEvent",
          "line": 27,
          "signature": "#[derive(Debug, Clone)]\npub enum ScreenEvent {\n    /// A terminal event (keyboard, mouse, resize).\n    Terminal(CrosstermEvent),\n    /// A tick for animations.\n    Tick,\n}",
          "documentation": "An event passed to custom screens."
        },
        {
          "name": "::CustomScreen",
          "line": 61,
          "signature": "pub trait CustomScreen: Send + Sync {\n    /// The screen's display name (shown in tab bar).\n    fn name(&self) -> &str;\n\n    /// Render the screen into the given area.\n    fn render(&self, frame: &mut Frame, area: Rect, theme: &Theme);\n\n    /// Handle an event. Return `ScreenResult::Consumed` if the event\n    /// was handled, `ScreenResult::Ignored` to pass it through.\n    fn handle_event(&mut self, event: ScreenEvent) -> ScreenResult;\n\n    /// Called when the screen becomes the active tab.\n    fn on_focus(&mut self) ;\n\n    /// Called when the screen loses focus.\n    fn on_blur(&mut self) ;\n}",
          "documentation": "Trait for custom screens provided by adapters or plugins.\n\nCustom screens are rendered in tabs alongside the built-in Chat\nand Autonomy screens.\n\n# Examples\n\n```rust,no_run\nuse harness_sdk::screens::custom::{CustomScreen, ScreenEvent, ScreenResult};\nuse ratatui::Frame;\nuse ratatui::layout::Rect;\nuse harness_tui_kit::Theme;\n\nstruct DashboardScreen;\n\nimpl CustomScreen for DashboardScreen {\n    fn name(&self) -> &str { \"Dashboard\" }\n\n    fn render(&self, frame: &mut Frame, area: Rect, theme: &Theme) {\n        // Render dashboard widgets\n    }\n\n    fn handle_event(&mut self, event: ScreenEvent) -> ScreenResult {\n        ScreenResult::Ignored\n    }\n}\n```"
        }
      ]
    },
    {
      "path": "harness-sdk/src/screens/mod.rs",
      "sha256": "764291f286e52951ca5a5ed45b0d00ad51352124745fc06afc48d12d5a5c1297",
      "artifactSha256": "d1c0c8d1c27692270be6756c0a81994726e97f11c43e9c3b3c82f5f0d3b9df62",
      "url": "/reference/source/harness-sdk/src/screens/mod.rs.txt",
      "declarations": [
        {
          "name": "autonomy_screen",
          "line": 3,
          "signature": "pub mod autonomy_screen;",
          "documentation": "Screen rendering for Chat and Autonomy modes."
        },
        {
          "name": "chat_screen",
          "line": 4,
          "signature": "pub mod chat_screen;",
          "documentation": ""
        },
        {
          "name": "custom",
          "line": 5,
          "signature": "pub mod custom;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/session/metadata.rs",
      "sha256": "29eca97dd61028c12a7073515e4137e71c6e780f07858c00c6aee6ab3e2d740d",
      "artifactSha256": "71f8c3e0c2367dde4071886cb6663956701f29b7a684d48115cacd8ce14f3a46",
      "url": "/reference/source/harness-sdk/src/session/metadata.rs.txt",
      "declarations": [
        {
          "name": "::SessionMetadata",
          "line": 16,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct SessionMetadata {\n/// Session id (matches the file stem on disk).\n\npub session_id: Uuid,\n/// Application name (which app wrote this session).\n\npub app_name: String,\n/// Workspace root the session was started in (display only).\n\n#[serde(default)]\npub workspace_root: String,\n/// First user message (truncated) \u2014 shown as the picker preview.\n\n#[serde(default)]\npub preview: String,\n/// When the session started.\n\npub started_at: DateTime<Utc>,\n/// When the session was last appended to.\n\npub last_updated_at: DateTime<Utc>,\n/// Number of records persisted so far.\n\n#[serde(default)]\npub record_count: u64\n}",
          "documentation": "One row in the resume picker."
        },
        {
          "name": "::SessionMetadata::truncate_preview",
          "line": 40,
          "signature": "#[must_use]\npub fn truncate_preview(s: &str, max_chars: usize) -> String;",
          "documentation": "Truncate `s` to `max_chars` characters, appending \"\u2026\" when\ntruncated. Used to keep picker rows on one line."
        }
      ]
    },
    {
      "path": "harness-sdk/src/session/mod.rs",
      "sha256": "73ab938ea4a10575e4ac0c7c080aed389287f6a56f0fb3a47a10c3027bb01d48",
      "artifactSha256": "a0591382bfd4aee8ec2eac5a283865c00aa349d044a14b2f61f77846a97a5d62",
      "url": "/reference/source/harness-sdk/src/session/mod.rs.txt",
      "declarations": [
        {
          "name": "pub use metadata::SessionMetadata;",
          "line": 17,
          "signature": "pub use metadata::SessionMetadata;",
          "documentation": ""
        },
        {
          "name": "pub use record::{SessionRecord, SessionRecordKind};",
          "line": 18,
          "signature": "pub use record::{SessionRecord, SessionRecordKind};",
          "documentation": ""
        },
        {
          "name": "pub use store::{JsonlSessionStore, SessionStore, SessionStoreError};",
          "line": 19,
          "signature": "pub use store::{JsonlSessionStore, SessionStore, SessionStoreError};",
          "documentation": ""
        }
      ]
    },
    {
      "path": "harness-sdk/src/session/record.rs",
      "sha256": "c59bd13fe13606139d566ac60066eb8d32642454ebce41f4c99d9f968b27b35a",
      "artifactSha256": "a862b681a0678e45329ef65c1209294a66b9782865ae723d4fe74bebb00081e2",
      "url": "/reference/source/harness-sdk/src/session/record.rs.txt",
      "declarations": [
        {
          "name": "::SessionRecordKind",
          "line": 28,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum SessionRecordKind {\n    /// User input.\n    User,\n    /// Assistant turn (markdown body).\n    Assistant,\n    /// Tool invocation.\n    Tool,\n    /// Shell exec.\n    Exec,\n    /// Unified diff.\n    Diff,\n    /// Approval request + resolution.\n    Approval,\n    /// System notice.\n    System,\n    /// Adapter-supplied opaque state (config, model id, tokens).\n    Snapshot,\n}",
          "documentation": "Discriminator for [`SessionRecord`]. Mirrors the `HistoryCell`\ntaxonomy so resume can rebuild a structured transcript."
        },
        {
          "name": "::SessionRecord",
          "line": 54,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct SessionRecord {\n/// Per-record id (independent of session id; useful for dedup\n\n/// when resume crosses fork boundaries).\n\npub id: Uuid,\n/// UTC timestamp when the record was written.\n\npub at: DateTime<Utc>,\n/// Discriminator.\n\npub kind: SessionRecordKind,\n/// Optional sender label (agent id, user, system).\n\n#[serde(default)]\npub sender: String,\n/// Structured payload \u2014 schema is owned by the SDK consumer.\n\npub body: serde_json::Value\n}",
          "documentation": "One persisted conversation event.\n\nThe `body` field is intentionally `serde_json::Value` so SDK\nconsumers can attach arbitrary structured payloads without forcing\na rev of this enum every time a new cell type lands. Concrete\nadapters define their own body schema and validate it on read."
        },
        {
          "name": "::SessionRecord::new",
          "line": 73,
          "signature": "#[must_use]\npub fn new(\n        kind: SessionRecordKind,\n        sender: impl Into<String>,\n        body: serde_json::Value,\n    ) -> Self;",
          "documentation": "Create a new record with a freshly-minted id and the current\nUTC timestamp."
        }
      ]
    },
    {
      "path": "harness-sdk/src/session/store.rs",
      "sha256": "c04a0d2846f3cc7b2f4dcdf4633207c0d23a30eeb3ae98ee6ec99bcd61147539",
      "artifactSha256": "1fd93ac541e269624033cb320c2e573adce2e5228eec1c5ad646b0c267f12cd8",
      "url": "/reference/source/harness-sdk/src/session/store.rs.txt",
      "declarations": [
        {
          "name": "::SessionStoreError",
          "line": 25,
          "signature": "#[derive(Debug, Error)]\npub enum SessionStoreError {\n    /// I/O error reaching the underlying storage.\n    #[error(\"session store i/o: {0}\")]\n    Io(#[from] std::io::Error),\n    /// Serialization error encoding a record.\n    #[error(\"session store serde: {0}\")]\n    Serde(#[from] serde_json::Error),\n    /// The home directory could not be located. The default JSONL\n    /// store falls back to the system temp directory before\n    /// surfacing this.\n    #[error(\"home directory not available\")]\n    NoHome,\n    /// The requested session id is not present in the store.\n    #[error(\"session not found: {0}\")]\n    NotFound(Uuid),\n}",
          "documentation": "Errors emitted by [`SessionStore`] implementations."
        },
        {
          "name": "::SessionStore",
          "line": 43,
          "signature": "pub trait SessionStore: Send + Sync {\n    /// Begin a new session, persisting its metadata as the first\n    /// line. Returns the freshly-minted session id.\n    fn begin(&self, meta: SessionMetadata) -> Result<Uuid, SessionStoreError>;\n\n    /// Append a single record to a session.\n    fn append(&self, session_id: Uuid, record: &SessionRecord) -> Result<(), SessionStoreError>;\n\n    /// Read the metadata line for one session.\n    fn metadata(&self, session_id: Uuid) -> Result<SessionMetadata, SessionStoreError>;\n\n    /// Replay all records for a session in append order.\n    fn replay(&self, session_id: Uuid) -> Result<Vec<SessionRecord>, SessionStoreError>;\n\n    /// List every session in the store, sorted by `last_updated_at`\n    /// descending (most-recent first). Limit caps the number of\n    /// rows returned (use `usize::MAX` for \"all\").\n    fn list(&self, app_name: &str, limit: usize)\n        -> Result<Vec<SessionMetadata>, SessionStoreError>;\n\n    /// Delete a session.\n    fn delete(&self, session_id: Uuid) -> Result<(), SessionStoreError>;\n}",
          "documentation": "Trait for opaque session backends."
        },
        {
          "name": "::JsonlSessionStore",
          "line": 72,
          "signature": "#[derive(Debug, Clone)]\npub struct JsonlSessionStore {\n\n}",
          "documentation": "Persists sessions as JSON Lines under\n`~/.{app_name}/sessions/{uuid}.jsonl`. Falls back to\n`$TMPDIR/agent-tui-sessions/{app_name}` when the home directory\nis not available (CI, sandboxes)."
        },
        {
          "name": "::JsonlSessionStore::standard",
          "line": 80,
          "signature": "pub fn standard(app_name: &str) -> Result<Self, SessionStoreError>;",
          "documentation": "Create a store rooted at the standard\n`~/.{app_name}/sessions/` directory. The directory is created\nif it does not already exist."
        },
        {
          "name": "::JsonlSessionStore::rooted_at",
          "line": 88,
          "signature": "pub fn rooted_at(root: impl Into<PathBuf>) -> Result<Self, SessionStoreError>;",
          "documentation": "Create a store at an explicit path. Useful for tests."
        },
        {
          "name": "::JsonlSessionStore::root",
          "line": 96,
          "signature": "#[must_use]\npub fn root(&self) -> &Path;",
          "documentation": "Read-only access to the on-disk root directory."
        }
      ]
    },
    {
      "path": "harness-sdk/src/settings.rs",
      "sha256": "c4b8dafe6af6911f1e2df6ce2bffedc8f7afb5b3fd58c78ce1a42d1e7dcbda07",
      "artifactSha256": "ba4cbec5d302a36baf59e3483faf9e619c2e784f555d93af65fa58955f77deeb",
      "url": "/reference/source/harness-sdk/src/settings.rs.txt",
      "declarations": [
        {
          "name": "::ProviderKind",
          "line": 35,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"kebab-case\")]\npub enum ProviderKind {\n    /// Local / remote Flocks engine \u2014 drives an underlying coding CLI\n    /// (Claude Code, Codex, Gemini-CLI, etc.) which talks to a model.\n    Flocks,\n    /// Foundry inference gateway \u2014 vendor-agnostic, routes to many\n    /// upstreams.\n    Foundry,\n    /// Forge ANVIL agent \u2014 direct provider integration (e.g.,\n    /// Anthropic, OpenAI, Google) bound to an OAS-identified agent.\n    Forge,\n    /// Direct provider integration without a routing layer.\n    Direct,\n}",
          "documentation": "Kinds of provider sources Clausen-style apps support."
        },
        {
          "name": "::ProviderKind::label",
          "line": 52,
          "signature": "#[must_use]\npub fn label(self) -> &'static str;",
          "documentation": "Human-readable label for palette display."
        },
        {
          "name": "::ProviderInfo",
          "line": 64,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ProviderInfo {\n/// Stable identifier (used to apply selection back to the adapter).\n\npub id: String,\n/// User-visible name.\n\npub name: String,\n/// Source category.\n\npub kind: ProviderKind,\n/// One-line description shown in the palette.\n\npub description: String,\n/// Whether the provider is currently reachable / authenticated.\n\npub healthy: bool,\n/// `true` when this is the currently-selected provider.\n\npub active: bool\n}",
          "documentation": "A provider known to the adapter."
        },
        {
          "name": "::ModelInfo",
          "line": 81,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ModelInfo {\n/// Stable identifier scoped to its provider.\n\npub id: String,\n/// User-visible name (e.g. `\"Claude Opus 4.7\"`).\n\npub name: String,\n/// Provider that hosts this model.\n\npub provider_id: String,\n/// Optional context window in tokens.\n\npub context_window: Option<u32>,\n/// Optional capability tags (\"coding\", \"vision\", \"tool-use\", \u2026).\n\npub capabilities: Vec<String>,\n/// `true` when this is the currently-selected model.\n\npub active: bool\n}",
          "documentation": "A model exposed by a provider."
        },
        {
          "name": "::ModeInfo",
          "line": 100,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ModeInfo {\n/// Stable identifier (e.g. `\"build\"`, `\"plan\"`, `\"read\"`, `\"auto\"`).\n\npub id: String,\n/// User-visible name.\n\npub name: String,\n/// Single-sentence summary shown in the palette.\n\npub description: String,\n/// Default provider when this mode activates.\n\npub default_provider: Option<String>,\n/// Default model when this mode activates.\n\npub default_model: Option<String>,\n/// `true` when this is the currently-selected mode.\n\npub active: bool\n}",
          "documentation": "A high-level operating mode with a default provider+model binding.\nModes let the user say \"I'm in Build mode\" and have the runtime\npick the right model + system prompt automatically."
        },
        {
          "name": "::ProviderSettingField",
          "line": 120,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ProviderSettingField {\n/// Stable identifier (e.g. `\"api_key\"`, `\"base_url\"`, `\"timeout_seconds\"`).\n\npub id: String,\n/// User-visible label.\n\npub label: String,\n/// One-line description.\n\npub description: String,\n/// Field kind \u2014 drives palette rendering + input handling.\n\npub kind: ProviderSettingKind,\n/// Current value (already redacted for secret fields).\n\npub value: String,\n/// `true` when the value is sensitive \u2014 palette displays as\n\n/// `\u2022\u2022\u2022\u2022\u2022\u2022` and the runtime never logs it.\n\npub secret: bool,\n/// `true` when this field is the primary \"selected\" entry of an\n\n/// enum/picker (e.g. the active Flocks CLI inside the Flocks\n\n/// provider's settings).\n\npub active: bool\n}",
          "documentation": "A configurable field on a provider \u2014 surfaced in the\nper-provider Settings sub-page. Adapters typically populate this\nlist from `forge_settings::ProviderSettings::fields()` so the\nmetadata is owned by Forge rather than the runtime."
        },
        {
          "name": "::ProviderSettingKind",
          "line": 143,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(tag = \"kind\", rename_all = \"kebab-case\")]\npub enum ProviderSettingKind {\n    /// Free-form string input (api keys, urls).\n    Text,\n    /// Integer (timeouts, retries, max-tokens).\n    Integer,\n    /// Boolean toggle.\n    Bool,\n    /// Drill-in picker \u2014 selecting this opens a sub-page listing\n    /// `options`.\n    Picker {\n        /// Available choices.\n        options: Vec<ProviderSettingOption>,\n    },\n}",
          "documentation": "Categorical kind of a provider settings field."
        },
        {
          "name": "::ProviderSettingOption",
          "line": 160,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct ProviderSettingOption {\npub id: String,\npub label: String,\npub description: String\n}",
          "documentation": "One option of a [`ProviderSettingKind::Picker`] field."
        },
        {
          "name": "::FlocksCli",
          "line": 168,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct FlocksCli {\n/// Stable identifier (e.g. `\"claude-code\"`, `\"codex\"`, `\"gemini-cli\"`).\n\npub id: String,\n/// User-visible name.\n\npub name: String,\n/// Path or command resolved by the runtime.\n\npub command: String,\n/// Models this CLI can drive.\n\npub models: Vec<ModelInfo>,\n/// `true` when this CLI is the currently-selected Flocks driver.\n\npub active: bool\n}",
          "documentation": "One CLI binary that a Flocks provider can drive."
        },
        {
          "name": "::SettingsSnapshot",
          "line": 185,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\npub struct SettingsSnapshot {\n/// Provider catalogue (Flocks / Foundry / Forge / Direct \u2026).\n\npub providers: Vec<ProviderInfo>,\n/// Mode catalogue (Build / Plan / Auto / Read \u2026).\n\npub modes: Vec<ModeInfo>,\n/// Flat list of every model the adapter knows about, *including*\n\n/// the models exposed by Flocks CLIs. Each `ModelInfo` carries\n\n/// its `provider_id` so the palette can filter by provider.\n\n/// Adapters that only support Flocks may leave this empty and\n\n/// rely on `flocks_clis` instead.\n\n#[serde(default)]\npub models: Vec<ModelInfo>,\n/// Flocks-CLI catalogue (each CLI carries its own model list).\n\npub flocks_clis: Vec<FlocksCli>,\n/// Per-provider configurable fields keyed by `provider_id`. The\n\n/// palette renders this as the \"Settings\" tab on each provider's\n\n/// drill-in. Adapters typically populate this from Forge's\n\n/// `ProviderSettings` introspection.\n\n#[serde(default)]\npub provider_settings: std::collections::HashMap<String, Vec<ProviderSettingField>>\n}",
          "documentation": "A complete snapshot of every settings dimension. Adapters return\nthis on demand so the palette can render the same data\nconsistently across pages."
        },
        {
          "name": "::SettingsAction",
          "line": 211,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(tag = \"kind\", rename_all = \"kebab-case\")]\npub enum SettingsAction {\n    /// Swap to a different provider. Adapter is expected to re-route\n    /// future `send_message` calls.\n    SetProvider { provider_id: String },\n    /// Swap to a model on the currently-active provider.\n    SetModel {\n        provider_id: String,\n        model_id: String,\n    },\n    /// Activate a mode (which may in turn change provider+model).\n    SetMode { mode_id: String },\n    /// Configure Flocks to drive a specific CLI.\n    SetFlocksCli { cli_id: String },\n    /// Configure a model for a specific Flocks CLI.\n    SetFlocksCliModel { cli_id: String, model_id: String },\n    /// Update a provider configuration field (api key, base URL,\n    /// timeout, etc.). The adapter validates the value and may\n    /// reject it via [`SettingsApplyResult::fail`].\n    SetProviderSetting {\n        provider_id: String,\n        field_id: String,\n        value: String,\n    },\n    /// Open a settings sub-page that the adapter may want to handle\n    /// out-of-band (e.g. opening an external editor).\n    OpenSubPage { page_id: String },\n}",
          "documentation": "Action the runtime asks the adapter to apply when the user picks\nan entry in the palette."
        },
        {
          "name": "::SettingsApplyResult",
          "line": 241,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct SettingsApplyResult {\n/// Whether the action succeeded.\n\npub ok: bool,\n/// Optional human-readable status message (shown as a flash).\n\npub message: Option<String>\n}",
          "documentation": "Outcome of applying a [`SettingsAction`]."
        },
        {
          "name": "::SettingsApplyResult::ok",
          "line": 251,
          "signature": "#[must_use]\npub fn ok() -> Self;",
          "documentation": "Convenience: success without a message."
        },
        {
          "name": "::SettingsApplyResult::ok_with",
          "line": 260,
          "signature": "#[must_use]\npub fn ok_with(message: impl Into<String>) -> Self;",
          "documentation": "Convenience: success with a status flash."
        },
        {
          "name": "::SettingsApplyResult::fail",
          "line": 269,
          "signature": "#[must_use]\npub fn fail(message: impl Into<String>) -> Self;",
          "documentation": "Convenience: failure with a reason."
        }
      ]
    },
    {
      "path": "harness-sdk/src/types.rs",
      "sha256": "38855a6544b96ba94c773619f0eb2d360cfbbc542da64c63e389a82f2b6b2830",
      "artifactSha256": "2d442c9f3a5971f865493bd2a1ed06fe72b1ada789275d3ddfe93aee6765bbe6",
      "url": "/reference/source/harness-sdk/src/types.rs.txt",
      "declarations": [
        {
          "name": "::MAX_AGENT_ID_LEN",
          "line": 27,
          "signature": "pub const MAX_AGENT_ID_LEN: usize;",
          "documentation": "Maximum length of an agent ID."
        },
        {
          "name": "::MAX_AGENT_NAME_LEN",
          "line": 30,
          "signature": "pub const MAX_AGENT_NAME_LEN: usize;",
          "documentation": "Maximum length of an agent name."
        },
        {
          "name": "::MAX_CHUNK_SIZE",
          "line": 33,
          "signature": "pub const MAX_CHUNK_SIZE: usize;",
          "documentation": "Maximum size of a single text delta chunk in bytes."
        },
        {
          "name": "::MAX_TOOL_INPUT_SIZE",
          "line": 36,
          "signature": "pub const MAX_TOOL_INPUT_SIZE: usize;",
          "documentation": "Maximum size of tool call input JSON in bytes."
        },
        {
          "name": "::MAX_INTERJECTION_LEN",
          "line": 39,
          "signature": "pub const MAX_INTERJECTION_LEN: usize;",
          "documentation": "Maximum length of an interjection in characters."
        },
        {
          "name": "::DEFAULT_STREAM_TIMEOUT",
          "line": 42,
          "signature": "pub const DEFAULT_STREAM_TIMEOUT: Duration;",
          "documentation": "Default adapter stream timeout."
        },
        {
          "name": "::DEFAULT_MAX_MESSAGES",
          "line": 45,
          "signature": "pub const DEFAULT_MAX_MESSAGES: usize;",
          "documentation": "Maximum number of messages per session (default)."
        },
        {
          "name": "::Mode",
          "line": 66,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum Mode {\n    /// Interactive chat mode \u2014 user sends messages, agent responds.\n    Chat,\n    /// Autonomous execution mode \u2014 agent works independently with interjections.\n    Autonomy,\n    /// Transient state while draining autonomy events and cleaning up.\n    Stopping,\n}",
          "documentation": "The current operating mode of the TUI application.\n\nThe SDK supports two primary modes with a transient stopping state.\n\n# Examples\n\n```\nuse harness_sdk::Mode;\n\nlet mode = Mode::Chat;\nassert_eq!(mode.label(), \"Chat\");\nassert!(!mode.is_autonomy());\n```"
        },
        {
          "name": "::Mode::label",
          "line": 85,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label for this mode.\n\n# Examples\n\n```\nuse harness_sdk::Mode;\nassert_eq!(Mode::Autonomy.label(), \"Autonomy\");\n```"
        },
        {
          "name": "::Mode::is_autonomy",
          "line": 104,
          "signature": "#[must_use]\npub const fn is_autonomy(&self) -> bool;",
          "documentation": "Returns `true` if in autonomy or stopping mode.\n\n# Examples\n\n```\nuse harness_sdk::Mode;\nassert!(Mode::Autonomy.is_autonomy());\nassert!(Mode::Stopping.is_autonomy());\nassert!(!Mode::Chat.is_autonomy());\n```"
        },
        {
          "name": "::SdkRole",
          "line": 134,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum SdkRole {\n    /// A human end-user.\n    User,\n    /// An AI agent, optionally identified by name.\n    Agent(String),\n    /// A system-generated message.\n    System,\n    /// Output from a tool invocation.\n    Tool,\n}",
          "documentation": "The role of a message participant, carrying optional agent identity.\n\nUnlike Kit's `Role`, the SDK role can carry the agent's name for multi-agent\nscenarios where knowing *which* agent sent a message matters.\n\n# Examples\n\n```\nuse harness_sdk::SdkRole;\n\nlet role = SdkRole::Agent(\"Navigator\".into());\nassert_eq!(role.label(), \"Agent\");\n```"
        },
        {
          "name": "::SdkRole::label",
          "line": 156,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label for this role (without the agent name).\n\n# Examples\n\n```\nuse harness_sdk::SdkRole;\nassert_eq!(SdkRole::User.label(), \"User\");\nassert_eq!(SdkRole::Agent(\"x\".into()).label(), \"Agent\");\n```"
        },
        {
          "name": "::SdkRole::to_kit_role",
          "line": 177,
          "signature": "#[must_use]\npub fn to_kit_role(&self) -> harness_tui_kit::Role;",
          "documentation": "Convert to Kit's `Role` enum, discarding the agent name.\n\n# Examples\n\n```\nuse harness_sdk::SdkRole;\nuse harness_tui_kit::Role;\n\nassert_eq!(SdkRole::User.to_kit_role(), Role::User);\nassert_eq!(SdkRole::Agent(\"x\".into()).to_kit_role(), Role::Agent);\n```"
        },
        {
          "name": "::SdkRole::agent_name",
          "line": 196,
          "signature": "#[must_use]\npub fn agent_name(&self) -> &str;",
          "documentation": "Returns the agent name if this is an Agent role, empty string otherwise.\n\n# Examples\n\n```\nuse harness_sdk::SdkRole;\nassert_eq!(SdkRole::Agent(\"Nav\".into()).agent_name(), \"Nav\");\nassert_eq!(SdkRole::User.agent_name(), \"\");\n```"
        },
        {
          "name": "::SdkAgentInfo",
          "line": 232,
          "signature": "#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]\npub struct SdkAgentInfo {\n/// Unique identifier for this agent.\n\npub id: String,\n/// Human-readable display name.\n\npub name: String,\n/// Short description of the agent's role or purpose.\n\npub role_description: String,\n/// Model identifier (e.g., \"claude-opus-4-6\").\n\npub model: String,\n/// Current lifecycle status.\n\npub status: SdkAgentStatus,\n/// Capabilities this agent supports.\n\npub capabilities: Vec<String>,\n/// Tools available to this agent.\n\npub tools: Vec<String>,\n/// Additional metadata (adapter-specific, not logged at INFO+).\n\npub metadata: std::collections::HashMap<String, String>\n}",
          "documentation": "Rich agent metadata used by the SDK.\n\nCarries capability information and tool lists beyond what the Kit needs\nfor rendering. Use [`to_kit_agent_info`](SdkAgentInfo::to_kit_agent_info)\nfor rendering conversion.\n\n# Examples\n\n```\nuse harness_sdk::SdkAgentInfo;\n\nlet info = SdkAgentInfo::new(\"agent-1\", \"Navigator\", \"claude-opus-4-6\");\nassert_eq!(info.name, \"Navigator\");\n```"
        },
        {
          "name": "::SdkAgentInfo::new",
          "line": 266,
          "signature": "#[must_use]\npub fn new(id: impl Into<String>, name: impl Into<String>, model: impl Into<String>) -> Self;",
          "documentation": "Create a new agent info with required fields.\n\nStatus defaults to `Online`, capabilities/tools/metadata are empty.\n\n# Examples\n\n```\nuse harness_sdk::{SdkAgentInfo, SdkAgentStatus};\n\nlet info = SdkAgentInfo::new(\"a1\", \"Coder\", \"gpt-4o\");\nassert_eq!(info.status, SdkAgentStatus::Online);\nassert!(info.capabilities.is_empty());\n```"
        },
        {
          "name": "::SdkAgentInfo::with_role",
          "line": 281,
          "signature": "#[must_use]\npub fn with_role(mut self, role: impl Into<String>) -> Self;",
          "documentation": "Set the role description (builder pattern)."
        },
        {
          "name": "::SdkAgentInfo::with_status",
          "line": 288,
          "signature": "#[must_use]\npub fn with_status(mut self, status: SdkAgentStatus) -> Self;",
          "documentation": "Set the status (builder pattern)."
        },
        {
          "name": "::SdkAgentInfo::with_capabilities",
          "line": 295,
          "signature": "#[must_use]\npub fn with_capabilities(mut self, caps: Vec<String>) -> Self;",
          "documentation": "Set capabilities (builder pattern)."
        },
        {
          "name": "::SdkAgentInfo::with_tools",
          "line": 302,
          "signature": "#[must_use]\npub fn with_tools(mut self, tools: Vec<String>) -> Self;",
          "documentation": "Set tools (builder pattern)."
        },
        {
          "name": "::SdkAgentInfo::to_kit_agent_info",
          "line": 320,
          "signature": "#[must_use]\npub fn to_kit_agent_info(&self) -> harness_tui_kit::AgentInfo;",
          "documentation": "Convert to Kit's `AgentInfo` for rendering.\n\n# Examples\n\n```\nuse harness_sdk::SdkAgentInfo;\n\nlet sdk_info = SdkAgentInfo::new(\"a1\", \"Nav\", \"gpt-4o\");\nlet kit_info = sdk_info.to_kit_agent_info();\nassert_eq!(kit_info.name, \"Nav\");\nassert_eq!(kit_info.model, \"gpt-4o\");\n```"
        },
        {
          "name": "::SdkAgentStatus",
          "line": 345,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum SdkAgentStatus {\n    /// Connected and ready.\n    #[default]\n    Online,\n    /// Actively executing.\n    Working,\n    /// Reasoning/planning.\n    Thinking,\n    /// Connected, no pending work.\n    Idle,\n    /// Blocked on external resource or human.\n    Waiting,\n    /// Encountered an error.\n    Error,\n    /// Permanently shut down.\n    Terminated,\n    /// Disconnected/unreachable.\n    Offline,\n}",
          "documentation": "Agent lifecycle status with SDK-specific semantics.\n\nMaps directly to Kit's `AgentStatus` for rendering.\n\n# Examples\n\n```\nuse harness_sdk::SdkAgentStatus;\n\nlet status = SdkAgentStatus::Working;\nassert!(status.is_active());\n```"
        },
        {
          "name": "::SdkAgentStatus::label",
          "line": 368,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::SdkAgentStatus::is_active",
          "line": 383,
          "signature": "#[must_use]\npub const fn is_active(&self) -> bool;",
          "documentation": "Returns `true` if the agent is performing work."
        },
        {
          "name": "::SdkAgentStatus::is_terminal",
          "line": 389,
          "signature": "#[must_use]\npub const fn is_terminal(&self) -> bool;",
          "documentation": "Returns `true` if the agent has reached a final state."
        },
        {
          "name": "::SdkAgentStatus::to_kit_status",
          "line": 395,
          "signature": "#[must_use]\npub fn to_kit_status(&self) -> harness_tui_kit::AgentStatus;",
          "documentation": "Convert to Kit's `AgentStatus`."
        },
        {
          "name": "::ResponseChunk",
          "line": 446,
          "signature": "#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(tag = \"type\", rename_all = \"snake_case\")]\npub enum ResponseChunk {\n    /// A fragment of the agent's text response.\n    TextDelta {\n        /// The text fragment.\n        text: String,\n        /// The agent that produced this text.\n        agent_id: String,\n    },\n\n    /// A tool call has started.\n    ToolCallStart {\n        /// Unique ID for this tool call.\n        call_id: String,\n        /// Tool name.\n        tool_name: String,\n        /// Tool input (JSON).\n        input: String,\n        /// The agent making the tool call.\n        agent_id: String,\n    },\n\n    /// A tool call has completed.\n    ToolCallEnd {\n        /// Unique ID matching the `ToolCallStart`.\n        call_id: String,\n        /// Tool output.\n        output: String,\n        /// Whether the tool call succeeded.\n        success: bool,\n        /// Wall-clock duration in milliseconds.\n        duration_ms: u64,\n    },\n\n    /// A fragment of the agent's thinking/reasoning (if exposed).\n    ThinkingDelta {\n        /// The thinking text fragment.\n        text: String,\n        /// The agent that is thinking.\n        agent_id: String,\n    },\n\n    /// The agent's status has changed.\n    StatusChange {\n        /// The agent whose status changed.\n        agent_id: String,\n        /// The new status.\n        status: SdkAgentStatus,\n    },\n\n    /// An approval is needed from the user.\n    ApprovalNeeded {\n        /// The approval request details.\n        request: SdkApprovalRequest,\n    },\n\n    /// A cost/usage update.\n    UsageUpdate {\n        /// Input tokens consumed.\n        input_tokens: u64,\n        /// Output tokens consumed.\n        output_tokens: u64,\n        /// Estimated cost in USD (cents).\n        cost_cents: f64,\n    },\n\n    /// The response stream has ended successfully.\n    Done {\n        /// The agent that finished.\n        agent_id: String,\n    },\n\n    /// The response stream ended with an error.\n    Error {\n        /// Error message.\n        message: String,\n        /// The agent that errored (if known).\n        agent_id: String,\n    },\n}",
          "documentation": "A single chunk from an adapter's response stream.\n\nResponse streams are the primary communication channel from adapters to\nthe SDK. Each variant represents a different kind of response data.\n\n# Stream Protocol\n\nA well-formed response stream follows this pattern:\n1. Zero or more `TextDelta`, `ToolCallStart`, `ToolCallEnd`, `ThinkingDelta`\n2. Exactly one `Done` or `Error` at the end\n\nThe SDK enforces a timeout if `Done`/`Error` is not received within\nthe configured duration (default: 5 minutes).\n\n# Examples\n\n```\nuse harness_sdk::ResponseChunk;\n\nlet chunk = ResponseChunk::TextDelta {\n    text: \"Hello, \".into(),\n    agent_id: \"agent-1\".into(),\n};\nassert!(matches!(chunk, ResponseChunk::TextDelta { .. }));\n```"
        },
        {
          "name": "::AutonomyEvent",
          "line": 548,
          "signature": "#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(tag = \"type\", rename_all = \"snake_case\")]\npub enum AutonomyEvent {\n    /// An activity log entry from an agent.\n    ActivityLog {\n        /// The agent producing this log.\n        agent_id: String,\n        /// Log message.\n        message: String,\n        /// Severity level.\n        level: ActivityLevel,\n    },\n\n    /// An agent's status changed during autonomy.\n    AgentStatusChange {\n        /// The agent whose status changed.\n        agent_id: String,\n        /// The new status.\n        status: SdkAgentStatus,\n    },\n\n    /// An agent needs approval to proceed.\n    ApprovalRequired {\n        /// The approval request.\n        request: SdkApprovalRequest,\n    },\n\n    /// A previously requested approval was resolved (by timeout or cancel).\n    ApprovalResolved {\n        /// The approval request ID.\n        request_id: String,\n        /// How it was resolved.\n        resolution: String,\n    },\n\n    /// A task was created or updated.\n    TaskUpdate {\n        /// Task identifier.\n        task_id: String,\n        /// Task title.\n        title: String,\n        /// Task status.\n        status: String,\n        /// The agent working on this task.\n        agent_id: String,\n    },\n\n    /// Metrics/usage update during autonomy.\n    MetricsUpdate {\n        /// Total input tokens.\n        total_input_tokens: u64,\n        /// Total output tokens.\n        total_output_tokens: u64,\n        /// Total cost in USD cents.\n        total_cost_cents: f64,\n        /// Elapsed time in seconds.\n        elapsed_secs: u64,\n    },\n\n    /// Autonomy session has ended.\n    SessionEnded {\n        /// Reason for ending.\n        reason: String,\n    },\n\n    /// Error during autonomy (non-fatal).\n    Error {\n        /// The agent that errored.\n        agent_id: String,\n        /// Error message.\n        message: String,\n    },\n}",
          "documentation": "Events produced during autonomous execution.\n\nThe adapter emits these events while the agent works independently.\nThe SDK displays them in the activity feed and handles approval requests.\n\n# Examples\n\n```\nuse harness_sdk::AutonomyEvent;\n\nlet event = AutonomyEvent::ActivityLog {\n    agent_id: \"agent-1\".into(),\n    message: \"Reading file...\".into(),\n    level: harness_sdk::ActivityLevel::Info,\n};\n```"
        },
        {
          "name": "::ActivityLevel",
          "line": 630,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum ActivityLevel {\n    /// Trace-level detail.\n    Trace,\n    /// Debug information.\n    Debug,\n    /// General information.\n    #[default]\n    Info,\n    /// Warning condition.\n    Warn,\n    /// Error condition.\n    Error,\n}",
          "documentation": "Severity level for autonomy activity log entries.\n\n# Examples\n\n```\nuse harness_sdk::ActivityLevel;\nassert_eq!(ActivityLevel::Info.label(), \"INFO\");\n```"
        },
        {
          "name": "::ActivityLevel::label",
          "line": 647,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::ActivityLevel::to_kit_log_level",
          "line": 659,
          "signature": "#[must_use]\npub fn to_kit_log_level(&self) -> harness_tui_kit::LogLevel;",
          "documentation": "Convert to Kit's `LogLevel`."
        },
        {
          "name": "::SdkApprovalRequest",
          "line": 695,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct SdkApprovalRequest {\n/// Unique identifier for this request.\n\npub id: String,\n/// Name of the agent requesting approval.\n\npub agent_name: String,\n/// ID of the agent requesting approval.\n\npub agent_id: String,\n/// Short summary of the proposed action.\n\npub action_summary: String,\n/// Detailed reasoning for the action.\n\npub reasoning: String,\n/// Expected impact description.\n\npub impact: String,\n/// Resources affected by the action.\n\npub resources: Vec<String>,\n/// Assessed risk level.\n\npub risk_level: SdkRiskLevel,\n/// ISO-8601 timestamp of when the request was created.\n\npub created_at: String\n}",
          "documentation": "A request for human approval during autonomous execution.\n\nRicher than Kit's `ApprovalRequest` \u2014 includes reasoning and impact fields\nfor the SDK's approval management system.\n\n# Examples\n\n```\nuse harness_sdk::{SdkApprovalRequest, SdkRiskLevel};\n\nlet req = SdkApprovalRequest::new(\"req-1\", \"Navigator\", \"Delete build directory\")\n    .with_risk_level(SdkRiskLevel::High);\nassert!(req.risk_level.requires_review());\n```"
        },
        {
          "name": "::SdkApprovalRequest::new",
          "line": 719,
          "signature": "#[must_use]\npub fn new(\n        id: impl Into<String>,\n        agent_name: impl Into<String>,\n        action_summary: impl Into<String>,\n    ) -> Self;",
          "documentation": "Create a new approval request with required fields."
        },
        {
          "name": "::SdkApprovalRequest::with_agent_id",
          "line": 739,
          "signature": "#[must_use]\npub fn with_agent_id(mut self, agent_id: impl Into<String>) -> Self;",
          "documentation": "Set the agent ID (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::with_risk_level",
          "line": 746,
          "signature": "#[must_use]\npub fn with_risk_level(mut self, risk_level: SdkRiskLevel) -> Self;",
          "documentation": "Set the risk level (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::with_reasoning",
          "line": 753,
          "signature": "#[must_use]\npub fn with_reasoning(mut self, reasoning: impl Into<String>) -> Self;",
          "documentation": "Set the reasoning (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::with_impact",
          "line": 760,
          "signature": "#[must_use]\npub fn with_impact(mut self, impact: impl Into<String>) -> Self;",
          "documentation": "Set the impact (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::with_resources",
          "line": 767,
          "signature": "#[must_use]\npub fn with_resources(mut self, resources: Vec<String>) -> Self;",
          "documentation": "Set the resources (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::with_created_at",
          "line": 774,
          "signature": "#[must_use]\npub fn with_created_at(mut self, created_at: impl Into<String>) -> Self;",
          "documentation": "Set the created_at timestamp (builder pattern)."
        },
        {
          "name": "::SdkApprovalRequest::to_kit_approval_request",
          "line": 781,
          "signature": "#[must_use]\npub fn to_kit_approval_request(&self) -> harness_tui_kit::ApprovalRequest;",
          "documentation": "Convert to Kit's `ApprovalRequest` for rendering."
        },
        {
          "name": "::SdkRiskLevel",
          "line": 807,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum SdkRiskLevel {\n    /// Low risk, routine action.\n    #[default]\n    Low,\n    /// Medium risk, warrants attention.\n    Medium,\n    /// High risk, requires careful review.\n    High,\n    /// Critical risk, potentially destructive.\n    Critical,\n}",
          "documentation": "Risk level for approval requests.\n\n# Examples\n\n```\nuse harness_sdk::SdkRiskLevel;\n\nassert!(SdkRiskLevel::Critical.requires_review());\nassert!(!SdkRiskLevel::Low.requires_review());\nassert_eq!(SdkRiskLevel::High.weight(), 2);\n```"
        },
        {
          "name": "::SdkRiskLevel::label",
          "line": 822,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::SdkRiskLevel::requires_review",
          "line": 833,
          "signature": "#[must_use]\npub const fn requires_review(&self) -> bool;",
          "documentation": "Returns `true` if this risk level requires explicit review."
        },
        {
          "name": "::SdkRiskLevel::weight",
          "line": 839,
          "signature": "#[must_use]\npub const fn weight(&self) -> u8;",
          "documentation": "Numeric weight for sorting (higher = more risky)."
        },
        {
          "name": "::SdkRiskLevel::to_kit_risk_level",
          "line": 850,
          "signature": "#[must_use]\npub fn to_kit_risk_level(&self) -> harness_tui_kit::RiskLevel;",
          "documentation": "Convert to Kit's `RiskLevel`."
        },
        {
          "name": "::SdkApprovalAction",
          "line": 882,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum SdkApprovalAction {\n    /// Approve the request as-is.\n    Approve,\n    /// Deny the request.\n    Deny,\n    /// Approve with modifications.\n    Edit {\n        /// Description of the modification.\n        modification: String,\n    },\n}",
          "documentation": "User decision on an approval request.\n\n# Examples\n\n```\nuse harness_sdk::SdkApprovalAction;\n\nlet action = SdkApprovalAction::Approve;\nassert!(action.is_approved());\n```"
        },
        {
          "name": "::SdkApprovalAction::is_approved",
          "line": 897,
          "signature": "#[must_use]\npub fn is_approved(&self) -> bool;",
          "documentation": "Returns `true` if this action approves (with or without edits)."
        },
        {
          "name": "::SdkApprovalAction::to_kit_approval_action",
          "line": 903,
          "signature": "#[must_use]\npub fn to_kit_approval_action(&self) -> harness_tui_kit::ApprovalAction;",
          "documentation": "Convert to Kit's `ApprovalAction`."
        },
        {
          "name": "::HumanInterjection",
          "line": 938,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct HumanInterjection {\n/// Original raw input text.\n\npub raw: String,\n/// Cleaned text content (prefix markers stripped).\n\npub text: String,\n/// Priority level.\n\npub priority: InterjectionPriority,\n/// Kind of interjection.\n\npub kind: InterjectionKind,\n/// Target agent name, if specified (via `@Agent` syntax).\n\npub target: Option<String>\n}",
          "documentation": "A parsed human interjection for autonomy mode.\n\nInterjections are structured messages that the user sends during autonomous\nexecution. They carry priority, kind, and optional targeting information.\n\n# Examples\n\n```\nuse harness_sdk::{HumanInterjection, InterjectionPriority, InterjectionKind};\n\nlet interj = HumanInterjection {\n    raw: \"!!stop now\".into(),\n    text: \"stop now\".into(),\n    priority: InterjectionPriority::Urgent,\n    kind: InterjectionKind::Instruction,\n    target: None,\n};\nassert!(interj.is_urgent());\n```"
        },
        {
          "name": "::HumanInterjection::is_urgent",
          "line": 954,
          "signature": "#[must_use]\npub fn is_urgent(&self) -> bool;",
          "documentation": "Returns `true` if this is an urgent interjection."
        },
        {
          "name": "::HumanInterjection::is_targeted",
          "line": 960,
          "signature": "#[must_use]\npub fn is_targeted(&self) -> bool;",
          "documentation": "Returns `true` if this interjection targets a specific agent."
        },
        {
          "name": "::HumanInterjection::is_broadcast",
          "line": 966,
          "signature": "#[must_use]\npub fn is_broadcast(&self) -> bool;",
          "documentation": "Returns `true` if this is a broadcast (no specific target)."
        },
        {
          "name": "::InterjectionPriority",
          "line": 981,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum InterjectionPriority {\n    /// Standard priority.\n    #[default]\n    Normal,\n    /// High priority \u2014 should interrupt current work.\n    High,\n    /// Urgent \u2014 must be processed immediately.\n    Urgent,\n}",
          "documentation": "Priority level for human interjections.\n\n# Examples\n\n```\nuse harness_sdk::InterjectionPriority;\nassert_eq!(InterjectionPriority::Urgent.label(), \"URGENT\");\n```"
        },
        {
          "name": "::InterjectionPriority::label",
          "line": 994,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::InterjectionKind",
          "line": 1019,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum InterjectionKind {\n    /// A direct instruction to the agent(s).\n    #[default]\n    Instruction,\n    /// A question for the agent(s).\n    Question,\n    /// A new mission directive.\n    Mission,\n    /// A general message or comment.\n    Message,\n}",
          "documentation": "The kind of human interjection.\n\n# Examples\n\n```\nuse harness_sdk::InterjectionKind;\nassert_eq!(InterjectionKind::Mission.label(), \"Mission\");\n```"
        },
        {
          "name": "::InterjectionKind::label",
          "line": 1034,
          "signature": "#[must_use]\npub const fn label(&self) -> &'static str;",
          "documentation": "Human-readable label."
        },
        {
          "name": "::InterjectionAck",
          "line": 1068,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct InterjectionAck {\n/// Whether the adapter accepted the interjection.\n\npub received: bool,\n/// Optional message from the adapter.\n\npub message: String\n}",
          "documentation": "Acknowledgement from the adapter that an interjection was received.\n\n# Examples\n\n```\nuse harness_sdk::InterjectionAck;\n\nlet ack = InterjectionAck {\n    received: true,\n    message: \"Processing...\".into(),\n};\nassert!(ack.received);\n```"
        },
        {
          "name": "::AdapterCapabilities",
          "line": 1094,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct AdapterCapabilities {\n/// Supports chat mode.\n\npub chat: bool,\n/// Supports autonomy mode.\n\npub autonomy: bool,\n/// Supports multi-agent operations.\n\npub multi_agent: bool,\n/// Supports usage/cost metrics.\n\npub metrics: bool,\n/// Supports streaming responses.\n\npub streaming: bool,\n/// Supports tool calls.\n\npub tool_calls: bool,\n/// Supports thinking/reasoning display.\n\npub thinking: bool\n}",
          "documentation": "Capabilities reported by an adapter implementation.\n\nThe SDK checks these flags before calling optional adapter methods.\nIf a capability is `false`, the corresponding features are disabled in the UI.\n\n# Examples\n\n```\nuse harness_sdk::AdapterCapabilities;\n\nlet caps = AdapterCapabilities::chat_only();\nassert!(caps.chat);\nassert!(!caps.autonomy);\n```"
        },
        {
          "name": "::AdapterCapabilities::chat_only",
          "line": 1114,
          "signature": "#[must_use]\npub fn chat_only() -> Self;",
          "documentation": "Create capabilities for a chat-only adapter."
        },
        {
          "name": "::AdapterCapabilities::full",
          "line": 1128,
          "signature": "#[must_use]\npub fn full() -> Self;",
          "documentation": "Create full capabilities."
        },
        {
          "name": "::SessionInfo",
          "line": 1162,
          "signature": "#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]\npub struct SessionInfo {\n/// Unique session identifier.\n\npub id: String,\n/// ISO-8601 timestamp of session start.\n\npub started_at: String,\n/// Total messages in this session.\n\npub message_count: usize,\n/// Total input tokens consumed.\n\npub total_input_tokens: u64,\n/// Total output tokens consumed.\n\npub total_output_tokens: u64,\n/// Total estimated cost in USD cents.\n\npub total_cost_cents: f64,\n/// Elapsed duration.\n\npub elapsed: Duration\n}",
          "documentation": "Information about the current TUI session.\n\n# Examples\n\n```\nuse harness_sdk::SessionInfo;\n\nlet session = SessionInfo::new(\"session-1\");\nassert_eq!(session.message_count, 0);\n```"
        },
        {
          "name": "::SessionInfo::new",
          "line": 1182,
          "signature": "#[must_use]\npub fn new(id: impl Into<String>) -> Self;",
          "documentation": "Create a new session info."
        }
      ]
    },
    {
      "path": "harness-sdk/src/validation/adapter_output.rs",
      "sha256": "44de2c25e7bc8f0d2f91279e3ae99a83f2e4c5dd18781e1211e1e97c0b64acfe",
      "artifactSha256": "eadc9f90f467c69734720dd549d53d4c4ae45e9b581f6e73384e0313ff0c557e",
      "url": "/reference/source/harness-sdk/src/validation/adapter_output.rs.txt",
      "declarations": [
        {
          "name": "::validate_agent_info",
          "line": 36,
          "signature": "pub fn validate_agent_info(info: &SdkAgentInfo) -> Result<(), SdkError>;",
          "documentation": "Validate an agent info from adapter output.\n\n# Errors\n\nReturns `SdkError::InvalidAdapterOutput` if:\n- `id` is empty or exceeds `MAX_AGENT_ID_LEN`\n- `name` is empty or exceeds `MAX_AGENT_NAME_LEN`\n- `id` contains invalid characters (must be alphanumeric, hyphens, underscores)"
        },
        {
          "name": "::validate_response_chunk",
          "line": 77,
          "signature": "pub fn validate_response_chunk(chunk: &ResponseChunk) -> Result<(), SdkError>;",
          "documentation": "Validate a response chunk from adapter output.\n\n# Errors\n\nReturns `SdkError::InvalidAdapterOutput` if:\n- `TextDelta.text` exceeds `MAX_CHUNK_SIZE`\n- `ToolCallStart.input` exceeds `MAX_TOOL_INPUT_SIZE`\n- `ToolCallStart.call_id` or `tool_name` is empty\n- Any `agent_id` is empty"
        },
        {
          "name": "::validate_approval_request",
          "line": 153,
          "signature": "pub fn validate_approval_request(request: &SdkApprovalRequest) -> Result<(), SdkError>;",
          "documentation": "Validate an approval request from adapter output.\n\n# Errors\n\nReturns `SdkError::InvalidAdapterOutput` if `id` or `agent_name` is empty."
        }
      ]
    },
    {
      "path": "harness-sdk/src/validation/mod.rs",
      "sha256": "f68e61bb4f5f2adb1306fa1e7b17ef0c37df37c1505c573c4da6a4f98ee458fe",
      "artifactSha256": "6a25cc4e575af7b13885ba37c8808f9d805c1d0a3dc3b0185b7eaa7eb5cfc985",
      "url": "/reference/source/harness-sdk/src/validation/mod.rs.txt",
      "declarations": [
        {
          "name": "adapter_output",
          "line": 7,
          "signature": "pub mod adapter_output;",
          "documentation": "Validation for adapter output and SDK data.\n\nAll data from adapters is untrusted. This module provides validation\nfunctions that enforce length limits, format constraints, and sanitization\nbefore data is used by the SDK or rendered by Kit components."
        }
      ]
    },
    {
      "path": "harness-sdk/src/workspace.rs",
      "sha256": "3142baaee48d33dde5ddca7bc5e33bd41205b9937dc915f4e0bb29831d21cb11",
      "artifactSha256": "3404fc1f22080198db1aef6c6d1bdb192d0d05b30b1fa8e0b2c7cc11f69dc8aa",
      "url": "/reference/source/harness-sdk/src/workspace.rs.txt",
      "declarations": [
        {
          "name": "::complete_workspace_paths",
          "line": 31,
          "signature": "#[must_use]\npub fn complete_workspace_paths(\n    workspace_root: &Path,\n    prefix: &str,\n    max_results: usize,\n) -> Vec<String>;",
          "documentation": "Up to `max_results` workspace-relative path matches for an\n`@<prefix>` token.\n\nResolution rules:\n- Empty / fuzzy prefix \u2192 top-level entries of the workspace root.\n- `./<rest>` \u2192 entries directly under the workspace root, filtered\n  by `<rest>`.\n- `../<rest>` (any depth) \u2192 walks up that many parents from the\n  workspace root, then filters by `<rest>`.\n- `/<abs>` \u2192 absolute filesystem search starting at `/<abs>`'s\n  parent.\n- Otherwise: fuzzy match across the workspace, respecting\n  `.gitignore` (via `ignore::WalkBuilder`)."
        }
      ]
    }
  ]
}
