Config¶
m365_brain.config
¶
Config package -- re-exports schema, loader, and errors for convenient imports.
Config
¶
Bases: BaseModel
Source code in m365_brain/config/schema.py
AuthConfig
¶
Bases: AuthProfileConfig
The auth: section -- the profile the extractor path uses today, plus
the named-profile registry.
client_secret keeps a None default here and only here: every existing
config file omits it for the device-code flow, and AuthProfileConfig
(which profiles uses) has no default at all.
Source code in m365_brain/config/schema.py
profiles
class-attribute
instance-attribute
¶
Named Entra apps, addressed by outboxes.definitions.<name>.auth_profile
and extractors.auth_profile. None means one app -- the auth: section
itself -- which is the single-tenant single-purpose deployment.
ServiceConfig
¶
Bases: BaseModel
No mode. It was a required free-text field read by nothing, validated
by nothing, and documented as accepting only "cli" -- so mode: banana
loaded cleanly under extra="forbid" and changed nothing.
Source code in m365_brain/config/schema.py
LocalStorageConfig
¶
AzureBlobStorageConfig
¶
StorageConfig
¶
GraphConfig
¶
EmailExtractorConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
max_items_per_sync
instance-attribute
¶
Item budget per folder per cycle, sent verbatim as $top on the delta query.
The only bound this code expresses on an initial sync, and not the only one
that binds: graph.max_pages is a page budget in different units and
usually stops the round first (m365/pagination.py). It is also frozen into
the delta token after the first request of a chain, so editing it does
nothing until --resync.
There is deliberately no lookback_days. The filter provably had no effect
-- 1,062 pre-cutoff messages arrived on a cleared initial sync across all
seven folders -- but the reason is open: Microsoft documents
$filter=receivedDateTime ge|gt as supported here. See
extractors/email.py. calendar.lookback_days is unaffected — calendarView
takes a real date range.
CalendarExtractorConfig
¶
TeamsChatsExtractorConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
TeamsChannelsExtractorConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
OneDriveExtractorConfig
¶
SharePointExtractorConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
ContactsExtractorConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
include_contact_folders
instance-attribute
¶
No max_items_per_sync: nothing could carry one to the server.
It existed, and it was a page budget derived from a guessed page size --
see m365/extractors/contacts.py. graph.max_pages bounds the walk.
DirectoryExtractorConfig
¶
ExtractorsConfig
¶
Bases: BaseModel
Source code in m365_brain/config/extractors.py
auth_profile
class-attribute
instance-attribute
¶
Which auth.profiles entry every extractor authenticates with.
None is meaningful and is the single-app path: authenticate with the
auth: section itself, which is what one Entra app for all eight
extractors looks like. Name a profile only once several apps exist. The
root validator checks that the name resolves.
load_config
¶
Load and validate config from one or more comma-separated YAML files.
When multiple paths are given, files are loaded left-to-right and deep-merged. Dicts merge recursively; lists and scalars from later files override earlier ones. Relative paths in the config are resolved against the first file's parent directory.