## 摘要 / Summary ### 中文 四个智能体管理技能(create/update/delete/discover-agent)改用 `ManageAgent` 内置工具后,正文与工具契约大量重叠——ManageAgent 的 description + params 已**常驻每次 query 的上下文**,声明了五个 action 语义、参数约束、权限硬边界、错误语义、字段级合并、确认行为、list/get 返回格式;技能正文里再复述即冗余。本次对四技能做**强改写·语境融合**压缩: - 与工具契约重复的说明(参数/权限/错误码/确认行为/成功返回话术)**改写融入对应流程步骤**(如错误处理表 → 阶段一句、确认行为 → 阶段一句),不再照抄、不再表格化。 - 装饰性 ASCII 流程框图 → 一行文字流程;update 内部两张重复更新表 → 合并;YAML 元数据块(diff_metadata/context_handoff)融入流程;冗长示例(create 三份 JSON、update 附录 4 示例、discover ASCII 卡片)就地精简为代表示意。 - **不外置 references、不净删除任何内容**:所有决策/领域/交互意图完整保留——领域匹配表、persona/principles 的 L0/L1/L2 生成规范、update 两路径分流与字段级合并 vs 整体替换、防幻觉改名、回滚流程、discover 需求维度与无匹配衔接 create 等核心一字未丢。 zh 正文合计 **26542 → 9196 字符(降 ~65%)**;中英双份同步改写、逐段对齐,重算 i18n source_hash(validate-i18n 通过)。版本 create 2.5.1 / update 3.1.2 / delete 2.5.1 / discover 2.6.1,manifest 1.2.12。 ### English After the four agent-management skills adopted the `ManageAgent` builtin tool, their bodies heavily duplicated the tool contract — ManageAgent's description + params are **resident in every query's context** (action semantics, param constraints, permission hard-boundaries, error semantics, field-level merge, confirmation behavior, list/get return formats). This PR compresses all four via **aggressive rewrite + contextual fusion**: contract-duplicating text is rewritten into the relevant flow steps (not copied, not tabularized), decorative ASCII flow boxes become one-line text, update's two duplicate tables are merged, YAML metadata blocks are folded in, and long examples are trimmed in place to representative sketches. **No references externalization, no net deletion** — every decision/domain/interaction intent is preserved (domain matching table, persona/principles L0/L1/L2 generation spec, update's two-path split and field-level-merge-vs-full-replace, anti-hallucination rename, rollback flow, discover's need dimensions and create hand-off). zh bodies total **26542 → 9196 chars (~65% down)**; both locales rewritten and aligned, i18n source hashes recomputed (validate-i18n passes). Versions bumped, manifest 1.2.12.
5.5 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.1 | 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'). 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.