Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.0] - 2026-07-16

### Added
- **OMI-attributable AI token accounting and expense profiles.** A privacy-safe,
per-vault JSONL ledger records session-priming estimates and provider-reported
verifier/checkpoint usage without storing prompts or responses. `omind ai
profile low|medium|high` applies hard context budgets and progressively disables
optional model work; `omind ai usage` reports exact, estimated, cached, and
avoided tokens in text or JSON. The local web app adds the same profile control
and 24-hour/7-day/30-day/all-time usage dashboard through `/api/ai/*` endpoints.

### Security
- Parse AI-usage reporting windows with a bounded direct grammar rather than a
regular expression over public API input, eliminating the polynomial-runtime
pattern identified by CodeQL during the 4.0.0 release review.

### Fixed
- Preserve backslashes when resolving `git -C` targets on Windows, and keep
POSIX permission-bit assertions scoped to platforms that implement them.

## [3.8.6] - 2026-07-06

### Changed
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ reads and writes as long-term memory. `omind` does two things with it:
- **`omind checkpoint`** — a scheduled job that records what the agent has been
doing every N minutes into a daily worklog note, by mining the trails the hooks
already capture (see [Activity checkpoints](#activity-checkpoints) below).
- **`omind ai`** — account for tokens attributable to OMI and select a manual
low/medium/high model-expense profile that bounds priming and optional model calls.

The web UI works **fully offline** (fonts, styles, and the Markdown renderer are
vendored — no CDN). It shows **backlinks** for the open note, refreshes the list
Expand Down Expand Up @@ -360,6 +362,32 @@ text. Because it's a scheduled job — the same systemd-user-timer mechanism as
`omind backup` and `omind mesh` — it doesn't depend on the agent's cooperation,
which is what makes it a reliable *record* rather than a hopeful instruction.

## AI token usage and expense profiles

omind keeps a machine-local, per-vault ledger for the AI tokens it causes: session
priming injected into an agent plus the verifier and optional checkpoint
`claude -p` calls. It does **not** parse or claim the rest of an agent session.
Provider-reported subprocess usage is recorded exactly; provider-neutral priming
is shown as an estimate (`ceil(characters / 4)`) and never mixed into the
provider-reported subtotal. The ledger contains counts and operational metadata
only — never prompts, responses, note contents, or credentials.

```bash
omind ai profile # show saved/effective profile
omind ai profile medium # persist low, medium, or high per vault
omind ai usage --since 7d # 24h, 7d, 30d, or all
omind ai usage --since all --json # machine-readable report
```

Profiles describe the expense of the model already selected; they do not select a
model. `low` is the backward-compatible default (48,000-character priming cap and
all optional calls), `medium` halves the priming/prompt inputs, and `high` caps
priming at 8,000 characters and uses deterministic verifier/checkpoint behavior
without optional model calls. Set `OMI_AI_EXPENSE=low|medium|high` for a temporary
override; it wins over the saved profile. The web app's **AI Usage** view exposes
the same profile control, time windows, exact/estimated breakdown, per-operation
totals, and estimated avoided tokens.

## Other agents: Hermes, OpenClaw, OpenCode, Codex, Gemini, Claude Desktop, Kiro, VS Code, Amazon Q

[Claude Code](https://github.com/anthropics/claude-code) is the default, but the
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "omind"
version = "3.8.6"
version = "4.0.0"
description = "Reproduce the OMI/Obsidian memory integration for AI agents, plus a local web app to view, edit, and add memory entries."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion src/omind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright 2026 Aaron K. Clark
"""omind — OMI/Obsidian memory tooling for AI agents."""

__version__ = "3.8.6"
__version__ = "4.0.0"
Loading