Files
16gagent/memory/registers/tool-env.md
T
2026-06-06 10:40:48 +08:00

78 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 工具环境寄存器
> 从 vault.md 拆分。记录所有外部工具/服务的接入配置和踩坑经验。
> Write Gate: 环境变更时更新(换了端口、改了 Key、新接入服务)
## 呆呆兽 Hub
- **地址**: https://www.ddshub.cc
- **API**: OpenAI 兼容格式
- **Claude Code 接入**: `ANTHROPIC_API_KEY` + `ANTHROPIC_BASE_URL=https://www.ddshub.cc/v1` 写入 ~/.zshrc
- **模型**: claudeMAXClaude Max 别名)
- **CC Switch 代理**: 127.0.0.1:15721
- **数据库**: ~/.cc-switch/cc-switch.dbSQLite
- **日志**: ~/.cc-switch/logs/cc-switch.log
- **状态**: Claude 通道有时 401 或 No available accounts,波动较大
- **Key 格式**: sk- 开头,注意网页会截断显示 `…`U+2026),需完整复制
## 智谱 AI (Zhipu)
- **Provider 名**: zai
- **接入模型**: GLM-5.1 (chat)、GLM-5-Turbo (多模态)、cogview-4 (图片生成)、GLM-OCR (通过 5-Turbo)
- **API Key**: Max 套餐(当前 Coding Plan Key 仅 glm-5.1 + embedding 可用,Turbo 需换 Key
- **坑**: Coding Plan 只有 glm-5.1 + embedding-3Max 套餐 Key (`.env` ZHIPU_API_KEY) 已过期;注意模型名是 `glm-5-turbo` 不是 `glm-5v-turbo`
## 远程记忆服务器
- **地址**: 111.229.145.18
- **技术栈**: Bun + Hono + PostgreSQL 16 + pgvector 0.6.0 + pg_trgm
- **API v2**: per-project schema 隔离,hybrid 搜索
- **管理页面**: http://111.229.145.18/api/v2/admin (Basic Auth)
- **部署**: Nginx 反向代理 + Systemd 服务
- **SSH**: `ssh ubuntu@111.229.145.18`(不是 root!)
- **API v2 端点**:
- `POST /api/v2/add` — 写入记忆(需 X-API-Key
- `GET /api/v2/stats` — 统计(无需认证)
- `POST /api/v2/search` — 搜索(POST 不是 GET!无需认证)
- **API Key**: xl_13457e1cf2f53d7f01720734cf0f220f(环境变量 MEMORY_API_KEY,在 ~/.zshrc 中配置)
- **当前状态 (2026-06-04)**: `0129b5ce_xiaolong` 项目 23 条记忆,正常在线
## iKuuuVPN 代理
- **端口会变** — 重连后可能从 SOCKS5 切 HTTP,端口也可能变
- **排查口诀**:搜索不通 → `lsof -P -n -i -a -c iKuuuVPNC` 查端口 → 测 `curl -x http://127.0.0.1:$PORT` → 更新 `.env` → 重启 Gateway
- **当前已配置 (2026-06-04)**: 127.0.0.1:12002 HTTP 代理,写入 `~/.openclaw/.env`
- **验证命令**: `curl -x http://127.0.0.1:12002 -s --max-time 5 https://www.google.com -o /dev/null -w "%{http_code}"`
## Gitea Git 服务
- **服务器**: https://git666.u7f.cn
- **账号**: sawz
- **本 workspace 仓库**: `sawz/16gagent` (推送地址: `https://git666.u7f.cn/sawz/16gagent.git`)
- **Nginx 限制**: 上传 ~30MB,大仓库需扁平化 commit
## OpenClaw 配置注意事项
- **上下文修复**: `agents.defaults.contextTokens=1000000`
- **自定义 provider 坑**: merge 模式下 provider 不带 contextWindow 会覆盖 DeepSeek catalog
- **Sub-agent 代码策略**: 子 agent 改方案/代码必须用 DeepSeek V4 Pro,不用 Flash
## 小米 MiMo 🆕 (2026-06-04)
- **Provider 名**: xiaomi-coding
- **Base URL**: `https://token-plan-cn.xiaomimimo.com/v1` (Token Plan,非按量付费)
- **API**: openai-completions
- **Key 格式**: `tp-xxxxx` (订阅套餐)
- **接入模型**:
- `mimo-v2.5-pro`: 文本 only, contextWindow=1M, maxTokens=32K, reasoning=true
- `mimo-v2.5`: 文本+图片, contextWindow=256K, maxTokens=32K, reasoning=true
- **注意**: provider 名不能设为 `xiaomi`(会和 OpenClaw 预置网关冲突)
## 新增脚本工具(2026-06-04
| 脚本 | 功能 | Cron |
|------|------|------|
| `memory-router.sh` | 统一记忆路由(搜索+写入) | 按需 |
| `watchdog.sh` | 远程服务器健康监控 | 每2h |
| `backup-remote.sh` | 远程服务器数据备份 | 每天3:00 |