Skip to main content

Module texts

Module texts 

Source
Expand description

Texts read and sent through your phone, as this device does its part (docs/texts.md; the rules are sioul_core::texts, the reading and the sending Java’s: android/…/Texts.java, TextSend.java).

  • On the phone, at each exchange (light_step, under one lock for its processes): Android’s word on each text sent copied into its outcomes; each request decided (texts::verdict), claimed in the private ledger, flushed, before Java hands it to Android; a claim with no word from Android looked for among the texts Sioul sent, else said in doubt.
  • On the phone, never inside an exchange (heavy_step: after the background service’s exchange, or in a thread of the window’s): the whole history read a batch at a time (BATCH texts, MEDIA_BATCH bytes of media put as sealed blobs), every column kept, while the phone charges; then what the phone’s texts changed, when they did (import_now); the texts deleted on the phone marked so, once a day; the sizes the settings say.
  • On a computer: the Texts page (view, conversation), a text written for the phone to send (send, again); the media’s blobs brought and kept sealed (fetch_media, in a thread, never inside an exchange); how far this computer’s clock may run ahead of the phone’s.
  • Every line, and every media file kept here, sealed at rest with a key made from the sharing key (sioul_sync::textseal): no sharing key here, nothing is read or written.

Structs§

Choice 🔒
This device’s own texts settings (texts.toml in the configuration, never shared): on a computer, the phone that sends; on a phone, the largest media file it brings to your computers (MB; none: MEDIA_CAP_MB).
Clock 🔒
How far this computer’s clock may run ahead of a phone’s (texts/clock.json in the state folder): for each phone, the last time its entry said, and the least gap seen in the last day.
Gap 🔒
Gaps 🔒
The rows on the phone at or under the marks that its log lacks, and the rows its log holds that the phone no longer has; by table.
Kept 🔒
The texts, the requests and their outcomes as last read, kept while their files stay as they were (size and time) for this device: the whole history is opened once, not at each look of the page (9,800 sealed lines read twice per conversation opened froze the window for seconds).
PartResult 🔒
One part’s result, as Java wrote it (TextSend.line).
Raw 🔒
A row as Java read it (Texts.sms, Texts.mms; android/jvm-checks/TextsCheck.java): every column.
Reader 🔒
The reader’s marks and the import’s measures, private to the phone (texts/reader.json in the state folder): the provider’s last rows read, when the import began, what the phone holds and how much has gone.
Taken 🔒
What a step took of a texts-read answer: its texts as they travel, the last plain and multimedia rows taken, the media bytes put in the sharing.

Enums§

Seal 🔒
What seals the lines and the media: the sharing key’s, or the demo’s stand-in (plain; a line marked).

Constants§

CAPS_MB 🔒
The sizes offered for the largest media file (MB): the blobs take 64 MB at most.
LOOKS 🔒
The settings and your lists and address books, as the page last read them: read again when the settings’ file changed, or after a minute.
MMS_FROM 🔒
A multimedia message’s address types (addr.type): who sent it, to whom.
MMS_NOTIFICATION 🔒
A multimedia message still to download (m_type: Android has only its notification).
MMS_TO 🔒
OWN_ADDRESS 🔒
What Android writes for “this phone” in a message’s addresses.
READER_VERSION 🔒
The reader of the archive. The first version read 30 days: its marks would pass the history, so its reader starts again from the first row.

Statics§

FETCHED 🔒
The phones’ logs as last seen by fetch_media (each file’s size and time), and whether media were left for next time: nothing new, nothing done.
KEPT 🔒
TRIMMED 🔒
When this device last took its old requests and outcomes out (ms): once a day.
WORKING 🔒
The import (a phone’s window) or the media’s fetching (a computer) running in a thread of this process.

Functions§

