Expand description
KernelBackend trait for abstracting kaish’s I/O layer.
This module defines the KernelBackend trait which provides a unified interface
for file operations and tool dispatch. Two implementations are provided:
LocalBackend: Default implementation wrapping VfsRouter for local filesystem access- (Future)
KaijutsuBackend: CRDT-backed blocks when running under kaijutsu
§Architecture
Builtins (cat, ls, echo, etc.)
↓
ctx.backend: Arc<dyn KernelBackend>
↓
┌─────────────────────────────────────────────┐
│ LocalBackend (default) │ KaijutsuBackend │
│ - wraps VfsRouter │ - CRDT blocks │
│ - local ToolRegistry │ - parent tools │
└─────────────────────────────────────────────┘Structs§
- Conflict
Error - Error when CAS (compare-and-set) check fails during patching.
- Local
Backend - Local backend implementation using VfsRouter and ToolRegistry.
- Read
Range - Range specification for partial file reads.
- Tool
Info - Information about an available tool.
- Tool
Result - Result from tool execution via backend.
- Virtual
Overlay Backend - Backend that overlays virtual paths (
/v/*) on top of a custom backend.
Enums§
- Backend
Error - Backend operation errors.
- PatchOp
- Generic patch operation for file modifications.
- Write
Mode - Write mode for file operations.
Traits§
- Kernel
Backend - Abstract backend interface for file operations and tool dispatch.
Type Aliases§
- Backend
Result - Result type for backend operations.