Skip to content

Add session view, query, find etc - #196

Merged
ripienaar merged 7 commits into
mainfrom
195
Sep 23, 2026
Merged

ripienaar merged 7 commits into
mainfrom
195

Conversation

@ripienaar

Copy link
Copy Markdown
Member

No description provided.

session ls printed the model and prompt from the journal as stored, and
session show did the same for the model, the prompt and a deferred tool's
name, while sanitizing the fields beside them. Each now goes through the
sanitize package; show's prompt keeps its newlines. Run ids, the status
column and the TUI path are left as they were.

Signed-off-by: R.I.Pienaar <rip@devco.net>
Inspecting a run needs its raw records, which were reachable only through
Open or Create, and both of those exist to append: the file store locks
the run and JetStream refuses one with a turn in flight. Store gains
Records, implemented on both backends and the agenttest fake over the read
each already had, and RunInfo gains Caller and Ended for search to filter on.

Signed-off-by: R.I.Pienaar <rip@devco.net>
The file store, the agenttest fake and session show took a run's status from
the last terminal record Fold kept, so a conversation that had started
another turn read as ended with the earlier turn's summary. JetStream already
reported it open. RunState gains Reopened and Ending(), Fold leaves Ended
zero when reopened, and Terminal and Completed() stay as resume needs them.

Signed-off-by: R.I.Pienaar <rip@devco.net>
Inspecting a stored run meant reading its journal by hand. runstate gains
Calls, which pairs each tool call with its whole answer, Stats for tokens,
tool kinds and timing, and CallFilter and SearchFilter so an embedder gets
the same matching. fisk session query, stats and search are thin commands
over them, sanitize what they print, and take --json.

Signed-off-by: R.I.Pienaar <rip@devco.net>
The inspection commands printed a columns header followed by bare tables
and fmt text, so their output did not line up with the other commands.
Each now builds one document with sections and embedded tables, journal
text only in places columns does not read as markup, and the paragraph
explaining tool time is gone. --json is unchanged.

Signed-off-by: R.I.Pienaar <rip@devco.net>
The inspection commands had no documentation. A page under agents covers
each command's flags, output and --json shape, how tool time is measured,
and how journals written before records carried a time or an agent name
read, and Managing sessions in sessions.md links to it.

Signed-off-by: R.I.Pienaar <rip@devco.net>
Signed-off-by: R.I.Pienaar <rip@devco.net>
@ripienaar
ripienaar merged commit 1bfe3f7 into main Sep 23, 2026
5 checks passed
@ripienaar
ripienaar deleted the 195 branch September 23, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant