You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(s012): the session process and the agent loop
One gen_statem per conversation under a DynamicSupervisor and a Registry:
idle, thinking, tool_wait, approval_wait (stub), compacting (stub), error.
A user message is a row, then a broadcast, then a model call in a Task
under the Session's own supervisor, talking back only by message; deltas
coalesce to at most 20 broadcasts a second and persist as a draft row every
500 ms or 2 KB; the draft is finalised at done (the one edit docs/05 now
names); a tool call runs the ToolRunner stub in a Task, writes a tool row,
and the loop continues under code-owned caps; a crash or provider error is
an error turn with the partial text kept; cancel persists what arrived as
interrupted; rehydrate marks a leftover draft interrupted and never resumes;
idle hibernates and stops on generic timeouts. Trinity.CorePolicy.hash/0 and
the sentinel (three families, tighten only) arrive here as the spec asks.
The 010 schema Trinity.Sessions.Session is renamed SessionRow (fix
referencing 010): docs/01 gives that name to the process. Seventeen tests,
including the two crash tests and 100 concurrent sessions with unchanged
pids; the fake provider gained global state and script sequences after
the first runs showed its process-local state was invisible to a
session's Task. Coverage 60.82%. docs/01 and docs/05 synced. G1 lines 1
to 14.
Signed-off-by: Ayla Croft <aylacroft@proton.me>
- Backpressure: stream chunks are coalesced to ≤ 20 broadcasts/sec per session (Slice 013).
131
+
- Backpressure: stream chunks are coalesced to ≤ 20 broadcasts/sec per session (built at Slice 012: a 50 ms timer in the Session, so 013 receives coalesced deltas).
0 commit comments