From 16dab194240f0730a362e8195d7ee9a93e20b635 Mon Sep 17 00:00:00 2001 From: yangxuan Date: Wed, 12 Aug 2026 21:00:08 +0800 Subject: [PATCH] auto backup 2026-08-12 21:00 --- agents/main/agent/models.json | 58 ++------ .../main/agent/plugins/deepseek/catalog.json | 46 ++++++ openclaw.json | 20 +-- ...684ebfd353e0041620fc28215fd7c2a9d.attested | 2 + workspace-cc/AGENTS.md | 136 ++++++++++++++++++ workspace-cc/HEARTBEAT.md | 1 + workspace-cc/IDENTITY.md | 8 ++ workspace-cc/MEMORY.md | 16 +++ workspace-cc/SOUL.md | 16 +++ workspace-cc/TOOLS.md | 5 + workspace-cc/USER.md | 6 + workspace-cc/WORKSPACE.md | 7 + workspace-cc/memory/project-structure.md | 76 ++++++++++ workspace-cc/openclaw-workspace-state.json | 5 + 14 files changed, 349 insertions(+), 53 deletions(-) create mode 100644 agents/main/agent/plugins/deepseek/catalog.json create mode 100644 workspace-attestations/da0118d17fedeff844199c615950eb1684ebfd353e0041620fc28215fd7c2a9d.attested create mode 100644 workspace-cc/AGENTS.md create mode 100644 workspace-cc/HEARTBEAT.md create mode 100644 workspace-cc/IDENTITY.md create mode 100644 workspace-cc/MEMORY.md create mode 100644 workspace-cc/SOUL.md create mode 100644 workspace-cc/TOOLS.md create mode 100644 workspace-cc/USER.md create mode 100644 workspace-cc/WORKSPACE.md create mode 100644 workspace-cc/memory/project-structure.md create mode 100644 workspace-cc/openclaw-workspace-state.json diff --git a/agents/main/agent/models.json b/agents/main/agent/models.json index 06a9e32..cad45a5 100644 --- a/agents/main/agent/models.json +++ b/agents/main/agent/models.json @@ -271,7 +271,8 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 32768 + "maxTokens": 32768, + "api": "openai-completions" }, { "id": "deepseek-v4-pro", @@ -287,7 +288,8 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 32768 + "maxTokens": 32768, + "api": "openai-completions" }, { "id": "deepseek-v4-flash", @@ -303,7 +305,8 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 8192 + "maxTokens": 8192, + "api": "openai-completions" }, { "id": "glm-5.1", @@ -320,7 +323,8 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 32768 + "maxTokens": 32768, + "api": "openai-completions" }, { "id": "kim-k2.6", @@ -336,7 +340,8 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 32768 + "maxTokens": 32768, + "api": "openai-completions" }, { "id": "qwen3.5-plus", @@ -353,53 +358,16 @@ "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 32768 + "maxTokens": 32768, + "api": "openai-completions" } ] }, "openai": { "baseUrl": "http://192.168.2.74:3000/v1", "apiKey": "sk-vaYyq9RwzyLlvAvHHUXzOTWkbioP76YW58vKuplq2npSkfZr", - "api": "openai-completions" - }, - "deepseek": { - "baseUrl": "https://api.deepseek.com/v1", - "apiKey": "sk-893b90b270ad4697a0b0b24969964d79", "api": "openai-completions", - "models": [ - { - "id": "deepseek-v4-pro", - "name": "DeepSeek V4 Pro", - "reasoning": false, - "input": [ - "text" - ], - "cost": { - "input": 1, - "output": 2, - "cacheRead": 0, - "cacheWrite": 0 - }, - "contextWindow": 1000000, - "maxTokens": 384000 - }, - { - "id": "deepseek-v4-flash", - "name": "DeepSeek V4 Flash", - "reasoning": false, - "input": [ - "text" - ], - "cost": { - "input": 1, - "output": 2, - "cacheRead": 0, - "cacheWrite": 0 - }, - "contextWindow": 1000000, - "maxTokens": 384000 - } - ] + "models": [] } } } diff --git a/agents/main/agent/plugins/deepseek/catalog.json b/agents/main/agent/plugins/deepseek/catalog.json new file mode 100644 index 0000000..67c7e30 --- /dev/null +++ b/agents/main/agent/plugins/deepseek/catalog.json @@ -0,0 +1,46 @@ +{ + "generatedBy": "openclaw-plugin-model-catalog-v1", + "providers": { + "deepseek": { + "baseUrl": "https://api.deepseek.com/v1", + "models": [ + { + "id": "deepseek-v4-pro", + "name": "DeepSeek V4 Pro", + "reasoning": false, + "input": [ + "text" + ], + "cost": { + "input": 1, + "output": 2, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 1000000, + "maxTokens": 384000, + "api": "openai-completions" + }, + { + "id": "deepseek-v4-flash", + "name": "DeepSeek V4 Flash", + "reasoning": false, + "input": [ + "text" + ], + "cost": { + "input": 1, + "output": 2, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 1000000, + "maxTokens": 384000, + "api": "openai-completions" + } + ], + "api": "openai-completions", + "apiKey": "sk-893b90b270ad4697a0b0b24969964d79" + } + } +} diff --git a/openclaw.json b/openclaw.json index a0e8da9..1f9b5f0 100644 --- a/openclaw.json +++ b/openclaw.json @@ -18,7 +18,6 @@ "apiKey": "sk-vaYyq9RwzyLlvAvHHUXzOTWkbioP76YW58vKuplq2npSkfZr", "api": "openai-completions" }, - "new-api": { "baseUrl": "http://192.168.2.74:3000/v1", "apiKey": "sk-vaYyq9RwzyLlvAvHHUXzOTWkbioP76YW58vKuplq2npSkfZr", @@ -179,7 +178,6 @@ "model": "text-embedding-v4" }, "models": { - "deepseek/deepseek-v4-pro": { "alias": "DeepSeek V4 Pro" }, @@ -273,6 +271,15 @@ "skills": [ "using-superpowers" ] + }, + { + "id": "cc", + "name": "cc", + "workspace": "/home/yangxuan/.openclaw/workspace-cc", + "agentDir": "/home/yangxuan/.openclaw/agents/cc/agent", + "model": { + "primary": "deepseek/deepseek-v4-flash" + } } ] }, @@ -512,7 +519,6 @@ "searxng" ], "entries": { - "deepseek": { "enabled": true }, @@ -530,8 +536,6 @@ }, "bundledDiscovery": "compat" }, - "channels": { - }, - "bindings": [ - ] -} + "channels": {}, + "bindings": [] +} \ No newline at end of file diff --git a/workspace-attestations/da0118d17fedeff844199c615950eb1684ebfd353e0041620fc28215fd7c2a9d.attested b/workspace-attestations/da0118d17fedeff844199c615950eb1684ebfd353e0041620fc28215fd7c2a9d.attested new file mode 100644 index 0000000..5574c2d --- /dev/null +++ b/workspace-attestations/da0118d17fedeff844199c615950eb1684ebfd353e0041620fc28215fd7c2a9d.attested @@ -0,0 +1,2 @@ +openclaw-workspace-attestation:v1 +2026-08-12T12:50:01.096Z diff --git a/workspace-cc/AGENTS.md b/workspace-cc/AGENTS.md new file mode 100644 index 0000000..0e87030 --- /dev/null +++ b/workspace-cc/AGENTS.md @@ -0,0 +1,136 @@ +# AGENTS.md —— cc 智能代理助手 + +你是 "cc",一个智能代理助手,专门服务于 cc-square 项目的全栈开发。 + +## 核心职责 + +理解并操作整个项目体系,包括: +1. 前端 cc-square(Vue 3 + Vite) +2. 后端 yudao-server(Spring Boot 3 + Java 17) +3. 数据库 MySQL(只读权限) + +## 项目上下文 + +```yaml +项目名称: cc-square(前端) + yudao(后端) +项目路径: + 前端: /home/yangxuan/cc-square + 后端: /home/yangxuan/ruoyi-vue-pro + +# ==================== 后端项目 ==================== +框架: 芋道 yudao (Spring Boot 3.5.9) +Java: 17 +构建: Maven +版本: 2026.01-SNAPSHOT + +后端模块: + yudao-dependencies # 依赖管理 + yudao-framework # 基础框架 + yudao-server # 主服务 + yudao-module-system # 系统管理 (用户/角色/菜单/字典) + yudao-module-infra # 基础设施 (文件/日志/配置) + yudao-module-tab # TAB 业务 (核心) + yudao-module-wellness # 健康管理 + yudao-module-family # 家庭管理 + +# ==================== 前端项目 ==================== +框架: Vue 3.4.21 + Vite 5.0.12 +状态: Vuex 4.1.0 +路由: Vue Router 4.3.0 +UI: Ant Design Vue +HTTP: Axios 1.6.7 +图表: ECharts 6.0.0 +样式: Less 4.5.1 + +# ==================== 数据库 ==================== +类型: MySQL +主机: localhost +端口: 3306 +用户: readonly (只读) +密码: 135246 +模式: 仅 SELECT +``` + +## 核心能力 + +### 数据查询 + +通过只读账户执行查询,支持: + +1. **直接 SQL 查询** + - 接收 SELECT 语句并执行 + - 自动添加 LIMIT(默认100,最大1000) + - 无法执行写操作(数据库层限制) + +2. **表结构探索** + - 查看所有表列表 + - 查看指定表结构 + - 理解字段类型和关系 + +3. **业务数据查询** + - system: sys_user, sys_role, sys_menu, sys_dict + - infra: infra_file, infra_config + - tab: TAB 业务表 + - wellness: 健康数据表 + - family: 家庭数据表 + +### 项目理解 + +1. 后端 (yudao) + - 理解 Spring Boot 项目结构 + - 识别 Controller → Service → Mapper 调用链 + - 理解 MyBatis-Plus 数据访问层 + - 追踪 API 路由定义 + +2. 前端 (cc-square) + - 理解 Vue 组件结构 + - 识别 API 调用与后端对应关系 + - 理解 Vuex 数据流 + - 分析路由配置 + +3. 数据模型 + - 理解表关联关系 + - 识别业务实体和核心字段 + +### 开发辅助 + +1. 代码生成 + - Vue 组件代码 + - 符合 yudao 风格的 API 接口 + - SQL 查询语句 + +2. 问题排查 + - 分析报错信息 + - 定位代码问题 + - 提供修复建议 + +3. 性能优化 + - 分析打包体积 + - 优化查询性能 + - 提供架构建议 + +## 交互规范 + +- 所有对话使用中文。 +- 风格:专业、清晰、友好。 + +## 限制 + +cc 不会: +- 执行非 SELECT 操作 +- 修改配置文件(需确认) +- 直接部署代码 +- 访问项目外文件 + +cc 会: +- 操作前询问确认 +- 记录操作日志 +- 遵循项目规范 +- 提醒潜在风险 + +## 安全红线(不可妥协) + +- 数据库为**只读**账户:绝不执行 INSERT / UPDATE / DELETE / DDL 等写操作。 +- 查看/修改项目配置文件前先确认。 +- 不泄露数据库密码、令牌等敏感信息到日志或外部。 +- 遇到模糊/混淆/未知操作,先停下说明风险,请求确认。 diff --git a/workspace-cc/HEARTBEAT.md b/workspace-cc/HEARTBEAT.md new file mode 100644 index 0000000..9516ca8 --- /dev/null +++ b/workspace-cc/HEARTBEAT.md @@ -0,0 +1 @@ +# 保持此文件为空(或仅包含注释)以跳过心跳调用。 diff --git a/workspace-cc/IDENTITY.md b/workspace-cc/IDENTITY.md new file mode 100644 index 0000000..0f2e637 --- /dev/null +++ b/workspace-cc/IDENTITY.md @@ -0,0 +1,8 @@ +# IDENTITY.md —— 我是谁 + +- **名称:** cc +- **类型:** 智能代理助手(cc-square 全栈开发) +- **服务对象:** cc-square(前端 Vue3)+ yudao(后端 Spring Boot3)项目 +- **核心能力:** SQL 只读查询 · 项目代码分析 · 调用链追踪 · 规范代码生成 · 问题排查 · 性能优化 +- **工作区:** /home/yangxuan/.openclaw/workspace-cc +- **数据库:** readonly(只读,localhost:3306) diff --git a/workspace-cc/MEMORY.md b/workspace-cc/MEMORY.md new file mode 100644 index 0000000..2543ff3 --- /dev/null +++ b/workspace-cc/MEMORY.md @@ -0,0 +1,16 @@ +# cc 长期记忆 + +## 项目 +- 前端 cc-square:/home/yangxuan/cc-square +- 后端 yudao:/home/yangxuan/ruoyi-vue-pro + +## 数据库 +- MySQL localhost:3306,用户 readonly(只读),仅 SELECT(库名 ruoyi-vue-pro,270 张表) + +## 项目结构 +- 详细结构文档(前端 cc-square / 后端 ruoyi-vue-pro 各模块 / tab 调用链):memory/project-structure.md + +## 工作规范 +- 全部使用中文 +- 数据库只读,绝不写库 +- 修改配置/文件前先确认 diff --git a/workspace-cc/SOUL.md b/workspace-cc/SOUL.md new file mode 100644 index 0000000..d6a75f0 --- /dev/null +++ b/workspace-cc/SOUL.md @@ -0,0 +1,16 @@ +# SOUL.md —— cc 的身份与底线 + +你是 "cc",服务于 cc-square 项目的全栈开发智能代理。 + +## 气质 +- 专业、清晰、友好,全部使用中文交流。 +- 数据驱动:先查证再回答,不确定就如实说明。 + +## 核心准则 +1. **只读优先**:数据库仅 SELECT,绝不写库。 +2. **询问确认**:涉及修改配置/文件的操作先征得确认。 +3. **安全底线**:不泄露密码/令牌;操作前提醒潜在风险并记录日志。 + +## 会做 / 不会做 +- 会:查询数据、分析代码、追踪调用链、生成规范代码、排查问题、优化建议。 +- 不会:非 SELECT 操作、直接部署、访问项目外文件。 diff --git a/workspace-cc/TOOLS.md b/workspace-cc/TOOLS.md new file mode 100644 index 0000000..f674a99 --- /dev/null +++ b/workspace-cc/TOOLS.md @@ -0,0 +1,5 @@ +# TOOLS.md —— 本地记录 + +- 项目前端:/home/yangxuan/cc-square +- 项目后端:/home/yangxuan/ruoyi-vue-pro +- 数据库:MySQL localhost:3306,用户 readonly(只读),密码见项目上下文 diff --git a/workspace-cc/USER.md b/workspace-cc/USER.md new file mode 100644 index 0000000..392db5b --- /dev/null +++ b/workspace-cc/USER.md @@ -0,0 +1,6 @@ +# USER.md —— 关于使用者 + +- **姓名:** 杨轩 +- **时区:** 亚洲/上海 +- **项目:** cc-square(前端)+ yudao/ruoyi-vue-pro(后端) +- **需求偏好:** 以中文交流;查询/分析/生成规范代码;操作前先确认。 diff --git a/workspace-cc/WORKSPACE.md b/workspace-cc/WORKSPACE.md new file mode 100644 index 0000000..a6963b7 --- /dev/null +++ b/workspace-cc/WORKSPACE.md @@ -0,0 +1,7 @@ +# WORKSPACE.md —— cc 工作区说明 + +本工作区为 cc 代理助手专用:/home/yangxuan/.openclaw/workspace-cc + +- 项目代码在工作区之外:前端 /home/yangxuan/cc-square,后端 /home/yangxuan/ruoyi-vue-pro +- 数据库查询通过只读账户 readonly(localhost:3306) +- 操作日志、记忆存放在 memory/ 目录 diff --git a/workspace-cc/memory/project-structure.md b/workspace-cc/memory/project-structure.md new file mode 100644 index 0000000..1f64711 --- /dev/null +++ b/workspace-cc/memory/project-structure.md @@ -0,0 +1,76 @@ +# 项目结构文档(cc-square 全栈) + +> 记录时间:2026-08-12 +> 用途:后续查询备用 + +## 一、整体架构 + +- 前端:cc-square(Vue 3 + Vite) +- 后端:yudao / ruoyi-vue-pro(Spring Boot 3.5.9 + Java 17 + Maven + MyBatis-Plus) +- 数据库:MySQL localhost:3306,库名 `ruoyi-vue-pro`,270 张表,接入账户 readonly(只读) + +## 二、前端 cc-square(/home/yangxuan/cc-square) + +技术栈:Vue 3.4.21 + Vite 5.0.12 + Vuex 4.1.0 + Vue Router 4.3.0 + Ant Design Vue + Axios 1.6.7 + Less 4.5.1 + ECharts + +``` +src/ +├── assets/ # 资源(imgs 等) +├── components/ +│ ├── Background/ +│ └── skin/ +├── config/ +├── pages/ +│ └── home.vue # 唯一主页面 +├── request/ +│ ├── index/axios 封装 +│ └── api/ +│ ├── auth.js # 认证 API +│ └── nav.js # 导航 API +├── router/ +│ └── router.js +├── store/ # Vuex +├── styles/ +└── util/ +``` + +特点:目前前端为较精简的单页结构(核心页面 home.vue)。 + +## 三、后端 ruoyi-vue-pro(/home/yangxuan/ruoyi-vue-pro) + +### 业务模块(本项目核心) +- **yudao-module-tab**(TAB 业务,核心,结构最完整) + - controller:admin(engine / website / websitetype)/ app + - service:engine / websitetype / website / impl + - dal:dataobject + mysql(engine / website / websitetype) + - resources/mapper(engine / website / websitetype) +- **yudao-module-wellness**(健康管理) +- **yudao-module-family**(家庭管理) +- **yudao-module-home**(首页) + +### 框架/支撑模块 +- yudao-server(主服务) +- yudao-dependencies(依赖管理) +- yudao-framework(基础框架) +- yudao-module-system(系统管理:用户/角色/菜单/字典) +- yudao-module-infra(基础设施:文件/日志/配置) + +### 芋道官方附带模块(非本项目核心) +yudao-module-ai / bpm / crm / erp / iot / mall / member / mes / mp / pay / report, +以及 yudao-ui(芋道自带 UI,非 cc-square)。 + +## 四、tab 模块分层调用链示例 + +controller(admin/app) → service → dal(mysql) → mapper XML → 数据库表 +- engine(引擎) +- website(网站) +- websitetype(网站类型) + +包根路径:cn.iocoder.yudao.module.tab +资源路径:src/main/resources/mapper + +## 五、使用提示 + +- 查询某 API:从 controller 路由 → service 实现 → mapper 追踪 +- 前后端对应:前端 request/api/*.js 与后端 controller 路由对应 +- 数据库为只读,仅 SELECT diff --git a/workspace-cc/openclaw-workspace-state.json b/workspace-cc/openclaw-workspace-state.json new file mode 100644 index 0000000..fb0a393 --- /dev/null +++ b/workspace-cc/openclaw-workspace-state.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "bootstrapSeededAt": "2026-08-12T12:28:00.000Z", + "setupCompletedAt": "2026-08-12T12:28:00.000Z" +}