Persist named state
Where named state belongs in Minion: memories, package storage, notes, secrets or integrations.
Use the destination that matches the job. Do not invent a thinner key-value store.
Destination map
- Durable facts and preferences: memories. Call
minion.memories.verify, thenminion.memories.upsert. Verify first; do not upsert blindly. - Package runtime state, caches, knobs:
packageStorage(). Useget/set(orsql()) in the owning package. - Versioned documents, plans and calibration: notes. Use
minion.notes.upsert; notes keep their earlier versions (minion.notes.history,minion.notes.restore). Plain repos aren't available in Minion yet. - API keys, PATs, HMAC secrets: secrets. An owner or admin adds them at /app/secrets ; never paste one into chat. Code uses them by name as
{{secret:name}}. - OAuth connections and their tokens: integrations. Connect at /app/integrations or start the flow with
minion.integrations.connect. - Ids several packages share: the owning package's export. One package holds the id; the others statically import that export.
Access and refresh tokens live on the integration, not as separately named secrets. See Secrets and host approval and the OAuth guide .
packageStorage().get / set is the named-read API for package state.