cli-mem 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cli_mem-0.2.0 → cli_mem-0.3.0}/.github/workflows/release.yml +13 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/PKG-INFO +1 -1
- {cli_mem-0.2.0 → cli_mem-0.3.0}/pyproject.toml +1 -1
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/__init__.py +1 -1
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/capture.py +4 -4
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/cli.py +491 -63
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/groups.py +30 -16
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/models.py +22 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/patterns.py +4 -5
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/search.py +3 -1
- {cli_mem-0.2.0 → cli_mem-0.3.0}/src/mem/storage.py +48 -19
- cli_mem-0.3.0/src/mem/variables.py +324 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/conftest.py +3 -1
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/test_capture.py +91 -23
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/test_groups.py +660 -164
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/test_patterns.py +53 -20
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/test_search.py +45 -11
- {cli_mem-0.2.0 → cli_mem-0.3.0}/tests/test_storage.py +17 -4
- {cli_mem-0.2.0 → cli_mem-0.3.0}/.github/workflows/ci.yml +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/.gitignore +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/ARCHITECTURE.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/LICENSE +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/PHILOSOPHY.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/README.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/assets/.gitkeep +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/docs/decisions/001-jsonl-over-sqlite.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/docs/decisions/002-apple-fm-sdk-for-patterns.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/docs/decisions/003-no-daemon.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/docs/decisions/004-per-repo-jsonl.md +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/hooks/mem.zsh +0 -0
- {cli_mem-0.2.0 → cli_mem-0.3.0}/install.sh +0 -0
|
@@ -18,6 +18,19 @@ jobs:
|
|
|
18
18
|
with:
|
|
19
19
|
python-version: "3.12"
|
|
20
20
|
|
|
21
|
+
- name: Verify version matches tag
|
|
22
|
+
run: |
|
|
23
|
+
TAG="${{ github.ref_name }}"
|
|
24
|
+
TAG_VERSION="${TAG#v}"
|
|
25
|
+
PKG_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
26
|
+
INIT_VERSION=$(python -c "exec(open('src/mem/__init__.py').read()); print(__version__)")
|
|
27
|
+
echo "Tag: $TAG_VERSION | pyproject.toml: $PKG_VERSION | __init__.py: $INIT_VERSION"
|
|
28
|
+
if [ "$TAG_VERSION" != "$PKG_VERSION" ] || [ "$TAG_VERSION" != "$INIT_VERSION" ]; then
|
|
29
|
+
echo "::error::Version mismatch! Tag=$TAG_VERSION pyproject.toml=$PKG_VERSION __init__.py=$INIT_VERSION"
|
|
30
|
+
echo "Fix: update both pyproject.toml and src/mem/__init__.py, commit, then re-tag."
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
21
34
|
- name: Build and publish to PyPI
|
|
22
35
|
env:
|
|
23
36
|
TWINE_USERNAME: __token__
|
|
@@ -108,9 +108,7 @@ class SessionTracker:
|
|
|
108
108
|
def _save_state(self, state: SessionState) -> None:
|
|
109
109
|
"""Persist session state to disk."""
|
|
110
110
|
storage.ensure_dirs()
|
|
111
|
-
self._state_path.write_text(
|
|
112
|
-
state.model_dump_json(), encoding="utf-8"
|
|
113
|
-
)
|
|
111
|
+
self._state_path.write_text(state.model_dump_json(), encoding="utf-8")
|
|
114
112
|
|
|
115
113
|
def _clear_state(self) -> None:
|
|
116
114
|
"""Remove session state file."""
|
|
@@ -169,7 +167,8 @@ class SessionTracker:
|
|
|
169
167
|
session = WorkSession(
|
|
170
168
|
id=state.session_id,
|
|
171
169
|
summary=summary,
|
|
172
|
-
started_at=state.last_command_ts
|
|
170
|
+
started_at=state.last_command_ts
|
|
171
|
+
- (len(state.commands) * 10), # approximate
|
|
173
172
|
ended_at=state.last_command_ts,
|
|
174
173
|
dir="", # not tracked in state for simplicity
|
|
175
174
|
repo=state.last_repo,
|
|
@@ -186,6 +185,7 @@ class SessionTracker:
|
|
|
186
185
|
try:
|
|
187
186
|
import asyncio
|
|
188
187
|
from mem.patterns import generate_session_summary
|
|
188
|
+
|
|
189
189
|
result = asyncio.run(generate_session_summary(commands))
|
|
190
190
|
if result:
|
|
191
191
|
return result
|