Skip to content

Commit c920ffc

Browse files
authored
Merge pull request #15 from rubakas/refactor/option-a-phase0-packaging
Simplify packaging (uv) + architecture; fix cost-report cache cost; add credential & precompact hooks
2 parents c56dde2 + 1d6954e commit c920ffc

42 files changed

Lines changed: 4781 additions & 661 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@ jobs:
1313
python-version: ["3.10", "3.12"]
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v5
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Install dependencies
21-
run: |
22-
pip install -e ".[dev]"
23-
export PYTHONPATH=.
21+
run: uv sync
2422
- name: Run tests
25-
run: PYTHONPATH=. python3 -m pytest tests/ -v
23+
run: uv run pytest tests/ -v
2624
- name: Verify build
27-
run: PYTHONPATH=. python3 -m agent_notes build
25+
run: uv run python -m agent_notes build
2826
- name: Validate configs
29-
run: PYTHONPATH=. python3 -m agent_notes validate
27+
run: uv run python -m agent_notes validate

README.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ pipx install agent-notes
3131
agent-notes install
3232
```
3333

34-
Update anytime:
35-
36-
```bash
37-
pipx upgrade agent-notes && agent-notes install
38-
```
39-
4034
**venv + pip (if you prefer to manage your own environment):**
4135

4236
```bash
@@ -45,12 +39,34 @@ pip install agent-notes
4539
agent-notes install
4640
```
4741

48-
Update anytime:
42+
### Upgrade from a previous version
43+
44+
**Update in place (normal upgrade):**
45+
46+
With pipx:
47+
```bash
48+
pipx upgrade agent-notes && agent-notes install
49+
```
4950

51+
With venv:
5052
```bash
5153
pip install --upgrade agent-notes && agent-notes install
5254
```
5355

56+
**Clean reinstall (from an older version, fresh slate):**
57+
58+
If you are on a significantly older version or want a fresh configuration, uninstall completely and reinstall:
59+
60+
With pipx:
61+
```bash
62+
agent-notes uninstall && pipx uninstall agent-notes && pipx install agent-notes && agent-notes install
63+
```
64+
65+
With venv:
66+
```bash
67+
agent-notes uninstall && pip uninstall agent-notes && pip install agent-notes && agent-notes install
68+
```
69+
5470
### Local build (developers)
5571

5672
```bash
@@ -87,6 +103,36 @@ agent-notes config provider openrouter # prints "configured" or "no key"
87103

88104
</details>
89105

106+
<details>
107+
<summary>Uninstall</summary>
108+
109+
To fully remove agent-notes:
110+
111+
**pipx:**
112+
113+
```bash
114+
agent-notes uninstall
115+
pipx uninstall agent-notes
116+
```
117+
118+
Run `agent-notes uninstall` first — it removes agent files, hooks, settings.json entries, context file, and state that agent-notes installed. Then `pipx uninstall` removes the package itself. The `agent-notes uninstall` command must run while the CLI is still installed.
119+
120+
**venv:**
121+
122+
```bash
123+
agent-notes uninstall
124+
deactivate
125+
rm -rf .venv
126+
```
127+
128+
Run `agent-notes uninstall` first to clean up installed components, then deactivate the environment and delete the `.venv` directory.
129+
130+
**Note on memory and vault permissions:**
131+
132+
If you configured agent-notes to access your memory vault (Obsidian or local), those read/write permissions are intentionally left in place after uninstalling so Claude Code and other tools can still access your notes. To remove them, edit `~/.claude/settings.json` and delete the entries under `permissions.allow` that reference your vault path (e.g. `Read(/path/to/your/vault/**)`, `Write(/path/to/your/vault/**)`, `Edit(/path/to/your/vault/**)`).
133+
134+
</details>
135+
90136
---
91137

92138
<details>
@@ -377,6 +423,8 @@ By default, `agent-notes install` re-runs the interactive wizard and prompts for
377423

378424
The plugin build scripts (`scripts/build-claude-plugin.sh`, `scripts/build-opencode-plugin.sh`) automatically use `.venv/bin/python` when present, fall back to system `python3`, and honor a `PYTHON=` override.
379425

426+
**Note:** `uv` is used only in the local development and release workflow (see `scripts/release`). It is not required to install or use agent-notes — end users should use `pipx` or `pip` / `venv`.
427+
380428
### Test structure
381429

382430
- `tests/functional/` — Unit tests

agent_notes/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def main():
291291

292292
# hook
293293
p_hook = subparsers.add_parser("hook", help="Claude Code hook integrations")
294-
p_hook.add_argument("subaction", choices=["memory-bridge", "session-discover"],
294+
p_hook.add_argument("subaction", choices=["memory-bridge", "precompact-memory-bridge", "session-discover", "guard-credentials"],
295295
help="Hook to run")
296296

297297
# cost-report

0 commit comments

Comments
 (0)