mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Every view that shows a Session today joins it against the /session/active snapshot and the execution event stream to learn whether it is running. Put the answer on the Session itself: Session.Info gains status, "running" while SessionExecution in this process owns a busy period for the Session and "idle" otherwise. Core's Session facade attaches status wherever it returns a Session, so HTTP responses and plugins both see it. It snapshots the running set before reading rows, so a read never pairs "idle" with a row from before the terminal commit. Status is process-local and must not be persisted. The previous shape is now Session.Persisted: the store, durable events, and Session export and import keep using it, so exports written before this change still import and new exports, including the app and desktop transcript exports, carry no status. Session.Status has no schema identifier because SessionStatus already names the session.status event union. |
||
|---|---|---|
| .. | ||
| agent.test.ts | ||
| compatibility.test.ts | ||
| config.test.ts | ||
| contract-hygiene.test.ts | ||
| credential-legacy.test.ts | ||
| event-manifest.test.ts | ||
| event.test.ts | ||
| legacy-event.test.ts | ||
| mcp.test.ts | ||
| model.test.ts | ||
| session-cursor.test.ts | ||
| session-error.test.ts | ||
| session-legacy.test.ts | ||
| session-terminal.test.ts | ||
| token-usage.test.ts | ||
| v1-isolation.test.ts | ||
| vcs.test.ts | ||
| worktree.test.ts | ||