diff --git a/src/api/routes/admin.py b/src/api/routes/admin.py index d863c49..6b19a05 100644 --- a/src/api/routes/admin.py +++ b/src/api/routes/admin.py @@ -145,5 +145,5 @@ def get_config(): 'decay_rate': 0.015, 'decay_floor': 0.1, 'distill_threshold': 0.7, - 'version': '3.0' + 'version': '3.1' } \ No newline at end of file diff --git a/src/api/routes/graph_viz.py b/src/api/routes/graph_viz.py index 1b0e66f..23e700b 100644 --- a/src/api/routes/graph_viz.py +++ b/src/api/routes/graph_viz.py @@ -9,7 +9,7 @@ from pathlib import Path router = APIRouter() -GRAPH_DB = Path.home() / '.memory-fabric' / 'zhiyi' / 'graph.db' +GRAPH_DB = Path.home() / 'projects' / 'zhiyi' / 'data' / 'graph.db' class GraphNode(BaseModel): diff --git a/src/api/server.py b/src/api/server.py index 3545b1c..abd839b 100644 --- a/src/api/server.py +++ b/src/api/server.py @@ -32,7 +32,7 @@ def _start_event_consumer(): if not redis: logging.warning("[Consumer] Redis 不可用") return - last_id = '$' + last_id = '>' logging.info("[Consumer] 启动") # 确保消费组存在(MKSTREAM:流不存在则自动创建) try: diff --git a/src/storage/graph_store.py b/src/storage/graph_store.py index 61bc33b..3d63171 100644 --- a/src/storage/graph_store.py +++ b/src/storage/graph_store.py @@ -16,7 +16,7 @@ from datetime import datetime from typing import Optional -GRAPH_DB = Path('~/.memory-fabric/zhiyi/graph.db').expanduser() +GRAPH_DB = Path.home() / 'projects' / 'zhiyi' / 'data' / 'graph.db' def _get_conn() -> sqlite3.Connection: diff --git a/src/storage/jsonl_store.py b/src/storage/jsonl_store.py index 0435aa1..0e70a21 100644 --- a/src/storage/jsonl_store.py +++ b/src/storage/jsonl_store.py @@ -6,7 +6,7 @@ from datetime import datetime from typing import Iterator, Optional, Callable class JSONLShardStore: - def __init__(self, base_dir: str = '~/.memory-fabric', namespace: str = 'zhiyi'): + def __init__(self, base_dir: str = '~/projects/zhiyi/data', namespace: str = 'zhiyi'): self.base_dir = Path(base_dir).expanduser() self.namespace = namespace diff --git a/src/storage/tombstone.py b/src/storage/tombstone.py index ffdd3af..678a5be 100644 --- a/src/storage/tombstone.py +++ b/src/storage/tombstone.py @@ -3,7 +3,7 @@ from datetime import datetime from pathlib import Path class TombstoneStore: - def __init__(self, base_dir: str = '~/.memory-fabric', namespace: str = 'zhiyi'): + def __init__(self, base_dir: str = '~/projects/zhiyi/data', namespace: str = 'zhiyi'): self.base_dir = Path(base_dir).expanduser() self.namespace = namespace self.tombstones_file = self.base_dir / self.namespace / 'tombstones.json'