Skip to main content

Module shield_ai

Module shield_ai 

Source
Expand description

The AI reading of a shielded address (docs/shield.md). Only when you allow it for that address: the subject and text of each new message in its inbox are sent once to Anthropic’s API, with the question of shield::ai_prompt, and the answer (tone, topic, one neutral line) is kept by Message-ID. The key lives in the system keyring, under the service “sioul”.

Structs§

Read
What a round of reading did.

Constants§

ENDPOINT 🔒
MODEL
A small, fast model: the question is short, the answer one line.
PER_ROUND 🔒
Messages read per address and round; a burst of mail is read over the next rounds.

Functions§

api_key
The key kept for Anthropic’s API, if any.
ask 🔒
One question; None when the answer is not the JSON asked for.
key_entry 🔒
read_new
Reads the new mail of every shielded address that allows the AI, up to PER_ROUND messages each, newest first. Nothing is sent without a key.
read_with 🔒
read_new, its questions sent to endpoint with key.
save_api_key
Keeps the key, replacing any older one; an empty key forgets it.