Add safe chat update command
This commit is contained in:
@@ -78,6 +78,12 @@ Update an existing clone:
|
|||||||
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
|
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:
|
After installation, open this folder as an Obsidian vault:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|||||||
@@ -77,6 +77,12 @@ bash setup.sh # пошагово, с вопросами (куда кла
|
|||||||
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
|
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Обновить через чат агента:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Mnemazine update
|
||||||
|
```
|
||||||
|
|
||||||
После установки откройте эту папку как Obsidian-vault:
|
После установки откройте эту папку как Obsidian-vault:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ USER_BIN="$HOME/.local/bin"
|
|||||||
mkdir -p "$INBOX" "$VAULT" "$REPORTS" "$STATE" "$BIN" "$USER_BIN" "$ROOT/.mnemazine/cache"
|
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"
|
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
|
python3 -m venv "$ROOT/.venv" || true
|
||||||
"$ROOT/.venv/bin/python" -m pip install --upgrade pip
|
"$ROOT/.venv/bin/python" -m pip install --upgrade pip
|
||||||
"$ROOT/.venv/bin/python" -m pip install -r "$ROOT/requirements.txt" || true
|
"$ROOT/.venv/bin/python" -m pip install -r "$ROOT/requirements.txt" || true
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"install:local": "bash install.sh",
|
"install:local": "bash install.sh",
|
||||||
"start": "bash scripts/mnemazine-desktop-protocol.sh",
|
"start": "bash scripts/mnemazine-desktop-protocol.sh",
|
||||||
"desktop": "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",
|
"run": "node scripts/mnemazine-run.mjs",
|
||||||
"protocol:desktop": "bash scripts/mnemazine-desktop-protocol.sh",
|
"protocol:desktop": "bash scripts/mnemazine-desktop-protocol.sh",
|
||||||
"graph:refresh": "node scripts/mnemazine-refresh-graphify.mjs --json",
|
"graph:refresh": "node scripts/mnemazine-refresh-graphify.mjs --json",
|
||||||
|
|||||||
Executable
+18
@@ -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"
|
||||||
@@ -11,6 +11,14 @@ Use it when the user gives raw material and wants it preserved as durable knowle
|
|||||||
|
|
||||||
## Chat Shortcut
|
## 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:
|
If the user says `Mnemazine`, `Mnemazine inbox`, `Мнемозина`, `Мнемозина, inbox`, or `запусти Мнемозину`, run from the project root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user