Skip to main content

Module config

Module config 

Source
Expand description

Configuration management.

This module provides functions for discovering SaveContext directories, resolving database paths, and loading configuration.

§Architecture

SaveContext uses a global database architecture to match the MCP server:

  • Database: Single global database at ~/.savecontext/data/savecontext.db
  • Exports: Per-project .savecontext/ directories for JSONL sync files

This allows the CLI and MCP server to share the same data, while each project maintains its own git-friendly JSONL exports.

Modules§

plan_discovery
Multi-agent plan file discovery.

Structs§

StatusCacheEntry
Status cache entry (matches MCP server format)

Functions§

bind_session_to_terminal
Build a StatusCacheEntry for a session and write it to the cache.
clear_status_cache
Clear the status cache for this terminal.
current_git_branch
Get the current git branch name.
current_project_path
Get the current project path.
current_session_id
Get the current session ID from the status cache.
default_actor
Get the default actor name.
discover_project_savecontext_dir
Discover the project-level SaveContext directory for JSONL exports.
discover_savecontext_dir
Discover the SaveContext directory (legacy behavior).
global_savecontext_dir
Get the global SaveContext directory location.
is_test_mode
Check if test mode is enabled.
read_status_cache
Read the status cache entry for this terminal.
resolve_db_path
Resolve the database path.
resolve_project
Resolve a project from explicit input or CWD.
resolve_project_path
Resolve the project path from explicit input or CWD.
resolve_session_id
Resolve the session ID for any CLI command.
resolve_session_or_suggest
Resolve session ID with rich hints on failure.
test_db_path
Get the test database path.
write_status_cache
Write a status cache entry for this terminal.