secure-memory-stack
一个安全的本地化记忆系统,结合百度Embedding语义搜索、Git Notes结构化存储和文件系统,确保数据隐私和安全。
Latest: v1.0.0
name: secure-memory-stack version: 1.0.0 description: A secure localized memory system integrating Baidu Embedding semantic search, Git Notes structured storage, and the file system to guarantee data privacy and security. triggers:
- "setup memory"
- "configure memory"
- "secure memory"
- "local memory"
- "privacy memory" author: Clawdbot Team
Secure Memory Stack
A secure localized memory system integrating Baidu Embedding semantic search, Git Notes structured storage, and the file system to guarantee data privacy and security.
Features
- ✅ Fully Localized - All data is stored on local devices
- ✅ Zero Data Upload - No data is sent to any external services
- ✅ Semantic Search - Semantic similarity search powered by Baidu Embedding
- ✅ Structured Storage - Structured memory management provided by Git Notes
- ✅ File System - Traditional file storage for easy management
- ✅ Hybrid Search - Semantic + keyword + tag integrated search
- ✅ Privacy Protection - Full data ownership and sovereignty
Quick Installation
clawdhub install secure-memory-stack
One-Click Initialization
bash
运行
# Initialize the secure memory system
bash /root/clawd/create/secure-memory-stack/scripts/setup.sh
API Configuration Guide
The system will automatically detect and guide you to configure required API keys:
Baidu Embedding API (optional)
Other optional services
Usage Guide
1. System Initialization
bash
运行
# First-time setup
secure-memory setup
2. Check System Status
bash
运行
# Check the status of the memory system
secure-memory status
3. Add Memories
bash
运行
# Add structured memories via Git Notes
secure-memory remember "Critical Decision: Adopt a localized memory system" --tags decision,security --importance high
# Update MEMORY.md to add long-term memories
secure-memory add-longterm "User Preference: Concise and efficient communication"
4. Search Memories
bash
运行
# Semantic search
secure-memory search "security configuration"
# Structured search by tags
secure-memory find --tag security
# File-based search
secure-memory lookup "user preferences"
5. System Maintenance
bash
运行
# Check system health status
secure-memory health
# View statistical information
secure-memory stats
Error Handling
Common Errors and Solutions
Error 1: "Failed to connect to Baidu Embedding API"
Solution: Verify the configuration of your Baidu API key
Run: secure-memory configure baidu
Error 2: "Git Notes system unavailable"
Solution: Ensure Git is installed and configured correctly
Run: secure-memory fix git
Error 3: "File permission error"
Solution: Check workspace access permissions
Run: secure-memory fix permissions
Error 4: "No search results found"
Solution: Confirm that the index has been updated
Run: secure-memory refresh
Configuration Files
The system will create configuration files at the following paths:
/root/clawd/memory_config.json - Main configuration file
/root/clawd/MEMORY.md - Long-term memory storage
/root/clawd/SESSION-STATE.md - Session state records
/root/clawd/memory/ - Daily logs
Directory Structure
plaintext
/root/clawd/
├── MEMORY.md # Long-term memories
├── SESSION-STATE.md # Active working memory
├── memory/ # Daily logs
│ ├── YYYY-MM-DD.md # Daily memory logs
│ └── ... # Historical logs
├── notes/ # Knowledge organization
│ ├── projects/ # Project records
│ ├── areas/ # Domain-specific content
│ ├── resources/ # Resource files
│ └── archive/ # Archived content
└── skills/secure-memory-stack/
├── scripts/ # Management scripts
├── configs/ # Configuration templates
└── docs/ # Documentation
Command Reference
Core Commands
secure-memory setup - Initialize the system
secure-memory status - Check system status
secure-memory search <query> - Perform semantic search
secure-memory remember <content> - Add a new memory
secure-memory health - Run system health check
secure-memory configure <service> - Configure API for a service
secure-memory fix <component> - Repair a system component
Advanced Commands
secure-memory refresh - Refresh search indexes
secure-memory backup - Back up all memory data
secure-memory restore - Restore memory data from backup
secure-memory export - Export memory data
secure-memory stats - View system statistics
Security Features
Local Storage: All data is stored exclusively on the local machine
Zero Upload: No data transmission to external services
Access Control: Restricted to local machine access only
Privacy Protection: Full user data sovereignty
Encryption Support: Optional local data encryption
Troubleshooting
If you encounter issues, run:
bash
运行
secure-memory diagnose
This will execute a full system diagnosis and provide targeted solutions.
System Update
bash
运行
clawdhub update secure-memory-stack
System Uninstallation
bash
运行
secure-memory cleanup
Note: This will delete all configuration files but will not remove your memory files.
Contribution
Issues and Pull Requests are welcome to help improve this skill.
plaintext
---
如果需要,我还可以帮你把这份文档调整为**更适合GitHub发布的README格式**,要不要我帮你优化一下?
安全记忆系统栈 (Secure Memory Stack)
一个安全的本地化记忆系统,结合百度Embedding语义搜索、Git Notes结构化存储和文件系统,确保数据隐私和安全。
功能特点
- ✅ 完全本地化 - 所有数据存储在本地设备
- ✅ 零数据上传 - 不向任何外部服务发送数据
- ✅ 语义搜索 - 基于百度Embedding的语义相似性搜索
- ✅ 结构化存储 - Git Notes提供结构化记忆管理
- ✅ 文件系统 - 传统文件存储,易管理
- ✅ 混合搜索 - 语义+关键词+标签搜索
- ✅ 隐私保护 - 完全数据主权
快速安装
clawdhub install secure-memory-stack
一键初始化
# 初始化安全记忆系统
bash /root/clawd/create/secure-memory-stack/scripts/setup.sh
API配置引导
系统会自动检测并引导您配置必要的API密钥:
- 百度Embedding API(如果需要)
- 其他可选服务
使用指南
1. 系统初始化
# 首次设置
secure-memory setup
2. 检查系统状态
# 检查记忆系统状态
secure-memory status
3. 添加记忆
# 通过Git Notes添加结构化记忆
secure-memory remember "重要决策:使用本地化记忆系统" --tags decision,security --importance high
# 更新MEMORY.md添加长期记忆
secure-memory add-longterm "用户偏好:简洁高效沟通"
4. 搜索记忆
# 语义搜索
secure-memory search "安全配置"
# 结构化搜索
secure-memory find --tag security
# 文件搜索
secure-memory lookup "用户偏好"
5. 系统维护
# 检查系统健康状态
secure-memory health
# 查看统计信息
secure-memory stats
错误处理
常见错误及解决方案
错误1: "百度Embedding API连接失败"
- 解决方案: 检查百度API密钥配置
- 运行:
secure-memory configure baidu
错误2: "Git Notes系统不可用"
- 解决方案: 确保Git已安装并正确配置
- 运行:
secure-memory fix git
错误3: "文件权限错误"
- 解决方案: 检查工作区权限
- 运行:
secure-memory fix permissions
错误4: "搜索无结果"
- 解决方案: 确认索引已更新
- 运行:
secure-memory refresh
配置文件
系统将在以下位置创建配置文件:
/root/clawd/memory_config.json- 主配置/root/clawd/MEMORY.md- 长期记忆/root/clawd/SESSION-STATE.md- 会话状态/root/clawd/memory/- 每日日志
目录结构
/root/clawd/
├── MEMORY.md # 长期记忆
├── SESSION-STATE.md # 活动工作记忆
├── memory/ # 每日日志
│ ├── YYYY-MM-DD.md # 每日记忆日志
│ └── ... # 历史日志
├── notes/ # 知识组织
│ ├── projects/ # 项目
│ ├── areas/ # 领域
│ ├── resources/ # 资源
│ └── archive/ # 归档
└── skills/secure-memory-stack/
├── scripts/ # 管理脚本
├── configs/ # 配置模板
└── docs/ # 文档
命令参考
主要命令
secure-memory setup- 初始化系统secure-memory status- 检查系统状态secure-memory search <query>- 语义搜索secure-memory remember <content>- 添加记忆secure-memory health- 健康检查secure-memory configure <service>- 配置APIsecure-memory fix <component>- 修复组件
高级命令
secure-memory refresh- 刷新索引secure-memory backup- 备份记忆secure-memory restore- 恢复记忆secure-memory export- 导出记忆secure-memory stats- 统计信息
安全特性
- 本地化存储: 所有数据仅存储在本地
- 零上传: 不向任何外部服务传输数据
- 访问控制: 仅限本机访问
- 隐私保护: 完全数据主权
- 加密支持: 可选本地加密
故障排除
如果遇到问题,运行:
secure-memory diagnose
这将运行完整的系统诊断并提供解决方案。
更新系统
clawdhub update secure-memory-stack
卸载系统
secure-memory cleanup
注意:这将删除所有配置文件,但不会删除您的记忆文件。
贡献
欢迎提交Issue和Pull Request来改进此技能。
