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 by explicit path, in the order docs/design/TUI_DECONSTRUCTION.md records. The TUI calls them by their codewhale_runtime::<module> paths; there is no alias block.

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

Modules§

active_workshop
artifacts
Session-scoped artifact metadata.
audit
Lightweight audit logging for sensitive operations.
browser
catalog_cache
child_env
Sanitized environment handling for child processes.
codex_model_roster
config
Configuration loading and defaults for codewhale.
config_keys
Which file owns a codewhale config set key, and which config.toml keys nothing reads (#6563).
config_persistence
Config file path resolution and TOML persistence helpers.
context_budget
Unified context-budget math for the TUI.
continual_harness
Durable, project-scoped state for the continual RLM harness.
credentials
Provider credentials: one type-tagged credential per provider, one write path, and one resolution result that names its source.
delivery_files
Updater-facing I/O over the existing Fleet file fence. No installation store.
dsh_credentials
Read-only DeepSeek Harness credential import.
elapsed
Shared user-visible elapsed/duration formatter.
external_credentials
Capability-gated I/O for credentials owned by another CLI.
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.
oauth
Codewhale-owned OAuth login and protected credential lifecycle. ChatGPT uses its official dynamic registration and direct inference grant. Providers are data rows in the parameter table below, not modules.
private_log
process_tree
Process-tree containment for a spawned child and everything it starts.
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.
retry_status
Process-wide retry-state surface (#499).
runtime_control
runtime_log
TUI runtime logging. Initializes a tracing-subscriber that writes to a per-process file under ~/.codewhale/logs/tui-YYYY-MM-DD-PID.log, and (on Unix and Windows) redirects the process’s stderr handle/fd to that same file for the lifetime of the alt-screen TUI.
runtime_policy
Normalization for Runtime mode and permission-posture wires.
safe_label
The allowlisted safe-label boundary for /preview-request (#1004).
session_diagnostics
Privacy-first session failure diagnostics (#2022).
session_tree
settings
Settings system - Persistent user preferences
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.
stall_report
startup_trace
Lightweight startup milestone tracing (#3757).
tool_history_repair
Deterministic integrity repair for persisted model-visible tool history.
tool_output_receipts
Tool-output pressure reported by /status.
turn_budget
Turn budgets shared by interactive hosts and headless execution.
working_set
Repo-aware working set tracking and prompt context packing.
workspace_discovery
Shared workspace discovery filters for UI path pickers and mentions.
workspace_lease
Workspace drive lease: at most one driving engine per workspace, process-wide.
workspace_trust
Per-workspace trust list of external paths the agent may read/write without triggering a PathEscape error (#29).

Constants§

CODEWHALE_MAIN_STACK_BYTES

Functions§

resolve_state_from_environment