Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(storage): prevent silent data loss in VikingFS.append_file() (#1036)
LiBai3ca4de8d8b5a
diff --git a/openviking/storage/viking_fs.py b/openviking/storage/viking_fs.pyindex fbefca0ed..de830a6a0 100644--- a/openviking/storage/viking_fs.py+++ b/openviking/storage/viking_fs.py@@ -23,6 +23,7 @@ from datetime import datetimefrom pathlib import PurePathfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Union+from openviking.pyagfs.exceptions import AGFSClientError, AGFSHTTPErrorfrom openviking.server.identity import RequestContext, Rolefrom openviking.telemetry import get_current_telemetryfrom openviking.utils.time_utils import format_simplified, get_current_timestamp, parse_iso_datetime@@ -1665,8 +1666,11 @@ class VikingFS:existing_bytes = self._handle_agfs_read(self.agfs.read(path))existing_bytes = await self._decrypt_content(existing_bytes, ctx=ctx)existing = self._decode_bytes(existing_bytes)- except Exception:- pass+ except AGFSHTTPError as e:+ if e.status_code != 404:+ raise+ except AGFSClientError:+ raiseawait self._ensure_parent_dirs(path)final_content = (existing + content).encode("utf-8")