pub struct CommandContext {Show 32 fields
pub session_cost_usd: f64,
pub session_input_tokens: u64,
pub session_output_tokens: u64,
pub session_turns: u32,
pub workspace: PathBuf,
pub help_text: String,
pub session_approved_tools: HashSet<String>,
pub permission_mode: PermissionMode,
pub memory_dir: PathBuf,
pub provider_name: String,
pub model_name: String,
pub model_override: Option<String>,
pub data_dir: PathBuf,
pub message_count: usize,
pub tool_call_count: usize,
pub tools_count: usize,
pub hooks_count: usize,
pub skill_names: Vec<String>,
pub nous_scores: Vec<(String, f64)>,
pub budget_usd: Option<f64>,
pub economic_mode: Option<String>,
pub workspace_journal_status: Option<String>,
pub project_instructions_tokens: usize,
pub git_context_tokens: usize,
pub memory_index_tokens: usize,
pub workspace_context_tokens: usize,
pub skills_catalog_tokens: usize,
pub show_reasoning: bool,
pub context_ruling: Option<String>,
pub context_window: Option<usize>,
pub identity_tier: Option<String>,
pub identity_subject: Option<String>,
}Expand description
Mutable context passed to every command invocation.
Fields§
§session_cost_usd: f64Accumulated cost in USD for this session.
session_input_tokens: u64Input tokens consumed this session.
session_output_tokens: u64Output tokens consumed this session.
session_turns: u32Number of user turns in this session.
workspace: PathBufWorkspace root directory.
help_text: StringPre-rendered help text (set by the registry).
session_approved_tools: HashSet<String>Tools the user has permanently approved for this session (via “always” response).
permission_mode: PermissionModePermission mode: “default” (prompt), “yes” (auto-approve all), “plan” (deny all writes).
memory_dir: PathBufDirectory for persistent agent memory files (.arcan/memory/).
provider_name: StringProvider name (e.g. “anthropic”, “openai”, “mock”).
model_name: StringCurrent model name (e.g. “claude-sonnet-4-20250514”).
model_override: Option<String>Model override requested via /model command (applied on next turn).
data_dir: PathBufData directory for persistent storage (.arcan/).
message_count: usizeNumber of messages in the conversation history.
tool_call_count: usizeNumber of tool calls executed this session.
tools_count: usizeNumber of registered tools.
hooks_count: usizeNumber of registered hooks.
skill_names: Vec<String>Names of discovered skills.
nous_scores: Vec<(String, f64)>Latest Nous evaluation scores: (evaluator_name, score_value).
budget_usd: Option<f64>Session budget in USD (set via --budget). None means unlimited.
economic_mode: Option<String>Autonomic economic mode label (e.g. “Sovereign”, “Conserving”).
Populated when ARCAN_AUTONOMIC_URL is configured.
workspace_journal_status: Option<String>Workspace journal status string (e.g. path or “unavailable”). Set when a shared Lance workspace journal is opened.
project_instructions_tokens: usizeEstimated tokens for project instructions (CLAUDE.md, AGENTS.md, docs/).
git_context_tokens: usizeEstimated tokens for git context section.
memory_index_tokens: usizeEstimated tokens for MEMORY.md index.
workspace_context_tokens: usizeEstimated tokens for shared workspace journal context.
skills_catalog_tokens: usizeEstimated tokens for skills catalog.
show_reasoning: boolWhether to display reasoning/thinking tokens in the output.
context_ruling: Option<String>Current Autonomic context ruling (e.g. “Breathe — pressure 42%, quality 0.85, …”).
context_window: Option<usize>Context window size in tokens (from provider).
identity_tier: Option<String>Identity tier label (e.g. “pro”, “free”, “anonymous”).
identity_subject: Option<String>Identity subject (e.g. “user@example.com”).