Skip to main content

Crate codewhale_runtime

Crate codewhale_runtime 

Source
Expand description

Codewhale runtime: the headless half of the runtime/TUI split.

Modules move here from crates/tui/src with git mv, in the order docs/design/TUI_DECONSTRUCTION.md records. The TUI reaches them through one path-alias block in its lib.rs, so moved code keeps its crate::<module> paths on both sides until the split deletes the alias.

This crate never depends on the terminal UI: no codewhale-tui, ratatui or crossterm (scripts/check-command-crate-boundaries.py).

Modules§

context_budget
Unified context-budget math for the TUI.
continual_harness
Durable, project-scoped state for the continual RLM harness.
elapsed
Shared user-visible elapsed/duration formatter.
fast_hash
features
Feature flags and metadata for codewhale.
goal_loop
Goal loop orchestrator — the persistent-objective control layer (#3215, and its lineage #891 / #1976 / #2058 / #2029).
hashing
host_terminal
The one port through which runtime code causes terminal side effects.
lane_control
Off-event-loop Lane control submission (#1888, #4022).
llm_response_cache
Small in-process cache for deterministic non-streaming chat responses.
logging
Lightweight verbose logging helpers for the CLI.
media_originals
Content-addressed store for pre-compression image originals.
model_context
Typed incremental ModelContext / WorldState fragments.
native_memory
Structured replacement for the old Markdown-backed native memory store. All existing entry points share root/store.sqlite3 with the Context Lens. MEMORY.md paths are legacy anchors, NOT an alternative source of truth. Capture is candidate-only. Human review is through authenticated Lens routes.
prompt_zones
Three-zone prompt contract types for prefix-cache stability (#2264).
regex_cache
Compiled-regex cache for patterns a user or model supplies (tool search, purge). Those patterns are untrusted input, so compilation is bounded: the pattern length is capped, the compiled program and lazy DFA have explicit size limits, compilation runs outside the cache lock, and a rejected pattern is remembered so repeating it costs a lookup.
resource_telemetry
Resource-usage telemetry for long-running CodeWhale tasks.
retry_status
Process-wide retry-state surface (#499).
runtime_policy
Normalization for Runtime mode and permission-posture wires.
safe_label
The allowlisted safe-label boundary for /preview-request (#1004).
session_tree
skill_state
Persistent enable/disable state shared by runtime/API Skill catalogs.
sleep_guard
Keep the host from idling into sleep while a turn is in flight.
startup_trace
Lightweight startup milestone tracing (#3757).
tool_history_repair
Deterministic integrity repair for persisted model-visible tool history.
workspace_discovery
Shared workspace discovery filters for UI path pickers and mentions.

Constants§

CODEWHALE_MAIN_STACK_BYTES