## 摘要 / Summary ### 中文 #56 的复盘修正。上一轮"强改写压缩"把四技能 L1 的**技术属性、使用场景与交互示范当套话一刀切**,造成实质信息丢失(承诺"意图全保留"但未做到)。本 PR 补回: - **create**:`创建仓库符合 AgentFS v2 规范、git 管理版本(可治理/可追溯)`定位;`基础创建`形态(name+description,description 自动填充 persona L0);需求收集的**引导问题示例**("起什么名字?/主要负责什么?"…);企业部署/开发者原型使用场景。 - **update**:`agent 目录 git 管理版本、历史可追溯`定位 + 使用场景。 - **discover**:使用场景(浏览/新用户/找替代)+ `语义匹配而非关键词搜索`。 - **delete**:使用场景(清理/测试/释放存储)。 根因:L1 混着实质技术属性与营销套话、使用场景是触发判据、引导问题是交互示范,不该按"只留独有信息"一刀切。补回后仍保留结构性压缩(zh 正文合计仍降 ~64%)。版本 create 2.5.2 / update 3.1.3 / delete 2.5.2 / discover 2.6.2,manifest 1.2.13,中英双份同步、重算 source_hash(validate-i18n 通过)。 ### English Post-mortem fix for #56. The previous aggressive compression treated the skills' L1 technical attributes, use cases, and interaction demos as boilerplate and cut them in a blanket way, dropping substantive information (the "all intent preserved" claim wasn't fully met). This PR restores: create's AgentFS-v2 / git-version-management positioning, the "basic create" form (name+description auto-filling persona L0), the requirement-gathering prompt questions, and enterprise/developer use cases; update's git-versioned/traceable positioning and use cases; discover's use cases and "semantic match, not keyword search"; delete's use cases. Root cause: L1 mixed real technical attributes with marketing boilerplate, use cases are trigger cues, and prompt questions are interaction demos — none should have been blanket-cut. Structural compression is retained (zh bodies still ~64% smaller). Versions bumped, manifest 1.2.13, both locales synced, source hashes recomputed (validate-i18n passes).
5.6 KiB
name, description, version, type, risk_level, status, disable-model-invocation, tags, metadata, market
| name | description | version | type | risk_level | status | disable-model-invocation | tags | metadata | market | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| delete-agent | 安全删除指定的智能体及其关联数据。删除前会验证智能体状态,支持可选地删除所有会话历史。Use when 用户需要删除不再使用的智能体。 | 2.5.2 | meta | high | enabled | true |
|
|
|
delete-agent skill
L0: One-Sentence Summary
Safely delete a specified Agent and its associated data (filesystem, in-memory state, optional conversation history).
L1: Overview
Meta-skill: list candidates → confirm intent (irreversible) → ask whether to delete history → execute via ManageAgent(action='delete'). Use it to clean up Agents that are no longer used, test/experimental, or need storage reclaimed. Its value is what the tool can't give: candidate filtering with status guidance, and intent confirmation before deletion. The tool guarantees the multi-way refusals (core agent / self / active state) and team cascading.
L2: Detailed Spec
Flow: list deletable Agents → confirm intent and target → ask whether to delete history → execute → receipt.
Stage 1: List Candidates
When the user hasn't named a specific Agent, fetch the list with ManageAgent(action='list') and group by status: offline / error are safe to delete; online / busy / recovery are marked "stop first" (the tool will refuse them) and excluded from the rest of the flow. For details, use ManageAgent(action='get', id). E.g.:
Deletable: Legal Advisor (legal-assistant, offline), Test Bot (test-bot, offline)
Stop first: Data Analyst (data-analyst, online)
Stage 2: Confirm Intent
Confirm the target Agent (name/ID) with the user, explicitly state it is irreversible (config, skills, tools will be permanently deleted), show basic info, and wait for confirmation.
Stage 3: Ask About Deletion Options
Ask whether to also delete all of the Agent's conversation history: yes → deleteRuns=true; no → deleteRuns=false (default, omittable, keeps history).
Stage 4: Execute Deletion
Before the call, tell the user "the system will pop up a confirmation window; please confirm there" (delete is force-confirmed at the tool layer). Execute:
ManageAgent(action='delete', id='legal-assistant', deleteRuns=true)
After confirmation the deletion completes, including team cascading: a team whose supervisor is the target is disbanded; membership is removed where the target is a member.
Stage 5: Receipt
From the tool's return (cleaned paths, deleted run count, memory-cleanup details), produce a user-friendly report (no internal paths), e.g. "✅ Deleted XXX; cleaned filesystem / scheduler / subscriptions / MCP / N conversation records / team cascade".
Deletion Scope and Boundaries
- Always deleted: AgentFS directory (config/persona/rules/skills/tools/memory), user preference data, in-memory state (scheduler/queue/message subscriptions/MCP connections), registry entry. Optionally deleted (
deleteRuns=true): conversation history and topic index. Team cascade (automatic): supervisor → disband team, member → remove. Kept: other Agents, user config, global settings, market cache. - Explain tool refusals to the user with a next step: the core agent (desirecore / core / bound UUID) cannot be deleted; the caller can't delete itself; active state (online/busy/recovery) needs stopping in the UI first or waiting until idle; a non-existent ID means the Agent is already gone or the ID is wrong.
- Always done via
ManageAgent(action='list' | 'get' | 'delete'); delete is a high-risk operation and is force-confirmed at the tool layer.