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§
- Status
Cache Entry - Status cache entry (matches MCP server format)
Functions§
- bind_
session_ to_ terminal - Build a
StatusCacheEntryfor 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.