Configuration API

These types support advanced integration and testing. Only the top-level exports listed in Python API are frozen as the stable library surface.

.. py:class:: SteadlithConfig(chunker=, embedding=, store=, index=, sources=, base_dir=, config_path=None)

module:

steadlith.config

Validated configuration plus the directory paths are resolved against.

.. py:class:: ChunkerConfig(strategy: ‘str’ = ‘cdc-rabin’, window_words: ‘int’ = 48, min_tokens: ‘int’ = 180, max_tokens: ‘int’ = 640, snap_window_words: ‘int’ = 24, primary_mask_bits: ‘int’ = 8, backup_mask_bits: ‘int’ = 6)

module:

steadlith.config

.. py:class:: EmbeddingConfig(provider: ‘str’ = ‘hash’, model: ‘str’ = ‘steadlith-hash-256-v1’, dimensions: ‘int’ = 256, batch_size: ‘int’ = 64, price_per_million_tokens: ‘float | None’ = None, api_key_env: ‘str | None’ = None, base_url: ‘str | None’ = None)

module:

steadlith.config

.. py:class:: StoreConfig(cache: ‘str’ = ‘.steadlith/cache.sqlite3’)

module:

steadlith.config

.. py:class:: IndexConfig(backend: ‘str’ = ‘sqlite’, database: ‘str’ = ‘.steadlith/index.sqlite3’)

module:

steadlith.config

.. py:class:: SourcesConfig(include: ‘tuple[str, …]’ = (‘docs//*.md’, ‘README.md’), exclude: ‘tuple[str, …]’ = (’/drafts/’, ‘/.git/’, ‘/.steadlith/**’))

module:

steadlith.config

.. py:function:: load_config(path=’steadlith.toml’)

module:

steadlith.config

Load and validate a Steadlith configuration file.

.. py:function:: loads_config(text, *, base_dir, config_path=None)

module:

steadlith.config

Parse and validate TOML text without touching the filesystem.

.. py:function:: write_default_config(path=’steadlith.toml’, *, force=False)

module:

steadlith.config

Create a commented starter config without overwriting by default.

.. py:function:: adopt_legacy_config(source=’cairn.toml’, destination=’steadlith.toml’)

module:

steadlith.config

Create a Steadlith config that safely reuses explicit v0.2 state.