vault backup: 2026-02-26 21:18:17

This commit is contained in:
windyboy
2026-02-26 21:18:17 +08:00
parent 410167d3b4
commit 5821bbf21d
2 changed files with 33 additions and 27 deletions
+2 -1
View File
@@ -45,6 +45,7 @@
"titleGenerationModel": "", "titleGenerationModel": "",
"show1MModel": false, "show1MModel": false,
"enableChrome": false, "enableChrome": false,
"enableBangBash": false,
"excludedTags": [], "excludedTags": [],
"mediaFolder": "05_Attachments", "mediaFolder": "05_Attachments",
"systemPrompt": "", "systemPrompt": "",
@@ -52,7 +53,7 @@
"~/Downloads" "~/Downloads"
], ],
"persistentExternalContextPaths": [], "persistentExternalContextPaths": [],
"environmentVariables": "", "environmentVariables": "HTTPS_PROXY=\"http://localhost:7892\"",
"envSnippets": [], "envSnippets": [],
"customContextLimits": {}, "customContextLimits": {},
"keyboardNavigation": { "keyboardNavigation": {
@@ -15,22 +15,22 @@ created: 2026-02-25
## 双层记忆模型 ## 双层记忆模型
``` ```mermaid
┌─────────────────────────────────────────────┐ graph TD
│ Claude Agent (agent-with-memory.sh) │ A["🗂️ Obsidian Vault (.md files)"]
│ │ B["🪝 git post-commit hook"]
│ Layer B: MEMORY.md (偏好/事实/约束) │ C["⚙️ incremental_ingest.py"]
│ Layer A: pgvector 语义检索结果 │ D[("🐘 PostgreSQL + pgvector")]
└─────────────────────────────────────────────┘ E["🔍 query_pgvector.py"]
↑ ↑ F["📝 Claude Code / MEMORY.md"]
Claude Code query_pgvector.py G["🤖 Claude Agent\nagent-with-memory.sh"]
MEMORY.md PostgreSQL + pgvector H["Layer B: MEMORY.md\n偏好 / 事实 / 约束"]
I["Layer A: pgvector\n语义检索结果"]
incremental_ingest.py
A --> B --> C --> D --> E --> G
git post-commit hook F --> G
G --> H
Obsidian Vault (.md files) G --> I
``` ```
### Layer A:文档语义记忆 ### Layer A:文档语义记忆
@@ -85,16 +85,21 @@ memory_secure_audit (
## 增量同步流程 ## 增量同步流程
``` ```mermaid
git commit flowchart TD
└── post-commit hooknohup,不阻塞提交) GC["git commit"]
└── incremental_ingest.py --changes-file <tmp> HK["post-commit hook\nnohup,不阻塞提交"]
├── 解析 git diff-tree 输出(A/M/T/D/R II["incremental_ingest.py\n--changes-file &lt;tmp&gt;"]
├── 获取 index_lock(跨平台文件锁) PD["解析 git diff-tree 输出\nA / M / T / D / R"]
└── 逐事件处理: LK["获取 index_lock\n跨平台文件锁"]
A/M/T → upsert_file() AMT["A/M/T → upsert_file()"]
D → DELETE from both tables D["D → DELETE from both tables"]
R → DELETE old, upsert_file(new) R["R → DELETE old\n+ upsert_file(new)"]
GC --> HK --> II --> PD --> LK
LK --> AMT
LK --> D
LK --> R
``` ```
## 安全策略 ## 安全策略