Add safe chat update command

This commit is contained in:
Зарубин Филипп
2026-06-23 18:40:30 +03:00
parent 93b2f49895
commit 18ee35e0b9
6 changed files with 40 additions and 1 deletions
+6
View File
@@ -78,6 +78,12 @@ Update an existing clone:
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
```
Agent chat update:
```text
Mnemazine update
```
After installation, open this folder as an Obsidian vault:
```text
+6
View File
@@ -77,6 +77,12 @@ bash setup.sh # пошагово, с вопросами (куда кла
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
```
Обновить через чат агента:
```text
Mnemazine update
```
После установки откройте эту папку как Obsidian-vault:
```text
+1 -1
View File
@@ -14,7 +14,7 @@ USER_BIN="$HOME/.local/bin"
mkdir -p "$INBOX" "$VAULT" "$REPORTS" "$STATE" "$BIN" "$USER_BIN" "$ROOT/.mnemazine/cache"
mkdir -p "$VAULT/00 System" "$VAULT/01 Concepts" "$VAULT/02 Tools" "$VAULT/03 Agents" "$VAULT/04 Projects" "$VAULT/99 Archive"
if command -v python3 >/dev/null 2>&1; then
if [ "${MNEMAZINE_SKIP_DEPS:-0}" != "1" ] && command -v python3 >/dev/null 2>&1; then
python3 -m venv "$ROOT/.venv" || true
"$ROOT/.venv/bin/python" -m pip install --upgrade pip
"$ROOT/.venv/bin/python" -m pip install -r "$ROOT/requirements.txt" || true
+1
View File
@@ -12,6 +12,7 @@
"install:local": "bash install.sh",
"start": "bash scripts/mnemazine-desktop-protocol.sh",
"desktop": "bash scripts/mnemazine-desktop-protocol.sh",
"update": "bash scripts/mnemazine-update.sh",
"run": "node scripts/mnemazine-run.mjs",
"protocol:desktop": "bash scripts/mnemazine-desktop-protocol.sh",
"graph:refresh": "node scripts/mnemazine-refresh-graphify.mjs --json",
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="${MNEMAZINE_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
cd "$ROOT"
git pull --ff-only
MNEMAZINE_FROM_SETUP=1 MNEMAZINE_SKIP_DEPS=1 bash install.sh
bash -n bin/mnemazine install.sh setup.sh scripts/mnemazine-desktop-protocol.sh scripts/mnemazine-telegram-sync.sh scripts/mnemazine-update.sh
node --check scripts/mnemazine-run.mjs
node --check scripts/mnemazine-complete-check.mjs
node --check scripts/mnemazine-synthesize.mjs
node --check scripts/mnemazine-verify.mjs
echo "Mnemazine updated."
echo "Run from chat: Mnemazine"
echo "Run from terminal: mnemazine"
+8
View File
@@ -11,6 +11,14 @@ Use it when the user gives raw material and wants it preserved as durable knowle
## Chat Shortcut
If the user says `Mnemazine update`, `Мнемозина update`, or `обнови Mnemazine`, run from the project root:
```bash
npm run update
```
This updates from GitHub with `git pull --ff-only`, preserves local config, reinstalls local wrappers, and runs syntax checks. It must not process inbox files.
If the user says `Mnemazine`, `Mnemazine inbox`, `Мнемозина`, `Мнемозина, inbox`, or `запусти Мнемозину`, run from the project root:
```bash