Skip to content

Releases: bitflicker64/Termstory

v0.6.3

Choose a tag to compare

@github-actions github-actions released this 12 Jul 18:00

What's Changed

Read more

v0.5.0

Choose a tag to compare

@bitflicker64 bitflicker64 released this 12 Jul 17:46
be31c11

What's Changed

Full Changelog: v0.2.14...v0.5.0

v0.2.14

Choose a tag to compare

@bitflicker64 bitflicker64 released this 12 Jul 17:46

Full Changelog: v0.2.13...v0.2.14

v0.2.13

Choose a tag to compare

@bitflicker64 bitflicker64 released this 12 Jul 17:46

What's Changed

  • Fix onboarding .zshrc idempotency, reset cleanup, and API key validation by @bitflicker64 in #5
  • Bugfix/legacy timestamp spread by @bitflicker64 in #6

Full Changelog: v0.2.11...v0.2.13

v0.2.11

Choose a tag to compare

@bitflicker64 bitflicker64 released this 12 Jul 17:46

What's Changed

  • Fix repeated onboarding timestamp prompt by @bitflicker64 in #2
  • Fix AI error surfacing, onboarding reminder, Timestamp Detective project_paths wiring, and dynamic git commit ingestion window by @bitflicker64 in #4

Full Changelog: v0.2.10...v0.2.11

v0.2.10 — PR Review Fixes & Improvements

Choose a tag to compare

@bitflicker64 bitflicker64 released this 07 Jun 14:04

🔍 v0.2.10 — PR Review Fixes & Improvements

This release addresses all review feedback and fixes from Pull Request #1:

  • CLI Config Parsing: Configuration keys set via CLI (like request_timeout_seconds) are now converted to their correct types (integer/float/boolean) instead of raw strings, preventing socket connection crashes.
  • Installer log timezone offsets: Fixed detect_macos_syslog to correctly match and parse installer log timezone offsets, producing accurate timestamps aligned with local timezone settings.
  • Syslog package matching: Fixed package filtering logic to avoid matching unrelated brew lines when the package is not present.
  • AI Timeout Override: Allowed explicit timeout parameters passed to public AI functions to take precedence over default/on-disk configurations.
  • Documentation: README.md updated to document the request_timeout_seconds option.

v0.2.9 — The Timestamp Detective

Choose a tag to compare

@bitflicker64 bitflicker64 released this 06 Jun 19:37

🔍 v0.2.9 — The Timestamp Detective

The biggest upgrade to TermStory's data recovery engine. If you've been using your terminal for years without EXTENDED_HISTORY, your shell history had no dates — every command appeared to have happened today. This release fixes that.


What's New

🔍 Timestamp Detective (timestamp_detective.py) — NEW module

A 3-phase forensic engine that recovers the real timestamps of legacy commands by mining artifacts that already exist on your machine.

Phase A — Virtual CWD Tracker
Replays cd, pushd, and popd commands in sequence to compute the exact working directory at every point in history, so git searches are scoped to the right repository.

Phase B — Five Forensic Detectors
Run in priority order, each returning a real Unix timestamp + source attribution:

Detector Evidence Used
Git Commit Matcher Fuzzy-matches git commit -m messages against git log (threshold ≥ 0.85)
File Stat Stats artifacts created by touch, mkdir, npm init, git init, python -m venv, etc.
Package Manager Stats Homebrew Cellar, pip dist-info, npm node_modules, Cargo registry, gem dirs
Docker Inspector Runs docker image inspect <tag> --format='{{.Created}}'
Venv / Lockfile Stats Gemfile.lock, go.sum, composer.lock, cloned .git dirs, ssh-keygen output

Multi-Repo Collision Trap: Git searches are scoped to the CWD-derived repo first, preventing the same commit message from matching the wrong project.

Phase C — Anchor Interpolation Engine
Commands between two detected anchors are distributed linearly:

t_i = t_a + (t_b − t_a) × (i − i_a) / (i_b − i_a)

Example:

[500] npm install express  → 🔍 ANCHOR  Tue 14:00  (package.json mtime)
[501] npm start            → 📐 INTERP  Tue 14:07  (interpolated between anchors)
[502] git commit -m add  → 🔍 ANCHOR  Tue 14:15  (git log: myapp@a3f9b2c)

🏷️ Chain of Custody Badge

Every recovered command gets a recovery_source string persisted to the database. It renders in the TUI as a badge below the command:

  • 14:00:03  npm install express
      [🔍 stat: package.json mtime]
  • 14:07:31  npm start
      [🔍 Interpolated (between stat: package.json mtime → git log: myapp@a3f9b2c)]
  • 14:15:44  git commit -m "add express"
      [🔍 git log: myapp@a3f9b2c]

🌲 TUI Session Labels

Label Meaning
✨ session (14:00 - 14:45) Real EXTENDED_HISTORY timestamp
🔍 Recovered Archive (38 cmds • 14:00 - 14:45) Detective found anchors + interpolated
📦 Legacy Archive (12 recovered cmds) Zero forensic evidence, fully synthetic

Database Changes

  • New recovery_source TEXT column on commands table (safe migration, NULL for real timestamps)
  • All four get_*_sessions methods updated to read recovery_source back from DB

Test Suite

155 passed, 1 skipped, 0 failures

New tests/test_timestamp_detective.py with full coverage of:

  • Virtual CWD tracker (cd/pushd/popd edge cases)
  • All 5 forensic detectors
  • Anchor interpolation (prefix/suffix gaps, multi-anchor gaps, empty list)
  • Full resolve_all() pipeline integration

Install / Upgrade

pip install termstory==0.2.9
# or
pip install --upgrade termstory

PyPI: https://pypi.org/project/termstory/0.2.9/
Docs: See README for full Timestamp Detective architecture deep-dive.