Skip to main content

Module connectors

Module connectors 

Source
Expand description

Cloud connectors: pull documents out of the services people already keep their thinking in, and hand them to the engine as episodes.

Network lives here in the CLI layer, exactly like crate::web; scone-core stays offline by construction. Credentials live in a 0600 file next to the database, or in the environment for people who would rather not have them on disk at all.

Structs§

Credentials
Stored connector credentials and sync state.
Document
One fetched thing, normalized across services.
Notion
Notion, via an internal integration token. No OAuth app to register: create an integration, share the pages with it, paste the token.
Provider

Constants§

KNOWN

Traits§

Connector
What every connector must do: name itself and produce documents.

Functions§

blocks_to_text
Flatten a Notion block payload into plain text. Unsupported block types contribute nothing rather than failing the page.
connector_for
credentials_path
load_credentials
parse_search
Pull documents out of a Notion search payload. Pure, so the shape of their API is tested without touching the network.
save_credentials
Write credentials readable only by this user. A token in a world-readable file is a token you have given away.
token_for
Resolve a provider’s token: environment first so nothing has to be written down, then the credentials file.