Skip to main content

Module amp

Module amp 

Source
Expand description

Amp CLI session parser for JSON files. Amp CLI session parser.

Parses session files from Sourcegraph’s Amp CLI tool. Sessions are stored as single JSON files at ~/.local/share/amp/threads/T-*.json.

Each file contains a JSON object with:

  • id: Thread identifier with “T-” prefix followed by UUID
  • created: Milliseconds since epoch
  • title: Optional session title
  • messages: Array of message objects with role, content, and metadata
  • env.initial.trees: Array of project trees with working directory info

Structs§

AmpWatcher
Watcher for Amp CLI sessions.
ParsedAmpMessage
Intermediate representation of a parsed Amp message.
ParsedAmpSession
Intermediate representation of a parsed Amp session.

Functions§

find_amp_session_files
Discovers all Amp session files.
parse_amp_session_file
Parses an Amp JSON session file.