Mind and morning brief

Status: built. src/mind.rs.

The assistant thinks on its own, often, without being asked, and pieces things together across time.

How it works

What stays enforced (Threat model)

The mind has no extra powers. Tools that need a yes are not run unattended; outside content stays outside; urgent notifications from a run that read outside content are sent as normal; the daily notification cap and quiet hours hold.

Its prompt tells it never to spend, send, delete or guess. Everything it does is in the audit trail (Audit): each run, its digest, the data it pulled, and its journal appear in the review pack under "The mind's journal".

Tuning it

Give an agent the review pack (assistantx-review) and ask what the mind got right and wrong. Its instructions are mind::GUIDE and the task text in mind::ensure; its pace and model are the task's settings.

Morning brief

src/signals.rs.

The phone sends POST /v1/signals {kind: "woke", at, source, off_secs?} (device, client or owner token) the first time each day it sees the user wake (Woke.kt): the first unlock after the screen was off 4 hours or more, between 03:00 and 12:00; dismissing an alarm between 03:00 and 12:00; or a Health Connect sleep session that ended this morning.

The server keeps every signal (signals, GET /v1/signals) and checks the same rule (signals::is_wake).

The first wake of a local day (brief.last_day) starts the task Morning brief (made when first needed, schedule: {on: "wake", brief: true, quiet: true, model: "local"}).

The core first fetches today's weather for the phone's last point from Open-Meteo (api.open-meteo.com, by coordinates), then gives the run today's facts: weather, today's calendar, sleep from the latest health day, alarms and reminders still to come today, and open to-do counts when a list_items table exists (read softly; any other shape is skipped).

Weather, calendar and job text are wrapped as outside content. The run's reply is sent by the core as a normal notice titled "Good morning" that opens the run's thread; when the model gives nothing, the core sends the facts in plain words.

Settings: GET,PATCH /v1/brief {enabled, parts: {weather, calendar, sleep, reminders, lists}, fallback: "08:30" | null} (on, all parts, no fixed time by default). With fallback the core timer sends the brief at that time (until noon) on days no wake came. POST /v1/brief/run sends it now (the settings page's "Send it now"). The page is Settings, Morning.