{
  "name": "os_admin",
  "title": "系统实例管理",
  "description": "管理 mm_os 的实例池：列出系统实例、查看运行状态与配置、删除实例或清空实例池。适用场景：排查多实例串用、释放已停止的系统实例、确认实例作用域与根目录。",
  "category": "系统内核",
  "group": "kernel",
  "type": "function",
  "main": "./index.js",
  "params": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "description": "操作类型: list 实例列表 / inspect 查看实例 / del 删除实例 / clear 清空实例池",
        "enum": ["list", "inspect", "del", "clear"],
        "default": "list"
      },
      "scope": {
        "type": "string",
        "description": "系统实例作用域（inspect/del 使用），缺省 os",
        "default": "os"
      }
    },
    "required": ["action"]
  },
  "returns": {
    "type": "object",
    "properties": {
      "code": { "type": "number", "description": "0 表示成功" },
      "msg": { "type": "string", "description": "结果描述" },
      "count": { "type": "number", "description": "实例数量" },
      "scopes": { "type": "array", "items": { "type": "string" }, "description": "实例作用域列表" },
      "exists": { "type": "boolean", "description": "实例是否存在" },
      "running": { "type": "boolean", "description": "是否处于运行态" },
      "state": { "type": "string", "description": "生命周期状态" },
      "name": { "type": "string", "description": "实例名称" },
      "root": { "type": "string", "description": "根目录" },
      "ok": { "type": "boolean", "description": "操作是否成功" },
      "error": { "type": "object", "description": "异常信息" }
    }
  },
  "handler": "manager"
}
