Skip to main content

Module kernel

Module kernel 

Source
Expand description

The Kernel (核) — the heart of kaish.

The Kernel owns and coordinates all core components:

  • Interpreter state (scope, $?)
  • Tool registry (builtins, user tools, MCP)
  • VFS router (mount points)
  • Job manager (background jobs)

§Architecture

┌────────────────────────────────────────────────────────────┐
│                         Kernel (核)                         │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────┐  │
│  │   Scope      │  │ ToolRegistry │  │  VfsRouter       │  │
│  │  (variables) │  │   (builtins, │  │  (mount points)  │  │
│  │              │  │    MCP, user)│  │                  │  │
│  └──────────────┘  └──────────────┘  └──────────────────┘  │
│  ┌──────────────────────────────┐  ┌──────────────────┐    │
│  │  JobManager (background)     │  │  ExecResult ($?) │    │
│  └──────────────────────────────┘  └──────────────────┘    │
└────────────────────────────────────────────────────────────┘

Structs§

Kernel
The Kernel (核) — executes kaish code.
KernelConfig
Configuration for kernel initialization.

Enums§

VfsMountMode
VFS mount mode determines how the local filesystem is exposed.