Skip to content

feat: token-efficient recall and live help (v4.2.0)#160

Merged
CryptoJones merged 1 commit into
mainfrom
feat/token-efficient-recall-help-github
Jul 18, 2026
Merged

feat: token-efficient recall and live help (v4.2.0)#160
CryptoJones merged 1 commit into
mainfrom
feat/token-efficient-recall-help-github

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

Summary

  • proactively inject one compact relevant memory before lower-capability models reach PreToolUse
  • add bounded recall-note, pageable search, and actionable guard recovery instructions
  • add live /omind help syntax through the MCP server, CLI, and packaged Claude/Codex skill
  • make economy the default, compact SessionStart priming, and account for MCP/cache/session traffic
  • refresh the dependency lock to advisory-fixed releases and ship version 4.2.0

Verification

  • ruff check .
  • mypy src
  • pytest -q --cov=omind --cov-report=term — 779 passed, 1 skipped, 85.55% coverage
  • packaged skill validator — valid
  • pip-audit — no known vulnerabilities
  • wheel and sdist build; packaged skill/help/recall assets verified

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

Comment thread src/omind/cli.py


def _run_help(args: argparse.Namespace) -> int:
from omind.help_system import render_help
Comment thread src/omind/guard.py
"""
verdict = decide(action)
if not verdict.allow and verdict.rule_id == "omi-gate" and omi_dir is not None:
from omind import retrieve
Comment thread src/omind/guard.py
if gate_paused() or omi_dir is None:
return ""

from omind import ai_usage, recall, retrieve
Comment thread src/omind/help_system.py
``omind mesh sync``, and ``/omind help guard``.
"""
# Imported lazily to keep ``omind.cli -> omind.server`` free of a cycle.
from omind.cli import build_parser
Comment thread src/omind/hooks.py
def _note_digest(text: str, limit: int) -> str:
"""Strip redundant frontmatter/metadata from a priming note."""
try:
from omind.store import parse_note
Comment thread src/omind/hooks.py
try:
with path.open(encoding="utf-8", errors="replace") as stream:
sample = stream.read(2_000).casefold()
except OSError:
Comment thread src/omind/recall.py
from pathlib import Path
from typing import Any

from omind.store import NoteFields, OmiStore, parse_note
Comment thread src/omind/server.py
from mcp.server.fastmcp import FastMCP

from omind import graph
from omind.help_system import render_help
@CryptoJones
CryptoJones merged commit e9a6cd1 into main Jul 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants