terraphim / terraphim/terraphim-ai
feat: sessions files and sessions by-file subcommands
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 62
- Forks
- 5
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 1
Description
Feature Request
Add file-level tracking to the sessions subcommand group:
sessions files <session-id>
List files touched by a specific session, extracted from tool invocations in the JSONL data.
Extraction targets:
Readtool ->tool_input.file_pathEdittool ->tool_input.file_pathWritetool ->tool_input.file_pathMultiEdittool ->tool_input.file_pathNotebookEdittool ->tool_input.notebook_pathGlobtool ->tool_input.pathGreptool ->tool_input.path
Output:
- Categorize as "read" vs "written" (Edit/Write/MultiEdit/NotebookEdit = written)
- Support
--jsonfor programmatic use - Default: human-readable table
sessions by-file <file-path>
List sessions that touched a given file path (substring match).
Output:
- Session ID, topic, read/write mode
- Support
--json
Context
terraphim-agent already parses JSONL session files for sessions search, sessions list, and sessions stats. This extends extraction to the tool_input fields for file path tracking.
A temporary bridge script exists at scripts/session-files.py in the cto-executive-system project. This upstream implementation would supersede it.
Proposed CLI
terraphim-agent sessions files <session-id> [--json]
terraphim-agent sessions by-file <file-path> [--json]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing sessions search, list, and stats implementations that parse JSONL session files, then compare them with scripts/session-files.py in the cto-executive-system project. Trace how tool_input fields are extracted and how CLI output supports human-readable and JSON formats. Done means both proposed subcommands report the requested read/write file and session information with --json support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100