Merge branch 'main' of git.arirex.me:iris/ai-app

This commit is contained in:
iris committed 2026-08-30 14:27:31 -04:00
commit d981d63bcc
5 files changed
+549 -69

No files matched your search

+25
View File
@@ -312,6 +312,20 @@ day:
which keeps the session and its transcript, and `POST .../start` brings
the process back on the same conversation — or delete the session, which
ends the conversation too.
- **A message or a command sent to a stopped session starts it.** `POST
.../message`, `.../command` and `.../compact` go through
`SessionManager::send_message` and `::run_command`, which start a process
first when the session is known to have exited and then hand the thing to
the driver that has one behind it. Only on `exited`: `unknown` has a
process that may well be reading its fifo. `/rename` starts one too, and
for a sharper reason than the rest: the CLI keeps its own copy of the
name, that copy is what its session picker and other agents' session
lists show, and a session is only ever *given* a name at birth — every
later start is a `--resume` — so a rename that reached no process would
leave the two lists disagreeing for good. Its save happens before the
telling, so a failure there says the telling failed rather than the
rename. So the Start button is for when you want a process and nothing to
say to it yet.
- **Each session directory now holds `process.json`, `stdin.fifo`,
`stdout.log` and `stderr.log`.** `stdout.log` is the driver's input, read
from the byte offset in `process.json`; removing either by hand while the
@@ -323,6 +337,17 @@ day:
launch has just started a process reports `idle`, because `exited` is the
word that refuses every command and offers a phone the chance to start a
second CLI on a live conversation.
- **`exited` is never taken on trust; it is checked against the process
record** (`corrected` in `session/mod.rs`). It is the one status that draws
the phone's Start button and lets `start_session` build a driver, so a
record that is not known to be dead makes it false and the session reports
`unknown` instead. Without that, a session adopted at a backend start kept
the transcript's `exited` while its CLI was running, Start was accepted
every press, and each press left another reader on the same process —
which reads on screen as one reply written several times, interleaved
(`GotGotGot it — it — it —`), not as anything to do with a button.
A driver that `start_session` replaces gets `Driver::detach` for the same
reason: swapping the `Arc` does not end the tasks the old one is running.
- Remote sessions are adopted too. The pid recorded for one is the **`ssh`
client's**, on this machine — that is the process the backend owns, and it
lives as long as the remote command does. (This said "local only" until