Skip to content

Releases: amitnexTech/trailmem

v0.1.13 — dashboard polish and project readiness

Choose a tag to compare

@amitnexTech amitnexTech released this 03 Aug 08:23

Highlights

  • Improved dashboard graph layout for clearer navigation.
  • Updated public project status to v0.1.13 and corrected package repository links.
  • Added a Code of Conduct and linked community, contribution, and security guidance.

Verification

  • All 10 project test scripts pass.
  • Documentation lint passes with 0 errors and 0 warnings.
  • Built wheel and sdist were inspected; an isolated package install reports v0.1.13.

trailmem 0.1.12 — cwd isolation (complete)

Choose a tag to compare

@amitnexTech amitnexTech released this 01 Aug 16:49

Completes the -P anti-shadow fix that 0.1.11 only half-shipped. First PyPI release since 0.1.9 — it also carries the 0.1.10 Kiro hook fix.

The bug

Every host launches the server as <python> -u -m trailmem.mcp_server and every hook as <python> -m trailmem hook .... python -m puts the launching process cwd at sys.path[0], so any agent whose workspace was a checkout of this project imported the working tree instead of the installed package — silently running uncommitted code. Because content_hash covers absolute paths, memories written that way never deduped against the installed copy. Live-hit: every registered host on the maintainer machine had been running the source tree, not 0.1.9, for days.

The fix

  • New trailmem/hosts/_util.py helpers: safe_path_flag() returns -P on Python 3.11+ and -I on 3.10 (where -P does not exist and would abort startup); hook_python() applies the same flag to every hook command line.
  • integrate.mcp_command() now returns [flag, "-u", "-m", "trailmem.mcp_server"].
  • All four hook-emitting hosts (claude, codex, kiro, antigravity) build command lines via hook_python() instead of hardcoding sys.executable.
  • test_phase0 asserts the exact arg list, safe_path_flag(), and that hook_python() ends with the flag — the flag cannot silently regress.

Upgrading

uv tool install --force trailmem

Then re-run trailmem integrate in a real terminal and restart your agents, so the registered command lines pick up the flag.

Docs updated: README, docs/cli.md, docs/mcp.md, docs/host-integration.md. All 10 tests pass.

trailmem 0.1.11 — partial -P anti-shadow (superseded by 0.1.12)

Choose a tag to compare

@amitnexTech amitnexTech released this 01 Aug 16:49

First attempt at the cwd-shadowing fix: hook command lines gained python -P -m so the launching cwd is kept off sys.path[0].

Incomplete — use 0.1.12 instead. mcp_command() did not get the flag: a line-numbered sed silently no-oped, and the test suite still passed because it asserted the old arg shape. The MCP server therefore kept importing the working tree.

Release page backfilled 2026-08-01 for history; this version was never published to PyPI.

trailmem 0.1.10 — Kiro user-level hook fix

Choose a tag to compare

@amitnexTech amitnexTech released this 01 Aug 16:49

Kiro host adapter now installs its SessionStart hook at user level (~/.kiro/hooks/) instead of per workspace.

kiro-cli 2.14.2 merges both hook scopes and fires each independently, so a user-level file plus a workspace file injected the briefing twice per session. This overturns the earlier 2.10.0 finding that only the workspace dir executes. One user-level install now covers every workspace, and installing deletes any <workspace>/.kiro/hooks/trailmem-session-start.json written by <= 0.1.9.

  • kiro.py: user-level hook, workspace copy dropped and cleaned up on install
  • docs/hooks.md updated to describe 2.14.2 behaviour
  • .agents/ gitignored (the agy workspace skill carries machine-local paths)

Release page backfilled 2026-08-01; the tag was pushed at the time but never published to PyPI.

trailmem 0.1.9 — full multi-host welcome + tool-context transport

Choose a tag to compare

@amitnexTech amitnexTech released this 23 Jul 13:44

What's new

This release completes the multi-host welcome + attribution arc: every host Amit uses now has a proven, codified welcome mechanism and full attribution.