again 🔒
Send again: a request of its own, a new key, the same number and words.
ahead_of 🔒
How far this clock may run ahead of a phone’s (ms): the least gap of the last day, 0 unknown.
before_exchange 🔒
Before an exchange: on a phone, the quick part of its step; on a computer, how far its clock may run ahead of the phone’s. Then, in a thread of its own that never holds the exchange: the import’s next batch (a phone’s window; the background service runs it after its exchange) or the media brought here (a computer). Once a day, old requests and outcomes out (texts never).
bring_media 🔒
Each part of a message that travels, copied from Android into the private folder, hashed, put in the sharing as a sealed blob (never inside a line), the copy deleted; within budget bytes, the first part of a step always. Whether every part was brought (else the message waits for the next step).
call 🔒
What the window asks (Sioul::texts): “view” {query}, “conversation” {id}, “send” {to, body}, “again” {key}, “parts” {body}, “media” {hash, ct} (its address, to show or open it), “save-media” {hash, ct, path}, “close” (the page closed: the media opened for it deleted), “setup”, “ask” (Android’s question for the permissions), “part” {on}, “cap” {value}. Its JSON, and whether what travels changed (to share now).
cap_mb 🔒
The largest media file brought to your computers, in MB.
changes 🔒
Java’s word on the phone (Texts.changes): whether its texts changed since it was last asked with clear (a text came, was sent, deleted or read: Android’s provider watched by the background service; not watched in this process, or no answer: yes, as at every step before), and whether the phone is on its charger.
choice 🔒
choice_path 🔒
conversation 🔒
One conversation (TextsPage.qml): {id, title, messages, can_write, group}.
conversation_of 🔒
A person’s conversation on the Texts page, from their numbers as written: the first whole one, keyed; “” while texts are not read here.
copy_results 🔒
Java’s results copied into this phone’s outcomes, and the ledger told.
decide 🔒
Each request decided once, under the ledger’s lock (both processes of the phone may step): claimed and flushed before Android is asked; the others said (expired, refused, clocks apart) and written in the ledger, so that they are decided once too. Whether an outcome was written.
demo 🔒
The demo profile (SIOUL_DEMO=1, which tools/demo/run.sh sets in its sandbox with no network, and nothing else does): its texts are stand-ins written plain by tools/demo/make-demo.py, its phone a stand-in.
draft_taken 🔒
A draft an AI agent wrote, used (its words, for the box: sending stays yours) or discarded: taken out of the drafts either way. {body}, “” when gone.
fetch_media 🔒
The media the texts name and this device has not yet: brought from the sharing’s blobs, sealed here, MEDIA_BATCH bytes at a time (the first always); one the sync app has not brought yet waits for next time.
gaps 🔒
heavy_step 🔒
The part that may take a while, never inside an exchange: the history’s next batch and its media when due (import_now), and the day’s look for deletions. Under its own lock: one import at a time on the phone.
here_media 🔒
import_now 🔒
Whether the import reads the phone’s texts now, at now (ms; docs/texts.md, “Reading, on the phone: paced”). A heavy import, the first (the whole history) or one the last batch left behind (full, or media that did not fit), only while the phone charges: it may write and send hundreds of megabytes, on mobile data too. Caught up, when the phone’s texts changed since the last look, and with the day’s look for deletions all the same (a change Android did not say): most steps find nothing new, and ask Android nothing.
import_step 🔒
One step of the import, the first and every one after: the texts after the reader’s marks, BATCH at most (the plain texts first, then the multimedia ones), their media within MEDIA_BATCH bytes, written to this phone’s log. A multimedia message whose media do not fit waits, with every one after it, for the next step. Whether anything was written.
importing_in_bulk 🔒
A bulk import going on, on the charger or waiting for it (import_now): the sharing’s full rounds wait meanwhile (steps), so that it does not restate the records again and again (8 October 2026: a first import made six full rounds, each sent twice).
int 🔒
kept_words 🔒
What this device keeps of the texts, for its part’s line in the sharing panel (“Keeps 4,830 texts and 210 MB of media here.”); “” when none.
light_step 🔒
The quick part of the phone’s step, at every exchange: Android’s words copied, the requests decided and sent, a lost claim looked for. Under one lock for the phone’s processes. Whether something was written.
look_again 🔒
Once a day: what the phone holds measured for the settings; the texts deleted on it marked so in its log, a line each (the archive keeps the text); and a text the reader passed while Android hid it (in the outbox as a newer one came) read now. Whether a line was written.
look_for_lost 🔒
A claim left without Android’s word (Sioul stopped between the claim and the hand-off): looked for among the texts Sioul sent since, by its number and its words’ hash; found, sent; else in doubt. Never sent again.
looks 🔒
The settings and your senders for the page’s looks (LOOKS): each opening of a conversation read them twice, on the window’s thread.
measure_clock 🔒
At each exchange: the sending phone’s entry’s time, when it changed, compared with this computer’s clock; the least such gap of the last day is how far this clock may run ahead of the phone’s (transit included: an upper bound, so that a request looks older, never younger).
media_path 🔒
A media file kept here, sealed: texts/media/<hash> in the data folder.
names 🔒
now_ms 🔒
open_media 🔒
A media file opened for the page or saved: its plain copy in opened_folder; none when it is not here.
opened_folder 🔒
Where a media file is opened for the page: Sioul’s cache (yours alone), emptied when the page closes.
outcomes_from 🔒
Each text’s outcomes from its parts’ results: sent when every part was; not sent, and why, when one was not; delivered when the carrier said every part was received (never “not delivered” for a report that did not come).
part_of 🔒
A part as it travels: its words in the line; its content said, to be put in the sharing (bring_media) when it is not over cap bytes.
parts 🔒
How many texts a draft takes: {parts, said}.
phone 🔒
Whether this device reads and sends texts: a phone. SIOUL_TEXTS makes a computer’s step run too, to look at it.
phone_step 🔒
The background service’s step, after its exchange: the quick part, then the import’s next batch. Whether something was written to share now.
phones 🔒
The phones in the sharing, the one chosen to send first, else the one that shared last.
private 🔒
raws 🔒
readable 🔒
Whether the Texts page has something to show here: the part on, and a phone that sends.
reason_of 🔒
Android’s code for a part not sent, as the words say it (SmsManager’s RESULT_ERROR_…).
records 🔒
The texts, the requests and their outcomes (KEPT), read again only when a file changed.
requests_from 🔒
The requests under each root (<root>/send/<device>.jsonl), each key once, the first root’s first: the ledger then decides each once.
root 🔒
row_of 🔒
“content://sms/414” → “sms-414”: the row as the log names it.
say 🔒
Outcomes added to this phone’s own file, each (key, state) once.
sealed 🔒
This device’s name in the sharing, the sealer, and the sharing’s folder and key, while the part “texts” is on here (the demo: no folder).
send 🔒
A text written here for the phone to send: refused at once when the phone would refuse it (said why), else a request with a key of its own in this device’s file, which the sharing carries. {said, shared, key}.
sending_phone 🔒
set_cap 🔒
The largest media file brought to your computers, chosen on the phone (MB).
setup 🔒
The phone’s tab (TextsSetup.qml): {android, state (each permission, the SIMs), on (the part here), sharing, progress (what the phone holds and how much has gone), importing (more to go), cap (the setting row of the largest media file brought)}.
size_words 🔒
“1.2 MB”.
stamps 🔒
Each record file of the three stores, its size and time.
string 🔒
take 🔒
The texts of a texts-read answer as they travel, BATCH at most, the media of each multimedia message brought within MEDIA_BATCH bytes; a message whose media do not fit ends the list there, for the next step.
text_of 🔒
A row Java read, as it travels: its people keyed (its conversation’s, else its own addresses), its words, its parts said (their content left for bring_media), every column kept as it came.
threads_of 🔒
The conversations’ people of a texts-read answer, by thread.
view 🔒
The Texts page’s list (TextsPage.qml): {can (the part on, a phone that sends), phone: {id, name, shared, said}, conversations, said, never, empty (the list’s words when it has no row)}; without them, can false and why. With query, the conversations holding a text with all its words (or whose people’s names or numbers do), each with the newest such text as its last words.
with_drafts 🔒
The conversations with the drafts an AI agent wrote for them (textdraft, docs/mcp.md, “Texts”): how many wait in each, said under its last words; a draft to someone with no conversation yet makes one, first.
write_log 🔒
Texts added to this phone’s log, each line once; how many were written.
write_whole 🔒
A private file written whole beside, then put in place.

Type Aliases§

Vault 🔒
The sharing’s folder and key: where the media’s blobs go and come from.