mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-04-21 16:10:56 +08:00
refactor: 技能 name 改为中文 + update-agent 加入 AgentFS 背景知识
- 4 个技能 name 改为中文:创建智能体、更新智能体、发现智能体、删除智能体 - update-agent 新增 AgentFS 仓库结构背景知识(仅 Agent 内部使用) - update-agent 回执改为用户友好格式,移除内部路径和 YAML 回执 - 合并重复的受保护路径段到背景知识中
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: create-agent
|
name: 创建智能体
|
||||||
description: >-
|
description: >-
|
||||||
通过多轮对话收集需求,调用 HTTP API 创建新的 AgentFS v2 智能体,支持自定义 persona 和 principles。Use when
|
通过多轮对话收集需求,调用 HTTP API 创建新的 AgentFS v2 智能体,支持自定义 persona 和 principles。Use when
|
||||||
用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。
|
用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: delete-agent
|
name: 删除智能体
|
||||||
description: 安全删除指定的智能体及其关联数据。删除前会验证智能体状态,支持可选地删除所有会话历史。Use when 用户需要删除不再使用的智能体。
|
description: 安全删除指定的智能体及其关联数据。删除前会验证智能体状态,支持可选地删除所有会话历史。Use when 用户需要删除不再使用的智能体。
|
||||||
type: meta
|
type: meta
|
||||||
risk_level: high
|
risk_level: high
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: discover-agent
|
name: 发现智能体
|
||||||
description: 根据用户需求推荐最匹配的智能体,展示候选列表并引导选择。Use when 用户描述需求但不确定该找哪个智能体帮忙,或想浏览可用的智能体。
|
description: 根据用户需求推荐最匹配的智能体,展示候选列表并引导选择。Use when 用户描述需求但不确定该找哪个智能体帮忙,或想浏览可用的智能体。
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
type: procedural
|
type: procedural
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: update-agent
|
name: 更新智能体
|
||||||
description: >-
|
description: >-
|
||||||
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent
|
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent
|
||||||
行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
||||||
@@ -209,31 +209,13 @@ User confirmed: true
|
|||||||
|
|
||||||
### 阶段 6:回执生成
|
### 阶段 6:回执生成
|
||||||
|
|
||||||
**回执内容**:
|
创建成功后,以用户友好的方式呈现回执(不要暴露内部路径或技术细节):
|
||||||
|
|
||||||
```yaml
|
> 已更新「法律顾问小助手」的沟通风格。
|
||||||
# ~/.desirecore/runs/<run_id>/receipts/update-<timestamp>.yaml
|
>
|
||||||
receipt:
|
> **变更摘要**:沟通风格从"友好随和"调整为"专业严谨"
|
||||||
type: agent-update
|
>
|
||||||
timestamp: "2024-01-15T10:30:00Z"
|
> 如果不满意,可以随时说"撤销刚才的修改"来回滚。
|
||||||
|
|
||||||
request:
|
|
||||||
user_intent: "说话正式一点"
|
|
||||||
update_type: persona
|
|
||||||
target_files:
|
|
||||||
- persona.md
|
|
||||||
|
|
||||||
changes:
|
|
||||||
files_modified: 1
|
|
||||||
diff_summary: "沟通风格从'友好随和'改为'专业严谨'"
|
|
||||||
git_commit: "def456..."
|
|
||||||
previous_commit: "abc123..."
|
|
||||||
|
|
||||||
metadata:
|
|
||||||
risk_level: medium
|
|
||||||
user_confirmed: true
|
|
||||||
rollback_available: true
|
|
||||||
```
|
|
||||||
|
|
||||||
### 特殊操作:版本回滚
|
### 特殊操作:版本回滚
|
||||||
|
|
||||||
@@ -273,15 +255,40 @@ git revert <commit_hash> --no-edit
|
|||||||
git reset --soft <commit_hash>
|
git reset --soft <commit_hash>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 受保护路径
|
### 背景知识:AgentFS 仓库结构
|
||||||
|
|
||||||
变更应用前**必须**检查是否触及受保护路径。完整定义见共享配置文件 [`_protected-paths.yaml`](../_protected-paths.yaml)。
|
> 以下信息仅供 Agent 内部理解,**不要向用户展示**。
|
||||||
|
> 用于定位修改目标、排查问题、以及精细化维护。
|
||||||
|
|
||||||
**关键规则摘要**:
|
Agent 仓库遵循 AgentFS v2 扁平结构:
|
||||||
- `persona.md` L0 section → **block**(核心身份不可自动修改)
|
|
||||||
- `principles.md` "绝不做" section → **block**(安全红线不可自动修改)
|
```
|
||||||
- `agent.json` access_control / privacy → **owner_only**(需 owner 确认)
|
<agent_id>/
|
||||||
- `tools/` permissions / credentials → **owner_only / block**
|
├── agent.json # 元数据与运行时配置
|
||||||
|
├── persona.md # 人格定义(L0/L1/L2)
|
||||||
|
├── principles.md # 行为原则(L0/L1/L2)
|
||||||
|
├── memory/ # 记忆目录
|
||||||
|
├── skills/ # 技能目录
|
||||||
|
├── tools/ # 工具目录
|
||||||
|
└── heartbeat/ # 心跳配置
|
||||||
|
```
|
||||||
|
|
||||||
|
**更新操作对照表**:
|
||||||
|
|
||||||
|
| 用户意图 | 目标文件 | 推荐 API |
|
||||||
|
|---------|---------|---------|
|
||||||
|
| 修改性格/风格 | `persona.md` | `PUT /api/agents/:id/persona` |
|
||||||
|
| 修改行为规则 | `principles.md` | `PUT /api/agents/:id/principles` |
|
||||||
|
| 安装/卸载技能 | `skills/` | `PUT /api/agents/:id/files/*` |
|
||||||
|
| 修改工具配置 | `tools/` | `PUT /api/agents/:id/files/*` |
|
||||||
|
| 添加记忆 | `memory/` | `PUT /api/agents/:id/files/*` |
|
||||||
|
| 修改运行时配置 | `agent.json` | `PUT /api/agents/:id/files/agent.json` |
|
||||||
|
|
||||||
|
**受保护路径**(不可自动修改):
|
||||||
|
- `persona.md` L0 section — 核心身份
|
||||||
|
- `principles.md` "绝不做" section — 安全红线
|
||||||
|
- `agent.json` access_control / privacy — 需 owner 确认
|
||||||
|
- `tools/` permissions / credentials — 需 owner 确认
|
||||||
|
|
||||||
### 错误处理
|
### 错误处理
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user