feat(llm): robust Claude binary discovery (npm/Homebrew/standalone/Desktop/VSCode)

Resolve claude independently of install method: explicit env -> login-shell PATH (respects however the user installed it: Desktop, npm global, standalone) -> common absolute locations -> newest VSCode extension binary. No longer tied to the VSCode path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Зарубин Филипп
2026-06-18 17:22:35 +03:00
co-authored by Claude Opus 4.8
parent e09dc6332d
commit fb0831bb92
3 changed files with 44 additions and 10 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ All LLM calls go through one provider-abstracted module: `scripts/mnemazine-llm.
| Variable | Default | Purpose |
|----------|---------|---------|
| `MNEMAZINE_LLM` | `claude` | Engine: `claude` (primary) or `codex` (parity). |
| `MNEMAZINE_CLAUDE_BIN` | `claude` (PATH) | Path to the Claude CLI. Pin it for headless runs. |
| `MNEMAZINE_CLAUDE_BIN` | auto-discover | Claude CLI: auto-found via login-shell PATH, common installs (npm/Homebrew/standalone/Desktop), or VSCode. Override to pin. |
| `MNEMAZINE_CODEX_BIN` | `/Applications/Codex.app/Contents/Resources/codex` | Path to the Codex binary. |
| `MNEMAZINE_LLM_TIMEOUT_MS` | `420000` | Per-call timeout. |
| `MNEMAZINE_DEEP` | unset | `1` enables deep mode (enrich + atomize + verify + digest). |
+1 -1
View File
@@ -30,7 +30,7 @@ npm run synthesize -- --deep
| Переменная | По умолчанию | Назначение |
|----------|---------|---------|
| `MNEMAZINE_LLM` | `claude` | Движок: `claude` (primary) или `codex` (паритет). |
| `MNEMAZINE_CLAUDE_BIN` | `claude` (PATH) | Путь к Claude CLI. Зафиксируйте для headless-прогонов. |
| `MNEMAZINE_CLAUDE_BIN` | авто | Claude CLI: авто-поиск через login-shell PATH, типовые установки (npm/Homebrew/standalone/Desktop), VSCode. Переопределите чтобы зафиксировать. |
| `MNEMAZINE_CODEX_BIN` | `/Applications/Codex.app/Contents/Resources/codex` | Путь к бинарю Codex. |
| `MNEMAZINE_LLM_TIMEOUT_MS` | `420000` | Таймаут одного вызова. |
| `MNEMAZINE_DEEP` | не задано | `1` включает deep-режим (enrich + атомизация + проверка + digest). |