Raft (slock's raft-computer) runs its agents on Pi and keeps each one's
Pi SDK session files in that agent's folder: <slock>/agents/<id>/
.pi-sessions/<ts>_<id>.jsonl, or .builtin-sessions/ for its built-in
runtime. <slock> is $SLOCK_HOME or ~/.slock (%USERPROFILE%\.slock on
Windows, the distro's ~/.slock under WSL). Read from raft-computer
1.0.14's PiDriver (buildPiSessionDir), BuiltInDriver and
resolveSlockHome, and a read-only listing of ~/.slock here.
runtime-sessions/ holds handoff notes, no sessions, and is not read.
- The Sessions page lists them as Raft's (agent "raft", in agent.Clients'
others), titled and opened with their prompts as Pi's are.
- Their calls count on the Usage page as Raft's; calls through magpie
stay the gateway's, as Pi's do.
- Raft's Pi uses the user's own ~/.pi/agent, so a request it sends
through magpie reaches the gateway as Pi's under the same session id.
sessions.GatewayKeys gives a Raft session both "raft|ID" and "pi|ID",
so the gateway's copy is not listed twice nor counted twice (Merge,
stats, NativeIDs, the GUI's Via).
- Delete and restore work as Pi's: the one file goes to the trash, and a
folder beside it is left (the agent's workspace is not the session's).
A session written in the last minutes is refused as active.
- No resume command, no carry and no trace export: Raft starts its own
agents, and nothing outside it can resume one.
- SLOCK_HOME is passed through agentenv like the other agents' homes.
Run (at 958ad9f10 on e61e10535):
- mote (macOS): -run 'Raft|TestPi|TestDirs|TestVars|TestFolderVars' in
sessions and agentenv: ok, and red for each break below. A full
go test ./... was started there; at load ~300 from other sessions'
suites it printed only magpie and internal/access (ok) before mote
stopped answering (host down), so no full macOS record exists.
- mote (macOS), rebased on 5d24bc6cc: go test -count=1 ./internal/sessions/
./internal/agentenv/: ok (sessions 495s, agentenv 1.1s). agent and gui
were not run in full on macOS.
- mote: GOOS=windows go vet of sessions, agent, agentenv, gui; GOOS=linux
go vet of sessions, agent, agentenv: ok.
- Windows (win-run): agentenv ok; -run 'Raft|TestPi|TestDirs' in
sessions ok. The full sessions package hit its 30m timeout after
TestOneListing's red (#4114) and the Agy reds (#4115, #4177). agent
and gui reds (Hermes, WorkBuddy, Lody, Qoder/Copilot plugin folders,
Codex keychain, ClaudeDesktop language, Aside, InstallWithoutNode,
DesktopExec, AionUi, ImportStatus, UpdateThatWontStart,
GatewayHeldByAContainer, GatewaySessionHistoryAndCalendar): each run
again at origin/main c1660481c on Windows and red there too, except
TestHermesProfilesFollowMagpieModel which passed there alone; it is
#1388's Hermes model rewrite, which this change does not reach.
- Linux (wsl-run): sessions ok, agentenv ok. agent's TestInstalledVersion,
TestGrokInstalled, TestCursorFolderFromTheEditorIsNotTheCLI and
TestOmpDetectedWithPiDir are red at origin/main c1660481c too (#4033,
#3548). gui does not build there (no gtk4/webkitgtk-6.0 in the distro).
Broken by hand, each red, then restored: Raft's listing removed; the
"pi|ID" key dropped from GatewayKeys; the folder-beside check reverted to
Pi's absence; $SLOCK_HOME ignored; Raft's calls left out of piCallFiles;
NativeIDs without Raft; stats' native keys without "pi|ID".
Not tried: with real Raft. No agent on this machine has run on Pi, so
the fixtures are Pi 1.1.0's own files (testdata/pi-calls, testdata/pi)
placed in Raft's folders. The GUI was not run in a browser: no JS
changed, Raft's name and icon come from agent.Clients. Raft's icon is the
generic one.