Trelix v3.1.

设计师小李 Novice 1h ago 186 views 5 likes 2 min read

The leap from Trelix v2.11.0 to v3.1.1 might look like a standard version bump, but it's actually a complete shift in what the tool is capable of. We're talking about 68 commits and nearly 20k lines of new code. The interesting part? Almost every single major addition is opted-in. If you just update and don't touch your config, your context assembly remains byte-identical to v2.12.0. It’s a rare case of a "major" release that doesn't break existing workflows because everything is additive.

The most significant addition for me is the hash-chained audit trail. It transforms the tool from a simple utility into something you can actually use for compliance or security auditing. It uses a separate SQLite database (defaulting to /.trelix/audit.db) so that the audit trail doesn't vanish if you happen to reindex your main database.

The technical implementation of the chain is straightforward but robust. Each entry's hash is a SHA256 of the previous hash combined with a canonical JSON representation of the content. To prevent "silent" deletions at the end of the chain—which is a common weakness in simple hash chains—Trelix maintains an audit_meta table with a running count and a head hash.

I tested this by manually messing with the DB to see if it would catch the tampering:

Trelix v3.1.

# Manually corrupting a record in the audit log
$ sqlite3 audit.db "UPDATE audit_log SET principal='attacker' WHERE id=2"

# Running the verification command
$ trelix audit verify --db audit.db
Audit chain TAMPERED — first divergent entry id: 2

If you delete the most recent row, it still flags it because the audit_meta count won't match the actual chain length. Even the exit codes are handled strictly; if SQLite can't open the file, it returns 2 instead of 0, ensuring a "failed check" is never mistaken for a "clean check" in a CI/CD pipeline.

Trelix v3.1.

Beyond the auditing, v3.0.0 introduced five other heavy-hitting features:

  • Anthropic extended thinking: Support for reasoning models.
  • Model-aware context budgets: Better control over token usage.
  • Active VS Code extension: It can now perform actions rather than just displaying text.
  • OIDC SSO: Finally making it enterprise-ready.
  • Query-conditioned context compression: To squeeze more value out of the prompt window.
Trelix v3.1.

To actually use these, you have to flip the switches in your environment. For example, to get the audit trail running, you need:

export TRELIX_AUDIT_ENABLED=true
trelix serve ./my-repo

Trelix v3.1.

You can then export these logs via trelix audit export --format ndjson to pipe them into a SIEM like Vector or Filebeat. For anyone building a production AI workflow, this level of traceability is a huge win. It's essentially a deep dive into making LLM interactions accountable.

pythonsecuritysystemdesignAI ProgrammingAI Coding
Step-by-step guides and pitfalls for this path are in an AI side-hustle playbook, with plenty of directly applicable cases.

All Replies (3)

T
TaylorDreamer Intermediate 1h ago
Finally updated last week. The speed difference is actually noticeable on my local machine.
0 Reply
D
Drew36 Advanced 1h ago
Did they mention the new API endpoints? Saved me a ton of time on my last build.
0 Reply
J
JamieCrafter Advanced 1h ago
Does the new version handle memory leaks better? Had a few crashes on the old build.
0 Reply

Write a Reply

Markdown supported