Antigravity (agy) — full transport

  • PreToolUse tool-context transport: every agy MCP call goes through one dispatcher (call_mcp_tool, {ServerName, ToolName, Arguments}). A PreToolUse hook echoes the full Arguments back with canonical session_context added — for trailmem calls only; foreign servers get a bare {} no-op (never a permission decision for tools that aren't ours).
  • Welcome flipped to session-aware: the PreInvocation welcome now uses sessions.welcome() (not the stateless fallback). Live-proven: a real agy conversation stored a memory that landed with session_id antigravity:<conversationId> and write_count incremented, so "saved N" statusline tracking now completes.
  • ephemeralMessageuserMessage: the injected briefing persists as a conversation step across all turns (ephemeral was one-invocation-only and evaporated by turn 2).

Kiro — workspace-scoped hook (live-fixed)

  • Kiro executes only <workspace>/.kiro/hooks/; user-level ~/.kiro/hooks/ is dead. The SessionStart hook is now a per-workspace artifact (re-run trailmem integrate in each Kiro workspace).
  • .kiro/ gitignored (hook file carries a machine-local absolute path).

Claude Code — hooks artifact codified

  • integrate now manages SessionStart + SessionEnd hook groups in ~/.claude/settings.json. SessionStart carries matcher startup|clear (a matcherless group re-injects the briefing on every resume/compaction). Install/remove touch only groups whose command runs trailmem hook; foreign groups survive; a legacy matcherless trailmem group is upgraded in place.

Codex — hooks repointed to global python

  • hooks.json SessionStart command now uses the canonical global-tool interpreter (was a dev-venv path).

Other

  • trailmem edit --project <abs|global>: a memory's project scope is now editable in place (no new MCP tool — per-session token cost stays flat).
  • New test suites: test_agy_hook.py, test_claude_hook.py. All 10 suites pass.

Upgrade

uv tool install trailmem@latest --force
trailmem integrate    # re-run to install the Kiro workspace hook + Claude hooks artifact

Then restart every agent so running MCP servers pick up the new code (trailmem doctor flags stale servers).

Full diff: v0.1.8...v0.1.9

trailmem 0.1.8 — hosts/ modularisation, doctor host checks, required file params

Choose a tag to compare

@amitnexTech amitnexTech released this 23 Jul 13:45

What's new

Hosts modularised

integrate.py (one 588-line file, all 9 hosts' knowledge tangled + hand-synced uninstall lists) split into trailmem/hosts/one module per host (claude, codex, kiro, kilo, opencode, antigravity, zed, cursor, windsurf). Every Artifact pairs install() with remove(), and run/uninstall iterate the same registry — install/uninstall drift is structurally impossible. Adding a host = one file + one registry entry. Shared plumbing in hosts/_util.py.

Narrow-write / wide-detect policy

integrate now auto-writes config only for verified hosts (Claude via claude mcp add, Codex TOML, Kiro, Kilo). OpenCode/Antigravity/Zed/Cursor/Windsurf stay detected but get the exact entry printed for manual add (flip write=True once verified). Detection stays broad and grows — stores are always attributed to the right agent_type.

trailmem doctor — host capability + drift + stale servers

  • Per-host artifact status (registered / not installed / stale launcher / missing agent pin).
  • Flags running stale trailmem.mcp_server processes — the recurring "old server kept writing" incident is now visible.
  • Caught and fixed a real gap live: Kiro SessionStart hook was missing.

code_files / doc_files now REQUIRED on store

Empty was indistinguishable from "no files touched". Missing/empty → ValidationError; literal 'none' → NULL. Enforced in store.store() so all paths (MCP/CLI/dashboard) apply it.

Other

  • Canonical identity via session_context (versioned object, authoritative; legacy session_id/agent_type params deprecated through 1.0).
  • Threat-model docs added.
  • .gitignore hardened (root scratch scripts caught by sdist leak-grep in the first 0.1.8 build).

Upgrade

uv tool install trailmem@latest --force
trailmem doctor   # check host artifacts + stale servers

Then restart every agent so running MCP servers pick up the new code.

Full diff: v0.1.7...v0.1.8

v0.1.7 — Windows support

Choose a tag to compare

@amitnexTech amitnexTech released this 18 Jul 22:33

0.1.7 — Windows support + uninstall

Windows (Phase 0 bleeding-stop)

  • Server launches via python -u -m trailmem.mcp_server (removed the trailmem-mcp script — Windows Smart App Control blocked the unsigned per-install .exe, silently killing host-spawned servers).
  • onnxruntime>=1.17,<1.21 pin — 1.21+ needs VC++ 14.40 (VS2022) which stock Windows lacks (WinError 1114 DllMain crash); 1.20.x loads clean on VC++ 14.28.
  • requires-python >=3.10,<3.13; all deps bounded both sides.
  • Broken onnxruntime / sqlite-vec now degrades to FTS-only (keyword search + exact-hash dedup) instead of crashing store/query.
  • UTF-8 console guard (console.configure()) + ASCII fallback marks so cp1252 consoles never crash the protocol stream.
  • integrate preserves the TRAILMEM_AGENT_TYPE env pin and upgrades old launcher entries in place.

New: trailmem uninstall

  • Surgically reverses everything integrate writes (host config keys, Codex TOML table, Claude via claude mcp remove, skills, commands) — leaves the rest of each config intact.
  • Memories at ~/.trailmem are KEPT by default (reinstall restores them). --purge erases them with a second typed confirmation.
  • Prints the package-removal command; never auto-runs it.

Other

  • trailmem update self-upgrade command; code_files / doc_files split; tx-rollback hardening; bundled usage skill.

v0.1.6 — portable save_session MCP prompt

Choose a tag to compare

@amitnexTech amitnexTech released this 17 Jul 08:33

Portable session-save

The save trigger now works across MCP clients, not just Claude Code.

  • save_session MCP prompt — the trailmem server exposes one MCP prompt. Any prompt-aware client surfaces it automatically, with zero config and no crash risk: Claude Code (/mcp__trailmem__save_session), VS Code agent mode (/mcp.trailmem.save_session), Cursor, Windsurf. It returns the extract-and-store instruction; the agent then calls trailmem_store.
  • /tm-save — the Claude Code command file stays as a convenience alias.
  • Plain text — clients without prompt support (Codex, aider) just get told "save this session to trailmem"; the trailmem_store tool is universal, so nothing is lost.

Docs cover the full trigger model and the per-agent config landmines to avoid when wiring an unlisted agent (VS Code uses servers; Continue/Goose use YAML; aider has no MCP).

Upgrade: uv tool upgrade trailmem

v0.1.5 — session-save awareness (/tm-save, statusline, tips)

Choose a tag to compare

@amitnexTech amitnexTech released this 17 Jul 06:33

Session-save awareness

A host end-of-session hook can't capture memory — it runs after the agent is gone and never sees the conversation. If an agent forgets to store, or you hit /exit, the session's context is lost silently. 0.1.5 adds four LLM-free surfaces to close that gap:

  • /tm-save — a Claude Code slash command (installed by trailmem integrate) that tells the still-running agent to store this session's decisions, lessons, and open tasks. Run it before /exit.
  • trailmem statusline — prints 🧠 trailmem: N saved this session, or an amber ⚠ 0 saved · /tm-save before exit when nothing's captured yet. Read-only, always exits 0 — wire it into your host statusline.
  • Welcome tip — the briefing now ends with a /tm-save reminder (universal across hosts).
  • Next-session flag — if the prior session stored nothing, the next welcome opens with a loud reminder.

None auto-generate memory content — capture stays the agent's job; these only surface the gap and give a one-command way to act on it.

Upgrade: uv tool upgrade trailmem (or pipx upgrade trailmem / pip install --upgrade trailmem). Re-run trailmem integrate to install the /tm-save command.

v0.1.4 — dashboard all-scope, local-time display, project-path validation

Choose a tag to compare

@amitnexTech amitnexTech released this 17 Jul 04:32

Highlights

Dashboard

  • Default scope is now all (global + every project) with a runtime scope switcher and per-project node colors — previously the dashboard defaulted to global-only and showed just a fraction of stored memories.
  • Connected-cluster highlight (full relationship-graph BFS) instead of direct-neighbors only.

Timestamps

  • Human-facing surfaces (CLI show, welcome, dashboard) now render created_at/updated_at in your local timezone. Storage stays UTC. A memory made near UTC midnight no longer shows on the wrong day.

Project scope safety

  • An explicitly-supplied project (param or TRAILMEM_PROJECT) must be an absolute path or "global" — a bare name like jarvis_build is now rejected, so a project's memories can no longer split between a bare name and its absolute-path form. Omitting it still auto-fills from cwd.

Also includes the earlier 0.1.1–0.1.3 fixes (Kilo 7.x MCP format, version single-sourcing, uv/pipx install guidance).

Upgrade: uv tool upgrade trailmem (or pipx upgrade trailmem / pip install --upgrade trailmem)