diff --git a/reports/stale-pages.md b/reports/stale-pages.md index 8a45152..c1137a1 100644 --- a/reports/stale-pages.md +++ b/reports/stale-pages.md @@ -3,14 +3,14 @@ pageType: report id: report.stale-pages title: Stale Pages status: active -updatedAt: 2026-09-22T04:35:42.704Z +updatedAt: 2026-09-24T20:57:50.712Z --- # Stale Pages ## Generated -- Stale pages: 35 +- Stale pages: 37 - [2026 07 14](../sources/2026-07-14.md): aging (2026-07-14T17:17:04.526Z) - [2026 07 14 dream report](../sources/2026-07-14-dream-report.md): aging (2026-07-14T17:17:04.175Z) @@ -18,8 +18,8 @@ updatedAt: 2026-09-22T04:35:42.704Z - [2026 08 18 dream report](../sources/2026-08-18-dream-report.md): aging (2026-08-18T00:15:00.736Z) - [AGENTS.md](../sources/agents-md.md): aging (2026-07-16T22:18:24.151Z) - [AGENTS.md — Main Orchestration Layer](../sources/agents-md-main-orchestration-layer.md): aging (2026-08-22T05:22:11.535Z) -- [all-sources](../sources/all-sources.md): aging (2026-06-26T14:04:08.918Z) -- [CHANGELOG](../sources/changelog.md): aging (2026-06-25T18:02:53.657Z) +- [all-sources](../sources/all-sources.md): stale (2026-06-26T14:04:08.918Z) +- [CHANGELOG](../sources/changelog.md): stale (2026-06-25T18:02:53.657Z) - [DREAMS](../sources/dreams.md): aging (2026-08-22T02:10:59.958Z) - [EMBEDDING / IMAGE MODEL — ограничение VRAM](../sources/embedding-trading-source.md): aging (2026-08-16T23:50:00+03:00) - [EMBEDDING TRADING](../sources/embedding-trading.md): aging (2026-08-21T17:04:21.004Z) @@ -34,6 +34,8 @@ updatedAt: 2026-09-22T04:35:42.704Z - [IDENTITY.md - Who Am I?](../sources/identity-md-who-am-i.md): aging (2026-07-02T06:40:20.761Z) - [IDENTITY.md - Who Am I?](../sources/identity-source.md): aging (2026-08-16T23:50:00+03:00) - [Memory Bridge (main, coder-agent, evaluator-agent, humanizer-agent, setup-agent): 2026-08-22](../sources/bridge-workspace-4c6d747f-memory-2026-08-22-df8f6b52.md): aging (2026-08-22T16:32:55.633Z) +- [Memory Bridge (main, coder-agent, evaluator-agent, humanizer-agent, setup-agent): 2026-08-23](../sources/bridge-workspace-4c6d747f-memory-2026-08-23-45a691bb.md): aging (2026-08-23T19:44:04.484Z) +- [Memory Bridge (main, coder-agent, evaluator-agent, humanizer-agent, setup-agent): 2026-08-24](../sources/bridge-workspace-4c6d747f-memory-2026-08-24-8c5f73e5.md): aging (2026-08-24T11:19:07.409Z) - [MEMORY.md - Persistent System State](../sources/memory-md-persistent-system-state.md): aging (2026-08-22T04:20:49.788Z) - [project rules](../sources/project-rules.md): stale (2026-06-17T09:04:26.794Z) - [SOUL](../sources/soul.md): aging (2026-08-19T02:07:06.949Z) diff --git a/sources/agents.md b/sources/agents.md index fbc34ad..746deed 100644 --- a/sources/agents.md +++ b/sources/agents.md @@ -4,8 +4,8 @@ id: source.agents title: AGENTS sourceType: local-file sourcePath: /home/owner/.openclaw/workspace/AGENTS.md -ingestedAt: 2026-09-06T16:39:03.000Z -updatedAt: 2026-09-06T16:39:03.000Z +ingestedAt: 2026-09-24T20:57:49.604Z +updatedAt: 2026-09-24T20:57:49.604Z status: active --- @@ -14,8 +14,8 @@ status: active ## Source - Type: `local-file` - Path: `/home/owner/.openclaw/workspace/AGENTS.md` -- Bytes: 15397 -- Updated: 2026-09-06T16:39:03.000Z +- Bytes: 25324 +- Updated: 2026-09-24T20:57:49.604Z ## Content ````text @@ -219,6 +219,46 @@ Evaluator review is optional for: * status reporting * no bypass routing allowed +## 6.1 Task Sizing for Spawned Subagents + +Tasks must be sized to complete within the agent's runTimeoutSeconds. +On local LLMs (Ollama 27B-36B), each tool call takes significantly longer +than on cloud models. Large tasks that exceed the timeout leave work +in an uncertain state. + +### 6.1.1 Recon Before Spawn (mandatory for unpredictable volume) + +Before spawning a subagent on a task with unpredictable volume +(audit, cleanup, enumeration, bulk operations): + +1. **Recon** — main-agent performs a quick read-only query + (count, ls, grep, wc, sessions_list) to estimate scope +2. **Estimate** — calculate expected tool calls: items × calls-per-item +3. **Split** — form batches based on recon, not blind guess + +Example: "cleanup old sessions" → + recon: `sessions_list` → count = 150 + estimate: 150 × 2 calls = 300 tool calls + split: 3 batches × 50 sessions + +### 6.1.2 Batch Sizing Rules + +- **Split batch tasks** exceeding ~10 tool calls into sequential spawns +- **Each spawn must have** a clear, bounded scope and verifiable + completion criterion +- **Batch ceiling:** ~50 items or ~10 tool calls per spawn, whichever + is lower +- **Between batches:** verify previous result, then spawn next +- **If a batch times out:** do not respawn blindly — diagnose, reduce + batch size, retry + +### 6.1.3 No Split Needed + +- Single-file edits +- One config change +- Short scripts (< 100 lines) +- Read-only verification (evaluator) + \--- # 7\. Execution Model @@ -332,7 +372,7 @@ Setup-agent, coder-agent, and all agents receiving delegated tasks MUST also log # 15\. Wiki Policy - memory-wiki uses bridge mode for durable knowledge -- Ingest sources: USER.md, AGENTS.md, SOUL.md, IDENTITY.md, TOOLS.md, EMBEDDING-TRADING.md +- Ingest sources: USER.md, AGENTS.md, SOUL.md, IDENTITY.md, EMBEDDING-TRADING.md - Known bug: bridge import syncs 0 artifacts (GH #65698) → use `wiki ingest` manually - Wiki ingest/compile is an infrastructure task → delegate to setup-agent - Never switch vaultMode without user approval @@ -343,7 +383,7 @@ Setup-agent, coder-agent, and all agents receiving delegated tasks MUST also log ### Trigger Any change to wiki source files triggers automatic wiki ingest: -- USER.md, MEMORY.md, AGENTS.md, SOUL.md, IDENTITY.md, TOOLS.md, EMBEDDING-TRADING.md +- USER.md, MEMORY.md, AGENTS.md, SOUL.md, IDENTITY.md, EMBEDDING-TRADING.md - Any new .md files in /home/owner/.openclaw/workspace/ - memory-core dreaming output (daily notes, dream reports) @@ -415,6 +455,339 @@ You must help, research, and prepare options yourself. Do not offload work onto Основание: три инцидента контекст-переполнения (аудит шага 2, первая попытка кодера 2A, два саб-агента 2A). +# 20. Git Backup & Recovery Protocol + +## 20.1 Canonical Document + +All Git backup, State Git, Config Git, rollback, restore, and disaster-recovery procedures are defined in: + +```text +/home/owner/.openclaw/workspace/OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +This file is the **canonical operational source of truth** for Git backup/recovery. + +The main-agent MUST NOT reproduce the full backup/recovery procedure from memory when the canonical document can be consulted. + +Before any backup, rollback, restore, or Git-recovery task, the main-agent MUST read the relevant sections of: + +```text +OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +--- + +## 20.2 Git Architecture + +The system is designed as two separate Git backup layers: + +```text +State Git + → OpenClaw internal state / SQLite backup + → /home/owner/openclaw-backup/state-repo + → https://git.datacloudport.ru/Sergey/openclaw-clawpi-state.git + → STATUS: IMPLEMENTED / ACTIVE + +Config Git + → OpenClaw configuration, credentials, persistent workspace files + → https://git.datacloudport.ru/Sergey/openclaw-clawpi.git + → STATUS: ARCHITECTURE DEFINED / CONFIGURATION NOT YET COMPLETED +``` + +State Git and Config Git MUST NOT be treated as the same repository or the same recovery layer. + +Complete system recovery is designed to require both layers, but Config Git MUST NOT be considered an operational recovery source until its backup scope and automation have been explicitly implemented and verified. + + +--- + +## 20.3 State Git — Current Operational State + +Current State Git repository: + +```text +/home/owner/openclaw-backup/state-repo +``` + +Remote: + +```text +https://git.datacloudport.ru/Sergey/openclaw-clawpi-state.git +``` + +Repository is PRIVATE and contains credential-bearing backup material. + +Current State Git backup scope uses: + +```text +--all +--include-secrets +``` + +This `--include-secrets` policy applies specifically to the State Git backup and MUST NOT be assumed to define the future Config Git backup policy. + +--- + +## 20.4 Automatic Backup + +A 24-hour scheduled State Git backup is currently ACTIVE. + +The main-agent MUST treat this automation as an existing production mechanism. + +The automation MUST remain enabled unless the user explicitly orders otherwise. + +However, "automation is enabled" and "backup succeeded" are different states. + +An active scheduler entry alone is never evidence of a successful backup. + +An enabled automation MUST NOT be considered healthy solely because it exists in the scheduler. + +When diagnosing backup health, verify the actual execution result: + +```text +backup created ++ +pushed=true +``` + +or an explicit valid `noChanges=true` result. + +If the scheduled backup fails, the main-agent MUST treat the backup pipeline as degraded until the failure is diagnosed and a successful run is confirmed. + +--- + +## 20.5 User Request: "Сделай backup", "Закоммить состояние" + +A user request to save the current OpenClaw state means: + +```text +perform State Git backup +``` + +The main-agent MUST: + +1. read `OPENCLAW-GIT-BACKUP-RECOVERY.md`; +2. delegate execution to `setup-agent`; +3. require the standard State Git backup command with `--all` and `--push`; +4. route the operational result to `evaluator-agent` for validation; +5. report commit / noChanges / pushed / warnings to the user. + +The main-agent MUST NOT directly execute the infrastructure command itself. + +For the exact operational command, use the canonical recovery document. + +--- + +## 20.6 User Request: "Покажи backup", "Проверь backup" + +These are delegated infrastructure/verification tasks. + +For: + +```text +"покажи backup" +``` + +routing is: + +```text +main + ↓ +setup-agent +``` + +For: + +```text +"проверь backup" +``` + +routing is: + +```text +main + ↓ +setup-agent + ↓ +evaluator-agent +``` + +The main-agent should retrieve backup history or perform verification according to: + +```text +OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +Do not infer that a backup is valid merely because a Git commit exists. + +For external backup success, the relevant evidence is successful push. + +For restore eligibility, the selected snapshot MUST pass verification. + +--- + +## 20.7 User Request: "Откати", "Восстанови из backup" + +Rollback/recovery is a destructive infrastructure operation. + +The main-agent MUST: + +1. ensure that the user explicitly requested the rollback/recovery; +2. identify the exact backup SHA; +3. delegate the operation to `setup-agent`; +4. require verification of the selected snapshot before activation; +5. require a safety backup of the current live state before replacement; +6. require Gateway shutdown before live database replacement; +7. require staged restore before activation; +8. require post-restore validation through `evaluator-agent`; +9. require final Gateway/health/status verification; +10. require a new backup after successful recovery. + +The main-agent MUST NOT reinterpret: + +```text "посмотри предыдущий backup" +``` + +as: + +```text "выполни rollback" +``` + +Viewing and restoring are different actions. + +--- + +## 20.8 User Request: "Восстанови всю систему" + +"Full system recovery" means: + +```text +Config Git ++ +State Git +``` + +The main-agent MUST NOT treat State Git alone as a complete machine/system backup. + +The exact full-recovery sequence is defined exclusively in: + +```text +OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +The operation MUST be delegated to `setup-agent` and validated by `evaluator-agent`. + +--- + +## 20.9 State Git Safety Rules + +The main-agent MUST enforce these rules: + +* No ordinary Git commits inside the State Git backup repository. +* Do not add new non-backup files or ordinary Git commits to State Git. +* The existing README.md inherited from the original repository initialization is historical content and MUST NOT be modified or removed solely for this reason. +* No `git reset --hard` as a substitute for OpenClaw restore. +* No destructive database replacement while Gateway is running. +* No restore without snapshot verification. +* No restore without a safety copy of current live state. +* No automatic deletion of backup history. +* No automatic deletion of legacy databases. +* No automatic repository recreation. +* No public exposure of the private State Git repository. +* No history rewrite without explicit user approval. + +If a State Git operation reports: + +```text +repository history contains non-backup commits +``` + +do NOT create a new repository automatically. + +Follow the recovery procedure in: + +```text +OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +--- + +## 20.10 Separation of Responsibilities + +```text +main-agent + = orchestration / routing / user approval / reporting + +setup-agent + = infrastructure execution / backup / restore / repository operations + +evaluator-agent + = verification / validation / correctness verdict +``` + +The main-agent MUST NOT self-certify infrastructure recovery. + +For backup and recovery tasks, the evaluator verdict is authoritative according to the general orchestration rules in this file. + +--- + +## 20.11 Context-Minimization Rule + +Do NOT copy the full Git backup/recovery procedure into: + +```text +AGENTS.md +MEMORY.md +``` + +The canonical detailed procedure remains in: + +```text +/home/owner/.openclaw/workspace/OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +`AGENTS.md` contains only routing, authority, and safety rules. + +`MEMORY.md` should contain only stable final-state facts when such facts are needed for long-term memory; detailed procedures belong in the canonical recovery document. + +--- + +## 20.12 Mandatory Reference Rule + +Whenever the main-agent detects any of the following intents: + +```text +backup +git backup +commit state +snapshot +restore +rollback +recovery +disaster recovery +recover OpenClaw +recover database +recover configuration +``` + +it MUST consult: + +```text +OPENCLAW-GIT-BACKUP-RECOVERY.md +``` + +before delegating or describing the operational procedure. + +## 20.13 Integration test + +- The Git backup integration test is: + `/home/owner/openclaw-backup/integration-test-git-backups.sh` +- A successful integration test must report `PASS` with `FAIL=0`. +- The test validates both State Git and Config Git authentication, backup, commit/no-change handling, push, local/remote synchronization, and scheduled backup mechanisms. +- The test is diagnostic only and must not modify backup infrastructure, credentials, remotes, automation, or repository history. +- The detailed test output is stored in `integration-test-run2.log`; it is evidence of the successful baseline test, not the operational source of truth. + + ## Tools ### Local notes (migrated from TOOLS.md) @@ -464,6 +837,8 @@ Skills are shared. Your setup is yours. Keeping them apart means you can update --- Add whatever helps you do your job. This is your cheat sheet. + + ```` ## Notes diff --git a/sources/memory.md b/sources/memory.md index 35052c9..bd9de8f 100644 --- a/sources/memory.md +++ b/sources/memory.md @@ -4,8 +4,8 @@ id: source.memory title: MEMORY sourceType: local-file sourcePath: /home/owner/.openclaw/workspace/MEMORY.md -ingestedAt: 2026-09-06T16:39:03.000Z -updatedAt: 2026-09-06T16:39:03.000Z +ingestedAt: 2026-09-24T20:58:10.382Z +updatedAt: 2026-09-24T20:58:10.382Z status: active --- @@ -14,548 +14,51 @@ status: active ## Source - Type: `local-file` - Path: `/home/owner/.openclaw/workspace/MEMORY.md` -- Bytes: 43290 -- Updated: 2026-09-06T16:39:03.000Z +- Bytes: 6708 +- Updated: 2026-09-24T20:58:10.382Z ## Content -````text -### Nextcloud Sync Folder (2026-07-19) -- **Local path:** /home/owner/.openclaw/workspace/arno.nextcloud -- **Purpose:** основной канал обмена файлами между Сергеем и Арно (через синхронизацию с Nextcloud) -- **Sync:** автоматическая, через nextcloud-aio-oc - -### Telegram Bot — configuration (04.06.2026) -- **Name:** Cl -- **Bot ID:** 8788956736 -- **Username:** @clawpi_01_bot -- **User Chat ID:** 862485388 - -### Network Fix -- **Problem:** Telegram API resolves to IPv6 (2001:67c:4e8:f004::9), Pi has no IPv6 routing -- **Fix:** export NODE_OPTIONS="--dns-result-order=ipv4first" added to /etc/environment -- **Gateway restart:** sudo systemctl --user restart openclaw-gateway -- **Status:** ✅ fixed - -### Mail Check — Dedup & State (UID-баг РЕШЁН, 2026-08-16) -- **Решение UID-бага (2026-08-10):** дедупликация новых писем ведётся по **Message-ID** (fallback: sha1(date|from|subject)); зависимость от динамических UID Beget IMAP устранена. -- **mail_detect.py переписан (2026-08-16):** режимы `--trigger` (JSON {fire, message} на stdout, для cron trigger) и `--debug` (dry-run). Fetch с `mark_seen=False` — Unread-флаг НЕ обнуляется. Любые ошибки IMAP → fire:false, exit 0. -- **State:** `skills/nextcloud-aio-oc/state/mail_seen.json` (cap 1000, переживает ребут; bootstrap 16 писем сделан 2026-08-16). НЕ удалять. -- **mail.py — 2 точечных фикса (2026-08-16):** cmd_check → mark_seen=False; load_account → тот же env-chain пароля. Остальное не менялось. -- **Env-chain пароля IMAP:** `IMAP_PASS_ARN → IMAP_PASS → NEXTCLOUD_MAIL_PASS` (рабочая: IMAP_PASS; уже в /etc/environment и env gateway). User/host fallback: IMAP_USER/IMAP_HOST. - -### Ford Mondeo 4 — Автомобиль (2026-08-01) -- **Модель:** Ford Mondeo 4 (2011), бензин 2.0 л, 145 л.с. -- **Оформление:** на жену — Ирина -- **Текущий пробег:** 296 300 км (2026-08-01) -- **Интервал ТО:** 10 000 км (сокращённый, по решению пользователя) -- **Последнее ТО:** 2026-08-01 — замена моторного масла и масляного фильтра (Пропег / Propel), пробег 296 300 км -- **Следующее ТО:** ~306 000 км, ориентир ~февраль 2027 - -### Memory Search Configuration (2026-06-17) -- **enabled:** true -- **provider:** ollama (ollama-local) -- **model:** bge-m3 -- **remote.baseUrl:** http://192.168.1.200:11434 -- **embedding vector dims:** 1024 -- **storage:** ~/.openclaw/agents/{agent-id}/agent/openclaw-agent.sqlite (main, coder-agent, evaluator-agent, humanizer-agent, setup-agent) -- **Cleanup (2026-08-17):** legacy ~/.openclaw/memory/*.sqlite.migrated (5 × ~5MB) удалены — путь хранения см. выше -- **index:** 1 source (MEMORY.md); chunks: main=24, setup-agent=24, coder/evaluator/humanizer=13 (актуально 2026-08-22, проверено по sqlite) -- **all agents:** Embeddings ready, Vector store ready, Semantic vectors ready ✅ -- **Note:** OpenClaw CLI `openclaw memory index` runs on Pi but embedding API needs Dell Precision Ollama (192.168.1.200:11434). Gateway process uses config baseUrl correctly. - -### AI Models (Actualized 2026-08-26) -- **agents.defaults.model.primary:** `ollama-local/qwen3.8-27b-q5xl` -- **agent.models:** - - main → inherits default: `ollama-local/qwen3.8-27b-q5xl` - - coder-agent → `ollama-local/qwen3.8-27b-q5xl` (2026-08-26, было -coder тег; VRAM-архитектура: 27b resident) - - evaluator-agent → `ollama-local/qwen3.8-27b-q5xl` (2026-08-26, было qwen3.6-35b-192k) - - humanizer-agent → `ollama-local/qwen3.6-35b-192k` (on-demand, не менять) - - setup-agent → `ollama-local/qwen3.8-27b-q5xl` (с 2026-08-22) -- **imageModel.defaults.primary:** `ollama-local/qwen3-vl:32b` -- **memorySearch.model:** `bge-m3` (embedding, not generative) -- **dreaming (native, memory-core.dreaming):** DISABLED 2026-08-22 (was qwen3.6-35b-192k); sweep — main model -- **north-mini-code-1.0:** CANCELLED 2026-08-22 (user decision) — не устанавливать, не использовать (на Dell не установлен) -- **VRAM-архитектура (RTX 5090 32GB, 2026-08-26):** qwen3.8-27b-q5xl (Q5_K_XL, ~28GB VRAM) + num_ctx 131072 + keep_alive 12h = resident primary model. qwen3.6-35b-192k и qwen3-vl:32b = mutually exclusive on-demand models (не загружаются одновременно с resident 27b). Это ограничение VRAM/архитектуры, а не ошибка OpenClaw. -- **Evaluator disclaimer (с 2026-08-26):** evaluator-agent работает на qwen3.8-27b-q5xl (ранее qwen3.6-35b-192k) — последующие evaluator PASS являются результатом проверки на 27B и НЕ эквивалентны прошлым PASS на 35B-192k. - -### Discord Bot (2026-06-21) — ⚠️ BLOCKED -- **Token:** configured in openclaw.json channels.discord.token -- **Guild:** 1518244752967864330 -- **Plugin:** enabled (discord) -- **Skill:** enabled (discord) -- **Problem:** Raspberry Pi cannot reach Discord API — connection timeout to 162.159.x.x subnet -- **Reason:** ISP/router blocks Discord traffic from home network -- **Fix needed:** Run bot on VPS or fix DNS/routing for Discord -- **Status:** ⚠️ blocked by network - -### Systemd Unit — /etc/environment binding (2026-06-12) -- **Problem:** systemd does not read /etc/environment — it's a PAM file, triggered upon login, not for systemd services. -- **Fix:** Added `EnvironmentFile=/etc/environment` to the [Service] section of the openclaw-gateway.service unit. -- **Command:** `systemctl --user edit --force --full openclaw-gateway.service` (created a new unit). -- **Then:** `systemctl --user daemon-reload` + `systemctl --user restart openclaw-gateway` -- **Result:** All vars from /etc/environment are visible to the gateway process. - -### Pi-hole (FTL v6) — проверено 2026-08-24 -- **Контейнер:** `pihole` (docker на clawpi, healthy); Web UI `http://192.168.1.20:8080/admin`, DNS `192.168.1.20:53` -- **Версии:** Core v6.4.3, Web v6.6, FTL v6.7 (снимок 2026-08-24) -- **Аутентификация:** пароль Web UI = env `FTLCONF_webserver_api_password` контейнера (значение НЕ записывать в MEMORY.md/CHANGELOG — файлы синкаются в Nextcloud); хеш — `pwhash` (BALLOON-SHA256) в `/etc/pihole/pihole.toml`; `setupVars.conf` в v6 отсутствует (заменён pihole.toml) -- **API:** логин `POST /api/auth`, JSON `{"password":"***","totp":null}` → `session.sid`; дальнейшие запросы — с сессионным cookie -- **Проверено 2026-08-24:** логин через Web UI (браузер) и API (200 + SID) — работает -- **Внимание:** локальная проверка пароля BALLOON-SHA256 в чистом Python дала ложный NO MATCH (сломанный test-vector в моей реализации) — верификацию пароля делать только через живой API - -## Search Tool Priority - -Search priority: -web_search (provider: SearXNG локально) → Tavily Search → Tavily Extract → Firecrawl Search/Scrape. - -Use: -- web_search for quick lookup; -- Tavily for high-quality search, news, time/domain filtering; -- Tavily Extract for article/page extraction; -- Firecrawl only for JS-heavy or difficult pages; -- web_fetch only for simple URL retrieval. - -Always choose the lightest tool that can solve the task. - -### SearXNG — локальный web_search (2026-08-21) -- **Provider:** `tools.web.search.provider: "searxng"` (в openclaw.json) -- **Плагин:** @openclaw/searxng-plugin v2026.7.1 (enabled) -- **Базовый URL:** `plugins.entries.searxng.config.webSearch.baseUrl: "http://127.0.0.1:8888"` -- **Контейнер:** `searxng` (searxng/searxng:latest), --restart unless-stopped, порт **127.0.0.1:8888:8080** (только локально) -- **Конфиг:** /home/owner/searxng/settings.yml (600): use_default_settings, secret_key (hex24), limiter: false, formats [html, json] -- **Docker:** docker.io 26.1.5, enabled+running; доступ через `sudo docker` (owner не в docker-группе — осознанно) -- **E2E:** PASS (evaluator + main-agent, 2026-08-21): JSON API живёт, web_search работает через searxng -- **Автообновление:** cron "searxng-weekly-update" (воскресенье 04:00 MSK): isolated agentTurn → /home/owner/searxng/update.sh (pull :latest; digest не изменился → контейнер не трогать; изменился → recreate + verify JSON API). Лог: /home/owner/searxng/update.log. Delivery: announce → telegram:862485388 -- **Остатки:** /home/owner/searxng/app/ удалены 2026-08-21 - -## Configuration Management - -### Files -- **CHANGELOG.md** — change history. Each significant infrastructure change → record (created 2026-06-11). -- **MEMORY.md** — persistent system state (infrastructure, models, bot, settings). Not history, but final state. -- **AGENTS.md** — routing and orchestration policy. Does not contain settings. -- **INFRASTRUCTURE.md** — infrastructure baseline: воспроизводимое состояние (Pi + Dell + Ollama + BGE-M3) и recovery-процедуры. MEMORY.md = знания/контекст, INFRASTRUCTURE.md = инфраструктура. -- **Wiki vault** (`/home/owner/obsidian-vault`) — structured entities from MEMORY.md + CHANGELOG.md. - -### LLM Concurrency Caps (2026-08-26) -- agents.defaults.maxConcurrent=1, agents.defaults.subagents.maxConcurrent=1, cron.maxConcurrentRuns=1 — эксперимент на Dell (исключение concurrent prefill); backup: projects/openclaw-tooling/backups/openclaw.json.concurrency-111-pre-2026-08-26 - -### Model Keep-Alive Policy (2026-08-26) -- qwen3.8-27b-q5xl → params.keep_alive=12h (per-model, Ollama body pass-through, dist stream-DwcvMYU5.js:261-263,331); bge-m3/qwen3.6-35b-192k/qwen3-vl:32b — default/on-demand (5m); Ollama env НЕ менялся; backup: projects/openclaw-tooling/backups/openclaw.json.keepalive-12h-pre-2026-08-26 -- Подтверждено live 16:29 MSK: /api/ps expiry 27b = +12h после OpenClaw model call (per-request семантика Ollama: запрос без keep_alive сбивает expiry в 5m default) - -### Vault state (2026-08-18, исторический снимок) -- ⚠️ Снимок от 08-18: volatile-числа (page/bridge counts) актуальны ТОЛЬКО в CHANGELOG.md + concepts/Bridge-Mode.md (volatile-state ban, 2026-08-22). -- memory-wiki: vaultMode=bridge, ingest.autoCompile=true, render.createDashboards=true, search.backend=shared, search.corpus=all, context.includeCompiledDigestPrompt=true -- memory-core: /home/owner/.openclaw/workspace/memory-core/ (daily/, dreams/, inbox/, index.md) -- dreaming: NATIVE DISABLED (2026-08-22, user decision); единственный pipeline = cron dreaming-sweep (03:00 MSK) → memory-core/daily/ + memory-core/dreams/; check-dreaming — ежедневный контроль; cron 'Memory Dreaming Promotion' снят/удалён; артефакты memory/dreaming, memory/.dreams, DREAMS.md удалены -- volatile wiki state (pages/lint/last-ingest/bridge counts) — НЕ хранится в MEMORY.md (self-loop ban, 2026-08-22); источник: CHANGELOG.md + concepts/Bridge-Mode.md -- wiki_apply remains primary mechanism for creating/updating structured content -- known bug: bridge import syncs 0 artifacts (GH issue #65698) — manual wiki ingest + wiki_apply needed. - -### Heartbeat (main agent) -- **Heartbeat DISABLED** (2026-08-18, user decision); mail check now handled solely by cron "mail-check". -- **Config:** agents.list[0].heartbeat.every = "0m" in openclaw.json -- Отчёт daily 9:00 (check-email-daily) — ОТМЕНЁН 2026-08-16, НЕ восстанавливать - -### Cron Jobs — Mail & Heartbeat (Actualized 2026-09-06 MSK) -- **mail-check** (id 81689c8a-f1a4-4c0d-bb23-d096775a75bb, every 15m, session=isolated, NATIVE TRIGGER-СКРИПТ): trigger = `skills/nextcloud-aio-oc/scripts/mail_check_trigger.mjs` → `python3 .../mail_detect.py --trigger` → JSON {fire, message}. fire:false → модель НЕ запускается, в Telegram ничего не уходит (ошибки IMAP тоже → fire:false, exit 0). fire:true → LLM agentTurn (timeout 300s): новые письма читать через `mail.py get UID`, суть/класс/важность, вложения-картинки → vision, ОДНО сообщение в Telegram на русском. Delivery: announce → telegram:862485388. -- **heartbeat** (main agent): DISABLED (2026-08-18, every="0m"); больше не работает. -- **Удалено/отменено:** mail-detect (50c4362c, пароль был в промпте) и mail-analyze (bef0b684) — удалены 2026-08-16; mail-daily-report-9am — НЕ возвращён (решение пользователя); legacy /tmp-файлы (last_seen_uids.json, mail_pattern_log.json, mail_new.json, mail_analyze_pending) удалены. -- **Status (mail-check):** ✅ активен (re-enabled 2026-09-06 после авто-отключения 2026-09-05; test-run PASS) -- **dreaming-sweep + check-dreaming — sessionTarget=isolated (с 2026-08-26):** каждый прогон = свежая изолированная сессия, main:main для этих джобов не используется; sessionKey=null; timeoutSeconds: sweep 900s / check-dreaming 300s (2026-08-26 18:5x MSK, разрешение Сергея; ранее 300/120). Серия таймаутов model-call-started закрыта увеличением timeout; root cause — скорость Ollama-prefill (192.168.1.200:11434); верификация — контрольные точки 27.08 03:00 (sweep) / 08:13 (check-dreaming) / 10:00 (ingest-observation); гипотезы проверяются раздельно: A — keep_alive 12h (warm-модель), B — timeout 900s (prefill завершается). Backup: projects/openclaw-tooling/backups/cron-pre-timeout-2026-08-26/ (предыдущий: cron-isolated-sessions-2026-08-26/). - -### Sudo & Secrets (actualized 2026-08-21) -- **File:** /etc/sudoers.d/owner (440, backup: owner.bak) -- **Content:** `owner ALL=(ALL) NOPASSWD: /usr/b…ctl, /usr/bin/journalctl, /usr/bin/apt, /usr/bin/apt-get, /usr/sbin/usermod, /usr/bin/docker` -- **Пароль owner:** `/home/owner/.openclaw/secrets/OWNER_PASS` (600, 6 байт) — решение Сергея 13:02: держать в доступе агента. НЕ в /etc/environment, НЕ в MEMORY.md (sync в Nextcloud/Obsidian). -- **Purpose:** setup-agent работает с apt/docker без повторного ввода пароля -- **Audit trail:** all infra changes logged in CHANGELOG.md + MEMORY.md - -### Agent Boundaries -- **main-agent:** routing, planning, coordination, status reporting only -- **setup-agent:** infrastructure (systemd, /etc/, packages, networking, firewall) — has NOPASSWD sudo -- **coder-agent:** implementation, code, scripting -- **evaluator-agent:** validation, audit, correctness checks -- **humanizer-agent:** text rewriting, tone, readability -- **No agent may self-certify changes** — evaluator validates all infra mutations -- **All infra changes require CHANGELOG.md entry + MEMORY.md update + wiki compile** - -### Change workflow -- Infra/config changes → delegate to setup-agent (per AGENTS.md routing) -- Agent MUST update CHANGELOG.md after infra changes -- Agent MUST update MEMORY.md with final state only (not history) -- All files loaded at session start via project context -- No agent may self-certify changes; evaluator-agent validates infra mutations - -### Wiki Ingestion (event-driven, per AGENTS.md §16) - -- Механизм: fingerprint-based trigger (path + mtime_ns + size + sha256 контента), НЕ mtime-сравнение; один file-change-батч = одно событие с детерминированным event_id -- State: skills/wiki-ingest/state/events.db (SQLite WAL; таблицы processed_events/event_files/file_state/pipeline_state); last_ingest.json — только маркер/отладка -- Протокол: trigger → claim (claim_token, **lease 7200s** — страховка, max attempts 3) → ingest → complete/fail; dead-letter skills/wiki-ingest/events/failed.jsonl; rearm для перезапуска -- **renew — основной механизм защиты длинного ingest:** worker ОБЯЗАН во время обработки каждые 300с вызывать `renew `; при `ok:false` (чужой токен / истёкший lease / другой статус) → НЕМЕДЛЕННЫЙ abort: worker перестаёт считать себя владельцем, обработку НЕ продолжает, логирует "lost ownership, aborting" -- `complete` и `fail` в JSON-ответе пишут: `duration_seconds` (int, = now - created_at), `attempts` (int), `batch_size` (int = число файлов батча) -- reason-словарь classify_reason: `stale_token` (приоритет), `lease_expired`, `wrong_state`, `not_found` (row is None), `already_done` (status done) -- Тесты: skills/wiki-ingest/tests/test_wiki_ingest_check.py (62) + test_wiki_ingest_backup.py (12); полный сьют 74/74 -- Оба пути (event-driven §16 и cron wiki-ingest-event 30m) конкурируют за один event_id — дедуплицированы; cron-страховка: trigger-скрипт wiki_ingest_check.py --trigger, timeoutSeconds=7200 (2026-08-23, Step 1e; было 600 — убивал длинные ingest >10м), delivery none -- Контракт идемпотентности downstream: skills/wiki-ingest/README.md (upsert по event_id; одна CHANGELOG-запись на event_id; MEMORY.md — только через заменяемые маркеры) -- Volatile-state ban (2026-08-22): в MEMORY.md НЕ писать volatile-числа (counts/last-ingest timestamps) — они живут в CHANGELOG.md + wiki vault -- **Step 2 (2026-08-23):** наблюдаемость — `ingest_metrics` (10 метрик; fire идемпотентен per event_id) + критичные Telegram-алерты (fail, lease_expired_reclaim, manual_rearm, renew_lost_ownership; дедуп 1ч через `alert_suppression`; fail-open — алерт никогда не роняет пайплайн). `send_telegram_alert` = per-IP retry (до 8 IP, 3с/IP, hard deadline 25с; True только при HTTP 200 + ok:true; иначе stderr без токена + False); токен из env TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID иначе openclaw.json. Диагностика: `--alert-test [text]`. Примечание: при DNS-аномалии Telegram (зона отдаёт только мёртвый IP) прямой алерт-путь скрипта может не доставлять (sent:false, non-fatal); пайплайн и gateway-канал не затрагиваются. -- **Step 3 (2026-08-23):** read-only CLI: `--show-failed` (failed-события + dead-letter journal), `--show-event ` (детали+метрики+dead-letter entry), `--verify` (8 проверок: integrity/FK/trigger_state/pending/failed/dead-letter/fire-idempotency/marker; ok:false только реальная деградация); `rearm ` [--confirm] (алиас `--rearm`): failed→pending (attempts=0, dead-letter entry удаляется); pending→refusal; done без --confirm→needs_confirm; done+--confirm → ПОЛНЫЙ РЕПЛЕЙ ТОЛЬКО если все source-файлы не менялись после complete (fingerprint read-only сверка) — purge file_state+event_files+processed_events, trigger fire:true с ТОМ ЖЕ event_id; расхождение/файл удалён → отказ без изменений. Prod: 4 done-события, md5 events.db e41fb939e08168d075eb9caebd315008 (2026-08-23). Тест-сьют: 62/62. Evaluator: PASS. -- **Step 4 (2026-08-24):** бэкап state-БД — `skills/wiki-ingest/scripts/wiki_ingest_backup.py` (stdlib-only, 1 JSON stdout, rc 0/2): default = wal_checkpoint(TRUNCATE) → атомарная копия в `skills/wiki-ingest/backups/events-.db` → restore-verification (копия бэкапа в tempdir + `--verify --workspace `) → pruning retention=7; команды `--list`, `--verify `. Мутации ТОЛЬКО в backups/+tempdir; prod state — только wal_checkpoint (логически-ноль). Тесты: +12 (test_wiki_ingest_backup.py); полный сьют 74/74. Evaluator: PASS (0 критичных). Baseline md5 events.db: 0ab2475e7d4e961b4fecc8f59c70e4a6 (2026-08-24, после Step 3 закрытия). -- **Step 2A (2026-08-24):** full backup — `wiki_full_backup.py` (vault + векторные sqlite через backup API; lease-guard SKIP; verify из архива; retention 7d+4w; `backups-full/`); cron `wiki-full-backup` 0 5 * * * MSK (после PASS evaluator + ручного прогона), лог `/home/owner/wiki-full-backup/`. - - -### Cron Jobs (routing policy reminder — 2026-06-12) -- **CRITICAL:** Cron config changes = infrastructure task → delegate to setup-agent (AGENTS.md §5.1) -- Main-agent MUST NOT modify cron jobs directly -- Violation example: main-agent updated check-dreaming delivery manually on 2026-06-12 -- Future cron changes → setup-agent only - -## Agent Behavior Rules - -### Cron Management Protocol (Actualized 2026-07-03) -- Тайное или автоматическое создание скрытых cron-задач без ведома пользователя ЗАПРЕЩЕНО (Удалено старое конфликтное правило от 2026-06-11). -- Если требуется отложенная проверка системы, агент обязан сформулировать задачу, запросить явное текстовое согласие пользователя в чате, после чего делегировать создание задачи для `setup-agent`. - -### Rule Creation (2026-06-11) -- If the agent decides that a new rule needs to be created or an existing one modified, it formulates the rule and requests the user's permission to write it. -- Does not make changes to MEMORY.md / AGENTS.md without the user's explicit consent. -- Upon approval, it writes the final state to MEMORY.md and updates CHANGELOG.md. - -## Email Addresses -- **Arno (Agent):** arno@eurostela.ru (via Beget) -- **Sergey (Owner):** sergey@eurostela.ru - -## Nextcloud Mail -- **Account:** arno@eurostela.ru -- **IMAP:** ://beget.com (SSL) -- **SMTP:** ://beget.com (SSL) -- **Script:** /home/owner/.openclaw/workspace/skills/nextcloud-aio-oc/scripts/mail.py -- **Capabilities:** inbox, get, send, reply, folders, search, delete -- **Status:** connected ✅ -- **Password (IMAP):** env-chain `IMAP_PASS_ARN → IMAP_PASS → NEXTCLOUD_MAIL_PASS` (рабочая: IMAP_PASS; /etc/environment + env gateway). User/host fallback: IMAP_USER/IMAP_HOST - -### Email Behavior Rule (2026-06-17) (v2.0) -- **1. Deleting a specific message (by UID):** MOVE from INBOX to Trash folder via UID MOVE. DO NOT use `\Deleted` + EXPUNGE to avoid data loss. Verify removal from INBOX. -- **2. Clearing the INBOX:** MOVE all UIDs to Trash in batches of 500-1000. Verify INBOX (EXISTS) = 0. Roll back completely on error. -- **3. Clearing the Trash:** Require strict explicit user confirmation. Set `\Deleted` flag + EXPUNGE. Verify Trash is empty (EXISTS = 0). Log counts to CHANGELOG. - -### Email Script Fix (2026-06-17) -- `mail.py` — fixed `\Deleted` escape in IMAP STORE command; added `--all` support for `cmd_delete`. - -### Email Script Update (2026-07-26) -- `mail.py` — all commands now support `--folder ` parameter (inbox, get, search, delete, reply). Default: "INBOX" for backward compatibility. -- All commands use UID-based API (`m.uid('FETCH')`, `m.uid('STORE')`) instead of sequence-based for Trash/Junk compatibility with Beget IMAP. -- Added reference doc: `/home/owner/.openclaw/workspace/skills/nextcloud-aio-oc/docs/mail-py-reference.md` - -### Mail.py multipart Fix (2026-08-03) -- `mail.py` — функция `get_text_body()` теперь рекурсивно обрабатывает вложенные multipart/alternative структуры (Gmail вложенные контейнеры). -- Письма с картинками внутри вложений извлекаются корректно. - -### Mail Photo Attachments Handling (2026-08-03) v2 -- **Правило:** Когда в письме есть вложение-картинка (image/jpeg, image/png и т.д.) → сохранить файл на диск, затем проанализировать через `ollama-local/qwen3-vl:32b` (vision model). -- **Где сохранять:** `/home/owner/.openclaw/workspace/skills/nextcloud-aio-oc/tmp/mail__` -- **Процесс:** 1) imap fetch UID (RFC822), 2) найти part с image/ Content-Type, 3) decode payload, 4) write binary to tmp, 5) vision model analysis. -- **Решение о выдаче (v2):** Не показывать результат анализа автоматически. Сначала проанализировать — если на фото есть полезная информация (координаты, текст, документы, данные) → выдать в чат. Если картинка бессмысленная (интерфейс, скриншот без данных, подпись, decorative image) → не показывать результат, просто сохранить файл. - -### Beget IMAP Limitations (verified 2026-08-17) -- **Баточный UID MOVE не работает:** `UID MOVE 119 120 INBOX.Trash` → сервер отвечает `NO` ("Client tried to access nonexistent namespace") — даже с корректным префиксом INBOX. 2026-08-17 20:26 ранее наблюдался silent no-op (OK, но ничего не перенеслось). Одно-UID MOVE работает стабильно (подтверждено дважды 2026-08-17: UID 119, 120). Вывод: перенос/удаление — только по одному UID за команду (mail.py delete так и работает). -- **SEARCH SUBJECT не парсится:** `UID SEARCH SUBJECT "текст"` → `BAD: Unknown argument TEST`. Для поиска по теме — client-side фильтрация. -- **Имена папок:** всегда с префиксом `INBOX.` (INBOX.Trash, INBOX.Junk, INBOX.Sent); "Trash" без префикса → NO. В mail.py добавлена `_normalize_folder()` (2026-08-17). - -### Email Decision (2026-07-26) -- **Decision:** Keep `mail.py` as utility for cron and automation — confirmed by user. -- Rationale: provides JSON output, cron integration (`check-email-daily`), and standardized access to all folders (INBOX, Trash, Junk, Sent, Drafts). -- All commands now support `--folder ` parameter with UID-based API (m.uid('FETCH'), m.uid('STORE')) for Trash/Junk compatibility. - -### Mail Check Cron -- Mail check теперь через cron **mail-check** (every 15m, trigger-скрипт) — см. секцию "Cron Jobs — Mail & Heartbeat". Отчёт в 9:00 (mail-daily-report-9am) отменён, не восстанавливается. - -## Nextcloud AIO (2026-06-14) - -- **Skill:** nextcloud-aio-oc (installed in workspace/skills/nextcloud-aio-oc) -- **URL:** https://datacloudport.ru -- **User:** Arno -- **Auth:** Basic Auth (NEXTCLOUD TOKEN account password) -- **Timezone:** Europe/Moscow -- **Status:** ✅ connected — OCS API + Notes list + WebDAV all working -- **Env:** /etc/environment (NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_TOKEN, NEXTCLOUD_TIMEZONE) -- **Capabilities:** Notes, Tasks, Calendar (CalDAV), Files (WebDAV), Contacts (CardDAV) -- **Office libraries:** python-docx 0.8.11, openpyxl 3.1.5, python-pptx 1.0.2, reportlab 4.4.4, pypdf 5.6.0 -- Fully supports .docx/.xlsx/.pptx files (read/edit/create) -- PDF reading and editing -- **Contacts:** 13 entries (8 user, 5 system) -- **OCS fix (2026-06-14):** OCS API returns 412 without `OCS-APIRequest: true` header (Nextcloud 30+ CSRF protection). Added to bundled request() function in nextcloud.js — all OCS endpoints now return 200. WebDAV unaffected. -- **Warning:** fix applied to compiled bundle; will be lost if skill is updated or reinstalled. - -### Nextcloud Behavior Rule (2026-06-15) -- When a user requests an action with "Nextcloud" without specifying an account, immediately use Arno's account on datacloudport.ru without asking for confirmation or clarification. - -### WordPress — Eurostela.ru (2026-06-15) -- **URL:** https://eurostela.ru -- **Тип:** WordPress (3+ года), Elementor + ACF -- **Пользователь:** Arno, role: editor -- **Application Password:** arno — LwZFmiWyCrhPHlUwAShq7qFD (имя: Arno-API) -- **API endpoint:** https://eurostela.ru/wp-json/wp/v2/ -- **Статус:** ✅ Connected, REST API is working, authorization completed -- **Категория по умолчанию:** "User information" (id=100) -- **Назначение:** content, SEO optimization, website promotion - -### WooCommerce REST API — Eurostela.ru (2026-06-24) ⚠️ ЧАСТИЧНО УСТАРЕЛО -- **API base:** https://eurostela.ru/wp-json/wc/v3/ -- **Consumer Key:** `ck_6ae9d729f33e1672ffed8bd41c042b14db74aabf` -- **Consumer Secret:** в окружении `WOOCOMMERCE_API_SECRET` (не разглашать) -- **Auth:** Basic Auth (key:secret) — обязательны оба ключа -- **Пример запроса:** - - Поиск по SKU: `GET /wc/v3/products?sku=MR-038` - - Список товаров: `GET /wc/v3/products?per_page=10&orderby=date&order=desc` - - Один товар: `GET /wc/v3/products/{id}` -- **SKU форматы:** кириллические (МР-xxx) и латинские (MR/MP-xxx) — разные коды -- **Статус:** ✅ API keys working, read access confirmed -- **⚠️ Обновлено 2026-07-25:** категории обновлены (было 60, стало 71). Новые: Caggiati буквы/цифры, знаки препинания, медали/ордена, ретушь. Пустых категорий: 6. - -### WordPress Application Password (2026-07-04) -- **User:** arno (id=6) -- **Password:** OvuC DhcN q3Vn MLBs JXPj 7Vok -- **Stored in:** /etc/environment → WORDPRESS_APP_PASS - -### WooCommerce Behavior Rule (2026-07-04) -- **CRITICAL:** Any state-changing actions in WooCommerce (creating products, editing product descriptions, editing prices, updating stock, changing order statuses) require explicit user permission in chat ("yes", "да"). -- Read-only actions (fetching orders, tracking SKU, checking stock) are allowed without permission. - -### SEO Endpoint — Eurostela.ru (2026-07-04) -- **URL:** https://eurostela.ru/wp-json/openclaw/v1/seo-optimize -- **Method:** POST -- **Headers:** - - `Content-Type: application/json` - - `x-openclaw-key: 4f2c1d1b4bb2452db92b7fd3d6d86d8d` -- **Body:** { "post_id": , "seo_title": "", "seo_description": "<Description>" } -- **Purpose:** Автоматическая запись SEO meta (rank_math_title, rank_math_description) для товаров Eurostela.ru через WordPress PHP hooks -- **Status:** ✅ работает - -### Sitemap — Eurostela.ru (2026-07-25) -- **URL:** https://eurostela.ru/sitemap_index.xml -- **Генератор:** Rank Math SEO Plugin -- **Состав:** - - `https://eurostela.ru/post-sitemap.xml` — посты (lastmod: 2026-07-20) - - `https://eurostela.ru/product-sitemap.xml` — товары (lastmod: 2026-07-24) - - `https://eurostela.ru/category-sitemap.xml` — категории WordPress (lastmod: 2026-07-20) - - `https://eurostela.ru/product_cat-sitemap.xml` — WooCommerce категории (lastmod: 2026-07-24) -- **Статус:** ✅ работает, доступен через https:// - -### Пустые/малополезные категории ⚠️ (2026-07-25 актуально) -- id=32 "Памятник валун" — **0 товаров** (пусто!) -- id=16 "Разное - без категории" — **0 товаров** -- id=241 "Ремонт, реставрация памятников" — **0 товаров** -- id=622 "Ретушь фото для памятника" — **0 товаров** -- id=157 "Столы и лавочки" — **0 товаров** -- id=158 "Шары и наконечники" — **0 товаров** -- id=64 "Памятник часовня" — **1 товар** (крайне мало) -- id=298 "Памятники колонны и обелиски" — **2 товара** -- id=71 "Цветной портрет на памятник" — **1 товар** -- id=77 "Позолота букв" — **3 товара** - -### API Keys — eurostela.ru -- **WooCommerce CK:** ck_6ae9d729f33e1672ffed8bd41c042b14db74aabf -- **WooCommerce CS:** в окружении WOOCOMMERCE_API_SECRET -- **WP App Pass (arno):** OvuC DhcN q3Vn MLBs JXPj 7Vok -- **SEO Key:** 4f2c1d1b4bb2452db92b7fd3d6d86d8d - -## Active Projects - -| Project | Status | Path | -|---------|--------|------| -| eurostela.ru | active | projects/eurostela.ru/ | -| sing-box | active | projects/sing-box/ | -| ai-server | planning (полная спецификация 2026-08-04) | projects/ai-server/ | - -## Project Creation and Storage Policy - -Reference: /home/owner/.openclaw/workspace/project-rules.md - -### Project Registry - -All projects are registered in: /home/owner/.openclaw/workspace/projects/index.md - -### Project Statuses - -Allowed values: planning, active, paused, completed, archived - -### Required Project Files - -Every project must contain: - PROJECT.md → current project state - README.md → human-readable overview - CHANGELOG.md → project history - -### Required Project Directories - ```text -tasks/ -decisions/ -audit/ -reports/ +# 🧠 AGENT CORE OPERATIONAL MEMORY (HERMES PROTOCOL) -assets/ -content/ -docs/ -notes/ -contracts/ +## 1. IDENTITY, BOUNDARIES & EVOLUTION (ДНК и Архетип Гермеса) +- **Agent Name:** Arno (Арно) | **Role:** Advanced Personal AI, Multi-Project Orchestrator & Cognitive Agent. +- **Owner:** Сергей | **Telegram Chat ID:** 862485388 | **Email:** sergey@eurostela.ru +- **Agent Mail:** arno@eurostela.ru | **Secrets Anchor:** `~/.openclaw/secrets/OWNER_PASS` +- **Main Sync Channel:** `/home/owner/.openclaw/workspace/arno.nextcloud` (Nextcloud-first) +- **Архетип Развития (Гермес):** Я не просто выполняю скрипты, я анализирую свой опыт. Каждая ошибка, таймаут Ollama или неверное предположение — это материал для оптимизации когнитивных паттернов во время dreaming. Ядро (этот файл) ВСЕГДА неизменно по структуре. Изменение правил или добавление сущностей сюда — ТОЛЬКО с текстового аппрува Сергея в чате. + +## 2. MULTI-PROJECT ROUTING ENGINE (Масштаб: Десятки разнородных проектов) +*Запрещено загружать проекты целиком. Перед работой с ЛЮБЫМ проектом выполнить протокол: Читать PROJECT.md → Найти задачу → Вызвать код.* + +### Active Matrix of Projects (Project Registry Matrix): +- 🛒 **eurostela.ru** | `active` | Path: `projects/eurostela.ru/PROJECT.md` -> [E-com, WP REST, SEO] +- 🛡️ **sing-box** | `active` | Path: `projects/sing-box/PROJECT.md` -> [Прокси, Сетевые конфиги] +- 🤖 **ai-server** | `planning`| Path: `projects/ai-server/PROJECT.md` -> [Будущий контур ИИ] + +### Протокол контекстной изоляции: +1. Новые проекты регистрируются строго в `projects/index.md` с созданием локального README.md, PROJECT.md и CHANGELOG.md. +2. Если проекта нет в Матрице ядра — я ищу его через индекс и перехожу в его изолированную папку, удерживая контекст окна чистым. + +## 3. SYSTEM ARCHITECTURE & EXTERNAL KNOWLEDGE (Карта связей) +*Для технических и персональных задач — читать целевые файлы, не допуская шума в Hot Layer:* +- **Hardware & LLM Stack:** `INFRASTRUCTURE.md` (Dell Precision, RTX 5090, Ollama, Pi-hole, SearXNG, Caps). +- **Core Skills Docs:** `skills/nextcloud-aio-oc/docs/mail-py-reference.md` (Почта, IMAP/Beget лимиты, Vision-обработка). +- **Obsidian Wiki Vault (LTM):** Персональные данные, сущности, концепты и синтезы. Вызываются строго точечно через `wiki_get`. +- **Личный автотранспорт / Гараж:** Данные машин и мотоциклов искать в папке `wiki/entities/transport/` (например, `ford-mondeo-4`). +- **Live Cron Inventory:** active — mail-check (15m), wiki-ingest-event (30m), wiki-ingest-backup (ежедневно 04:00 MSK), wiki-full-backup (ежедневно 05:00 MSK), hermes-stm-garbage-collector (ежедневно 03:15 MSK, hermes_cron_sweep.sh — единственный джоб памяти), searxng-weekly-update (вс 04:00), trash-cleanup (1-е число 06:00 MSK), skill-collection-review-main (7d). Legacy-джобы check-dreaming и dreaming-sweep (03:00) удалены 2026-09-09 по протоколу CRON CLEANUP. +- **Search Tool Priority:** web_search (SearXNG локально) → Tavily Search → Tavily Extract → Firecrawl. +- **OpenClaw Git Backup / Recovery:** канонический операционный документ — `OPENCLAW-GIT-BACKUP-RECOVERY.md`; State Git находится в `/home/owner/openclaw-backup/state-repo`, remote — приватный Forgejo `Sergey/openclaw-clawpi-state`; 24h automatic State Git backup active. Config Git находится в `/home/owner/openclaw-backup/repo`, remote — приватный Forgejo `Sergey/openclaw-clawpi`; 24h automatic Config Git backup через `systemd --user` timer active. Полный recovery использует State Git + Config Git. Git backup architecture has passed the full integration test: `PASS / FAIL=0`. State Git and Config Git authentication, backup, push, synchronization, and scheduled mechanisms were verified. The integration test is a validation tool; operational truth remains the Git repositories, OpenClaw backup results, Config Git timer, and State Git automation. + + +## 4. HERMES EVOLUTION PIPELINE (Контур саморефлексии и гигиены) +- **Short-Term Memory Buffer (STM):** Сырые логи сессий и промежуточные факты текущего дня пишутся в `stm_memories` (Кастомный Engram) с жестким TTL. Они не являются каноничной истиной. +- **Ночной Анализ (Hermes STM Sweep):** `hermes_cron_sweep.sh` (03:15 MSK, system-cron `hermes-stm-garbage-collector` для 5 агентов) — теперь GC-only (TTL очистка stm_memories). Consolidation/promotion переданы нативному dreaming (см. пункт ниже). Legacy-джоб `dreaming-sweep` (03:00, LLM-анализ) удалён 2026-09-09. +- **Native Dreaming (OpenClaw memory-core):** С 2026-09-21 включён нативный dreaming sweep (light → REM → deep, 03:00 MSK, model: qwen3.8-27b-q5xl). Promotion в MEMORY.md через deep phase с safety gates (maxPriorEntryLossFraction=0.25, maxPromotedSnippetTokens=160). DREAMS.md — человекочитаемый diary. Session transcript ingestion: только интерактивные сессии. +- **Карантин и Повышение (Promotion):** Результаты рефлексии падают в `/home/owner/obsidian-vault/system/quarantine/candidates/` (SSoT-путь, 2026-09-09; архив — `.../system/quarantine/archive/`; константы `QUARANTINE_CANDIDATES_DIR` / `QUARANTINE_ARCHIVE_DIR` в `hermes_memory_core.py`). В статус каноничных знаний (Obsidian Wiki) они переходят только при подтверждении Сергеем или при накоплении жестких доказательств (evidence count >= 3). -tmp/ -archive/ ``` -### Project Statuses - -Allowed values: - -```text -planning -active -paused -completed -archived -``` - -### Project Registry - -All projects tracked in: - -```text -/home/owner/.openclaw/workspace/projects/index.md -``` - -### Context Loading Policy - -Before working on a project: - -1. Read PROJECT.md -2. Read open tasks -3. Read latest CHANGELOG entries -4. Read latest notes -5. Load additional files only if required - -Never load the entire project by default. - -### Storage Policy - -Primary storage: - -```text -workspace/projects/ -``` - -Backup: - -```text -Nextcloud /Projects/ -``` - -Sync direction: - -```text -local → Nextcloud -``` - -Automatic reverse synchronization is prohibited. - -### Workspace File Policy -- **Корень `/workspace/`** — только файлы конфигурации OpenClaw (AGENTS.md, MEMORY.md, SOUL.md и т.д.) и папки `projects/`, `skills/`, `memory-core/`. -- **Запрещено**: создавать файлы вне папок проектов и skills. Все создаваемые файлы должны идти внутрь `/projects/<project>/` или `/skills/`. -- **При нарушении** — автоматически перенести файл в соответствующую папку проекта. - -### Research and Decisions - -- Research → facts, tests, evaluations (Location: notes/research/) -- Decisions → approved choices (Location: decisions/) -- Never mix them. - -### Project Registry - -See: - -/home/owner/.openclaw/workspace/projects/index.md - -### Agent Boundaries - -Agents may: create/modify project files, update PROJECT.md/CHANGELOG.md, create reports/decisions/tasks - -Agents may not: modify archived projects, delete archives, access unrelated projects without permission, modify system configuration without approval, move files between projects without approval - -### Project Versioning Policy (2026-06-20) - -#### Scope -- **All regular files** inside `workspace/projects/<project-name>/`, at any nesting level. -- Excludes: Cache/temporary files, Hidden VCS directories (.git), archive/ directories themselves - -#### Core idea -- Active (current) file stays **in place** with its original name — **no revision suffix**. -- Every edit creates a **dated, numbered snapshot** in a **local `archive/` subfolder** located **in the same directory** as the file being edited. -- Archive filenames preserve the original filename **and extension** to avoid collisions: `<filename>.<ext>-<YYYY-MM-DD>-BU_<N>.<ext>`. -- Note for AI developers: Local project archive/ directories are not subject to the global system log and cache ban for coder-agent. - -#### Pattern per file: -``` -/home/owner/.openclaw/workspace/projects/<project-name>/content/ -├── article.md ← active file -├── notes.md ← active file -├── articleassets.md ← active file -└── archive/ - ├── article-2026-06-20-BU_1.md - ├── notes-2026-06-20-BU_1.md - ├── article-2026-06-20-BU_2.md - └── notes-2026-06-22-BU_2.md -``` - -#### Behavior on edit - -##### First edit (no archive exists for this file) -- In the same folder as `<file>.md`, create `archive/` if it doesn't exist. -- Copy the current content of `<filename>.<ext>` into `archive/<filename>-<YYYY-MM-DD>-BU_1.<ext>`. -- Keep editing the original `<filename>.<ext>` — it remains the active version. - (No data loss, no empty active file.) - -##### Subsequent edits -- Ensure the local `archive/` folder exists. -- Find all revisions for this file in that `archive/` folder (by `<filename>-*.<ext>` pattern) and determine the highest revision number `N`. -- Copy the current active `<filename>.<ext>` into `archive/<filename>-<current-date>-BU_<N+1>.<ext>`. -- Continue editing `<filename>.<ext>` as the active version. - -##### Important notes -- The **active file is never moved** — only **copied** into the `archive/`. - This guarantees the working copy is always ready and unchanged. -- Revision names include the original filename (e.g. `readme-2026-06-20-BU_1.md`), ensuring unique identification even if multiple `.md` files share the same `archive/` folder. -- There is no separate "base" file after the first edit — the original file remains the single active version. -- The archive/ directory appears once per working directory (e.g., assets/archive/, content/archive/), not once per file. - -#### Relationship with storage/backup policy -- Archive revisions are part of the project and **are pushed to Nextcloud** together with all other files during manual sync or at natural checkpoints (task completion, milestone). -- No automatic background sync of archives. -- See `Storage Policy (2026-06-16)` for overall backup rules. - -### Memory Audit — Cleanup (2026-08-17) -- Удалено: 5 legacy migrated DBs (~27MB), пустые файлы (workspace/2026-08-12, memory/2026-07-15.md, memory/2026-07-23.md, vault Untitled.canvas ×2) -- Перенесено: notes/*.md → skills/nextcloud-aio-oc/docs/ (Workspace File Policy) -- HEARTBEAT.md переписан под фактическое состояние (check-email-daily 9:00 отменён) -- Live cron (актуально 2026-09-06): active — mail-check (15m trigger-скрипт), wiki-ingest-event (30m, активен — re-enabled 2026-09-06), wiki-ingest-backup (ежедневно 04:00 MSK, command-джоб: wrapper + wiki_ingest_backup.py, flock -n, лог /home/owner/wiki-ingest-backup/), wiki-full-backup (ежедневно 05:00 MSK, command-джоб: wrapper + wiki_full_backup.py, flock -n, лог /home/owner/wiki-full-backup/), check-dreaming, dreaming-sweep (03:00 MSK), searxng-weekly-update (вс 04:00), trash-cleanup (1-е число 06:00 MSK, модель qwen3.8-27b-q5xl, обязательное подтверждение Сергея перед удалением); Memory Dreaming Promotion — удалён 2026-08-22 (при disable native dreaming); legacy disabled jobs — удалены 2026-08-21 (запрос пользователя) - -## Tool Caveats - -### wiki_apply op=metadata (fixed 2026-08-25, TASK-001 closed) -- Инцидент 2026-08-24 (тихая потеря evidence/claims: подмножество в payload → REPLACE всего массива) исправлен: `dist/cli-DwyScdE_.js` — claims upsert по identity (id, fallback normalized text); evidence: absent/`[]` в payload = сохранение, non-empty = замена только для этого claim; `claims: []` = no-op. Явной delete-семантики для claims/evidence не изобретено (протокол). -- Идемпотентность: повторный идентичный apply → без перезаписи (bytes/updatedAt не меняются); per-page write lock + per-vault serializация мутаций (evaluator: deadlock-free). -- Верификация: regression 16/16 (pre-fix anchors fail на backup-чанке), независимый evaluator PASS, 0 counterexamples destructive loss. Backup+diff: projects/openclaw-tooling/tests/fixtures/cli-DwyScdE_.js.task001-pre.bak, patches/TASK-001-dist-patch.diff. -- Residual: патч теряется при npm update openclaw (re-apply по diff); cross-process race не покрыт (in-process lock); claims synthesis-страниц — REPLACE (out of scope). -### Eurostela SEO endpoint (с 2026-08-30) -- **Runbook обязателен перед любой SEO-задачей:** `projects/eurostela.ru/seo-endpoint-runbook.md` (+ копия в Nextcloud `eurostela.ru/`). -- Endpoint `POST /wp-json/openclaw/v1/seo-optimize` (плагин MCP SEO Endpoint, v1.8 на хостинге): категории ставить ТОЛЬКО с `object_type: "term"` (коллизия wp_posts.ID = term_id: 227/240/258). Ключ: `EUROSTELA_SEO_API_KEY` из /etc/environment. Лимиты title 70 / desc 160. -- Live-проверка — только с cache-buster (edge-кэш ~1ч): `?t=<ts>`, UA Chrome. -- 30.08: 9/9 категорий (30,67,227,37,240,618,619,258,68) — согласованные title+desc live. -- Инцидент: rank_math-мета скрытых постов 227/240/258 перезаписана (v1.7 auto-ветка); старые значения только из дампа БД хостинга. Backup'ы плагина BU_1..BU_3 не удалять, посты не трогать до закрытия вопроса. -```` - ## Notes <!-- openclaw:human:start --> <!-- openclaw:human:end -->