Skip to main content

Crate lds_core

Crate lds_core 

Source
Expand description

Core utilities shared across all lds modules.

Session lifecycle (Session, LdsState, SessionConfig, SessionError, CoreError) lives in the sibling lds-session crate and is re-exported here for backward compatibility — existing use lds_core::Session; etc. continues to work unchanged.

This crate retains cross-cutting helpers that do not belong to the session contract: binary probing (find_in_path, check_binaries, BinaryStatus), output truncation (truncate_output), config file handling (config module), and the in-memory log ring (log_store).

Modules§

config
First-class configuration for lds.
log_store
Generic in-memory log store with fixed capacity.

Structs§

BinaryStatus
Availability status for an external binary.
LdsState
Top-level mutable state for the MCP server.
Session
Immutable session state created by session_start.
SessionConfig
Configuration passed to Session::new. Optional fields fall back to sensible defaults (60s timeout, 100KB output limit).

Enums§

CoreError
Errors that can occur during session construction or access.
SessionError
Errors that can occur during a Session’s post-construction lifecycle.

Functions§

check_binaries
Check a set of external binaries and return their availability.
find_in_path
Check whether an executable is reachable via PATH.
truncate_output
Truncate byte output to max bytes, splitting into head + tail halves.