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