Files
Nexus/.cursor/skills/using-superpowers/references/copilot-tools.md
T
Your Name cdd0be328a fix: 六轮深度扫描 — 47项Bug修复、安全加固、死代码清理
Critical runtime bugs:
- terminal.html WebSSH完全不可用(URL前缀/JSON解析/Content-Type三处错误)
- servers.py路由遮蔽:/logs被/{id}拦截,3个前端页面同步日志查询失败
- scripts.html startExecPoll()→startExecPolling(),长任务快速执行崩溃
- agent.py {value!r!s:.50}格式串非法,agent发非数值时ValueError
- alerts.html d.daily.reduce()无null检查,API返回空数据时TypeError

Resource leak / stability:
- websocket.py僵尸连接未关闭TCP,文件描述符泄漏
- websocket.py _last_alert_time字典无限增长(加1小时过期清理)
- asyncssh_pool.py全忙时超过MAX_CONNECTIONS无限增长
- self_monitor.py Telegram告警无冷却,宕机时每30秒刷屏
- schedule_runner.py一次性调度执行超60秒会重复触发
- 限速脚本EXPIRE每次重置窗口可绕过(改用Lua原子脚本)

Security:
- JWT access token加token_version声明,改密码后旧token立失效(零宽限)
- INSTALL_MODE导入时常量→动态函数,安装后JWT认证不再残留禁用
- install.py /lock端点加管理员存在性验证,防止阻断安装
- ServerUpdate schema移除connectivity只读字段,防止伪造连接状态

Frontend fixes:
- doExec()缺r.ok检查、commands.html null检查
- _server_to_dict()补last_checked_at+ssh_key_public
- _field_match()逗号cron表达式修复
- alerts类型显示、SSH会话名称、搜索高亮定位
- 一次性/循环定时任务(run_mode+fire_at+自动禁用)

Dead code removed (400+ lines):
- SyncService batch_push/_push_single等5个方法(零调用者)
- 5个未使用schema(SyncCommands/SyncConfig/SyncSftp/FileDeploy/PaginatedResponse)
- 6个零调用service方法、3个无前端API端点
- 4个未使用import

Schema migrations:
- push_schedules: run_mode + fire_at列,cron_expr改NULL
- servers: 7个新列 + ssh_key_private/public VARCHAR(500)→TEXT

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-24 16:26:40 +08:00

53 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Copilot CLI 工具映射
技能使用 Claude Code 的工具名称。当你在技能中遇到这些工具时,使用你平台的等价工具:
| 技能中引用的工具 | Copilot CLI 等价工具 |
|-----------------|----------------------|
| `Read`(读取文件) | `view` |
| `Write`(创建文件) | `create` |
| `Edit`(编辑文件) | `edit` |
| `Bash`(运行命令) | `bash` |
| `Grep`(搜索文件内容) | `grep` |
| `Glob`(按名称搜索文件) | `glob` |
| `Skill` 工具(调用技能) | `skill` |
| `WebFetch` | `web_fetch` |
| `Task` 工具(分派子智能体) | `task`(参见[智能体类型](#智能体类型) |
| 多个 `Task` 调用(并行) | 多个 `task` 调用 |
| Task 状态/输出 | `read_agent``list_agents` |
| `TodoWrite`(任务跟踪) | `sql` 配合内置 `todos` 表 |
| `WebSearch` | 无等价工具 — 使用 `web_fetch` 配合搜索引擎 URL |
| `EnterPlanMode` / `ExitPlanMode` | 无等价工具 — 留在主会话中 |
## 智能体类型
Copilot CLI 的 `task` 工具接受 `agent_type` 参数:
| Claude Code 智能体 | Copilot CLI 等价 |
|-------------------|----------------------|
| `general-purpose` | `"general-purpose"` |
| `Explore` | `"explore"` |
| 命名的插件智能体(如 `superpowers:code-reviewer` | 从已安装的插件中自动发现 |
## 异步 Shell 会话
Copilot CLI 支持持久化的异步 shell 会话,这在 Claude Code 中没有直接等价物:
| 工具 | 用途 |
|------|---------|
| `bash` 配合 `async: true` | 在后台启动长时间运行的命令 |
| `write_bash` | 向运行中的异步会话发送输入 |
| `read_bash` | 读取异步会话的输出 |
| `stop_bash` | 终止异步会话 |
| `list_bash` | 列出所有活跃的 shell 会话 |
## 额外的 Copilot CLI 工具
| 工具 | 用途 |
|------|---------|
| `store_memory` | 持久化代码库相关事实供未来会话使用 |
| `report_intent` | 更新 UI 状态行显示当前意图 |
| `sql` | 查询会话的 SQLite 数据库(待办、元数据) |
| `fetch_copilot_cli_documentation` | 查阅 Copilot CLI 文档 |
| GitHub MCP 工具(`github-mcp-server-*` | 原生 GitHub API 访问(issue、PR、代码搜索) |