Skip to main content

Crate kaish_kernel

Crate kaish_kernel 

Source
Expand description

kaish-kernel (核): The core of 会sh.

This crate provides:

  • Lexer: Tokenizes kaish source code using logos
  • Parser: Builds AST from tokens using chumsky
  • AST: Type definitions for the abstract syntax tree
  • Interpreter: Expression evaluation, scopes, and the $? result type
  • VFS: Virtual filesystem with mount points
  • Tools: Tool trait, registry, and builtin commands
  • Scheduler: Pipeline execution and background job management
  • Paths: XDG-compliant path helpers

Re-exports§

pub use backend::KernelBackend;
pub use backend::LocalBackend;
pub use backend::VirtualOverlayBackend;
pub use dispatch::BackendDispatcher;
pub use dispatch::CommandDispatcher;
pub use dispatch::PipelinePosition;
pub use ignore_config::IgnoreConfig;
pub use ignore_config::IgnoreScope;
pub use kernel::Kernel;
pub use kernel::KernelConfig;
pub use kernel::VfsMountMode;
pub use output_limit::OutputLimitConfig;
pub use vfs::FileStatus;
pub use vfs::GitVfs;
pub use vfs::LogEntry;
pub use vfs::StatusSummary;
pub use vfs::WorktreeInfo;
pub use scheduler::BoundedStream;
pub use scheduler::StreamStats;
pub use scheduler::DEFAULT_STREAM_MAX_SIZE;
pub use scheduler::drain_to_stream;
pub use vfs::JobFs;
pub use paths::home_dir;
pub use paths::xdg_cache_home;
pub use paths::xdg_config_home;
pub use paths::xdg_data_home;
pub use paths::xdg_runtime_dir;
pub use interpreter::expand_tilde;
pub use kaish_glob as glob_crate;

Modules§

arithmetic
Arithmetic expression evaluation for shell-style $(( )) expressions.
ast
Abstract Syntax Tree types for kaish.
backend
KernelBackend trait for abstracting kaish’s I/O layer.
dispatch
Command dispatch — the single execution path for all commands.
glob
Glob pattern matching (re-exported from kaish-glob).
help
Help system for kaish.
ignore_config
Configurable ignore file policy for file-walking tools.
interpreter
Interpreter module for kaish.
kernel
The Kernel (核) — the heart of kaish.
lexer
Lexer for kaish source code.
nonce
Confirmation nonce store for dangerous operations.
output_limit
Configurable output size limits for agent safety.
parser
Parser for kaish source code.
paths
XDG Base Directory paths for kaish and embedders.
scheduler
Scheduler module for kaish — pipelines, background jobs, and scatter/gather.
terminal
Terminal control and job control for interactive mode.
tools
Tool system for kaish.
validator
Pre-execution validation for kaish scripts.
vfs
Virtual Filesystem (VFS) for kaish.
walker
Recursive file walking infrastructure (re-exported from kaish-glob).

Structs§

ReadRange
Range specification for partial file reads.
ToolInfo
Information about an available tool.
ToolResult
Result from tool execution via backend.

Enums§

BackendError
Backend operation errors.
PatchOp
Generic patch operation for file modifications.
WriteMode
Write mode for file operations.

Type Aliases§

BackendResult
Result type for backend operations.