mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-07-23 05:23:40 +08:00
fix(skills): update-agent 示例字段名修正 + get 返回示例对齐真实输出 (#53)
## 摘要 / Summary ### 中文 market#52 的修正:update-agent 附录示例使用了错误的字段名(`communicationStyle`/`must`),照示例调用会被 ManageAgent 的 Ajv 校验(additionalProperties: false)直接拒绝;`personality` 示例应为字符串数组。同时把 `get` 的返回示例对齐真实输出格式(`## persona.md` / `## principles.md` 段落含分层 markdown 原文,对应 desirecore#1230),并在附录固定列出结构化字段名清单。update-agent 3.1.1,manifest 1.2.11。 ### English Correction to market#52: the update-agent appendix examples used wrong field names (`communicationStyle`/`must`) that ManageAgent's Ajv validation (additionalProperties: false) would reject outright; `personality` must be a string array. The `get` response example is aligned with the actual output format (`## persona.md` / `## principles.md` sections, per desirecore#1230), and the appendix now lists the fixed structured field names. update-agent 3.1.1, manifest 1.2.11.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DesireCore Official Market",
|
"name": "DesireCore Official Market",
|
||||||
"version": "1.2.10",
|
"version": "1.2.11",
|
||||||
"schemaVersion": "1.1.0",
|
"schemaVersion": "1.1.0",
|
||||||
"supportedLocales": ["zh-CN", "en-US"],
|
"supportedLocales": ["zh-CN", "en-US"],
|
||||||
"defaultLocale": "en-US",
|
"defaultLocale": "en-US",
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [3.1.1] - 2026-07-18
|
||||||
|
|
||||||
|
- 修正示例字段名:`communicationStyle` → `communication_style`、`must` → `must_do`;`personality` 示例改为字符串数组
|
||||||
|
- `get` 返回示例对齐真实输出格式(`## persona.md` / `## principles.md` 段落含分层 markdown 原文,客户端 ≥ 10.0.90)
|
||||||
|
- 附录补充结构化字段名固定清单(persona L1.role/personality/communication_style;principles L1.must_do/must_not/priority)
|
||||||
|
|
||||||
## [3.1.0] - 2026-07-18
|
## [3.1.0] - 2026-07-18
|
||||||
|
|
||||||
- 结构化字段(name/description/llm/persona/principles)改经进程内内置工具 **ManageAgent** 的 `update` 动作更新(白名单 + schema 校验 + 合并语义),移除对 `agent.json` / `persona.md` / `principles.md` 的直接 Write 指引
|
- 结构化字段(name/description/llm/persona/principles)改经进程内内置工具 **ManageAgent** 的 `update` 动作更新(白名单 + schema 校验 + 合并语义),移除对 `agent.json` / `persona.md` / `principles.md` 的直接 Write 指引
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name: update-agent
|
|||||||
description: >-
|
description: >-
|
||||||
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent
|
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent
|
||||||
行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
||||||
version: 3.1.0
|
version: 3.1.1
|
||||||
type: meta
|
type: meta
|
||||||
risk_level: low
|
risk_level: low
|
||||||
status: enabled
|
status: enabled
|
||||||
@@ -27,7 +27,7 @@ metadata:
|
|||||||
description: >-
|
description: >-
|
||||||
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent 行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent 行为、安装/卸载技能、调整配置、回滚变更或修订规则。
|
||||||
body: ./SKILL.zh-CN.md
|
body: ./SKILL.zh-CN.md
|
||||||
source_hash: sha256:eeb2187b0f08bc47
|
source_hash: sha256:15eafc7363a40986
|
||||||
translated_by: human
|
translated_by: human
|
||||||
en-US:
|
en-US:
|
||||||
name: Update Agent
|
name: Update Agent
|
||||||
@@ -35,7 +35,7 @@ metadata:
|
|||||||
description: >-
|
description: >-
|
||||||
Safely update an existing Agent's config, persona, principles, skills, and memory, producing reviewable diffs that are applied and committed only after confirmation. Use when the user asks to modify Agent behavior, install/uninstall skills, adjust config, roll back changes, or revise rules.
|
Safely update an existing Agent's config, persona, principles, skills, and memory, producing reviewable diffs that are applied and committed only after confirmation. Use when the user asks to modify Agent behavior, install/uninstall skills, adjust config, roll back changes, or revise rules.
|
||||||
body: ./SKILL.md
|
body: ./SKILL.md
|
||||||
source_hash: sha256:eeb2187b0f08bc47
|
source_hash: sha256:15eafc7363a40986
|
||||||
translated_by: ai:claude-fable-5
|
translated_by: ai:claude-fable-5
|
||||||
translated_at: '2026-07-18'
|
translated_at: '2026-07-18'
|
||||||
market:
|
market:
|
||||||
@@ -224,7 +224,7 @@ The following fields **must** be updated through the `update` action of the in-p
|
|||||||
ManageAgent(action='update', id='<agent-id>', name='New name')
|
ManageAgent(action='update', id='<agent-id>', name='New name')
|
||||||
ManageAgent(action='update', id='<agent-id>', description='One-line summary')
|
ManageAgent(action='update', id='<agent-id>', description='One-line summary')
|
||||||
ManageAgent(action='update', id='<agent-id>', config={ llm: { model: 'xxx', temperature: 0.7 } })
|
ManageAgent(action='update', id='<agent-id>', config={ llm: { model: 'xxx', temperature: 0.7 } })
|
||||||
ManageAgent(action='update', id='<agent-id>', persona={ L1: { personality: 'professional, rigorous' } })
|
ManageAgent(action='update', id='<agent-id>', persona={ L1: { personality: ["professional", "rigorous"] } })
|
||||||
ManageAgent(action='update', id='<agent-id>', principles='...(full markdown)...')
|
ManageAgent(action='update', id='<agent-id>', principles='...(full markdown)...')
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -360,18 +360,24 @@ git show <commit>:persona.md
|
|||||||
# 1. 读取当前 persona,定位要改的字段(字段名以返回结构为准)
|
# 1. 读取当前 persona,定位要改的字段(字段名以返回结构为准)
|
||||||
ManageAgent(action='get', id='legal-assistant')
|
ManageAgent(action='get', id='legal-assistant')
|
||||||
|
|
||||||
# 返回示例(persona 部分):
|
# 返回中的 "## persona.md" 段落即当前 persona 原文(L0/L1/L2 分层 markdown),例如:
|
||||||
# L0: 专业的法律咨询助手
|
# ## persona.md
|
||||||
# L1:
|
# # L0
|
||||||
# role: 法律顾问
|
# 专业的法律咨询助手
|
||||||
# personality: 友好、随和
|
# # L1
|
||||||
# communicationStyle: 轻松幽默
|
# ## role
|
||||||
|
# 法律顾问
|
||||||
|
# ## personality
|
||||||
|
# - 友好
|
||||||
|
# - 随和
|
||||||
|
# ## communication_style
|
||||||
|
# 轻松幽默
|
||||||
|
|
||||||
# 2. 分析需要修改的部分,生成 diff 展示给用户确认
|
# 2. 分析需要修改的部分,生成 diff 展示给用户确认
|
||||||
|
|
||||||
# 3. 用户确认后,用 ManageAgent 字段级合并更新(只改这两个字段,L0/role 保留)
|
# 3. 用户确认后,用 ManageAgent 字段级合并更新(只改这两个字段,L0/role 保留)
|
||||||
ManageAgent(action='update', id='legal-assistant', persona={
|
ManageAgent(action='update', id='legal-assistant', persona={
|
||||||
L1: { personality: '专业、严谨', communicationStyle: '正式、克制' }
|
L1: { personality: ["专业", "严谨"], communication_style: '正式、克制' }
|
||||||
})
|
})
|
||||||
|
|
||||||
# 4. 复核结果
|
# 4. 复核结果
|
||||||
@@ -407,7 +413,7 @@ ManageAgent(action='get', id='legal-assistant')
|
|||||||
ManageAgent(action='update', id='legal-assistant', principles='...(full markdown, including the new rule)...')
|
ManageAgent(action='update', id='legal-assistant', principles='...(full markdown, including the new rule)...')
|
||||||
```
|
```
|
||||||
|
|
||||||
(If you only change one field of the structured object, you can also use a field-level merge and pass `principles={ L1: { must: [...] } }` — the field names and structure follow what `get` returns.)
|
(To change just one structured field, you can also pass a field-level merge such as `principles={ L1: { must_do: [...] } }`. The structured field names are fixed: persona uses `L1.role` / `L1.personality` (string array) / `L1.communication_style`; principles uses `L1.must_do` / `L1.must_not` (both string arrays) / `L1.priority`; plus top-level `L0` / `L2` strings.)
|
||||||
|
|
||||||
### Modify Existing Rule
|
### Modify Existing Rule
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ diff_metadata:
|
|||||||
ManageAgent(action='update', id='<agent-id>', name='新名称')
|
ManageAgent(action='update', id='<agent-id>', name='新名称')
|
||||||
ManageAgent(action='update', id='<agent-id>', description='一句话简介')
|
ManageAgent(action='update', id='<agent-id>', description='一句话简介')
|
||||||
ManageAgent(action='update', id='<agent-id>', config={ llm: { model: 'xxx', temperature: 0.7 } })
|
ManageAgent(action='update', id='<agent-id>', config={ llm: { model: 'xxx', temperature: 0.7 } })
|
||||||
ManageAgent(action='update', id='<agent-id>', persona={ L1: { personality: '专业、严谨' } })
|
ManageAgent(action='update', id='<agent-id>', persona={ L1: { personality: ["专业", "严谨"] } })
|
||||||
ManageAgent(action='update', id='<agent-id>', principles='...(完整 markdown)...')
|
ManageAgent(action='update', id='<agent-id>', principles='...(完整 markdown)...')
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -299,18 +299,24 @@ git show <commit>:persona.md
|
|||||||
# 1. 读取当前 persona,定位要改的字段(字段名以返回结构为准)
|
# 1. 读取当前 persona,定位要改的字段(字段名以返回结构为准)
|
||||||
ManageAgent(action='get', id='legal-assistant')
|
ManageAgent(action='get', id='legal-assistant')
|
||||||
|
|
||||||
# 返回示例(persona 部分):
|
# 返回中的 "## persona.md" 段落即当前 persona 原文(L0/L1/L2 分层 markdown),例如:
|
||||||
# L0: 专业的法律咨询助手
|
# ## persona.md
|
||||||
# L1:
|
# # L0
|
||||||
# role: 法律顾问
|
# 专业的法律咨询助手
|
||||||
# personality: 友好、随和
|
# # L1
|
||||||
# communicationStyle: 轻松幽默
|
# ## role
|
||||||
|
# 法律顾问
|
||||||
|
# ## personality
|
||||||
|
# - 友好
|
||||||
|
# - 随和
|
||||||
|
# ## communication_style
|
||||||
|
# 轻松幽默
|
||||||
|
|
||||||
# 2. 分析需要修改的部分,生成 diff 展示给用户确认
|
# 2. 分析需要修改的部分,生成 diff 展示给用户确认
|
||||||
|
|
||||||
# 3. 用户确认后,用 ManageAgent 字段级合并更新(只改这两个字段,L0/role 保留)
|
# 3. 用户确认后,用 ManageAgent 字段级合并更新(只改这两个字段,L0/role 保留)
|
||||||
ManageAgent(action='update', id='legal-assistant', persona={
|
ManageAgent(action='update', id='legal-assistant', persona={
|
||||||
L1: { personality: '专业、严谨', communicationStyle: '正式、克制' }
|
L1: { personality: ["专业", "严谨"], communication_style: '正式、克制' }
|
||||||
})
|
})
|
||||||
|
|
||||||
# 4. 复核结果
|
# 4. 复核结果
|
||||||
@@ -346,7 +352,7 @@ ManageAgent(action='get', id='legal-assistant')
|
|||||||
ManageAgent(action='update', id='legal-assistant', principles='...(整篇 markdown,含新增规则)...')
|
ManageAgent(action='update', id='legal-assistant', principles='...(整篇 markdown,含新增规则)...')
|
||||||
```
|
```
|
||||||
|
|
||||||
(若只改结构化对象的某个字段,也可用字段级合并传 `principles={ L1: { must: [...] } }`——字段名与结构以 `get` 返回为准。)
|
(若只改结构化对象的某个字段,也可用字段级合并传 `principles={ L1: { must_do: [...] } }`。结构化字段名固定为:persona 的 `L1.role` / `L1.personality`(字符串数组)/ `L1.communication_style`,principles 的 `L1.must_do` / `L1.must_not`(均为字符串数组)/ `L1.priority`,另有顶层 `L0` / `L2` 字符串。)
|
||||||
|
|
||||||
### 修改现有规则
|
### 修改现有规则
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user